Skip to content

feat(ai): canonical Slot 조회 및 Agent 재호출 구현 - #78

Closed
hywznn wants to merge 3 commits into
agent/8-ai-runtime-httpfrom
feat/74-ai-slot-resolution
Closed

feat(ai): canonical Slot 조회 및 Agent 재호출 구현#78
hywznn wants to merge 3 commits into
agent/8-ai-runtime-httpfrom
feat/74-ai-slot-resolution

Conversation

@hywznn

@hywznn hywznn commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

왜 필요한가요?

Refs #74

Agent는 발화문만 보고 Server DB를 직접 조회할 수 없습니다. PLAN 응답으로 필요한 canonical Slot key를 요청하면, Server가 현재 사업장 범위와 Workflow 허용 목록을 확인한 뒤 값만 보충해 ANALYZE를 다시 호출해야 합니다.

이 PR은 #56의 PLAN/ANALYZE 계약을 선행 기반으로 사용합니다.

무엇이 바뀌나요?

  • worker_id, stay_expiry_date, contract_end_date 고정 Resolver를 추가했습니다.
  • Agent가 임의 DB column이나 SQL을 요청할 수 없도록 Workflow allow-list로 제한했습니다.
  • 현재 companyId 안에서 근로자를 조회해 다른 사업장 데이터 접근을 차단했습니다.
  • 대상 없음·동명이인·누락 값·금지 field를 구분했습니다.
  • PLAN의 "발화문, INTENT_TAG" 단일 instruction을 ANALYZE에도 그대로 보존합니다.
  • 같은 requestId와 새 attemptId로 재호출하고, Runtime 호출 전에 Attempt 기록 Port를 먼저 호출합니다.
  • 자동 DB 보충을 최대 2회로 제한했습니다.
  • Agent 결과로 Task·승인·발송을 자동 실행하지 않습니다.

테스트

  • ./gradlew clean test 성공
  • Resolver 단위 테스트
  • 실제 JPA 사업장 격리·동명이인 통합 테스트
  • PLAN → CONTEXT_REQUIRED → ANALYZE 재호출 순서·문맥 보존 테스트

병합 전 확인

현재는 선행 계약 확인을 위한 Draft PR입니다.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant