Skip to content

[AI 연동] canonical Slot 조회와 Agent 재호출 구현 - #81

Merged
hywznn merged 4 commits into
mainfrom
feat/74-ai-slot-resolution
Aug 4, 2026
Merged

[AI 연동] canonical Slot 조회와 Agent 재호출 구현#81
hywznn merged 4 commits into
mainfrom
feat/74-ai-slot-resolution

Conversation

@hywznn

@hywznn hywznn commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

연결

목표

Agent가 CONTEXT_REQUIRED로 요청한 canonical Slot을 현재 사업장 DB에서 안전하게 조회하고, 같은 분석을 ANALYZE 단계로 이어서 호출합니다.

PLAN 응답
→ requiredFieldKeys 확인
→ Workflow allow-list와 companyId 검증
→ Worker DB 값 조회
→ 새 AiAttempt 내부 기록
→ 최소 ANALYZE JSON으로 Runtime 재호출

주요 변경

  • worker_id, stay_expiry_date, contract_end_date 고정 Resolver 추가
  • Agent의 임의 SQL·DB column 접근 금지
  • 현재 companyId 범위에서만 Worker 조회
  • 대상 없음·동명이인·누락 값·금지 field를 안전한 오류로 구분
  • requestId와 원래 instruction 유지
  • Runtime 호출 전 새 attemptId를 Server 내부에 기록하는 Port 추가
  • 자동 DB 보충 최대 2회 제한
  • Agent 결과만으로 Task·승인·발송을 자동 실행하지 않음

#56 최소 계약 보존

Runtime에는 다음 값만 전송합니다.

  • requestId
  • phase
  • analysisInput.instruction
  • analysisInput.requestedFieldKeys
  • analysisInput.workers[].workerRef
  • analysisInput.workers[].requestedFields

attemptId, version, deadline, extractedSlots, workflowConstraints는 Server 내부에서만 관리합니다.

검증

범위 밖

@hywznn
hywznn marked this pull request as ready for review August 4, 2026 00:15
@hywznn
hywznn requested review from chaeliki and krestar August 4, 2026 00:15

@chaeliki chaeliki left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

확인했습니다. 슬롯 조회 부분이랑 반복 제한 부분 등 확인했습니다. Worker 바꿔치기 보안 부분도 죠습니다..

@hywznn
hywznn merged commit c2af9d4 into main Aug 4, 2026
4 checks passed
@hywznn
hywznn deleted the feat/74-ai-slot-resolution branch August 4, 2026 01:39
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.

2 participants