@wowok/agent-mcp 2.7.8 → 3.0.0

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 (393) hide show
  1. package/README.md +2 -2
  2. package/dist/config/runtime.d.ts +1 -1
  3. package/dist/config/runtime.js +1 -1
  4. package/dist/examples/rental-ziroom-machine-create.json +1 -2
  5. package/dist/examples/rental-ziroom-permission-create.json +1 -2
  6. package/dist/examples/rental-ziroom-service-create.json +1 -2
  7. package/dist/experience/experience-reuse.js +1 -1
  8. package/dist/experience/index.d.ts +2 -1
  9. package/dist/experience/index.js +1 -1
  10. package/dist/experience/persistence-config.d.ts +6 -0
  11. package/dist/experience/persistence-config.js +1 -0
  12. package/dist/experience/persistence.d.ts +21 -0
  13. package/dist/experience/persistence.js +1 -0
  14. package/dist/experience/realtime-feedback.js +1 -1
  15. package/dist/experience/user-profile.js +1 -1
  16. package/dist/extensions/business-modules.d.ts +1 -1
  17. package/dist/extensions/capability-manifest.d.ts +2 -83
  18. package/dist/extensions/capability-manifest.js +1 -1
  19. package/dist/extensions/constraint-registry.d.ts +6 -4
  20. package/dist/extensions/constraint-registry.js +1 -1
  21. package/dist/extensions/index.d.ts +4 -5
  22. package/dist/extensions/index.js +1 -1
  23. package/dist/extensions/industry-pack.js +1 -1
  24. package/dist/extensions/metric-registry.d.ts +6 -4
  25. package/dist/extensions/metric-registry.js +1 -1
  26. package/dist/extensions/mode-evaluator.d.ts +2 -3
  27. package/dist/extensions/mode-evaluator.js +1 -1
  28. package/dist/extensions/registry.d.ts +3 -25
  29. package/dist/extensions/registry.js +1 -1
  30. package/dist/extensions/types.d.ts +1 -69
  31. package/dist/goal/GoalClassifier.d.ts +17 -0
  32. package/dist/goal/GoalClassifier.js +1 -0
  33. package/dist/goal/GoalEngine.d.ts +155 -0
  34. package/dist/goal/GoalEngine.js +1 -0
  35. package/dist/goal/GoalStore.d.ts +27 -0
  36. package/dist/goal/GoalStore.js +1 -0
  37. package/dist/goal/plan-approval.d.ts +5 -0
  38. package/dist/goal/plan-approval.js +1 -0
  39. package/dist/goal/types.d.ts +80 -0
  40. package/dist/goal/types.js +1 -0
  41. package/dist/harness/index.d.ts +2 -7
  42. package/dist/harness/index.js +1 -1
  43. package/dist/harness/plan.d.ts +1 -1
  44. package/dist/harness/types.d.ts +0 -35
  45. package/dist/index.js +1 -1
  46. package/dist/knowledge/account-marks.d.ts +36 -0
  47. package/dist/knowledge/account-marks.js +1 -0
  48. package/dist/knowledge/audit-rules.d.ts +3 -1
  49. package/dist/knowledge/audit-rules.js +1 -1
  50. package/dist/knowledge/examples-scanner-cli.js +1 -1
  51. package/dist/knowledge/examples-scanner.js +1 -1
  52. package/dist/knowledge/fund-layer.d.ts +13 -9
  53. package/dist/knowledge/fund-layer.js +1 -1
  54. package/dist/knowledge/goal-completion.d.ts +19 -0
  55. package/dist/knowledge/goal-completion.js +1 -0
  56. package/dist/knowledge/guard-bindings.d.ts +21 -0
  57. package/dist/knowledge/guard-bindings.js +1 -0
  58. package/dist/knowledge/guard-translation.js +1 -1
  59. package/dist/knowledge/index.d.ts +6 -3
  60. package/dist/knowledge/index.js +1 -1
  61. package/dist/knowledge/industry-registry.js +1 -1
  62. package/dist/knowledge/mcp-schema-audit-cli.js +1 -1
  63. package/dist/knowledge/mcp-schema-audit.js +1 -1
  64. package/dist/knowledge/operation-dictionary.js +1 -1
  65. package/dist/knowledge/passport-confirm.js +1 -1
  66. package/dist/knowledge/passport-puzzle.js +1 -1
  67. package/dist/knowledge/passport-translation.js +1 -1
  68. package/dist/knowledge/proof-risk.js +1 -1
  69. package/dist/knowledge/reward-risk.d.ts +1 -1
  70. package/dist/knowledge/reward-risk.js +1 -1
  71. package/dist/knowledge/safety-rules.d.ts +2 -1
  72. package/dist/knowledge/safety-rules.js +1 -1
  73. package/dist/knowledge/scenario-topology.d.ts +43 -0
  74. package/dist/knowledge/scenario-topology.js +1 -0
  75. package/dist/knowledge/service-translation.js +1 -1
  76. package/dist/knowledge/supply-chain.js +1 -1
  77. package/dist/knowledge/template-registry.js +1 -1
  78. package/dist/knowledge/tools-reference.js +1 -1
  79. package/dist/knowledge/workflow-guidance.d.ts +36 -0
  80. package/dist/knowledge/workflow-guidance.js +1 -1
  81. package/dist/knowledge/workspace-lists.d.ts +57 -0
  82. package/dist/knowledge/workspace-lists.js +1 -0
  83. package/dist/loop-engineering/context-collect.d.ts +1 -1
  84. package/dist/monitor/EventRouter.d.ts +10 -0
  85. package/dist/monitor/EventRouter.js +1 -0
  86. package/dist/monitor/EventStore.d.ts +32 -12
  87. package/dist/monitor/EventStore.js +1 -1
  88. package/dist/monitor/MonitorLoop.d.ts +81 -0
  89. package/dist/monitor/MonitorLoop.js +1 -0
  90. package/dist/monitor/ProblemBridge.d.ts +32 -0
  91. package/dist/monitor/ProblemBridge.js +1 -0
  92. package/dist/monitor/ScopeResolver.d.ts +59 -0
  93. package/dist/monitor/ScopeResolver.js +1 -0
  94. package/dist/monitor/SubscriptionStore.d.ts +13 -0
  95. package/dist/monitor/SubscriptionStore.js +1 -0
  96. package/dist/monitor/SuggestionBridge.d.ts +38 -0
  97. package/dist/monitor/SuggestionBridge.js +1 -0
  98. package/dist/monitor/normalize.d.ts +8 -0
  99. package/dist/monitor/normalize.js +1 -0
  100. package/dist/monitor/types.d.ts +89 -0
  101. package/dist/monitor/types.js +1 -0
  102. package/dist/participation/arbitrator-interest.d.ts +20 -0
  103. package/dist/participation/arbitrator-interest.js +1 -0
  104. package/dist/participation/demander-interest.d.ts +23 -0
  105. package/dist/participation/demander-interest.js +1 -0
  106. package/dist/persona/address-format.d.ts +1 -1
  107. package/dist/persona/address-format.js +1 -1
  108. package/dist/persona/distill-goal.d.ts +20 -0
  109. package/dist/persona/distill-goal.js +1 -0
  110. package/dist/persona/index.d.ts +2 -0
  111. package/dist/persona/index.js +1 -1
  112. package/dist/persona/model.js +1 -1
  113. package/dist/playbooks/service-build/business-puzzle.js +1 -0
  114. package/dist/{project → playbooks/service-build}/context-assembly.d.ts +9 -4
  115. package/dist/playbooks/service-build/context-assembly.js +1 -0
  116. package/dist/{project → playbooks/service-build}/game-theory.d.ts +1 -1
  117. package/dist/playbooks/service-build/index.d.ts +14 -0
  118. package/dist/playbooks/service-build/index.js +1 -0
  119. package/dist/{project → playbooks/service-build}/intent-analyzer.d.ts +1 -1
  120. package/dist/playbooks/service-build/intent-analyzer.js +1 -0
  121. package/dist/playbooks/service-build/machine-nodes.js +1 -0
  122. package/dist/{project → playbooks/service-build}/machine-panorama.d.ts +5 -3
  123. package/dist/playbooks/service-build/machine-panorama.js +1 -0
  124. package/dist/{project → playbooks/service-build}/merchant-guide.d.ts +21 -1
  125. package/dist/playbooks/service-build/merchant-guide.js +1 -0
  126. package/dist/{project → playbooks/service-build}/mode-actions.d.ts +32 -8
  127. package/dist/playbooks/service-build/mode-actions.js +1 -0
  128. package/dist/playbooks/service-build/namespace.d.ts +2 -0
  129. package/dist/playbooks/service-build/namespace.js +1 -0
  130. package/dist/{project → playbooks/service-build}/object-panorama.d.ts +2 -3
  131. package/dist/playbooks/service-build/object-panorama.js +1 -0
  132. package/dist/{project → playbooks/service-build}/participation-radar.d.ts +4 -5
  133. package/dist/playbooks/service-build/participation-radar.js +1 -0
  134. package/dist/{project → playbooks/service-build}/pipeline-actions.d.ts +9 -9
  135. package/dist/playbooks/service-build/pipeline-actions.js +1 -0
  136. package/dist/playbooks/service-build/process.d.ts +6 -0
  137. package/dist/playbooks/service-build/process.js +1 -0
  138. package/dist/playbooks/service-build/relationship-profile.d.ts +2 -0
  139. package/dist/playbooks/service-build/relationship-profile.js +1 -0
  140. package/dist/playbooks/service-build/risk-aggregator.js +1 -0
  141. package/dist/{project → playbooks/service-build}/semantic-graph.d.ts +7 -3
  142. package/dist/playbooks/service-build/semantic-graph.js +1 -0
  143. package/dist/{project → playbooks/service-build}/service-panorama.d.ts +3 -19
  144. package/dist/playbooks/service-build/service-panorama.js +1 -0
  145. package/dist/relationship/derivation.d.ts +88 -0
  146. package/dist/relationship/derivation.js +1 -0
  147. package/dist/relationship/incentive.d.ts +38 -0
  148. package/dist/relationship/incentive.js +1 -0
  149. package/dist/relationship/index.d.ts +4 -0
  150. package/dist/relationship/index.js +1 -0
  151. package/dist/relationship/registry.d.ts +13 -0
  152. package/dist/relationship/registry.js +1 -0
  153. package/dist/relationship/types.d.ts +45 -0
  154. package/dist/relationship/types.js +1 -0
  155. package/dist/review/arb.d.ts +6 -0
  156. package/dist/review/arb.js +1 -0
  157. package/dist/review/demand.d.ts +3 -0
  158. package/dist/review/demand.js +1 -0
  159. package/dist/review/index.d.ts +3 -0
  160. package/dist/review/index.js +1 -0
  161. package/dist/review/machine.d.ts +3 -0
  162. package/dist/review/machine.js +1 -0
  163. package/dist/review/order.d.ts +9 -0
  164. package/dist/review/order.js +1 -0
  165. package/dist/review/progress.d.ts +3 -0
  166. package/dist/review/progress.js +1 -0
  167. package/dist/review/repository.d.ts +3 -0
  168. package/dist/review/repository.js +1 -0
  169. package/dist/review/service.d.ts +5 -0
  170. package/dist/review/service.js +1 -0
  171. package/dist/review/types.d.ts +156 -0
  172. package/dist/review/types.js +1 -0
  173. package/dist/rules.d.ts +2 -2
  174. package/dist/rules.js +1 -1
  175. package/dist/safety/confirm-gate.js +1 -1
  176. package/dist/safety/index.d.ts +1 -1
  177. package/dist/safety/index.js +1 -1
  178. package/dist/safety/preview.d.ts +1 -0
  179. package/dist/safety/preview.js +1 -1
  180. package/dist/schema/call/allocation.d.ts +1 -1
  181. package/dist/schema/call/arbitration.d.ts +1 -1
  182. package/dist/schema/call/base.d.ts +1 -1
  183. package/dist/schema/call/base.js +1 -1
  184. package/dist/schema/call/bridge.d.ts +29 -7
  185. package/dist/schema/call/bridge.js +1 -1
  186. package/dist/schema/call/contact.d.ts +1 -1
  187. package/dist/schema/call/contact.js +1 -1
  188. package/dist/schema/call/demand.d.ts +1 -1
  189. package/dist/schema/call/demand.js +1 -1
  190. package/dist/schema/call/guard.d.ts +3 -3
  191. package/dist/schema/call/handler.d.ts +0 -3
  192. package/dist/schema/call/handler.js +1 -1
  193. package/dist/schema/call/machine.d.ts +2 -2
  194. package/dist/schema/call/order.d.ts +1 -1
  195. package/dist/schema/call/payment.d.ts +1 -1
  196. package/dist/schema/call/permission.d.ts +1 -1
  197. package/dist/schema/call/personal.d.ts +1 -1
  198. package/dist/schema/call/progress.d.ts +1 -1
  199. package/dist/schema/call/proof.d.ts +2 -2
  200. package/dist/schema/call/repository.d.ts +1 -1
  201. package/dist/schema/call/repository.js +1 -1
  202. package/dist/schema/call/reward.d.ts +1 -1
  203. package/dist/schema/call/semantic.js +1 -1
  204. package/dist/schema/call/service.d.ts +1 -1
  205. package/dist/schema/call/service.js +1 -1
  206. package/dist/schema/call/treasury.d.ts +1 -1
  207. package/dist/schema/common/index.js +1 -1
  208. package/dist/schema/goal/index.d.ts +343 -0
  209. package/dist/schema/goal/index.js +1 -0
  210. package/dist/schema/goal/planning.d.ts +465 -0
  211. package/dist/schema/goal/planning.js +1 -0
  212. package/dist/schema/index.d.ts +1 -2
  213. package/dist/schema/index.js +1 -1
  214. package/dist/schema/industry-pack/index.d.ts +323 -1
  215. package/dist/schema/industry-pack/index.js +1 -1
  216. package/dist/schema/industry-pack/modes.d.ts +326 -0
  217. package/dist/schema/industry-pack/modes.js +1 -0
  218. package/dist/schema/intent-radar/index.d.ts +19 -19
  219. package/dist/schema/local/index.d.ts +11 -0
  220. package/dist/schema/local/index.js +1 -1
  221. package/dist/schema/operations.d.ts +258 -19
  222. package/dist/schema/operations.js +1 -1
  223. package/dist/schema/permission/index.d.ts +1 -0
  224. package/dist/schema/permission/index.js +1 -1
  225. package/dist/schema/persona/index.d.ts +40 -0
  226. package/dist/schema/persona/index.js +1 -1
  227. package/dist/schema/query/bi.d.ts +912 -0
  228. package/dist/schema/query/bi.js +1 -0
  229. package/dist/schema/query/index.d.ts +663 -2
  230. package/dist/schema/query/index.js +1 -1
  231. package/dist/schema/schema-version.js +1 -1
  232. package/dist/schema/utils/skills-recommendation.d.ts +0 -1
  233. package/dist/schema/utils/skills-recommendation.js +1 -1
  234. package/dist/schema-query-impl/index.js +1 -1
  235. package/dist/schemas/account_operation.output.json +32 -3
  236. package/dist/schemas/account_operation.schema.json +8 -4
  237. package/dist/schemas/bridge_operation.output.json +26 -3
  238. package/dist/schemas/bridge_operation.schema.json +85 -13
  239. package/dist/schemas/config_operation.output.json +1 -1
  240. package/dist/schemas/config_operation.schema.json +1 -1
  241. package/dist/schemas/goal_operation.schema.json +1092 -0
  242. package/dist/schemas/guard2file.schema.json +3 -3
  243. package/dist/schemas/index.json +12 -13
  244. package/dist/schemas/industry_pack_operation.output.json +1073 -0
  245. package/dist/schemas/industry_pack_operation.schema.json +236 -2
  246. package/dist/schemas/local_info_operation.output.json +2 -2
  247. package/dist/schemas/local_mark_operation.output.json +2 -2
  248. package/dist/schemas/machineNode2file.schema.json +3 -3
  249. package/dist/schemas/messenger_operation.output.json +2 -2
  250. package/dist/schemas/monitor_events.output.json +78 -3
  251. package/dist/schemas/monitor_events.schema.json +24 -1
  252. package/dist/schemas/monitor_subscription.output.json +1462 -0
  253. package/dist/schemas/monitor_subscription.schema.json +327 -0
  254. package/dist/schemas/onchain_events.output.json +5 -5
  255. package/dist/schemas/onchain_operations.output.json +2 -2
  256. package/dist/schemas/onchain_operations.schema.json +100 -100
  257. package/dist/schemas/onchain_operations_allocation.schema.json +7 -7
  258. package/dist/schemas/onchain_operations_arbitration.schema.json +6 -6
  259. package/dist/schemas/onchain_operations_contact.schema.json +6 -6
  260. package/dist/schemas/onchain_operations_demand.schema.json +6 -6
  261. package/dist/schemas/onchain_operations_gen_passport.schema.json +3 -3
  262. package/dist/schemas/onchain_operations_gen_proof.schema.json +3 -3
  263. package/dist/schemas/onchain_operations_guard.schema.json +3 -3
  264. package/dist/schemas/onchain_operations_machine.schema.json +5 -5
  265. package/dist/schemas/onchain_operations_order.schema.json +5 -5
  266. package/dist/schemas/onchain_operations_payment.schema.json +4 -4
  267. package/dist/schemas/onchain_operations_permission.schema.json +5 -5
  268. package/dist/schemas/onchain_operations_personal.schema.json +3 -3
  269. package/dist/schemas/onchain_operations_progress.schema.json +5 -5
  270. package/dist/schemas/onchain_operations_proof.schema.json +3 -3
  271. package/dist/schemas/onchain_operations_repository.schema.json +7 -7
  272. package/dist/schemas/onchain_operations_reward.schema.json +9 -9
  273. package/dist/schemas/onchain_operations_service.schema.json +11 -11
  274. package/dist/schemas/onchain_operations_treasury.schema.json +9 -9
  275. package/dist/schemas/onchain_table_data.output.json +399 -2
  276. package/dist/schemas/onchain_table_data.schema.json +22 -22
  277. package/dist/schemas/permission_operation.schema.json +6 -2
  278. package/dist/schemas/persona_operation.output.json +145 -0
  279. package/dist/schemas/persona_operation.schema.json +28 -2
  280. package/dist/schemas/query_toolkit.output.json +1514 -22
  281. package/dist/schemas/query_toolkit.schema.json +465 -11
  282. package/dist/schemas/workflow_operation.schema.json +4 -4
  283. package/dist/task/ProcessStore.d.ts +98 -0
  284. package/dist/task/ProcessStore.js +1 -0
  285. package/dist/task/playbook.d.ts +11 -0
  286. package/dist/task/playbook.js +1 -0
  287. package/dist/task/stage-gate.d.ts +22 -0
  288. package/dist/task/stage-gate.js +1 -0
  289. package/dist/{project → task}/substep-trace.d.ts +6 -45
  290. package/dist/task/types.d.ts +144 -0
  291. package/dist/task/types.js +1 -0
  292. package/dist/tools/handlers/config.js +1 -1
  293. package/dist/tools/handlers/evaluation.js +1 -1
  294. package/dist/tools/handlers/goal.d.ts +4 -0
  295. package/dist/tools/handlers/goal.js +1 -0
  296. package/dist/tools/handlers/industry-pack.js +1 -1
  297. package/dist/tools/handlers/local.d.ts +4 -3
  298. package/dist/tools/handlers/local.js +1 -1
  299. package/dist/tools/handlers/monitor.d.ts +24 -0
  300. package/dist/tools/handlers/monitor.js +1 -1
  301. package/dist/tools/handlers/network.d.ts +1 -0
  302. package/dist/tools/handlers/network.js +1 -0
  303. package/dist/tools/handlers/onchain.js +1 -1
  304. package/dist/tools/handlers/permission.js +1 -1
  305. package/dist/tools/handlers/persona.js +1 -1
  306. package/dist/tools/handlers/query.js +1 -1
  307. package/dist/tools/handlers/watch.js +1 -1
  308. package/dist/tools/handlers/workflow.js +1 -1
  309. package/dist/tools/index.d.ts +2 -0
  310. package/dist/tools/index.js +1 -1
  311. package/dist/tools/rules-hook.d.ts +1 -0
  312. package/dist/tools/rules-hook.js +1 -1
  313. package/dist/tools/shared.js +1 -1
  314. package/dist/tools/wrap.js +1 -1
  315. package/package.json +5 -4
  316. package/dist/harness/checkpoint.d.ts +0 -8
  317. package/dist/harness/checkpoint.js +0 -1
  318. package/dist/knowledge/deployment-scanner.d.ts +0 -66
  319. package/dist/knowledge/deployment-scanner.js +0 -1
  320. package/dist/mode-market/index.d.ts +0 -3
  321. package/dist/mode-market/index.js +0 -1
  322. package/dist/mode-market/registry.d.ts +0 -53
  323. package/dist/mode-market/registry.js +0 -1
  324. package/dist/mode-market/review.d.ts +0 -27
  325. package/dist/mode-market/review.js +0 -1
  326. package/dist/mode-market/submission.d.ts +0 -25
  327. package/dist/mode-market/submission.js +0 -1
  328. package/dist/project/business-puzzle.js +0 -1
  329. package/dist/project/context-assembly.js +0 -1
  330. package/dist/project/deployment-bridge.d.ts +0 -5
  331. package/dist/project/deployment-bridge.js +0 -1
  332. package/dist/project/deployment-doc.d.ts +0 -190
  333. package/dist/project/deployment-doc.js +0 -1
  334. package/dist/project/edit-planner.d.ts +0 -123
  335. package/dist/project/edit-planner.js +0 -1
  336. package/dist/project/evaluation-fix.spec.d.ts +0 -1
  337. package/dist/project/evaluation-fix.spec.js +0 -1
  338. package/dist/project/evaluation.d.ts +0 -127
  339. package/dist/project/evaluation.js +0 -1
  340. package/dist/project/graph-builder.d.ts +0 -51
  341. package/dist/project/graph-builder.js +0 -1
  342. package/dist/project/graph.d.ts +0 -70
  343. package/dist/project/graph.js +0 -1
  344. package/dist/project/handlers.d.ts +0 -524
  345. package/dist/project/handlers.js +0 -1
  346. package/dist/project/index.d.ts +0 -91
  347. package/dist/project/index.js +0 -1
  348. package/dist/project/intent-analyzer.js +0 -1
  349. package/dist/project/machine-nodes.js +0 -1
  350. package/dist/project/machine-panorama.js +0 -1
  351. package/dist/project/merchant-guide.js +0 -1
  352. package/dist/project/mode-actions.js +0 -1
  353. package/dist/project/namespace.d.ts +0 -72
  354. package/dist/project/namespace.js +0 -1
  355. package/dist/project/object-panorama.js +0 -1
  356. package/dist/project/participation-radar.js +0 -1
  357. package/dist/project/pipeline-actions.js +0 -1
  358. package/dist/project/project-store.d.ts +0 -110
  359. package/dist/project/project-store.js +0 -1
  360. package/dist/project/query.d.ts +0 -43
  361. package/dist/project/query.js +0 -1
  362. package/dist/project/risk-aggregator.js +0 -1
  363. package/dist/project/semantic-assembler.d.ts +0 -93
  364. package/dist/project/semantic-assembler.js +0 -1
  365. package/dist/project/semantic-graph.js +0 -1
  366. package/dist/project/service-panorama.js +0 -1
  367. package/dist/project/stage-gate.d.ts +0 -52
  368. package/dist/project/stage-gate.js +0 -1
  369. package/dist/project/task-tracker.d.ts +0 -30
  370. package/dist/project/task-tracker.js +0 -1
  371. package/dist/schema/project/index.d.ts +0 -2021
  372. package/dist/schema/project/index.js +0 -1
  373. package/dist/schema/task-status.d.ts +0 -62
  374. package/dist/schema/task-status.js +0 -1
  375. package/dist/schemas/project_operation.output.json +0 -7877
  376. package/dist/schemas/project_operation.schema.json +0 -1139
  377. package/dist/schemas/query_task_status.output.json +0 -211
  378. package/dist/schemas/query_task_status.schema.json +0 -18
  379. package/dist/tools/handlers/project.d.ts +0 -2
  380. package/dist/tools/handlers/project.js +0 -1
  381. package/dist/tools/handlers/task-status.d.ts +0 -2
  382. package/dist/tools/handlers/task-status.js +0 -1
  383. /package/dist/{project → playbooks/service-build}/business-puzzle.d.ts +0 -0
  384. /package/dist/{project → playbooks/service-build}/game-theory.js +0 -0
  385. /package/dist/{project → playbooks/service-build}/machine-nodes.d.ts +0 -0
  386. /package/dist/{project → playbooks/service-build}/object-type.d.ts +0 -0
  387. /package/dist/{project → playbooks/service-build}/object-type.js +0 -0
  388. /package/dist/{project → playbooks/service-build}/reverse-mapping.d.ts +0 -0
  389. /package/dist/{project → playbooks/service-build}/reverse-mapping.js +0 -0
  390. /package/dist/{project → playbooks/service-build}/risk-aggregator.d.ts +0 -0
  391. /package/dist/{project → playbooks/service-build}/workflow-design-assessment.d.ts +0 -0
  392. /package/dist/{project → playbooks/service-build}/workflow-design-assessment.js +0 -0
  393. /package/dist/{project → task}/substep-trace.js +0 -0
@@ -583,6 +583,1079 @@
583
583
  "ok"
584
584
  ],
585
585
  "additionalProperties": false
586
+ },
587
+ {
588
+ "type": "object",
589
+ "properties": {
590
+ "action": {
591
+ "type": "string",
592
+ "const": "recommend_industry"
593
+ },
594
+ "intent": {
595
+ "type": "string",
596
+ "description": "The intent text used for inference."
597
+ },
598
+ "inferred_traits": {
599
+ "type": "object",
600
+ "propertyNames": {
601
+ "type": "string"
602
+ },
603
+ "additionalProperties": {},
604
+ "description": "10-dim industry traits inferred from intent."
605
+ },
606
+ "inference_confidence": {
607
+ "type": "number",
608
+ "description": "Inference confidence 0-1 (matched trait count / 10)."
609
+ },
610
+ "matched_keywords": {
611
+ "type": "array",
612
+ "items": {
613
+ "type": "string"
614
+ },
615
+ "description": "Keywords that triggered trait inference."
616
+ },
617
+ "strategy_intents": {
618
+ "type": "array",
619
+ "items": {
620
+ "type": "object",
621
+ "properties": {
622
+ "objective": {
623
+ "type": "string",
624
+ "enum": [
625
+ "sales_priority",
626
+ "profit_priority",
627
+ "buyer_screening",
628
+ "gross_margin_control"
629
+ ]
630
+ },
631
+ "metrics": {
632
+ "type": "array",
633
+ "items": {
634
+ "type": "string"
635
+ }
636
+ },
637
+ "levers": {
638
+ "type": "array",
639
+ "items": {
640
+ "type": "string",
641
+ "enum": [
642
+ "discount",
643
+ "reward",
644
+ "buy_guard",
645
+ "machine_design"
646
+ ]
647
+ }
648
+ },
649
+ "target": {
650
+ "type": "string"
651
+ }
652
+ },
653
+ "required": [
654
+ "objective",
655
+ "metrics",
656
+ "levers",
657
+ "target"
658
+ ],
659
+ "additionalProperties": false
660
+ },
661
+ "description": "Strategy intents resolved from the provided persona strategy statements (empty if none matched)."
662
+ },
663
+ "lever_suggestions": {
664
+ "type": "array",
665
+ "items": {
666
+ "type": "object",
667
+ "properties": {
668
+ "lever": {
669
+ "type": "string",
670
+ "enum": [
671
+ "discount",
672
+ "reward",
673
+ "buy_guard",
674
+ "machine_design"
675
+ ]
676
+ },
677
+ "objective": {
678
+ "type": "string",
679
+ "enum": [
680
+ "sales_priority",
681
+ "profit_priority",
682
+ "buyer_screening",
683
+ "gross_margin_control"
684
+ ]
685
+ },
686
+ "action": {
687
+ "type": "string",
688
+ "description": "Deterministic on-chain action that pulls the lever."
689
+ },
690
+ "target": {
691
+ "type": "string"
692
+ }
693
+ },
694
+ "required": [
695
+ "lever",
696
+ "objective",
697
+ "action",
698
+ "target"
699
+ ],
700
+ "additionalProperties": false
701
+ },
702
+ "description": "Concrete lever suggestions for the resolved strategy intents."
703
+ },
704
+ "recommendations": {
705
+ "type": "array",
706
+ "items": {
707
+ "type": "object",
708
+ "properties": {
709
+ "industry": {
710
+ "type": "string",
711
+ "description": "Recommended builtin industry mode name."
712
+ },
713
+ "similarity": {
714
+ "type": "number",
715
+ "description": "Trait similarity 0-1 (10-dim industry trait match)."
716
+ },
717
+ "matched_traits": {
718
+ "type": "array",
719
+ "items": {
720
+ "type": "string"
721
+ },
722
+ "description": "Trait dimensions that matched."
723
+ },
724
+ "reference_examples": {
725
+ "type": "array",
726
+ "items": {
727
+ "type": "object",
728
+ "properties": {
729
+ "file": {
730
+ "type": "string",
731
+ "description": "Example file name (fetch via schema_query search_examples)."
732
+ },
733
+ "title": {
734
+ "type": "string"
735
+ },
736
+ "operation_type": {
737
+ "type": "string"
738
+ },
739
+ "verified": {
740
+ "type": "boolean"
741
+ }
742
+ },
743
+ "required": [
744
+ "file",
745
+ "title",
746
+ "operation_type",
747
+ "verified"
748
+ ],
749
+ "additionalProperties": false
750
+ },
751
+ "description": "Verified reference examples for this industry (top 3)."
752
+ },
753
+ "strategy_alignment": {
754
+ "description": "Present only when a strategy was provided: lever alignment of the industry mode.",
755
+ "type": "object",
756
+ "properties": {
757
+ "score": {
758
+ "type": "number",
759
+ "description": "Lever alignment 0-1 (matched / required levers)."
760
+ },
761
+ "matched_levers": {
762
+ "type": "array",
763
+ "items": {
764
+ "type": "string",
765
+ "enum": [
766
+ "discount",
767
+ "reward",
768
+ "buy_guard",
769
+ "machine_design"
770
+ ]
771
+ },
772
+ "description": "Required levers this mode supports."
773
+ },
774
+ "missing_levers": {
775
+ "type": "array",
776
+ "items": {
777
+ "type": "string",
778
+ "enum": [
779
+ "discount",
780
+ "reward",
781
+ "buy_guard",
782
+ "machine_design"
783
+ ]
784
+ },
785
+ "description": "Required levers this mode lacks."
786
+ }
787
+ },
788
+ "required": [
789
+ "score",
790
+ "matched_levers",
791
+ "missing_levers"
792
+ ],
793
+ "additionalProperties": false
794
+ }
795
+ },
796
+ "required": [
797
+ "industry",
798
+ "similarity",
799
+ "matched_traits",
800
+ "reference_examples"
801
+ ],
802
+ "additionalProperties": false
803
+ },
804
+ "description": "Top-3 similar industries + reference examples (re-ranked by lever alignment when strategy provided)."
805
+ },
806
+ "hint": {
807
+ "type": "string",
808
+ "description": "How to apply the recommendation (pass the industry to analyze_intent / merchant_guide via project_industry)."
809
+ }
810
+ },
811
+ "required": [
812
+ "action",
813
+ "intent",
814
+ "inferred_traits",
815
+ "inference_confidence",
816
+ "matched_keywords",
817
+ "strategy_intents",
818
+ "lever_suggestions",
819
+ "recommendations",
820
+ "hint"
821
+ ],
822
+ "additionalProperties": false
823
+ },
824
+ {
825
+ "type": "object",
826
+ "properties": {
827
+ "action": {
828
+ "type": "string",
829
+ "const": "list_modes"
830
+ },
831
+ "builtin_modes": {
832
+ "type": "array",
833
+ "items": {
834
+ "type": "object",
835
+ "properties": {
836
+ "name": {
837
+ "type": "string"
838
+ },
839
+ "display_name": {
840
+ "type": "string"
841
+ },
842
+ "version": {
843
+ "type": "string"
844
+ },
845
+ "derived_from": {
846
+ "anyOf": [
847
+ {
848
+ "type": "string"
849
+ },
850
+ {
851
+ "type": "null"
852
+ }
853
+ ],
854
+ "description": "Source builtin mode (derive_user_mode) or null."
855
+ },
856
+ "owner": {
857
+ "description": "Mode owner (custom modes only).",
858
+ "type": "string"
859
+ },
860
+ "key_risk": {
861
+ "type": "string"
862
+ },
863
+ "machine_nodes": {
864
+ "type": "array",
865
+ "items": {
866
+ "type": "string"
867
+ },
868
+ "description": "Machine shape node names."
869
+ },
870
+ "similar_industries": {
871
+ "type": "array",
872
+ "items": {
873
+ "type": "string"
874
+ }
875
+ },
876
+ "evolution_history": {
877
+ "type": "array",
878
+ "items": {
879
+ "type": "object",
880
+ "properties": {
881
+ "version": {
882
+ "type": "string"
883
+ },
884
+ "changed_at": {
885
+ "type": "number"
886
+ },
887
+ "changes": {
888
+ "type": "array",
889
+ "items": {
890
+ "type": "string"
891
+ }
892
+ }
893
+ },
894
+ "required": [
895
+ "version",
896
+ "changed_at",
897
+ "changes"
898
+ ],
899
+ "additionalProperties": false
900
+ }
901
+ }
902
+ },
903
+ "required": [
904
+ "name",
905
+ "display_name",
906
+ "version",
907
+ "derived_from",
908
+ "key_risk",
909
+ "machine_nodes"
910
+ ],
911
+ "additionalProperties": false
912
+ },
913
+ "description": "Builtin industry modes (use name as project_industry)."
914
+ },
915
+ "user_modes": {
916
+ "type": "array",
917
+ "items": {
918
+ "type": "object",
919
+ "properties": {
920
+ "name": {
921
+ "type": "string"
922
+ },
923
+ "display_name": {
924
+ "type": "string"
925
+ },
926
+ "version": {
927
+ "type": "string"
928
+ },
929
+ "derived_from": {
930
+ "anyOf": [
931
+ {
932
+ "type": "string"
933
+ },
934
+ {
935
+ "type": "null"
936
+ }
937
+ ],
938
+ "description": "Source builtin mode (derive_user_mode) or null."
939
+ },
940
+ "owner": {
941
+ "description": "Mode owner (custom modes only).",
942
+ "type": "string"
943
+ },
944
+ "key_risk": {
945
+ "type": "string"
946
+ },
947
+ "machine_nodes": {
948
+ "type": "array",
949
+ "items": {
950
+ "type": "string"
951
+ },
952
+ "description": "Machine shape node names."
953
+ },
954
+ "similar_industries": {
955
+ "type": "array",
956
+ "items": {
957
+ "type": "string"
958
+ }
959
+ },
960
+ "evolution_history": {
961
+ "type": "array",
962
+ "items": {
963
+ "type": "object",
964
+ "properties": {
965
+ "version": {
966
+ "type": "string"
967
+ },
968
+ "changed_at": {
969
+ "type": "number"
970
+ },
971
+ "changes": {
972
+ "type": "array",
973
+ "items": {
974
+ "type": "string"
975
+ }
976
+ }
977
+ },
978
+ "required": [
979
+ "version",
980
+ "changed_at",
981
+ "changes"
982
+ ],
983
+ "additionalProperties": false
984
+ }
985
+ }
986
+ },
987
+ "required": [
988
+ "name",
989
+ "display_name",
990
+ "version",
991
+ "derived_from",
992
+ "key_risk",
993
+ "machine_nodes"
994
+ ],
995
+ "additionalProperties": false
996
+ },
997
+ "description": "Caller's custom modes (derive/evolve/register)."
998
+ },
999
+ "owner": {
1000
+ "type": "string",
1001
+ "description": "Owner key for custom modes (local single-user)."
1002
+ },
1003
+ "hint": {
1004
+ "type": "string"
1005
+ }
1006
+ },
1007
+ "required": [
1008
+ "action",
1009
+ "builtin_modes",
1010
+ "user_modes",
1011
+ "owner",
1012
+ "hint"
1013
+ ],
1014
+ "additionalProperties": false
1015
+ },
1016
+ {
1017
+ "type": "object",
1018
+ "properties": {
1019
+ "action": {
1020
+ "type": "string",
1021
+ "const": "derive_user_mode"
1022
+ },
1023
+ "mode": {
1024
+ "type": "object",
1025
+ "properties": {
1026
+ "name": {
1027
+ "type": "string"
1028
+ },
1029
+ "display_name": {
1030
+ "type": "string"
1031
+ },
1032
+ "version": {
1033
+ "type": "string"
1034
+ },
1035
+ "derived_from": {
1036
+ "anyOf": [
1037
+ {
1038
+ "type": "string"
1039
+ },
1040
+ {
1041
+ "type": "null"
1042
+ }
1043
+ ],
1044
+ "description": "Source builtin mode (derive_user_mode) or null."
1045
+ },
1046
+ "owner": {
1047
+ "description": "Mode owner (custom modes only).",
1048
+ "type": "string"
1049
+ },
1050
+ "key_risk": {
1051
+ "type": "string"
1052
+ },
1053
+ "machine_nodes": {
1054
+ "type": "array",
1055
+ "items": {
1056
+ "type": "string"
1057
+ },
1058
+ "description": "Machine shape node names."
1059
+ },
1060
+ "similar_industries": {
1061
+ "type": "array",
1062
+ "items": {
1063
+ "type": "string"
1064
+ }
1065
+ },
1066
+ "evolution_history": {
1067
+ "type": "array",
1068
+ "items": {
1069
+ "type": "object",
1070
+ "properties": {
1071
+ "version": {
1072
+ "type": "string"
1073
+ },
1074
+ "changed_at": {
1075
+ "type": "number"
1076
+ },
1077
+ "changes": {
1078
+ "type": "array",
1079
+ "items": {
1080
+ "type": "string"
1081
+ }
1082
+ }
1083
+ },
1084
+ "required": [
1085
+ "version",
1086
+ "changed_at",
1087
+ "changes"
1088
+ ],
1089
+ "additionalProperties": false
1090
+ }
1091
+ }
1092
+ },
1093
+ "required": [
1094
+ "name",
1095
+ "display_name",
1096
+ "version",
1097
+ "derived_from",
1098
+ "key_risk",
1099
+ "machine_nodes"
1100
+ ],
1101
+ "additionalProperties": false,
1102
+ "description": "The derived (and registered) custom mode."
1103
+ },
1104
+ "hint": {
1105
+ "type": "string"
1106
+ }
1107
+ },
1108
+ "required": [
1109
+ "action",
1110
+ "mode",
1111
+ "hint"
1112
+ ],
1113
+ "additionalProperties": false
1114
+ },
1115
+ {
1116
+ "type": "object",
1117
+ "properties": {
1118
+ "action": {
1119
+ "type": "string",
1120
+ "const": "evolve_user_mode"
1121
+ },
1122
+ "mode": {
1123
+ "type": "object",
1124
+ "properties": {
1125
+ "name": {
1126
+ "type": "string"
1127
+ },
1128
+ "display_name": {
1129
+ "type": "string"
1130
+ },
1131
+ "version": {
1132
+ "type": "string"
1133
+ },
1134
+ "derived_from": {
1135
+ "anyOf": [
1136
+ {
1137
+ "type": "string"
1138
+ },
1139
+ {
1140
+ "type": "null"
1141
+ }
1142
+ ],
1143
+ "description": "Source builtin mode (derive_user_mode) or null."
1144
+ },
1145
+ "owner": {
1146
+ "description": "Mode owner (custom modes only).",
1147
+ "type": "string"
1148
+ },
1149
+ "key_risk": {
1150
+ "type": "string"
1151
+ },
1152
+ "machine_nodes": {
1153
+ "type": "array",
1154
+ "items": {
1155
+ "type": "string"
1156
+ },
1157
+ "description": "Machine shape node names."
1158
+ },
1159
+ "similar_industries": {
1160
+ "type": "array",
1161
+ "items": {
1162
+ "type": "string"
1163
+ }
1164
+ },
1165
+ "evolution_history": {
1166
+ "type": "array",
1167
+ "items": {
1168
+ "type": "object",
1169
+ "properties": {
1170
+ "version": {
1171
+ "type": "string"
1172
+ },
1173
+ "changed_at": {
1174
+ "type": "number"
1175
+ },
1176
+ "changes": {
1177
+ "type": "array",
1178
+ "items": {
1179
+ "type": "string"
1180
+ }
1181
+ }
1182
+ },
1183
+ "required": [
1184
+ "version",
1185
+ "changed_at",
1186
+ "changes"
1187
+ ],
1188
+ "additionalProperties": false
1189
+ }
1190
+ }
1191
+ },
1192
+ "required": [
1193
+ "name",
1194
+ "display_name",
1195
+ "version",
1196
+ "derived_from",
1197
+ "key_risk",
1198
+ "machine_nodes"
1199
+ ],
1200
+ "additionalProperties": false,
1201
+ "description": "The evolved custom mode (version bumped)."
1202
+ },
1203
+ "hint": {
1204
+ "type": "string"
1205
+ }
1206
+ },
1207
+ "required": [
1208
+ "action",
1209
+ "mode",
1210
+ "hint"
1211
+ ],
1212
+ "additionalProperties": false
1213
+ },
1214
+ {
1215
+ "type": "object",
1216
+ "properties": {
1217
+ "action": {
1218
+ "type": "string",
1219
+ "const": "register_user_mode"
1220
+ },
1221
+ "mode": {
1222
+ "type": "object",
1223
+ "properties": {
1224
+ "name": {
1225
+ "type": "string"
1226
+ },
1227
+ "display_name": {
1228
+ "type": "string"
1229
+ },
1230
+ "version": {
1231
+ "type": "string"
1232
+ },
1233
+ "derived_from": {
1234
+ "anyOf": [
1235
+ {
1236
+ "type": "string"
1237
+ },
1238
+ {
1239
+ "type": "null"
1240
+ }
1241
+ ],
1242
+ "description": "Source builtin mode (derive_user_mode) or null."
1243
+ },
1244
+ "owner": {
1245
+ "description": "Mode owner (custom modes only).",
1246
+ "type": "string"
1247
+ },
1248
+ "key_risk": {
1249
+ "type": "string"
1250
+ },
1251
+ "machine_nodes": {
1252
+ "type": "array",
1253
+ "items": {
1254
+ "type": "string"
1255
+ },
1256
+ "description": "Machine shape node names."
1257
+ },
1258
+ "similar_industries": {
1259
+ "type": "array",
1260
+ "items": {
1261
+ "type": "string"
1262
+ }
1263
+ },
1264
+ "evolution_history": {
1265
+ "type": "array",
1266
+ "items": {
1267
+ "type": "object",
1268
+ "properties": {
1269
+ "version": {
1270
+ "type": "string"
1271
+ },
1272
+ "changed_at": {
1273
+ "type": "number"
1274
+ },
1275
+ "changes": {
1276
+ "type": "array",
1277
+ "items": {
1278
+ "type": "string"
1279
+ }
1280
+ }
1281
+ },
1282
+ "required": [
1283
+ "version",
1284
+ "changed_at",
1285
+ "changes"
1286
+ ],
1287
+ "additionalProperties": false
1288
+ }
1289
+ }
1290
+ },
1291
+ "required": [
1292
+ "name",
1293
+ "display_name",
1294
+ "version",
1295
+ "derived_from",
1296
+ "key_risk",
1297
+ "machine_nodes"
1298
+ ],
1299
+ "additionalProperties": false,
1300
+ "description": "The registered fully-custom mode."
1301
+ },
1302
+ "hint": {
1303
+ "type": "string"
1304
+ }
1305
+ },
1306
+ "required": [
1307
+ "action",
1308
+ "mode",
1309
+ "hint"
1310
+ ],
1311
+ "additionalProperties": false
1312
+ },
1313
+ {
1314
+ "type": "object",
1315
+ "properties": {
1316
+ "action": {
1317
+ "type": "string",
1318
+ "const": "unregister_user_mode"
1319
+ },
1320
+ "removed": {
1321
+ "type": "boolean",
1322
+ "const": true
1323
+ },
1324
+ "mode_name": {
1325
+ "type": "string"
1326
+ }
1327
+ },
1328
+ "required": [
1329
+ "action",
1330
+ "removed",
1331
+ "mode_name"
1332
+ ],
1333
+ "additionalProperties": false
1334
+ },
1335
+ {
1336
+ "type": "object",
1337
+ "properties": {
1338
+ "action": {
1339
+ "type": "string",
1340
+ "const": "register_custom_metric"
1341
+ },
1342
+ "metric": {
1343
+ "type": "object",
1344
+ "properties": {
1345
+ "metric_id": {
1346
+ "type": "string"
1347
+ },
1348
+ "display_name": {
1349
+ "type": "string"
1350
+ },
1351
+ "description": {
1352
+ "type": "string"
1353
+ },
1354
+ "type": {
1355
+ "type": "string",
1356
+ "enum": [
1357
+ "risk",
1358
+ "benefit"
1359
+ ]
1360
+ },
1361
+ "scale": {
1362
+ "type": "string",
1363
+ "enum": [
1364
+ "level",
1365
+ "numeric",
1366
+ "percentage"
1367
+ ]
1368
+ },
1369
+ "weight": {
1370
+ "type": "number"
1371
+ },
1372
+ "scope": {
1373
+ "type": "string",
1374
+ "enum": [
1375
+ "builtin",
1376
+ "custom"
1377
+ ]
1378
+ },
1379
+ "owner": {
1380
+ "type": "string"
1381
+ }
1382
+ },
1383
+ "required": [
1384
+ "metric_id",
1385
+ "display_name",
1386
+ "description",
1387
+ "type",
1388
+ "scale",
1389
+ "weight",
1390
+ "scope"
1391
+ ],
1392
+ "additionalProperties": false,
1393
+ "description": "The registered custom metric (globally effective)."
1394
+ },
1395
+ "hint": {
1396
+ "type": "string"
1397
+ }
1398
+ },
1399
+ "required": [
1400
+ "action",
1401
+ "metric",
1402
+ "hint"
1403
+ ],
1404
+ "additionalProperties": false
1405
+ },
1406
+ {
1407
+ "type": "object",
1408
+ "properties": {
1409
+ "action": {
1410
+ "type": "string",
1411
+ "const": "unregister_custom_metric"
1412
+ },
1413
+ "removed": {
1414
+ "type": "boolean",
1415
+ "const": true
1416
+ },
1417
+ "metric_id": {
1418
+ "type": "string"
1419
+ }
1420
+ },
1421
+ "required": [
1422
+ "action",
1423
+ "removed",
1424
+ "metric_id"
1425
+ ],
1426
+ "additionalProperties": false
1427
+ },
1428
+ {
1429
+ "type": "object",
1430
+ "properties": {
1431
+ "action": {
1432
+ "type": "string",
1433
+ "const": "register_custom_constraint"
1434
+ },
1435
+ "constraint": {
1436
+ "type": "object",
1437
+ "properties": {
1438
+ "constraint_id": {
1439
+ "type": "string"
1440
+ },
1441
+ "display_name": {
1442
+ "type": "string"
1443
+ },
1444
+ "description": {
1445
+ "type": "string"
1446
+ },
1447
+ "rule": {
1448
+ "type": "object",
1449
+ "propertyNames": {
1450
+ "type": "string"
1451
+ },
1452
+ "additionalProperties": {},
1453
+ "description": "Constraint rule (4 types — see constraint_rule input)."
1454
+ },
1455
+ "severity": {
1456
+ "type": "string",
1457
+ "enum": [
1458
+ "hard",
1459
+ "soft"
1460
+ ]
1461
+ },
1462
+ "on_violation": {
1463
+ "type": "string",
1464
+ "enum": [
1465
+ "block",
1466
+ "warn",
1467
+ "log"
1468
+ ]
1469
+ },
1470
+ "scope": {
1471
+ "type": "string",
1472
+ "enum": [
1473
+ "builtin",
1474
+ "custom"
1475
+ ]
1476
+ },
1477
+ "owner": {
1478
+ "type": "string"
1479
+ }
1480
+ },
1481
+ "required": [
1482
+ "constraint_id",
1483
+ "display_name",
1484
+ "description",
1485
+ "rule",
1486
+ "severity",
1487
+ "on_violation",
1488
+ "scope"
1489
+ ],
1490
+ "additionalProperties": false,
1491
+ "description": "The registered custom constraint."
1492
+ },
1493
+ "hint": {
1494
+ "type": "string"
1495
+ }
1496
+ },
1497
+ "required": [
1498
+ "action",
1499
+ "constraint",
1500
+ "hint"
1501
+ ],
1502
+ "additionalProperties": false
1503
+ },
1504
+ {
1505
+ "type": "object",
1506
+ "properties": {
1507
+ "action": {
1508
+ "type": "string",
1509
+ "const": "unregister_custom_constraint"
1510
+ },
1511
+ "removed": {
1512
+ "type": "boolean",
1513
+ "const": true
1514
+ },
1515
+ "constraint_id": {
1516
+ "type": "string"
1517
+ }
1518
+ },
1519
+ "required": [
1520
+ "action",
1521
+ "removed",
1522
+ "constraint_id"
1523
+ ],
1524
+ "additionalProperties": false
1525
+ },
1526
+ {
1527
+ "type": "object",
1528
+ "properties": {
1529
+ "action": {
1530
+ "type": "string",
1531
+ "const": "list_metrics_constraints"
1532
+ },
1533
+ "metrics": {
1534
+ "type": "array",
1535
+ "items": {
1536
+ "type": "object",
1537
+ "properties": {
1538
+ "metric_id": {
1539
+ "type": "string"
1540
+ },
1541
+ "display_name": {
1542
+ "type": "string"
1543
+ },
1544
+ "description": {
1545
+ "type": "string"
1546
+ },
1547
+ "type": {
1548
+ "type": "string",
1549
+ "enum": [
1550
+ "risk",
1551
+ "benefit"
1552
+ ]
1553
+ },
1554
+ "scale": {
1555
+ "type": "string",
1556
+ "enum": [
1557
+ "level",
1558
+ "numeric",
1559
+ "percentage"
1560
+ ]
1561
+ },
1562
+ "weight": {
1563
+ "type": "number"
1564
+ },
1565
+ "scope": {
1566
+ "type": "string",
1567
+ "enum": [
1568
+ "builtin",
1569
+ "custom"
1570
+ ]
1571
+ },
1572
+ "owner": {
1573
+ "type": "string"
1574
+ }
1575
+ },
1576
+ "required": [
1577
+ "metric_id",
1578
+ "display_name",
1579
+ "description",
1580
+ "type",
1581
+ "scale",
1582
+ "weight",
1583
+ "scope"
1584
+ ],
1585
+ "additionalProperties": false
1586
+ }
1587
+ },
1588
+ "constraints": {
1589
+ "type": "array",
1590
+ "items": {
1591
+ "type": "object",
1592
+ "properties": {
1593
+ "constraint_id": {
1594
+ "type": "string"
1595
+ },
1596
+ "display_name": {
1597
+ "type": "string"
1598
+ },
1599
+ "description": {
1600
+ "type": "string"
1601
+ },
1602
+ "rule": {
1603
+ "type": "object",
1604
+ "propertyNames": {
1605
+ "type": "string"
1606
+ },
1607
+ "additionalProperties": {},
1608
+ "description": "Constraint rule (4 types — see constraint_rule input)."
1609
+ },
1610
+ "severity": {
1611
+ "type": "string",
1612
+ "enum": [
1613
+ "hard",
1614
+ "soft"
1615
+ ]
1616
+ },
1617
+ "on_violation": {
1618
+ "type": "string",
1619
+ "enum": [
1620
+ "block",
1621
+ "warn",
1622
+ "log"
1623
+ ]
1624
+ },
1625
+ "scope": {
1626
+ "type": "string",
1627
+ "enum": [
1628
+ "builtin",
1629
+ "custom"
1630
+ ]
1631
+ },
1632
+ "owner": {
1633
+ "type": "string"
1634
+ }
1635
+ },
1636
+ "required": [
1637
+ "constraint_id",
1638
+ "display_name",
1639
+ "description",
1640
+ "rule",
1641
+ "severity",
1642
+ "on_violation",
1643
+ "scope"
1644
+ ],
1645
+ "additionalProperties": false
1646
+ }
1647
+ },
1648
+ "hint": {
1649
+ "type": "string"
1650
+ }
1651
+ },
1652
+ "required": [
1653
+ "action",
1654
+ "metrics",
1655
+ "constraints",
1656
+ "hint"
1657
+ ],
1658
+ "additionalProperties": false
586
1659
  }
587
1660
  ]
588
1661
  }