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