@wowok/agent-mcp 3.2.6 → 3.2.9

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 (294) hide show
  1. package/dist/chain-semantics/field-capability.js +1 -1
  2. package/dist/chain-semantics/freeze-map.js +1 -1
  3. package/dist/chain-semantics/fund-flow.js +1 -1
  4. package/dist/chain-semantics/guard-verbs.js +1 -1
  5. package/dist/chain-semantics/object-graph.js +1 -1
  6. package/dist/communication/wts-attestation.js +1 -1
  7. package/dist/composition/audit.js +1 -1
  8. package/dist/composition/compile.d.ts +3 -2
  9. package/dist/composition/compile.js +1 -1
  10. package/dist/composition/inflight.d.ts +27 -0
  11. package/dist/composition/inflight.js +1 -0
  12. package/dist/config/config-audit.spec.js +1 -1
  13. package/dist/customer/account-events.js +1 -1
  14. package/dist/customer/order-monitor.js +1 -1
  15. package/dist/evaluation/builtins/graph-service.spec.js +1 -1
  16. package/dist/evaluation/engine.js +1 -1
  17. package/dist/experience/realtime-feedback.js +1 -1
  18. package/dist/extensions/business-modules.d.ts +1 -1
  19. package/dist/extensions/business-modules.js +1 -1
  20. package/dist/extensions/constraint-registry.d.ts +6 -1
  21. package/dist/extensions/constraint-registry.js +1 -1
  22. package/dist/extensions/index.d.ts +1 -1
  23. package/dist/extensions/index.js +1 -1
  24. package/dist/extensions/industry-pack.d.ts +5 -0
  25. package/dist/extensions/industry-pack.js +1 -1
  26. package/dist/extensions/mode-evaluator.d.ts +3 -2
  27. package/dist/extensions/mode-evaluator.js +1 -1
  28. package/dist/extensions/modes.js +1 -1
  29. package/dist/graph/onchain/analyze.js +1 -1
  30. package/dist/graph/onchain/analyze.spec.js +1 -1
  31. package/dist/graph/onchain/anti-cheat.d.ts +32 -2
  32. package/dist/graph/onchain/anti-cheat.js +1 -1
  33. package/dist/graph/onchain/anti-cheat.spec.js +1 -1
  34. package/dist/graph/onchain/edge-schema.js +1 -1
  35. package/dist/graph/onchain/expand.js +1 -1
  36. package/dist/graph/onchain/exposure.js +1 -1
  37. package/dist/graph/onchain/extract.js +1 -1
  38. package/dist/graph/onchain/graph-policy.spec.js +1 -1
  39. package/dist/graph/onchain/index.d.ts +2 -2
  40. package/dist/graph/onchain/index.js +1 -1
  41. package/dist/graph/onchain/project-relationship.js +1 -1
  42. package/dist/graph/onchain/table-ledger.spec.js +1 -1
  43. package/dist/graph/onchain/types.d.ts +3 -0
  44. package/dist/harness/index.d.ts +1 -0
  45. package/dist/harness/index.js +1 -1
  46. package/dist/harness/operation-id.d.ts +1 -0
  47. package/dist/harness/operation-id.js +1 -0
  48. package/dist/harness/recover.js +1 -1
  49. package/dist/index.js +1 -1
  50. package/dist/knowledge/arbitration-ledger.js +1 -1
  51. package/dist/knowledge/arbitration-venue-order.d.ts +25 -0
  52. package/dist/knowledge/arbitration-venue-order.js +1 -0
  53. package/dist/knowledge/audit-rules.d.ts +10 -0
  54. package/dist/knowledge/audit-rules.js +1 -1
  55. package/dist/knowledge/baselines/risk-baselines.spec.js +1 -1
  56. package/dist/knowledge/baselines/rules/graph.json +81 -0
  57. package/dist/knowledge/baselines/rules/guard.json +96 -1
  58. package/dist/knowledge/baselines/rules/machine.json +3 -3
  59. package/dist/knowledge/baselines/rules/plan.json +109 -8
  60. package/dist/knowledge/baselines/semantic-facts.js +1 -1
  61. package/dist/knowledge/builtin-templates.d.ts +17 -2
  62. package/dist/knowledge/builtin-templates.js +1 -1
  63. package/dist/knowledge/discount-threshold.d.ts +11 -0
  64. package/dist/knowledge/discount-threshold.js +1 -1
  65. package/dist/knowledge/event-semantics.js +1 -1
  66. package/dist/knowledge/fund-layer.js +1 -1
  67. package/dist/knowledge/getting-started.js +1 -1
  68. package/dist/knowledge/guard-bindings.js +1 -1
  69. package/dist/knowledge/guard-design-patterns.d.ts +1 -1
  70. package/dist/knowledge/guard-design-patterns.js +1 -1
  71. package/dist/knowledge/guard-field-cognition.js +1 -1
  72. package/dist/knowledge/guard-ledger.js +1 -1
  73. package/dist/knowledge/guard-lint.d.ts +1 -0
  74. package/dist/knowledge/guard-lint.js +1 -1
  75. package/dist/knowledge/guard-node-gates.d.ts +4 -0
  76. package/dist/knowledge/guard-node-gates.js +1 -0
  77. package/dist/knowledge/guard-puzzle.js +1 -1
  78. package/dist/knowledge/guard-render.js +1 -1
  79. package/dist/knowledge/guard-risk.d.ts +1 -0
  80. package/dist/knowledge/guard-risk.js +1 -1
  81. package/dist/knowledge/guard-submission-brief.d.ts +6 -0
  82. package/dist/knowledge/guard-submission-brief.js +1 -1
  83. package/dist/knowledge/guard-submission-prompt.d.ts +1 -0
  84. package/dist/knowledge/guard-submission-prompt.js +1 -1
  85. package/dist/knowledge/guard-templates.d.ts +2 -1
  86. package/dist/knowledge/guard-templates.js +1 -1
  87. package/dist/knowledge/guard-translation.js +1 -1
  88. package/dist/knowledge/index.d.ts +2 -2
  89. package/dist/knowledge/index.js +1 -1
  90. package/dist/knowledge/industry-registry.js +1 -1
  91. package/dist/knowledge/jsonrpc-enum.js +1 -1
  92. package/dist/knowledge/machine-topology.d.ts +6 -0
  93. package/dist/knowledge/machine-topology.js +1 -1
  94. package/dist/knowledge/order-ledger.js +1 -1
  95. package/dist/knowledge/reputation-rules.d.ts +3 -9
  96. package/dist/knowledge/reputation-rules.js +1 -1
  97. package/dist/knowledge/reward-ledger.js +1 -1
  98. package/dist/knowledge/safety-rules.d.ts +10 -1
  99. package/dist/knowledge/safety-rules.js +1 -1
  100. package/dist/knowledge/scenario-modes.js +1 -1
  101. package/dist/knowledge/settlement-semantics.d.ts +1 -0
  102. package/dist/knowledge/settlement-semantics.js +1 -0
  103. package/dist/knowledge/template-loader.d.ts +22 -0
  104. package/dist/knowledge/template-loader.js +1 -1
  105. package/dist/knowledge/template-registry.js +1 -1
  106. package/dist/knowledge/template-scanner.d.ts +16 -0
  107. package/dist/knowledge/template-scanner.js +1 -1
  108. package/dist/knowledge/tool-constraints.js +1 -1
  109. package/dist/knowledge/tools-reference.js +1 -1
  110. package/dist/knowledge/workflow-guidance.d.ts +8 -3
  111. package/dist/knowledge/workflow-guidance.js +1 -1
  112. package/dist/monitor/MonitorLoop.js +1 -1
  113. package/dist/participation/allocation-advice.js +1 -1
  114. package/dist/participation/customer-interest.js +1 -1
  115. package/dist/participation/radar-core.d.ts +7 -2
  116. package/dist/participation/radar-core.js +1 -1
  117. package/dist/playbooks/service-build/business-puzzle.js +1 -1
  118. package/dist/playbooks/service-build/machine-panorama.js +1 -1
  119. package/dist/playbooks/service-build/merchant-guide.d.ts +46 -15
  120. package/dist/playbooks/service-build/merchant-guide.js +1 -1
  121. package/dist/playbooks/service-build/migration-planner.d.ts +7 -0
  122. package/dist/playbooks/service-build/migration-planner.js +1 -1
  123. package/dist/playbooks/service-build/object-panorama.d.ts +28 -1
  124. package/dist/playbooks/service-build/object-panorama.js +1 -1
  125. package/dist/playbooks/service-build/participation-radar.d.ts +2 -0
  126. package/dist/playbooks/service-build/participation-radar.js +1 -1
  127. package/dist/playbooks/service-build/pipeline-actions.d.ts +1 -1
  128. package/dist/playbooks/service-build/pipeline-actions.js +1 -1
  129. package/dist/playbooks/service-build/relationship-profile.js +1 -1
  130. package/dist/playbooks/service-build/reverse-mapping-nk4.spec.js +1 -1
  131. package/dist/playbooks/service-build/reverse-mapping.js +1 -1
  132. package/dist/playbooks/service-build/risk-aggregator.d.ts +1 -1
  133. package/dist/playbooks/service-build/risk-aggregator.js +1 -1
  134. package/dist/playbooks/service-build/service-panorama.js +1 -1
  135. package/dist/playbooks/service-build/service-quote.js +1 -1
  136. package/dist/playbooks/service-build/service-quote.spec.js +1 -1
  137. package/dist/relationship/derivation.d.ts +1 -0
  138. package/dist/review/index.js +1 -1
  139. package/dist/runtime/instance-registry.d.ts +8 -0
  140. package/dist/runtime/instance-registry.js +1 -0
  141. package/dist/safety/confirm-gate.js +1 -1
  142. package/dist/safety/preview.d.ts +1 -0
  143. package/dist/safety/preview.js +1 -1
  144. package/dist/schema/benchmark-migration/index.d.ts +28 -0
  145. package/dist/schema/benchmark-migration/index.js +1 -1
  146. package/dist/schema/call/allocation.d.ts +1 -1
  147. package/dist/schema/call/arbitration.d.ts +4 -4
  148. package/dist/schema/call/arbitration.js +1 -1
  149. package/dist/schema/call/base.d.ts +122 -5
  150. package/dist/schema/call/base.js +1 -1
  151. package/dist/schema/call/bridge.d.ts +16 -0
  152. package/dist/schema/call/contact.d.ts +1 -1
  153. package/dist/schema/call/contact.js +1 -1
  154. package/dist/schema/call/demand.d.ts +1 -1
  155. package/dist/schema/call/error-codes.d.ts +1 -1
  156. package/dist/schema/call/error-codes.js +1 -1
  157. package/dist/schema/call/guard.d.ts +10 -3
  158. package/dist/schema/call/guard.js +1 -1
  159. package/dist/schema/call/handler.js +1 -1
  160. package/dist/schema/call/machine.d.ts +8 -1
  161. package/dist/schema/call/machine.js +1 -1
  162. package/dist/schema/call/order.d.ts +1 -1
  163. package/dist/schema/call/order.js +1 -1
  164. package/dist/schema/call/payment.js +1 -1
  165. package/dist/schema/call/permission-handler.js +1 -1
  166. package/dist/schema/call/permission.d.ts +1 -1
  167. package/dist/schema/call/personal.d.ts +4 -4
  168. package/dist/schema/call/progress.d.ts +47 -1
  169. package/dist/schema/call/progress.js +1 -1
  170. package/dist/schema/call/proof.js +1 -1
  171. package/dist/schema/call/repository.d.ts +5 -5
  172. package/dist/schema/call/repository.js +1 -1
  173. package/dist/schema/call/reward.d.ts +1 -1
  174. package/dist/schema/call/reward.js +1 -1
  175. package/dist/schema/call/semantic.js +1 -1
  176. package/dist/schema/call/service.d.ts +12 -9
  177. package/dist/schema/call/service.js +1 -1
  178. package/dist/schema/call/treasury.d.ts +1 -1
  179. package/dist/schema/common/index.d.ts +4 -4
  180. package/dist/schema/common/index.js +1 -1
  181. package/dist/schema/goal/index.d.ts +23 -0
  182. package/dist/schema/goal/planning.d.ts +50 -1
  183. package/dist/schema/goal/planning.js +1 -1
  184. package/dist/schema/industry-pack/index.d.ts +40 -0
  185. package/dist/schema/industry-pack/index.js +1 -1
  186. package/dist/schema/keeper/index.d.ts +13 -0
  187. package/dist/schema/local/index.d.ts +96 -0
  188. package/dist/schema/local/index.js +1 -1
  189. package/dist/schema/messenger/index.d.ts +17 -0
  190. package/dist/schema/messenger/index.js +1 -1
  191. package/dist/schema/operations.d.ts +61 -23
  192. package/dist/schema/operations.js +1 -1
  193. package/dist/schema/query/bi.d.ts +70 -6
  194. package/dist/schema/query/bi.js +1 -1
  195. package/dist/schema/query/index.d.ts +206 -54
  196. package/dist/schema/query/index.js +1 -1
  197. package/dist/schema/schema-query/index.d.ts +1 -0
  198. package/dist/schema/schema-query/index.js +1 -1
  199. package/dist/schema/schema-version.d.ts +1 -1
  200. package/dist/schema/schema-version.js +1 -1
  201. package/dist/schema/utils/permission-machine-check.d.ts +2 -0
  202. package/dist/schema/utils/permission-machine-check.js +1 -1
  203. package/dist/schema/workflow/index.d.ts +1 -1
  204. package/dist/schema/workspace/index.d.ts +1 -1
  205. package/dist/schema-query-impl/index.js +1 -1
  206. package/dist/schemas/account_operation.output.json +47 -0
  207. package/dist/schemas/account_operation.schema.json +3 -3
  208. package/dist/schemas/benchmark_migration_operation.output.json +66 -4
  209. package/dist/schemas/benchmark_migration_operation.schema.json +83 -0
  210. package/dist/schemas/bridge_operation.output.json +47 -0
  211. package/dist/schemas/goal_operation.schema.json +104 -0
  212. package/dist/schemas/guard2file.output.json +6 -1
  213. package/dist/schemas/guard2file.schema.json +9 -0
  214. package/dist/schemas/index.json +1 -1
  215. package/dist/schemas/industry_pack_operation.output.json +91 -0
  216. package/dist/schemas/industry_pack_operation.schema.json +19 -1
  217. package/dist/schemas/keeper_operation.output.json +44 -0
  218. package/dist/schemas/local_cache_operation.output.json +47 -0
  219. package/dist/schemas/local_history_operation.output.json +47 -0
  220. package/dist/schemas/local_info_operation.output.json +47 -0
  221. package/dist/schemas/local_mark_operation.output.json +47 -0
  222. package/dist/schemas/machineNode2file.output.json +6 -1
  223. package/dist/schemas/machineNode2file.schema.json +9 -0
  224. package/dist/schemas/messenger_operation.output.json +52 -0
  225. package/dist/schemas/messenger_operation.schema.json +4 -4
  226. package/dist/schemas/monitor_events.output.json +44 -0
  227. package/dist/schemas/monitor_subscription.output.json +44 -0
  228. package/dist/schemas/onchain_events.output.json +44 -0
  229. package/dist/schemas/onchain_operations.output.json +140 -5
  230. package/dist/schemas/onchain_operations.schema.json +180 -107
  231. package/dist/schemas/onchain_operations_allocation.schema.json +5 -5
  232. package/dist/schemas/onchain_operations_arbitration.schema.json +12 -9
  233. package/dist/schemas/onchain_operations_contact.schema.json +8 -7
  234. package/dist/schemas/onchain_operations_demand.schema.json +6 -5
  235. package/dist/schemas/onchain_operations_gen_passport.schema.json +5 -5
  236. package/dist/schemas/onchain_operations_gen_proof.schema.json +1 -1
  237. package/dist/schemas/onchain_operations_guard.schema.json +6 -6
  238. package/dist/schemas/onchain_operations_machine.schema.json +9 -8
  239. package/dist/schemas/onchain_operations_order.schema.json +8 -7
  240. package/dist/schemas/onchain_operations_payment.schema.json +1 -1
  241. package/dist/schemas/onchain_operations_permission.schema.json +1 -0
  242. package/dist/schemas/onchain_operations_personal.schema.json +2 -2
  243. package/dist/schemas/onchain_operations_progress.schema.json +64 -6
  244. package/dist/schemas/onchain_operations_proof.schema.json +6 -6
  245. package/dist/schemas/onchain_operations_repository.schema.json +10 -9
  246. package/dist/schemas/onchain_operations_reward.schema.json +8 -7
  247. package/dist/schemas/onchain_operations_service.schema.json +23 -19
  248. package/dist/schemas/onchain_operations_treasury.schema.json +6 -5
  249. package/dist/schemas/onchain_table_data.output.json +88 -20
  250. package/dist/schemas/onchain_table_data.schema.json +21 -21
  251. package/dist/schemas/query_toolkit.output.json +249 -39
  252. package/dist/schemas/query_toolkit.schema.json +51 -27
  253. package/dist/schemas/schema_query.schema.json +4 -0
  254. package/dist/schemas/workflow_operation.schema.json +5 -5
  255. package/dist/schemas/wowok_buildin_info.output.json +220 -4
  256. package/dist/schemas/wowok_buildin_info.schema.json +2 -2
  257. package/dist/tools/handlers/benchmark-migration.d.ts +22 -0
  258. package/dist/tools/handlers/benchmark-migration.js +1 -1
  259. package/dist/tools/handlers/config.js +1 -1
  260. package/dist/tools/handlers/dispatch-expectations.d.ts +0 -1
  261. package/dist/tools/handlers/dispatch-expectations.js +1 -1
  262. package/dist/tools/handlers/file-export.js +1 -1
  263. package/dist/tools/handlers/industry-pack.js +1 -1
  264. package/dist/tools/handlers/local.js +1 -1
  265. package/dist/tools/handlers/messenger.js +1 -1
  266. package/dist/tools/handlers/onchain.js +1 -1
  267. package/dist/tools/handlers/query.d.ts +1 -0
  268. package/dist/tools/handlers/query.js +1 -1
  269. package/dist/tools/handlers/review-chain.d.ts +22 -0
  270. package/dist/tools/handlers/review-chain.js +1 -0
  271. package/dist/tools/handlers/schema-query.js +1 -1
  272. package/dist/tools/index.js +1 -1
  273. package/dist/tools/move-fn-index.gen.js +1 -1
  274. package/dist/tools/registry/agent.js +1 -1
  275. package/dist/tools/registry/business.js +1 -1
  276. package/dist/tools/registry/config.js +1 -1
  277. package/dist/tools/registry/evaluation.js +1 -1
  278. package/dist/tools/registry/files.js +1 -1
  279. package/dist/tools/registry/identity.js +1 -1
  280. package/dist/tools/registry/local.js +1 -1
  281. package/dist/tools/registry/messenger.js +1 -1
  282. package/dist/tools/registry/monitor.js +1 -1
  283. package/dist/tools/registry/onchain.js +1 -1
  284. package/dist/tools/registry/query.js +1 -1
  285. package/dist/tools/rules-hook.js +1 -1
  286. package/dist/tools/runtime-health.d.ts +10 -0
  287. package/dist/tools/runtime-health.js +1 -0
  288. package/dist/tools/upgrade-check.d.ts +33 -1
  289. package/dist/tools/upgrade-check.js +1 -1
  290. package/dist/tools/wip-deploy-assist.d.ts +6 -0
  291. package/dist/tools/wip-deploy-assist.js +1 -1
  292. package/dist/tools/wrap.d.ts +3 -0
  293. package/dist/tools/wrap.js +1 -1
  294. package/package.json +2 -2
@@ -1,5 +1,5 @@
1
1
  {
2
- "comment": "Plan-domain rules (L1 composition kernel). Facts are produced by composition/audit.ts planFacts() from a Plan AST. These six rules exist because each one names a verified mainnet failure class from wiki/test/10 (TRAILHAVEN): zero allocator rows passing silently, prose guard logic, dual-rail double-pay, path-dependent settlement windows, write-only enforcement, dropped guard/repository hosts.",
2
+ "comment": "Plan-domain rules (L1 composition kernel). Facts are produced by composition/audit.ts planFacts() from a Plan AST. Each rule names a verified failure class (TRAILHAVEN wiki/test/10, booking-85981 + amz-7f3a2c91 audits): zero allocator rows passing silently, prose guard logic, dual-rail double-pay, path-dependent settlement windows, write-only enforcement, dropped guard/repository hosts, missing task-binding slot declarations and GuardIdentifier slot mismatches that strand escrow permanently.",
3
3
  "facts": {
4
4
  "has_service": "Plan creates a service object",
5
5
  "has_machine": "Plan creates a machine object",
@@ -15,9 +15,27 @@
15
15
  "first_write_only_unenforced_field": "First write-only param set with no guard query covering it (WRITE-ONLY-01, A-1/A-10)",
16
16
  "first_orphan_guard": "First guard step id never referenced by any host binding (HOST-GRAPH-01, B-2)",
17
17
  "first_repo_query_without_repository": "First guard step id querying repository.* while the plan creates no repository (HOST-GRAPH-01, B-2)",
18
+ "first_edge_guard_missing_254": "First guard step id bound on a machine forward whose table declares no {identifier: 254, b_submission: true} row (TASKBIND-01, N-K20: progress::assert_task_binding aborts code 11)",
19
+ "first_alloc_slot_missing": "First allocator {GuardIdentifier:N} leg whose bound guard table lacks slot N as a declared Address submission row (TASKBIND-02, N-K21: alloc abort with funds stranded)",
18
20
  "pending_allocator_guard_count": "Unresolved guard designs bound to allocator rows (compile-time judgment surface; >0 downgrades FUND-EXIT-01 from critical to medium)",
19
21
  "first_pending_fund_guard": "First unresolved guard design bound to an allocator row or machine edge (UNRESOLVED-GUARD-01) — publishing now ships that path UNGUARDED",
20
- "first_pending_buy_guard": "First unresolved guard design bound to the service buy path (UNRESOLVED-GUARD-01 warning tier)"
22
+ "pending_fund_guard_count": "Total unresolved guard designs bound to fund paths (allocator rows or machine edges)",
23
+ "pending_fund_guard_keys_display": "Comma-joined keys of ALL unresolved fund-path guard designs",
24
+ "first_pending_buy_guard": "First unresolved guard design bound to the service buy path (UNRESOLVED-GUARD-01 warning tier)",
25
+ "pending_buy_guard_count": "Total unresolved guard designs bound to the service buy path",
26
+ "pending_buy_guard_keys_display": "Comma-joined keys of ALL unresolved buy-path guard designs",
27
+ "has_return_rail": "The machine declares a return rail node (name matches /return/i) — the structural refund promise (PROMISE-ARB, L-01')",
28
+ "return_rail_node": "First return-rail node name",
29
+ "has_arbitration_binding": "The plan wires an arbitration venue into the Service (configure method 'arbitrations' with a non-empty object list, or the service create carries non-empty arbitrations)",
30
+ "fund_topup_present": "The plan carries a compensation_fund_add step",
31
+ "fund_topup_amount": "Sum of parseable (integer smallest-unit) top-up balances; absent when unparseable",
32
+ "fund_ceiling_breach": "The top-up is below the award ceiling (MAX_INDEMNITY_MULTIPLE x highest SKU price) — judged ONLY when both sides parse (PLAN-K2)",
33
+ "fund_ceiling_basis": "Human-readable basis used for the ceiling judgment",
34
+ "fund_ceiling_unverifiable": "A fund top-up exists but the ceiling could not be judged here (price or amount unparseable) — the publish-patch KL-K2 rule re-checks at the 3x largest-order basis (PLAN-K2 fallback, stated explicitly)",
35
+ "repo_policy_keys_display": "Comma-joined policy names declared by the plan's repository create steps (present only when at least one policy exists — the REPO-GATE-KEY-01 judgment gate)",
36
+ "repo_gate_key_unbacked_count": "Composite where-query scans over a plan-local repository whose static key no declared policy uses (REPO-GATE-KEY-01, ZR-32)",
37
+ "first_repo_gate_key_unbacked": "First unbacked gate key, rendered as 'key' in guard 'step-id'",
38
+ "repo_gate_key_unbacked_display": "Comma-joined list of ALL unbacked gate keys"
21
39
  },
22
40
  "rules": [
23
41
  {
@@ -66,17 +84,55 @@
66
84
  {
67
85
  "when": { "field": "first_pending_fund_guard", "op": "present" },
68
86
  "level": "critical",
69
- "title": "Guard design '${first_pending_fund_guard}' is unresolved and bound to a fund path",
70
- "description": "The allocator row or machine edge referencing this guard_key will carry NO guard at publish: the settlement/refund/forward it was designed to gate executes unconditionally. This is a publish-freeze blocker — the freeze gate refuses to go live with fund-path guards pending.",
71
- "mitigation": "Resolve the guard design into a structured guard (guardResolutions with kind 'template' or 'inline'), or remove the binding.",
87
+ "title": "${pending_fund_guard_count} unresolved guard design(s) bound to fund paths (first: '${first_pending_fund_guard}')",
88
+ "description": "All unresolved fund-path guard keys: ${pending_fund_guard_keys_display}. Every allocator row or machine edge referencing one of these guard_keys will carry NO guard at publish: the settlement/refund/forward it was designed to gate executes unconditionally. This is a publish-freeze blocker — the freeze gate refuses to go live with fund-path guards pending.",
89
+ "mitigation": "Resolve EACH listed guard design into a structured guard (guardResolutions with kind 'template' or 'inline'), or remove the binding. Machine-host guards must declare the order-identifier slot {identifier: 254, b_submission: true, value_type: 'Address'} in their table (TASKBIND-01).",
72
90
  "stakeholders": ["merchant", "customer"]
73
91
  },
74
92
  {
75
93
  "when": { "field": "first_pending_buy_guard", "op": "present" },
76
94
  "level": "medium",
77
- "title": "Buy-guard design '${first_pending_buy_guard}' is unresolved",
78
- "description": "The service buy path was designed to screen purchasers, but the guard was never resolved; the service publishes without a buy_guard, so anyone can order.",
79
- "mitigation": "Resolve the buy-guard design into a structured guard, or accept an unscreened buy path deliberately.",
95
+ "title": "${pending_buy_guard_count} unresolved buy-guard design(s) (first: '${first_pending_buy_guard}')",
96
+ "description": "All unresolved buy-path guard keys: ${pending_buy_guard_keys_display}. The service buy path was designed to screen purchasers, but the guard was never resolved; the service publishes without a buy_guard, so anyone can order.",
97
+ "mitigation": "Resolve EACH listed buy-guard design into a structured guard, or accept an unscreened buy path deliberately.",
98
+ "stakeholders": ["merchant"]
99
+ }
100
+ ]
101
+ },
102
+ {
103
+ "rule_id": "PROMISE-ARB",
104
+ "dimension": "fund_flow",
105
+ "trigger": "The machine declares a return rail — that IS the refund promise — but the plan binds no Arbitration into the Service. After settlement the in-escrow refund track is dead topology, so the only on-chain remedy for a post-settlement return is an independent Arbitration ruling paid from the compensation fund (etsy-ln L-01: a live shop promised returns with no venue bound).",
106
+ "cases": [
107
+ {
108
+ "when": { "all": [ { "field": "has_return_rail", "op": "truthy" }, { "field": "has_arbitration_binding", "op": "falsy" } ] },
109
+ "level": "critical",
110
+ "title": "Return-promising shop wires no Arbitration venue",
111
+ "description": "The machine's return rail ('${return_rail_node}') is a promise the chain cannot keep alone: once the settlement allocator drains the escrow, a post-settlement return can only be paid by an independent Arbitration ruling against the compensation fund. This plan binds no venue, so the promise is DECLARED but UNENFORCEABLE — the declared-but-not-enforced class. Blocking: the machine and guard freeze at publish; do not hand-build the wiring outside the plan (hand-built replicas silently drop the arbitration/fund steps).",
112
+ "mitigation": "Keep the arbitration create + service arbitration-binding steps in the plan (standard emission for arbitration_mode third_party). A shop that deliberately settles every dispute off-chain must remove the return rail instead of the venue — an unbacked promise is the one configuration the protocol cannot repair post-publish.",
113
+ "stakeholders": ["merchant", "customer"]
114
+ }
115
+ ]
116
+ },
117
+ {
118
+ "rule_id": "PLAN-K2",
119
+ "dimension": "fund_flow",
120
+ "trigger": "Publish-front compensation-fund adequacy (KL-K2 family): an award is hard-capped at 3x the order amount at ruling time, so a fund below the ceiling turns a WON award into an unpayable one (the claim aborts and is NOT consumed). Preferred basis: 3x the highest SKU price on the plan's catalog; when no price is parseable the judgment is explicitly deferred to the publish-patch check (3x largest single order) instead of silently skipped.",
121
+ "cases": [
122
+ {
123
+ "when": { "field": "fund_ceiling_breach", "op": "truthy" },
124
+ "level": "critical",
125
+ "title": "Compensation fund tops up below the award ceiling (${fund_ceiling_basis})",
126
+ "description": "The plan tops the fund up to ${fund_topup_amount} (smallest units), but a ruling at the ceiling would abort the buyer's claim (E_COMPENSATION_NOT_MATCH) and the abort does NOT consume the claim — the buyer holds an unpayable win until a manual top-up, and the shop holds the reputational damage.",
127
+ "mitigation": "Raise the compensation_fund input to at least the ceiling (${fund_ceiling_basis}). Above the ceiling is optional (tolerance for CONCURRENT claims against the one per-Service pool); below it, a valid ruling cannot pay.",
128
+ "stakeholders": ["merchant", "customer"]
129
+ },
130
+ {
131
+ "when": { "field": "fund_ceiling_unverifiable", "op": "truthy" },
132
+ "level": "medium",
133
+ "title": "Compensation-fund adequacy cannot be judged from the plan",
134
+ "description": "The plan carries a fund top-up, but the catalog price or the top-up amount is not machine-parseable here (display forms need token decimals the plan layer does not have), so the ceiling check is DEFERRED, not skipped: the publish patch re-runs it on the 3x largest-single-order basis and blocks publish when under.",
135
+ "mitigation": "Provide numeric smallest-unit sales prices and a numeric fund amount so the plan layer can verify the ceiling before materialization; otherwise expect the publish-patch check to judge it.",
80
136
  "stakeholders": ["merchant"]
81
137
  }
82
138
  ]
@@ -134,6 +190,36 @@
134
190
  }
135
191
  ]
136
192
  },
193
+ {
194
+ "rule_id": "TASKBIND-01",
195
+ "dimension": "fund_flow",
196
+ "trigger": "A guard bound on a machine forward declares no {identifier: 254, b_submission: true} row — progress::assert_task_binding aborts code 11 on every guarded forward of an order-driven Progress, and Guard tables are frozen at creation (N-K20, booking-85981 + amz-7f3a2c91).",
197
+ "cases": [
198
+ {
199
+ "when": { "field": "first_edge_guard_missing_254", "op": "present" },
200
+ "level": "critical",
201
+ "title": "Forward guard '${first_edge_guard_missing_254}' lacks the protocol task-binding slot (254)",
202
+ "description": "Every guarded forward of a machine running on an order Progress requires the passport to carry a slot-254 (task binding) submission; the guard table declares none, so the forward aborts with code 11 on first traversal. Guard tables and machines freeze at publish — shipping now strands the path permanently, and no builder can patch the table afterwards.",
203
+ "mitigation": "Declare {identifier: 254, b_submission: true, value_type: 'Address'} in guard '${first_edge_guard_missing_254}' (protocol slot 254; the order address is written by order creation). The compile kernel auto-injects this row when the guard is edge-bound — a finding here means the guard is bound in a way the kernel could not see.",
204
+ "stakeholders": ["merchant", "customer"]
205
+ }
206
+ ]
207
+ },
208
+ {
209
+ "rule_id": "TASKBIND-02",
210
+ "dimension": "fund_flow",
211
+ "trigger": "An allocator {GuardIdentifier:N} leg names a slot the guard table never declares as a b_submission Address — allocation asserts the passport submission == payment_info.for_object and aborts (code 15) with funds already escrowed (N-K21, amz-7f3a2c91: 0.98991 WOW stranded).",
212
+ "cases": [
213
+ {
214
+ "when": { "field": "first_alloc_slot_missing", "op": "present" },
215
+ "level": "critical",
216
+ "title": "Allocator leg ${first_alloc_slot_missing} is undeclared",
217
+ "description": "The allocator row pays a recipient keyed by this guard slot, but the guard table has no b_submission Address declaration for it. At allocation time the passport lacks the slot, the assert fails, and the distribution aborts — escrowed funds stay stranded because the guard froze at publish and cannot gain the declaration later. A static Address slot in the same position passes the declaration window but fails the same assertion (N-11).",
218
+ "mitigation": "Declare slot N in the guard table as {identifier: N, b_submission: true, value_type: 'Address', object_type: 'Order'} so the passing order address is captured; the allocator then pays against payment_info.for_object.",
219
+ "stakeholders": ["merchant", "customer"]
220
+ }
221
+ ]
222
+ },
137
223
  {
138
224
  "rule_id": "HOST-GRAPH-01",
139
225
  "dimension": "composition",
@@ -156,6 +242,21 @@
156
242
  "stakeholders": ["merchant"]
157
243
  }
158
244
  ]
245
+ },
246
+ {
247
+ "rule_id": "REPO-GATE-KEY-01",
248
+ "dimension": "composition",
249
+ "trigger": "A guard's composite where-query scans a PLAN-LOCAL repository under a static policy key that no repository policy declares (ZR-32, ziroom-mn-261013: the review gate queried a key the write side never wrote — the count stayed 0 forever and the benefit was unreachable; policies freeze at repository creation, so the divergence is unrepairable post-publish). Runtime key rows and external repository addresses are unknowable at plan time and are judged by the chain-side round-trip (analyze_guard_semantics compare_with) instead.",
250
+ "cases": [
251
+ {
252
+ "when": { "field": "repo_gate_key_unbacked_count", "op": "gt", "value": 0 },
253
+ "level": "high",
254
+ "title": "Repository gate key ${first_repo_gate_key_unbacked} is written by no policy",
255
+ "description": "Unbacked scans: ${repo_gate_key_unbacked_display}. The plan declares these repository policies: ${repo_policy_keys_display}. A where-scan over an undeclared key reads an empty table forever — count/sum stay 0 and find/keys return empty — so the gated path can never pass. Policies freeze at repository creation and guards freeze at creation: the divergence cannot be repaired after publish.",
256
+ "mitigation": "Reconcile the two sides before publish: change the guard's static key row to a declared policy name (${repo_policy_keys_display}), or rename the repository policy to the queried key. After fixing, re-verify the resolved guard with analyze_guard_semantics compare_with after creation.",
257
+ "stakeholders": ["merchant", "customer"]
258
+ }
259
+ ]
159
260
  }
160
261
  ]
161
262
  }
@@ -1 +1 @@
1
- export const SEMANTIC_FACTS=[{'fact_id':'FACT-ALLOC-01','subject':'Allocator\x20guard-matching\x20and\x20firing\x20semantics','authoritative':'A\x20distribution\x20call\x20submits\x20ONE\x20guard\x20address;\x20every\x20allocator\x20whose\x20bound\x20guard\x20equals\x20the\x20submitted\x20address\x20fires,\x20in\x20vector\x20order,\x20each\x20against\x20the\x20balance\x20left\x20by\x20the\x20previous\x20(allocation.move:366-368\x20—\x20the\x20loop\x20has\x20no\x20early\x20exit).\x20'+'Allocators\x20with\x20DIFFERENT\x20guards\x20are\x20alternative\x20paths\x20selected\x20by\x20the\x20caller\x27s\x20guard\x20choice,\x20not\x20by\x20list\x20position.\x20Mutual\x20exclusion\x20must\x20be\x20expressed\x20inside\x20the\x20guard\x20conditions.','falsehoods':['first-match-wins','first\x20Allocator\x20whose\x20Guard\x20returns\x20true','first\x20allocator\x20whose\x20guard\x20passes\x20wins','the\x20first\x20Allocator\x20whose\x20Guard\x20returns\x20true\x20wins','first-match\x20allocator\x20semantics','only\x20the\x20first\x20one','only\x20the\x20first\x20one\x20matches','duplicate\x20addresses\x20only\x20match\x20the\x20first','the\x20first\x20one\x20wins','the\x20first\x20allocator\x20whose\x20guard'],'harm':'Templates\x20built\x20on\x20\x27first-match\x27\x20semantics\x20silently\x20stack\x20distributions\x20or\x20leave\x20refund\x20paths\x20unreachable,\x20because\x20the\x20contract\x20fires\x20ALL\x20allocators\x20bound\x20to\x20the\x20submitted\x20guard.'},{'fact_id':'FACT-ALLOC-02','subject':'Surplus\x20semantics\x20—\x20drains\x20the\x20entire\x20remaining\x20pool','authoritative':'Surplus\x20mode\x20distributes\x20the\x20ENTIRE\x20remaining\x20balance\x20of\x20the\x20order\x27s\x20allocation\x20pool,\x20not\x20just\x20the\x20amount\x20earmarked\x20for\x20a\x20specific\x20track.\x20If\x20a\x20refund-path\x20allocator\x20uses\x20Surplus\x20while\x20the\x20settlement\x20path\x20has\x20unpaid\x20fixed-amount\x20legs,\x20the\x20Surplus\x20takes\x20everything,\x20including\x20the\x20settlement\x20money.','falsehoods':['Surplus\x20takes\x20only\x20what\x20is\x20left','Surplus\x20returns\x20the\x20remainder\x20after\x20other\x20tracks','Surplus\x20is\x20safe\x20because\x20it\x20only\x20takes\x20leftovers'],'harm':'A\x20refund/deposit\x20allocator\x20using\x20Surplus\x20will\x20over-refund\x20the\x20buyer\x20and\x20starve\x20the\x20merchant\x20when\x20the\x20settlement\x20track\x20has\x20not\x20yet\x20fired\x20(ziroom\x20T5:\x20585/525\x20WOW\x20fully\x20refunded,\x20merchant\x20received\x200).'},{'fact_id':'FACT-ALLOC-03','subject':'Allocator\x20fix\x20semantics\x20—\x20computed\x20Amount-leg\x20total,\x20PAID,\x20never\x20a\x20holdback','authoritative':'fix\x20is\x20not\x20a\x20settable\x20parameter:\x20the\x20allocator-registration\x20call\x20computes\x20it\x20internally\x20as\x20the\x20sum\x20of\x20the\x20allocator\x27s\x20Amount-mode\x20legs\x20(allocation.move:399\x20fix:\x20total_amount),\x20and\x20alloc()\x20PAYS\x20every\x20Amount\x20leg\x20(allocation.move:540\x20balance::split)\x20while\x20subtracting\x20fix\x20only\x20from\x20the\x20net-Rate\x20base\x20(allocation.move:485\x20total_rates\x20=\x20balance\x20-\x20fix).\x20A\x20pure-Rate\x20allocator\x20therefore\x20has\x20fix=0\x20and\x20drains\x20100%\x20of\x20the\x20pool;\x20adding\x20Amount\x20legs\x20raises\x20outflow,\x20it\x20never\x20withholds.\x20The\x20allocator-registration\x20call\x20surface\x20takes\x20only\x20(guard,\x20sharing,\x20max)\x20—\x20no\x20fix\x20argument\x20at\x20all\x20—\x20so\x20a\x20template-side\x20fix\x20value\x20is\x20silently\x20dropped\x20before\x20the\x20transaction\x20is\x20built.\x20The\x20chain\x20has\x20NO\x20holdback/reserve\x20primitive;\x20the\x20only\x20way\x20to\x20leave\x20funds\x20in\x20a\x20pool\x20is\x20to\x20not\x20distribute\x20them\x20(no\x20allocator\x20fires,\x20or\x20a\x20max-capped\x20Surplus\x20stops\x20at\x20the\x20cap).','falsehoods':['the\x20reserve\x20never\x20leaves','reserve\x20never\x20leaves\x20the\x20pool','the\x20reserve\x20stays\x20in\x20the\x20pool','reserve\x20physically\x20stays\x20in\x20the\x20pool','the\x20fix\x20retains\x20the\x20reserve','fix-retained\x20claim\x20reserve','leaves\x20the\x20reserve\x20in\x20the\x20pool','fix=reserve','only\x20on-chain\x20holdback'],'harm':'Templates\x20that\x20declare\x20fix=reserve\x20ship\x20a\x20payout\x20rail\x20that\x20drains\x20100%\x20of\x20the\x20escrow\x20at\x20the\x20first\x20release;\x20the\x20claim/refund\x20legs\x20behind\x20it\x20are\x20dead\x20by\x20construction\x20and\x20the\x20money\x20is\x20gone\x20(airbnb\x20mainnet\x20audit\x202026-10-07:\x20ABNB_STAY_SERVICE\x20allocators[0]\x20fix=\x220\x22,\x20full\x20drain\x20at\x20payout_24h).'},{'fact_id':'FACT-GUARD-01','subject':'GuardIdentifier\x20recipient\x20+\x20for_object\x20binding','authoritative':'ERECIPIENT_NOT_FOR_OBJECT\x20is\x20enforced\x20ONLY\x20when\x20the\x20recipient\x20kind\x20is\x20GuardIdentifier\x20AND\x20payment_info.for_object\x20is\x20Some(binding).\x20Pure\x20Entity\x20recipients\x20and\x20unbound\x20GuardIdentifier\x20legs\x20skip\x20this\x20check\x20entirely\x20—\x20the\x20tooling\x20layer\x20(scanner,\x20template\x20compiler)\x20must\x20flag\x20them\x20(allocation.move:434-443).','falsehoods':['the\x20contract\x20checks\x20all\x20recipients\x20against\x20for_object','GuardIdentifier\x20recipients\x20are\x20always\x20safe','the\x20contract\x20validates\x20every\x20recipient\x20binding'],'harm':'An\x20unbound\x20GuardIdentifier\x20or\x20pure\x20Entity\x20recipient\x20can\x20redirect\x20funds\x20to\x20the\x20deploying\x20account\x20or\x20an\x20arbitrary\x20address\x20without\x20any\x20on-chain\x20error.'},{'fact_id':'FACT-MACHINE-01','subject':'Machine\x20edge\x20\x27from\x27\x20semantics','authoritative':'A\x20machine\x20edge\x20declares\x20a\x20single\x20source\x20node\x20in\x20its\x20\x27from\x27\x20field.\x20Multiple\x20edges\x20from\x20the\x20same\x20source\x20node\x20are\x20allowed\x20and\x20represent\x20alternative\x20paths;\x20they\x20are\x20NOT\x20merged.\x20An\x20edge\x20without\x20\x27from\x27\x20is\x20invalid\x20in\x20the\x20new\x20topology\x20format\x20and\x20causes\x20compile-time\x20blockers.','falsehoods':['edges\x20without\x20from\x20are\x20auto-derived','missing\x20from\x20means\x20any\x20node','from\x20is\x20optional\x20for\x20backward\x20compatibility'],'harm':'Old\x20flat\x20machine_shape\x20without\x20from\x20fields\x20compiles\x20into\x20an\x20incomplete\x20topology,\x20leaving\x20nodes\x20unreachable\x20and\x20fund\x20paths\x20missing.'},{'fact_id':'FACT-ENTITY-01','subject':'Entity\x20recipient\x20fallback\x20to\x20deployer','authoritative':'When\x20an\x20Entity\x20recipient\x27s\x20name_or_address\x20is\x20empty,\x20omitted,\x20or\x20resolves\x20to\x20the\x20deploying\x20account,\x20the\x20share\x20is\x20paid\x20to\x20the\x20DEPLOYING\x20ACCOUNT\x20(allocation.move:434-443).\x20This\x20is\x20a\x20silent\x20fallback\x20—\x20no\x20error\x20is\x20raised.','falsehoods':['empty\x20Entity\x20names\x20are\x20rejected','the\x20contract\x20validates\x20Entity\x20recipients','an\x20unnamed\x20Entity\x20recipient\x20causes\x20an\x20abort'],'harm':'A\x20template\x20with\x20a\x20placeholder\x20Entity\x20recipient\x20silently\x20pays\x20the\x20share\x20to\x20whoever\x20deploys\x20the\x20service,\x20which\x20is\x20almost\x20never\x20the\x20intended\x20recipient.'}];export function scanContent(a,b){const c=[],d=b['toLowerCase']();for(const e of SEMANTIC_FACTS){for(const f of e['falsehoods']){const g=f['toLowerCase']();let h=0x0;while((h=d['indexOf'](g,h))!==-0x1){const i=d['slice'](Math['max'](0x0,h-0xc),h),j=/(?:^|[\s"'])not\s+$/['test'](i)||/never\s+$/['test'](i);!j&&c['push']({'fact_id':e['fact_id'],'phrasing':f}),h+=g['length'];}}}return c;}
1
+ export const SEMANTIC_FACTS=[{'fact_id':'FACT-ALLOC-01','subject':'Allocator\x20guard-matching\x20and\x20firing\x20semantics','authoritative':'A\x20distribution\x20call\x20submits\x20ONE\x20guard\x20address;\x20every\x20allocator\x20whose\x20bound\x20guard\x20equals\x20the\x20submitted\x20address\x20fires,\x20in\x20vector\x20order,\x20each\x20against\x20the\x20balance\x20left\x20by\x20the\x20previous\x20(allocation.move:366-368\x20—\x20the\x20loop\x20has\x20no\x20early\x20exit).\x20'+'ORDER\x20IS\x20PRIORITY\x20(SV-3,\x20az3-mn-261013):\x20within\x20one\x20guard,\x20multiple\x20FIX/RATE\x20entries\x20consume\x20the\x20pool\x20strictly\x20in\x20their\x20declared\x20row\x20order\x20(allocation.move:422-427)\x20—\x20a\x20row\x20that\x20under-rates\x20leaves\x20too\x20little\x20for\x20later\x20rows,\x20and\x20a\x20later\x20row\x20that\x20cannot\x20be\x20fully\x20filled\x20aborts\x20the\x20distribution\x20(EZERO,\x2014).\x20Author\x20multi-row\x20splits\x20POOL-DESCENDING\x20(largest\x20claimant\x20first)\x20and\x20verify\x20Σ(fix/rate\x20values)\x20<=\x20the\x20pool\x20the\x20guard\x20can\x20see\x20at\x20fire\x20time.\x20'+'Allocators\x20with\x20DIFFERENT\x20guards\x20are\x20alternative\x20paths\x20selected\x20by\x20the\x20caller\x27s\x20guard\x20choice,\x20not\x20by\x20list\x20position.\x20Mutual\x20exclusion\x20must\x20be\x20expressed\x20inside\x20the\x20guard\x20conditions.','falsehoods':['first-match-wins','first\x20Allocator\x20whose\x20Guard\x20returns\x20true','first\x20allocator\x20whose\x20guard\x20passes\x20wins','the\x20first\x20Allocator\x20whose\x20Guard\x20returns\x20true\x20wins','first-match\x20allocator\x20semantics','only\x20the\x20first\x20one','only\x20the\x20first\x20one\x20matches','duplicate\x20addresses\x20only\x20match\x20the\x20first','the\x20first\x20one\x20wins','the\x20first\x20allocator\x20whose\x20guard'],'harm':'Templates\x20built\x20on\x20\x27first-match\x27\x20semantics\x20silently\x20stack\x20distributions\x20or\x20leave\x20refund\x20paths\x20unreachable,\x20because\x20the\x20contract\x20fires\x20ALL\x20allocators\x20bound\x20to\x20the\x20submitted\x20guard.'},{'fact_id':'FACT-ALLOC-02','subject':'Surplus\x20semantics\x20—\x20drains\x20the\x20entire\x20remaining\x20pool','authoritative':'Surplus\x20mode\x20distributes\x20the\x20ENTIRE\x20remaining\x20balance\x20of\x20the\x20order\x27s\x20allocation\x20pool,\x20not\x20just\x20the\x20amount\x20earmarked\x20for\x20a\x20specific\x20track.\x20If\x20a\x20refund-path\x20allocator\x20uses\x20Surplus\x20while\x20the\x20settlement\x20path\x20has\x20unpaid\x20fixed-amount\x20legs,\x20the\x20Surplus\x20takes\x20everything,\x20including\x20the\x20settlement\x20money.','falsehoods':['Surplus\x20takes\x20only\x20what\x20is\x20left','Surplus\x20returns\x20the\x20remainder\x20after\x20other\x20tracks','Surplus\x20is\x20safe\x20because\x20it\x20only\x20takes\x20leftovers'],'harm':'A\x20refund/deposit\x20allocator\x20using\x20Surplus\x20will\x20over-refund\x20the\x20buyer\x20and\x20starve\x20the\x20merchant\x20when\x20the\x20settlement\x20track\x20has\x20not\x20yet\x20fired\x20(ziroom\x20T5:\x20585/525\x20WOW\x20fully\x20refunded,\x20merchant\x20received\x200).'},{'fact_id':'FACT-ALLOC-03','subject':'Allocator\x20fix\x20semantics\x20—\x20computed\x20Amount-leg\x20total,\x20PAID,\x20never\x20a\x20holdback','authoritative':'fix\x20is\x20not\x20a\x20settable\x20parameter:\x20the\x20allocator-registration\x20call\x20computes\x20it\x20internally\x20as\x20the\x20sum\x20of\x20the\x20allocator\x27s\x20Amount-mode\x20legs\x20(allocation.move:399\x20fix:\x20total_amount),\x20and\x20alloc()\x20PAYS\x20every\x20Amount\x20leg\x20(allocation.move:540\x20balance::split)\x20while\x20subtracting\x20fix\x20only\x20from\x20the\x20net-Rate\x20base\x20(allocation.move:485\x20total_rates\x20=\x20balance\x20-\x20fix).\x20A\x20pure-Rate\x20allocator\x20therefore\x20has\x20fix=0\x20and\x20drains\x20100%\x20of\x20the\x20pool;\x20adding\x20Amount\x20legs\x20raises\x20outflow,\x20it\x20never\x20withholds.\x20The\x20allocator-registration\x20call\x20surface\x20takes\x20only\x20(guard,\x20sharing,\x20max)\x20—\x20no\x20fix\x20argument\x20at\x20all\x20—\x20so\x20a\x20template-side\x20fix\x20value\x20is\x20silently\x20dropped\x20before\x20the\x20transaction\x20is\x20built.\x20The\x20chain\x20has\x20NO\x20holdback/reserve\x20primitive;\x20the\x20only\x20way\x20to\x20leave\x20funds\x20in\x20a\x20pool\x20is\x20to\x20not\x20distribute\x20them\x20(no\x20allocator\x20fires,\x20or\x20a\x20max-capped\x20Surplus\x20stops\x20at\x20the\x20cap).','falsehoods':['the\x20reserve\x20never\x20leaves','reserve\x20never\x20leaves\x20the\x20pool','the\x20reserve\x20stays\x20in\x20the\x20pool','reserve\x20physically\x20stays\x20in\x20the\x20pool','the\x20fix\x20retains\x20the\x20reserve','fix-retained\x20claim\x20reserve','leaves\x20the\x20reserve\x20in\x20the\x20pool','fix=reserve','only\x20on-chain\x20holdback'],'harm':'Templates\x20that\x20declare\x20fix=reserve\x20ship\x20a\x20payout\x20rail\x20that\x20drains\x20100%\x20of\x20the\x20escrow\x20at\x20the\x20first\x20release;\x20the\x20claim/refund\x20legs\x20behind\x20it\x20are\x20dead\x20by\x20construction\x20and\x20the\x20money\x20is\x20gone\x20(airbnb\x20mainnet\x20audit\x202026-10-07:\x20ABNB_STAY_SERVICE\x20allocators[0]\x20fix=\x220\x22,\x20full\x20drain\x20at\x20payout_24h).'},{'fact_id':'FACT-GUARD-01','subject':'GuardIdentifier\x20recipient\x20+\x20for_object\x20binding','authoritative':'ERECIPIENT_NOT_FOR_OBJECT\x20is\x20enforced\x20ONLY\x20when\x20the\x20recipient\x20kind\x20is\x20GuardIdentifier\x20AND\x20payment_info.for_object\x20is\x20Some(binding).\x20Pure\x20Entity\x20recipients\x20and\x20unbound\x20GuardIdentifier\x20legs\x20skip\x20this\x20check\x20entirely\x20—\x20the\x20tooling\x20layer\x20(scanner,\x20template\x20compiler)\x20must\x20flag\x20them\x20(allocation.move:434-443).','falsehoods':['the\x20contract\x20checks\x20all\x20recipients\x20against\x20for_object','GuardIdentifier\x20recipients\x20are\x20always\x20safe','the\x20contract\x20validates\x20every\x20recipient\x20binding'],'harm':'An\x20unbound\x20GuardIdentifier\x20or\x20pure\x20Entity\x20recipient\x20can\x20redirect\x20funds\x20to\x20the\x20deploying\x20account\x20or\x20an\x20arbitrary\x20address\x20without\x20any\x20on-chain\x20error.'},{'fact_id':'FACT-MACHINE-01','subject':'Machine\x20edge\x20\x27from\x27\x20semantics','authoritative':'A\x20machine\x20edge\x20declares\x20a\x20single\x20source\x20node\x20in\x20its\x20\x27from\x27\x20field.\x20Multiple\x20edges\x20from\x20the\x20same\x20source\x20node\x20are\x20allowed\x20and\x20represent\x20alternative\x20paths;\x20they\x20are\x20NOT\x20merged.\x20An\x20edge\x20without\x20\x27from\x27\x20is\x20invalid\x20in\x20the\x20new\x20topology\x20format\x20and\x20causes\x20compile-time\x20blockers.','falsehoods':['edges\x20without\x20from\x20are\x20auto-derived','missing\x20from\x20means\x20any\x20node','from\x20is\x20optional\x20for\x20backward\x20compatibility'],'harm':'Old\x20flat\x20machine_shape\x20without\x20from\x20fields\x20compiles\x20into\x20an\x20incomplete\x20topology,\x20leaving\x20nodes\x20unreachable\x20and\x20fund\x20paths\x20missing.'},{'fact_id':'FACT-ENTITY-01','subject':'Entity\x20recipient\x20fallback\x20to\x20deployer','authoritative':'When\x20an\x20Entity\x20recipient\x27s\x20name_or_address\x20is\x20empty,\x20omitted,\x20or\x20resolves\x20to\x20the\x20deploying\x20account,\x20the\x20share\x20is\x20paid\x20to\x20the\x20DEPLOYING\x20ACCOUNT\x20(allocation.move:434-443).\x20This\x20is\x20a\x20silent\x20fallback\x20—\x20no\x20error\x20is\x20raised.','falsehoods':['empty\x20Entity\x20names\x20are\x20rejected','the\x20contract\x20validates\x20Entity\x20recipients','an\x20unnamed\x20Entity\x20recipient\x20causes\x20an\x20abort'],'harm':'A\x20template\x20with\x20a\x20placeholder\x20Entity\x20recipient\x20silently\x20pays\x20the\x20share\x20to\x20whoever\x20deploys\x20the\x20service,\x20which\x20is\x20almost\x20never\x20the\x20intended\x20recipient.'}];export function scanContent(a,b){const c=[],d=b['toLowerCase']();for(const e of SEMANTIC_FACTS){for(const f of e['falsehoods']){const g=f['toLowerCase']();let h=0x0;while((h=d['indexOf'](g,h))!==-0x1){const i=d['slice'](Math['max'](0x0,h-0xc),h),j=/(?:^|[\s"'])not\s+$/['test'](i)||/never\s+$/['test'](i);!j&&c['push']({'fact_id':e['fact_id'],'phrasing':f}),h+=g['length'];}}}return c;}
@@ -1,5 +1,6 @@
1
1
  import type { Industry } from "../customer/index.js";
2
2
  import type { ModeMachineNode, ModeGuardRef, ModeAllocatorStrategy } from "./scenario-modes.js";
3
+ export type TemplateArbitrationMode = "none" | "merchant_pick" | "mutual_pick" | "third_party";
3
4
  export interface ArchetypeTemplate {
4
5
  id: string;
5
6
  industry: Industry;
@@ -19,11 +20,25 @@ export interface ArchetypeTemplate {
19
20
  user_inputs: string[];
20
21
  key_risk: string;
21
22
  build_notes: string[];
23
+ evidence_refs?: string[];
22
24
  payment_model?: "milestone" | "subscription" | "escrow";
23
- arbitration_mode?: "none" | "merchant_pick" | "mutual_pick" | "third_party";
25
+ arbitration_mode?: TemplateArbitrationMode;
24
26
  time_anchors?: Record<string, string>;
27
+ conditional_guards?: Array<{
28
+ guard_key: string;
29
+ param: string;
30
+ values: string[];
31
+ emit_value: string;
32
+ question: string;
33
+ }>;
34
+ reward_claim_policy?: {
35
+ kind: "once" | "periodic" | "capped";
36
+ min_claim_interval_ms?: number;
37
+ max_total_per_recipient?: string;
38
+ };
39
+ review_mode?: "none" | "review" | "review_reward";
25
40
  }
26
- export declare const BUILTIN_TEMPLATES_VERSION = 38;
41
+ export declare const BUILTIN_TEMPLATES_VERSION = 61;
27
42
  export declare const BUILTIN_TEMPLATES: ArchetypeTemplate[];
28
43
  export declare const TEMPLATE_KEYWORDS: Record<string, string[]>;
29
44
  export declare function getBuiltinTemplate(id: string): ArchetypeTemplate | undefined;