@wowok/agent-mcp 3.3.9 → 3.4.1

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 (480) hide show
  1. package/README.md +8 -0
  2. package/dist/chain-semantics/composition-truth.d.ts +102 -0
  3. package/dist/chain-semantics/composition-truth.js +1 -0
  4. package/dist/chain-semantics/eval-order.js +1 -1
  5. package/dist/chain-semantics/field-capability.js +1 -1
  6. package/dist/chain-semantics/freeze-map.js +1 -1
  7. package/dist/chain-semantics/fund-flow.js +1 -1
  8. package/dist/chain-semantics/guard-verbs.js +1 -1
  9. package/dist/chain-semantics/index.d.ts +1 -0
  10. package/dist/chain-semantics/index.js +1 -1
  11. package/dist/chain-semantics/object-graph.js +1 -1
  12. package/dist/composition/audit.js +1 -1
  13. package/dist/composition/blueprint-view.d.ts +3 -3
  14. package/dist/composition/blueprint-view.js +1 -1
  15. package/dist/composition/compile.d.ts +26 -4
  16. package/dist/composition/compile.js +1 -1
  17. package/dist/composition/emit-phases.d.ts +206 -0
  18. package/dist/composition/emit-phases.js +1 -0
  19. package/dist/composition/generate.d.ts +40 -0
  20. package/dist/composition/generate.js +1 -0
  21. package/dist/composition/guard-fill.d.ts +44 -0
  22. package/dist/composition/guard-fill.js +1 -0
  23. package/dist/composition/inflight.d.ts +26 -2
  24. package/dist/composition/inflight.js +1 -1
  25. package/dist/composition/input-normalize.d.ts +15 -0
  26. package/dist/composition/input-normalize.js +1 -0
  27. package/dist/composition/materialize.d.ts +22 -13
  28. package/dist/composition/materialize.js +1 -1
  29. package/dist/composition/mode-gates.d.ts +35 -0
  30. package/dist/composition/mode-gates.js +1 -0
  31. package/dist/composition/param-disclosure.d.ts +61 -0
  32. package/dist/composition/param-disclosure.js +1 -0
  33. package/dist/composition/plan-retry-ledger.d.ts +21 -0
  34. package/dist/composition/plan-retry-ledger.js +1 -0
  35. package/dist/composition/plan.d.ts +17 -2
  36. package/dist/composition/plan.js +1 -1
  37. package/dist/composition/product-card.d.ts +94 -0
  38. package/dist/composition/product-card.js +1 -0
  39. package/dist/composition/supply-chain-emit.d.ts +46 -0
  40. package/dist/composition/supply-chain-emit.js +1 -0
  41. package/dist/config/config-audit.spec.js +1 -1
  42. package/dist/config/config-warnings.d.ts +2 -0
  43. package/dist/config/config-warnings.js +1 -0
  44. package/dist/config/exposure.d.ts +2 -2
  45. package/dist/config/judgment.d.ts +31 -5
  46. package/dist/config/judgment.js +1 -1
  47. package/dist/config/judgment.spec.js +1 -1
  48. package/dist/config/match-policy-file.d.ts +34 -0
  49. package/dist/config/match-policy-file.js +1 -0
  50. package/dist/config/match-policy-file.spec.d.ts +1 -0
  51. package/dist/config/match-policy-file.spec.js +1 -0
  52. package/dist/config/rule-engine.d.ts +5 -5
  53. package/dist/config/rule-engine.js +1 -1
  54. package/dist/config/runtime.d.ts +0 -1
  55. package/dist/config/runtime.js +1 -1
  56. package/dist/config/severity.d.ts +0 -2
  57. package/dist/config/severity.js +1 -1
  58. package/dist/config/store-policy.spec.js +1 -1
  59. package/dist/config/template-params.d.ts +42 -0
  60. package/dist/config/template-params.js +1 -0
  61. package/dist/config/template-params.spec.d.ts +1 -0
  62. package/dist/config/template-params.spec.js +1 -0
  63. package/dist/customer/account-events.js +1 -1
  64. package/dist/data/api/api.spec.js +1 -1
  65. package/dist/data/api/cli.js +1 -1
  66. package/dist/data/api/server.d.ts +1 -0
  67. package/dist/data/api/server.js +1 -1
  68. package/dist/data/projection/store.d.ts +3 -1
  69. package/dist/data/projection/store.js +1 -1
  70. package/dist/data/projection/types.d.ts +32 -0
  71. package/dist/data/sync/cdc.d.ts +1 -2
  72. package/dist/data/sync/cdc.js +1 -1
  73. package/dist/data/sync/cdc.spec.js +1 -1
  74. package/dist/data/sync/store.d.ts +5 -0
  75. package/dist/data/sync/store.js +1 -1
  76. package/dist/data/sync/types.d.ts +2 -0
  77. package/dist/evaluation/acceptance.d.ts +8 -0
  78. package/dist/evaluation/acceptance.js +1 -1
  79. package/dist/evaluation/builtins/demand-match.js +1 -1
  80. package/dist/evaluation/builtins/graph-service.spec.js +1 -1
  81. package/dist/evaluation/capability.d.ts +2 -0
  82. package/dist/evaluation/category-match-rules.d.ts +0 -1
  83. package/dist/evaluation/category-match-rules.js +1 -1
  84. package/dist/evaluation/composer.d.ts +25 -0
  85. package/dist/evaluation/composer.js +1 -1
  86. package/dist/evaluation/engine.js +1 -1
  87. package/dist/evaluation/extract.d.ts +7 -0
  88. package/dist/evaluation/extract.js +1 -1
  89. package/dist/evaluation/game-strategy.d.ts +0 -3
  90. package/dist/evaluation/game-strategy.js +1 -1
  91. package/dist/evaluation/guard-scan.js +1 -1
  92. package/dist/evaluation/match-operation.d.ts +9 -0
  93. package/dist/evaluation/match-operation.js +1 -1
  94. package/dist/evaluation/match-policy-resolver.d.ts +9 -0
  95. package/dist/evaluation/match-policy-resolver.js +1 -0
  96. package/dist/evaluation/match-policy.d.ts +3 -1
  97. package/dist/evaluation/match-policy.js +1 -1
  98. package/dist/evaluation/region.d.ts +0 -6
  99. package/dist/evaluation/region.js +1 -1
  100. package/dist/evaluation/standards.d.ts +2 -1
  101. package/dist/evaluation/standards.js +1 -1
  102. package/dist/evaluation/structured-lines.d.ts +8 -0
  103. package/dist/evaluation/structured-lines.js +1 -0
  104. package/dist/evaluation/types.d.ts +6 -0
  105. package/dist/experience/realtime-feedback.js +1 -1
  106. package/dist/extensions/capability-manifest.d.ts +1 -0
  107. package/dist/extensions/capability-manifest.js +1 -1
  108. package/dist/extensions/capability.d.ts +91 -0
  109. package/dist/extensions/capability.js +1 -0
  110. package/dist/extensions/industry-audit.spec.js +1 -1
  111. package/dist/extensions/industry-pack.d.ts +13 -0
  112. package/dist/extensions/industry-pack.js +1 -1
  113. package/dist/extensions/modes.js +1 -1
  114. package/dist/extensions/registry.d.ts +0 -2
  115. package/dist/extensions/registry.js +1 -1
  116. package/dist/goal/GoalEngine.js +1 -1
  117. package/dist/graph/onchain/analyze.js +1 -1
  118. package/dist/graph/onchain/expand.js +1 -1
  119. package/dist/graph/onchain/exposure.js +1 -1
  120. package/dist/graph/onchain/facts.js +1 -1
  121. package/dist/graph/onchain/order-status.d.ts +0 -1
  122. package/dist/graph/onchain/order-status.js +1 -1
  123. package/dist/harness/recover.js +1 -1
  124. package/dist/harness/verify.d.ts +0 -3
  125. package/dist/harness/verify.js +1 -1
  126. package/dist/index.js +1 -1
  127. package/dist/intent/types.d.ts +0 -1
  128. package/dist/intent/types.js +1 -1
  129. package/dist/keeper/detectors.js +1 -1
  130. package/dist/keeper/types.d.ts +0 -1
  131. package/dist/keeper/types.js +1 -1
  132. package/dist/knowledge/allocation-risk.d.ts +1 -0
  133. package/dist/knowledge/allocation-risk.js +1 -1
  134. package/dist/knowledge/allocation-templates.js +1 -1
  135. package/dist/knowledge/allocator-rail-verifier.d.ts +6 -1
  136. package/dist/knowledge/allocator-rail-verifier.js +1 -1
  137. package/dist/knowledge/arb-fund-facts.d.ts +1 -0
  138. package/dist/knowledge/arb-fund-facts.js +1 -1
  139. package/dist/knowledge/arbitration-ledger.js +1 -1
  140. package/dist/knowledge/arbitration-puzzle.js +1 -1
  141. package/dist/knowledge/arbitration-risk.d.ts +1 -0
  142. package/dist/knowledge/arbitration-risk.js +1 -1
  143. package/dist/knowledge/audit-rules.d.ts +2 -2
  144. package/dist/knowledge/audit-rules.js +1 -1
  145. package/dist/knowledge/baselines/judgment-baselines.json +21 -2
  146. package/dist/knowledge/baselines/rules/allocation.json +6 -6
  147. package/dist/knowledge/baselines/rules/arb.json +2 -2
  148. package/dist/knowledge/baselines/rules/guard.json +11 -11
  149. package/dist/knowledge/baselines/rules/oracle.json +120 -0
  150. package/dist/knowledge/baselines/rules/order.json +1 -1
  151. package/dist/knowledge/baselines/rules/plan.json +385 -18
  152. package/dist/knowledge/baselines/rules/progress.json +20 -2
  153. package/dist/knowledge/baselines/semantic-facts.js +1 -1
  154. package/dist/knowledge/builtin-templates.d.ts +25 -1
  155. package/dist/knowledge/builtin-templates.js +1 -1
  156. package/dist/knowledge/catalog-facts.d.ts +4 -0
  157. package/dist/knowledge/catalog-facts.js +1 -0
  158. package/dist/knowledge/commission-landing.js +1 -1
  159. package/dist/knowledge/component-schema.d.ts +64 -0
  160. package/dist/knowledge/component-schema.js +1 -0
  161. package/dist/knowledge/contact-templates.d.ts +0 -1
  162. package/dist/knowledge/contact-templates.js +1 -1
  163. package/dist/knowledge/dynamic-pricing.js +1 -1
  164. package/dist/knowledge/entity-recipient-guard.js +1 -1
  165. package/dist/knowledge/event-semantics.js +1 -1
  166. package/dist/knowledge/fee-param-bindings.d.ts +26 -0
  167. package/dist/knowledge/fee-param-bindings.js +1 -0
  168. package/dist/knowledge/fund-layer.d.ts +1 -0
  169. package/dist/knowledge/fund-layer.js +1 -1
  170. package/dist/knowledge/game-scenarios.js +1 -1
  171. package/dist/knowledge/getting-started.d.ts +2 -2
  172. package/dist/knowledge/getting-started.js +1 -1
  173. package/dist/knowledge/guard-anchor-reach.js +1 -1
  174. package/dist/knowledge/guard-binding-table.d.ts +52 -0
  175. package/dist/knowledge/guard-binding-table.js +1 -0
  176. package/dist/knowledge/guard-binding-verifier.d.ts +30 -0
  177. package/dist/knowledge/guard-binding-verifier.js +1 -0
  178. package/dist/knowledge/guard-bindings.js +1 -1
  179. package/dist/knowledge/guard-blueprint.d.ts +68 -0
  180. package/dist/knowledge/guard-blueprint.js +1 -0
  181. package/dist/knowledge/guard-design-patterns.d.ts +1 -1
  182. package/dist/knowledge/guard-design-patterns.js +1 -1
  183. package/dist/knowledge/guard-field-cognition.js +1 -1
  184. package/dist/knowledge/guard-host-context.d.ts +24 -0
  185. package/dist/knowledge/guard-host-context.js +1 -0
  186. package/dist/knowledge/guard-ledger.js +1 -1
  187. package/dist/knowledge/guard-lint.d.ts +1 -0
  188. package/dist/knowledge/guard-lint.js +1 -1
  189. package/dist/knowledge/guard-node-gates.d.ts +3 -0
  190. package/dist/knowledge/guard-node-gates.js +1 -1
  191. package/dist/knowledge/guard-puzzle.js +1 -1
  192. package/dist/knowledge/guard-render.js +1 -1
  193. package/dist/knowledge/guard-risk.js +1 -1
  194. package/dist/knowledge/guard-submission-prompt.d.ts +11 -0
  195. package/dist/knowledge/guard-submission-prompt.js +1 -1
  196. package/dist/knowledge/guard-templates.d.ts +1 -1
  197. package/dist/knowledge/guard-templates.js +1 -1
  198. package/dist/knowledge/guard-translation.js +1 -1
  199. package/dist/knowledge/index.d.ts +1 -1
  200. package/dist/knowledge/index.js +1 -1
  201. package/dist/knowledge/industry-generalizer.d.ts +6 -1
  202. package/dist/knowledge/industry-generalizer.js +1 -1
  203. package/dist/knowledge/industry-registry.js +1 -1
  204. package/dist/knowledge/industry-strategy.js +1 -1
  205. package/dist/knowledge/jsonrpc-enum.d.ts +52 -3
  206. package/dist/knowledge/jsonrpc-enum.js +1 -1
  207. package/dist/knowledge/knob-docs.d.ts +5 -0
  208. package/dist/knowledge/knob-docs.js +1 -0
  209. package/dist/knowledge/machine-templates.js +1 -1
  210. package/dist/knowledge/machine-topology.js +1 -1
  211. package/dist/knowledge/machine-translation.js +1 -1
  212. package/dist/knowledge/object-dependency.d.ts +31 -0
  213. package/dist/knowledge/object-dependency.js +1 -0
  214. package/dist/knowledge/onchain-constants.d.ts +4 -0
  215. package/dist/knowledge/onchain-constants.js +1 -1
  216. package/dist/knowledge/order-ledger.js +1 -1
  217. package/dist/knowledge/param-schema.d.ts +93 -0
  218. package/dist/knowledge/param-schema.js +1 -0
  219. package/dist/knowledge/param-tiers.d.ts +25 -0
  220. package/dist/knowledge/param-tiers.js +1 -0
  221. package/dist/knowledge/passport-ledger.d.ts +1 -1
  222. package/dist/knowledge/passport-ledger.js +1 -1
  223. package/dist/knowledge/path-oracle/coverage.d.ts +16 -0
  224. package/dist/knowledge/path-oracle/coverage.js +1 -0
  225. package/dist/knowledge/path-oracle/index.d.ts +5 -0
  226. package/dist/knowledge/path-oracle/index.js +1 -0
  227. package/dist/knowledge/path-oracle/products/food-delivery.d.ts +2 -0
  228. package/dist/knowledge/path-oracle/products/food-delivery.js +1 -0
  229. package/dist/knowledge/path-oracle/schema.d.ts +188 -0
  230. package/dist/knowledge/path-oracle/schema.js +1 -0
  231. package/dist/knowledge/pattern-resolutions.d.ts +108 -0
  232. package/dist/knowledge/pattern-resolutions.js +1 -0
  233. package/dist/knowledge/progress-ledger.js +1 -1
  234. package/dist/knowledge/progress-risk.js +1 -1
  235. package/dist/knowledge/projection.spec.js +1 -1
  236. package/dist/knowledge/protocol-facts.js +1 -1
  237. package/dist/knowledge/requirement-families.d.ts +13 -0
  238. package/dist/knowledge/requirement-families.js +1 -0
  239. package/dist/knowledge/reward-ledger.js +1 -1
  240. package/dist/knowledge/safety-rules.js +1 -1
  241. package/dist/knowledge/scenario-modes.d.ts +2 -0
  242. package/dist/knowledge/scenario-modes.js +1 -1
  243. package/dist/knowledge/scenario-topology.js +1 -1
  244. package/dist/knowledge/semantic-ir.d.ts +4 -0
  245. package/dist/knowledge/semantic-ir.js +1 -1
  246. package/dist/knowledge/service-allocation-semantics.js +1 -1
  247. package/dist/knowledge/service-ledger.d.ts +1 -1
  248. package/dist/knowledge/service-ledger.js +1 -1
  249. package/dist/knowledge/service-templates.js +1 -1
  250. package/dist/knowledge/sku-name-gate.d.ts +17 -0
  251. package/dist/knowledge/sku-name-gate.js +1 -0
  252. package/dist/knowledge/strategy-manuals.d.ts +1 -1
  253. package/dist/knowledge/strategy-manuals.js +1 -1
  254. package/dist/knowledge/supply-chain.d.ts +9 -0
  255. package/dist/knowledge/supply-chain.js +1 -1
  256. package/dist/knowledge/template-loader.d.ts +114 -6
  257. package/dist/knowledge/template-loader.js +1 -1
  258. package/dist/knowledge/template-nav.d.ts +9 -0
  259. package/dist/knowledge/template-nav.js +1 -0
  260. package/dist/knowledge/template-prose.d.ts +1 -1
  261. package/dist/knowledge/template-registry.js +1 -1
  262. package/dist/knowledge/template-scanner.d.ts +95 -0
  263. package/dist/knowledge/template-scanner.js +1 -1
  264. package/dist/knowledge/template-test-profiles.d.ts +17 -0
  265. package/dist/knowledge/template-test-profiles.js +1 -0
  266. package/dist/knowledge/template-validation.d.ts +1 -0
  267. package/dist/knowledge/template-validation.js +1 -1
  268. package/dist/knowledge/tools-reference.js +1 -1
  269. package/dist/knowledge/treasury-templates.js +1 -1
  270. package/dist/knowledge/workflow-guidance.d.ts +5 -0
  271. package/dist/knowledge/workflow-guidance.js +1 -1
  272. package/dist/monitor/MonitorLoop.js +1 -1
  273. package/dist/participation/radar-core.js +1 -1
  274. package/dist/participation/time-window.d.ts +37 -0
  275. package/dist/participation/time-window.js +1 -0
  276. package/dist/persona/address-format.d.ts +0 -1
  277. package/dist/persona/address-format.js +1 -1
  278. package/dist/persona/bridge.js +1 -1
  279. package/dist/persona/index.d.ts +0 -2
  280. package/dist/persona/index.js +1 -1
  281. package/dist/persona/model.js +1 -1
  282. package/dist/persona/persona-audit.spec.js +1 -1
  283. package/dist/persona/types.d.ts +6 -0
  284. package/dist/playbooks/service-build/business-puzzle.js +1 -1
  285. package/dist/playbooks/service-build/game-theory.d.ts +2 -2
  286. package/dist/playbooks/service-build/intent-analyzer.js +1 -1
  287. package/dist/playbooks/service-build/machine-panorama.d.ts +1 -0
  288. package/dist/playbooks/service-build/machine-panorama.js +1 -1
  289. package/dist/playbooks/service-build/merchant-guide.d.ts +52 -22
  290. package/dist/playbooks/service-build/merchant-guide.js +1 -1
  291. package/dist/playbooks/service-build/migration-planner.d.ts +2 -0
  292. package/dist/playbooks/service-build/migration-planner.js +1 -1
  293. package/dist/playbooks/service-build/mode-actions.js +1 -1
  294. package/dist/playbooks/service-build/object-panorama.d.ts +8 -0
  295. package/dist/playbooks/service-build/object-panorama.js +1 -1
  296. package/dist/playbooks/service-build/participation-radar.d.ts +1 -0
  297. package/dist/playbooks/service-build/participation-radar.js +1 -1
  298. package/dist/playbooks/service-build/relationship-profile.js +1 -1
  299. package/dist/playbooks/service-build/reverse-mapping.d.ts +6 -0
  300. package/dist/playbooks/service-build/reverse-mapping.js +1 -1
  301. package/dist/playbooks/service-build/service-panorama.d.ts +2 -0
  302. package/dist/playbooks/service-build/service-panorama.js +1 -1
  303. package/dist/playbooks/service-build/service-quote.js +1 -1
  304. package/dist/playbooks/service-build/service-quote.spec.js +1 -1
  305. package/dist/playbooks/service-build/workflow-design-assessment.d.ts +10 -1
  306. package/dist/playbooks/service-build/workflow-design-assessment.js +1 -1
  307. package/dist/relationship/registry.js +1 -1
  308. package/dist/review/index.js +1 -1
  309. package/dist/review/repository.js +1 -1
  310. package/dist/runtime/instance-registry.d.ts +7 -1
  311. package/dist/runtime/instance-registry.js +1 -1
  312. package/dist/safety/confirm-gate.js +1 -1
  313. package/dist/schema/benchmark-migration/index.d.ts +106 -0
  314. package/dist/schema/benchmark-migration/index.js +1 -1
  315. package/dist/schema/call/allocation.d.ts +15 -6
  316. package/dist/schema/call/allocation.js +1 -1
  317. package/dist/schema/call/arbitration.js +1 -1
  318. package/dist/schema/call/base.d.ts +264 -0
  319. package/dist/schema/call/base.js +1 -1
  320. package/dist/schema/call/bridge.d.ts +34 -6
  321. package/dist/schema/call/demand.d.ts +15 -6
  322. package/dist/schema/call/demand.js +1 -1
  323. package/dist/schema/call/error-codes.d.ts +1 -1
  324. package/dist/schema/call/error-codes.js +1 -1
  325. package/dist/schema/call/guard.d.ts +8 -8
  326. package/dist/schema/call/guard.js +1 -1
  327. package/dist/schema/call/handler.d.ts +3 -0
  328. package/dist/schema/call/handler.js +1 -1
  329. package/dist/schema/call/machine.d.ts +32 -8
  330. package/dist/schema/call/machine.js +1 -1
  331. package/dist/schema/call/order.d.ts +26 -8
  332. package/dist/schema/call/order.js +1 -1
  333. package/dist/schema/call/payment.d.ts +20 -8
  334. package/dist/schema/call/payment.js +1 -1
  335. package/dist/schema/call/permission-handler.js +1 -1
  336. package/dist/schema/call/permission.d.ts +330 -114
  337. package/dist/schema/call/permission.js +1 -1
  338. package/dist/schema/call/personal.d.ts +10 -4
  339. package/dist/schema/call/personal.js +1 -1
  340. package/dist/schema/call/progress.d.ts +16 -4
  341. package/dist/schema/call/reward.d.ts +10 -4
  342. package/dist/schema/call/reward.js +1 -1
  343. package/dist/schema/call/semantic.d.ts +1 -0
  344. package/dist/schema/call/semantic.js +1 -1
  345. package/dist/schema/call/service.d.ts +131 -43
  346. package/dist/schema/call/service.js +1 -1
  347. package/dist/schema/call/treasury.d.ts +15 -6
  348. package/dist/schema/call/treasury.js +1 -1
  349. package/dist/schema/common/index.js +1 -1
  350. package/dist/schema/config/index.d.ts +61 -0
  351. package/dist/schema/config/index.js +1 -1
  352. package/dist/schema/envelope-unify.d.ts +4 -0
  353. package/dist/schema/envelope-unify.js +1 -0
  354. package/dist/schema/evaluation/index.d.ts +224 -19
  355. package/dist/schema/evaluation/index.js +1 -1
  356. package/dist/schema/goal/index.d.ts +47 -0
  357. package/dist/schema/goal/planning.d.ts +116 -1
  358. package/dist/schema/goal/planning.js +1 -1
  359. package/dist/schema/industry-pack/index.d.ts +166 -6
  360. package/dist/schema/industry-pack/index.js +1 -1
  361. package/dist/schema/industry-pack/modes.d.ts +6 -6
  362. package/dist/schema/keeper/index.d.ts +26 -0
  363. package/dist/schema/local/index.d.ts +157 -0
  364. package/dist/schema/local/index.js +1 -1
  365. package/dist/schema/local/wip.d.ts +6 -0
  366. package/dist/schema/local/wip.js +1 -1
  367. package/dist/schema/messenger/index.d.ts +28 -0
  368. package/dist/schema/messenger/index.js +1 -1
  369. package/dist/schema/operations.d.ts +343 -84
  370. package/dist/schema/operations.js +1 -1
  371. package/dist/schema/persona/index.d.ts +2907 -640
  372. package/dist/schema/persona/index.js +1 -1
  373. package/dist/schema/query/bi.d.ts +251 -4
  374. package/dist/schema/query/bi.js +1 -1
  375. package/dist/schema/query/index.d.ts +271 -78
  376. package/dist/schema/query/index.js +1 -1
  377. package/dist/schema/schema-query/index.d.ts +1 -1
  378. package/dist/schema/schema-query/index.js +1 -1
  379. package/dist/schema/schema-version.js +1 -1
  380. package/dist/schema/utils/permission-machine-check.d.ts +2 -0
  381. package/dist/schema/utils/permission-machine-check.js +1 -1
  382. package/dist/schema/watch/index.d.ts +16 -0
  383. package/dist/schema/watch/index.js +1 -1
  384. package/dist/schema/workflow/index.d.ts +2 -2
  385. package/dist/schema/workflow/index.js +1 -1
  386. package/dist/schema-query-impl/index.d.ts +1 -1
  387. package/dist/schema-query-impl/index.js +1 -1
  388. package/dist/schemas/account_operation.output.json +98 -2
  389. package/dist/schemas/benchmark_migration_operation.output.json +341 -12
  390. package/dist/schemas/benchmark_migration_operation.schema.json +42 -3
  391. package/dist/schemas/bridge_operation.output.json +98 -2
  392. package/dist/schemas/bridge_operation.schema.json +5 -5
  393. package/dist/schemas/config_operation.output.json +352 -0
  394. package/dist/schemas/config_operation.schema.json +20 -2
  395. package/dist/schemas/evaluation_operation.output.json +586 -4
  396. package/dist/schemas/evaluation_operation.schema.json +194 -3
  397. package/dist/schemas/goal_operation.schema.json +183 -0
  398. package/dist/schemas/guard2file.schema.json +1 -1
  399. package/dist/schemas/index.json +1 -1
  400. package/dist/schemas/industry_pack_operation.output.json +771 -1
  401. package/dist/schemas/industry_pack_operation.schema.json +28 -4
  402. package/dist/schemas/keeper_operation.output.json +96 -2
  403. package/dist/schemas/local_cache_operation.output.json +98 -2
  404. package/dist/schemas/local_history_operation.output.json +98 -2
  405. package/dist/schemas/local_info_operation.output.json +98 -2
  406. package/dist/schemas/local_mark_operation.output.json +98 -2
  407. package/dist/schemas/machineNode2file.schema.json +1 -1
  408. package/dist/schemas/messenger_operation.output.json +107 -2
  409. package/dist/schemas/messenger_operation.schema.json +41 -34
  410. package/dist/schemas/monitor_events.output.json +96 -2
  411. package/dist/schemas/monitor_subscription.output.json +96 -2
  412. package/dist/schemas/onchain_events.output.json +108 -14
  413. package/dist/schemas/onchain_operations.output.json +326 -11
  414. package/dist/schemas/onchain_operations.schema.json +1343 -734
  415. package/dist/schemas/onchain_operations_allocation.schema.json +35 -19
  416. package/dist/schemas/onchain_operations_arbitration.schema.json +16 -8
  417. package/dist/schemas/onchain_operations_contact.schema.json +12 -4
  418. package/dist/schemas/onchain_operations_demand.schema.json +33 -17
  419. package/dist/schemas/onchain_operations_gen_passport.schema.json +12 -4
  420. package/dist/schemas/onchain_operations_gen_proof.schema.json +1 -1
  421. package/dist/schemas/onchain_operations_guard.schema.json +297 -111
  422. package/dist/schemas/onchain_operations_machine.schema.json +56 -39
  423. package/dist/schemas/onchain_operations_order.schema.json +67 -42
  424. package/dist/schemas/onchain_operations_payment.schema.json +27 -12
  425. package/dist/schemas/onchain_operations_permission.schema.json +363 -232
  426. package/dist/schemas/onchain_operations_personal.schema.json +43 -28
  427. package/dist/schemas/onchain_operations_progress.schema.json +49 -32
  428. package/dist/schemas/onchain_operations_proof.schema.json +12 -4
  429. package/dist/schemas/onchain_operations_repository.schema.json +17 -8
  430. package/dist/schemas/onchain_operations_reward.schema.json +36 -20
  431. package/dist/schemas/onchain_operations_service.schema.json +230 -130
  432. package/dist/schemas/onchain_operations_treasury.schema.json +36 -20
  433. package/dist/schemas/onchain_table_data.output.json +276 -19
  434. package/dist/schemas/onchain_table_data.schema.json +104 -64
  435. package/dist/schemas/persona_operation.output.json +7752 -0
  436. package/dist/schemas/persona_operation.schema.json +1232 -4
  437. package/dist/schemas/query_toolkit.output.json +1054 -146
  438. package/dist/schemas/query_toolkit.schema.json +144 -13
  439. package/dist/schemas/schema_query.schema.json +1 -1
  440. package/dist/schemas/watch_operation.output.json +86 -3
  441. package/dist/schemas/wip_file.output.json +8 -0
  442. package/dist/schemas/workflow_operation.schema.json +5 -4
  443. package/dist/schemas/wowok_buildin_info.schema.json +1 -1
  444. package/dist/task/playbook.js +1 -1
  445. package/dist/tools/handlers/benchmark-migration.d.ts +12 -3
  446. package/dist/tools/handlers/benchmark-migration.js +1 -1
  447. package/dist/tools/handlers/config.js +1 -1
  448. package/dist/tools/handlers/evaluation.js +1 -1
  449. package/dist/tools/handlers/evaluation.spec.js +1 -1
  450. package/dist/tools/handlers/industry-pack.js +1 -1
  451. package/dist/tools/handlers/messenger.js +1 -1
  452. package/dist/tools/handlers/onchain.d.ts +24 -0
  453. package/dist/tools/handlers/onchain.js +1 -1
  454. package/dist/tools/handlers/persona.js +1 -1
  455. package/dist/tools/handlers/query.d.ts +8 -0
  456. package/dist/tools/handlers/query.js +1 -1
  457. package/dist/tools/handlers/winner-derivation.d.ts +20 -0
  458. package/dist/tools/handlers/winner-derivation.js +1 -0
  459. package/dist/tools/handlers/wip-upload.js +1 -1
  460. package/dist/tools/index.d.ts +1 -0
  461. package/dist/tools/index.js +1 -1
  462. package/dist/tools/registry/business.js +1 -1
  463. package/dist/tools/registry/config.js +1 -1
  464. package/dist/tools/registry/evaluation.js +1 -1
  465. package/dist/tools/registry/identity.js +1 -1
  466. package/dist/tools/registry/onchain.js +1 -1
  467. package/dist/tools/registry/query.js +1 -1
  468. package/dist/tools/sanitize-output.js +1 -1
  469. package/dist/tools/sanitize-output.spec.js +1 -1
  470. package/dist/tools/transport-integrity.d.ts +7 -0
  471. package/dist/tools/transport-integrity.js +1 -0
  472. package/dist/tools/types.d.ts +1 -0
  473. package/dist/tools/upgrade-check.d.ts +22 -0
  474. package/dist/tools/upgrade-check.js +1 -1
  475. package/dist/tools/wrap.d.ts +6 -1
  476. package/dist/tools/wrap.js +1 -1
  477. package/package.json +7 -6
  478. package/dist/extensions/business-modules.d.ts +0 -54
  479. package/dist/extensions/business-modules.js +0 -1
  480. package/dist/schemas/guard-templates.json +0 -379
@@ -2,7 +2,7 @@
2
2
  "$schema": "http://json-schema.org/draft-07/schema#",
3
3
  "$id": "https://wowok.net/schemas/benchmark_migration_operation.json",
4
4
  "title": "Template Migration - Industry Templates & Competitor Migration",
5
- "description": "MD industry-archetype templates (hot-loaded from .wowok/templates/, 12 built-ins: 6 industries x leader + challenger), pre-deploy risk scan, and one-click competitor migration. Actions: template_list (list loaded templates, optional industry filter), template_get (full template by template_id), template_generate (creation plan from a template via the merchant-guide pipeline; scan-first, CRITICAL blocks; never on-chain), template_scan (pre-deploy risk scan of one template; CRITICAL blocks generation/apply), migration_import (competitor URL/description -> MigrationLog with mapped/unmapped/manual_review entries), migration_review (surface the MigrationLog for user confirmation), migration_apply (run the approved template through the merchant-guide pipeline; scan-first, CRITICAL blocks; default network testnet).",
5
+ "description": "MD industry-archetype templates (hot-loaded from .wowok/templates/, 30 built-in archetypes across 10 industries), pre-deploy risk scan, and one-click competitor migration. Actions: template_list (list loaded templates, optional industry filter), template_get (full template by template_id), template_generate (creation plan from a template via the merchant-guide pipeline; scan-first, CRITICAL blocks; never on-chain), template_scan (pre-deploy risk scan of one template; CRITICAL blocks generation/apply), plan_execute (one-click deployment: materialize the plan returned by template_generate — plan required; resumes a failed run with completed_steps/previous_outputs instead of re-running from scratch), migration_import (competitor URL/description -> MigrationLog with mapped/unmapped/manual_review entries), migration_review (surface the MigrationLog for user confirmation), migration_apply (run the approved template through the merchant-guide pipeline; scan-first, CRITICAL blocks; default network testnet).",
6
6
  "type": "object",
7
7
  "properties": {
8
8
  "action": {
@@ -24,7 +24,7 @@
24
24
  "type": "string"
25
25
  },
26
26
  "industry": {
27
- "description": "Industry filter for template_list; industry hint for migration_import. Any registered industry is accepted (builtin: freelance, rental, education, travel, subscription, retail; plus custom industries registered via industry packs). Aliases are resolved (e.g. 'ecommerce' → 'retail').",
27
+ "description": "Industry filter for template_list; industry hint for migration_import. Any registered industry is accepted (builtin: crowdfunding, delivery, education, freelance, group_buy, licensing, rental, retail, subscription, travel; plus custom industries registered via industry packs). Aliases are resolved (e.g. 'ecommerce' → 'retail').",
28
28
  "type": "string"
29
29
  },
30
30
  "description": {
@@ -523,7 +523,7 @@
523
523
  "additionalProperties": {}
524
524
  },
525
525
  "completed_steps": {
526
- "description": "plan_execute resume (AR-5): step ids already EXECUTED in a prior run (from the failed response's steps[].stepId where status='executed'). Those steps are adopted, not re-executed.",
526
+ "description": "plan_execute resume (AR-5): step ids already EXECUTED in a prior run. Those steps are adopted, not re-executed. A run that did not complete returns a ready-to-pass `resume` payload (completed_steps/previous_outputs) — pass it back verbatim instead of deriving the lists by hand.",
527
527
  "type": "array",
528
528
  "items": {
529
529
  "type": "string"
@@ -539,6 +539,31 @@
539
539
  "type": "string"
540
540
  }
541
541
  },
542
+ "resume_from_step": {
543
+ "description": "plan_execute resume (W5-08): the FIRST step to (re-)execute — every step BEFORE it in plan order is adopted from previous_outputs. Lighter than enumerating completed_steps: pass the first step whose status is NOT 'executed' in the failed response, plus previous_outputs. Unknown ids are refused — the resume channel binds to the COMPLETE plan, never to one slice's step list.",
544
+ "type": "string"
545
+ },
546
+ "retry_override": {
547
+ "description": "plan_execute (W5-08): authorizes ONE more round for a step that failed with the IDENTICAL error in 2+ consecutive rounds (a further unchanged re-run is refused pre-execution). The note is mandatory and audit-trailed.",
548
+ "type": "object",
549
+ "properties": {
550
+ "step_id": {
551
+ "type": "string",
552
+ "minLength": 1,
553
+ "description": "The step named in the RETRY_LOCKED refusal (the repeated-failure guard's lock)."
554
+ },
555
+ "note": {
556
+ "type": "string",
557
+ "minLength": 1,
558
+ "description": "Why one more round is justified — mandatory, echoed into the response as retry_override_applied for audit."
559
+ }
560
+ },
561
+ "required": [
562
+ "step_id",
563
+ "note"
564
+ ],
565
+ "additionalProperties": false
566
+ },
542
567
  "env": {
543
568
  "description": "Environment for on-chain execution (plan_execute): forwarded to the executor (e.g. { network: 'testnet' }).",
544
569
  "type": "object",
@@ -546,6 +571,20 @@
546
571
  "type": "string"
547
572
  },
548
573
  "additionalProperties": {}
574
+ },
575
+ "accounts": {
576
+ "description": "Per-step signing accounts (BSW-F04): named envs for steps that declare an `account` (currently 'arb_controller' — the independent third-party Arbitration controller, E_ARBITRATION_PERMISSION_CONFLICT=33). e.g. { arb_controller: { network: 'testnet' } }. A step declaring an account missing from this map FAILS — the default signer is never silently reused for an account-bound step.",
577
+ "type": "object",
578
+ "propertyNames": {
579
+ "type": "string"
580
+ },
581
+ "additionalProperties": {}
582
+ },
583
+ "timeout_ms": {
584
+ "description": "plan_execute wall-clock budget for the WHOLE run (ktt4 RT-08): set it BELOW your transport timeout when the plan is too big for one window (~50 steps x ~6s each). The budget is checked BEFORE each step — a step is never interrupted mid-flight — and an exhausted budget stops the run CLEANLY, returning the partial steps/outputs that resume directly (re-send with completed_steps = every stepId whose status is 'executed', previous_outputs = outputs). Omit to run to completion (subject to your transport timeout).",
585
+ "type": "integer",
586
+ "exclusiveMinimum": 0,
587
+ "maximum": 9007199254740991
549
588
  }
550
589
  },
551
590
  "required": [
@@ -79,6 +79,8 @@
79
79
  "delivery_unknown",
80
80
  "capability_unavailable",
81
81
  "transport_unavailable",
82
+ "peer_not_registered",
83
+ "submission_too_large",
82
84
  "unknown"
83
85
  ]
84
86
  },
@@ -979,6 +981,92 @@
979
981
  "top_risks"
980
982
  ],
981
983
  "additionalProperties": false
984
+ },
985
+ "blueprint_verdict": {
986
+ "description": "Creation-time blueprint verdict: business intent + host rich semantics + logic tree composed and run through the full per-host verification battery BEFORE the guard create tx. Present when binding_hint maps to a catalog host; absent when no host is known (add binding_hint to enable).",
987
+ "type": "object",
988
+ "properties": {
989
+ "host": {
990
+ "type": "string",
991
+ "description": "Catalog host id this guard was verified against (guard-host-context)."
992
+ },
993
+ "status": {
994
+ "type": "string",
995
+ "enum": [
996
+ "blocked",
997
+ "proceed_with_warnings",
998
+ "proceed"
999
+ ],
1000
+ "description": "Single authority over create readiness. blocked = structural defect, fix BEFORE create (guards are immutable after create)."
1001
+ },
1002
+ "statement": {
1003
+ "type": "string",
1004
+ "description": "One authoritative verdict statement naming the finding codes."
1005
+ },
1006
+ "findings": {
1007
+ "type": "array",
1008
+ "items": {
1009
+ "type": "object",
1010
+ "properties": {
1011
+ "source": {
1012
+ "type": "string",
1013
+ "description": "Which verifier produced the finding (verifyGuardBinding / auditGuardRelies / auditQuoteGuardCandidate / blueprint)."
1014
+ },
1015
+ "code": {
1016
+ "type": "string",
1017
+ "description": "Stable finding id (e.g. MF_SLOT_IDENTITY_ANCHOR, RC_NO_ORDER_ANCHOR)."
1018
+ },
1019
+ "level": {
1020
+ "type": "string",
1021
+ "enum": [
1022
+ "critical",
1023
+ "warning",
1024
+ "info"
1025
+ ]
1026
+ },
1027
+ "detail": {
1028
+ "type": "string"
1029
+ }
1030
+ },
1031
+ "required": [
1032
+ "source",
1033
+ "code",
1034
+ "level",
1035
+ "detail"
1036
+ ],
1037
+ "additionalProperties": false
1038
+ },
1039
+ "description": "All findings from the composed verification battery."
1040
+ },
1041
+ "host_context": {
1042
+ "description": "The host rich semantics this guard inherits — inlined so the design dialogue argues from facts, not memory.",
1043
+ "type": "object",
1044
+ "properties": {
1045
+ "signer_subject": {
1046
+ "type": "string"
1047
+ },
1048
+ "order_anchor": {
1049
+ "type": "string"
1050
+ },
1051
+ "identity_obligation": {
1052
+ "type": "string"
1053
+ }
1054
+ },
1055
+ "required": [
1056
+ "signer_subject",
1057
+ "order_anchor",
1058
+ "identity_obligation"
1059
+ ],
1060
+ "additionalProperties": false
1061
+ }
1062
+ },
1063
+ "required": [
1064
+ "host",
1065
+ "status",
1066
+ "statement",
1067
+ "findings"
1068
+ ],
1069
+ "additionalProperties": false
982
1070
  }
983
1071
  },
984
1072
  "additionalProperties": false
@@ -1095,7 +1183,7 @@
1095
1183
  "description": "ALL reachable next-node directions (every operator/permission/guard disclosed)."
1096
1184
  },
1097
1185
  "recommendation": {
1098
- "description": "Recommended option with rationale (K3 Game intent/game/interests).",
1186
+ "description": "Recommended option with rationale (K3 Game intent and interests).",
1099
1187
  "type": "object",
1100
1188
  "properties": {
1101
1189
  "best": {
@@ -1342,7 +1430,7 @@
1342
1430
  "description": "ALL reachable next-node directions (every operator/permission/guard disclosed)."
1343
1431
  },
1344
1432
  "recommendation": {
1345
- "description": "Recommended option with rationale (K3 Game intent/game/interests).",
1433
+ "description": "Recommended option with rationale (K3 Game intent and interests).",
1346
1434
  "type": "object",
1347
1435
  "properties": {
1348
1436
  "best": {
@@ -1374,6 +1462,14 @@
1374
1462
  "note": {
1375
1463
  "description": "Additional note.",
1376
1464
  "type": "string"
1465
+ },
1466
+ "digest": {
1467
+ "description": "REAL transaction digest of this operation (ddmc4 B-37) — paste into onchain_transaction or a block explorer to audit. Absent under dry-run/simulation.",
1468
+ "type": "string"
1469
+ },
1470
+ "signer": {
1471
+ "description": "Signing account's on-chain address — a SEPARATE field from digest ({signer, digest}), never occupying the digest slot.",
1472
+ "type": "string"
1377
1473
  }
1378
1474
  },
1379
1475
  "required": [
@@ -68,7 +68,7 @@
68
68
  "type": "boolean"
69
69
  },
70
70
  "network": {
71
- "description": "Omit in client/chat contexts — the runtime stamps the user's CURRENT network (the client's UI selection). Standalone MCP/CLI: omit to use the current network; set ONLY when the user explicitly names a different network (a mismatch pauses for user confirmation). Never guess or hardcode a network.",
71
+ "description": "Omit in chat-client contexts — the runtime stamps the user's CURRENT network (the client's UI selection). Standalone MCP/CLI: omit to use the current network; set ONLY when the user explicitly names a different network (a mismatch pauses for user confirmation). Never guess or hardcode a network.",
72
72
  "type": "string",
73
73
  "enum": [
74
74
  "localnet",
@@ -208,7 +208,7 @@
208
208
  "type": "boolean"
209
209
  },
210
210
  "network": {
211
- "description": "Omit in client/chat contexts — the runtime stamps the user's CURRENT network (the client's UI selection). Standalone MCP/CLI: omit to use the current network; set ONLY when the user explicitly names a different network (a mismatch pauses for user confirmation). Never guess or hardcode a network.",
211
+ "description": "Omit in chat-client contexts — the runtime stamps the user's CURRENT network (the client's UI selection). Standalone MCP/CLI: omit to use the current network; set ONLY when the user explicitly names a different network (a mismatch pauses for user confirmation). Never guess or hardcode a network.",
212
212
  "type": "string",
213
213
  "enum": [
214
214
  "localnet",
@@ -326,7 +326,7 @@
326
326
  "type": "boolean"
327
327
  },
328
328
  "network": {
329
- "description": "Omit in client/chat contexts — the runtime stamps the user's CURRENT network (the client's UI selection). Standalone MCP/CLI: omit to use the current network; set ONLY when the user explicitly names a different network (a mismatch pauses for user confirmation). Never guess or hardcode a network.",
329
+ "description": "Omit in chat-client contexts — the runtime stamps the user's CURRENT network (the client's UI selection). Standalone MCP/CLI: omit to use the current network; set ONLY when the user explicitly names a different network (a mismatch pauses for user confirmation). Never guess or hardcode a network.",
330
330
  "type": "string",
331
331
  "enum": [
332
332
  "localnet",
@@ -444,7 +444,7 @@
444
444
  "type": "boolean"
445
445
  },
446
446
  "network": {
447
- "description": "Omit in client/chat contexts — the runtime stamps the user's CURRENT network (the client's UI selection). Standalone MCP/CLI: omit to use the current network; set ONLY when the user explicitly names a different network (a mismatch pauses for user confirmation). Never guess or hardcode a network.",
447
+ "description": "Omit in chat-client contexts — the runtime stamps the user's CURRENT network (the client's UI selection). Standalone MCP/CLI: omit to use the current network; set ONLY when the user explicitly names a different network (a mismatch pauses for user confirmation). Never guess or hardcode a network.",
448
448
  "type": "string",
449
449
  "enum": [
450
450
  "localnet",
@@ -594,7 +594,7 @@
594
594
  "type": "boolean"
595
595
  },
596
596
  "network": {
597
- "description": "Omit in client/chat contexts — the runtime stamps the user's CURRENT network (the client's UI selection). Standalone MCP/CLI: omit to use the current network; set ONLY when the user explicitly names a different network (a mismatch pauses for user confirmation). Never guess or hardcode a network.",
597
+ "description": "Omit in chat-client contexts — the runtime stamps the user's CURRENT network (the client's UI selection). Standalone MCP/CLI: omit to use the current network; set ONLY when the user explicitly names a different network (a mismatch pauses for user confirmation). Never guess or hardcode a network.",
598
598
  "type": "string",
599
599
  "enum": [
600
600
  "localnet",
@@ -438,6 +438,358 @@
438
438
  ],
439
439
  "additionalProperties": false
440
440
  },
441
+ {
442
+ "type": "object",
443
+ "properties": {
444
+ "action": {
445
+ "type": "string",
446
+ "const": "match_policy_read"
447
+ },
448
+ "path": {
449
+ "type": "string",
450
+ "description": "match-policy.json location (the file may not exist yet — the general config layer is opt-in)."
451
+ },
452
+ "exists": {
453
+ "type": "boolean",
454
+ "description": "Whether the config file currently exists. False → the layer is unused."
455
+ },
456
+ "error": {
457
+ "anyOf": [
458
+ {
459
+ "type": "string"
460
+ },
461
+ {
462
+ "type": "null"
463
+ }
464
+ ],
465
+ "description": "Why the last read was rejected (null = healthy). The last good policies stay in force."
466
+ },
467
+ "demand_to_supply": {
468
+ "description": "The demand→supply matching policy from the general config file (absent when not configured)."
469
+ },
470
+ "supply_to_demand": {
471
+ "description": "The supply→demand matching policy from the general config file (absent when not configured)."
472
+ }
473
+ },
474
+ "required": [
475
+ "action",
476
+ "path",
477
+ "exists",
478
+ "error"
479
+ ],
480
+ "additionalProperties": false
481
+ },
482
+ {
483
+ "type": "object",
484
+ "properties": {
485
+ "action": {
486
+ "type": "string",
487
+ "const": "match_policy_patch"
488
+ },
489
+ "applied": {
490
+ "type": "boolean",
491
+ "const": true,
492
+ "description": "Always true — a rejected patch throws instead of writing."
493
+ },
494
+ "path": {
495
+ "type": "string",
496
+ "description": "match-policy.json the patch was merged into."
497
+ },
498
+ "backup_path": {
499
+ "anyOf": [
500
+ {
501
+ "type": "string"
502
+ },
503
+ {
504
+ "type": "null"
505
+ }
506
+ ],
507
+ "description": "Backup of the previous file (null when no file existed before)."
508
+ },
509
+ "changed": {
510
+ "type": "array",
511
+ "items": {
512
+ "type": "object",
513
+ "properties": {
514
+ "path": {
515
+ "type": "string",
516
+ "description": "Dotted path of the changed value (arrays reported as one leaf)."
517
+ },
518
+ "old": {
519
+ "description": "Previous value (null when the key is new)."
520
+ },
521
+ "new": {
522
+ "description": "Value written to the config file."
523
+ }
524
+ },
525
+ "required": [
526
+ "path",
527
+ "old",
528
+ "new"
529
+ ],
530
+ "additionalProperties": false
531
+ },
532
+ "description": "Leaf-level changes the patch made to the general match-strategy config."
533
+ },
534
+ "error": {
535
+ "anyOf": [
536
+ {
537
+ "type": "string"
538
+ },
539
+ {
540
+ "type": "null"
541
+ }
542
+ ],
543
+ "description": "Post-write reload error (null = the new policies are in force)."
544
+ }
545
+ },
546
+ "required": [
547
+ "action",
548
+ "applied",
549
+ "path",
550
+ "backup_path",
551
+ "changed",
552
+ "error"
553
+ ],
554
+ "additionalProperties": false
555
+ },
556
+ {
557
+ "type": "object",
558
+ "properties": {
559
+ "action": {
560
+ "type": "string",
561
+ "const": "match_policy_clear"
562
+ },
563
+ "cleared": {
564
+ "type": "boolean",
565
+ "description": "True when something was removed (the file or one direction's policy); false when there was nothing to clear."
566
+ },
567
+ "path": {
568
+ "type": "string",
569
+ "description": "match-policy.json location the clear applied to."
570
+ },
571
+ "scope": {
572
+ "type": "string",
573
+ "description": "What was cleared: 'file' (whole file), or the direction key that was removed."
574
+ },
575
+ "backup_path": {
576
+ "anyOf": [
577
+ {
578
+ "type": "string"
579
+ },
580
+ {
581
+ "type": "null"
582
+ }
583
+ ],
584
+ "description": "Backup of the previous file (null when no file existed before)."
585
+ }
586
+ },
587
+ "required": [
588
+ "action",
589
+ "cleared",
590
+ "path",
591
+ "scope",
592
+ "backup_path"
593
+ ],
594
+ "additionalProperties": false
595
+ },
596
+ {
597
+ "type": "object",
598
+ "properties": {
599
+ "action": {
600
+ "type": "string",
601
+ "const": "template_params_read"
602
+ },
603
+ "path": {
604
+ "type": "string",
605
+ "description": "template-params.json location (the file may not exist yet — the standing business-parameter layer is opt-in)."
606
+ },
607
+ "exists": {
608
+ "type": "boolean",
609
+ "description": "Whether the config file currently exists. False → the layer is unused."
610
+ },
611
+ "error": {
612
+ "anyOf": [
613
+ {
614
+ "type": "string"
615
+ },
616
+ {
617
+ "type": "null"
618
+ }
619
+ ],
620
+ "description": "Why the last read was rejected (null = healthy). Shipped template defaults stay in force."
621
+ },
622
+ "comment": {
623
+ "description": "Free-text comment carried through so the editor round-trips it.",
624
+ "type": "string"
625
+ },
626
+ "defaults": {
627
+ "description": "Standing fee-param defaults applied to EVERY template_generate (absent when not configured).",
628
+ "type": "object",
629
+ "propertyNames": {
630
+ "type": "string"
631
+ },
632
+ "additionalProperties": {
633
+ "anyOf": [
634
+ {
635
+ "type": "number"
636
+ },
637
+ {
638
+ "type": "string"
639
+ }
640
+ ]
641
+ }
642
+ },
643
+ "templates": {
644
+ "description": "Per-template fee-param sections (absent when not configured).",
645
+ "type": "object",
646
+ "propertyNames": {
647
+ "type": "string"
648
+ },
649
+ "additionalProperties": {
650
+ "type": "object",
651
+ "propertyNames": {
652
+ "type": "string"
653
+ },
654
+ "additionalProperties": {
655
+ "anyOf": [
656
+ {
657
+ "type": "number"
658
+ },
659
+ {
660
+ "type": "string"
661
+ }
662
+ ]
663
+ }
664
+ }
665
+ }
666
+ },
667
+ "required": [
668
+ "action",
669
+ "path",
670
+ "exists",
671
+ "error"
672
+ ],
673
+ "additionalProperties": false
674
+ },
675
+ {
676
+ "type": "object",
677
+ "properties": {
678
+ "action": {
679
+ "type": "string",
680
+ "const": "template_params_patch"
681
+ },
682
+ "applied": {
683
+ "type": "boolean",
684
+ "const": true,
685
+ "description": "Always true — a rejected patch throws instead of writing."
686
+ },
687
+ "path": {
688
+ "type": "string",
689
+ "description": "template-params.json the patch was merged into."
690
+ },
691
+ "backup_path": {
692
+ "anyOf": [
693
+ {
694
+ "type": "string"
695
+ },
696
+ {
697
+ "type": "null"
698
+ }
699
+ ],
700
+ "description": "Backup of the previous file (null when no file existed before)."
701
+ },
702
+ "changed": {
703
+ "type": "array",
704
+ "items": {
705
+ "type": "object",
706
+ "properties": {
707
+ "path": {
708
+ "type": "string",
709
+ "description": "Dotted path of the changed value ('defaults.x' / 'templates.<tpl-id>.y')."
710
+ },
711
+ "old": {
712
+ "description": "Previous value (null when the key is new)."
713
+ },
714
+ "new": {
715
+ "description": "Value written to the config file."
716
+ }
717
+ },
718
+ "required": [
719
+ "path",
720
+ "old",
721
+ "new"
722
+ ],
723
+ "additionalProperties": false
724
+ },
725
+ "description": "Leaf-level changes the patch made to the standing business-parameter layer."
726
+ },
727
+ "error": {
728
+ "anyOf": [
729
+ {
730
+ "type": "string"
731
+ },
732
+ {
733
+ "type": "null"
734
+ }
735
+ ],
736
+ "description": "Post-write reload error (null = the new layer is in force)."
737
+ }
738
+ },
739
+ "required": [
740
+ "action",
741
+ "applied",
742
+ "path",
743
+ "backup_path",
744
+ "changed",
745
+ "error"
746
+ ],
747
+ "additionalProperties": false
748
+ },
749
+ {
750
+ "type": "object",
751
+ "properties": {
752
+ "action": {
753
+ "type": "string",
754
+ "const": "template_params_clear"
755
+ },
756
+ "cleared": {
757
+ "type": "boolean",
758
+ "description": "True when something was removed (the file, the defaults section, or one template's section); false when there was nothing to clear."
759
+ },
760
+ "path": {
761
+ "type": "string",
762
+ "description": "template-params.json location the clear applied to."
763
+ },
764
+ "scope": {
765
+ "type": "string",
766
+ "description": "What was cleared: 'file' (whole file), 'defaults', or 'template'."
767
+ },
768
+ "template_id": {
769
+ "description": "Template id whose section was removed (scope 'template' only).",
770
+ "type": "string"
771
+ },
772
+ "backup_path": {
773
+ "anyOf": [
774
+ {
775
+ "type": "string"
776
+ },
777
+ {
778
+ "type": "null"
779
+ }
780
+ ],
781
+ "description": "Backup of the previous file (null when no file existed before)."
782
+ }
783
+ },
784
+ "required": [
785
+ "action",
786
+ "cleared",
787
+ "path",
788
+ "scope",
789
+ "backup_path"
790
+ ],
791
+ "additionalProperties": false
792
+ },
441
793
  {
442
794
  "type": "object",
443
795
  "properties": {
@@ -19,6 +19,12 @@
19
19
  "judgment_reset",
20
20
  "judgment_doc_read",
21
21
  "judgment_doc_patch",
22
+ "match_policy_read",
23
+ "match_policy_patch",
24
+ "match_policy_clear",
25
+ "template_params_read",
26
+ "template_params_patch",
27
+ "template_params_clear",
22
28
  "store_dual_payout_get",
23
29
  "store_dual_payout_set",
24
30
  "store_dual_payout_clear"
@@ -34,7 +40,7 @@
34
40
  "type": "string"
35
41
  },
36
42
  "confirm": {
37
- "description": "D-1 explicit human confirmation (required and MUST be true for store_dual_payout_set). Pass it ONLY after the human merchant reviewed and agreed that this store's rails may net arbitration compensation and escrow release on the same order. An automated agent must NOT set this — escalate to the human.",
43
+ "description": "D-1 explicit human confirmation (required and MUST be true for every PERSISTENT config write: store_dual_payout_set, judgment_doc_patch, match_policy_patch, match_policy_clear). Pass it ONLY after the human reviewed and approved the exact change. An automated agent must NOT set this — escalate to the human.",
38
44
  "type": "boolean"
39
45
  },
40
46
  "note": {
@@ -49,12 +55,24 @@
49
55
  "description": "New JSON value for judgment_set (type must match the existing entry at 'path')"
50
56
  },
51
57
  "patch": {
52
- "description": "PARTIAL judgment document to deep-merge into the persistent user judgment document (required for judgment_doc_patch), e.g. {\"evaluation\": {\"weights\": {\"trust_reviews\": 45}}}. PERSISTENT write — validated in full before it touches the file; requires user confirmation.",
58
+ "description": "PARTIAL document to deep-merge into a persistent user config file (required for judgment_doc_patch and match_policy_patch). For judgment_doc_patch: a partial judgment document, e.g. {\"evaluation\": {\"weights\": {\"trust_reviews\": 45}}}. For match_policy_patch: {\"demand_to_supply\": {…}, \"supply_to_demand\": {…}} (either direction optional). PERSISTENT write — validated in full before it touches the file; requires user confirmation.",
53
59
  "type": "object",
54
60
  "propertyNames": {
55
61
  "type": "string"
56
62
  },
57
63
  "additionalProperties": {}
64
+ },
65
+ "direction": {
66
+ "description": "Match-policy direction (used by match_policy_clear: omit to clear the WHOLE match-policy.json file, pass to clear just that direction's policy)",
67
+ "type": "string",
68
+ "enum": [
69
+ "demand_to_supply",
70
+ "supply_to_demand"
71
+ ]
72
+ },
73
+ "template": {
74
+ "description": "Template id (template_params_clear): omit to clear the WHOLE template-params.json file, 'defaults' to clear only the defaults section, or '<industry>/<variant>' to clear only that template's section",
75
+ "type": "string"
58
76
  }
59
77
  },
60
78
  "required": [