@wowok/agent-mcp 2.7.1 → 2.7.3

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 (597) hide show
  1. package/dist/config/index.js +1 -1
  2. package/dist/config/runtime.js +1 -238
  3. package/dist/customer/account-events.d.ts +32 -0
  4. package/dist/customer/account-events.js +1 -0
  5. package/dist/customer/customer-advice.d.ts +1 -0
  6. package/dist/customer/customer-advice.js +1 -130
  7. package/dist/customer/index.js +1 -11
  8. package/dist/customer/industry-risks.js +1 -438
  9. package/dist/customer/info-puzzle.js +1 -681
  10. package/dist/customer/order-monitor.js +1 -328
  11. package/dist/customer/order-strategy.d.ts +1 -1
  12. package/dist/customer/order-strategy.js +1 -373
  13. package/dist/customer/post-purchase.js +1 -351
  14. package/dist/customer/preorder-compare.js +1 -34
  15. package/dist/customer/reminder-system.d.ts +2 -0
  16. package/dist/customer/reminder-system.js +1 -316
  17. package/dist/customer/risk-assessment.d.ts +1 -0
  18. package/dist/customer/risk-assessment.js +1 -397
  19. package/dist/customer/types.d.ts +2 -0
  20. package/dist/customer/types.js +1 -13
  21. package/dist/customer/user-preferences.js +1 -460
  22. package/dist/evaluation/arbitration-game.d.ts +9 -2
  23. package/dist/evaluation/arbitration-game.js +1 -48
  24. package/dist/evaluation/builtins/arbitration-score.d.ts +41 -0
  25. package/dist/evaluation/builtins/arbitration-score.js +1 -0
  26. package/dist/evaluation/builtins/demand-match.js +1 -153
  27. package/dist/evaluation/builtins/index.d.ts +1 -0
  28. package/dist/evaluation/builtins/index.js +1 -10
  29. package/dist/evaluation/builtins/service-risk.js +1 -55
  30. package/dist/evaluation/capability.js +1 -13
  31. package/dist/evaluation/category-match-rules.d.ts +30 -0
  32. package/dist/evaluation/category-match-rules.js +1 -0
  33. package/dist/evaluation/composer.js +1 -40
  34. package/dist/evaluation/engine.js +1 -175
  35. package/dist/evaluation/extract.js +1 -115
  36. package/dist/evaluation/game-strategy.d.ts +27 -0
  37. package/dist/evaluation/game-strategy.js +1 -0
  38. package/dist/evaluation/gap.js +1 -100
  39. package/dist/evaluation/index.d.ts +2 -0
  40. package/dist/evaluation/index.js +1 -11
  41. package/dist/evaluation/location-match.d.ts +42 -0
  42. package/dist/evaluation/location-match.js +1 -0
  43. package/dist/evaluation/node-game.d.ts +31 -3
  44. package/dist/evaluation/node-game.js +1 -57
  45. package/dist/evaluation/path-reasoning.d.ts +35 -0
  46. package/dist/evaluation/path-reasoning.js +1 -0
  47. package/dist/evaluation/region.d.ts +6 -0
  48. package/dist/evaluation/region.js +1 -36
  49. package/dist/evaluation/types.d.ts +18 -0
  50. package/dist/evaluation/types.js +1 -1
  51. package/dist/evaluation/user-injection.js +1 -27
  52. package/dist/experience/experience-reuse.js +1 -103
  53. package/dist/experience/index.js +1 -5
  54. package/dist/experience/intent-distill.js +1 -83
  55. package/dist/experience/realtime-feedback.js +1 -94
  56. package/dist/experience/types.js +1 -1
  57. package/dist/experience/user-profile.d.ts +1 -1
  58. package/dist/experience/user-profile.js +1 -171
  59. package/dist/extensions/business-modules.js +1 -287
  60. package/dist/extensions/capability-manifest.js +1 -781
  61. package/dist/extensions/constraint-registry.js +1 -198
  62. package/dist/extensions/index.d.ts +6 -0
  63. package/dist/extensions/index.js +1 -6
  64. package/dist/extensions/industry-layers.d.ts +75 -0
  65. package/dist/extensions/industry-layers.js +1 -0
  66. package/dist/extensions/industry-pack.d.ts +105 -0
  67. package/dist/extensions/industry-pack.js +1 -0
  68. package/dist/extensions/metric-registry.js +1 -257
  69. package/dist/extensions/mode-evaluator.d.ts +1 -1
  70. package/dist/extensions/mode-evaluator.js +1 -170
  71. package/dist/extensions/modes.js +1 -499
  72. package/dist/extensions/registry.d.ts +1 -0
  73. package/dist/extensions/registry.js +1 -717
  74. package/dist/extensions/types.js +1 -1
  75. package/dist/graph/base.d.ts +8 -0
  76. package/dist/graph/base.js +1 -0
  77. package/dist/harness/auto-escalation.js +1 -68
  78. package/dist/harness/checkpoint.js +1 -129
  79. package/dist/harness/index.d.ts +1 -0
  80. package/dist/harness/index.js +1 -78
  81. package/dist/harness/plan.d.ts +2 -0
  82. package/dist/harness/plan.js +1 -315
  83. package/dist/harness/recover.d.ts +1 -1
  84. package/dist/harness/recover.js +1 -139
  85. package/dist/harness/types.d.ts +2 -3
  86. package/dist/harness/types.js +1 -1
  87. package/dist/harness/verify.js +1 -237
  88. package/dist/index.js +1 -273
  89. package/dist/intent/enrich.js +1 -67
  90. package/dist/intent/index.js +1 -60
  91. package/dist/intent/matcher.js +1 -81
  92. package/dist/intent/store.js +1 -55
  93. package/dist/intent/types.js +1 -10
  94. package/dist/knowledge/acquisition-flywheel.js +1 -192
  95. package/dist/knowledge/allocation-confirm.js +1 -534
  96. package/dist/knowledge/allocation-context.js +1 -249
  97. package/dist/knowledge/allocation-ledger.js +1 -463
  98. package/dist/knowledge/allocation-puzzle.js +1 -298
  99. package/dist/knowledge/allocation-risk.js +1 -568
  100. package/dist/knowledge/allocation-templates.js +1 -970
  101. package/dist/knowledge/allocation-translation.js +1 -585
  102. package/dist/knowledge/anti-cheat.d.ts +37 -0
  103. package/dist/knowledge/anti-cheat.js +1 -0
  104. package/dist/knowledge/arb-confirm.d.ts +28 -0
  105. package/dist/knowledge/arb-confirm.js +1 -0
  106. package/dist/knowledge/arb-risk.js +1 -210
  107. package/dist/knowledge/arb-translation.d.ts +48 -0
  108. package/dist/knowledge/arb-translation.js +1 -0
  109. package/dist/knowledge/arbitration-confirm.js +1 -559
  110. package/dist/knowledge/arbitration-context.js +1 -505
  111. package/dist/knowledge/arbitration-ledger.js +1 -521
  112. package/dist/knowledge/arbitration-puzzle.js +1 -304
  113. package/dist/knowledge/arbitration-risk.js +1 -423
  114. package/dist/knowledge/arbitration-templates.js +1 -276
  115. package/dist/knowledge/arbitration-translation.js +1 -487
  116. package/dist/knowledge/audit-rules.js +1 -141
  117. package/dist/knowledge/bridge-confirm.d.ts +26 -0
  118. package/dist/knowledge/bridge-confirm.js +1 -0
  119. package/dist/knowledge/bridge-risk.js +1 -263
  120. package/dist/knowledge/bridge-translation.d.ts +37 -0
  121. package/dist/knowledge/bridge-translation.js +1 -0
  122. package/dist/knowledge/contact-confirm.d.ts +27 -0
  123. package/dist/knowledge/contact-confirm.js +1 -0
  124. package/dist/knowledge/contact-risk.js +1 -200
  125. package/dist/knowledge/contact-templates.js +1 -60
  126. package/dist/knowledge/contact-translation.d.ts +39 -0
  127. package/dist/knowledge/contact-translation.js +1 -0
  128. package/dist/knowledge/demand-confirm.js +1 -206
  129. package/dist/knowledge/demand-context.d.ts +17 -0
  130. package/dist/knowledge/demand-context.js +1 -0
  131. package/dist/knowledge/demand-ledger.d.ts +26 -0
  132. package/dist/knowledge/demand-ledger.js +1 -0
  133. package/dist/knowledge/demand-matching.js +1 -132
  134. package/dist/knowledge/demand-puzzle.d.ts +29 -0
  135. package/dist/knowledge/demand-puzzle.js +1 -0
  136. package/dist/knowledge/demand-risk.js +1 -240
  137. package/dist/knowledge/demand-templates.d.ts +12 -0
  138. package/dist/knowledge/demand-templates.js +1 -0
  139. package/dist/knowledge/demand-translation.js +1 -354
  140. package/dist/knowledge/deployment-scanner.js +1 -823
  141. package/dist/knowledge/dynamic-pricing.js +1 -87
  142. package/dist/knowledge/evidence-review.d.ts +12 -0
  143. package/dist/knowledge/evidence-review.js +1 -0
  144. package/dist/knowledge/examples-scanner-cli.js +1 -26
  145. package/dist/knowledge/examples-scanner.js +1 -843
  146. package/dist/knowledge/flywheel-loop.d.ts +0 -1
  147. package/dist/knowledge/flywheel-loop.js +1 -404
  148. package/dist/knowledge/fund-layer.js +1 -973
  149. package/dist/knowledge/glossary.js +1 -211
  150. package/dist/knowledge/guard-confirm.js +1 -406
  151. package/dist/knowledge/guard-context.js +1 -287
  152. package/dist/knowledge/guard-design-patterns.js +1 -360
  153. package/dist/knowledge/guard-ledger.js +1 -260
  154. package/dist/knowledge/guard-lint.js +1 -670
  155. package/dist/knowledge/guard-migration.d.ts +1 -1
  156. package/dist/knowledge/guard-migration.js +1 -228
  157. package/dist/knowledge/guard-puzzle.js +1 -805
  158. package/dist/knowledge/guard-render.js +1 -700
  159. package/dist/knowledge/guard-risk.js +1 -1879
  160. package/dist/knowledge/guard-submission-prompt.js +1 -171
  161. package/dist/knowledge/guard-templates.js +1 -1105
  162. package/dist/knowledge/guard-translation.js +1 -1119
  163. package/dist/knowledge/index.d.ts +71 -3
  164. package/dist/knowledge/index.js +1 -436
  165. package/dist/knowledge/industry-evolution.js +1 -323
  166. package/dist/knowledge/industry-generalizer.js +1 -381
  167. package/dist/knowledge/industry-registry.js +1 -174
  168. package/dist/knowledge/intent-metrics.d.ts +4 -3
  169. package/dist/knowledge/intent-metrics.js +1 -566
  170. package/dist/knowledge/machine-confirm.js +1 -559
  171. package/dist/knowledge/machine-context.js +1 -833
  172. package/dist/knowledge/machine-ledger.js +1 -338
  173. package/dist/knowledge/machine-puzzle.js +1 -494
  174. package/dist/knowledge/machine-render.js +1 -565
  175. package/dist/knowledge/machine-risk.js +1 -669
  176. package/dist/knowledge/machine-templates.js +1 -1597
  177. package/dist/knowledge/machine-topology.js +1 -234
  178. package/dist/knowledge/machine-translation.js +1 -513
  179. package/dist/knowledge/market-metrics.d.ts +12 -0
  180. package/dist/knowledge/market-metrics.js +1 -0
  181. package/dist/knowledge/market-operations.d.ts +46 -0
  182. package/dist/knowledge/market-operations.js +1 -0
  183. package/dist/knowledge/mcp-schema-audit-cli.js +1 -45
  184. package/dist/knowledge/mcp-schema-audit.d.ts +22 -22
  185. package/dist/knowledge/mcp-schema-audit.js +1 -777
  186. package/dist/knowledge/onchain-constants.js +1 -35
  187. package/dist/knowledge/order-confirm.js +1 -573
  188. package/dist/knowledge/order-context.js +1 -390
  189. package/dist/knowledge/order-ledger.js +1 -341
  190. package/dist/knowledge/order-puzzle.js +1 -255
  191. package/dist/knowledge/order-risk.js +1 -653
  192. package/dist/knowledge/order-templates.js +1 -368
  193. package/dist/knowledge/order-translation.js +1 -550
  194. package/dist/knowledge/overrides-loader.js +1 -65
  195. package/dist/knowledge/passport-confirm.js +1 -531
  196. package/dist/knowledge/passport-context.js +1 -306
  197. package/dist/knowledge/passport-ledger.js +1 -282
  198. package/dist/knowledge/passport-puzzle.js +1 -333
  199. package/dist/knowledge/passport-risk.js +1 -450
  200. package/dist/knowledge/passport-templates.js +1 -568
  201. package/dist/knowledge/passport-translation.js +1 -516
  202. package/dist/knowledge/payment-confirm.d.ts +26 -0
  203. package/dist/knowledge/payment-confirm.js +1 -0
  204. package/dist/knowledge/payment-risk.js +1 -249
  205. package/dist/knowledge/payment-translation.d.ts +37 -0
  206. package/dist/knowledge/payment-translation.js +1 -0
  207. package/dist/knowledge/permission-confirm.js +1 -426
  208. package/dist/knowledge/permission-context.js +1 -224
  209. package/dist/knowledge/permission-ledger.d.ts +11 -0
  210. package/dist/knowledge/permission-ledger.js +1 -403
  211. package/dist/knowledge/permission-puzzle.js +1 -173
  212. package/dist/knowledge/permission-risk.js +1 -411
  213. package/dist/knowledge/permission-templates.js +1 -234
  214. package/dist/knowledge/permission-translation.js +1 -350
  215. package/dist/knowledge/personal-confirm.d.ts +29 -0
  216. package/dist/knowledge/personal-confirm.js +1 -0
  217. package/dist/knowledge/personal-risk.js +1 -212
  218. package/dist/knowledge/personal-translation.d.ts +37 -0
  219. package/dist/knowledge/personal-translation.js +1 -0
  220. package/dist/knowledge/process-model.d.ts +1 -11
  221. package/dist/knowledge/process-model.js +1 -160
  222. package/dist/knowledge/progress-confirm.js +1 -456
  223. package/dist/knowledge/progress-context.js +1 -452
  224. package/dist/knowledge/progress-ledger.js +1 -330
  225. package/dist/knowledge/progress-puzzle.js +1 -219
  226. package/dist/knowledge/progress-risk.js +1 -461
  227. package/dist/knowledge/progress-templates.js +1 -228
  228. package/dist/knowledge/progress-translation.js +1 -405
  229. package/dist/knowledge/proof-confirm.js +1 -187
  230. package/dist/knowledge/proof-context.d.ts +17 -0
  231. package/dist/knowledge/proof-context.js +1 -0
  232. package/dist/knowledge/proof-ledger.d.ts +34 -0
  233. package/dist/knowledge/proof-ledger.js +1 -0
  234. package/dist/knowledge/proof-puzzle.d.ts +35 -0
  235. package/dist/knowledge/proof-puzzle.js +1 -0
  236. package/dist/knowledge/proof-risk.js +1 -207
  237. package/dist/knowledge/proof-templates.d.ts +22 -0
  238. package/dist/knowledge/proof-templates.js +1 -0
  239. package/dist/knowledge/proof-translation.js +1 -283
  240. package/dist/knowledge/registrar-confirm.d.ts +26 -0
  241. package/dist/knowledge/registrar-confirm.js +1 -0
  242. package/dist/knowledge/registrar-risk.js +1 -217
  243. package/dist/knowledge/registrar-translation.d.ts +37 -0
  244. package/dist/knowledge/registrar-translation.js +1 -0
  245. package/dist/knowledge/repository-confirm.js +1 -286
  246. package/dist/knowledge/repository-context.d.ts +12 -0
  247. package/dist/knowledge/repository-context.js +1 -0
  248. package/dist/knowledge/repository-ledger.d.ts +25 -0
  249. package/dist/knowledge/repository-ledger.js +1 -0
  250. package/dist/knowledge/repository-puzzle.d.ts +30 -0
  251. package/dist/knowledge/repository-puzzle.js +1 -0
  252. package/dist/knowledge/repository-risk.js +1 -373
  253. package/dist/knowledge/repository-templates.d.ts +14 -0
  254. package/dist/knowledge/repository-templates.js +1 -0
  255. package/dist/knowledge/repository-translation.js +1 -445
  256. package/dist/knowledge/reputation-rules.js +1 -99
  257. package/dist/knowledge/resource-confirm.d.ts +25 -0
  258. package/dist/knowledge/resource-confirm.js +1 -0
  259. package/dist/knowledge/resource-risk.js +1 -157
  260. package/dist/knowledge/resource-translation.d.ts +37 -0
  261. package/dist/knowledge/resource-translation.js +1 -0
  262. package/dist/knowledge/reward-confirm.js +1 -526
  263. package/dist/knowledge/reward-context.d.ts +2 -2
  264. package/dist/knowledge/reward-context.js +1 -504
  265. package/dist/knowledge/reward-ledger.js +1 -502
  266. package/dist/knowledge/reward-puzzle.js +1 -300
  267. package/dist/knowledge/reward-risk.js +1 -627
  268. package/dist/knowledge/reward-templates.js +1 -197
  269. package/dist/knowledge/reward-translation.js +1 -501
  270. package/dist/knowledge/safety-rules.d.ts +1 -0
  271. package/dist/knowledge/safety-rules.js +1 -404
  272. package/dist/knowledge/scenario-modes.js +1 -321
  273. package/dist/knowledge/service-confirm.js +1 -807
  274. package/dist/knowledge/service-context.js +1 -403
  275. package/dist/knowledge/service-ledger.js +1 -609
  276. package/dist/knowledge/service-puzzle.js +1 -236
  277. package/dist/knowledge/service-risk.d.ts +1 -1
  278. package/dist/knowledge/service-risk.js +1 -651
  279. package/dist/knowledge/service-templates.js +1 -456
  280. package/dist/knowledge/service-translation.js +1 -622
  281. package/dist/knowledge/template-registry.js +1 -353
  282. package/dist/knowledge/tool-constraints.js +1 -195
  283. package/dist/knowledge/tools-reference.js +1 -178
  284. package/dist/knowledge/treasury-confirm.js +1 -512
  285. package/dist/knowledge/treasury-context.js +1 -363
  286. package/dist/knowledge/treasury-ledger.js +1 -300
  287. package/dist/knowledge/treasury-puzzle.js +1 -216
  288. package/dist/knowledge/treasury-risk.js +1 -440
  289. package/dist/knowledge/treasury-templates.js +1 -358
  290. package/dist/knowledge/treasury-translation.js +1 -498
  291. package/dist/knowledge/trust-metrics.js +1 -198
  292. package/dist/knowledge/universal-template.d.ts +22 -0
  293. package/dist/knowledge/universal-template.js +1 -0
  294. package/dist/knowledge/util-confirm.d.ts +24 -0
  295. package/dist/knowledge/util-confirm.js +1 -0
  296. package/dist/knowledge/util-risk.js +1 -135
  297. package/dist/knowledge/util-translation.d.ts +38 -0
  298. package/dist/knowledge/util-translation.js +1 -0
  299. package/dist/knowledge/workflow-guidance.d.ts +116 -0
  300. package/dist/knowledge/workflow-guidance.js +1 -0
  301. package/dist/loop-engineering/aggregate.js +1 -132
  302. package/dist/loop-engineering/context-collect.js +1 -83
  303. package/dist/loop-engineering/diagnose.js +1 -273
  304. package/dist/loop-engineering/improve.js +1 -405
  305. package/dist/loop-engineering/index.js +1 -4
  306. package/dist/loop-engineering/pipeline.js +1 -56
  307. package/dist/mode-market/index.js +1 -3
  308. package/dist/mode-market/registry.js +1 -124
  309. package/dist/mode-market/review.js +1 -214
  310. package/dist/mode-market/submission.js +1 -85
  311. package/dist/participation/collaborator-interest.d.ts +23 -0
  312. package/dist/participation/collaborator-interest.js +1 -0
  313. package/dist/participation/customer-interest.d.ts +25 -0
  314. package/dist/participation/customer-interest.js +1 -0
  315. package/dist/participation/employee-kpi.d.ts +25 -0
  316. package/dist/participation/employee-kpi.js +1 -0
  317. package/dist/participation/employee-store.d.ts +16 -0
  318. package/dist/participation/employee-store.js +1 -0
  319. package/dist/participation/index.d.ts +2 -0
  320. package/dist/participation/index.js +1 -0
  321. package/dist/participation/merchant-interest.js +1 -100
  322. package/dist/participation/radar-core.d.ts +13 -3
  323. package/dist/participation/radar-core.js +1 -269
  324. package/dist/participation/supplier-interest.d.ts +25 -0
  325. package/dist/participation/supplier-interest.js +1 -0
  326. package/dist/persona/analyzer.js +1 -66
  327. package/dist/persona/bridge.js +1 -86
  328. package/dist/persona/defaults.js +1 -195
  329. package/dist/persona/experience-bridge.js +1 -23
  330. package/dist/persona/index.d.ts +9 -2
  331. package/dist/persona/index.js +1 -71
  332. package/dist/persona/local-region.d.ts +20 -0
  333. package/dist/persona/local-region.js +1 -0
  334. package/dist/persona/model.js +1 -111
  335. package/dist/persona/overrides.d.ts +10 -0
  336. package/dist/persona/overrides.js +1 -0
  337. package/dist/persona/pack-personae.d.ts +11 -0
  338. package/dist/persona/pack-personae.js +1 -0
  339. package/dist/persona/store.js +1 -62
  340. package/dist/persona/strategy-intent.d.ts +20 -0
  341. package/dist/persona/strategy-intent.js +1 -0
  342. package/dist/persona/types.d.ts +6 -2
  343. package/dist/persona/types.js +1 -5
  344. package/dist/project/business-puzzle.d.ts +1 -1
  345. package/dist/project/business-puzzle.js +1 -383
  346. package/dist/project/context-assembly.js +1 -254
  347. package/dist/project/deployment-bridge.js +1 -120
  348. package/dist/project/deployment-doc.js +1 -1126
  349. package/dist/project/edit-planner.js +1 -1342
  350. package/dist/project/evaluation.d.ts +37 -1
  351. package/dist/project/evaluation.js +1 -2011
  352. package/dist/project/game-theory.js +1 -177
  353. package/dist/project/graph-builder.js +1 -656
  354. package/dist/project/graph.d.ts +3 -6
  355. package/dist/project/graph.js +1 -340
  356. package/dist/project/handlers.d.ts +33 -2
  357. package/dist/project/handlers.js +1 -1784
  358. package/dist/project/index.d.ts +2 -0
  359. package/dist/project/index.js +1 -301
  360. package/dist/project/intent-analyzer.js +1 -149
  361. package/dist/project/machine-nodes.js +1 -36
  362. package/dist/project/merchant-guide.d.ts +19 -0
  363. package/dist/project/merchant-guide.js +1 -264
  364. package/dist/project/migration.js +1 -125
  365. package/dist/project/mode-actions.js +1 -309
  366. package/dist/project/namespace.js +1 -206
  367. package/dist/project/participation-radar.js +1 -428
  368. package/dist/project/pipeline-actions.js +1 -109
  369. package/dist/project/project-store.js +1 -422
  370. package/dist/project/query.js +1 -153
  371. package/dist/project/reverse-mapping.d.ts +34 -0
  372. package/dist/project/reverse-mapping.js +1 -0
  373. package/dist/project/risk-aggregator.js +1 -295
  374. package/dist/project/rollback-policy.js +1 -290
  375. package/dist/project/semantic-assembler.js +1 -345
  376. package/dist/project/semantic-graph.d.ts +3 -5
  377. package/dist/project/semantic-graph.js +1 -292
  378. package/dist/project/stage-gate.js +1 -369
  379. package/dist/project/substep-trace.js +1 -332
  380. package/dist/project/task-tracker.js +1 -78
  381. package/dist/project/workflow-design-assessment.d.ts +24 -0
  382. package/dist/project/workflow-design-assessment.js +1 -0
  383. package/dist/role/derivation.d.ts +18 -0
  384. package/dist/role/derivation.js +1 -0
  385. package/dist/role/index.d.ts +5 -0
  386. package/dist/role/index.js +1 -0
  387. package/dist/role/model.d.ts +8 -0
  388. package/dist/role/model.js +1 -0
  389. package/dist/role/resolution.d.ts +11 -0
  390. package/dist/role/resolution.js +1 -0
  391. package/dist/role/types.d.ts +11 -0
  392. package/dist/role/types.js +1 -0
  393. package/dist/rules.js +1 -52
  394. package/dist/safety/confirm-gate.d.ts +1 -1
  395. package/dist/safety/confirm-gate.js +1 -88
  396. package/dist/safety/index.js +1 -3
  397. package/dist/safety/preview.js +1 -52
  398. package/dist/schema/call/allocation.d.ts +186 -1385
  399. package/dist/schema/call/allocation.js +1 -34
  400. package/dist/schema/call/arbitration.d.ts +272 -1871
  401. package/dist/schema/call/arbitration.js +1 -113
  402. package/dist/schema/call/base.d.ts +1831 -9076
  403. package/dist/schema/call/base.js +1 -370
  404. package/dist/schema/call/bridge.d.ts +911 -3171
  405. package/dist/schema/call/bridge.js +1 -458
  406. package/dist/schema/call/contact.d.ts +135 -931
  407. package/dist/schema/call/contact.js +1 -37
  408. package/dist/schema/call/demand.d.ts +164 -1194
  409. package/dist/schema/call/demand.js +1 -47
  410. package/dist/schema/call/guard.d.ts +298 -1140
  411. package/dist/schema/call/guard.js +1 -161
  412. package/dist/schema/call/handler.js +1 -322
  413. package/dist/schema/call/index.js +1 -20
  414. package/dist/schema/call/machine.d.ts +459 -5403
  415. package/dist/schema/call/machine.js +1 -193
  416. package/dist/schema/call/order.d.ts +137 -844
  417. package/dist/schema/call/order.js +1 -35
  418. package/dist/schema/call/payment.d.ts +74 -561
  419. package/dist/schema/call/payment.js +1 -37
  420. package/dist/schema/call/permission-handler.js +1 -54
  421. package/dist/schema/call/permission.d.ts +335 -2791
  422. package/dist/schema/call/permission.js +1 -105
  423. package/dist/schema/call/personal.d.ts +227 -1814
  424. package/dist/schema/call/personal.js +1 -78
  425. package/dist/schema/call/progress.d.ts +140 -843
  426. package/dist/schema/call/progress.js +1 -47
  427. package/dist/schema/call/proof.d.ts +42 -258
  428. package/dist/schema/call/proof.js +1 -33
  429. package/dist/schema/call/repository.d.ts +324 -2222
  430. package/dist/schema/call/repository.js +1 -77
  431. package/dist/schema/call/reward.d.ts +153 -1183
  432. package/dist/schema/call/reward.js +1 -30
  433. package/dist/schema/call/semantic.js +1 -1679
  434. package/dist/schema/call/service.d.ts +376 -3431
  435. package/dist/schema/call/service.js +1 -184
  436. package/dist/schema/call/treasury.d.ts +252 -2158
  437. package/dist/schema/call/treasury.js +1 -71
  438. package/dist/schema/common/index.d.ts +222 -697
  439. package/dist/schema/common/index.js +1 -407
  440. package/dist/schema/config/index.d.ts +18 -161
  441. package/dist/schema/config/index.js +1 -68
  442. package/dist/schema/employee/index.d.ts +99 -0
  443. package/dist/schema/employee/index.js +1 -0
  444. package/dist/schema/evaluation/index.d.ts +1062 -3748
  445. package/dist/schema/evaluation/index.js +1 -356
  446. package/dist/schema/index.d.ts +3 -0
  447. package/dist/schema/index.js +1 -17
  448. package/dist/schema/industry-pack/index.d.ts +132 -0
  449. package/dist/schema/industry-pack/index.js +1 -0
  450. package/dist/schema/intent-radar/index.d.ts +92 -245
  451. package/dist/schema/intent-radar/index.js +1 -89
  452. package/dist/schema/local/index.d.ts +2045 -18080
  453. package/dist/schema/local/index.js +1 -927
  454. package/dist/schema/local/wip.d.ts +61 -651
  455. package/dist/schema/local/wip.js +1 -187
  456. package/dist/schema/messenger/index.d.ts +949 -5557
  457. package/dist/schema/messenger/index.js +1 -475
  458. package/dist/schema/operations.d.ts +2969 -26518
  459. package/dist/schema/operations.js +1 -520
  460. package/dist/schema/persona/index.d.ts +469 -1820
  461. package/dist/schema/persona/index.js +1 -148
  462. package/dist/schema/project/index.d.ts +1027 -8408
  463. package/dist/schema/project/index.js +1 -2057
  464. package/dist/schema/query/index.d.ts +12041 -75261
  465. package/dist/schema/query/index.js +1 -1646
  466. package/dist/schema/schema-query/index.d.ts +35 -98
  467. package/dist/schema/schema-query/index.js +1 -104
  468. package/dist/schema/schema-version.js +1 -76
  469. package/dist/schema/task-status.d.ts +26 -132
  470. package/dist/schema/task-status.js +1 -36
  471. package/dist/schema/trust/index.d.ts +194 -1290
  472. package/dist/schema/trust/index.js +1 -314
  473. package/dist/schema/utils/guard-parser.js +1 -419
  474. package/dist/schema/utils/guard-query-utils.js +1 -46
  475. package/dist/schema/utils/node-parser.js +1 -369
  476. package/dist/schema/utils/object-type-utils.js +1 -35
  477. package/dist/schema/utils/permission-index-utils.js +1 -7
  478. package/dist/schema/utils/permission-machine-check.js +1 -121
  479. package/dist/schema/utils/skills-recommendation.d.ts +1 -0
  480. package/dist/schema/utils/skills-recommendation.js +1 -77
  481. package/dist/schema/workspace/index.d.ts +69 -0
  482. package/dist/schema/workspace/index.js +1 -0
  483. package/dist/schema-query-impl/index.js +1 -0
  484. package/dist/schemas/account_operation.output.json +3147 -1652
  485. package/dist/schemas/account_operation.schema.json +225 -218
  486. package/dist/schemas/bridge_operation.output.json +1168 -650
  487. package/dist/schemas/bridge_operation.schema.json +736 -504
  488. package/dist/schemas/config_operation.output.json +185 -179
  489. package/dist/schemas/config_operation.schema.json +21 -26
  490. package/dist/schemas/employee_operation.output.json +207 -0
  491. package/dist/schemas/employee_operation.schema.json +176 -0
  492. package/dist/schemas/evaluation_operation.output.json +2329 -557
  493. package/dist/schemas/evaluation_operation.schema.json +2939 -720
  494. package/dist/schemas/guard2file.output.json +58 -64
  495. package/dist/schemas/guard2file.schema.json +79 -81
  496. package/dist/schemas/index.json +29 -11
  497. package/dist/schemas/industry_pack_operation.output.json +594 -0
  498. package/dist/schemas/industry_pack_operation.schema.json +55 -0
  499. package/dist/schemas/intent_radar.output.json +275 -200
  500. package/dist/schemas/intent_radar.schema.json +124 -123
  501. package/dist/schemas/local_info_operation.output.json +1174 -657
  502. package/dist/schemas/local_info_operation.schema.json +119 -125
  503. package/dist/schemas/local_mark_operation.output.json +1239 -689
  504. package/dist/schemas/local_mark_operation.schema.json +91 -96
  505. package/dist/schemas/machineNode2file.output.json +63 -69
  506. package/dist/schemas/machineNode2file.schema.json +79 -81
  507. package/dist/schemas/messenger_operation.output.json +2722 -1528
  508. package/dist/schemas/messenger_operation.schema.json +1482 -1264
  509. package/dist/schemas/onchain_events.output.json +2590 -975
  510. package/dist/schemas/onchain_events.schema.json +117 -99
  511. package/dist/schemas/onchain_operations.output.json +3957 -2309
  512. package/dist/schemas/onchain_operations.schema.json +20799 -9285
  513. package/dist/schemas/onchain_operations_allocation.schema.json +172 -108
  514. package/dist/schemas/onchain_operations_arbitration.schema.json +233 -146
  515. package/dist/schemas/onchain_operations_contact.schema.json +129 -90
  516. package/dist/schemas/onchain_operations_demand.schema.json +170 -112
  517. package/dist/schemas/onchain_operations_gen_passport.schema.json +61 -646
  518. package/dist/schemas/onchain_operations_gen_proof.schema.json +40 -172
  519. package/dist/schemas/onchain_operations_guard.schema.json +3765 -294
  520. package/dist/schemas/onchain_operations_machine.schema.json +537 -164
  521. package/dist/schemas/onchain_operations_order.schema.json +126 -96
  522. package/dist/schemas/onchain_operations_payment.schema.json +82 -67
  523. package/dist/schemas/onchain_operations_permission.schema.json +331 -93
  524. package/dist/schemas/onchain_operations_personal.schema.json +636 -96
  525. package/dist/schemas/onchain_operations_progress.schema.json +125 -92
  526. package/dist/schemas/onchain_operations_proof.schema.json +76 -69
  527. package/dist/schemas/onchain_operations_repository.schema.json +636 -249
  528. package/dist/schemas/onchain_operations_reward.schema.json +218 -108
  529. package/dist/schemas/onchain_operations_service.schema.json +679 -221
  530. package/dist/schemas/onchain_operations_treasury.schema.json +401 -135
  531. package/dist/schemas/onchain_table_data.output.json +6018 -2430
  532. package/dist/schemas/onchain_table_data.schema.json +544 -430
  533. package/dist/schemas/persona_operation.output.json +1568 -265
  534. package/dist/schemas/persona_operation.schema.json +346 -202
  535. package/dist/schemas/project_operation.output.json +6957 -5147
  536. package/dist/schemas/project_operation.schema.json +1050 -1020
  537. package/dist/schemas/query_task_status.output.json +195 -99
  538. package/dist/schemas/query_task_status.schema.json +12 -18
  539. package/dist/schemas/query_toolkit.output.json +18870 -14566
  540. package/dist/schemas/query_toolkit.schema.json +614 -522
  541. package/dist/schemas/schema_query.output.json +127 -129
  542. package/dist/schemas/schema_query.schema.json +64 -69
  543. package/dist/schemas/trust_score.output.json +678 -587
  544. package/dist/schemas/trust_score.schema.json +289 -277
  545. package/dist/schemas/wip_file.output.json +116 -124
  546. package/dist/schemas/wip_file.schema.json +142 -143
  547. package/dist/schemas/workspace_operation.output.json +277 -0
  548. package/dist/schemas/workspace_operation.schema.json +45 -0
  549. package/dist/schemas/wowok_buildin_info.output.json +1693 -723
  550. package/dist/schemas/wowok_buildin_info.schema.json +576 -512
  551. package/dist/telemetry/index.js +1 -112
  552. package/dist/telemetry/redact.js +1 -23
  553. package/dist/telemetry/storage.js +1 -80
  554. package/dist/tools/handlers/bridge.d.ts +8 -1
  555. package/dist/tools/handlers/bridge.js +1 -1
  556. package/dist/tools/handlers/config.js +1 -74
  557. package/dist/tools/handlers/employee.d.ts +2 -0
  558. package/dist/tools/handlers/employee.js +1 -0
  559. package/dist/tools/handlers/evaluation.js +1 -123
  560. package/dist/tools/handlers/file-export.js +1 -90
  561. package/dist/tools/handlers/industry-pack.d.ts +2 -0
  562. package/dist/tools/handlers/industry-pack.js +1 -0
  563. package/dist/tools/handlers/intent-radar.js +1 -76
  564. package/dist/tools/handlers/local.js +1 -53
  565. package/dist/tools/handlers/messenger.js +1 -188
  566. package/dist/tools/handlers/onchain.js +1 -1180
  567. package/dist/tools/handlers/persona.js +1 -89
  568. package/dist/tools/handlers/project.js +1 -211
  569. package/dist/tools/handlers/query.js +1 -434
  570. package/dist/tools/handlers/schema-query.js +1 -176
  571. package/dist/tools/handlers/task-status.js +1 -26
  572. package/dist/tools/handlers/trust.js +1 -380
  573. package/dist/tools/handlers/wip.js +1 -90
  574. package/dist/tools/handlers/workspace.d.ts +2 -0
  575. package/dist/tools/handlers/workspace.js +1 -0
  576. package/dist/tools/index.d.ts +2 -1
  577. package/dist/tools/index.js +1 -1382
  578. package/dist/tools/retry.js +1 -85
  579. package/dist/tools/rules-hook.d.ts +1 -1
  580. package/dist/tools/rules-hook.js +1 -23
  581. package/dist/tools/shared.d.ts +1 -1
  582. package/dist/tools/shared.js +1 -130
  583. package/dist/tools/types.d.ts +2 -1
  584. package/dist/tools/types.js +1 -1
  585. package/dist/tools/upgrade-check.d.ts +19 -0
  586. package/dist/tools/upgrade-check.js +1 -0
  587. package/dist/tools/wip-deploy-assist.js +1 -306
  588. package/dist/tools/wrap.js +1 -500
  589. package/package.json +7 -6
  590. package/dist/knowledge/arbitration-trust.d.ts +0 -24
  591. package/dist/knowledge/arbitration-trust.js +0 -117
  592. package/dist/schema/call/bridge-handler.d.ts +0 -8
  593. package/dist/schema/call/bridge-handler.js +0 -265
  594. package/dist/schema/sync-layer4.d.ts +0 -21
  595. package/dist/schema/sync-layer4.js +0 -286
  596. package/dist/schema-query/index.js +0 -810
  597. /package/dist/{schema-query → schema-query-impl}/index.d.ts +0 -0
@@ -1,814 +1,1332 @@
1
1
  {
2
2
  "$schema": "http://json-schema.org/draft-07/schema#",
3
- "$id": "https://wowok.net/schemas/bridge_operation.json",
3
+ "$id": "https://wowok.net/schemas/bridge_operation.output.json",
4
4
  "title": "Bridge - Cross-Chain Operations",
5
- "description": "Simplified cross-chain bridge between WOW and EVM (Ethereum mainnet). Operations: cross_chain_wow_to_evm, cross_chain_evm_to_wow, withdraw, query_active_evm_account, query_supported_evm_chains, query_supported_tokens, query_transfer_list, query_transfer_status, manage_evm_rpc. Global single activeEvmAccount auto-generated on first use. Use schema_query (name='bridge_operation') for exact field structures.",
6
- "$ref": "#/definitions/bridge_operation",
7
- "definitions": {
8
- "bridge_operation": {
9
- "type": "object",
10
- "properties": {
11
- "message": {
12
- "type": "string",
13
- "description": "Result summary or hint message"
14
- },
15
- "result": {
16
- "anyOf": [
17
- {
18
- "type": "object",
19
- "properties": {
20
- "type": {
21
- "type": "string",
22
- "const": "data"
23
- },
24
- "data": {
25
- "description": "Operation result data (structure varies by operation_type)"
26
- }
27
- },
28
- "required": [
29
- "type"
30
- ],
31
- "additionalProperties": false,
32
- "description": "Successful result"
5
+ "description": "Bridge operation output (matches CallOutput structure returned by the handler)",
6
+ "type": "object",
7
+ "properties": {
8
+ "message": {
9
+ "description": "Result summary or hint message",
10
+ "type": "string"
11
+ },
12
+ "result": {
13
+ "oneOf": [
14
+ {
15
+ "type": "object",
16
+ "properties": {
17
+ "type": {
18
+ "type": "string",
19
+ "const": "data"
33
20
  },
34
- {
35
- "type": "object",
36
- "properties": {
37
- "type": {
38
- "type": "string",
39
- "const": "error"
40
- },
41
- "error": {
42
- "type": "string",
43
- "description": "Error message"
44
- },
45
- "error_code": {
46
- "type": "string",
47
- "enum": [
48
- "invalid_parameter",
49
- "guard_rejected",
50
- "state_conflict",
51
- "insufficient_balance",
52
- "object_not_found",
53
- "permission_denied",
54
- "immutable_violation",
55
- "network_error",
56
- "rate_limit",
57
- "gas_exceeded",
58
- "bcs_error",
59
- "signature_error",
60
- "config_error",
61
- "wip_verification_failed",
62
- "unknown"
63
- ],
64
- "description": "Error classification for programmatic recovery"
65
- },
66
- "retryable": {
67
- "type": "boolean",
68
- "description": "Whether the operation can be retried as-is"
69
- },
70
- "recovery_hint": {
71
- "type": "string",
72
- "description": "Recovery suggestion for AI or user"
73
- }
74
- },
75
- "required": [
76
- "type",
77
- "error"
78
- ],
79
- "additionalProperties": false,
80
- "description": "Error result"
21
+ "data": {
22
+ "description": "Operation result data (structure varies by operation_type)"
81
23
  }
24
+ },
25
+ "required": [
26
+ "type",
27
+ "data"
82
28
  ],
83
- "description": "Bridge operation result (data or error)"
29
+ "additionalProperties": false,
30
+ "description": "Successful result"
84
31
  },
85
- "semantic": {
32
+ {
86
33
  "type": "object",
87
34
  "properties": {
88
- "intent": {
35
+ "type": {
89
36
  "type": "string",
90
- "description": "Inferred user intent / operation goal. Constraint: snake_case string. Relation: derived from operation_type + data signals. Example: 'publish_service'"
37
+ "const": "error"
91
38
  },
92
- "status": {
39
+ "error": {
93
40
  "type": "string",
94
- "enum": [
95
- "success",
96
- "partial",
97
- "failed",
98
- "pending_input"
99
- ],
100
- "description": "Business-level status (not raw tx status). 'pending_input' = needs Guard submission. Example: 'success'"
41
+ "description": "Error message"
101
42
  },
102
- "summary": {
43
+ "error_code": {
44
+ "description": "Error classification for programmatic recovery",
103
45
  "type": "string",
104
- "description": "One-sentence human-readable summary of what happened. AI should read this first. Example: 'Successfully published Service my-shop with Machine bound'"
46
+ "enum": [
47
+ "invalid_parameter",
48
+ "guard_rejected",
49
+ "state_conflict",
50
+ "insufficient_balance",
51
+ "object_not_found",
52
+ "permission_denied",
53
+ "immutable_violation",
54
+ "network_error",
55
+ "rate_limit",
56
+ "gas_exceeded",
57
+ "bcs_error",
58
+ "signature_error",
59
+ "config_error",
60
+ "wip_verification_failed",
61
+ "unknown"
62
+ ]
105
63
  },
106
- "created": {
107
- "type": "array",
108
- "items": {
64
+ "retryable": {
65
+ "description": "Whether the operation can be retried as-is",
66
+ "type": "boolean"
67
+ },
68
+ "recovery_hint": {
69
+ "description": "Recovery suggestion for AI or user",
70
+ "type": "string"
71
+ }
72
+ },
73
+ "required": [
74
+ "type",
75
+ "error"
76
+ ],
77
+ "additionalProperties": false,
78
+ "description": "Error result"
79
+ }
80
+ ],
81
+ "description": "Bridge operation result (data or error)"
82
+ },
83
+ "semantic": {
84
+ "description": "Business semantic summary for bridge operation",
85
+ "type": "object",
86
+ "properties": {
87
+ "intent": {
88
+ "type": "string",
89
+ "description": "Inferred user intent / operation goal. Constraint: snake_case string. Relation: derived from operation_type + data signals. Example: 'publish_service'"
90
+ },
91
+ "status": {
92
+ "type": "string",
93
+ "enum": [
94
+ "success",
95
+ "partial",
96
+ "failed",
97
+ "pending_input"
98
+ ],
99
+ "description": "Business-level status (not raw tx status). 'pending_input' = needs Guard submission. Example: 'success'"
100
+ },
101
+ "summary": {
102
+ "type": "string",
103
+ "description": "One-sentence human-readable summary of what happened. AI should read this first. Example: 'Successfully published Service my-shop with Machine bound'"
104
+ },
105
+ "created": {
106
+ "description": "Objects newly created in this operation, tagged with roles",
107
+ "type": "array",
108
+ "items": {
109
+ "type": "object",
110
+ "properties": {
111
+ "id": {
112
+ "type": "string",
113
+ "description": "Object ID (64-hex with 0x prefix). Identifies the on-chain object. Example: '0xa1d4...'"
114
+ },
115
+ "name": {
116
+ "description": "Local mark name if assigned, else null. Relation: resolved via local_mark_operation. Example: 'my-shop' or null",
117
+ "anyOf": [
118
+ {
119
+ "type": "string"
120
+ },
121
+ {
122
+ "type": "null"
123
+ }
124
+ ]
125
+ },
126
+ "role": {
127
+ "type": "string",
128
+ "enum": [
129
+ "Permission",
130
+ "Guard",
131
+ "Machine",
132
+ "Progress",
133
+ "Service",
134
+ "Order",
135
+ "Allocation",
136
+ "Arbitration",
137
+ "ArbCase",
138
+ "Messenger",
139
+ "Contact",
140
+ "Demand",
141
+ "Reward",
142
+ "Personal",
143
+ "Repository",
144
+ "Treasury",
145
+ "Discount",
146
+ "Payment",
147
+ "Passport",
148
+ "Proof",
149
+ "Other"
150
+ ],
151
+ "description": "Business role of the object in the dependency graph. Constraint: enum of 21 values. Relation: derived from objectType last segment; drives Plan/Verify Loop positioning. Example: 'Service'"
152
+ },
153
+ "relation": {
154
+ "description": "Relationship to another object in the dependency graph",
109
155
  "type": "object",
110
156
  "properties": {
111
- "id": {
112
- "type": "string",
113
- "description": "Object ID (64-hex with 0x prefix). Identifies the on-chain object. Example: '0xa1d4...'"
114
- },
115
- "name": {
116
- "type": [
117
- "string",
118
- "null"
119
- ],
120
- "description": "Local mark name if assigned, else null. Relation: resolved via local_mark_operation. Example: 'my-shop' or null"
121
- },
122
- "role": {
123
- "type": "string",
124
- "enum": [
125
- "Permission",
126
- "Guard",
127
- "Machine",
128
- "Progress",
129
- "Service",
130
- "Order",
131
- "Allocation",
132
- "Arbitration",
133
- "ArbCase",
134
- "Messenger",
135
- "Contact",
136
- "Demand",
137
- "Reward",
138
- "Personal",
139
- "Repository",
140
- "Treasury",
141
- "Discount",
142
- "Other"
143
- ],
144
- "description": "Business role of the object in the dependency graph. Constraint: enum of 18 values. Relation: derived from objectType last segment; drives Plan/Verify Loop positioning. Example: 'Service'"
145
- },
146
- "relation": {
147
- "type": "object",
148
- "properties": {
149
- "parent": {
150
- "type": [
151
- "string",
152
- "null"
153
- ],
154
- "description": "Parent object ID, if this object belongs to another (e.g. Machine belongs to Service). Example: '0x123...' or null"
157
+ "parent": {
158
+ "description": "Parent object ID, if this object belongs to another (e.g. Machine belongs to Service). Example: '0x123...' or null",
159
+ "anyOf": [
160
+ {
161
+ "type": "string"
155
162
  },
156
- "relation_type": {
157
- "type": "string",
158
- "enum": [
159
- "machine_of",
160
- "guard_of",
161
- "allocator_of",
162
- "permission_of",
163
- "progress_of",
164
- "allocation_of",
165
- "arb_of",
166
- "other"
167
- ],
168
- "description": "How this object relates to its parent. Example: 'machine_of'"
163
+ {
164
+ "type": "null"
169
165
  }
170
- },
171
- "additionalProperties": false,
172
- "description": "Relationship to another object in the dependency graph"
166
+ ]
173
167
  },
174
- "immutable": {
175
- "type": "boolean",
176
- "description": "Whether the object has entered an immutable state (e.g. Service published). Constraint: true after publish. Example: true"
168
+ "relation_type": {
169
+ "description": "How this object relates to its parent. Example: 'machine_of'",
170
+ "type": "string",
171
+ "enum": [
172
+ "machine_of",
173
+ "guard_of",
174
+ "allocator_of",
175
+ "permission_of",
176
+ "progress_of",
177
+ "allocation_of",
178
+ "arb_of",
179
+ "other"
180
+ ]
177
181
  }
178
182
  },
179
- "required": [
180
- "id",
181
- "role"
182
- ],
183
- "additionalProperties": false,
184
- "description": "An object tagged with its business role and relationship within the object dependency graph"
183
+ "additionalProperties": false
185
184
  },
186
- "description": "Objects newly created in this operation, tagged with roles"
185
+ "immutable": {
186
+ "description": "Whether the object has entered an immutable state (e.g. Service published). Constraint: true after publish. Example: true",
187
+ "type": "boolean"
188
+ }
187
189
  },
188
- "modified": {
189
- "type": "array",
190
- "items": {
191
- "$ref": "#/definitions/bridge_operation/properties/semantic/properties/created/items"
190
+ "required": [
191
+ "id",
192
+ "role"
193
+ ],
194
+ "additionalProperties": false,
195
+ "description": "An object tagged with its business role and relationship within the object dependency graph"
196
+ }
197
+ },
198
+ "modified": {
199
+ "description": "Objects mutated in this operation, tagged with roles",
200
+ "type": "array",
201
+ "items": {
202
+ "type": "object",
203
+ "properties": {
204
+ "id": {
205
+ "type": "string",
206
+ "description": "Object ID (64-hex with 0x prefix). Identifies the on-chain object. Example: '0xa1d4...'"
192
207
  },
193
- "description": "Objects mutated in this operation, tagged with roles"
194
- },
195
- "released": {
196
- "type": "array",
197
- "items": {
208
+ "name": {
209
+ "description": "Local mark name if assigned, else null. Relation: resolved via local_mark_operation. Example: 'my-shop' or null",
210
+ "anyOf": [
211
+ {
212
+ "type": "string"
213
+ },
214
+ {
215
+ "type": "null"
216
+ }
217
+ ]
218
+ },
219
+ "role": {
220
+ "type": "string",
221
+ "enum": [
222
+ "Permission",
223
+ "Guard",
224
+ "Machine",
225
+ "Progress",
226
+ "Service",
227
+ "Order",
228
+ "Allocation",
229
+ "Arbitration",
230
+ "ArbCase",
231
+ "Messenger",
232
+ "Contact",
233
+ "Demand",
234
+ "Reward",
235
+ "Personal",
236
+ "Repository",
237
+ "Treasury",
238
+ "Discount",
239
+ "Payment",
240
+ "Passport",
241
+ "Proof",
242
+ "Other"
243
+ ],
244
+ "description": "Business role of the object in the dependency graph. Constraint: enum of 21 values. Relation: derived from objectType last segment; drives Plan/Verify Loop positioning. Example: 'Service'"
245
+ },
246
+ "relation": {
247
+ "description": "Relationship to another object in the dependency graph",
198
248
  "type": "object",
199
249
  "properties": {
200
- "amount": {
201
- "type": "string",
202
- "description": "Amount change as stringified integer (smallest unit). Negative=spend, positive=receive. Example: '-10000000000'"
203
- },
204
- "coinType": {
205
- "type": "string",
206
- "description": "Coin type tag (format: {address}::{module}::{struct}). Example: '0x2::wow::WOW'"
250
+ "parent": {
251
+ "description": "Parent object ID, if this object belongs to another (e.g. Machine belongs to Service). Example: '0x123...' or null",
252
+ "anyOf": [
253
+ {
254
+ "type": "string"
255
+ },
256
+ {
257
+ "type": "null"
258
+ }
259
+ ]
207
260
  },
208
- "role": {
261
+ "relation_type": {
262
+ "description": "How this object relates to its parent. Example: 'machine_of'",
209
263
  "type": "string",
210
264
  "enum": [
211
- "payment",
212
- "refund",
213
- "change",
214
- "compensation",
215
- "reward",
216
- "gas",
217
- "deposit",
218
- "release",
265
+ "machine_of",
266
+ "guard_of",
267
+ "allocator_of",
268
+ "permission_of",
269
+ "progress_of",
270
+ "allocation_of",
271
+ "arb_of",
219
272
  "other"
220
- ],
221
- "description": "Business role of this fund movement. Constraint: enum of 9 values. Relation: derived from operation context. Example: 'payment'"
273
+ ]
274
+ }
275
+ },
276
+ "additionalProperties": false
277
+ },
278
+ "immutable": {
279
+ "description": "Whether the object has entered an immutable state (e.g. Service published). Constraint: true after publish. Example: true",
280
+ "type": "boolean"
281
+ }
282
+ },
283
+ "required": [
284
+ "id",
285
+ "role"
286
+ ],
287
+ "additionalProperties": false,
288
+ "description": "An object tagged with its business role and relationship within the object dependency graph"
289
+ }
290
+ },
291
+ "released": {
292
+ "description": "Fund movements in this operation, tagged with roles",
293
+ "type": "array",
294
+ "items": {
295
+ "type": "object",
296
+ "properties": {
297
+ "amount": {
298
+ "type": "string",
299
+ "description": "Amount change as stringified integer (smallest unit). Negative=spend, positive=receive. Example: '-10000000000'"
300
+ },
301
+ "coinType": {
302
+ "type": "string",
303
+ "description": "Coin type tag (format: {address}::{module}::{struct}). Example: '0x2::wow::WOW'"
304
+ },
305
+ "role": {
306
+ "type": "string",
307
+ "enum": [
308
+ "payment",
309
+ "refund",
310
+ "change",
311
+ "compensation",
312
+ "reward",
313
+ "gas",
314
+ "deposit",
315
+ "release",
316
+ "other"
317
+ ],
318
+ "description": "Business role of this fund movement. Constraint: enum of 9 values. Relation: derived from operation context. Example: 'payment'"
319
+ },
320
+ "from": {
321
+ "description": "Sender address if known. Example: '0xabc...' or null",
322
+ "anyOf": [
323
+ {
324
+ "type": "string"
222
325
  },
223
- "from": {
224
- "type": [
225
- "string",
226
- "null"
227
- ],
228
- "description": "Sender address if known. Example: '0xabc...' or null"
326
+ {
327
+ "type": "null"
328
+ }
329
+ ]
330
+ },
331
+ "to": {
332
+ "description": "Recipient address if known. Example: '0xdef...' or null",
333
+ "anyOf": [
334
+ {
335
+ "type": "string"
229
336
  },
230
- "to": {
231
- "type": [
232
- "string",
233
- "null"
234
- ],
235
- "description": "Recipient address if known. Example: '0xdef...' or null"
337
+ {
338
+ "type": "null"
236
339
  }
237
- },
238
- "required": [
239
- "amount",
240
- "coinType",
241
- "role"
340
+ ]
341
+ }
342
+ },
343
+ "required": [
344
+ "amount",
345
+ "coinType",
346
+ "role"
347
+ ],
348
+ "additionalProperties": false,
349
+ "description": "A fund movement tagged with its business role"
350
+ }
351
+ },
352
+ "events": {
353
+ "description": "On-chain events annotated with business semantics (S-8)",
354
+ "type": "array",
355
+ "items": {
356
+ "type": "object",
357
+ "properties": {
358
+ "event_type": {
359
+ "type": "string",
360
+ "description": "Raw on-chain event type tag. Example: '0x2::service::ServicePublishedEvent'"
361
+ },
362
+ "business_meaning": {
363
+ "type": "string",
364
+ "description": "Human-readable business meaning. Example: 'Service has been published and is now immutable'"
365
+ },
366
+ "category": {
367
+ "type": "string",
368
+ "enum": [
369
+ "lifecycle",
370
+ "state_change",
371
+ "fund_flow",
372
+ "permission",
373
+ "guard",
374
+ "other"
242
375
  ],
243
- "additionalProperties": false,
244
- "description": "A fund movement tagged with its business role"
376
+ "description": "Business category. Constraint: enum of 6 values. Example: 'lifecycle'"
377
+ },
378
+ "related_object": {
379
+ "description": "Object ID the event relates to, if extractable. Example: '0x123...'",
380
+ "type": "string"
381
+ },
382
+ "side_effect": {
383
+ "description": "Side effect description for AI. Example: 'Customers can now place orders against this Service'",
384
+ "type": "string"
385
+ }
386
+ },
387
+ "required": [
388
+ "event_type",
389
+ "business_meaning",
390
+ "category"
391
+ ],
392
+ "additionalProperties": false,
393
+ "description": "An on-chain event annotated with business semantics"
394
+ }
395
+ },
396
+ "next_actions": {
397
+ "description": "Recommended next actions to drive the workflow forward",
398
+ "type": "array",
399
+ "items": {
400
+ "type": "object",
401
+ "properties": {
402
+ "action": {
403
+ "type": "string",
404
+ "description": "Recommended next action. Example: 'add sales products'"
405
+ },
406
+ "reason": {
407
+ "type": "string",
408
+ "description": "Why this action is recommended. Example: 'Service has no products; customers cannot order'"
409
+ },
410
+ "tool": {
411
+ "description": "MCP tool to use, if applicable. Example: 'onchain_operations'",
412
+ "type": "string"
413
+ },
414
+ "prerequisite": {
415
+ "description": "Condition that must hold before this action. Example: 'Service must be created first'",
416
+ "type": "string"
417
+ },
418
+ "priority": {
419
+ "type": "string",
420
+ "enum": [
421
+ "required",
422
+ "recommended",
423
+ "optional"
424
+ ],
425
+ "description": "Priority. Constraint: enum. Example: 'required'"
426
+ }
427
+ },
428
+ "required": [
429
+ "action",
430
+ "reason",
431
+ "priority"
432
+ ],
433
+ "additionalProperties": false,
434
+ "description": "A recommended next action with priority and rationale"
435
+ }
436
+ },
437
+ "warnings": {
438
+ "description": "Business-level warnings. Example: 'order_allocators not configured; order funds cannot be distributed'",
439
+ "type": "array",
440
+ "items": {
441
+ "type": "string"
442
+ }
443
+ },
444
+ "experience": {
445
+ "description": "Experience layer feedback from past operations (Phase 2 Topic 2)",
446
+ "type": "object",
447
+ "properties": {
448
+ "advice": {
449
+ "description": "Advice from past experience. Example: 'Last time you forgot to set buy_guard; add it before publishing'",
450
+ "type": "string"
451
+ },
452
+ "avoid": {
453
+ "description": "Pitfalls to avoid based on history. Example: ['Guard rejection on delivery_proof']",
454
+ "type": "array",
455
+ "items": {
456
+ "type": "string"
457
+ }
458
+ },
459
+ "relevance": {
460
+ "description": "Relevance score 0-1 of the matched experience. Example: 0.85",
461
+ "type": "number",
462
+ "minimum": 0,
463
+ "maximum": 1
464
+ },
465
+ "matched_scenario": {
466
+ "description": "Matched historical scenario. Example: 'publish_service_freelance'",
467
+ "type": "string"
468
+ }
469
+ },
470
+ "additionalProperties": false
471
+ },
472
+ "service_status": {
473
+ "description": "Phase 2 runtime service status (populated when semantic_rich is enabled). Lets AI see active services in each response.",
474
+ "type": "object",
475
+ "properties": {
476
+ "active": {
477
+ "type": "array",
478
+ "items": {
479
+ "type": "string"
245
480
  },
246
- "description": "Fund movements in this operation, tagged with roles"
481
+ "description": "Phase 2 services currently active (enabled). Example: ['confirm_gate','project_service','experience_layer']"
247
482
  },
248
- "events": {
483
+ "inactive": {
484
+ "description": "Phase 2 services currently inactive (can be toggled via config_operation). Example: ['harness','graph_persist']",
485
+ "type": "array",
486
+ "items": {
487
+ "type": "string"
488
+ }
489
+ }
490
+ },
491
+ "required": [
492
+ "active"
493
+ ],
494
+ "additionalProperties": false
495
+ },
496
+ "customer_advice": {
497
+ "description": "Buyer-side advice (Phase 3 C-3.3). Populated when customer_intelligence service is enabled AND operation is order/query on a Service. Contains risk_score, recommendations, reminders, and preference_match.",
498
+ "type": "object",
499
+ "properties": {
500
+ "risk_score": {
501
+ "description": "Composite risk score 0-100 (higher = safer). Relation: from risk-assessment.ts 4-dimension scoring. Example: 75",
502
+ "type": "number",
503
+ "minimum": 0,
504
+ "maximum": 100
505
+ },
506
+ "risk_level": {
507
+ "description": "Risk level bucket. 'high' = strongly discourage purchase. Example: 'medium_high'",
508
+ "type": "string",
509
+ "enum": [
510
+ "low",
511
+ "medium_low",
512
+ "medium_high",
513
+ "high"
514
+ ]
515
+ },
516
+ "recommendations": {
517
+ "type": "array",
518
+ "items": {
519
+ "type": "string"
520
+ },
521
+ "description": "Actionable recommendations for the buyer. Example: ['Require merchant to configure arbitration','Negotiate refund terms via Messenger']"
522
+ },
523
+ "reminders": {
249
524
  "type": "array",
250
525
  "items": {
251
526
  "type": "object",
252
527
  "properties": {
253
- "event_type": {
528
+ "id": {
254
529
  "type": "string",
255
- "description": "Raw on-chain event type tag. Example: '0x2::service::ServicePublishedEvent'"
530
+ "description": "Reminder rule id. Example: 'high_risk_score'"
256
531
  },
257
- "business_meaning": {
532
+ "stage": {
258
533
  "type": "string",
259
- "description": "Human-readable business meaning. Example: 'Service has been published and is now immutable'"
534
+ "enum": [
535
+ "browse",
536
+ "evaluate",
537
+ "preorder",
538
+ "in_progress",
539
+ "complete",
540
+ "after_sale"
541
+ ],
542
+ "description": "Order lifecycle stage when this reminder fires. Example: 'evaluate'"
260
543
  },
261
- "category": {
544
+ "priority": {
262
545
  "type": "string",
263
546
  "enum": [
264
- "lifecycle",
265
- "state_change",
266
- "fund_flow",
267
- "permission",
268
- "guard",
269
- "other"
547
+ "required",
548
+ "recommended",
549
+ "info",
550
+ "reminder"
270
551
  ],
271
- "description": "Business category. Constraint: enum of 6 values. Example: 'lifecycle'"
552
+ "description": "Priority. 'required' = blocks purchase; 'recommended' = strong caution. Example: 'required'"
272
553
  },
273
- "related_object": {
554
+ "message": {
274
555
  "type": "string",
275
- "description": "Object ID the event relates to, if extractable. Example: '0x123...'"
556
+ "description": "Human-readable reminder message. Example: 'Composite risk score 25/100, strongly discourage purchase'"
276
557
  },
277
- "side_effect": {
278
- "type": "string",
279
- "description": "Side effect description for AI. Example: 'Customers can now place orders against this Service'"
558
+ "action": {
559
+ "description": "Suggested next action. Example: 'require merchant to bind Arbitration before ordering'",
560
+ "type": "string"
280
561
  }
281
562
  },
282
563
  "required": [
283
- "event_type",
284
- "business_meaning",
285
- "category"
564
+ "id",
565
+ "stage",
566
+ "priority",
567
+ "message"
286
568
  ],
287
569
  "additionalProperties": false,
288
- "description": "An on-chain event annotated with business semantics"
570
+ "description": "A buyer-side reminder triggered at a specific order lifecycle stage (Phase 3 C-3)."
571
+ },
572
+ "description": "Stage-specific reminders (deduped, sorted by priority, capped to 3 high-risk). Example: [{priority:'required', message:'Ambiguous Guard must be human-reviewed'}]"
573
+ },
574
+ "preference_match": {
575
+ "description": "Service-to-preference match (populated when user preferences exist). Example: {score:75, matches:[...], mismatches:[...]}",
576
+ "type": "object",
577
+ "properties": {
578
+ "score": {
579
+ "type": "number",
580
+ "minimum": 0,
581
+ "maximum": 100,
582
+ "description": "Match score 0-100 (higher = better fit). Example: 75"
583
+ },
584
+ "matches": {
585
+ "type": "array",
586
+ "items": {
587
+ "type": "string"
588
+ },
589
+ "description": "Aspects that match user preferences. Example: ['Price 10% below average','Has arbitration']"
590
+ },
591
+ "mismatches": {
592
+ "type": "array",
593
+ "items": {
594
+ "type": "string"
595
+ },
596
+ "description": "Aspects that mismatch user preferences. Example: ['Delivery cycle exceeds expectation']"
597
+ }
598
+ },
599
+ "required": [
600
+ "score",
601
+ "matches",
602
+ "mismatches"
603
+ ],
604
+ "additionalProperties": false
605
+ }
606
+ },
607
+ "required": [
608
+ "recommendations",
609
+ "reminders"
610
+ ],
611
+ "additionalProperties": false
612
+ },
613
+ "evolution_context": {
614
+ "description": "Phase 4 industry evolution context (populated when industry_evolution service is enabled). Provides AI with industry health signals and evolution advice.",
615
+ "type": "object",
616
+ "properties": {
617
+ "industry_signal": {
618
+ "description": "Industry evolution signal summary. Example: 'Industry health 82/100 (healthy); 25 cumulative industry signals'",
619
+ "type": "string"
620
+ },
621
+ "evolution_advice": {
622
+ "description": "Evolution advice for the current operation. Example: 'Recommend mandatory arbitration + compensation fund + delivery Guard'",
623
+ "type": "string"
624
+ },
625
+ "confidence": {
626
+ "type": "number",
627
+ "minimum": 0,
628
+ "maximum": 1,
629
+ "description": "Confidence of the evolution context 0-1. <0.5 means no data yet. Example: 0.75"
630
+ },
631
+ "health_score": {
632
+ "description": "Industry health score 0-100 if available. Example: 82",
633
+ "type": "number",
634
+ "minimum": 0,
635
+ "maximum": 100
636
+ },
637
+ "pending_suggestions": {
638
+ "description": "Count of pending industry update suggestions (filtered by role if role is set). Example: 3",
639
+ "type": "integer",
640
+ "minimum": 0,
641
+ "maximum": 9007199254740991
642
+ },
643
+ "intent": {
644
+ "description": "Phase 4 P4-6.C: Current business intent driving the scoring model. Absent = 'default'. Example: 'growth'",
645
+ "type": "string",
646
+ "enum": [
647
+ "default",
648
+ "growth",
649
+ "retention",
650
+ "compliance",
651
+ "efficiency",
652
+ "trust_building",
653
+ "custom"
654
+ ]
655
+ },
656
+ "role_advice": {
657
+ "description": "Phase 4 P4-6.C: Role-targeted advice strings (merchant/customer/prospect/supplier/collaborator/arbitrator). Example: ['Strengthen loyalty flywheel','Optimize first-order conversion']",
658
+ "type": "array",
659
+ "items": {
660
+ "type": "string"
661
+ }
662
+ },
663
+ "role": {
664
+ "description": "Phase 4 P4-6.C: Role used for advice routing. Example: 'merchant'",
665
+ "type": "string",
666
+ "enum": [
667
+ "merchant",
668
+ "customer",
669
+ "prospect",
670
+ "supplier",
671
+ "collaborator",
672
+ "arbitrator"
673
+ ]
674
+ }
675
+ },
676
+ "required": [
677
+ "confidence"
678
+ ],
679
+ "additionalProperties": false
680
+ },
681
+ "guard_advice": {
682
+ "description": "Phase 5 Guard capability advice (populated when user intent involves Guard). Provides puzzle status, scene matching, suggested patterns, available queries, risk warnings, and confirmation text. AI uses this to guide Guard design dialogue (R1-R10).",
683
+ "type": "object",
684
+ "properties": {
685
+ "current_round": {
686
+ "description": "Current R1-R10 dialogue round. R1=intent, R2=table, R3=tree, R4=rely, R5=binding, R6=review, R7=CREATE, R8=test, R9=bind, R10=verify. Example: 'R3'",
687
+ "type": "string",
688
+ "enum": [
689
+ "R1",
690
+ "R2",
691
+ "R3",
692
+ "R4",
693
+ "R5",
694
+ "R6",
695
+ "R7",
696
+ "R8",
697
+ "R9",
698
+ "R10"
699
+ ]
700
+ },
701
+ "puzzle_status": {
702
+ "description": "Information puzzle completeness (6 dimensions). Missing dimensions need user input before CREATE.",
703
+ "type": "object",
704
+ "properties": {
705
+ "intent": {
706
+ "type": "boolean",
707
+ "description": "Intent dimension complete (action + rule + failure conditions)"
708
+ },
709
+ "binding": {
710
+ "type": "boolean",
711
+ "description": "Binding dimension complete (host object + field + circular ref)"
712
+ },
713
+ "data": {
714
+ "type": "boolean",
715
+ "description": "Data dimension complete (table entries + witnesses)"
716
+ },
717
+ "query": {
718
+ "type": "boolean",
719
+ "description": "Query dimension complete (query instructions if needed)"
720
+ },
721
+ "logic": {
722
+ "type": "boolean",
723
+ "description": "Logic dimension complete (root node returns Bool)"
724
+ },
725
+ "constraints": {
726
+ "type": "boolean",
727
+ "description": "Constraints dimension complete (10 Pitfalls checked)"
728
+ }
289
729
  },
290
- "description": "On-chain events annotated with business semantics (S-8)"
730
+ "required": [
731
+ "intent",
732
+ "binding",
733
+ "data",
734
+ "query",
735
+ "logic",
736
+ "constraints"
737
+ ],
738
+ "additionalProperties": false
739
+ },
740
+ "matched_scene": {
741
+ "description": "Matched Guard scene id from the 8 binding scenarios ledger. Example: 'machine_forward_guard'",
742
+ "type": "string"
291
743
  },
292
- "next_actions": {
744
+ "scene_description": {
745
+ "description": "Human-readable scene description. Example: 'Workflow node forward validation (Forward.guard)'",
746
+ "type": "string"
747
+ },
748
+ "scene_constraints": {
749
+ "description": "Special constraints for the matched scene. Example: ['Forward.guard cannot be modified after Machine is published']",
750
+ "type": "array",
751
+ "items": {
752
+ "type": "string"
753
+ }
754
+ },
755
+ "suggested_patterns": {
756
+ "description": "Suggested Guard patterns based on user intent. Example: ['time lock','progress status check']",
757
+ "type": "array",
758
+ "items": {
759
+ "type": "string"
760
+ }
761
+ },
762
+ "available_queries": {
763
+ "description": "Available query instructions for the current context (subset of 375 GUARDQUERY entries)",
293
764
  "type": "array",
294
765
  "items": {
295
766
  "type": "object",
296
767
  "properties": {
297
- "action": {
298
- "type": "string",
299
- "description": "Recommended next action. Example: 'add sales products'"
768
+ "id": {
769
+ "type": "integer",
770
+ "minimum": -9007199254740991,
771
+ "maximum": 9007199254740991,
772
+ "description": "Query instruction ID. Example: 1253"
300
773
  },
301
- "reason": {
774
+ "name": {
302
775
  "type": "string",
303
- "description": "Why this action is recommended. Example: 'Service has no products; customers cannot order'"
776
+ "description": "Query instruction name. Example: 'progress.current'"
304
777
  },
305
- "tool": {
778
+ "objectType": {
306
779
  "type": "string",
307
- "description": "MCP tool to use, if applicable. Example: 'onchain_operations'"
780
+ "description": "Target object type. Example: 'Progress'"
308
781
  },
309
- "prerequisite": {
782
+ "returnType": {
310
783
  "type": "string",
311
- "description": "Condition that must hold before this action. Example: 'Service must be created first'"
784
+ "description": "Return value type. Example: 'String'"
312
785
  },
313
- "priority": {
314
- "type": "string",
315
- "enum": [
316
- "required",
317
- "recommended",
318
- "optional"
319
- ],
320
- "description": "Priority. Constraint: enum. Example: 'required'"
786
+ "description": {
787
+ "description": "Query description",
788
+ "type": "string"
321
789
  }
322
790
  },
323
791
  "required": [
324
- "action",
325
- "reason",
326
- "priority"
792
+ "id",
793
+ "name",
794
+ "objectType",
795
+ "returnType"
327
796
  ],
328
797
  "additionalProperties": false,
329
- "description": "A recommended next action with priority and rationale"
330
- },
331
- "description": "Recommended next actions to drive the workflow forward"
798
+ "description": "A Guard query instruction available for the current context (subset of GUARDQUERY 375 entries)."
799
+ }
332
800
  },
333
- "warnings": {
801
+ "risk_warnings": {
802
+ "description": "Risk warnings for the current Guard design. Example: ['Guard cannot be modified after creation','Time lock test uses 1000ms']",
334
803
  "type": "array",
335
804
  "items": {
336
- "type": "string"
337
- },
338
- "description": "Business-level warnings. Example: 'order_allocators not configured; order funds cannot be distributed'"
339
- },
340
- "experience": {
341
- "type": "object",
342
- "properties": {
343
- "advice": {
344
- "type": "string",
345
- "description": "Advice from past experience. Example: 'Last time you forgot to set buy_guard; add it before publishing'"
346
- },
347
- "avoid": {
348
- "type": "array",
349
- "items": {
350
- "type": "string"
351
- },
352
- "description": "Pitfalls to avoid based on history. Example: ['Guard rejection on delivery_proof']"
353
- },
354
- "relevance": {
355
- "type": "number",
356
- "minimum": 0,
357
- "maximum": 1,
358
- "description": "Relevance score 0-1 of the matched experience. Example: 0.85"
359
- },
360
- "matched_scenario": {
361
- "type": "string",
362
- "description": "Matched historical scenario. Example: 'publish_service_freelance'"
363
- }
364
- },
365
- "additionalProperties": false,
366
- "description": "Experience layer feedback from past operations (Phase 2 Topic 2)"
805
+ "type": "string"
806
+ }
807
+ },
808
+ "pending_questions": {
809
+ "description": "Questions for the user to complete the puzzle. Example: ['Which Host Object will the Guard bind to?']",
810
+ "type": "array",
811
+ "items": {
812
+ "type": "string"
813
+ }
814
+ },
815
+ "confirmation_text": {
816
+ "description": "Structured semantic confirmation text for user review (generated when puzzle is complete). User must explicitly confirm before CREATE.",
817
+ "type": "string"
367
818
  },
368
- "service_status": {
819
+ "test_result": {
820
+ "description": "gen_passport static test result. Must pass before CREATE.",
369
821
  "type": "object",
370
822
  "properties": {
371
- "active": {
372
- "type": "array",
373
- "items": {
374
- "type": "string"
375
- },
376
- "description": "Phase 2 services currently active (enabled). Example: ['confirm_gate','project_service','experience_layer']"
823
+ "status": {
824
+ "type": "string",
825
+ "enum": [
826
+ "pass",
827
+ "fail",
828
+ "not_tested"
829
+ ]
377
830
  },
378
- "inactive": {
379
- "type": "array",
380
- "items": {
381
- "type": "string"
382
- },
383
- "description": "Phase 2 services currently inactive (can be toggled via config_operation). Example: ['harness','graph_persist']"
831
+ "failure_node": {
832
+ "description": "Node that caused failure (if fail)",
833
+ "type": "string"
834
+ },
835
+ "passport_id": {
836
+ "description": "Generated Passport ID (if pass)",
837
+ "type": "string"
384
838
  }
385
839
  },
386
840
  "required": [
387
- "active"
841
+ "status"
388
842
  ],
389
- "additionalProperties": false,
390
- "description": "Phase 2 runtime service status (populated when semantic_rich is enabled). Lets AI see active services in each response."
843
+ "additionalProperties": false
391
844
  },
392
- "customer_advice": {
845
+ "risk_assessment": {
846
+ "description": "Business-layer risk assessment (game theory, data source trust, logic gaps). Populated during Guard design to warn about business risks beyond syntax.",
393
847
  "type": "object",
394
848
  "properties": {
395
- "risk_score": {
396
- "type": "number",
397
- "minimum": 0,
398
- "maximum": 100,
399
- "description": "Composite risk score 0-100 (higher = safer). Relation: from risk-assessment.ts 4-dimension scoring. Example: 75"
400
- },
401
- "risk_level": {
849
+ "overall_risk": {
402
850
  "type": "string",
403
851
  "enum": [
852
+ "critical",
853
+ "high",
854
+ "medium",
404
855
  "low",
405
- "medium_low",
406
- "medium_high",
407
- "high"
856
+ "info"
408
857
  ],
409
- "description": "Risk level bucket. 'high' = strongly discourage purchase. Example: 'medium_high'"
858
+ "description": "Overall risk level (highest from all risks)"
859
+ },
860
+ "risk_count": {
861
+ "type": "integer",
862
+ "minimum": -9007199254740991,
863
+ "maximum": 9007199254740991,
864
+ "description": "Total number of detected risks"
865
+ },
866
+ "critical_count": {
867
+ "type": "integer",
868
+ "minimum": -9007199254740991,
869
+ "maximum": 9007199254740991,
870
+ "description": "Number of critical risks"
871
+ },
872
+ "high_count": {
873
+ "type": "integer",
874
+ "minimum": -9007199254740991,
875
+ "maximum": 9007199254740991,
876
+ "description": "Number of high risks"
877
+ },
878
+ "needs_human_review": {
879
+ "type": "boolean",
880
+ "description": "Whether human review is required (critical or 2+ high risks)"
410
881
  },
411
- "recommendations": {
882
+ "top_risks": {
412
883
  "type": "array",
413
884
  "items": {
414
885
  "type": "string"
415
886
  },
416
- "description": "Actionable recommendations for the buyer. Example: ['Require merchant to configure arbitration','Negotiate refund terms via Messenger']"
887
+ "description": "Top risk titles (critical and high, max 3)"
417
888
  },
418
- "reminders": {
419
- "type": "array",
420
- "items": {
889
+ "stakeholder_advice": {
890
+ "description": "Per-stakeholder advice. Key=stakeholder (customer/provider/arbitrator/claimant), value=advice list",
891
+ "type": "object",
892
+ "propertyNames": {
893
+ "type": "string"
894
+ },
895
+ "additionalProperties": {
896
+ "type": "array",
897
+ "items": {
898
+ "type": "string"
899
+ }
900
+ }
901
+ }
902
+ },
903
+ "required": [
904
+ "overall_risk",
905
+ "risk_count",
906
+ "critical_count",
907
+ "high_count",
908
+ "needs_human_review",
909
+ "top_risks"
910
+ ],
911
+ "additionalProperties": false
912
+ }
913
+ },
914
+ "additionalProperties": false
915
+ },
916
+ "workflow_guidance": {
917
+ "description": "K3 permission-aware workflow guidance: current node + ALL reachable next nodes with their operator/permission/guard + K3 recommendation. Populated when a Progress (or Order with Progress) is queried and after progress operate. AI must read this BEFORE proposing the next workflow operation.",
918
+ "type": "object",
919
+ "properties": {
920
+ "current_node": {
921
+ "type": "string",
922
+ "description": "Current node of the Progress. Example: 'serving'"
923
+ },
924
+ "caller": {
925
+ "description": "The account (name/address) this guidance is framed for (env.account). Example: 'london_guide'",
926
+ "type": "string"
927
+ },
928
+ "options": {
929
+ "type": "array",
930
+ "items": {
931
+ "type": "object",
932
+ "properties": {
933
+ "next_node": {
934
+ "type": "string",
935
+ "description": "Target node this forward advances INTO. Example: 'serving'"
936
+ },
937
+ "forward": {
938
+ "type": "string",
939
+ "description": "Forward (operation) name. Example: 'StartService'"
940
+ },
941
+ "weight": {
942
+ "type": "number",
943
+ "description": "Forward weight contributed toward the pair threshold. Example: 1"
944
+ },
945
+ "operator": {
421
946
  "type": "object",
422
947
  "properties": {
423
- "id": {
424
- "type": "string",
425
- "description": "Reminder rule id. Example: 'high_risk_score'"
426
- },
427
- "stage": {
948
+ "kind": {
428
949
  "type": "string",
429
950
  "enum": [
430
- "browse",
431
- "evaluate",
432
- "preorder",
433
- "in_progress",
434
- "complete",
435
- "after_sale"
951
+ "order_holder",
952
+ "permission_index",
953
+ "named_operator"
436
954
  ],
437
- "description": "Order lifecycle stage when this reminder fires. Example: 'evaluate'"
955
+ "description": "Who can execute this forward (K3 feasibility). 'order_holder' = the Order owner (customer; forward namedOperator=''), 'permission_index' = a permission role, 'named_operator' = a specific Progress namespace operator."
438
956
  },
439
- "priority": {
440
- "type": "string",
441
- "enum": [
442
- "required",
443
- "recommended",
444
- "info",
445
- "reminder"
446
- ],
447
- "description": "Priority. 'required' = blocks purchase; 'recommended' = strong caution. Example: 'required'"
957
+ "permission_index": {
958
+ "description": "Permission index when kind='permission_index'. Example: 1000",
959
+ "type": "integer",
960
+ "minimum": -9007199254740991,
961
+ "maximum": 9007199254740991
448
962
  },
449
- "message": {
450
- "type": "string",
451
- "description": "Human-readable reminder message. Example: 'Composite risk score 25/100, strongly discourage purchase'"
963
+ "role_name": {
964
+ "description": "Resolved role display name. Example: 'merchant (permission 1000)' / 'order holder (customer)'",
965
+ "type": "string"
452
966
  },
453
- "action": {
454
- "type": "string",
455
- "description": "Suggested next action. Example: 'require merchant to bind Arbitration before ordering'"
967
+ "account_name": {
968
+ "description": "Resolved local account/mark name when the operator maps to a concrete account. Example: 'london_guide'",
969
+ "type": "string"
970
+ },
971
+ "named_operator": {
972
+ "description": "NamedOperator namespace when kind='named_operator'. Example: 'delivery_team'",
973
+ "type": "string"
456
974
  }
457
975
  },
458
976
  "required": [
459
- "id",
460
- "stage",
461
- "priority",
462
- "message"
977
+ "kind"
463
978
  ],
464
979
  "additionalProperties": false,
465
- "description": "A buyer-side reminder triggered at a specific order lifecycle stage (Phase 3 C-3)."
980
+ "description": "Who can execute this forward (which account + which permission)."
466
981
  },
467
- "description": "Stage-specific reminders (deduped, sorted by priority, capped to 3 high-risk). Example: [{priority:'required', message:'Ambiguous Guard must be human-reviewed'}]"
468
- },
469
- "preference_match": {
470
- "type": "object",
471
- "properties": {
472
- "score": {
473
- "type": "number",
474
- "minimum": 0,
475
- "maximum": 100,
476
- "description": "Match score 0-100 (higher = better fit). Example: 75"
477
- },
478
- "matches": {
479
- "type": "array",
480
- "items": {
481
- "type": "string"
482
- },
483
- "description": "Aspects that match user preferences. Example: ['Price 10% below average','Has arbitration']"
484
- },
485
- "mismatches": {
486
- "type": "array",
487
- "items": {
488
- "type": "string"
489
- },
490
- "description": "Aspects that mismatch user preferences. Example: ['Delivery cycle exceeds expectation']"
982
+ "guard": {
983
+ "description": "Guard bound to the forward — acceptance condition verified BEFORE the transition. Example: 'guard_payout'",
984
+ "type": "string"
985
+ },
986
+ "business_meaning": {
987
+ "type": "string",
988
+ "description": "Business meaning of advancing to this node. Example: 'Guide starts the day service'"
989
+ },
990
+ "gains": {
991
+ "description": "Gains for the caller if this option is chosen (K3 Game G1 收益分离). Example: ['Settlement triggered — funds released to provider']",
992
+ "type": "array",
993
+ "items": {
994
+ "type": "string"
491
995
  }
492
996
  },
493
- "required": [
494
- "score",
495
- "matches",
496
- "mismatches"
497
- ],
498
- "additionalProperties": false,
499
- "description": "Service-to-preference match (populated when user preferences exist). Example: {score:75, matches:[...], mismatches:[...]}"
500
- }
997
+ "risks": {
998
+ "description": "Risks for the caller if this option is chosen (K3 Game G1 风险分离). Example: ['Refund leverage lost after confirmation']",
999
+ "type": "array",
1000
+ "items": {
1001
+ "type": "string"
1002
+ }
1003
+ },
1004
+ "consistency": {
1005
+ "description": "Consistency 0-100 between this option's business semantics and the caller's interests (K3 Game optimality). Higher = more aligned.",
1006
+ "type": "number",
1007
+ "minimum": 0,
1008
+ "maximum": 100
1009
+ },
1010
+ "recommended": {
1011
+ "description": "Whether this is the recommended option (highest consistency).",
1012
+ "type": "boolean"
1013
+ }
1014
+ },
1015
+ "required": [
1016
+ "next_node",
1017
+ "forward",
1018
+ "weight",
1019
+ "operator",
1020
+ "business_meaning"
1021
+ ],
1022
+ "additionalProperties": false,
1023
+ "description": "A reachable next-node option with its operator/permission, guard, business meaning, and K3-style gains/risks/consistency."
501
1024
  },
502
- "required": [
503
- "recommendations",
504
- "reminders"
505
- ],
506
- "additionalProperties": false,
507
- "description": "Buyer-side advice (Phase 3 C-3.3). Populated when customer_intelligence service is enabled AND operation is order/query on a Service. Contains risk_score, recommendations, reminders, and preference_match."
1025
+ "description": "ALL reachable next-node directions (every operator/permission/guard disclosed)."
508
1026
  },
509
- "evolution_context": {
1027
+ "recommendation": {
1028
+ "description": "Recommended option with rationale (K3 Game 意图/博弈/利益).",
510
1029
  "type": "object",
511
1030
  "properties": {
512
- "industry_signal": {
513
- "type": "string",
514
- "description": "Industry evolution signal summary. Example: 'Industry health 82/100 (healthy); 25 cumulative industry signals'"
1031
+ "best": {
1032
+ "description": "Recommended action in '<forward> → <next_node>' form. Example: 'StartService → serving'",
1033
+ "type": "string"
515
1034
  },
516
- "evolution_advice": {
517
- "type": "string",
518
- "description": "Evolution advice for the current operation. Example: 'Recommend mandatory arbitration + compensation fund + delivery Guard'"
519
- },
520
- "confidence": {
521
- "type": "number",
522
- "minimum": 0,
523
- "maximum": 1,
524
- "description": "Confidence of the evolution context 0-1. <0.5 means no data yet. Example: 0.75"
525
- },
526
- "health_score": {
527
- "type": "number",
528
- "minimum": 0,
529
- "maximum": 100,
530
- "description": "Industry health score 0-100 if available. Example: 82"
531
- },
532
- "pending_suggestions": {
533
- "type": "integer",
534
- "minimum": 0,
535
- "description": "Count of pending industry update suggestions (filtered by role if role is set). Example: 3"
536
- },
537
- "intent": {
538
- "type": "string",
539
- "enum": [
540
- "default",
541
- "growth",
542
- "retention",
543
- "compliance",
544
- "efficiency",
545
- "trust_building",
546
- "custom"
547
- ],
548
- "description": "Phase 4 P4-6.C: Current business intent driving the scoring model. Absent = 'default'. Example: 'growth'"
1035
+ "rationale": {
1036
+ "description": "Why this option is recommended (framed at the caller's value: gains/risks). Example: 'For the guide, advancing to serving triggers the delivery flow'",
1037
+ "type": "string"
549
1038
  },
550
- "role_advice": {
551
- "type": "array",
552
- "items": {
553
- "type": "string"
554
- },
555
- "description": "Phase 4 P4-6.C: Role-targeted advice strings (user/merchant/arbitrator). Example: ['Strengthen loyalty flywheel','Optimize first-order conversion']"
556
- },
557
- "role": {
558
- "type": "string",
559
- "enum": [
560
- "user",
561
- "merchant",
562
- "arbitrator"
563
- ],
564
- "description": "Phase 4 P4-6.C: Role used for advice routing. Example: 'merchant'"
1039
+ "caveat": {
1040
+ "description": "Disclosed trade-off / opportunity cost of NOT taking another path (K3 Game G3 机会成本). Example: 'Choosing cancelled forfeits this order's settlement'",
1041
+ "type": "string"
565
1042
  }
566
1043
  },
567
- "required": [
568
- "confidence"
569
- ],
570
- "additionalProperties": false,
571
- "description": "Phase 4 industry evolution context (populated when industry_evolution service is enabled). Provides AI with industry health signals and evolution advice."
1044
+ "additionalProperties": false
572
1045
  },
573
- "guard_advice": {
574
- "type": "object",
575
- "properties": {
576
- "current_round": {
577
- "type": "string",
578
- "enum": [
579
- "R1",
580
- "R2",
581
- "R3",
582
- "R4",
583
- "R5",
584
- "R6",
585
- "R7",
586
- "R8",
587
- "R9",
588
- "R10"
589
- ],
590
- "description": "Current R1-R10 dialogue round. R1=intent, R2=table, R3=tree, R4=rely, R5=binding, R6=review, R7=CREATE, R8=test, R9=bind, R10=verify. Example: 'R3'"
591
- },
592
- "puzzle_status": {
593
- "type": "object",
594
- "properties": {
595
- "intent": {
596
- "type": "boolean",
597
- "description": "Intent dimension complete (action + rule + failure conditions)"
598
- },
599
- "binding": {
600
- "type": "boolean",
601
- "description": "Binding dimension complete (host object + field + circular ref)"
602
- },
603
- "data": {
604
- "type": "boolean",
605
- "description": "Data dimension complete (table entries + witnesses)"
606
- },
607
- "query": {
608
- "type": "boolean",
609
- "description": "Query dimension complete (query instructions if needed)"
610
- },
611
- "logic": {
612
- "type": "boolean",
613
- "description": "Logic dimension complete (root node returns Bool)"
614
- },
615
- "constraints": {
616
- "type": "boolean",
617
- "description": "Constraints dimension complete (10 Pitfalls checked)"
618
- }
1046
+ "note": {
1047
+ "description": "Additional note (e.g. wait for the other party, entry/terminal hint).",
1048
+ "type": "string"
1049
+ }
1050
+ },
1051
+ "required": [
1052
+ "current_node",
1053
+ "options"
1054
+ ],
1055
+ "additionalProperties": false
1056
+ },
1057
+ "workflow_receipt": {
1058
+ "description": "K3 operate receipt: which account did what, whether the node migrated, and threshold/weight cooperation status when it did not. AI must relay this to the user after every progress operation.",
1059
+ "type": "object",
1060
+ "properties": {
1061
+ "account": {
1062
+ "type": "string",
1063
+ "description": "The account that executed the operation (env.account). Example: 'london_guide'"
1064
+ },
1065
+ "action": {
1066
+ "type": "string",
1067
+ "description": "What was done. Example: 'london_guide executed StartService (paid → serving)'"
1068
+ },
1069
+ "forward": {
1070
+ "type": "string",
1071
+ "description": "Forward name executed. Example: 'StartService'"
1072
+ },
1073
+ "target_node": {
1074
+ "type": "string",
1075
+ "description": "Target node of the executed forward. Example: 'serving'"
1076
+ },
1077
+ "op": {
1078
+ "description": "Operation type executed.",
1079
+ "type": "string",
1080
+ "enum": [
1081
+ "next",
1082
+ "hold",
1083
+ "unhold",
1084
+ "adminUnhold"
1085
+ ]
1086
+ },
1087
+ "migrated": {
1088
+ "type": "boolean",
1089
+ "description": "Whether the Progress migrated to the target node (true) or stayed (false — weights still accumulating toward threshold)."
1090
+ },
1091
+ "current_node": {
1092
+ "type": "string",
1093
+ "description": "Progress.current after the operation."
1094
+ },
1095
+ "threshold": {
1096
+ "description": "Pair threshold when NOT migrated (threshold > 0).",
1097
+ "type": "number"
1098
+ },
1099
+ "accumulated_weight": {
1100
+ "description": "Accumulated forward weight in the current session when NOT migrated.",
1101
+ "type": "number"
1102
+ },
1103
+ "remaining": {
1104
+ "description": "threshold - accumulated_weight when NOT migrated.",
1105
+ "type": "number"
1106
+ },
1107
+ "waiting_on": {
1108
+ "description": "Pending forwards + their operators when NOT migrated (K3 Game G4 — who must cooperate next).",
1109
+ "type": "array",
1110
+ "items": {
1111
+ "type": "object",
1112
+ "properties": {
1113
+ "forward": {
1114
+ "type": "string",
1115
+ "description": "Forward still required to reach the threshold. Example: 'GuideConfirm'"
619
1116
  },
620
- "required": [
621
- "intent",
622
- "binding",
623
- "data",
624
- "query",
625
- "logic",
626
- "constraints"
627
- ],
628
- "additionalProperties": false,
629
- "description": "Information puzzle completeness (6 dimensions). Missing dimensions need user input before CREATE."
630
- },
631
- "matched_scene": {
632
- "type": "string",
633
- "description": "Matched Guard scene id from the 8 binding scenarios ledger. Example: 'machine_forward_guard'"
1117
+ "operator": {
1118
+ "type": "object",
1119
+ "properties": {
1120
+ "kind": {
1121
+ "type": "string",
1122
+ "enum": [
1123
+ "order_holder",
1124
+ "permission_index",
1125
+ "named_operator"
1126
+ ],
1127
+ "description": "Who can execute this forward (K3 feasibility). 'order_holder' = the Order owner (customer; forward namedOperator=''), 'permission_index' = a permission role, 'named_operator' = a specific Progress namespace operator."
1128
+ },
1129
+ "permission_index": {
1130
+ "description": "Permission index when kind='permission_index'. Example: 1000",
1131
+ "type": "integer",
1132
+ "minimum": -9007199254740991,
1133
+ "maximum": 9007199254740991
1134
+ },
1135
+ "role_name": {
1136
+ "description": "Resolved role display name. Example: 'merchant (permission 1000)' / 'order holder (customer)'",
1137
+ "type": "string"
1138
+ },
1139
+ "account_name": {
1140
+ "description": "Resolved local account/mark name when the operator maps to a concrete account. Example: 'london_guide'",
1141
+ "type": "string"
1142
+ },
1143
+ "named_operator": {
1144
+ "description": "NamedOperator namespace when kind='named_operator'. Example: 'delivery_team'",
1145
+ "type": "string"
1146
+ }
1147
+ },
1148
+ "required": [
1149
+ "kind"
1150
+ ],
1151
+ "additionalProperties": false,
1152
+ "description": "Who must execute this forward next."
1153
+ }
634
1154
  },
635
- "scene_description": {
1155
+ "required": [
1156
+ "forward",
1157
+ "operator"
1158
+ ],
1159
+ "additionalProperties": false,
1160
+ "description": "A forward still pending — who must act next (threshold cooperation, K3 Game G4 阈值配合)."
1161
+ }
1162
+ },
1163
+ "next_guidance": {
1164
+ "description": "Next-node guidance from the resulting current node.",
1165
+ "type": "object",
1166
+ "properties": {
1167
+ "current_node": {
636
1168
  "type": "string",
637
- "description": "Human-readable scene description. Example: 'Workflow node forward validation (Forward.guard)'"
638
- },
639
- "scene_constraints": {
640
- "type": "array",
641
- "items": {
642
- "type": "string"
643
- },
644
- "description": "Special constraints for the matched scene. Example: ['Forward.guard cannot be modified after Machine is published']"
1169
+ "description": "Current node of the Progress. Example: 'serving'"
645
1170
  },
646
- "suggested_patterns": {
647
- "type": "array",
648
- "items": {
649
- "type": "string"
650
- },
651
- "description": "Suggested Guard patterns based on user intent. Example: ['time lock','progress status check']"
1171
+ "caller": {
1172
+ "description": "The account (name/address) this guidance is framed for (env.account). Example: 'london_guide'",
1173
+ "type": "string"
652
1174
  },
653
- "available_queries": {
1175
+ "options": {
654
1176
  "type": "array",
655
1177
  "items": {
656
1178
  "type": "object",
657
1179
  "properties": {
658
- "id": {
659
- "type": "integer",
660
- "description": "Query instruction ID. Example: 1253"
661
- },
662
- "name": {
1180
+ "next_node": {
663
1181
  "type": "string",
664
- "description": "Query instruction name. Example: 'progress.current'"
1182
+ "description": "Target node this forward advances INTO. Example: 'serving'"
665
1183
  },
666
- "objectType": {
1184
+ "forward": {
667
1185
  "type": "string",
668
- "description": "Target object type. Example: 'Progress'"
1186
+ "description": "Forward (operation) name. Example: 'StartService'"
669
1187
  },
670
- "returnType": {
671
- "type": "string",
672
- "description": "Return value type. Example: 'String'"
1188
+ "weight": {
1189
+ "type": "number",
1190
+ "description": "Forward weight contributed toward the pair threshold. Example: 1"
1191
+ },
1192
+ "operator": {
1193
+ "type": "object",
1194
+ "properties": {
1195
+ "kind": {
1196
+ "type": "string",
1197
+ "enum": [
1198
+ "order_holder",
1199
+ "permission_index",
1200
+ "named_operator"
1201
+ ],
1202
+ "description": "Who can execute this forward (K3 feasibility). 'order_holder' = the Order owner (customer; forward namedOperator=''), 'permission_index' = a permission role, 'named_operator' = a specific Progress namespace operator."
1203
+ },
1204
+ "permission_index": {
1205
+ "description": "Permission index when kind='permission_index'. Example: 1000",
1206
+ "type": "integer",
1207
+ "minimum": -9007199254740991,
1208
+ "maximum": 9007199254740991
1209
+ },
1210
+ "role_name": {
1211
+ "description": "Resolved role display name. Example: 'merchant (permission 1000)' / 'order holder (customer)'",
1212
+ "type": "string"
1213
+ },
1214
+ "account_name": {
1215
+ "description": "Resolved local account/mark name when the operator maps to a concrete account. Example: 'london_guide'",
1216
+ "type": "string"
1217
+ },
1218
+ "named_operator": {
1219
+ "description": "NamedOperator namespace when kind='named_operator'. Example: 'delivery_team'",
1220
+ "type": "string"
1221
+ }
1222
+ },
1223
+ "required": [
1224
+ "kind"
1225
+ ],
1226
+ "additionalProperties": false,
1227
+ "description": "Who can execute this forward (which account + which permission)."
1228
+ },
1229
+ "guard": {
1230
+ "description": "Guard bound to the forward — acceptance condition verified BEFORE the transition. Example: 'guard_payout'",
1231
+ "type": "string"
673
1232
  },
674
- "description": {
1233
+ "business_meaning": {
675
1234
  "type": "string",
676
- "description": "Query description"
1235
+ "description": "Business meaning of advancing to this node. Example: 'Guide starts the day service'"
1236
+ },
1237
+ "gains": {
1238
+ "description": "Gains for the caller if this option is chosen (K3 Game G1 收益分离). Example: ['Settlement triggered — funds released to provider']",
1239
+ "type": "array",
1240
+ "items": {
1241
+ "type": "string"
1242
+ }
1243
+ },
1244
+ "risks": {
1245
+ "description": "Risks for the caller if this option is chosen (K3 Game G1 风险分离). Example: ['Refund leverage lost after confirmation']",
1246
+ "type": "array",
1247
+ "items": {
1248
+ "type": "string"
1249
+ }
1250
+ },
1251
+ "consistency": {
1252
+ "description": "Consistency 0-100 between this option's business semantics and the caller's interests (K3 Game optimality). Higher = more aligned.",
1253
+ "type": "number",
1254
+ "minimum": 0,
1255
+ "maximum": 100
1256
+ },
1257
+ "recommended": {
1258
+ "description": "Whether this is the recommended option (highest consistency).",
1259
+ "type": "boolean"
677
1260
  }
678
1261
  },
679
1262
  "required": [
680
- "id",
681
- "name",
682
- "objectType",
683
- "returnType"
1263
+ "next_node",
1264
+ "forward",
1265
+ "weight",
1266
+ "operator",
1267
+ "business_meaning"
684
1268
  ],
685
1269
  "additionalProperties": false,
686
- "description": "A Guard query instruction available for the current context (subset of GUARDQUERY 375 entries)."
687
- },
688
- "description": "Available query instructions for the current context (subset of 375 GUARDQUERY entries)"
689
- },
690
- "risk_warnings": {
691
- "type": "array",
692
- "items": {
693
- "type": "string"
694
- },
695
- "description": "Risk warnings for the current Guard design. Example: ['Guard cannot be modified after creation','Time lock test uses 1000ms']"
696
- },
697
- "pending_questions": {
698
- "type": "array",
699
- "items": {
700
- "type": "string"
1270
+ "description": "A reachable next-node option with its operator/permission, guard, business meaning, and K3-style gains/risks/consistency."
701
1271
  },
702
- "description": "Questions for the user to complete the puzzle. Example: ['Which Host Object will the Guard bind to?']"
703
- },
704
- "confirmation_text": {
705
- "type": "string",
706
- "description": "Structured semantic confirmation text for user review (generated when puzzle is complete). User must explicitly confirm before CREATE."
1272
+ "description": "ALL reachable next-node directions (every operator/permission/guard disclosed)."
707
1273
  },
708
- "test_result": {
1274
+ "recommendation": {
1275
+ "description": "Recommended option with rationale (K3 Game 意图/博弈/利益).",
709
1276
  "type": "object",
710
1277
  "properties": {
711
- "status": {
712
- "type": "string",
713
- "enum": [
714
- "pass",
715
- "fail",
716
- "not_tested"
717
- ]
1278
+ "best": {
1279
+ "description": "Recommended action in '<forward> → <next_node>' form. Example: 'StartService → serving'",
1280
+ "type": "string"
718
1281
  },
719
- "failure_node": {
720
- "type": "string",
721
- "description": "Node that caused failure (if fail)"
1282
+ "rationale": {
1283
+ "description": "Why this option is recommended (framed at the caller's value: gains/risks). Example: 'For the guide, advancing to serving triggers the delivery flow'",
1284
+ "type": "string"
722
1285
  },
723
- "passport_id": {
724
- "type": "string",
725
- "description": "Generated Passport ID (if pass)"
1286
+ "caveat": {
1287
+ "description": "Disclosed trade-off / opportunity cost of NOT taking another path (K3 Game G3 机会成本). Example: 'Choosing cancelled forfeits this order's settlement'",
1288
+ "type": "string"
726
1289
  }
727
1290
  },
728
- "required": [
729
- "status"
730
- ],
731
- "additionalProperties": false,
732
- "description": "gen_passport static test result. Must pass before CREATE."
1291
+ "additionalProperties": false
733
1292
  },
734
- "risk_assessment": {
735
- "type": "object",
736
- "properties": {
737
- "overall_risk": {
738
- "type": "string",
739
- "enum": [
740
- "critical",
741
- "high",
742
- "medium",
743
- "low",
744
- "info"
745
- ],
746
- "description": "Overall risk level (highest from all risks)"
747
- },
748
- "risk_count": {
749
- "type": "integer",
750
- "description": "Total number of detected risks"
751
- },
752
- "critical_count": {
753
- "type": "integer",
754
- "description": "Number of critical risks"
755
- },
756
- "high_count": {
757
- "type": "integer",
758
- "description": "Number of high risks"
759
- },
760
- "needs_human_review": {
761
- "type": "boolean",
762
- "description": "Whether human review is required (critical or 2+ high risks)"
763
- },
764
- "top_risks": {
765
- "type": "array",
766
- "items": {
767
- "type": "string"
768
- },
769
- "description": "Top risk titles (critical and high, max 3)"
770
- },
771
- "stakeholder_advice": {
772
- "type": "object",
773
- "additionalProperties": {
774
- "type": "array",
775
- "items": {
776
- "type": "string"
777
- }
778
- },
779
- "description": "Per-stakeholder advice. Key=stakeholder (customer/provider/arbitrator/claimant), value=advice list"
780
- }
781
- },
782
- "required": [
783
- "overall_risk",
784
- "risk_count",
785
- "critical_count",
786
- "high_count",
787
- "needs_human_review",
788
- "top_risks"
789
- ],
790
- "additionalProperties": false,
791
- "description": "Business-layer risk assessment (game theory, data source trust, logic gaps). Populated during Guard design to warn about business risks beyond syntax."
1293
+ "note": {
1294
+ "description": "Additional note (e.g. wait for the other party, entry/terminal hint).",
1295
+ "type": "string"
792
1296
  }
793
1297
  },
794
- "additionalProperties": false,
795
- "description": "Phase 5 Guard capability advice (populated when user intent involves Guard). Provides puzzle status, scene matching, suggested patterns, available queries, risk warnings, and confirmation text. AI uses this to guide Guard design dialogue (R1-R10)."
1298
+ "required": [
1299
+ "current_node",
1300
+ "options"
1301
+ ],
1302
+ "additionalProperties": false
1303
+ },
1304
+ "note": {
1305
+ "description": "Additional note.",
1306
+ "type": "string"
796
1307
  }
797
1308
  },
798
1309
  "required": [
799
- "intent",
800
- "status",
801
- "summary"
1310
+ "account",
1311
+ "action",
1312
+ "forward",
1313
+ "target_node",
1314
+ "migrated",
1315
+ "current_node"
802
1316
  ],
803
- "additionalProperties": false,
804
- "description": "Business semantic summary for bridge operation"
1317
+ "additionalProperties": false
805
1318
  }
806
1319
  },
807
1320
  "required": [
808
- "result"
1321
+ "intent",
1322
+ "status",
1323
+ "summary"
809
1324
  ],
810
- "additionalProperties": false,
811
- "description": "Bridge operation output (matches CallOutput structure returned by the handler)"
1325
+ "additionalProperties": false
812
1326
  }
813
- }
1327
+ },
1328
+ "required": [
1329
+ "result"
1330
+ ],
1331
+ "additionalProperties": false
814
1332
  }