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