docs를 저장소로 되돌리고 계약 예제를 복원한다

5cfb8a1이 .gitignore에 docs/를 넣고 68개 파일을 지웠다. 그런데
AgentBuilderContractExampleTest, ToolBundleContractExampleTest,
ArchitectureDocumentContractTest는 docs/ 아래 계약 예제와 architecture
문서를 입력으로 직접 읽는다. 그 결과 clean clone에서 테스트 10건이
입력을 찾지 못해 실패했다.

제외 범위를 원래 의도대로 좁힌다. 에이전트 산출물(AGENTS.md, .agents/,
.codex/, docs/superpowers/)은 계속 제외하고 저장소 문서는 추적한다.

문서는 삭제 직전 상태(3de052a)를 기준으로 복원하고, 그 위에 main 코드와
대조해 어긋난 부분을 고쳤다.

- ADR-0007을 Superseded로 바꾸고 ADR-0013을 새로 쓴다. route당 Tool
  Service N개가 최종안이며, PortalToolRegistryClient가 이미 route별로
  N개를 유지하고 있는데 ADR-0007은 "bundles는 항상 한 항목"을 Accepted
  상태로 주장하고 있었다. ADR-0009 결정 4도 부분 대체한다.
- ADR-0008 파일 헤더가 Accepted였으나 ADR-0009가 이미 대체한 상태였다.
- 6078852의 endpoint 소유권 반전이 반영되지 않은 서술을 계약 v0.2,
  bundle 설정 예제, Tool 적재 안내에서 고친다.
- Portal registry 계약 v0.1과 route key 규약을 새로 문서화한다. 둘 다
  구현은 있는데 계약 문서가 없었다.
- MCP SDK 2.0.0 SBOM을 추가한다.

번호 주석: ADR-0011과 0012는 feature/mcp-integration이 Tool inputSchema
정책에 쓰고 있어 비워 둔다.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-22 23:27:56 +09:00
parent 5a523ab317
commit cb29b192b4
76 changed files with 4626 additions and 1 deletions

View File

@@ -0,0 +1,54 @@
{
"bundles": [
{
"bundleId": "insurance-processing",
"enabled": true,
"status": "healthy",
"revision": "sha256:9f2c4a17b83e5d06c1f9a2e7b45d8c30ff1a6b92e4c7d5083a1b6e9f2c4d7a850",
"toolCount": 2,
"consecutiveFailures": 0,
"lastSuccessAt": "2026-07-29T02:29:45Z",
"lastFailureReason": null
},
{
"bundleId": "insurance-corebanking",
"enabled": true,
"status": "degraded",
"revision": "sha256:1d70e6b4c2a89f35e0b7d4816c3a92f5088b1e7d6a4c93520fb8e1d7a6c40395",
"toolCount": 5,
"consecutiveFailures": 1,
"lastSuccessAt": "2026-07-29T02:29:15Z",
"lastFailureReason": "ResourceAccessException"
},
{
"bundleId": "insurance-payment",
"enabled": true,
"status": "degraded",
"revision": "sha256:7e4c81b0f90f4a2c31e7d1086aa9cd31b2f14403e1f0c6633ca2b424e6d4a812",
"toolCount": 3,
"consecutiveFailures": 4,
"lastSuccessAt": "2026-07-29T02:10:00Z",
"lastFailureReason": "ResourceAccessException"
},
{
"bundleId": "insurance-claim",
"enabled": true,
"status": "unreachable",
"revision": null,
"toolCount": 0,
"consecutiveFailures": 2,
"lastSuccessAt": null,
"lastFailureReason": "IllegalStateException"
},
{
"bundleId": "insurance-channel",
"enabled": false,
"status": "disabled",
"revision": null,
"toolCount": 0,
"consecutiveFailures": 0,
"lastSuccessAt": null,
"lastFailureReason": null
}
]
}

View File

@@ -0,0 +1,97 @@
{
"bundleId": "insurance-processing",
"revision": "sha256:9f2c4a17b83e5d06c1f9a2e7b45d8c30ff1a6b92e4c7d5083a1b6e9f2c4d7a850",
"tools": [
{
"name": "processing.contract.inquiry",
"title": "계약 조회",
"description": "계약번호로 계약의 기본 정보를 조회합니다. 사용자가 특정 계약의 상태, 보험료, 계약일을 물어볼 때 사용합니다. 테스트 전용이며 실제 고객 계약 데이터는 처리하지 않습니다.",
"inputSchema": {
"type": "object",
"properties": {
"contractNo": {
"type": "string",
"description": "조회할 계약번호입니다.",
"minLength": 1
}
},
"required": ["contractNo"],
"additionalProperties": false
},
"annotations": {
"title": "계약 조회",
"readOnlyHint": true,
"destructiveHint": false,
"idempotentHint": true,
"openWorldHint": false
},
"_meta": {
"version": "1.2.0",
"endpoint": "/mcp/processing.contract.inquiry",
"timeoutMillis": 3000,
"enabled": true
}
},
{
"name": "processing.payment.history",
"title": "수납 이력 조회",
"description": "계약번호로 수납 이력을 조회합니다. 사용자가 납입 내역이나 미납 여부를 물어볼 때 사용합니다.",
"inputSchema": {
"type": "object",
"properties": {
"contractNo": {
"type": "string",
"description": "조회할 계약번호입니다.",
"minLength": 1
},
"months": {
"type": "integer",
"description": "조회할 최근 개월 수입니다.",
"minimum": 1,
"maximum": 36
}
},
"required": ["contractNo"],
"additionalProperties": false
},
"annotations": {
"readOnlyHint": true,
"destructiveHint": false,
"idempotentHint": true,
"openWorldHint": false
},
"_meta": {
"version": "1.0.1",
"endpoint": "/mcp/processing.payment.history",
"timeoutMillis": 5000,
"enabled": true
}
},
{
"name": "processing.notice.send",
"title": "안내 발송",
"description": "계약자에게 안내 메시지를 발송합니다. 사용자가 명시적으로 발송을 요청한 경우에만 사용합니다.",
"inputSchema": {
"type": "object",
"properties": {
"contractNo": { "type": "string", "minLength": 1 },
"template": { "type": "string", "enum": ["PAYMENT_DUE", "CONTRACT_EXPIRY"] }
},
"required": ["contractNo", "template"],
"additionalProperties": false
},
"annotations": {
"readOnlyHint": false,
"destructiveHint": false,
"idempotentHint": false,
"openWorldHint": false
},
"_meta": {
"version": "0.9.0",
"endpoint": "/mcp/processing.notice.send",
"timeoutMillis": 10000,
"enabled": false
}
}
]
}

View File

@@ -0,0 +1,51 @@
# MCP Server의 bundle 조회 설정 예시 (protocol-v0.2-bundle-discovery.md 3절)
#
# 이 파일은 계약 예시이며 실제 적용 설정이 아니다.
# 운영에서는 ConfigMap으로 주입하고 MCP Server마다 다른 bundle 목록을 갖는다.
#
# 키 이름은 구현된 McpProperties와 1:1로 맞춰 두었다. Spring relaxed binding이
# camelCase와 kebab-case를 모두 받으므로 이 문서는 읽기 쉬운 camelCase를 쓴다.
mcp:
# 이 MCP Server의 식별자. Redis key namespace에 사용한다.
identity: mcp-insurance-core
registry:
# 조회 주기와 첫 scheduled refresh 쏠림을 줄이는 지연 jitter. 기동 preload는 즉시 실행한다.
refreshIntervalSeconds: 30
refreshJitterSeconds: 5
discovery:
# 운영 profile에서는 true이고 아래 Tool Service 매니페스트만 원천으로 사용한다.
# false는 local profile의 테스트 JSON에만 사용한다.
enabled: true
connectTimeoutMillis: 1000
readTimeoutMillis: 3000
# 상한. 초과 시 처리는 계약 7절을 따른다.
maxToolsPerBundle: 100
maxToolsTotal: 200
maxManifestBytes: 1048576
# 매니페스트가 선언한 Tool timeout의 상한. 초과분은 절삭한다.
# Tool이 과도한 timeout을 선언해 MCP 스레드를 점유하는 것을 막는다.
maxToolTimeoutMillis: 30000
# 스키마는 N개를 허용하지만 운영 배포에서는 항상 한 항목이다.
# MCP 배포 하나가 Tool Service 하나만 보기 때문이다(ADR-0007).
# 대상을 늘리려면 이 목록이 아니라 MCP 배포를 하나 더 만든다.
bundles:
- id: insurance-processing
# 매니페스트 조회 주소 (MCP -> Tool)
manifestUrl: http://tool-processing.ax-hub.svc.cluster.local:8080/tool-manifest
# 매니페스트의 상대 endpoint를 절대 URL로 바꿀 때 쓰는 기준 주소.
# Pod IP가 아니라 Service URL을 사용한다.
# Tool 실행 주소 자체는 매니페스트의 endpoint 또는 _meta.endpoint가 정한다(ADR-0010).
# 매니페스트가 절대 URL을 쓰면 해석에는 쓰이지 않지만, 그때도 절대 HTTP(S)여야 한다.
baseEndpoint: http://tool-processing.ax-hub.svc.cluster.local:8080/mcp
# Tool Service가 선언한 표준 MCP name이 따라야 할 접두사.
# 업무 단위이며 중요도 등급을 넣지 않는다. 등급이 이름에 들어가면
# Tool 재분류가 Tool name 변경이 되어 Agent Builder 재등록을 부른다.
namePrefix: "processing."
enabled: true