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