spring-runtime-mcp 0.2.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (118) hide show
  1. spring_runtime_mcp/__init__.py +3 -0
  2. spring_runtime_mcp/adapters/__init__.py +1 -0
  3. spring_runtime_mcp/adapters/beans.py +159 -0
  4. spring_runtime_mcp/adapters/conditions.py +333 -0
  5. spring_runtime_mcp/adapters/config.py +295 -0
  6. spring_runtime_mcp/adapters/drift.py +790 -0
  7. spring_runtime_mcp/adapters/health.py +164 -0
  8. spring_runtime_mcp/adapters/mapping_predicates.py +201 -0
  9. spring_runtime_mcp/adapters/mappings.py +294 -0
  10. spring_runtime_mcp/adapters/migrations.py +373 -0
  11. spring_runtime_mcp/adapters/openapi.py +683 -0
  12. spring_runtime_mcp/adapters/source_catalog.py +119 -0
  13. spring_runtime_mcp/adapters/startup.py +202 -0
  14. spring_runtime_mcp/analyzers/__init__.py +1 -0
  15. spring_runtime_mcp/analyzers/bean_graph.py +172 -0
  16. spring_runtime_mcp/analyzers/condition_failures.py +359 -0
  17. spring_runtime_mcp/cli.py +248 -0
  18. spring_runtime_mcp/contracts/__init__.py +1 -0
  19. spring_runtime_mcp/contracts/definitions.py +425 -0
  20. spring_runtime_mcp/diagnostics.py +254 -0
  21. spring_runtime_mcp/models/__init__.py +1 -0
  22. spring_runtime_mcp/models/bean_graph.py +77 -0
  23. spring_runtime_mcp/models/common.py +99 -0
  24. spring_runtime_mcp/models/conditions.py +56 -0
  25. spring_runtime_mcp/models/queries.py +140 -0
  26. spring_runtime_mcp/models/source_catalog.py +35 -0
  27. spring_runtime_mcp/models/timestamps.py +71 -0
  28. spring_runtime_mcp/policy/__init__.py +1 -0
  29. spring_runtime_mcp/policy/configuration.py +32 -0
  30. spring_runtime_mcp/policy/output_guard.py +117 -0
  31. spring_runtime_mcp/policy/sanitization.py +616 -0
  32. spring_runtime_mcp/py.typed +0 -0
  33. spring_runtime_mcp/replay.py +220 -0
  34. spring_runtime_mcp/replay_data/bean_graph/README.md +26 -0
  35. spring_runtime_mcp/replay_data/bean_graph/factory-method/conditions.json +43 -0
  36. spring_runtime_mcp/replay_data/bean_graph/factory-method/source-catalog.json +54 -0
  37. spring_runtime_mcp/replay_data/bean_graph/nested-conditions/beans.json +99 -0
  38. spring_runtime_mcp/replay_data/bean_graph/nested-conditions/conditions.json +25 -0
  39. spring_runtime_mcp/replay_data/bean_graph/parent-child/beans.json +92 -0
  40. spring_runtime_mcp/replay_data/bean_graph/shape-metadata.json +32 -0
  41. spring_runtime_mcp/replay_data/bean_graph/stripe-missing/conditions.json +43 -0
  42. spring_runtime_mcp/replay_data/bean_graph/stripe-missing/source-catalog.json +54 -0
  43. spring_runtime_mcp/replay_data/conformance/README.md +41 -0
  44. spring_runtime_mcp/replay_data/conformance/boot-2.7-servlet/beans.json +92 -0
  45. spring_runtime_mcp/replay_data/conformance/boot-2.7-servlet/conditions.json +52 -0
  46. spring_runtime_mcp/replay_data/conformance/boot-2.7-servlet/configprops.json +20 -0
  47. spring_runtime_mcp/replay_data/conformance/boot-2.7-servlet/env.json +16 -0
  48. spring_runtime_mcp/replay_data/conformance/boot-2.7-servlet/flyway.json +40 -0
  49. spring_runtime_mcp/replay_data/conformance/boot-2.7-servlet/health-v2.json +14 -0
  50. spring_runtime_mcp/replay_data/conformance/boot-2.7-servlet/health-v3.json +38 -0
  51. spring_runtime_mcp/replay_data/conformance/boot-2.7-servlet/liquibase.json +30 -0
  52. spring_runtime_mcp/replay_data/conformance/boot-2.7-servlet/mappings.json +40 -0
  53. spring_runtime_mcp/replay_data/conformance/boot-2.7-servlet/openapi.json +54 -0
  54. spring_runtime_mcp/replay_data/conformance/boot-2.7-servlet/source-catalog.json +90 -0
  55. spring_runtime_mcp/replay_data/conformance/boot-2.7-servlet/startup.json +45 -0
  56. spring_runtime_mcp/replay_data/conformance/boot-3.4-servlet/beans.json +92 -0
  57. spring_runtime_mcp/replay_data/conformance/boot-3.4-servlet/conditions.json +52 -0
  58. spring_runtime_mcp/replay_data/conformance/boot-3.4-servlet/configprops.json +20 -0
  59. spring_runtime_mcp/replay_data/conformance/boot-3.4-servlet/env.json +16 -0
  60. spring_runtime_mcp/replay_data/conformance/boot-3.4-servlet/flyway.json +40 -0
  61. spring_runtime_mcp/replay_data/conformance/boot-3.4-servlet/health-v3.json +38 -0
  62. spring_runtime_mcp/replay_data/conformance/boot-3.4-servlet/liquibase.json +30 -0
  63. spring_runtime_mcp/replay_data/conformance/boot-3.4-servlet/mappings.json +40 -0
  64. spring_runtime_mcp/replay_data/conformance/boot-3.4-servlet/openapi.json +54 -0
  65. spring_runtime_mcp/replay_data/conformance/boot-3.4-servlet/source-catalog.json +90 -0
  66. spring_runtime_mcp/replay_data/conformance/boot-3.4-servlet/startup.json +45 -0
  67. spring_runtime_mcp/replay_data/conformance/boot-4.1-webflux/beans.json +92 -0
  68. spring_runtime_mcp/replay_data/conformance/boot-4.1-webflux/conditions.json +52 -0
  69. spring_runtime_mcp/replay_data/conformance/boot-4.1-webflux/configprops.json +20 -0
  70. spring_runtime_mcp/replay_data/conformance/boot-4.1-webflux/env.json +16 -0
  71. spring_runtime_mcp/replay_data/conformance/boot-4.1-webflux/flyway.json +40 -0
  72. spring_runtime_mcp/replay_data/conformance/boot-4.1-webflux/health-v3.json +38 -0
  73. spring_runtime_mcp/replay_data/conformance/boot-4.1-webflux/liquibase.json +30 -0
  74. spring_runtime_mcp/replay_data/conformance/boot-4.1-webflux/mappings.json +40 -0
  75. spring_runtime_mcp/replay_data/conformance/boot-4.1-webflux/openapi.json +54 -0
  76. spring_runtime_mcp/replay_data/conformance/boot-4.1-webflux/servlet-namespace-comparison.json +4 -0
  77. spring_runtime_mcp/replay_data/conformance/boot-4.1-webflux/source-catalog.json +90 -0
  78. spring_runtime_mcp/replay_data/conformance/boot-4.1-webflux/startup.json +45 -0
  79. spring_runtime_mcp/replay_data/conformance/contracts/springboot_analyze_startup.json +62 -0
  80. spring_runtime_mcp/replay_data/conformance/contracts/springboot_check_migrations.json +63 -0
  81. spring_runtime_mcp/replay_data/conformance/contracts/springboot_detect_drift.json +64 -0
  82. spring_runtime_mcp/replay_data/conformance/contracts/springboot_diagnose_health.json +59 -0
  83. spring_runtime_mcp/replay_data/conformance/contracts/springboot_inspect_beans.json +56 -0
  84. spring_runtime_mcp/replay_data/conformance/contracts/springboot_inspect_config.json +62 -0
  85. spring_runtime_mcp/replay_data/conformance/contracts/springboot_search_openapi.json +80 -0
  86. spring_runtime_mcp/replay_data/conformance/contracts/springboot_verify_mappings.json +58 -0
  87. spring_runtime_mcp/replay_data/conformance/faults/cases.json +63 -0
  88. spring_runtime_mcp/replay_data/conformance/faults/health-hidden.expected.json +54 -0
  89. spring_runtime_mcp/replay_data/conformance/faults/health-hidden.json +3 -0
  90. spring_runtime_mcp/replay_data/conformance/large/beans-2500.json +22506 -0
  91. spring_runtime_mcp/replay_data/conformance/manifest.json +46 -0
  92. spring_runtime_mcp/schemas/tools-contract.json +1902 -0
  93. spring_runtime_mcp/server.py +322 -0
  94. spring_runtime_mcp/services.py +44 -0
  95. spring_runtime_mcp/snapshots.py +340 -0
  96. spring_runtime_mcp/tools/__init__.py +1 -0
  97. spring_runtime_mcp/tools/analyze_startup.py +79 -0
  98. spring_runtime_mcp/tools/check_migrations.py +99 -0
  99. spring_runtime_mcp/tools/detect_drift.py +323 -0
  100. spring_runtime_mcp/tools/diagnose_health.py +88 -0
  101. spring_runtime_mcp/tools/inspect_beans.py +479 -0
  102. spring_runtime_mcp/tools/inspect_config.py +102 -0
  103. spring_runtime_mcp/tools/registry.py +48 -0
  104. spring_runtime_mcp/tools/search_openapi.py +79 -0
  105. spring_runtime_mcp/tools/support.py +166 -0
  106. spring_runtime_mcp/tools/verify_mappings.py +62 -0
  107. spring_runtime_mcp/transport/__init__.py +1 -0
  108. spring_runtime_mcp/transport/actuator_http.py +459 -0
  109. spring_runtime_mcp/transport/bounded_json.py +144 -0
  110. spring_runtime_mcp/transport/replay_files.py +71 -0
  111. spring_runtime_mcp/transport/response_gate.py +186 -0
  112. spring_runtime_mcp/transport/responses.py +82 -0
  113. spring_runtime_mcp/transport/stdio.py +44 -0
  114. spring_runtime_mcp-0.2.0.dist-info/METADATA +320 -0
  115. spring_runtime_mcp-0.2.0.dist-info/RECORD +118 -0
  116. spring_runtime_mcp-0.2.0.dist-info/WHEEL +4 -0
  117. spring_runtime_mcp-0.2.0.dist-info/entry_points.txt +2 -0
  118. spring_runtime_mcp-0.2.0.dist-info/licenses/LICENSE +201 -0
@@ -0,0 +1,1902 @@
1
+ {
2
+ "contractVersion": "2",
3
+ "protocolVersion": "2026-07-28",
4
+ "tools": [
5
+ {
6
+ "name": "springboot_analyze_startup",
7
+ "description": "返回非破坏性启动快照中的版本、时间线跨度、最慢步骤及父子链;排查慢启动时调用,不用于当前请求延迟,也不执行排空缓冲区的 POST。",
8
+ "annotations": {"title": "启动瓶颈诊断","readOnlyHint": true,"destructiveHint": false,"idempotentHint": true,"openWorldHint": false},
9
+ "inputSchema": {
10
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
11
+ "type": "object",
12
+ "properties": {
13
+ "targetId": {"type": "string","minLength": 1,"maxLength": 64,"pattern": "^[A-Za-z0-9_-]+$(?![\\s\\S])","default": "local"},
14
+ "maxResults": {"type": "integer","minimum": 1,"maximum": 50,"default": 50},
15
+ "cursor": {"type": "string","maxLength": 2048,"minLength": 1},
16
+ "stepNamePattern": {
17
+ "type": "string",
18
+ "minLength": 1,
19
+ "maxLength": 128,
20
+ "pattern": "^[A-Za-z0-9_.$/{}:*?+@! -]+$(?![\\s\\S])",
21
+ "description": "Bounded case-sensitive glob: only * and ? are wildcards; all other allowed characters are literal. No regex."
22
+ },
23
+ "beanNamePattern": {
24
+ "type": "string",
25
+ "minLength": 1,
26
+ "maxLength": 128,
27
+ "pattern": "^[A-Za-z0-9_.$/{}:*?+@! -]+$(?![\\s\\S])",
28
+ "description": "Bounded case-sensitive glob: only * and ? are wildcards; all other allowed characters are literal. No regex."
29
+ },
30
+ "minDurationMs": {"type": "number","minimum": 0,"default": 0},
31
+ "maxDepth": {"type": "integer","minimum": 0,"maximum": 16,"default": 4}
32
+ },
33
+ "required": [],
34
+ "additionalProperties": false
35
+ },
36
+ "outputSchema": {
37
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
38
+ "type": "object",
39
+ "properties": {
40
+ "schemaVersion": {"const": "2"},
41
+ "status": {"enum": ["ok","partial","denied","unavailable","invalid","too_large"]},
42
+ "source": {
43
+ "type": "object",
44
+ "properties": {
45
+ "targetId": {"type": "string","maxLength": 64},
46
+ "snapshotId": {"anyOf": [{"type": "string","maxLength": 96},{"type": "null"}]},
47
+ "observedAt": {"type": "string","format": "date-time"},
48
+ "endpointIds": {
49
+ "type": "array",
50
+ "items": {"enum": ["startup","flyway","liquibase","beans","conditions","mappings","health","health-liveness","health-readiness","env","configprops","env-property","info","openapi"]},
51
+ "maxItems": 14,
52
+ "uniqueItems": true
53
+ },
54
+ "bootVersion": {"anyOf": [{"type": "string","maxLength": 64},{"type": "null"}]},
55
+ "adapterVersion": {"type": "string","maxLength": 32},
56
+ "policyVersion": {"type": "string","maxLength": 32}
57
+ },
58
+ "required": ["targetId","snapshotId","observedAt","endpointIds","bootVersion","adapterVersion","policyVersion"],
59
+ "additionalProperties": false
60
+ },
61
+ "data": {
62
+ "anyOf": [
63
+ {
64
+ "type": "object",
65
+ "properties": {
66
+ "springBootVersion": {"anyOf": [{"type": "string","maxLength": 64},{"type": "null"}]},
67
+ "totalDurationMs": {"anyOf": [{"type": "number","minimum": 0},{"type": "null"}]},
68
+ "durationBasis": {"enum": ["timelineSpan","unknown"]},
69
+ "timelineComplete": {"type": "boolean"},
70
+ "items": {
71
+ "type": "array",
72
+ "items": {
73
+ "type": "object",
74
+ "properties": {
75
+ "id": {"type": "string","maxLength": 96},
76
+ "endpointId": {"enum": ["startup"]},
77
+ "observationId": {"type": "string","maxLength": 96},
78
+ "stepId": {"type": "string","pattern": "^[0-9]+$(?![\\s\\S])","maxLength": 20},
79
+ "parentStepId": {"anyOf": [{"type": "string","pattern": "^[0-9]+$(?![\\s\\S])","maxLength": 20},{"type": "null"}]},
80
+ "name": {"type": "string","maxLength": 256},
81
+ "startedAt": {"anyOf": [{"type": "string","format": "date-time"},{"type": "null"}]},
82
+ "durationNanos": {"anyOf": [{"type": "string","pattern": "^[0-9]+$(?![\\s\\S])","maxLength": 30},{"type": "null"}]},
83
+ "durationMs": {"anyOf": [{"type": "number","minimum": 0},{"type": "null"}]},
84
+ "tags": {
85
+ "type": "array",
86
+ "items": {
87
+ "type": "object",
88
+ "properties": {"key": {"type": "string","maxLength": 128},"value": {"anyOf": [{"type": "string","maxLength": 256},{"type": "null"}]}},
89
+ "required": ["key","value"],
90
+ "additionalProperties": false
91
+ },
92
+ "maxItems": 10
93
+ },
94
+ "ancestorIds": {"type": "array","items": {"type": "string","maxLength": 20},"maxItems": 16},
95
+ "relationState": {"enum": ["resolved","orphan","cycle","duplicate"]},
96
+ "bottleneckCode": {"enum": ["BEAN_INSTANTIATION","PACKAGE_SCAN","AUTO_CONFIGURATION","OTHER","UNKNOWN"]}
97
+ },
98
+ "required": ["id","endpointId","observationId","stepId","parentStepId","name","startedAt","durationNanos","durationMs","tags","ancestorIds","relationState","bottleneckCode"],
99
+ "additionalProperties": false
100
+ },
101
+ "maxItems": 50
102
+ }
103
+ },
104
+ "required": ["springBootVersion","totalDurationMs","durationBasis","timelineComplete","items"],
105
+ "additionalProperties": false
106
+ },
107
+ {"type": "null"}
108
+ ]
109
+ },
110
+ "totalMatched": {"anyOf": [{"type": "integer","minimum": 0},{"type": "null"}]},
111
+ "truncated": {"type": "boolean"},
112
+ "truncationReasons": {"type": "array","items": {"type": "string","maxLength": 64},"maxItems": 8},
113
+ "coverage": {
114
+ "type": "object",
115
+ "properties": {
116
+ "state": {"enum": ["complete","partial","unavailable"]},
117
+ "scope": {"type": "string","maxLength": 256},
118
+ "gaps": {"type": "array","items": {"type": "string","maxLength": 64},"maxItems": 10}
119
+ },
120
+ "required": ["state","scope","gaps"],
121
+ "additionalProperties": false
122
+ },
123
+ "warnings": {
124
+ "type": "array",
125
+ "items": {
126
+ "type": "object",
127
+ "properties": {"code": {"type": "string","maxLength": 64},"recordId": {"anyOf": [{"type": "string","maxLength": 96},{"type": "null"}]}},
128
+ "required": ["code","recordId"],
129
+ "additionalProperties": false
130
+ },
131
+ "maxItems": 10
132
+ },
133
+ "redactions": {"type": "array","items": {"type": "string","maxLength": 128},"maxItems": 50},
134
+ "nextCursor": {"anyOf": [{"type": "string","maxLength": 2048},{"type": "null"}]},
135
+ "nextAction": {
136
+ "type": "object",
137
+ "properties": {
138
+ "kind": {"enum": ["done","refine","page","remediate"]},
139
+ "reasonCode": {"type": "string","maxLength": 64,"pattern": "^[A-Z][A-Z0-9_]*$(?![\\s\\S])"},
140
+ "filterSuggestions": {
141
+ "type": "array",
142
+ "items": {
143
+ "type": "object",
144
+ "properties": {
145
+ "parameter": {"type": "string","maxLength": 64},
146
+ "value": {"anyOf": [{"type": ["string","number","boolean","null"],"maxLength": 512},{"type": "array","items": {"type": "string","maxLength": 256},"maxItems": 10}]}
147
+ },
148
+ "required": ["parameter","value"],
149
+ "additionalProperties": false
150
+ },
151
+ "maxItems": 4
152
+ }
153
+ },
154
+ "required": ["kind","reasonCode","filterSuggestions"],
155
+ "additionalProperties": false
156
+ },
157
+ "errors": {"type": "array","items": {"$ref": "#/$defs/DiagnosticError"},"maxItems": 8}
158
+ },
159
+ "required": ["schemaVersion","status","source","data","totalMatched","truncated","truncationReasons","coverage","warnings","redactions","nextCursor","nextAction","errors"],
160
+ "additionalProperties": false,
161
+ "allOf": [
162
+ {
163
+ "if": {"properties": {"status": {"enum": ["denied","unavailable","invalid","too_large"]}},"required": ["status"]},
164
+ "then": {
165
+ "properties": {"data": {"type": "null"},"totalMatched": {"type": "null"},"nextCursor": {"type": "null"},"errors": {"minItems": 1},"coverage": {"properties": {"state": {"const": "unavailable"}}}}
166
+ }
167
+ },
168
+ {
169
+ "if": {"properties": {"status": {"const": "ok"}},"required": ["status"]},
170
+ "then": {"properties": {"data": {"type": "object"},"errors": {"maxItems": 0},"coverage": {"properties": {"state": {"const": "complete"}}}}}
171
+ },
172
+ {
173
+ "if": {"properties": {"status": {"const": "partial"}},"required": ["status"]},
174
+ "then": {"properties": {"data": {"type": "object"},"coverage": {"properties": {"state": {"const": "partial"}}}}}
175
+ }
176
+ ],
177
+ "$defs": {
178
+ "DiagnosticError": {
179
+ "type": "object",
180
+ "properties": {
181
+ "code": {"type": "string","maxLength": 64,"pattern": "^[A-Z][A-Z0-9_]*$(?![\\s\\S])"},
182
+ "endpointId": {
183
+ "anyOf": [
184
+ {"enum": ["startup","flyway","liquibase","beans","conditions","mappings","health","health-liveness","health-readiness","env","configprops","env-property","info","openapi"]},
185
+ {"type": "null"}
186
+ ]
187
+ },
188
+ "httpStatus": {"anyOf": [{"type": "integer","minimum": 100,"maximum": 599},{"type": "null"}]},
189
+ "retryable": {"type": "boolean"},
190
+ "message": {"type": "string","maxLength": 256,"description": "Local static template only; never upstream text."},
191
+ "remediation": {
192
+ "type": "object",
193
+ "properties": {
194
+ "recipeId": {"type": "string","maxLength": 96},
195
+ "action": {"enum": ["refineQuery","configureCapability","reviewExposure","reviewAuthorization","configureStartup","reviewTarget","reviewSource","stop"]},
196
+ "configKeys": {"type": "array","items": {"type": "string","maxLength": 128},"maxItems": 8},
197
+ "steps": {"type": "array","items": {"type": "string","maxLength": 256},"maxItems": 4},
198
+ "requiresApproval": {"type": "boolean"},
199
+ "retryAfterMs": {"anyOf": [{"type": "integer","minimum": 0,"maximum": 5000},{"type": "null"}]}
200
+ },
201
+ "required": ["recipeId","action","configKeys","steps","requiresApproval","retryAfterMs"],
202
+ "additionalProperties": false
203
+ }
204
+ },
205
+ "required": ["code","endpointId","httpStatus","retryable","message","remediation"],
206
+ "additionalProperties": false
207
+ }
208
+ }
209
+ }
210
+ },
211
+ {
212
+ "name": "springboot_check_migrations",
213
+ "description": "返回所有容器和迁移 Bean 的已报告迁移、校验和、顺序及异常状态;排查迁移失败或版本差异时调用,未报告的待执行状态需要可信预期,且不会执行 SQL 或迁移。",
214
+ "annotations": {"title": "数据库迁移审计","readOnlyHint": true,"destructiveHint": false,"idempotentHint": true,"openWorldHint": false},
215
+ "inputSchema": {
216
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
217
+ "type": "object",
218
+ "properties": {
219
+ "targetId": {"type": "string","minLength": 1,"maxLength": 64,"pattern": "^[A-Za-z0-9_-]+$(?![\\s\\S])","default": "local"},
220
+ "maxResults": {"type": "integer","minimum": 1,"maximum": 50,"default": 50},
221
+ "cursor": {"type": "string","maxLength": 2048,"minLength": 1},
222
+ "engine": {"enum": ["auto","flyway","liquibase"],"default": "auto"},
223
+ "contextId": {"type": "string","minLength": 1,"maxLength": 256,"pattern": "^[^\\u0000-\\u001f\\u007f]+$(?![\\s\\S])"},
224
+ "migrationBean": {"type": "string","minLength": 1,"maxLength": 256,"pattern": "^[^\\u0000-\\u001f\\u007f]+$(?![\\s\\S])"},
225
+ "state": {"type": "array","items": {"enum": ["APPLIED","PENDING","FAILED","OUT_OF_ORDER","MISSING_FAILED","UNKNOWN"]},"maxItems": 6,"uniqueItems": true},
226
+ "version": {"type": "string","maxLength": 128},
227
+ "expectedMigrations": {
228
+ "type": "array",
229
+ "items": {
230
+ "type": "object",
231
+ "properties": {
232
+ "engine": {"enum": ["flyway","liquibase"]},
233
+ "contextId": {"type": "string","minLength": 1,"maxLength": 256,"pattern": "^[^\\u0000-\\u001f\\u007f]+$(?![\\s\\S])"},
234
+ "migrationBean": {"type": "string","minLength": 1,"maxLength": 256,"pattern": "^[^\\u0000-\\u001f\\u007f]+$(?![\\s\\S])"},
235
+ "identity": {"type": "string","minLength": 1,"maxLength": 256,"pattern": "^[^\\u0000-\\u001f\\u007f]+$(?![\\s\\S])"},
236
+ "version": {"anyOf": [{"type": "string","maxLength": 128},{"type": "null"}]},
237
+ "checksum": {"anyOf": [{"type": "string","maxLength": 128},{"type": "null"}]}
238
+ },
239
+ "required": ["engine","contextId","migrationBean","identity"],
240
+ "additionalProperties": false
241
+ },
242
+ "maxItems": 100
243
+ },
244
+ "expectedSetComplete": {"type": "boolean","default": false}
245
+ },
246
+ "required": [],
247
+ "additionalProperties": false
248
+ },
249
+ "outputSchema": {
250
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
251
+ "type": "object",
252
+ "properties": {
253
+ "schemaVersion": {"const": "2"},
254
+ "status": {"enum": ["ok","partial","denied","unavailable","invalid","too_large"]},
255
+ "source": {
256
+ "type": "object",
257
+ "properties": {
258
+ "targetId": {"type": "string","maxLength": 64},
259
+ "snapshotId": {"anyOf": [{"type": "string","maxLength": 96},{"type": "null"}]},
260
+ "observedAt": {"type": "string","format": "date-time"},
261
+ "endpointIds": {
262
+ "type": "array",
263
+ "items": {"enum": ["startup","flyway","liquibase","beans","conditions","mappings","health","health-liveness","health-readiness","env","configprops","env-property","info","openapi"]},
264
+ "maxItems": 14,
265
+ "uniqueItems": true
266
+ },
267
+ "bootVersion": {"anyOf": [{"type": "string","maxLength": 64},{"type": "null"}]},
268
+ "adapterVersion": {"type": "string","maxLength": 32},
269
+ "policyVersion": {"type": "string","maxLength": 32}
270
+ },
271
+ "required": ["targetId","snapshotId","observedAt","endpointIds","bootVersion","adapterVersion","policyVersion"],
272
+ "additionalProperties": false
273
+ },
274
+ "data": {
275
+ "anyOf": [
276
+ {
277
+ "type": "object",
278
+ "properties": {
279
+ "pendingVisibility": {"enum": ["reported","baselineInferred","unknown"]},
280
+ "items": {
281
+ "type": "array",
282
+ "items": {
283
+ "type": "object",
284
+ "properties": {
285
+ "id": {"type": "string","maxLength": 96},
286
+ "endpointId": {"enum": ["flyway","liquibase"]},
287
+ "observationId": {"type": "string","maxLength": 96},
288
+ "contextId": {"anyOf": [{"type": "string","maxLength": 256},{"type": "null"}]},
289
+ "parentContextId": {"anyOf": [{"type": "string","maxLength": 256},{"type": "null"}]},
290
+ "engine": {"enum": ["flyway","liquibase"]},
291
+ "migrationBean": {"type": "string","maxLength": 256},
292
+ "identity": {"type": "string","maxLength": 256},
293
+ "script": {"anyOf": [{"type": "string","maxLength": 256},{"type": "null"}]},
294
+ "changeLog": {"anyOf": [{"type": "string","maxLength": 256},{"type": "null"}]},
295
+ "changeSetId": {"anyOf": [{"type": "string","maxLength": 256},{"type": "null"}]},
296
+ "author": {"anyOf": [{"type": "string","maxLength": 256},{"type": "null"}]},
297
+ "version": {"anyOf": [{"type": "string","maxLength": 128},{"type": "null"}]},
298
+ "description": {"anyOf": [{"type": "string","maxLength": 256},{"type": "null"}]},
299
+ "checksum": {"anyOf": [{"type": "string","maxLength": 128},{"type": "null"}]},
300
+ "checksumType": {"enum": ["number","string","absent"]},
301
+ "checksumAlgorithm": {"anyOf": [{"type": "string","maxLength": 64},{"type": "null"}]},
302
+ "executionTimeMs": {"anyOf": [{"type": "number","minimum": 0},{"type": "null"}]},
303
+ "orderExecuted": {"anyOf": [{"type": "integer","minimum": 0},{"type": "null"}]},
304
+ "executedAt": {"anyOf": [{"type": "string","maxLength": 64},{"type": "null"}]},
305
+ "rawState": {"anyOf": [{"type": "string","maxLength": 64},{"type": "null"}]},
306
+ "state": {"enum": ["APPLIED","PENDING","FAILED","OUT_OF_ORDER","MISSING_FAILED","UNKNOWN"]},
307
+ "stateEvidence": {"enum": ["reported","baselineInferred","unknown"]},
308
+ "attentionRequired": {"type": "boolean"}
309
+ },
310
+ "required": [
311
+ "id",
312
+ "endpointId",
313
+ "observationId",
314
+ "contextId",
315
+ "parentContextId",
316
+ "engine",
317
+ "migrationBean",
318
+ "identity",
319
+ "script",
320
+ "changeLog",
321
+ "changeSetId",
322
+ "author",
323
+ "version",
324
+ "description",
325
+ "checksum",
326
+ "checksumType",
327
+ "checksumAlgorithm",
328
+ "executionTimeMs",
329
+ "orderExecuted",
330
+ "executedAt",
331
+ "rawState",
332
+ "state",
333
+ "stateEvidence",
334
+ "attentionRequired"
335
+ ],
336
+ "additionalProperties": false
337
+ },
338
+ "maxItems": 50
339
+ }
340
+ },
341
+ "required": ["pendingVisibility","items"],
342
+ "additionalProperties": false
343
+ },
344
+ {"type": "null"}
345
+ ]
346
+ },
347
+ "totalMatched": {"anyOf": [{"type": "integer","minimum": 0},{"type": "null"}]},
348
+ "truncated": {"type": "boolean"},
349
+ "truncationReasons": {"type": "array","items": {"type": "string","maxLength": 64},"maxItems": 8},
350
+ "coverage": {
351
+ "type": "object",
352
+ "properties": {
353
+ "state": {"enum": ["complete","partial","unavailable"]},
354
+ "scope": {"type": "string","maxLength": 256},
355
+ "gaps": {"type": "array","items": {"type": "string","maxLength": 64},"maxItems": 10}
356
+ },
357
+ "required": ["state","scope","gaps"],
358
+ "additionalProperties": false
359
+ },
360
+ "warnings": {
361
+ "type": "array",
362
+ "items": {
363
+ "type": "object",
364
+ "properties": {"code": {"type": "string","maxLength": 64},"recordId": {"anyOf": [{"type": "string","maxLength": 96},{"type": "null"}]}},
365
+ "required": ["code","recordId"],
366
+ "additionalProperties": false
367
+ },
368
+ "maxItems": 10
369
+ },
370
+ "redactions": {"type": "array","items": {"type": "string","maxLength": 128},"maxItems": 50},
371
+ "nextCursor": {"anyOf": [{"type": "string","maxLength": 2048},{"type": "null"}]},
372
+ "nextAction": {
373
+ "type": "object",
374
+ "properties": {
375
+ "kind": {"enum": ["done","refine","page","remediate"]},
376
+ "reasonCode": {"type": "string","maxLength": 64,"pattern": "^[A-Z][A-Z0-9_]*$(?![\\s\\S])"},
377
+ "filterSuggestions": {
378
+ "type": "array",
379
+ "items": {
380
+ "type": "object",
381
+ "properties": {
382
+ "parameter": {"type": "string","maxLength": 64},
383
+ "value": {"anyOf": [{"type": ["string","number","boolean","null"],"maxLength": 512},{"type": "array","items": {"type": "string","maxLength": 256},"maxItems": 10}]}
384
+ },
385
+ "required": ["parameter","value"],
386
+ "additionalProperties": false
387
+ },
388
+ "maxItems": 4
389
+ }
390
+ },
391
+ "required": ["kind","reasonCode","filterSuggestions"],
392
+ "additionalProperties": false
393
+ },
394
+ "errors": {"type": "array","items": {"$ref": "#/$defs/DiagnosticError"},"maxItems": 8}
395
+ },
396
+ "required": ["schemaVersion","status","source","data","totalMatched","truncated","truncationReasons","coverage","warnings","redactions","nextCursor","nextAction","errors"],
397
+ "additionalProperties": false,
398
+ "allOf": [
399
+ {
400
+ "if": {"properties": {"status": {"enum": ["denied","unavailable","invalid","too_large"]}},"required": ["status"]},
401
+ "then": {
402
+ "properties": {"data": {"type": "null"},"totalMatched": {"type": "null"},"nextCursor": {"type": "null"},"errors": {"minItems": 1},"coverage": {"properties": {"state": {"const": "unavailable"}}}}
403
+ }
404
+ },
405
+ {
406
+ "if": {"properties": {"status": {"const": "ok"}},"required": ["status"]},
407
+ "then": {"properties": {"data": {"type": "object"},"errors": {"maxItems": 0},"coverage": {"properties": {"state": {"const": "complete"}}}}}
408
+ },
409
+ {
410
+ "if": {"properties": {"status": {"const": "partial"}},"required": ["status"]},
411
+ "then": {"properties": {"data": {"type": "object"},"coverage": {"properties": {"state": {"const": "partial"}}}}}
412
+ }
413
+ ],
414
+ "$defs": {
415
+ "DiagnosticError": {
416
+ "type": "object",
417
+ "properties": {
418
+ "code": {"type": "string","maxLength": 64,"pattern": "^[A-Z][A-Z0-9_]*$(?![\\s\\S])"},
419
+ "endpointId": {
420
+ "anyOf": [
421
+ {"enum": ["startup","flyway","liquibase","beans","conditions","mappings","health","health-liveness","health-readiness","env","configprops","env-property","info","openapi"]},
422
+ {"type": "null"}
423
+ ]
424
+ },
425
+ "httpStatus": {"anyOf": [{"type": "integer","minimum": 100,"maximum": 599},{"type": "null"}]},
426
+ "retryable": {"type": "boolean"},
427
+ "message": {"type": "string","maxLength": 256,"description": "Local static template only; never upstream text."},
428
+ "remediation": {
429
+ "type": "object",
430
+ "properties": {
431
+ "recipeId": {"type": "string","maxLength": 96},
432
+ "action": {"enum": ["refineQuery","configureCapability","reviewExposure","reviewAuthorization","configureStartup","reviewTarget","reviewSource","stop"]},
433
+ "configKeys": {"type": "array","items": {"type": "string","maxLength": 128},"maxItems": 8},
434
+ "steps": {"type": "array","items": {"type": "string","maxLength": 256},"maxItems": 4},
435
+ "requiresApproval": {"type": "boolean"},
436
+ "retryAfterMs": {"anyOf": [{"type": "integer","minimum": 0,"maximum": 5000},{"type": "null"}]}
437
+ },
438
+ "required": ["recipeId","action","configKeys","steps","requiresApproval","retryAfterMs"],
439
+ "additionalProperties": false
440
+ }
441
+ },
442
+ "required": ["code","endpointId","httpStatus","retryable","message","remediation"],
443
+ "additionalProperties": false
444
+ }
445
+ }
446
+ }
447
+ },
448
+ {
449
+ "name": "springboot_detect_drift",
450
+ "description": "比较调用者从获权工作区提取的 Bean、路由、迁移版本和 Profile 预期,返回差异及分级根因候选;源码与运行行为不一致时调用,省略维度不参与比较,文件时间本身不能证明未重启。",
451
+ "annotations": {"title": "源码与运行态漂移诊断","readOnlyHint": true,"destructiveHint": false,"idempotentHint": true,"openWorldHint": false},
452
+ "inputSchema": {
453
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
454
+ "type": "object",
455
+ "properties": {
456
+ "targetId": {"type": "string","minLength": 1,"maxLength": 64,"pattern": "^[A-Za-z0-9_-]+$(?![\\s\\S])","default": "local"},
457
+ "maxResults": {"type": "integer","minimum": 1,"maximum": 50,"default": 50},
458
+ "cursor": {"type": "string","maxLength": 2048,"minLength": 1},
459
+ "expectedBeans": {
460
+ "type": "array",
461
+ "items": {
462
+ "type": "object",
463
+ "properties": {
464
+ "name": {"type": "string","minLength": 1,"maxLength": 256,"pattern": "^[^\\u0000-\\u001f\\u007f]+$(?![\\s\\S])"},
465
+ "type": {"type": "string","minLength": 1,"maxLength": 256,"pattern": "^[^\\u0000-\\u001f\\u007f]+$(?![\\s\\S])"},
466
+ "contextId": {"type": "string","minLength": 1,"maxLength": 256,"pattern": "^[^\\u0000-\\u001f\\u007f]+$(?![\\s\\S])"},
467
+ "aliases": {"type": "array","items": {"type": "string","maxLength": 256},"maxItems": 10}
468
+ },
469
+ "required": [],
470
+ "additionalProperties": false,
471
+ "anyOf": [{"required": ["name"]},{"required": ["type"]}]
472
+ },
473
+ "maxItems": 100
474
+ },
475
+ "expectedRoutes": {
476
+ "type": "array",
477
+ "items": {
478
+ "type": "object",
479
+ "properties": {
480
+ "path": {"type": "string","minLength": 1,"maxLength": 1024,"pattern": "^/[^\\u0000-\\u001f\\u007f?#]*$(?![\\s\\S])"},
481
+ "httpMethod": {"enum": ["GET","HEAD","POST","PUT","PATCH","DELETE","OPTIONS","TRACE","CONNECT"]},
482
+ "controllerClass": {"type": "string","minLength": 1,"maxLength": 256,"pattern": "^[^\\u0000-\\u001f\\u007f]+$(?![\\s\\S])"},
483
+ "contextId": {"type": "string","minLength": 1,"maxLength": 256,"pattern": "^[^\\u0000-\\u001f\\u007f]+$(?![\\s\\S])"}
484
+ },
485
+ "required": ["path","httpMethod"],
486
+ "additionalProperties": false
487
+ },
488
+ "maxItems": 100
489
+ },
490
+ "expectedMigrationVersion": {
491
+ "type": "object",
492
+ "properties": {
493
+ "engine": {"enum": ["flyway","liquibase"]},
494
+ "version": {"type": "string","minLength": 1,"maxLength": 256,"pattern": "^[^\\u0000-\\u001f\\u007f]+$(?![\\s\\S])"},
495
+ "contextId": {"type": "string","minLength": 1,"maxLength": 256,"pattern": "^[^\\u0000-\\u001f\\u007f]+$(?![\\s\\S])"},
496
+ "migrationBean": {"type": "string","minLength": 1,"maxLength": 256,"pattern": "^[^\\u0000-\\u001f\\u007f]+$(?![\\s\\S])"}
497
+ },
498
+ "required": ["engine","version"],
499
+ "additionalProperties": false
500
+ },
501
+ "expectedProfiles": {"type": "array","items": {"type": "string","maxLength": 128},"maxItems": 20,"uniqueItems": true},
502
+ "expectedScopeComplete": {"type": "boolean","default": false},
503
+ "sourceRevision": {"type": "string","maxLength": 128},
504
+ "sourceModifiedAt": {"type": "string","format": "date-time"},
505
+ "maxDepth": {"type": "integer","minimum": 0,"maximum": 16,"default": 2}
506
+ },
507
+ "required": [],
508
+ "additionalProperties": false,
509
+ "allOf": [{"anyOf": [{"required": ["expectedBeans"]},{"required": ["expectedRoutes"]},{"required": ["expectedMigrationVersion"]},{"required": ["expectedProfiles"]}]}]
510
+ },
511
+ "outputSchema": {
512
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
513
+ "type": "object",
514
+ "properties": {
515
+ "schemaVersion": {"const": "2"},
516
+ "status": {"enum": ["ok","partial","denied","unavailable","invalid","too_large"]},
517
+ "source": {
518
+ "type": "object",
519
+ "properties": {
520
+ "targetId": {"type": "string","maxLength": 64},
521
+ "snapshotId": {"anyOf": [{"type": "string","maxLength": 96},{"type": "null"}]},
522
+ "observedAt": {"type": "string","format": "date-time"},
523
+ "endpointIds": {
524
+ "type": "array",
525
+ "items": {"enum": ["startup","flyway","liquibase","beans","conditions","mappings","health","health-liveness","health-readiness","env","configprops","env-property","info","openapi"]},
526
+ "maxItems": 14,
527
+ "uniqueItems": true
528
+ },
529
+ "bootVersion": {"anyOf": [{"type": "string","maxLength": 64},{"type": "null"}]},
530
+ "adapterVersion": {"type": "string","maxLength": 32},
531
+ "policyVersion": {"type": "string","maxLength": 32}
532
+ },
533
+ "required": ["targetId","snapshotId","observedAt","endpointIds","bootVersion","adapterVersion","policyVersion"],
534
+ "additionalProperties": false
535
+ },
536
+ "data": {
537
+ "anyOf": [
538
+ {
539
+ "type": "object",
540
+ "properties": {
541
+ "missingInRuntime": {
542
+ "type": "array",
543
+ "items": {
544
+ "type": "object",
545
+ "properties": {
546
+ "id": {"type": "string","maxLength": 96},
547
+ "dimension": {"enum": ["beans","routes","migrations"]},
548
+ "identity": {"type": "string","maxLength": 256},
549
+ "contextId": {"anyOf": [{"type": "string","maxLength": 256},{"type": "null"}]},
550
+ "expected": {"anyOf": [{"type": "string","maxLength": 256},{"type": "null"}]},
551
+ "actual": {"anyOf": [{"type": "string","maxLength": 256},{"type": "null"}]},
552
+ "evidenceLevel": {"enum": ["observed","inferred","unknown"]},
553
+ "affectedDependencyIds": {"type": "array","items": {"type": "string","maxLength": 96},"maxItems": 16}
554
+ },
555
+ "required": ["id","dimension","identity","contextId","expected","actual","evidenceLevel","affectedDependencyIds"],
556
+ "additionalProperties": false
557
+ },
558
+ "maxItems": 50
559
+ },
560
+ "unexpectedInRuntime": {
561
+ "type": "array",
562
+ "items": {
563
+ "type": "object",
564
+ "properties": {
565
+ "id": {"type": "string","maxLength": 96},
566
+ "dimension": {"enum": ["beans","routes","migrations"]},
567
+ "identity": {"type": "string","maxLength": 256},
568
+ "contextId": {"anyOf": [{"type": "string","maxLength": 256},{"type": "null"}]},
569
+ "expected": {"anyOf": [{"type": "string","maxLength": 256},{"type": "null"}]},
570
+ "actual": {"anyOf": [{"type": "string","maxLength": 256},{"type": "null"}]},
571
+ "evidenceLevel": {"enum": ["observed","inferred","unknown"]},
572
+ "affectedDependencyIds": {"type": "array","items": {"type": "string","maxLength": 96},"maxItems": 16}
573
+ },
574
+ "required": ["id","dimension","identity","contextId","expected","actual","evidenceLevel","affectedDependencyIds"],
575
+ "additionalProperties": false
576
+ },
577
+ "maxItems": 50
578
+ },
579
+ "profileMismatch": {
580
+ "anyOf": [
581
+ {
582
+ "type": "object",
583
+ "properties": {
584
+ "expected": {"type": "array","items": {"type": "string","maxLength": 128},"maxItems": 20},
585
+ "actual": {"anyOf": [{"type": "array","items": {"type": "string","maxLength": 128},"maxItems": 20},{"type": "null"}]},
586
+ "state": {"enum": ["match","mismatch","unknown"]}
587
+ },
588
+ "required": ["expected","actual","state"],
589
+ "additionalProperties": false
590
+ },
591
+ {"type": "null"}
592
+ ]
593
+ },
594
+ "rootCauseInferences": {
595
+ "type": "array",
596
+ "items": {
597
+ "type": "object",
598
+ "properties": {
599
+ "code": {"enum": ["POSSIBLE_NOT_RESTARTED","PROFILE_MISMATCH","POSSIBLE_WRONG_INSTANCE","ENVIRONMENT_OVERRIDE","INSUFFICIENT_EVIDENCE"]},
600
+ "confidence": {"enum": ["supported","candidate","unknown"]},
601
+ "evidenceIds": {"type": "array","items": {"type": "string","maxLength": 96},"maxItems": 8}
602
+ },
603
+ "required": ["code","confidence","evidenceIds"],
604
+ "additionalProperties": false
605
+ },
606
+ "maxItems": 4
607
+ }
608
+ },
609
+ "required": ["missingInRuntime","unexpectedInRuntime","profileMismatch","rootCauseInferences"],
610
+ "additionalProperties": false
611
+ },
612
+ {"type": "null"}
613
+ ]
614
+ },
615
+ "totalMatched": {"anyOf": [{"type": "integer","minimum": 0},{"type": "null"}]},
616
+ "truncated": {"type": "boolean"},
617
+ "truncationReasons": {"type": "array","items": {"type": "string","maxLength": 64},"maxItems": 8},
618
+ "coverage": {
619
+ "type": "object",
620
+ "properties": {
621
+ "state": {"enum": ["complete","partial","unavailable"]},
622
+ "scope": {"type": "string","maxLength": 256},
623
+ "gaps": {"type": "array","items": {"type": "string","maxLength": 64},"maxItems": 10}
624
+ },
625
+ "required": ["state","scope","gaps"],
626
+ "additionalProperties": false
627
+ },
628
+ "warnings": {
629
+ "type": "array",
630
+ "items": {
631
+ "type": "object",
632
+ "properties": {"code": {"type": "string","maxLength": 64},"recordId": {"anyOf": [{"type": "string","maxLength": 96},{"type": "null"}]}},
633
+ "required": ["code","recordId"],
634
+ "additionalProperties": false
635
+ },
636
+ "maxItems": 10
637
+ },
638
+ "redactions": {"type": "array","items": {"type": "string","maxLength": 128},"maxItems": 50},
639
+ "nextCursor": {"anyOf": [{"type": "string","maxLength": 2048},{"type": "null"}]},
640
+ "nextAction": {
641
+ "type": "object",
642
+ "properties": {
643
+ "kind": {"enum": ["done","refine","page","remediate"]},
644
+ "reasonCode": {"type": "string","maxLength": 64,"pattern": "^[A-Z][A-Z0-9_]*$(?![\\s\\S])"},
645
+ "filterSuggestions": {
646
+ "type": "array",
647
+ "items": {
648
+ "type": "object",
649
+ "properties": {
650
+ "parameter": {"type": "string","maxLength": 64},
651
+ "value": {"anyOf": [{"type": ["string","number","boolean","null"],"maxLength": 512},{"type": "array","items": {"type": "string","maxLength": 256},"maxItems": 10}]}
652
+ },
653
+ "required": ["parameter","value"],
654
+ "additionalProperties": false
655
+ },
656
+ "maxItems": 4
657
+ }
658
+ },
659
+ "required": ["kind","reasonCode","filterSuggestions"],
660
+ "additionalProperties": false
661
+ },
662
+ "errors": {"type": "array","items": {"$ref": "#/$defs/DiagnosticError"},"maxItems": 8}
663
+ },
664
+ "required": ["schemaVersion","status","source","data","totalMatched","truncated","truncationReasons","coverage","warnings","redactions","nextCursor","nextAction","errors"],
665
+ "additionalProperties": false,
666
+ "allOf": [
667
+ {
668
+ "if": {"properties": {"status": {"enum": ["denied","unavailable","invalid","too_large"]}},"required": ["status"]},
669
+ "then": {
670
+ "properties": {"data": {"type": "null"},"totalMatched": {"type": "null"},"nextCursor": {"type": "null"},"errors": {"minItems": 1},"coverage": {"properties": {"state": {"const": "unavailable"}}}}
671
+ }
672
+ },
673
+ {
674
+ "if": {"properties": {"status": {"const": "ok"}},"required": ["status"]},
675
+ "then": {"properties": {"data": {"type": "object"},"errors": {"maxItems": 0},"coverage": {"properties": {"state": {"const": "complete"}}}}}
676
+ },
677
+ {
678
+ "if": {"properties": {"status": {"const": "partial"}},"required": ["status"]},
679
+ "then": {"properties": {"data": {"type": "object"},"coverage": {"properties": {"state": {"const": "partial"}}}}}
680
+ }
681
+ ],
682
+ "$defs": {
683
+ "DiagnosticError": {
684
+ "type": "object",
685
+ "properties": {
686
+ "code": {"type": "string","maxLength": 64,"pattern": "^[A-Z][A-Z0-9_]*$(?![\\s\\S])"},
687
+ "endpointId": {
688
+ "anyOf": [
689
+ {"enum": ["startup","flyway","liquibase","beans","conditions","mappings","health","health-liveness","health-readiness","env","configprops","env-property","info","openapi"]},
690
+ {"type": "null"}
691
+ ]
692
+ },
693
+ "httpStatus": {"anyOf": [{"type": "integer","minimum": 100,"maximum": 599},{"type": "null"}]},
694
+ "retryable": {"type": "boolean"},
695
+ "message": {"type": "string","maxLength": 256,"description": "Local static template only; never upstream text."},
696
+ "remediation": {
697
+ "type": "object",
698
+ "properties": {
699
+ "recipeId": {"type": "string","maxLength": 96},
700
+ "action": {"enum": ["refineQuery","configureCapability","reviewExposure","reviewAuthorization","configureStartup","reviewTarget","reviewSource","stop"]},
701
+ "configKeys": {"type": "array","items": {"type": "string","maxLength": 128},"maxItems": 8},
702
+ "steps": {"type": "array","items": {"type": "string","maxLength": 256},"maxItems": 4},
703
+ "requiresApproval": {"type": "boolean"},
704
+ "retryAfterMs": {"anyOf": [{"type": "integer","minimum": 0,"maximum": 5000},{"type": "null"}]}
705
+ },
706
+ "required": ["recipeId","action","configKeys","steps","requiresApproval","retryAfterMs"],
707
+ "additionalProperties": false
708
+ }
709
+ },
710
+ "required": ["code","endpointId","httpStatus","retryable","message","remediation"],
711
+ "additionalProperties": false
712
+ }
713
+ }
714
+ }
715
+ },
716
+ {
717
+ "name": "springboot_diagnose_health",
718
+ "description": "返回整体健康状态、异常组件树及已脱敏的结构化错误和修复代码;依赖故障或探针异常时调用,组件下钻在本地完成,不获取日志、堆转储或原始异常栈。",
719
+ "annotations": {"title": "应用与依赖健康诊断","readOnlyHint": true,"destructiveHint": false,"idempotentHint": true,"openWorldHint": false},
720
+ "inputSchema": {
721
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
722
+ "type": "object",
723
+ "properties": {
724
+ "targetId": {"type": "string","minLength": 1,"maxLength": 64,"pattern": "^[A-Za-z0-9_-]+$(?![\\s\\S])","default": "local"},
725
+ "maxResults": {"type": "integer","minimum": 1,"maximum": 50,"default": 50},
726
+ "cursor": {"type": "string","maxLength": 2048,"minLength": 1},
727
+ "componentPath": {"type": "array","items": {"type": "string","maxLength": 128},"maxItems": 16},
728
+ "group": {"enum": ["application","liveness","readiness"],"default": "application"},
729
+ "includeDetails": {"type": "boolean","default": false},
730
+ "includeHealthy": {"type": "boolean","default": false},
731
+ "maxDepth": {"type": "integer","minimum": 0,"maximum": 16,"default": 4}
732
+ },
733
+ "required": [],
734
+ "additionalProperties": false
735
+ },
736
+ "outputSchema": {
737
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
738
+ "type": "object",
739
+ "properties": {
740
+ "schemaVersion": {"const": "2"},
741
+ "status": {"enum": ["ok","partial","denied","unavailable","invalid","too_large"]},
742
+ "source": {
743
+ "type": "object",
744
+ "properties": {
745
+ "targetId": {"type": "string","maxLength": 64},
746
+ "snapshotId": {"anyOf": [{"type": "string","maxLength": 96},{"type": "null"}]},
747
+ "observedAt": {"type": "string","format": "date-time"},
748
+ "endpointIds": {
749
+ "type": "array",
750
+ "items": {"enum": ["startup","flyway","liquibase","beans","conditions","mappings","health","health-liveness","health-readiness","env","configprops","env-property","info","openapi"]},
751
+ "maxItems": 14,
752
+ "uniqueItems": true
753
+ },
754
+ "bootVersion": {"anyOf": [{"type": "string","maxLength": 64},{"type": "null"}]},
755
+ "adapterVersion": {"type": "string","maxLength": 32},
756
+ "policyVersion": {"type": "string","maxLength": 32}
757
+ },
758
+ "required": ["targetId","snapshotId","observedAt","endpointIds","bootVersion","adapterVersion","policyVersion"],
759
+ "additionalProperties": false
760
+ },
761
+ "data": {
762
+ "anyOf": [
763
+ {
764
+ "type": "object",
765
+ "properties": {
766
+ "overallStatus": {"anyOf": [{"type": "string","maxLength": 64},{"type": "null"}]},
767
+ "activeGroup": {"enum": ["application","liveness","readiness"]},
768
+ "items": {
769
+ "type": "array",
770
+ "items": {
771
+ "type": "object",
772
+ "properties": {
773
+ "id": {"type": "string","maxLength": 96},
774
+ "endpointId": {"enum": ["health","health-liveness","health-readiness"]},
775
+ "observationId": {"type": "string","maxLength": 96},
776
+ "componentPath": {"type": "array","items": {"type": "string","maxLength": 128},"maxItems": 16},
777
+ "parentId": {"anyOf": [{"type": "string","maxLength": 96},{"type": "null"}]},
778
+ "status": {"type": "string","maxLength": 64},
779
+ "details": {
780
+ "type": "array",
781
+ "items": {
782
+ "type": "object",
783
+ "properties": {"name": {"type": "string","maxLength": 128},"value": {"type": ["string","number","boolean","null"],"maxLength": 512}},
784
+ "required": ["name","value"],
785
+ "additionalProperties": false
786
+ },
787
+ "maxItems": 10
788
+ },
789
+ "errorType": {"anyOf": [{"type": "string","maxLength": 256},{"type": "null"}]},
790
+ "remediationCodes": {"type": "array","items": {"type": "string","maxLength": 64},"maxItems": 4},
791
+ "childrenComplete": {"type": "boolean"}
792
+ },
793
+ "required": ["id","endpointId","observationId","componentPath","parentId","status","details","errorType","remediationCodes","childrenComplete"],
794
+ "additionalProperties": false
795
+ },
796
+ "maxItems": 50
797
+ }
798
+ },
799
+ "required": ["overallStatus","activeGroup","items"],
800
+ "additionalProperties": false
801
+ },
802
+ {"type": "null"}
803
+ ]
804
+ },
805
+ "totalMatched": {"anyOf": [{"type": "integer","minimum": 0},{"type": "null"}]},
806
+ "truncated": {"type": "boolean"},
807
+ "truncationReasons": {"type": "array","items": {"type": "string","maxLength": 64},"maxItems": 8},
808
+ "coverage": {
809
+ "type": "object",
810
+ "properties": {
811
+ "state": {"enum": ["complete","partial","unavailable"]},
812
+ "scope": {"type": "string","maxLength": 256},
813
+ "gaps": {"type": "array","items": {"type": "string","maxLength": 64},"maxItems": 10}
814
+ },
815
+ "required": ["state","scope","gaps"],
816
+ "additionalProperties": false
817
+ },
818
+ "warnings": {
819
+ "type": "array",
820
+ "items": {
821
+ "type": "object",
822
+ "properties": {"code": {"type": "string","maxLength": 64},"recordId": {"anyOf": [{"type": "string","maxLength": 96},{"type": "null"}]}},
823
+ "required": ["code","recordId"],
824
+ "additionalProperties": false
825
+ },
826
+ "maxItems": 10
827
+ },
828
+ "redactions": {"type": "array","items": {"type": "string","maxLength": 128},"maxItems": 50},
829
+ "nextCursor": {"anyOf": [{"type": "string","maxLength": 2048},{"type": "null"}]},
830
+ "nextAction": {
831
+ "type": "object",
832
+ "properties": {
833
+ "kind": {"enum": ["done","refine","page","remediate"]},
834
+ "reasonCode": {"type": "string","maxLength": 64,"pattern": "^[A-Z][A-Z0-9_]*$(?![\\s\\S])"},
835
+ "filterSuggestions": {
836
+ "type": "array",
837
+ "items": {
838
+ "type": "object",
839
+ "properties": {
840
+ "parameter": {"type": "string","maxLength": 64},
841
+ "value": {"anyOf": [{"type": ["string","number","boolean","null"],"maxLength": 512},{"type": "array","items": {"type": "string","maxLength": 256},"maxItems": 10}]}
842
+ },
843
+ "required": ["parameter","value"],
844
+ "additionalProperties": false
845
+ },
846
+ "maxItems": 4
847
+ }
848
+ },
849
+ "required": ["kind","reasonCode","filterSuggestions"],
850
+ "additionalProperties": false
851
+ },
852
+ "errors": {"type": "array","items": {"$ref": "#/$defs/DiagnosticError"},"maxItems": 8}
853
+ },
854
+ "required": ["schemaVersion","status","source","data","totalMatched","truncated","truncationReasons","coverage","warnings","redactions","nextCursor","nextAction","errors"],
855
+ "additionalProperties": false,
856
+ "allOf": [
857
+ {
858
+ "if": {"properties": {"status": {"enum": ["denied","unavailable","invalid","too_large"]}},"required": ["status"]},
859
+ "then": {
860
+ "properties": {"data": {"type": "null"},"totalMatched": {"type": "null"},"nextCursor": {"type": "null"},"errors": {"minItems": 1},"coverage": {"properties": {"state": {"const": "unavailable"}}}}
861
+ }
862
+ },
863
+ {
864
+ "if": {"properties": {"status": {"const": "ok"}},"required": ["status"]},
865
+ "then": {"properties": {"data": {"type": "object"},"errors": {"maxItems": 0},"coverage": {"properties": {"state": {"const": "complete"}}}}}
866
+ },
867
+ {
868
+ "if": {"properties": {"status": {"const": "partial"}},"required": ["status"]},
869
+ "then": {"properties": {"data": {"type": "object"},"coverage": {"properties": {"state": {"const": "partial"}}}}}
870
+ }
871
+ ],
872
+ "$defs": {
873
+ "DiagnosticError": {
874
+ "type": "object",
875
+ "properties": {
876
+ "code": {"type": "string","maxLength": 64,"pattern": "^[A-Z][A-Z0-9_]*$(?![\\s\\S])"},
877
+ "endpointId": {
878
+ "anyOf": [
879
+ {"enum": ["startup","flyway","liquibase","beans","conditions","mappings","health","health-liveness","health-readiness","env","configprops","env-property","info","openapi"]},
880
+ {"type": "null"}
881
+ ]
882
+ },
883
+ "httpStatus": {"anyOf": [{"type": "integer","minimum": 100,"maximum": 599},{"type": "null"}]},
884
+ "retryable": {"type": "boolean"},
885
+ "message": {"type": "string","maxLength": 256,"description": "Local static template only; never upstream text."},
886
+ "remediation": {
887
+ "type": "object",
888
+ "properties": {
889
+ "recipeId": {"type": "string","maxLength": 96},
890
+ "action": {"enum": ["refineQuery","configureCapability","reviewExposure","reviewAuthorization","configureStartup","reviewTarget","reviewSource","stop"]},
891
+ "configKeys": {"type": "array","items": {"type": "string","maxLength": 128},"maxItems": 8},
892
+ "steps": {"type": "array","items": {"type": "string","maxLength": 256},"maxItems": 4},
893
+ "requiresApproval": {"type": "boolean"},
894
+ "retryAfterMs": {"anyOf": [{"type": "integer","minimum": 0,"maximum": 5000},{"type": "null"}]}
895
+ },
896
+ "required": ["recipeId","action","configKeys","steps","requiresApproval","retryAfterMs"],
897
+ "additionalProperties": false
898
+ }
899
+ },
900
+ "required": ["code","endpointId","httpStatus","retryable","message","remediation"],
901
+ "additionalProperties": false
902
+ }
903
+ }
904
+ }
905
+ },
906
+ {
907
+ "name": "springboot_inspect_beans",
908
+ "description": "返回匹配 Bean、别名及双向依赖图,并在 Bean 缺失时自动读取已授权条件报告、展开嵌套与传递阻塞链;排查注入或条件装配时调用,证据不足时返回 unknown,不猜测确切原因。",
909
+ "annotations": {"title": "Bean 装配与条件诊断","readOnlyHint": true,"destructiveHint": false,"idempotentHint": true,"openWorldHint": false},
910
+ "inputSchema": {
911
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
912
+ "type": "object",
913
+ "properties": {
914
+ "targetId": {"type": "string","minLength": 1,"maxLength": 64,"pattern": "^[A-Za-z0-9_-]+$(?![\\s\\S])","default": "local"},
915
+ "maxResults": {"type": "integer","minimum": 1,"maximum": 50,"default": 50},
916
+ "cursor": {"type": "string","maxLength": 2048,"minLength": 1},
917
+ "beanNamePattern": {
918
+ "type": "string",
919
+ "minLength": 1,
920
+ "maxLength": 128,
921
+ "pattern": "^[A-Za-z0-9_.$/{}:*?+@! -]+$(?![\\s\\S])",
922
+ "description": "Bounded case-sensitive glob: only * and ? are wildcards; all other allowed characters are literal. No regex."
923
+ },
924
+ "typePattern": {
925
+ "type": "string",
926
+ "minLength": 1,
927
+ "maxLength": 128,
928
+ "pattern": "^[A-Za-z0-9_.$/{}:*?+@! -]+$(?![\\s\\S])",
929
+ "description": "Bounded case-sensitive glob: only * and ? are wildcards; all other allowed characters are literal. No regex."
930
+ },
931
+ "packagePrefix": {"type": "string","minLength": 1,"maxLength": 256,"pattern": "^[^\\u0000-\\u001f\\u007f]+$(?![\\s\\S])"},
932
+ "contextId": {"type": "string","minLength": 1,"maxLength": 256,"pattern": "^[^\\u0000-\\u001f\\u007f]+$(?![\\s\\S])"},
933
+ "direction": {"enum": ["dependencies","dependents","both"],"default": "both"},
934
+ "maxDepth": {"type": "integer","minimum": 0,"maximum": 16,"default": 2},
935
+ "conditionDepth": {"type": "integer","minimum": 0,"maximum": 16,"default": 4}
936
+ },
937
+ "required": [],
938
+ "additionalProperties": false,
939
+ "allOf": [{"anyOf": [{"required": ["beanNamePattern"]},{"required": ["typePattern"]},{"required": ["packagePrefix"]}]}]
940
+ },
941
+ "outputSchema": {
942
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
943
+ "type": "object",
944
+ "properties": {
945
+ "schemaVersion": {"const": "2"},
946
+ "status": {"enum": ["ok","partial","denied","unavailable","invalid","too_large"]},
947
+ "source": {
948
+ "type": "object",
949
+ "properties": {
950
+ "targetId": {"type": "string","maxLength": 64},
951
+ "snapshotId": {"anyOf": [{"type": "string","maxLength": 96},{"type": "null"}]},
952
+ "observedAt": {"type": "string","format": "date-time"},
953
+ "endpointIds": {
954
+ "type": "array",
955
+ "items": {"enum": ["startup","flyway","liquibase","beans","conditions","mappings","health","health-liveness","health-readiness","env","configprops","env-property","info","openapi"]},
956
+ "maxItems": 14,
957
+ "uniqueItems": true
958
+ },
959
+ "bootVersion": {"anyOf": [{"type": "string","maxLength": 64},{"type": "null"}]},
960
+ "adapterVersion": {"type": "string","maxLength": 32},
961
+ "policyVersion": {"type": "string","maxLength": 32}
962
+ },
963
+ "required": ["targetId","snapshotId","observedAt","endpointIds","bootVersion","adapterVersion","policyVersion"],
964
+ "additionalProperties": false
965
+ },
966
+ "data": {
967
+ "anyOf": [
968
+ {
969
+ "type": "object",
970
+ "properties": {
971
+ "items": {
972
+ "type": "array",
973
+ "items": {
974
+ "type": "object",
975
+ "properties": {
976
+ "id": {"type": "string","maxLength": 96},
977
+ "endpointId": {"enum": ["beans"]},
978
+ "observationId": {"type": "string","maxLength": 96},
979
+ "contextId": {"anyOf": [{"type": "string","maxLength": 256},{"type": "null"}]},
980
+ "parentContextId": {"anyOf": [{"type": "string","maxLength": 256},{"type": "null"}]},
981
+ "name": {"type": "string","maxLength": 256},
982
+ "type": {"anyOf": [{"type": "string","maxLength": 256},{"type": "null"}]},
983
+ "scope": {"anyOf": [{"type": "string","maxLength": 64},{"type": "null"}]},
984
+ "resource": {"anyOf": [{"type": "string","maxLength": 256},{"type": "null"}]},
985
+ "aliases": {"type": "array","items": {"type": "string","maxLength": 256},"maxItems": 16},
986
+ "producer": {
987
+ "anyOf": [
988
+ {
989
+ "type": "object",
990
+ "properties": {
991
+ "kind": {"enum": ["configuration","factoryMethod","factoryBean"]},
992
+ "configurationClass": {"anyOf": [{"type": "string","maxLength": 256},{"type": "null"}]},
993
+ "methodName": {"anyOf": [{"type": "string","maxLength": 256},{"type": "null"}]},
994
+ "evidenceLevel": {"enum": ["observed","correlated"]}
995
+ },
996
+ "required": ["kind","configurationClass","methodName","evidenceLevel"],
997
+ "additionalProperties": false
998
+ },
999
+ {"type": "null"}
1000
+ ]
1001
+ },
1002
+ "dependencies": {
1003
+ "type": "array",
1004
+ "items": {
1005
+ "type": "object",
1006
+ "properties": {
1007
+ "fromId": {"type": "string","maxLength": 96},
1008
+ "toId": {"anyOf": [{"type": "string","maxLength": 96},{"type": "null"}]},
1009
+ "requestedName": {"anyOf": [{"type": "string","maxLength": 256},{"type": "null"}]},
1010
+ "targetContextId": {"anyOf": [{"type": "string","maxLength": 256},{"type": "null"}]},
1011
+ "targetName": {"anyOf": [{"type": "string","maxLength": 256},{"type": "null"}]},
1012
+ "resolution": {"enum": ["resolved","ambiguous","unresolved"]},
1013
+ "depth": {"type": "integer","minimum": 0,"maximum": 16}
1014
+ },
1015
+ "required": ["fromId","toId","requestedName","targetContextId","targetName","resolution","depth"],
1016
+ "additionalProperties": false
1017
+ },
1018
+ "maxItems": 16
1019
+ },
1020
+ "dependents": {
1021
+ "type": "array",
1022
+ "items": {
1023
+ "type": "object",
1024
+ "properties": {
1025
+ "fromId": {"type": "string","maxLength": 96},
1026
+ "toId": {"anyOf": [{"type": "string","maxLength": 96},{"type": "null"}]},
1027
+ "requestedName": {"anyOf": [{"type": "string","maxLength": 256},{"type": "null"}]},
1028
+ "targetContextId": {"anyOf": [{"type": "string","maxLength": 256},{"type": "null"}]},
1029
+ "targetName": {"anyOf": [{"type": "string","maxLength": 256},{"type": "null"}]},
1030
+ "resolution": {"enum": ["resolved","ambiguous","unresolved"]},
1031
+ "depth": {"type": "integer","minimum": 0,"maximum": 16}
1032
+ },
1033
+ "required": ["fromId","toId","requestedName","targetContextId","targetName","resolution","depth"],
1034
+ "additionalProperties": false
1035
+ },
1036
+ "maxItems": 16
1037
+ }
1038
+ },
1039
+ "required": ["id","endpointId","observationId","contextId","parentContextId","name","type","scope","resource","aliases","producer","dependencies","dependents"],
1040
+ "additionalProperties": false
1041
+ },
1042
+ "maxItems": 50
1043
+ },
1044
+ "missingBeanAnalysis": {
1045
+ "type": "object",
1046
+ "properties": {
1047
+ "state": {"enum": ["notNeeded","explained","partial","unknown"]},
1048
+ "conditions": {
1049
+ "type": "array",
1050
+ "items": {
1051
+ "type": "object",
1052
+ "properties": {
1053
+ "id": {"type": "string","maxLength": 96},
1054
+ "configurationClass": {"anyOf": [{"type": "string","maxLength": 256},{"type": "null"}]},
1055
+ "conditionType": {"anyOf": [{"type": "string","maxLength": 256},{"type": "null"}]},
1056
+ "operator": {"enum": ["leaf","any","all","none","unknown"]},
1057
+ "outcome": {"enum": ["matched","notMatched","unknown"]},
1058
+ "reasonCode": {"type": "string","maxLength": 64},
1059
+ "childIds": {"type": "array","items": {"type": "string","maxLength": 96},"maxItems": 16},
1060
+ "requiredBeanIds": {"type": "array","items": {"type": "string","maxLength": 96},"maxItems": 16},
1061
+ "childrenComplete": {"type": "boolean"}
1062
+ },
1063
+ "required": ["id","configurationClass","conditionType","operator","outcome","reasonCode","childIds","requiredBeanIds","childrenComplete"],
1064
+ "additionalProperties": false
1065
+ },
1066
+ "maxItems": 16
1067
+ },
1068
+ "blockingPaths": {"type": "array","items": {"type": "array","items": {"type": "string","maxLength": 96},"maxItems": 16},"maxItems": 8}
1069
+ },
1070
+ "required": ["state","conditions","blockingPaths"],
1071
+ "additionalProperties": false
1072
+ }
1073
+ },
1074
+ "required": ["items","missingBeanAnalysis"],
1075
+ "additionalProperties": false
1076
+ },
1077
+ {"type": "null"}
1078
+ ]
1079
+ },
1080
+ "totalMatched": {"anyOf": [{"type": "integer","minimum": 0},{"type": "null"}]},
1081
+ "truncated": {"type": "boolean"},
1082
+ "truncationReasons": {"type": "array","items": {"type": "string","maxLength": 64},"maxItems": 8},
1083
+ "coverage": {
1084
+ "type": "object",
1085
+ "properties": {
1086
+ "state": {"enum": ["complete","partial","unavailable"]},
1087
+ "scope": {"type": "string","maxLength": 256},
1088
+ "gaps": {"type": "array","items": {"type": "string","maxLength": 64},"maxItems": 10}
1089
+ },
1090
+ "required": ["state","scope","gaps"],
1091
+ "additionalProperties": false
1092
+ },
1093
+ "warnings": {
1094
+ "type": "array",
1095
+ "items": {
1096
+ "type": "object",
1097
+ "properties": {"code": {"type": "string","maxLength": 64},"recordId": {"anyOf": [{"type": "string","maxLength": 96},{"type": "null"}]}},
1098
+ "required": ["code","recordId"],
1099
+ "additionalProperties": false
1100
+ },
1101
+ "maxItems": 10
1102
+ },
1103
+ "redactions": {"type": "array","items": {"type": "string","maxLength": 128},"maxItems": 50},
1104
+ "nextCursor": {"anyOf": [{"type": "string","maxLength": 2048},{"type": "null"}]},
1105
+ "nextAction": {
1106
+ "type": "object",
1107
+ "properties": {
1108
+ "kind": {"enum": ["done","refine","page","remediate"]},
1109
+ "reasonCode": {"type": "string","maxLength": 64,"pattern": "^[A-Z][A-Z0-9_]*$(?![\\s\\S])"},
1110
+ "filterSuggestions": {
1111
+ "type": "array",
1112
+ "items": {
1113
+ "type": "object",
1114
+ "properties": {
1115
+ "parameter": {"type": "string","maxLength": 64},
1116
+ "value": {"anyOf": [{"type": ["string","number","boolean","null"],"maxLength": 512},{"type": "array","items": {"type": "string","maxLength": 256},"maxItems": 10}]}
1117
+ },
1118
+ "required": ["parameter","value"],
1119
+ "additionalProperties": false
1120
+ },
1121
+ "maxItems": 4
1122
+ }
1123
+ },
1124
+ "required": ["kind","reasonCode","filterSuggestions"],
1125
+ "additionalProperties": false
1126
+ },
1127
+ "errors": {"type": "array","items": {"$ref": "#/$defs/DiagnosticError"},"maxItems": 8}
1128
+ },
1129
+ "required": ["schemaVersion","status","source","data","totalMatched","truncated","truncationReasons","coverage","warnings","redactions","nextCursor","nextAction","errors"],
1130
+ "additionalProperties": false,
1131
+ "allOf": [
1132
+ {
1133
+ "if": {"properties": {"status": {"enum": ["denied","unavailable","invalid","too_large"]}},"required": ["status"]},
1134
+ "then": {
1135
+ "properties": {"data": {"type": "null"},"totalMatched": {"type": "null"},"nextCursor": {"type": "null"},"errors": {"minItems": 1},"coverage": {"properties": {"state": {"const": "unavailable"}}}}
1136
+ }
1137
+ },
1138
+ {
1139
+ "if": {"properties": {"status": {"const": "ok"}},"required": ["status"]},
1140
+ "then": {"properties": {"data": {"type": "object"},"errors": {"maxItems": 0},"coverage": {"properties": {"state": {"const": "complete"}}}}}
1141
+ },
1142
+ {
1143
+ "if": {"properties": {"status": {"const": "partial"}},"required": ["status"]},
1144
+ "then": {"properties": {"data": {"type": "object"},"coverage": {"properties": {"state": {"const": "partial"}}}}}
1145
+ }
1146
+ ],
1147
+ "$defs": {
1148
+ "DiagnosticError": {
1149
+ "type": "object",
1150
+ "properties": {
1151
+ "code": {"type": "string","maxLength": 64,"pattern": "^[A-Z][A-Z0-9_]*$(?![\\s\\S])"},
1152
+ "endpointId": {
1153
+ "anyOf": [
1154
+ {"enum": ["startup","flyway","liquibase","beans","conditions","mappings","health","health-liveness","health-readiness","env","configprops","env-property","info","openapi"]},
1155
+ {"type": "null"}
1156
+ ]
1157
+ },
1158
+ "httpStatus": {"anyOf": [{"type": "integer","minimum": 100,"maximum": 599},{"type": "null"}]},
1159
+ "retryable": {"type": "boolean"},
1160
+ "message": {"type": "string","maxLength": 256,"description": "Local static template only; never upstream text."},
1161
+ "remediation": {
1162
+ "type": "object",
1163
+ "properties": {
1164
+ "recipeId": {"type": "string","maxLength": 96},
1165
+ "action": {"enum": ["refineQuery","configureCapability","reviewExposure","reviewAuthorization","configureStartup","reviewTarget","reviewSource","stop"]},
1166
+ "configKeys": {"type": "array","items": {"type": "string","maxLength": 128},"maxItems": 8},
1167
+ "steps": {"type": "array","items": {"type": "string","maxLength": 256},"maxItems": 4},
1168
+ "requiresApproval": {"type": "boolean"},
1169
+ "retryAfterMs": {"anyOf": [{"type": "integer","minimum": 0,"maximum": 5000},{"type": "null"}]}
1170
+ },
1171
+ "required": ["recipeId","action","configKeys","steps","requiresApproval","retryAfterMs"],
1172
+ "additionalProperties": false
1173
+ }
1174
+ },
1175
+ "required": ["code","endpointId","httpStatus","retryable","message","remediation"],
1176
+ "additionalProperties": false
1177
+ }
1178
+ }
1179
+ }
1180
+ },
1181
+ {
1182
+ "name": "springboot_inspect_config",
1183
+ "description": "返回双层强制脱敏后的生效属性、绑定 Bean、来源位置及 Active Profiles;排查属性绑定或配置覆盖时按前缀或键模式调用,能力默认关闭且不能用于获取秘密或导出全量配置。",
1184
+ "annotations": {"title": "生效配置与来源诊断","readOnlyHint": true,"destructiveHint": false,"idempotentHint": true,"openWorldHint": false},
1185
+ "inputSchema": {
1186
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1187
+ "type": "object",
1188
+ "properties": {
1189
+ "targetId": {"type": "string","minLength": 1,"maxLength": 64,"pattern": "^[A-Za-z0-9_-]+$(?![\\s\\S])","default": "local"},
1190
+ "maxResults": {"type": "integer","minimum": 1,"maximum": 50,"default": 50},
1191
+ "cursor": {"type": "string","maxLength": 2048,"minLength": 1},
1192
+ "prefix": {"type": "string","minLength": 1,"maxLength": 128,"pattern": "^[A-Za-z_][A-Za-z0-9_.-]*$(?![\\s\\S])"},
1193
+ "propertyKeyPattern": {
1194
+ "type": "string",
1195
+ "minLength": 1,
1196
+ "maxLength": 128,
1197
+ "pattern": "^[A-Za-z0-9_.$/{}:*?+@! -]+$(?![\\s\\S])",
1198
+ "description": "Bounded case-sensitive glob: only * and ? are wildcards; all other allowed characters are literal. No regex."
1199
+ },
1200
+ "contextId": {"type": "string","minLength": 1,"maxLength": 256,"pattern": "^[^\\u0000-\\u001f\\u007f]+$(?![\\s\\S])"},
1201
+ "includeValues": {"type": "boolean","default": false}
1202
+ },
1203
+ "required": [],
1204
+ "additionalProperties": false,
1205
+ "allOf": [{"anyOf": [{"required": ["prefix"]},{"required": ["propertyKeyPattern"]}]}]
1206
+ },
1207
+ "outputSchema": {
1208
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1209
+ "type": "object",
1210
+ "properties": {
1211
+ "schemaVersion": {"const": "2"},
1212
+ "status": {"enum": ["ok","partial","denied","unavailable","invalid","too_large"]},
1213
+ "source": {
1214
+ "type": "object",
1215
+ "properties": {
1216
+ "targetId": {"type": "string","maxLength": 64},
1217
+ "snapshotId": {"anyOf": [{"type": "string","maxLength": 96},{"type": "null"}]},
1218
+ "observedAt": {"type": "string","format": "date-time"},
1219
+ "endpointIds": {
1220
+ "type": "array",
1221
+ "items": {"enum": ["startup","flyway","liquibase","beans","conditions","mappings","health","health-liveness","health-readiness","env","configprops","env-property","info","openapi"]},
1222
+ "maxItems": 14,
1223
+ "uniqueItems": true
1224
+ },
1225
+ "bootVersion": {"anyOf": [{"type": "string","maxLength": 64},{"type": "null"}]},
1226
+ "adapterVersion": {"type": "string","maxLength": 32},
1227
+ "policyVersion": {"type": "string","maxLength": 32}
1228
+ },
1229
+ "required": ["targetId","snapshotId","observedAt","endpointIds","bootVersion","adapterVersion","policyVersion"],
1230
+ "additionalProperties": false
1231
+ },
1232
+ "data": {
1233
+ "anyOf": [
1234
+ {
1235
+ "type": "object",
1236
+ "properties": {
1237
+ "activeProfiles": {"anyOf": [{"type": "array","items": {"type": "string","maxLength": 128},"maxItems": 20},{"type": "null"}]},
1238
+ "items": {
1239
+ "type": "array",
1240
+ "items": {
1241
+ "type": "object",
1242
+ "properties": {
1243
+ "id": {"type": "string","maxLength": 96},
1244
+ "endpointId": {"enum": ["env","configprops","env-property"]},
1245
+ "observationId": {"type": "string","maxLength": 96},
1246
+ "contextId": {"anyOf": [{"type": "string","maxLength": 256},{"type": "null"}]},
1247
+ "parentContextId": {"anyOf": [{"type": "string","maxLength": 256},{"type": "null"}]},
1248
+ "propertyKey": {"type": "string","maxLength": 256},
1249
+ "prefix": {"anyOf": [{"type": "string","maxLength": 256},{"type": "null"}]},
1250
+ "configurationBean": {"anyOf": [{"type": "string","maxLength": 256},{"type": "null"}]},
1251
+ "effectiveValue": {"type": ["string","number","boolean","null"],"maxLength": 512},
1252
+ "valueState": {"enum": ["visible","redacted","notReported"]},
1253
+ "bindingValue": {"type": ["string","number","boolean","null"],"maxLength": 512},
1254
+ "bindingState": {"enum": ["visible","redacted","notReported"]},
1255
+ "origin": {
1256
+ "type": "object",
1257
+ "properties": {
1258
+ "kind": {"enum": ["configurationFile","environmentVariable","systemProperty","commandLine","other","unknown"]},
1259
+ "file": {"anyOf": [{"type": "string","maxLength": 256},{"type": "null"}]},
1260
+ "line": {"anyOf": [{"type": "integer","minimum": 1},{"type": "null"}]},
1261
+ "column": {"anyOf": [{"type": "integer","minimum": 1},{"type": "null"}]},
1262
+ "environmentVariable": {"anyOf": [{"type": "string","maxLength": 128,"pattern": "^[A-Za-z_][A-Za-z0-9_]*$(?![\\s\\S])"},{"type": "null"}]}
1263
+ },
1264
+ "required": ["kind","file","line","column","environmentVariable"],
1265
+ "additionalProperties": false
1266
+ },
1267
+ "sourceKind": {"enum": ["configurationFile","environmentVariable","systemProperty","commandLine","other","unknown"]},
1268
+ "effective": {"enum": ["yes","no","unknown"]}
1269
+ },
1270
+ "required": [
1271
+ "id",
1272
+ "endpointId",
1273
+ "observationId",
1274
+ "contextId",
1275
+ "parentContextId",
1276
+ "propertyKey",
1277
+ "prefix",
1278
+ "configurationBean",
1279
+ "effectiveValue",
1280
+ "valueState",
1281
+ "bindingValue",
1282
+ "bindingState",
1283
+ "origin",
1284
+ "sourceKind",
1285
+ "effective"
1286
+ ],
1287
+ "additionalProperties": false,
1288
+ "allOf": [
1289
+ {"if": {"properties": {"valueState": {"const": "redacted"}}},"then": {"properties": {"effectiveValue": {"const": "[REDACTED_BY_MCP]"}}}},
1290
+ {"if": {"properties": {"valueState": {"const": "notReported"}}},"then": {"properties": {"effectiveValue": {"type": "null"}}}},
1291
+ {"if": {"properties": {"bindingState": {"const": "redacted"}}},"then": {"properties": {"bindingValue": {"const": "[REDACTED_BY_MCP]"}}}},
1292
+ {"if": {"properties": {"bindingState": {"const": "notReported"}}},"then": {"properties": {"bindingValue": {"type": "null"}}}}
1293
+ ]
1294
+ },
1295
+ "maxItems": 50
1296
+ }
1297
+ },
1298
+ "required": ["activeProfiles","items"],
1299
+ "additionalProperties": false
1300
+ },
1301
+ {"type": "null"}
1302
+ ]
1303
+ },
1304
+ "totalMatched": {"anyOf": [{"type": "integer","minimum": 0},{"type": "null"}]},
1305
+ "truncated": {"type": "boolean"},
1306
+ "truncationReasons": {"type": "array","items": {"type": "string","maxLength": 64},"maxItems": 8},
1307
+ "coverage": {
1308
+ "type": "object",
1309
+ "properties": {
1310
+ "state": {"enum": ["complete","partial","unavailable"]},
1311
+ "scope": {"type": "string","maxLength": 256},
1312
+ "gaps": {"type": "array","items": {"type": "string","maxLength": 64},"maxItems": 10}
1313
+ },
1314
+ "required": ["state","scope","gaps"],
1315
+ "additionalProperties": false
1316
+ },
1317
+ "warnings": {
1318
+ "type": "array",
1319
+ "items": {
1320
+ "type": "object",
1321
+ "properties": {"code": {"type": "string","maxLength": 64},"recordId": {"anyOf": [{"type": "string","maxLength": 96},{"type": "null"}]}},
1322
+ "required": ["code","recordId"],
1323
+ "additionalProperties": false
1324
+ },
1325
+ "maxItems": 10
1326
+ },
1327
+ "redactions": {"type": "array","items": {"type": "string","maxLength": 128},"maxItems": 50},
1328
+ "nextCursor": {"anyOf": [{"type": "string","maxLength": 2048},{"type": "null"}]},
1329
+ "nextAction": {
1330
+ "type": "object",
1331
+ "properties": {
1332
+ "kind": {"enum": ["done","refine","page","remediate"]},
1333
+ "reasonCode": {"type": "string","maxLength": 64,"pattern": "^[A-Z][A-Z0-9_]*$(?![\\s\\S])"},
1334
+ "filterSuggestions": {
1335
+ "type": "array",
1336
+ "items": {
1337
+ "type": "object",
1338
+ "properties": {
1339
+ "parameter": {"type": "string","maxLength": 64},
1340
+ "value": {"anyOf": [{"type": ["string","number","boolean","null"],"maxLength": 512},{"type": "array","items": {"type": "string","maxLength": 256},"maxItems": 10}]}
1341
+ },
1342
+ "required": ["parameter","value"],
1343
+ "additionalProperties": false
1344
+ },
1345
+ "maxItems": 4
1346
+ }
1347
+ },
1348
+ "required": ["kind","reasonCode","filterSuggestions"],
1349
+ "additionalProperties": false
1350
+ },
1351
+ "errors": {"type": "array","items": {"$ref": "#/$defs/DiagnosticError"},"maxItems": 8}
1352
+ },
1353
+ "required": ["schemaVersion","status","source","data","totalMatched","truncated","truncationReasons","coverage","warnings","redactions","nextCursor","nextAction","errors"],
1354
+ "additionalProperties": false,
1355
+ "allOf": [
1356
+ {
1357
+ "if": {"properties": {"status": {"enum": ["denied","unavailable","invalid","too_large"]}},"required": ["status"]},
1358
+ "then": {
1359
+ "properties": {"data": {"type": "null"},"totalMatched": {"type": "null"},"nextCursor": {"type": "null"},"errors": {"minItems": 1},"coverage": {"properties": {"state": {"const": "unavailable"}}}}
1360
+ }
1361
+ },
1362
+ {
1363
+ "if": {"properties": {"status": {"const": "ok"}},"required": ["status"]},
1364
+ "then": {"properties": {"data": {"type": "object"},"errors": {"maxItems": 0},"coverage": {"properties": {"state": {"const": "complete"}}}}}
1365
+ },
1366
+ {
1367
+ "if": {"properties": {"status": {"const": "partial"}},"required": ["status"]},
1368
+ "then": {"properties": {"data": {"type": "object"},"coverage": {"properties": {"state": {"const": "partial"}}}}}
1369
+ }
1370
+ ],
1371
+ "$defs": {
1372
+ "DiagnosticError": {
1373
+ "type": "object",
1374
+ "properties": {
1375
+ "code": {"type": "string","maxLength": 64,"pattern": "^[A-Z][A-Z0-9_]*$(?![\\s\\S])"},
1376
+ "endpointId": {
1377
+ "anyOf": [
1378
+ {"enum": ["startup","flyway","liquibase","beans","conditions","mappings","health","health-liveness","health-readiness","env","configprops","env-property","info","openapi"]},
1379
+ {"type": "null"}
1380
+ ]
1381
+ },
1382
+ "httpStatus": {"anyOf": [{"type": "integer","minimum": 100,"maximum": 599},{"type": "null"}]},
1383
+ "retryable": {"type": "boolean"},
1384
+ "message": {"type": "string","maxLength": 256,"description": "Local static template only; never upstream text."},
1385
+ "remediation": {
1386
+ "type": "object",
1387
+ "properties": {
1388
+ "recipeId": {"type": "string","maxLength": 96},
1389
+ "action": {"enum": ["refineQuery","configureCapability","reviewExposure","reviewAuthorization","configureStartup","reviewTarget","reviewSource","stop"]},
1390
+ "configKeys": {"type": "array","items": {"type": "string","maxLength": 128},"maxItems": 8},
1391
+ "steps": {"type": "array","items": {"type": "string","maxLength": 256},"maxItems": 4},
1392
+ "requiresApproval": {"type": "boolean"},
1393
+ "retryAfterMs": {"anyOf": [{"type": "integer","minimum": 0,"maximum": 5000},{"type": "null"}]}
1394
+ },
1395
+ "required": ["recipeId","action","configKeys","steps","requiresApproval","retryAfterMs"],
1396
+ "additionalProperties": false
1397
+ }
1398
+ },
1399
+ "required": ["code","endpointId","httpStatus","retryable","message","remediation"],
1400
+ "additionalProperties": false
1401
+ }
1402
+ }
1403
+ }
1404
+ },
1405
+ {
1406
+ "name": "springboot_search_openapi",
1407
+ "description": "返回匹配操作或 Schema,并默认内联直接与二阶同文档引用;确认接口契约时使用精确选择器调用,不执行业务接口、不返回全量文档,也不解析远程引用。",
1408
+ "annotations": {"title": "OpenAPI 局部契约检索","readOnlyHint": true,"destructiveHint": false,"idempotentHint": true,"openWorldHint": false},
1409
+ "inputSchema": {
1410
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1411
+ "type": "object",
1412
+ "properties": {
1413
+ "targetId": {"type": "string","minLength": 1,"maxLength": 64,"pattern": "^[A-Za-z0-9_-]+$(?![\\s\\S])","default": "local"},
1414
+ "maxResults": {"type": "integer","minimum": 1,"maximum": 50,"default": 50},
1415
+ "cursor": {"type": "string","maxLength": 2048,"minLength": 1},
1416
+ "pathPattern": {
1417
+ "type": "string",
1418
+ "minLength": 1,
1419
+ "maxLength": 128,
1420
+ "pattern": "^[A-Za-z0-9_.$/{}:*?+@! -]+$(?![\\s\\S])",
1421
+ "description": "Bounded case-sensitive glob: only * and ? are wildcards; all other allowed characters are literal. No regex."
1422
+ },
1423
+ "httpMethod": {"enum": ["GET","HEAD","POST","PUT","PATCH","DELETE","OPTIONS","TRACE","CONNECT"]},
1424
+ "operationId": {"type": "string","minLength": 1,"maxLength": 256,"pattern": "^[^\\u0000-\\u001f\\u007f]+$(?![\\s\\S])"},
1425
+ "schemaName": {"type": "string","minLength": 1,"maxLength": 256,"pattern": "^[^\\u0000-\\u001f\\u007f]+$(?![\\s\\S])"},
1426
+ "maxRefDepth": {"type": "integer","minimum": 0,"maximum": 8,"default": 2}
1427
+ },
1428
+ "required": [],
1429
+ "additionalProperties": false,
1430
+ "allOf": [
1431
+ {
1432
+ "oneOf": [
1433
+ {"required": ["schemaName"],"not": {"anyOf": [{"required": ["pathPattern"]},{"required": ["httpMethod"]},{"required": ["operationId"]}]}},
1434
+ {"anyOf": [{"required": ["pathPattern"]},{"required": ["operationId"]}],"not": {"required": ["schemaName"]}}
1435
+ ]
1436
+ }
1437
+ ]
1438
+ },
1439
+ "outputSchema": {
1440
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1441
+ "type": "object",
1442
+ "properties": {
1443
+ "schemaVersion": {"const": "2"},
1444
+ "status": {"enum": ["ok","partial","denied","unavailable","invalid","too_large"]},
1445
+ "source": {
1446
+ "type": "object",
1447
+ "properties": {
1448
+ "targetId": {"type": "string","maxLength": 64},
1449
+ "snapshotId": {"anyOf": [{"type": "string","maxLength": 96},{"type": "null"}]},
1450
+ "observedAt": {"type": "string","format": "date-time"},
1451
+ "endpointIds": {
1452
+ "type": "array",
1453
+ "items": {"enum": ["startup","flyway","liquibase","beans","conditions","mappings","health","health-liveness","health-readiness","env","configprops","env-property","info","openapi"]},
1454
+ "maxItems": 14,
1455
+ "uniqueItems": true
1456
+ },
1457
+ "bootVersion": {"anyOf": [{"type": "string","maxLength": 64},{"type": "null"}]},
1458
+ "adapterVersion": {"type": "string","maxLength": 32},
1459
+ "policyVersion": {"type": "string","maxLength": 32}
1460
+ },
1461
+ "required": ["targetId","snapshotId","observedAt","endpointIds","bootVersion","adapterVersion","policyVersion"],
1462
+ "additionalProperties": false
1463
+ },
1464
+ "data": {
1465
+ "anyOf": [
1466
+ {
1467
+ "type": "object",
1468
+ "properties": {
1469
+ "openapiVersion": {"anyOf": [{"type": "string","maxLength": 32},{"type": "null"}]},
1470
+ "candidateId": {"anyOf": [{"type": "string","maxLength": 64},{"type": "null"}]},
1471
+ "items": {
1472
+ "type": "array",
1473
+ "items": {
1474
+ "type": "object",
1475
+ "properties": {
1476
+ "id": {"type": "string","maxLength": 96},
1477
+ "endpointId": {"enum": ["openapi"]},
1478
+ "observationId": {"type": "string","maxLength": 96},
1479
+ "kind": {"enum": ["operation","schema"]},
1480
+ "path": {"anyOf": [{"type": "string","minLength": 1,"maxLength": 1024,"pattern": "^/[^\\u0000-\\u001f\\u007f?#]*$(?![\\s\\S])"},{"type": "null"}]},
1481
+ "httpMethod": {"anyOf": [{"enum": ["GET","HEAD","POST","PUT","PATCH","DELETE","OPTIONS","TRACE","CONNECT"]},{"type": "null"}]},
1482
+ "operationId": {"anyOf": [{"type": "string","maxLength": 256},{"type": "null"}]},
1483
+ "schemaName": {"anyOf": [{"type": "string","maxLength": 256},{"type": "null"}]},
1484
+ "parameters": {
1485
+ "type": "array",
1486
+ "items": {
1487
+ "type": "object",
1488
+ "properties": {"name": {"type": "string","maxLength": 128},"in": {"enum": ["path","query","header","cookie"]},"required": {"type": "boolean"},"schema": {"$ref": "#/$defs/Schema"}},
1489
+ "required": ["name","in","required","schema"],
1490
+ "additionalProperties": false
1491
+ },
1492
+ "maxItems": 16
1493
+ },
1494
+ "requestBody": {
1495
+ "type": "array",
1496
+ "items": {
1497
+ "type": "object",
1498
+ "properties": {"mediaType": {"type": "string","maxLength": 128},"schema": {"$ref": "#/$defs/Schema"}},
1499
+ "required": ["mediaType","schema"],
1500
+ "additionalProperties": false
1501
+ },
1502
+ "maxItems": 8
1503
+ },
1504
+ "responses": {
1505
+ "type": "array",
1506
+ "items": {
1507
+ "type": "object",
1508
+ "properties": {
1509
+ "status": {"type": "string","maxLength": 16},
1510
+ "mediaType": {"anyOf": [{"type": "string","maxLength": 128},{"type": "null"}]},
1511
+ "schema": {"anyOf": [{"$ref": "#/$defs/Schema"},{"type": "null"}]}
1512
+ },
1513
+ "required": ["status","mediaType","schema"],
1514
+ "additionalProperties": false
1515
+ },
1516
+ "maxItems": 16
1517
+ },
1518
+ "schema": {"anyOf": [{"$ref": "#/$defs/Schema"},{"type": "null"}]},
1519
+ "expansionComplete": {"type": "boolean"}
1520
+ },
1521
+ "required": ["id","endpointId","observationId","kind","path","httpMethod","operationId","schemaName","parameters","requestBody","responses","schema","expansionComplete"],
1522
+ "additionalProperties": false
1523
+ },
1524
+ "maxItems": 50
1525
+ }
1526
+ },
1527
+ "required": ["openapiVersion","candidateId","items"],
1528
+ "additionalProperties": false
1529
+ },
1530
+ {"type": "null"}
1531
+ ]
1532
+ },
1533
+ "totalMatched": {"anyOf": [{"type": "integer","minimum": 0},{"type": "null"}]},
1534
+ "truncated": {"type": "boolean"},
1535
+ "truncationReasons": {"type": "array","items": {"type": "string","maxLength": 64},"maxItems": 8},
1536
+ "coverage": {
1537
+ "type": "object",
1538
+ "properties": {
1539
+ "state": {"enum": ["complete","partial","unavailable"]},
1540
+ "scope": {"type": "string","maxLength": 256},
1541
+ "gaps": {"type": "array","items": {"type": "string","maxLength": 64},"maxItems": 10}
1542
+ },
1543
+ "required": ["state","scope","gaps"],
1544
+ "additionalProperties": false
1545
+ },
1546
+ "warnings": {
1547
+ "type": "array",
1548
+ "items": {
1549
+ "type": "object",
1550
+ "properties": {"code": {"type": "string","maxLength": 64},"recordId": {"anyOf": [{"type": "string","maxLength": 96},{"type": "null"}]}},
1551
+ "required": ["code","recordId"],
1552
+ "additionalProperties": false
1553
+ },
1554
+ "maxItems": 10
1555
+ },
1556
+ "redactions": {"type": "array","items": {"type": "string","maxLength": 128},"maxItems": 50},
1557
+ "nextCursor": {"anyOf": [{"type": "string","maxLength": 2048},{"type": "null"}]},
1558
+ "nextAction": {
1559
+ "type": "object",
1560
+ "properties": {
1561
+ "kind": {"enum": ["done","refine","page","remediate"]},
1562
+ "reasonCode": {"type": "string","maxLength": 64,"pattern": "^[A-Z][A-Z0-9_]*$(?![\\s\\S])"},
1563
+ "filterSuggestions": {
1564
+ "type": "array",
1565
+ "items": {
1566
+ "type": "object",
1567
+ "properties": {
1568
+ "parameter": {"type": "string","maxLength": 64},
1569
+ "value": {"anyOf": [{"type": ["string","number","boolean","null"],"maxLength": 512},{"type": "array","items": {"type": "string","maxLength": 256},"maxItems": 10}]}
1570
+ },
1571
+ "required": ["parameter","value"],
1572
+ "additionalProperties": false
1573
+ },
1574
+ "maxItems": 4
1575
+ }
1576
+ },
1577
+ "required": ["kind","reasonCode","filterSuggestions"],
1578
+ "additionalProperties": false
1579
+ },
1580
+ "errors": {"type": "array","items": {"$ref": "#/$defs/DiagnosticError"},"maxItems": 8}
1581
+ },
1582
+ "required": ["schemaVersion","status","source","data","totalMatched","truncated","truncationReasons","coverage","warnings","redactions","nextCursor","nextAction","errors"],
1583
+ "additionalProperties": false,
1584
+ "allOf": [
1585
+ {
1586
+ "if": {"properties": {"status": {"enum": ["denied","unavailable","invalid","too_large"]}},"required": ["status"]},
1587
+ "then": {
1588
+ "properties": {"data": {"type": "null"},"totalMatched": {"type": "null"},"nextCursor": {"type": "null"},"errors": {"minItems": 1},"coverage": {"properties": {"state": {"const": "unavailable"}}}}
1589
+ }
1590
+ },
1591
+ {
1592
+ "if": {"properties": {"status": {"const": "ok"}},"required": ["status"]},
1593
+ "then": {"properties": {"data": {"type": "object"},"errors": {"maxItems": 0},"coverage": {"properties": {"state": {"const": "complete"}}}}}
1594
+ },
1595
+ {
1596
+ "if": {"properties": {"status": {"const": "partial"}},"required": ["status"]},
1597
+ "then": {"properties": {"data": {"type": "object"},"coverage": {"properties": {"state": {"const": "partial"}}}}}
1598
+ }
1599
+ ],
1600
+ "$defs": {
1601
+ "DiagnosticError": {
1602
+ "type": "object",
1603
+ "properties": {
1604
+ "code": {"type": "string","maxLength": 64,"pattern": "^[A-Z][A-Z0-9_]*$(?![\\s\\S])"},
1605
+ "endpointId": {
1606
+ "anyOf": [
1607
+ {"enum": ["startup","flyway","liquibase","beans","conditions","mappings","health","health-liveness","health-readiness","env","configprops","env-property","info","openapi"]},
1608
+ {"type": "null"}
1609
+ ]
1610
+ },
1611
+ "httpStatus": {"anyOf": [{"type": "integer","minimum": 100,"maximum": 599},{"type": "null"}]},
1612
+ "retryable": {"type": "boolean"},
1613
+ "message": {"type": "string","maxLength": 256,"description": "Local static template only; never upstream text."},
1614
+ "remediation": {
1615
+ "type": "object",
1616
+ "properties": {
1617
+ "recipeId": {"type": "string","maxLength": 96},
1618
+ "action": {"enum": ["refineQuery","configureCapability","reviewExposure","reviewAuthorization","configureStartup","reviewTarget","reviewSource","stop"]},
1619
+ "configKeys": {"type": "array","items": {"type": "string","maxLength": 128},"maxItems": 8},
1620
+ "steps": {"type": "array","items": {"type": "string","maxLength": 256},"maxItems": 4},
1621
+ "requiresApproval": {"type": "boolean"},
1622
+ "retryAfterMs": {"anyOf": [{"type": "integer","minimum": 0,"maximum": 5000},{"type": "null"}]}
1623
+ },
1624
+ "required": ["recipeId","action","configKeys","steps","requiresApproval","retryAfterMs"],
1625
+ "additionalProperties": false
1626
+ }
1627
+ },
1628
+ "required": ["code","endpointId","httpStatus","retryable","message","remediation"],
1629
+ "additionalProperties": false
1630
+ },
1631
+ "Schema": {
1632
+ "type": "object",
1633
+ "properties": {
1634
+ "type": {
1635
+ "anyOf": [
1636
+ {"enum": ["null","boolean","object","array","number","string","integer"]},
1637
+ {"type": "array","items": {"enum": ["null","boolean","object","array","number","string","integer"]},"maxItems": 7}
1638
+ ]
1639
+ },
1640
+ "format": {"type": "string","maxLength": 64},
1641
+ "nullable": {"type": "boolean"},
1642
+ "readOnly": {"type": "boolean"},
1643
+ "writeOnly": {"type": "boolean"},
1644
+ "minimum": {"type": "number"},
1645
+ "maximum": {"type": "number"},
1646
+ "exclusiveMinimum": {"type": ["number","boolean"]},
1647
+ "exclusiveMaximum": {"type": ["number","boolean"]},
1648
+ "multipleOf": {"type": "number","exclusiveMinimum": 0},
1649
+ "minLength": {"type": "integer","minimum": 0},
1650
+ "maxLength": {"type": "integer","minimum": 0},
1651
+ "pattern": {"type": "string","maxLength": 512},
1652
+ "minItems": {"type": "integer","minimum": 0},
1653
+ "maxItems": {"type": "integer","minimum": 0},
1654
+ "uniqueItems": {"type": "boolean"},
1655
+ "required": {"type": "array","items": {"type": "string","maxLength": 128},"maxItems": 50},
1656
+ "properties": {"type": "object","maxProperties": 50,"propertyNames": {"type": "string","maxLength": 128},"additionalProperties": {"$ref": "#/$defs/Schema"}},
1657
+ "items": {"$ref": "#/$defs/Schema"},
1658
+ "additionalProperties": {"anyOf": [{"type": "boolean"},{"$ref": "#/$defs/Schema"}]},
1659
+ "allOf": {"type": "array","items": {"$ref": "#/$defs/Schema"},"maxItems": 16},
1660
+ "oneOf": {"type": "array","items": {"$ref": "#/$defs/Schema"},"maxItems": 16},
1661
+ "anyOf": {"type": "array","items": {"$ref": "#/$defs/Schema"},"maxItems": 16},
1662
+ "$ref": {"type": "string","maxLength": 512,"pattern": "^#(?:/.*)?$(?![\\s\\S])"},
1663
+ "referenceState": {"enum": ["resolved","cycle","depthLimit","invalid","externalBlocked","unsupported"]},
1664
+ "omissionCodes": {"type": "array","items": {"type": "string","maxLength": 64},"maxItems": 8},
1665
+ "enum": {"type": "array","items": {"type": ["string","number","boolean","null"],"maxLength": 512},"maxItems": 16}
1666
+ },
1667
+ "required": [],
1668
+ "additionalProperties": false
1669
+ }
1670
+ }
1671
+ }
1672
+ },
1673
+ {
1674
+ "name": "springboot_verify_mappings",
1675
+ "description": "返回统一的 MVC/WebFlux 路由、处理器和方法描述符;排查路径、方法或 Controller 未注册时调用,不向业务 URL 发请求,也不把注册匹配等同于请求一定成功。",
1676
+ "annotations": {"title": "HTTP 路由注册核验","readOnlyHint": true,"destructiveHint": false,"idempotentHint": true,"openWorldHint": false},
1677
+ "inputSchema": {
1678
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1679
+ "type": "object",
1680
+ "properties": {
1681
+ "targetId": {"type": "string","minLength": 1,"maxLength": 64,"pattern": "^[A-Za-z0-9_-]+$(?![\\s\\S])","default": "local"},
1682
+ "maxResults": {"type": "integer","minimum": 1,"maximum": 50,"default": 50},
1683
+ "cursor": {"type": "string","maxLength": 2048,"minLength": 1},
1684
+ "pathPattern": {
1685
+ "type": "string",
1686
+ "minLength": 1,
1687
+ "maxLength": 128,
1688
+ "pattern": "^[A-Za-z0-9_.$/{}:*?+@! -]+$(?![\\s\\S])",
1689
+ "description": "Bounded case-sensitive glob: only * and ? are wildcards; all other allowed characters are literal. No regex."
1690
+ },
1691
+ "httpMethod": {"enum": ["GET","HEAD","POST","PUT","PATCH","DELETE","OPTIONS","TRACE","CONNECT"]},
1692
+ "controllerClassPattern": {
1693
+ "type": "string",
1694
+ "minLength": 1,
1695
+ "maxLength": 128,
1696
+ "pattern": "^[A-Za-z0-9_.$/{}:*?+@! -]+$(?![\\s\\S])",
1697
+ "description": "Bounded case-sensitive glob: only * and ? are wildcards; all other allowed characters are literal. No regex."
1698
+ },
1699
+ "contextId": {"type": "string","minLength": 1,"maxLength": 256,"pattern": "^[^\\u0000-\\u001f\\u007f]+$(?![\\s\\S])"}
1700
+ },
1701
+ "required": [],
1702
+ "additionalProperties": false,
1703
+ "allOf": [{"anyOf": [{"required": ["pathPattern"]},{"required": ["httpMethod"]},{"required": ["controllerClassPattern"]}]}]
1704
+ },
1705
+ "outputSchema": {
1706
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1707
+ "type": "object",
1708
+ "properties": {
1709
+ "schemaVersion": {"const": "2"},
1710
+ "status": {"enum": ["ok","partial","denied","unavailable","invalid","too_large"]},
1711
+ "source": {
1712
+ "type": "object",
1713
+ "properties": {
1714
+ "targetId": {"type": "string","maxLength": 64},
1715
+ "snapshotId": {"anyOf": [{"type": "string","maxLength": 96},{"type": "null"}]},
1716
+ "observedAt": {"type": "string","format": "date-time"},
1717
+ "endpointIds": {
1718
+ "type": "array",
1719
+ "items": {"enum": ["startup","flyway","liquibase","beans","conditions","mappings","health","health-liveness","health-readiness","env","configprops","env-property","info","openapi"]},
1720
+ "maxItems": 14,
1721
+ "uniqueItems": true
1722
+ },
1723
+ "bootVersion": {"anyOf": [{"type": "string","maxLength": 64},{"type": "null"}]},
1724
+ "adapterVersion": {"type": "string","maxLength": 32},
1725
+ "policyVersion": {"type": "string","maxLength": 32}
1726
+ },
1727
+ "required": ["targetId","snapshotId","observedAt","endpointIds","bootVersion","adapterVersion","policyVersion"],
1728
+ "additionalProperties": false
1729
+ },
1730
+ "data": {
1731
+ "anyOf": [
1732
+ {
1733
+ "type": "object",
1734
+ "properties": {
1735
+ "items": {
1736
+ "type": "array",
1737
+ "items": {
1738
+ "type": "object",
1739
+ "properties": {
1740
+ "id": {"type": "string","maxLength": 96},
1741
+ "endpointId": {"enum": ["mappings"]},
1742
+ "observationId": {"type": "string","maxLength": 96},
1743
+ "contextId": {"anyOf": [{"type": "string","maxLength": 256},{"type": "null"}]},
1744
+ "parentContextId": {"anyOf": [{"type": "string","maxLength": 256},{"type": "null"}]},
1745
+ "stack": {"enum": ["mvc","webflux"]},
1746
+ "dispatcherName": {"anyOf": [{"type": "string","maxLength": 256},{"type": "null"}]},
1747
+ "paths": {"type": "array","items": {"type": "string","maxLength": 1024},"maxItems": 16},
1748
+ "httpMethods": {"type": "array","items": {"enum": ["GET","HEAD","POST","PUT","PATCH","DELETE","OPTIONS","TRACE","CONNECT"]},"maxItems": 9},
1749
+ "methodsUnrestricted": {"type": "boolean"},
1750
+ "controllerClass": {"anyOf": [{"type": "string","maxLength": 256},{"type": "null"}]},
1751
+ "handlerMethod": {"anyOf": [{"type": "string","maxLength": 256},{"type": "null"}]},
1752
+ "descriptor": {"anyOf": [{"type": "string","maxLength": 1024},{"type": "null"}]},
1753
+ "handlerKind": {"enum": ["method","function","resource","unknown"]},
1754
+ "conditions": {
1755
+ "type": "array",
1756
+ "items": {
1757
+ "type": "object",
1758
+ "properties": {
1759
+ "kind": {"enum": ["header","param","consumes","produces"]},
1760
+ "name": {"anyOf": [{"type": "string","maxLength": 128},{"type": "null"}]},
1761
+ "value": {"anyOf": [{"type": "string","maxLength": 256},{"type": "null"}]},
1762
+ "negated": {"type": "boolean"}
1763
+ },
1764
+ "required": ["kind","name","value","negated"],
1765
+ "additionalProperties": false
1766
+ },
1767
+ "maxItems": 16
1768
+ },
1769
+ "matchingComplete": {"type": "boolean"}
1770
+ },
1771
+ "required": [
1772
+ "id",
1773
+ "endpointId",
1774
+ "observationId",
1775
+ "contextId",
1776
+ "parentContextId",
1777
+ "stack",
1778
+ "dispatcherName",
1779
+ "paths",
1780
+ "httpMethods",
1781
+ "methodsUnrestricted",
1782
+ "controllerClass",
1783
+ "handlerMethod",
1784
+ "descriptor",
1785
+ "handlerKind",
1786
+ "conditions",
1787
+ "matchingComplete"
1788
+ ],
1789
+ "additionalProperties": false
1790
+ },
1791
+ "maxItems": 50
1792
+ }
1793
+ },
1794
+ "required": ["items"],
1795
+ "additionalProperties": false
1796
+ },
1797
+ {"type": "null"}
1798
+ ]
1799
+ },
1800
+ "totalMatched": {"anyOf": [{"type": "integer","minimum": 0},{"type": "null"}]},
1801
+ "truncated": {"type": "boolean"},
1802
+ "truncationReasons": {"type": "array","items": {"type": "string","maxLength": 64},"maxItems": 8},
1803
+ "coverage": {
1804
+ "type": "object",
1805
+ "properties": {
1806
+ "state": {"enum": ["complete","partial","unavailable"]},
1807
+ "scope": {"type": "string","maxLength": 256},
1808
+ "gaps": {"type": "array","items": {"type": "string","maxLength": 64},"maxItems": 10}
1809
+ },
1810
+ "required": ["state","scope","gaps"],
1811
+ "additionalProperties": false
1812
+ },
1813
+ "warnings": {
1814
+ "type": "array",
1815
+ "items": {
1816
+ "type": "object",
1817
+ "properties": {"code": {"type": "string","maxLength": 64},"recordId": {"anyOf": [{"type": "string","maxLength": 96},{"type": "null"}]}},
1818
+ "required": ["code","recordId"],
1819
+ "additionalProperties": false
1820
+ },
1821
+ "maxItems": 10
1822
+ },
1823
+ "redactions": {"type": "array","items": {"type": "string","maxLength": 128},"maxItems": 50},
1824
+ "nextCursor": {"anyOf": [{"type": "string","maxLength": 2048},{"type": "null"}]},
1825
+ "nextAction": {
1826
+ "type": "object",
1827
+ "properties": {
1828
+ "kind": {"enum": ["done","refine","page","remediate"]},
1829
+ "reasonCode": {"type": "string","maxLength": 64,"pattern": "^[A-Z][A-Z0-9_]*$(?![\\s\\S])"},
1830
+ "filterSuggestions": {
1831
+ "type": "array",
1832
+ "items": {
1833
+ "type": "object",
1834
+ "properties": {
1835
+ "parameter": {"type": "string","maxLength": 64},
1836
+ "value": {"anyOf": [{"type": ["string","number","boolean","null"],"maxLength": 512},{"type": "array","items": {"type": "string","maxLength": 256},"maxItems": 10}]}
1837
+ },
1838
+ "required": ["parameter","value"],
1839
+ "additionalProperties": false
1840
+ },
1841
+ "maxItems": 4
1842
+ }
1843
+ },
1844
+ "required": ["kind","reasonCode","filterSuggestions"],
1845
+ "additionalProperties": false
1846
+ },
1847
+ "errors": {"type": "array","items": {"$ref": "#/$defs/DiagnosticError"},"maxItems": 8}
1848
+ },
1849
+ "required": ["schemaVersion","status","source","data","totalMatched","truncated","truncationReasons","coverage","warnings","redactions","nextCursor","nextAction","errors"],
1850
+ "additionalProperties": false,
1851
+ "allOf": [
1852
+ {
1853
+ "if": {"properties": {"status": {"enum": ["denied","unavailable","invalid","too_large"]}},"required": ["status"]},
1854
+ "then": {
1855
+ "properties": {"data": {"type": "null"},"totalMatched": {"type": "null"},"nextCursor": {"type": "null"},"errors": {"minItems": 1},"coverage": {"properties": {"state": {"const": "unavailable"}}}}
1856
+ }
1857
+ },
1858
+ {
1859
+ "if": {"properties": {"status": {"const": "ok"}},"required": ["status"]},
1860
+ "then": {"properties": {"data": {"type": "object"},"errors": {"maxItems": 0},"coverage": {"properties": {"state": {"const": "complete"}}}}}
1861
+ },
1862
+ {
1863
+ "if": {"properties": {"status": {"const": "partial"}},"required": ["status"]},
1864
+ "then": {"properties": {"data": {"type": "object"},"coverage": {"properties": {"state": {"const": "partial"}}}}}
1865
+ }
1866
+ ],
1867
+ "$defs": {
1868
+ "DiagnosticError": {
1869
+ "type": "object",
1870
+ "properties": {
1871
+ "code": {"type": "string","maxLength": 64,"pattern": "^[A-Z][A-Z0-9_]*$(?![\\s\\S])"},
1872
+ "endpointId": {
1873
+ "anyOf": [
1874
+ {"enum": ["startup","flyway","liquibase","beans","conditions","mappings","health","health-liveness","health-readiness","env","configprops","env-property","info","openapi"]},
1875
+ {"type": "null"}
1876
+ ]
1877
+ },
1878
+ "httpStatus": {"anyOf": [{"type": "integer","minimum": 100,"maximum": 599},{"type": "null"}]},
1879
+ "retryable": {"type": "boolean"},
1880
+ "message": {"type": "string","maxLength": 256,"description": "Local static template only; never upstream text."},
1881
+ "remediation": {
1882
+ "type": "object",
1883
+ "properties": {
1884
+ "recipeId": {"type": "string","maxLength": 96},
1885
+ "action": {"enum": ["refineQuery","configureCapability","reviewExposure","reviewAuthorization","configureStartup","reviewTarget","reviewSource","stop"]},
1886
+ "configKeys": {"type": "array","items": {"type": "string","maxLength": 128},"maxItems": 8},
1887
+ "steps": {"type": "array","items": {"type": "string","maxLength": 256},"maxItems": 4},
1888
+ "requiresApproval": {"type": "boolean"},
1889
+ "retryAfterMs": {"anyOf": [{"type": "integer","minimum": 0,"maximum": 5000},{"type": "null"}]}
1890
+ },
1891
+ "required": ["recipeId","action","configKeys","steps","requiresApproval","retryAfterMs"],
1892
+ "additionalProperties": false
1893
+ }
1894
+ },
1895
+ "required": ["code","endpointId","httpStatus","retryable","message","remediation"],
1896
+ "additionalProperties": false
1897
+ }
1898
+ }
1899
+ }
1900
+ }
1901
+ ]
1902
+ }