@wowok/agent-mcp 2.7.2 → 2.7.4

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 (383) hide show
  1. package/dist/config/runtime.js +1 -1
  2. package/dist/customer/account-events.d.ts +32 -0
  3. package/dist/customer/account-events.js +1 -0
  4. package/dist/customer/customer-advice.d.ts +1 -0
  5. package/dist/customer/customer-advice.js +1 -1
  6. package/dist/customer/info-puzzle.js +1 -1
  7. package/dist/customer/order-strategy.d.ts +1 -1
  8. package/dist/customer/reminder-system.d.ts +2 -0
  9. package/dist/customer/reminder-system.js +1 -1
  10. package/dist/customer/risk-assessment.d.ts +1 -0
  11. package/dist/customer/risk-assessment.js +1 -1
  12. package/dist/customer/types.d.ts +2 -0
  13. package/dist/evaluation/builtins/arbitration-score.d.ts +41 -0
  14. package/dist/evaluation/builtins/arbitration-score.js +1 -0
  15. package/dist/evaluation/builtins/index.d.ts +1 -0
  16. package/dist/evaluation/builtins/index.js +1 -1
  17. package/dist/evaluation/category-match-rules.d.ts +30 -0
  18. package/dist/evaluation/category-match-rules.js +1 -0
  19. package/dist/evaluation/engine.js +1 -1
  20. package/dist/evaluation/extract.js +1 -1
  21. package/dist/evaluation/index.d.ts +1 -0
  22. package/dist/evaluation/index.js +1 -1
  23. package/dist/evaluation/location-match.d.ts +42 -0
  24. package/dist/evaluation/location-match.js +1 -0
  25. package/dist/evaluation/path-reasoning.d.ts +35 -0
  26. package/dist/evaluation/path-reasoning.js +1 -0
  27. package/dist/evaluation/region.d.ts +6 -0
  28. package/dist/evaluation/region.js +1 -1
  29. package/dist/evaluation/types.d.ts +17 -0
  30. package/dist/experience/realtime-feedback.js +1 -1
  31. package/dist/experience/user-profile.d.ts +1 -1
  32. package/dist/extensions/index.d.ts +6 -0
  33. package/dist/extensions/index.js +1 -1
  34. package/dist/extensions/industry-layers.d.ts +75 -0
  35. package/dist/extensions/industry-layers.js +1 -0
  36. package/dist/extensions/industry-pack.d.ts +105 -0
  37. package/dist/extensions/industry-pack.js +1 -0
  38. package/dist/extensions/metric-registry.js +1 -1
  39. package/dist/extensions/mode-evaluator.d.ts +1 -1
  40. package/dist/extensions/registry.d.ts +1 -0
  41. package/dist/extensions/registry.js +1 -1
  42. package/dist/graph/base.d.ts +8 -0
  43. package/dist/graph/base.js +1 -0
  44. package/dist/harness/index.d.ts +1 -0
  45. package/dist/harness/index.js +1 -1
  46. package/dist/harness/plan.d.ts +2 -0
  47. package/dist/harness/plan.js +1 -1
  48. package/dist/harness/recover.d.ts +1 -1
  49. package/dist/harness/types.d.ts +2 -3
  50. package/dist/index.js +1 -1
  51. package/dist/knowledge/allocation-confirm.js +1 -1
  52. package/dist/knowledge/anti-cheat.d.ts +37 -0
  53. package/dist/knowledge/anti-cheat.js +1 -0
  54. package/dist/knowledge/arb-confirm.d.ts +28 -0
  55. package/dist/knowledge/arb-confirm.js +1 -0
  56. package/dist/knowledge/arb-translation.d.ts +48 -0
  57. package/dist/knowledge/arb-translation.js +1 -0
  58. package/dist/knowledge/arbitration-context.js +1 -1
  59. package/dist/knowledge/arbitration-ledger.js +1 -1
  60. package/dist/knowledge/bridge-confirm.d.ts +26 -0
  61. package/dist/knowledge/bridge-confirm.js +1 -0
  62. package/dist/knowledge/bridge-translation.d.ts +37 -0
  63. package/dist/knowledge/bridge-translation.js +1 -0
  64. package/dist/knowledge/contact-confirm.d.ts +27 -0
  65. package/dist/knowledge/contact-confirm.js +1 -0
  66. package/dist/knowledge/contact-translation.d.ts +39 -0
  67. package/dist/knowledge/contact-translation.js +1 -0
  68. package/dist/knowledge/demand-confirm.js +1 -1
  69. package/dist/knowledge/demand-context.d.ts +17 -0
  70. package/dist/knowledge/demand-context.js +1 -0
  71. package/dist/knowledge/demand-ledger.d.ts +26 -0
  72. package/dist/knowledge/demand-ledger.js +1 -0
  73. package/dist/knowledge/demand-puzzle.d.ts +29 -0
  74. package/dist/knowledge/demand-puzzle.js +1 -0
  75. package/dist/knowledge/demand-risk.js +1 -1
  76. package/dist/knowledge/demand-templates.d.ts +12 -0
  77. package/dist/knowledge/demand-templates.js +1 -0
  78. package/dist/knowledge/demand-translation.js +1 -1
  79. package/dist/knowledge/deployment-scanner.js +1 -1
  80. package/dist/knowledge/evidence-review.d.ts +12 -0
  81. package/dist/knowledge/evidence-review.js +1 -0
  82. package/dist/knowledge/examples-scanner-cli.js +1 -1
  83. package/dist/knowledge/examples-scanner.js +1 -1
  84. package/dist/knowledge/flywheel-loop.d.ts +0 -1
  85. package/dist/knowledge/flywheel-loop.js +1 -1
  86. package/dist/knowledge/guard-design-patterns.js +1 -1
  87. package/dist/knowledge/guard-migration.d.ts +1 -1
  88. package/dist/knowledge/index.d.ts +71 -3
  89. package/dist/knowledge/index.js +1 -1
  90. package/dist/knowledge/industry-registry.js +1 -1
  91. package/dist/knowledge/machine-render.js +1 -1
  92. package/dist/knowledge/market-metrics.d.ts +12 -0
  93. package/dist/knowledge/market-metrics.js +1 -0
  94. package/dist/knowledge/market-operations.d.ts +46 -0
  95. package/dist/knowledge/market-operations.js +1 -0
  96. package/dist/knowledge/mcp-schema-audit-cli.js +1 -1
  97. package/dist/knowledge/mcp-schema-audit.d.ts +22 -22
  98. package/dist/knowledge/mcp-schema-audit.js +1 -1
  99. package/dist/knowledge/onchain-constants.d.ts +2 -2
  100. package/dist/knowledge/onchain-constants.js +1 -1
  101. package/dist/knowledge/payment-confirm.d.ts +26 -0
  102. package/dist/knowledge/payment-confirm.js +1 -0
  103. package/dist/knowledge/payment-risk.js +1 -1
  104. package/dist/knowledge/payment-translation.d.ts +37 -0
  105. package/dist/knowledge/payment-translation.js +1 -0
  106. package/dist/knowledge/permission-context.d.ts +11 -0
  107. package/dist/knowledge/permission-context.js +1 -1
  108. package/dist/knowledge/permission-ledger.d.ts +11 -0
  109. package/dist/knowledge/permission-ledger.js +1 -1
  110. package/dist/knowledge/personal-confirm.d.ts +29 -0
  111. package/dist/knowledge/personal-confirm.js +1 -0
  112. package/dist/knowledge/personal-risk.js +1 -1
  113. package/dist/knowledge/personal-translation.d.ts +37 -0
  114. package/dist/knowledge/personal-translation.js +1 -0
  115. package/dist/knowledge/process-model.d.ts +1 -11
  116. package/dist/knowledge/process-model.js +1 -1
  117. package/dist/knowledge/progress-ledger.js +1 -1
  118. package/dist/knowledge/progress-risk.js +1 -1
  119. package/dist/knowledge/progress-templates.js +1 -1
  120. package/dist/knowledge/progress-translation.js +1 -1
  121. package/dist/knowledge/proof-context.d.ts +17 -0
  122. package/dist/knowledge/proof-context.js +1 -0
  123. package/dist/knowledge/proof-ledger.d.ts +34 -0
  124. package/dist/knowledge/proof-ledger.js +1 -0
  125. package/dist/knowledge/proof-puzzle.d.ts +35 -0
  126. package/dist/knowledge/proof-puzzle.js +1 -0
  127. package/dist/knowledge/proof-templates.d.ts +22 -0
  128. package/dist/knowledge/proof-templates.js +1 -0
  129. package/dist/knowledge/registrar-confirm.d.ts +26 -0
  130. package/dist/knowledge/registrar-confirm.js +1 -0
  131. package/dist/knowledge/registrar-risk.js +1 -1
  132. package/dist/knowledge/registrar-translation.d.ts +37 -0
  133. package/dist/knowledge/registrar-translation.js +1 -0
  134. package/dist/knowledge/repository-context.d.ts +12 -0
  135. package/dist/knowledge/repository-context.js +1 -0
  136. package/dist/knowledge/repository-ledger.d.ts +25 -0
  137. package/dist/knowledge/repository-ledger.js +1 -0
  138. package/dist/knowledge/repository-puzzle.d.ts +30 -0
  139. package/dist/knowledge/repository-puzzle.js +1 -0
  140. package/dist/knowledge/repository-templates.d.ts +14 -0
  141. package/dist/knowledge/repository-templates.js +1 -0
  142. package/dist/knowledge/resource-confirm.d.ts +25 -0
  143. package/dist/knowledge/resource-confirm.js +1 -0
  144. package/dist/knowledge/resource-translation.d.ts +37 -0
  145. package/dist/knowledge/resource-translation.js +1 -0
  146. package/dist/knowledge/reward-context.d.ts +2 -2
  147. package/dist/knowledge/reward-ledger.js +1 -1
  148. package/dist/knowledge/reward-translation.js +1 -1
  149. package/dist/knowledge/safety-rules.d.ts +1 -0
  150. package/dist/knowledge/safety-rules.js +1 -1
  151. package/dist/knowledge/service-risk.d.ts +1 -1
  152. package/dist/knowledge/service-risk.js +1 -1
  153. package/dist/knowledge/template-registry.js +1 -1
  154. package/dist/knowledge/tools-reference.js +1 -1
  155. package/dist/knowledge/treasury-context.d.ts +1 -1
  156. package/dist/knowledge/treasury-context.js +1 -1
  157. package/dist/knowledge/treasury-ledger.js +1 -1
  158. package/dist/knowledge/treasury-risk.js +1 -1
  159. package/dist/knowledge/universal-template.d.ts +22 -0
  160. package/dist/knowledge/universal-template.js +1 -0
  161. package/dist/knowledge/util-confirm.d.ts +24 -0
  162. package/dist/knowledge/util-confirm.js +1 -0
  163. package/dist/knowledge/util-risk.js +1 -1
  164. package/dist/knowledge/util-translation.d.ts +39 -0
  165. package/dist/knowledge/util-translation.js +1 -0
  166. package/dist/knowledge/workflow-guidance.d.ts +180 -0
  167. package/dist/knowledge/workflow-guidance.js +1 -0
  168. package/dist/participation/employee-kpi.d.ts +25 -0
  169. package/dist/participation/employee-kpi.js +1 -0
  170. package/dist/participation/employee-store.d.ts +16 -0
  171. package/dist/participation/employee-store.js +1 -0
  172. package/dist/participation/index.d.ts +2 -0
  173. package/dist/participation/index.js +1 -0
  174. package/dist/persona/defaults.js +1 -1
  175. package/dist/persona/index.d.ts +9 -2
  176. package/dist/persona/index.js +1 -1
  177. package/dist/persona/local-region.d.ts +20 -0
  178. package/dist/persona/local-region.js +1 -0
  179. package/dist/persona/model.js +1 -1
  180. package/dist/persona/overrides.d.ts +10 -0
  181. package/dist/persona/overrides.js +1 -0
  182. package/dist/persona/pack-personae.d.ts +11 -0
  183. package/dist/persona/pack-personae.js +1 -0
  184. package/dist/persona/strategy-intent.d.ts +20 -0
  185. package/dist/persona/strategy-intent.js +1 -0
  186. package/dist/persona/types.d.ts +3 -1
  187. package/dist/project/business-puzzle.d.ts +1 -1
  188. package/dist/project/business-puzzle.js +1 -1
  189. package/dist/project/deployment-doc.js +1 -1
  190. package/dist/project/edit-planner.js +1 -1
  191. package/dist/project/evaluation.d.ts +37 -1
  192. package/dist/project/evaluation.js +1 -1
  193. package/dist/project/graph-builder.d.ts +2 -2
  194. package/dist/project/graph-builder.js +1 -1
  195. package/dist/project/graph.d.ts +3 -6
  196. package/dist/project/handlers.d.ts +33 -2
  197. package/dist/project/handlers.js +1 -1
  198. package/dist/project/index.d.ts +1 -0
  199. package/dist/project/index.js +1 -1
  200. package/dist/project/merchant-guide.d.ts +19 -0
  201. package/dist/project/merchant-guide.js +1 -1
  202. package/dist/project/mode-actions.js +1 -1
  203. package/dist/project/rollback-policy.js +1 -1
  204. package/dist/project/semantic-assembler.d.ts +2 -2
  205. package/dist/project/semantic-assembler.js +1 -1
  206. package/dist/project/semantic-graph.d.ts +3 -5
  207. package/dist/project/workflow-design-assessment.d.ts +24 -0
  208. package/dist/project/workflow-design-assessment.js +1 -0
  209. package/dist/safety/confirm-gate.d.ts +1 -1
  210. package/dist/safety/confirm-gate.js +1 -1
  211. package/dist/schema/call/allocation.d.ts +186 -1385
  212. package/dist/schema/call/arbitration.d.ts +272 -1871
  213. package/dist/schema/call/base.d.ts +1831 -9076
  214. package/dist/schema/call/base.js +1 -1
  215. package/dist/schema/call/bridge.d.ts +911 -3171
  216. package/dist/schema/call/contact.d.ts +135 -931
  217. package/dist/schema/call/demand.d.ts +164 -1194
  218. package/dist/schema/call/guard.d.ts +298 -1140
  219. package/dist/schema/call/guard.js +1 -1
  220. package/dist/schema/call/machine.d.ts +459 -5403
  221. package/dist/schema/call/machine.js +1 -1
  222. package/dist/schema/call/order.d.ts +137 -844
  223. package/dist/schema/call/payment.d.ts +74 -561
  224. package/dist/schema/call/permission.d.ts +335 -2791
  225. package/dist/schema/call/personal.d.ts +227 -1814
  226. package/dist/schema/call/progress.d.ts +140 -843
  227. package/dist/schema/call/proof.d.ts +42 -258
  228. package/dist/schema/call/repository.d.ts +324 -2222
  229. package/dist/schema/call/reward.d.ts +153 -1183
  230. package/dist/schema/call/semantic.js +1 -1
  231. package/dist/schema/call/service.d.ts +376 -3431
  232. package/dist/schema/call/treasury.d.ts +252 -2158
  233. package/dist/schema/common/index.d.ts +222 -697
  234. package/dist/schema/common/index.js +1 -1
  235. package/dist/schema/config/index.d.ts +18 -161
  236. package/dist/schema/employee/index.d.ts +99 -0
  237. package/dist/schema/employee/index.js +1 -0
  238. package/dist/schema/evaluation/index.d.ts +1035 -3918
  239. package/dist/schema/evaluation/index.js +1 -1
  240. package/dist/schema/index.d.ts +5 -0
  241. package/dist/schema/index.js +1 -1
  242. package/dist/schema/industry-pack/index.d.ts +132 -0
  243. package/dist/schema/industry-pack/index.js +1 -0
  244. package/dist/schema/intent-radar/index.d.ts +92 -245
  245. package/dist/schema/intent-radar/index.js +1 -1
  246. package/dist/schema/local/index.d.ts +2045 -18080
  247. package/dist/schema/local/index.js +1 -1
  248. package/dist/schema/local/wip.d.ts +61 -651
  249. package/dist/schema/local/wip.js +1 -1
  250. package/dist/schema/messenger/index.d.ts +949 -5557
  251. package/dist/schema/messenger/index.js +1 -1
  252. package/dist/schema/operations.d.ts +3168 -26468
  253. package/dist/schema/operations.js +1 -1
  254. package/dist/schema/permission/index.d.ts +121 -0
  255. package/dist/schema/permission/index.js +1 -0
  256. package/dist/schema/persona/index.d.ts +469 -1820
  257. package/dist/schema/persona/index.js +1 -1
  258. package/dist/schema/project/index.d.ts +1023 -8450
  259. package/dist/schema/project/index.js +1 -1
  260. package/dist/schema/query/index.d.ts +12121 -75556
  261. package/dist/schema/query/index.js +1 -1
  262. package/dist/schema/schema-query/index.d.ts +35 -98
  263. package/dist/schema/schema-query/index.js +1 -1
  264. package/dist/schema/schema-version.js +1 -1
  265. package/dist/schema/task-status.d.ts +26 -132
  266. package/dist/schema/trust/index.d.ts +194 -1290
  267. package/dist/schema/utils/guard-parser.js +1 -1
  268. package/dist/schema/utils/node-parser.js +1 -1
  269. package/dist/schema/utils/skills-recommendation.d.ts +1 -0
  270. package/dist/schema/utils/skills-recommendation.js +1 -1
  271. package/dist/schema/workflow/index.d.ts +161 -0
  272. package/dist/schema/workflow/index.js +1 -0
  273. package/dist/schema/workspace/index.d.ts +69 -0
  274. package/dist/schema/workspace/index.js +1 -0
  275. package/dist/{schema-query → schema-query-impl}/index.js +1 -1
  276. package/dist/schemas/account_operation.output.json +3147 -1655
  277. package/dist/schemas/account_operation.schema.json +225 -218
  278. package/dist/schemas/bridge_operation.output.json +1168 -653
  279. package/dist/schemas/bridge_operation.schema.json +736 -504
  280. package/dist/schemas/config_operation.output.json +185 -179
  281. package/dist/schemas/config_operation.schema.json +21 -26
  282. package/dist/schemas/employee_operation.output.json +207 -0
  283. package/dist/schemas/employee_operation.schema.json +176 -0
  284. package/dist/schemas/evaluation_operation.output.json +2268 -601
  285. package/dist/schemas/evaluation_operation.schema.json +2919 -787
  286. package/dist/schemas/guard2file.output.json +58 -64
  287. package/dist/schemas/guard2file.schema.json +79 -81
  288. package/dist/schemas/index.json +41 -11
  289. package/dist/schemas/industry_pack_operation.output.json +594 -0
  290. package/dist/schemas/industry_pack_operation.schema.json +55 -0
  291. package/dist/schemas/intent_radar.output.json +275 -203
  292. package/dist/schemas/intent_radar.schema.json +124 -126
  293. package/dist/schemas/local_info_operation.output.json +1174 -660
  294. package/dist/schemas/local_info_operation.schema.json +119 -125
  295. package/dist/schemas/local_mark_operation.output.json +1239 -692
  296. package/dist/schemas/local_mark_operation.schema.json +91 -96
  297. package/dist/schemas/machineNode2file.output.json +63 -69
  298. package/dist/schemas/machineNode2file.schema.json +79 -81
  299. package/dist/schemas/messenger_operation.output.json +2722 -1531
  300. package/dist/schemas/messenger_operation.schema.json +1482 -1264
  301. package/dist/schemas/onchain_events.output.json +2590 -978
  302. package/dist/schemas/onchain_events.schema.json +117 -99
  303. package/dist/schemas/onchain_operations.output.json +3957 -2312
  304. package/dist/schemas/onchain_operations.schema.json +20799 -9285
  305. package/dist/schemas/onchain_operations_allocation.schema.json +171 -107
  306. package/dist/schemas/onchain_operations_arbitration.schema.json +233 -146
  307. package/dist/schemas/onchain_operations_contact.schema.json +129 -90
  308. package/dist/schemas/onchain_operations_demand.schema.json +170 -112
  309. package/dist/schemas/onchain_operations_gen_passport.schema.json +61 -646
  310. package/dist/schemas/onchain_operations_gen_proof.schema.json +40 -172
  311. package/dist/schemas/onchain_operations_guard.schema.json +3765 -294
  312. package/dist/schemas/onchain_operations_machine.schema.json +536 -163
  313. package/dist/schemas/onchain_operations_order.schema.json +126 -96
  314. package/dist/schemas/onchain_operations_payment.schema.json +82 -67
  315. package/dist/schemas/onchain_operations_permission.schema.json +331 -93
  316. package/dist/schemas/onchain_operations_personal.schema.json +636 -96
  317. package/dist/schemas/onchain_operations_progress.schema.json +125 -92
  318. package/dist/schemas/onchain_operations_proof.schema.json +76 -69
  319. package/dist/schemas/onchain_operations_repository.schema.json +636 -249
  320. package/dist/schemas/onchain_operations_reward.schema.json +218 -108
  321. package/dist/schemas/onchain_operations_service.schema.json +678 -220
  322. package/dist/schemas/onchain_operations_treasury.schema.json +401 -135
  323. package/dist/schemas/onchain_table_data.output.json +6833 -2432
  324. package/dist/schemas/onchain_table_data.schema.json +684 -417
  325. package/dist/schemas/permission_operation.output.json +173 -0
  326. package/dist/schemas/permission_operation.schema.json +39 -0
  327. package/dist/schemas/persona_operation.output.json +1568 -268
  328. package/dist/schemas/persona_operation.schema.json +346 -205
  329. package/dist/schemas/project_operation.output.json +6922 -5132
  330. package/dist/schemas/project_operation.schema.json +1050 -1020
  331. package/dist/schemas/query_task_status.output.json +195 -99
  332. package/dist/schemas/query_task_status.schema.json +12 -18
  333. package/dist/schemas/query_toolkit.output.json +18862 -14561
  334. package/dist/schemas/query_toolkit.schema.json +614 -522
  335. package/dist/schemas/schema_query.output.json +127 -129
  336. package/dist/schemas/schema_query.schema.json +64 -69
  337. package/dist/schemas/trust_score.output.json +678 -587
  338. package/dist/schemas/trust_score.schema.json +289 -277
  339. package/dist/schemas/wip_file.output.json +116 -124
  340. package/dist/schemas/wip_file.schema.json +142 -143
  341. package/dist/schemas/workflow_operation.output.json +164 -0
  342. package/dist/schemas/workflow_operation.schema.json +116 -0
  343. package/dist/schemas/workspace_operation.output.json +277 -0
  344. package/dist/schemas/workspace_operation.schema.json +45 -0
  345. package/dist/schemas/wowok_buildin_info.output.json +1682 -844
  346. package/dist/schemas/wowok_buildin_info.schema.json +576 -526
  347. package/dist/tools/handlers/bridge.d.ts +8 -1
  348. package/dist/tools/handlers/bridge.js +1 -1
  349. package/dist/tools/handlers/config.js +1 -1
  350. package/dist/tools/handlers/employee.d.ts +2 -0
  351. package/dist/tools/handlers/employee.js +1 -0
  352. package/dist/tools/handlers/evaluation.js +1 -1
  353. package/dist/tools/handlers/file-export.js +1 -1
  354. package/dist/tools/handlers/industry-pack.d.ts +2 -0
  355. package/dist/tools/handlers/industry-pack.js +1 -0
  356. package/dist/tools/handlers/onchain.js +1 -1
  357. package/dist/tools/handlers/permission.d.ts +2 -0
  358. package/dist/tools/handlers/permission.js +1 -0
  359. package/dist/tools/handlers/persona.js +1 -1
  360. package/dist/tools/handlers/project.js +1 -1
  361. package/dist/tools/handlers/query.js +1 -1
  362. package/dist/tools/handlers/schema-query.js +1 -1
  363. package/dist/tools/handlers/trust.js +1 -1
  364. package/dist/tools/handlers/wip.js +1 -1
  365. package/dist/tools/handlers/workflow.d.ts +2 -0
  366. package/dist/tools/handlers/workflow.js +1 -0
  367. package/dist/tools/handlers/workspace.d.ts +4 -0
  368. package/dist/tools/handlers/workspace.js +1 -0
  369. package/dist/tools/index.d.ts +2 -1
  370. package/dist/tools/index.js +1 -1
  371. package/dist/tools/rules-hook.d.ts +1 -1
  372. package/dist/tools/rules-hook.js +1 -1
  373. package/dist/tools/shared.d.ts +1 -1
  374. package/dist/tools/shared.js +1 -1
  375. package/dist/tools/types.d.ts +2 -1
  376. package/package.json +4 -5
  377. package/dist/knowledge/arbitration-trust.d.ts +0 -24
  378. package/dist/knowledge/arbitration-trust.js +0 -1
  379. package/dist/schema/call/bridge-handler.d.ts +0 -8
  380. package/dist/schema/call/bridge-handler.js +0 -1
  381. package/dist/schema/sync-layer4.d.ts +0 -21
  382. package/dist/schema/sync-layer4.js +0 -1
  383. /package/dist/{schema-query → schema-query-impl}/index.d.ts +0 -0
@@ -1,867 +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 (merchant/customer/prospect/supplier/collaborator/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
- "merchant",
611
- "customer",
612
- "prospect",
613
- "supplier",
614
- "collaborator",
615
- "arbitrator"
616
- ],
617
- "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"
618
1124
  }
619
1125
  },
620
- "required": [
621
- "confidence"
622
- ],
623
- "additionalProperties": false,
624
- "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
625
1127
  },
626
- "guard_advice": {
627
- "type": "object",
628
- "properties": {
629
- "current_round": {
630
- "type": "string",
631
- "enum": [
632
- "R1",
633
- "R2",
634
- "R3",
635
- "R4",
636
- "R5",
637
- "R6",
638
- "R7",
639
- "R8",
640
- "R9",
641
- "R10"
642
- ],
643
- "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'"
644
- },
645
- "puzzle_status": {
646
- "type": "object",
647
- "properties": {
648
- "intent": {
649
- "type": "boolean",
650
- "description": "Intent dimension complete (action + rule + failure conditions)"
651
- },
652
- "binding": {
653
- "type": "boolean",
654
- "description": "Binding dimension complete (host object + field + circular ref)"
655
- },
656
- "data": {
657
- "type": "boolean",
658
- "description": "Data dimension complete (table entries + witnesses)"
659
- },
660
- "query": {
661
- "type": "boolean",
662
- "description": "Query dimension complete (query instructions if needed)"
663
- },
664
- "logic": {
665
- "type": "boolean",
666
- "description": "Logic dimension complete (root node returns Bool)"
667
- },
668
- "constraints": {
669
- "type": "boolean",
670
- "description": "Constraints dimension complete (10 Pitfalls checked)"
671
- }
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'"
672
1198
  },
673
- "required": [
674
- "intent",
675
- "binding",
676
- "data",
677
- "query",
678
- "logic",
679
- "constraints"
680
- ],
681
- "additionalProperties": false,
682
- "description": "Information puzzle completeness (6 dimensions). Missing dimensions need user input before CREATE."
683
- },
684
- "matched_scene": {
685
- "type": "string",
686
- "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
+ }
687
1236
  },
688
- "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": {
689
1250
  "type": "string",
690
- "description": "Human-readable scene description. Example: 'Workflow node forward validation (Forward.guard)'"
691
- },
692
- "scene_constraints": {
693
- "type": "array",
694
- "items": {
695
- "type": "string"
696
- },
697
- "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'"
698
1252
  },
699
- "suggested_patterns": {
700
- "type": "array",
701
- "items": {
702
- "type": "string"
703
- },
704
- "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"
705
1256
  },
706
- "available_queries": {
1257
+ "options": {
707
1258
  "type": "array",
708
1259
  "items": {
709
1260
  "type": "object",
710
1261
  "properties": {
711
- "id": {
712
- "type": "integer",
713
- "description": "Query instruction ID. Example: 1253"
714
- },
715
- "name": {
1262
+ "next_node": {
716
1263
  "type": "string",
717
- "description": "Query instruction name. Example: 'progress.current'"
1264
+ "description": "Target node this forward advances INTO. Example: 'serving'"
718
1265
  },
719
- "objectType": {
1266
+ "forward": {
720
1267
  "type": "string",
721
- "description": "Target object type. Example: 'Progress'"
1268
+ "description": "Forward (operation) name. Example: 'StartService'"
722
1269
  },
723
- "returnType": {
724
- "type": "string",
725
- "description": "Return value type. Example: 'String'"
1270
+ "weight": {
1271
+ "type": "number",
1272
+ "description": "Forward weight contributed toward the pair threshold. Example: 1"
726
1273
  },
727
- "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": {
728
1316
  "type": "string",
729
- "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"
730
1342
  }
731
1343
  },
732
1344
  "required": [
733
- "id",
734
- "name",
735
- "objectType",
736
- "returnType"
1345
+ "next_node",
1346
+ "forward",
1347
+ "weight",
1348
+ "operator",
1349
+ "business_meaning"
737
1350
  ],
738
1351
  "additionalProperties": false,
739
- "description": "A Guard query instruction available for the current context (subset of GUARDQUERY 375 entries)."
740
- },
741
- "description": "Available query instructions for the current context (subset of 375 GUARDQUERY entries)"
742
- },
743
- "risk_warnings": {
744
- "type": "array",
745
- "items": {
746
- "type": "string"
1352
+ "description": "A reachable next-node option with its operator/permission, guard, business meaning, and K3-style gains/risks/consistency."
747
1353
  },
748
- "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)."
749
1355
  },
750
- "pending_questions": {
751
- "type": "array",
752
- "items": {
753
- "type": "string"
754
- },
755
- "description": "Questions for the user to complete the puzzle. Example: ['Which Host Object will the Guard bind to?']"
756
- },
757
- "confirmation_text": {
758
- "type": "string",
759
- "description": "Structured semantic confirmation text for user review (generated when puzzle is complete). User must explicitly confirm before CREATE."
760
- },
761
- "test_result": {
1356
+ "recommendation": {
1357
+ "description": "Recommended option with rationale (K3 Game 意图/博弈/利益).",
762
1358
  "type": "object",
763
1359
  "properties": {
764
- "status": {
765
- "type": "string",
766
- "enum": [
767
- "pass",
768
- "fail",
769
- "not_tested"
770
- ]
1360
+ "best": {
1361
+ "description": "Recommended action in '<forward> → <next_node>' form. Example: 'StartService → serving'",
1362
+ "type": "string"
771
1363
  },
772
- "failure_node": {
773
- "type": "string",
774
- "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"
775
1367
  },
776
- "passport_id": {
777
- "type": "string",
778
- "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"
779
1371
  }
780
1372
  },
781
- "required": [
782
- "status"
783
- ],
784
- "additionalProperties": false,
785
- "description": "gen_passport static test result. Must pass before CREATE."
1373
+ "additionalProperties": false
786
1374
  },
787
- "risk_assessment": {
788
- "type": "object",
789
- "properties": {
790
- "overall_risk": {
791
- "type": "string",
792
- "enum": [
793
- "critical",
794
- "high",
795
- "medium",
796
- "low",
797
- "info"
798
- ],
799
- "description": "Overall risk level (highest from all risks)"
800
- },
801
- "risk_count": {
802
- "type": "integer",
803
- "description": "Total number of detected risks"
804
- },
805
- "critical_count": {
806
- "type": "integer",
807
- "description": "Number of critical risks"
808
- },
809
- "high_count": {
810
- "type": "integer",
811
- "description": "Number of high risks"
812
- },
813
- "needs_human_review": {
814
- "type": "boolean",
815
- "description": "Whether human review is required (critical or 2+ high risks)"
816
- },
817
- "top_risks": {
818
- "type": "array",
819
- "items": {
820
- "type": "string"
821
- },
822
- "description": "Top risk titles (critical and high, max 3)"
823
- },
824
- "stakeholder_advice": {
825
- "type": "object",
826
- "additionalProperties": {
827
- "type": "array",
828
- "items": {
829
- "type": "string"
830
- }
831
- },
832
- "description": "Per-stakeholder advice. Key=stakeholder (customer/provider/arbitrator/claimant), value=advice list"
833
- }
834
- },
835
- "required": [
836
- "overall_risk",
837
- "risk_count",
838
- "critical_count",
839
- "high_count",
840
- "needs_human_review",
841
- "top_risks"
842
- ],
843
- "additionalProperties": false,
844
- "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"
845
1378
  }
846
1379
  },
847
- "additionalProperties": false,
848
- "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"
849
1389
  }
850
1390
  },
851
1391
  "required": [
852
- "intent",
853
- "status",
854
- "summary"
1392
+ "account",
1393
+ "action",
1394
+ "forward",
1395
+ "target_node",
1396
+ "migrated",
1397
+ "current_node"
855
1398
  ],
856
- "additionalProperties": false,
857
- "description": "Business semantic summary for local mark operation"
1399
+ "additionalProperties": false
858
1400
  }
859
1401
  },
860
1402
  "required": [
861
- "result"
1403
+ "intent",
1404
+ "status",
1405
+ "summary"
862
1406
  ],
863
- "additionalProperties": false,
864
- "description": "Local mark operation output wrapped schema"
1407
+ "additionalProperties": false
865
1408
  }
866
- }
1409
+ },
1410
+ "required": [
1411
+ "result"
1412
+ ],
1413
+ "additionalProperties": false
867
1414
  }