@wowok/agent-mcp 3.4.2 → 3.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (308) hide show
  1. package/dist/.build-stamp.json +5 -0
  2. package/dist/chain-semantics/composition-truth.js +1 -1
  3. package/dist/chain-semantics/eval-order.js +1 -1
  4. package/dist/chain-semantics/field-capability.js +1 -1
  5. package/dist/chain-semantics/freeze-map.js +1 -1
  6. package/dist/chain-semantics/fund-flow.js +1 -1
  7. package/dist/chain-semantics/guard-verbs.js +1 -1
  8. package/dist/chain-semantics/object-graph.js +1 -1
  9. package/dist/composition/audit.js +1 -1
  10. package/dist/composition/compile.d.ts +10 -3
  11. package/dist/composition/compile.js +1 -1
  12. package/dist/composition/emit-phases.d.ts +30 -2
  13. package/dist/composition/emit-phases.js +1 -1
  14. package/dist/composition/guard-fill.d.ts +8 -0
  15. package/dist/composition/guard-fill.js +1 -1
  16. package/dist/composition/inflight.js +1 -1
  17. package/dist/composition/input-normalize.js +1 -1
  18. package/dist/composition/materialize.d.ts +2 -0
  19. package/dist/composition/materialize.js +1 -1
  20. package/dist/composition/mode-gates.js +1 -1
  21. package/dist/composition/param-disclosure.js +1 -1
  22. package/dist/composition/plan-retry-ledger.d.ts +16 -0
  23. package/dist/composition/plan-retry-ledger.js +1 -1
  24. package/dist/composition/plan.d.ts +15 -1
  25. package/dist/composition/plan.js +1 -1
  26. package/dist/config/config-audit.spec.js +1 -1
  27. package/dist/config/judgment.d.ts +5 -0
  28. package/dist/config/judgment.js +1 -1
  29. package/dist/evaluation/builtins/arbitration-score.d.ts +1 -0
  30. package/dist/evaluation/builtins/arbitration-score.js +1 -1
  31. package/dist/evaluation/builtins/demand-match.js +1 -1
  32. package/dist/evaluation/builtins/graph-service.d.ts +8 -0
  33. package/dist/evaluation/builtins/graph-service.js +1 -1
  34. package/dist/evaluation/capability.d.ts +9 -0
  35. package/dist/evaluation/engine.js +1 -1
  36. package/dist/evaluation/extract.d.ts +9 -1
  37. package/dist/evaluation/extract.js +1 -1
  38. package/dist/evaluation/match-operation.js +1 -1
  39. package/dist/evaluation/match-policy.d.ts +5 -3
  40. package/dist/evaluation/match-policy.js +1 -1
  41. package/dist/evaluation/standards.d.ts +1 -0
  42. package/dist/evaluation/standards.js +1 -1
  43. package/dist/evaluation/structured-lines.js +1 -1
  44. package/dist/evaluation/types.d.ts +1 -0
  45. package/dist/extensions/capability.js +1 -1
  46. package/dist/harness/recover.js +1 -1
  47. package/dist/index.js +1 -1
  48. package/dist/intent/types.d.ts +1 -1
  49. package/dist/intent/types.js +1 -1
  50. package/dist/knowledge/allocation-ledger.js +1 -1
  51. package/dist/knowledge/allocator-rail-verifier.d.ts +17 -1
  52. package/dist/knowledge/allocator-rail-verifier.js +1 -1
  53. package/dist/knowledge/arb-fund-facts.d.ts +7 -0
  54. package/dist/knowledge/arb-fund-facts.js +1 -1
  55. package/dist/knowledge/arbitration-rail-verifier.d.ts +35 -0
  56. package/dist/knowledge/arbitration-rail-verifier.js +1 -0
  57. package/dist/knowledge/audit-rules.d.ts +11 -0
  58. package/dist/knowledge/audit-rules.js +1 -1
  59. package/dist/knowledge/baselines/judgment-baselines.json +1 -0
  60. package/dist/knowledge/baselines/rules/guard.json +7 -6
  61. package/dist/knowledge/baselines/rules/progress.json +4 -4
  62. package/dist/knowledge/baselines/rules/reward.json +118 -3
  63. package/dist/knowledge/builtin-templates.d.ts +3 -2
  64. package/dist/knowledge/builtin-templates.js +1 -1
  65. package/dist/knowledge/chain-query-registry.d.ts +14 -0
  66. package/dist/knowledge/chain-query-registry.js +1 -0
  67. package/dist/knowledge/event-semantics.js +1 -1
  68. package/dist/knowledge/fee-param-bindings.d.ts +2 -0
  69. package/dist/knowledge/fee-param-bindings.js +1 -1
  70. package/dist/knowledge/getting-started.js +1 -1
  71. package/dist/knowledge/guard-binding-table.js +1 -1
  72. package/dist/knowledge/guard-binding-verifier.d.ts +7 -0
  73. package/dist/knowledge/guard-binding-verifier.js +1 -1
  74. package/dist/knowledge/guard-design-patterns.d.ts +1 -1
  75. package/dist/knowledge/guard-design-patterns.js +1 -1
  76. package/dist/knowledge/guard-host-context.js +1 -1
  77. package/dist/knowledge/guard-lint.js +1 -1
  78. package/dist/knowledge/guard-node-gates.d.ts +3 -1
  79. package/dist/knowledge/guard-node-gates.js +1 -1
  80. package/dist/knowledge/guard-puzzle.js +1 -1
  81. package/dist/knowledge/guard-render.js +1 -1
  82. package/dist/knowledge/guard-risk.js +1 -1
  83. package/dist/knowledge/guard-templates.d.ts +2 -1
  84. package/dist/knowledge/guard-templates.js +1 -1
  85. package/dist/knowledge/guard-translation.js +1 -1
  86. package/dist/knowledge/index.d.ts +2 -0
  87. package/dist/knowledge/index.js +1 -1
  88. package/dist/knowledge/industry-registry.js +1 -1
  89. package/dist/knowledge/jsonrpc-enum.js +1 -1
  90. package/dist/knowledge/knob-docs.js +1 -1
  91. package/dist/knowledge/param-schema.d.ts +1 -1
  92. package/dist/knowledge/param-schema.js +1 -1
  93. package/dist/knowledge/param-tiers.d.ts +2 -0
  94. package/dist/knowledge/param-tiers.js +1 -1
  95. package/dist/knowledge/path-oracle/products/food-delivery.js +1 -1
  96. package/dist/knowledge/pattern-resolutions.d.ts +2 -0
  97. package/dist/knowledge/pattern-resolutions.js +1 -1
  98. package/dist/knowledge/product-detail-source.d.ts +37 -0
  99. package/dist/knowledge/product-detail-source.js +1 -0
  100. package/dist/knowledge/product-doc-b5.d.ts +16 -0
  101. package/dist/knowledge/product-doc-b5.js +1 -0
  102. package/dist/knowledge/progress-ledger.js +1 -1
  103. package/dist/knowledge/projection.spec.js +1 -1
  104. package/dist/knowledge/publish-gate.d.ts +20 -0
  105. package/dist/knowledge/publish-gate.js +1 -0
  106. package/dist/knowledge/publish-readiness.d.ts +25 -0
  107. package/dist/knowledge/publish-readiness.js +1 -0
  108. package/dist/knowledge/publish-surface-contract.d.ts +16 -0
  109. package/dist/knowledge/publish-surface-contract.js +1 -0
  110. package/dist/knowledge/rail-exit-satisfiability.d.ts +25 -0
  111. package/dist/knowledge/rail-exit-satisfiability.js +1 -0
  112. package/dist/knowledge/reward-ledger.d.ts +1 -1
  113. package/dist/knowledge/reward-ledger.js +1 -1
  114. package/dist/knowledge/reward-risk.d.ts +1 -1
  115. package/dist/knowledge/reward-risk.js +1 -1
  116. package/dist/knowledge/service-ledger.d.ts +3 -1
  117. package/dist/knowledge/service-ledger.js +1 -1
  118. package/dist/knowledge/template-loader.d.ts +41 -2
  119. package/dist/knowledge/template-loader.js +1 -1
  120. package/dist/knowledge/template-registry.js +1 -1
  121. package/dist/knowledge/template-scanner.d.ts +17 -0
  122. package/dist/knowledge/template-scanner.js +1 -1
  123. package/dist/knowledge/workflow-guidance.d.ts +4 -0
  124. package/dist/knowledge/workflow-guidance.js +1 -1
  125. package/dist/monitor/MonitorLoop.js +1 -1
  126. package/dist/monitor/normalize.d.ts +1 -1
  127. package/dist/monitor/normalize.js +1 -1
  128. package/dist/monitor/types.js +1 -1
  129. package/dist/participation/game-context.js +1 -1
  130. package/dist/participation/radar-core.js +1 -1
  131. package/dist/playbooks/service-build/business-puzzle.js +1 -1
  132. package/dist/playbooks/service-build/machine-panorama.js +1 -1
  133. package/dist/playbooks/service-build/merchant-guide.d.ts +28 -3
  134. package/dist/playbooks/service-build/merchant-guide.js +1 -1
  135. package/dist/playbooks/service-build/object-panorama.d.ts +4 -0
  136. package/dist/playbooks/service-build/object-panorama.js +1 -1
  137. package/dist/playbooks/service-build/participation-radar.js +1 -1
  138. package/dist/playbooks/service-build/relationship-profile.js +1 -1
  139. package/dist/playbooks/service-build/service-panorama.js +1 -1
  140. package/dist/playbooks/service-build/service-quote.js +1 -1
  141. package/dist/review/index.js +1 -1
  142. package/dist/review/order.js +1 -1
  143. package/dist/safety/confirm-gate.js +1 -1
  144. package/dist/schema/benchmark-migration/index.d.ts +24 -0
  145. package/dist/schema/benchmark-migration/index.js +1 -1
  146. package/dist/schema/call/allocation.d.ts +11 -7
  147. package/dist/schema/call/allocation.js +1 -1
  148. package/dist/schema/call/arbitration.d.ts +4 -0
  149. package/dist/schema/call/arbitration.js +1 -1
  150. package/dist/schema/call/base.d.ts +28 -0
  151. package/dist/schema/call/base.js +1 -1
  152. package/dist/schema/call/bridge.d.ts +21 -0
  153. package/dist/schema/call/contact.d.ts +4 -0
  154. package/dist/schema/call/demand.d.ts +4 -0
  155. package/dist/schema/call/guard.d.ts +12 -0
  156. package/dist/schema/call/handler.d.ts +1 -0
  157. package/dist/schema/call/handler.js +1 -1
  158. package/dist/schema/call/machine.d.ts +16 -8
  159. package/dist/schema/call/normalize-error.d.ts +1 -0
  160. package/dist/schema/call/normalize-error.js +1 -0
  161. package/dist/schema/call/order.d.ts +7 -3
  162. package/dist/schema/call/order.js +1 -1
  163. package/dist/schema/call/payment.d.ts +7 -3
  164. package/dist/schema/call/permission.d.ts +4 -0
  165. package/dist/schema/call/personal.d.ts +4 -0
  166. package/dist/schema/call/progress.d.ts +4 -0
  167. package/dist/schema/call/progress.js +1 -1
  168. package/dist/schema/call/proof.d.ts +8 -0
  169. package/dist/schema/call/receipt.js +1 -1
  170. package/dist/schema/call/repository.d.ts +4 -0
  171. package/dist/schema/call/reward.d.ts +6 -2
  172. package/dist/schema/call/reward.js +1 -1
  173. package/dist/schema/call/semantic.d.ts +2 -2
  174. package/dist/schema/call/semantic.js +1 -1
  175. package/dist/schema/call/service.d.ts +6 -2
  176. package/dist/schema/call/treasury.d.ts +10 -6
  177. package/dist/schema/common/index.js +1 -1
  178. package/dist/schema/envelope-unify.d.ts +1 -0
  179. package/dist/schema/envelope-unify.js +1 -1
  180. package/dist/schema/evaluation/index.d.ts +43 -0
  181. package/dist/schema/evaluation/index.js +1 -1
  182. package/dist/schema/goal/index.d.ts +14 -2
  183. package/dist/schema/goal/planning.d.ts +18 -0
  184. package/dist/schema/goal/planning.js +1 -1
  185. package/dist/schema/intent-radar/index.d.ts +12 -0
  186. package/dist/schema/intent-radar/index.js +1 -1
  187. package/dist/schema/keeper/index.d.ts +1 -0
  188. package/dist/schema/local/index.d.ts +10 -0
  189. package/dist/schema/local/index.js +1 -1
  190. package/dist/schema/local/wip.js +1 -1
  191. package/dist/schema/messenger/index.d.ts +1 -0
  192. package/dist/schema/messenger/index.js +1 -1
  193. package/dist/schema/operations.d.ts +95 -12
  194. package/dist/schema/operations.js +1 -1
  195. package/dist/schema/persona/index.d.ts +22 -0
  196. package/dist/schema/query/bi.d.ts +28 -2
  197. package/dist/schema/query/bi.js +1 -1
  198. package/dist/schema/query/index.d.ts +67 -61
  199. package/dist/schema/query/index.js +1 -1
  200. package/dist/schema/schema-version.js +1 -1
  201. package/dist/schema/workflow/index.js +1 -1
  202. package/dist/schema-query-impl/index.d.ts +1 -0
  203. package/dist/schema-query-impl/index.js +1 -1
  204. package/dist/schemas/account_operation.output.json +2 -1
  205. package/dist/schemas/benchmark_migration_operation.output.json +74 -0
  206. package/dist/schemas/benchmark_migration_operation.schema.json +32 -0
  207. package/dist/schemas/bridge_operation.output.json +2 -1
  208. package/dist/schemas/bridge_operation.schema.json +40 -0
  209. package/dist/schemas/evaluation_operation.output.json +96 -0
  210. package/dist/schemas/evaluation_operation.schema.json +39 -0
  211. package/dist/schemas/goal_operation.schema.json +32 -0
  212. package/dist/schemas/guard2file.schema.json +8 -0
  213. package/dist/schemas/index.json +1 -1
  214. package/dist/schemas/intent_radar.output.json +10 -2
  215. package/dist/schemas/intent_radar.schema.json +5 -1
  216. package/dist/schemas/keeper_operation.output.json +2 -1
  217. package/dist/schemas/local_cache_operation.output.json +2 -1
  218. package/dist/schemas/local_history_operation.output.json +2 -1
  219. package/dist/schemas/local_info_operation.output.json +2 -1
  220. package/dist/schemas/local_mark_operation.output.json +2 -1
  221. package/dist/schemas/local_mark_operation.schema.json +10 -1
  222. package/dist/schemas/machineNode2file.schema.json +8 -0
  223. package/dist/schemas/messenger_operation.output.json +2 -1
  224. package/dist/schemas/messenger_operation.schema.json +2 -1
  225. package/dist/schemas/monitor_events.output.json +2 -1
  226. package/dist/schemas/monitor_subscription.output.json +2 -1
  227. package/dist/schemas/onchain_events.output.json +206 -13
  228. package/dist/schemas/onchain_events.schema.json +16 -0
  229. package/dist/schemas/onchain_operations.output.json +22 -3
  230. package/dist/schemas/onchain_operations.schema.json +971 -326
  231. package/dist/schemas/onchain_operations_allocation.schema.json +19 -12
  232. package/dist/schemas/onchain_operations_arbitration.schema.json +9 -1
  233. package/dist/schemas/onchain_operations_contact.schema.json +8 -0
  234. package/dist/schemas/onchain_operations_demand.schema.json +8 -0
  235. package/dist/schemas/onchain_operations_gen_passport.schema.json +8 -0
  236. package/dist/schemas/onchain_operations_gen_proof.schema.json +8 -0
  237. package/dist/schemas/onchain_operations_guard.schema.json +654 -114
  238. package/dist/schemas/onchain_operations_machine.schema.json +11 -3
  239. package/dist/schemas/onchain_operations_order.schema.json +14 -11
  240. package/dist/schemas/onchain_operations_payment.schema.json +12 -9
  241. package/dist/schemas/onchain_operations_permission.schema.json +8 -0
  242. package/dist/schemas/onchain_operations_personal.schema.json +8 -0
  243. package/dist/schemas/onchain_operations_progress.schema.json +9 -1
  244. package/dist/schemas/onchain_operations_proof.schema.json +8 -0
  245. package/dist/schemas/onchain_operations_repository.schema.json +8 -0
  246. package/dist/schemas/onchain_operations_reward.schema.json +14 -11
  247. package/dist/schemas/onchain_operations_service.schema.json +13 -10
  248. package/dist/schemas/onchain_operations_treasury.schema.json +17 -19
  249. package/dist/schemas/onchain_table_data.output.json +52 -10
  250. package/dist/schemas/persona_operation.output.json +57 -0
  251. package/dist/schemas/persona_operation.schema.json +9 -0
  252. package/dist/schemas/query_toolkit.output.json +325 -22
  253. package/dist/schemas/query_toolkit.schema.json +18 -5
  254. package/dist/schemas/wip_file.output.json +2 -2
  255. package/dist/schemas/wip_file.schema.json +2 -2
  256. package/dist/schemas/workflow_operation.schema.json +1 -1
  257. package/dist/tools/error-catalog.d.ts +17 -0
  258. package/dist/tools/error-catalog.js +1 -0
  259. package/dist/tools/handlers/benchmark-migration.d.ts +20 -8
  260. package/dist/tools/handlers/benchmark-migration.js +1 -1
  261. package/dist/tools/handlers/config.js +1 -1
  262. package/dist/tools/handlers/entry-edge-recipe.d.ts +101 -0
  263. package/dist/tools/handlers/entry-edge-recipe.js +1 -0
  264. package/dist/tools/handlers/escrow-deficit.d.ts +10 -0
  265. package/dist/tools/handlers/escrow-deficit.js +1 -0
  266. package/dist/tools/handlers/evaluation.js +1 -1
  267. package/dist/tools/handlers/fund-rail-recipe.d.ts +10 -0
  268. package/dist/tools/handlers/fund-rail-recipe.js +1 -0
  269. package/dist/tools/handlers/intent-radar.js +1 -1
  270. package/dist/tools/handlers/local.js +1 -1
  271. package/dist/tools/handlers/mark-namespace.d.ts +30 -0
  272. package/dist/tools/handlers/mark-namespace.js +1 -0
  273. package/dist/tools/handlers/messenger.js +1 -1
  274. package/dist/tools/handlers/onchain-name-registration.d.ts +1 -0
  275. package/dist/tools/handlers/onchain-name-registration.js +1 -1
  276. package/dist/tools/handlers/onchain-name-registration.spec.js +1 -1
  277. package/dist/tools/handlers/onchain.d.ts +30 -1
  278. package/dist/tools/handlers/onchain.js +1 -1
  279. package/dist/tools/handlers/publish-binding-echo.d.ts +22 -0
  280. package/dist/tools/handlers/publish-binding-echo.js +1 -0
  281. package/dist/tools/handlers/query.d.ts +1 -1
  282. package/dist/tools/handlers/query.js +1 -1
  283. package/dist/tools/handlers/review-chain.d.ts +1 -0
  284. package/dist/tools/handlers/review-chain.js +1 -1
  285. package/dist/tools/handlers/schema-query.js +1 -1
  286. package/dist/tools/handlers/stale-build-check.d.ts +9 -0
  287. package/dist/tools/handlers/stale-build-check.js +1 -0
  288. package/dist/tools/handlers/submission-assembly.d.ts +55 -0
  289. package/dist/tools/handlers/submission-assembly.js +1 -0
  290. package/dist/tools/handlers/wip.js +1 -1
  291. package/dist/tools/index.d.ts +1 -0
  292. package/dist/tools/index.js +1 -1
  293. package/dist/tools/move-fn-index.gen.js +1 -1
  294. package/dist/tools/publish-gate-state.d.ts +5 -0
  295. package/dist/tools/publish-gate-state.js +1 -0
  296. package/dist/tools/registry/business.js +1 -1
  297. package/dist/tools/registry/onchain.js +1 -1
  298. package/dist/tools/registry/query.js +1 -1
  299. package/dist/tools/retry.js +1 -1
  300. package/dist/tools/runtime-health.js +1 -1
  301. package/dist/tools/shared.js +1 -1
  302. package/dist/tools/upgrade-check.d.ts +1 -0
  303. package/dist/tools/upgrade-check.js +1 -1
  304. package/dist/tools/wip-verify-ledger.d.ts +2 -0
  305. package/dist/tools/wip-verify-ledger.js +1 -1
  306. package/dist/tools/wrap.d.ts +15 -1
  307. package/dist/tools/wrap.js +1 -1
  308. package/package.json +5 -3
@@ -1 +1 @@
1
- export const BINDING_VERIFIER='guard-binding-verifier.ts\x20(shipped)';export const GUARD_HOST_CONTEXTS=[{'host':'machine_forward','evaluation_timing':'Every\x20tx\x20that\x20advances\x20the\x20edge\x20—\x20evaluated\x20per\x20call,\x20aborts\x20the\x20tx\x20on\x20failure','signer_subject':'The\x20node\x20ADVANCER\x20(operator,\x20keeper,\x20or\x20the\x20party\x20driving\x20the\x20workflow\x20step)','order_anchor':'YES\x20—\x20the\x20order\x20carrying\x20the\x20progress\x20is\x20in\x20scope;\x20order.*\x20queries\x20resolve\x20against\x20it\x20(T10:\x20bind\x20identity\x20legs\x20to\x20task-binding\x20slot\x20254,\x20never\x20a\x20free\x20submission\x20slot)','submission_channel':'Passport\x20carry-on\x20(task-guarded\x20edges\x20declare\x20slots\x20like\x20254;\x20undeclared\x20slots\x20make\x20the\x20edge\x20abort)','identity_obligation':'Caller\x20must\x20be\x20bound\x20to\x20the\x20workflow\x27s\x20operator\x20set\x20(order.owner\x20/\x20order.agent\x20has\x20/\x20named\x20operator\x20/\x20permission)\x20—\x20this\x20is\x20the\x20SOLE\x20identity\x20check\x20when\x20namedOperator\x20is\x20\x22\x22','typical_mistakes':['Identity\x20leg\x20anchored\x20to\x20a\x20free\x20submission\x20slot\x20(T10\x20hijack\x20—\x20attacker\x20submits\x20their\x20own\x20order\x20at\x20slot\x20254)','Reusing\x20a\x20buy-guard\x20here:\x20the\x20buyer\x20identity\x20is\x20NOT\x20the\x20advancer\x20identity'],'derived_rules':[{'id':'MF_SLOT_IDENTITY_ANCHOR','requirement':'Identity\x20legs\x20on\x20task-guarded\x20edges\x20must\x20anchor\x20to\x20the\x20edge\x27s\x20declared\x20task-binding\x20slot,\x20never\x20a\x20free\x20submission\x20slot\x20the\x20caller\x20controls\x20(T10\x20hijack)','enforced_by':BINDING_VERIFIER}]},{'host':'service_allocator_guard','evaluation_timing':'When\x20a\x20tx\x20reaches\x20the\x20allocator\x20(settlement\x20trigger)\x20—\x20the\x20rail\x27s\x20guard\x20decides\x20whether\x20the\x20payout\x20route\x20opens','signer_subject':'The\x20SETTLEMENT\x20TRIGGERER\x20—\x20possibly\x20ANY\x20address\x20(the\x20allocator\x20entry\x20does\x20not\x20check\x20who\x20calls)','order_anchor':'YES\x20for\x20order-bound\x20rails\x20(the\x20allocator\x20resolves\x20the\x20order\x27s\x20escrow);\x20progress.current\x20is\x20available.\x20order.claimed_by\x20exists\x20but\x20is\x20OFF-LIMITS\x20on\x20fund\x20rails\x20(decision\x2011\x20two-rail\x20independence:\x20a\x20rail\x20whose\x20satisfiability\x20flips\x20on\x20the\x20claimed\x20axis\x20is\x20the\x20RAIL_CLAIMED_BY_LEG\x20critical)','submission_channel':'Passport\x20of\x20the\x20triggering\x20tx\x20(usually\x20absent\x20or\x20minimal\x20—\x20do\x20not\x20rely\x20on\x20submission\x20slots\x20here)','identity_obligation':'Must\x20bind\x20the\x20triggerer\x20(context(Signer)\x20comparison,\x20order.agent\x20has,\x20permission.*)\x20UNLESS\x20the\x20scene\x20verifies\x20identity\x20upstream\x20(level3_scene_combined)\x20or\x20the\x20venue\x20is\x20intentionally\x20open-trigger\x20—\x20otherwise\x20any\x20bystander\x20can\x20accelerate/drain\x20the\x20payout\x20(sahr).\x20Machine-enforced\x20check:\x20RAIL_NO_CALLER_IDENTITY\x20(info\x20disclosure)','typical_mistakes':['Pasting\x20a\x20forward-edge\x20identity\x20guard\x20here\x20—\x20it\x20binds\x20the\x20WRONG\x20subject\x20(advancer\x20vs\x20settlement\x20triggerer)','No\x20identity\x20leg\x20at\x20all\x20on\x20a\x20non-open\x20venue','Requiring\x20submission\x20slots\x20that\x20the\x20settlement\x20tx\x20never\x20carries'],'derived_rules':[{'id':'RAIL_NO_CALLER_IDENTITY','requirement':'An\x20allocator\x20gate\x20with\x20no\x20caller-identity\x20leg\x20is\x20triggerable\x20by\x20any\x20address\x20—\x20disclosure;\x20legitimate\x20only\x20for\x20scene-verified\x20or\x20intentionally\x20open-trigger\x20venues','enforced_by':'allocator-rail-verifier.ts\x20(shipped,\x20info)'},{'id':'RAIL_TERMINAL_UNCOVERED','requirement':'Every\x20machine\x20terminal\x20state\x20must\x20have\x20a\x20satisfiable\x20rail\x20through\x20some\x20allocator\x20row','enforced_by':'allocator-rail-verifier.ts\x20(shipped)'},{'id':'RAIL_AWARD_EXIT_MISSING','requirement':'Every\x20terminal\x20—\x20including\x20the\x20terminals\x20an\x20awarded\x20order\x20rests\x20at\x20—\x20must\x20keep\x20a\x20fund\x20exit\x20row\x20on\x20the\x20NODE\x20axis,\x20else\x20escrow\x20strands\x20(decision\x2011:\x20coverage\x20is\x20node-keyed,\x20never\x20claimed-keyed)','enforced_by':'allocator-rail-verifier.ts\x20(shipped)'},{'id':'RAIL_CLAIMED_BY_LEG','requirement':'Decision\x2011\x20two-rail\x20independence:\x20a\x20fund\x20rail\x20whose\x20satisfiability\x20flips\x20on\x20the\x20order.claimed_by\x20axis\x20READS\x20the\x20payout\x20stamp\x20—\x20fund\x20rails\x20are\x20node-gated\x20only;\x20the\x20award\x20is\x20the\x20indemnity\x20track\x27s\x20separate\x20commercial\x20payout\x20(double\x20collection\x20is\x20legal,\x20disclosed\x20at\x20the\x20MCP\x20confirmation\x20gate)','enforced_by':'allocator-rail-verifier.ts\x20(shipped,\x20critical)'},{'id':'RAIL_DEAD_LITERAL','requirement':'Sibling\x20literals\x20contradicting\x20a\x20conjunction-scoped\x20equality\x20are\x20unsatisfiable\x20—\x20dead\x20rows\x20strand\x20the\x20states\x20they\x20were\x20meant\x20to\x20serve','enforced_by':'allocator-rail-verifier.ts\x20(shipped)'}]},{'host':'reward_claim','evaluation_timing':'At\x20the\x20reward\x20claim\x20tx\x20(the\x20claimant\x27s\x20tx)\x20—\x20before\x20the\x20once-slot\x20is\x20consumed','signer_subject':'The\x20CLAIMANT\x20(whoever\x20signs\x20the\x20claim\x20tx)','order_anchor':'NO\x20by\x20default\x20—\x20the\x20Reward\x20object\x20carries\x20no\x20order\x20context;\x20order.*\x20legs\x20have\x20nothing\x20to\x20resolve\x20against\x20UNLESS\x20the\x20guard\x27s\x20table\x20declares\x20an\x20order-slot\x20submission\x20that\x20the\x20claimant\x27s\x20passport\x20fills\x20(per-order\x20bounty\x20shape:\x20guard\x20+\x20store_from\x20scoping)','submission_channel':'Passport\x20submission\x20on\x20the\x20claim\x20tx\x20(the\x20submitted-object\x20slots),\x20or\x20constant\x20table\x20entries\x20only','identity_obligation':'Identity,\x20when\x20required,\x20must\x20ride\x20the\x20submission\x20channel\x20(e.g.\x20an\x20order-owner\x20slot\x20filled\x20by\x20the\x20claimant\x27s\x20passport)\x20—\x20NOT\x20order.*\x20direct\x20reads;\x20per-order\x20once-scoping\x20comes\x20from\x20the\x20claim\x20key\x20(recipient,\x20guard,\x20store_from)\x20with\x20the\x20v139\x20store_from\x20behavior,\x20not\x20from\x20guard\x20legs','typical_mistakes':['order.owner\x20/\x20progress.current\x20legs\x20pasted\x20from\x20a\x20forward\x20guard\x20—\x20they\x20abort\x20or\x20mislead\x20(no\x20order\x20anchor\x20in\x20the\x20claim\x20context)','Assuming\x20per-order\x20once\x20semantics\x20without\x20the\x20store_from\x20binding'],'derived_rules':[{'id':'RC_NO_ORDER_ANCHOR','requirement':'order.*\x20/\x20progress.*\x20query\x20legs\x20are\x20structurally\x20dead\x20here\x20(no\x20order\x20anchor\x20in\x20the\x20claim\x20context)\x20unless\x20an\x20order-slot\x20submission\x20is\x20declared','enforced_by':BINDING_VERIFIER}]},{'host':'service_buy_guard','evaluation_timing':'Inside\x20the\x20purchase\x20tx\x20itself,\x20before\x20the\x20order\x20is\x20created','signer_subject':'The\x20BUYER\x20(tx\x20sender)','order_anchor':'NO\x20—\x20the\x20order\x20does\x20not\x20exist\x20yet;\x20only\x20service-side\x20and\x20repository/permission\x20state\x20is\x20readable','submission_channel':'Passport\x20supplied\x20with\x20the\x20purchase','identity_obligation':'Buyer\x20binding\x20per\x20the\x20venue\x20policy\x20(level1\x20strict\x20single\x20/\x20level2\x20allowlist\x20/\x20level3\x20scene-verified)','typical_mistakes':['Reading\x20order.*\x20state\x20(nothing\x20exists\x20yet\x20—\x20aborts\x20or,\x20pre-136\x20semantics,\x20resolves\x20nothing)','Escrow/funding\x20checks\x20that\x20belong\x20to\x20the\x20allocator\x20rail\x20instead'],'derived_rules':[{'id':'SB_NO_ORDER_STATE','requirement':'order.*\x20query\x20legs\x20are\x20structurally\x20dead\x20(the\x20order\x20does\x20not\x20exist\x20inside\x20the\x20purchase\x20tx)','enforced_by':BINDING_VERIFIER}]},{'host':'arbitration_voting','evaluation_timing':'At\x20arbitration\x20vote\x20casts\x20/\x20resolution\x20entry\x20—\x20per\x20voting-rule\x20evaluation','signer_subject':'The\x20VOTER\x20/\x20arbitrator\x20operator','order_anchor':'Indirect\x20—\x20the\x20Arb\x20case\x20is\x20in\x20scope\x20(arb.*\x20queries);\x20the\x20underlying\x20order\x20is\x20reachable\x20through\x20the\x20case\x20when\x20the\x20flow\x20passes\x20it','submission_channel':'Passport\x20of\x20the\x20voter\x27s\x20tx','identity_obligation':'Voter\x20must\x20satisfy\x20the\x20voting_guard\x27s\x20weight/eligibility\x20rule\x20(or\x20the\x20arb\x20is\x20open-vote\x20by\x20design)','typical_mistakes':['Treating\x20the\x20arb\x20case\x20as\x20an\x20order\x20(arb.*\x20fields\x20differ\x20from\x20order.*\x20fields)','Evidence\x20legs\x20(arb.indemnity)\x20used\x20where\x20the\x20variant\x20is\x20not\x20guaranteed\x20(enum\x20payload\x20aborts)'],'derived_rules':[{'id':'AV_ARB_NAMESPACE','requirement':'Case-scoped\x20queries\x20must\x20use\x20arb.*\x20fields\x20—\x20order.*\x20fields\x20do\x20not\x20resolve\x20against\x20an\x20Arb\x20case','enforced_by':BINDING_VERIFIER}]},{'host':'progress_submission','evaluation_timing':'At\x20progress\x20submission/attestation\x20points\x20(history-bearing\x20edges)','signer_subject':'The\x20SUBMITTER\x20(operator\x20or\x20buyer\x20attestant)','order_anchor':'YES\x20—\x20same\x20order\x20context\x20as\x20machine_forward','submission_channel':'The\x20submission\x20payload\x20itself\x20(this\x20host\x27s\x20purpose\x20is\x20filling\x20history/slots)','identity_obligation':'Submitter\x20binding\x20mirrors\x20the\x20forward-edge\x20obligation\x20for\x20the\x20edge\x20it\x20rides','typical_mistakes':['Skipping\x20the\x20identity\x20leg\x20because\x20\x27it\x27s\x20just\x20an\x20attestation\x27\x20—\x20attestations\x20are\x20replayable\x20without\x20one'],'derived_rules':[{'id':'PS_IDENTITY_REQUIRED','requirement':'Every\x20attestation\x20edge\x20must\x20carry\x20an\x20identity\x20leg\x20—\x20attestations\x20are\x20replayable\x20without\x20one','enforced_by':BINDING_VERIFIER}]},{'host':'repository_write','evaluation_timing':'At\x20the\x20write-guarded\x20repository\x20op\x20(data\x20upsert\x20through\x20a\x20guarded\x20channel)','signer_subject':'The\x20WRITER','order_anchor':'Only\x20if\x20the\x20row\x20is\x20order-keyed\x20and\x20the\x20op\x20passes\x20it;\x20row-key\x20semantics\x20are\x20the\x20guard\x27s\x20own\x20business','submission_channel':'Passport\x20of\x20the\x20writing\x20tx\x20(quote_guard\x20references\x20must\x20be\x20in\x20the\x20impack\x20list\x20—\x20QUOTE-GUARD\x20CARRY)','identity_obligation':'Writer\x20must\x20be\x20a\x20trusted\x20role\x20for\x20the\x20key\x20family\x20(permission-resolved\x20patterns)\x20—\x20repository\x20rows\x20feed\x20aggregates\x20(sum/count)\x20that\x20other\x20guards\x20price\x20against','typical_mistakes':['Open-write\x20rows\x20feeding\x20SUM_BOUND\x20pricing\x20aggregates\x20(forgery\x20by\x20write)','Missing\x20quote_guard\x20in\x20the\x20passport\x20(aborts\x20fail-closed)'],'derived_rules':[{'id':'RW_QUOTE_GUARD_CARRY','requirement':'Guard\x20trees\x20reading\x20governed\x20repository\x20rows\x20require\x20the\x20row\x20policy\x27s\x20quote_guard\x20in\x20the\x20reading\x20passport\x27s\x20impack\x20(QUOTE-GUARD\x20CARRY)','enforced_by':BINDING_VERIFIER},{'id':'RW_OPEN_WRITE_FEEDS_AGGREGATE','requirement':'Open-write\x20rows\x20must\x20not\x20feed\x20SUM/COUNT\x20aggregates\x20that\x20other\x20guards\x20price\x20against\x20(forgery\x20by\x20write)','enforced_by':BINDING_VERIFIER}]},{'host':'gen_passport','evaluation_timing':'At\x20passport\x20generation\x20(issuance\x20gating)','signer_subject':'The\x20PASSPORT\x20REQUESTER','order_anchor':'Service-side\x20state\x20only\x20(same\x20posture\x20as\x20service_buy_guard)','submission_channel':'n/a\x20(the\x20passport\x20is\x20the\x20product\x20of\x20this\x20host)','identity_obligation':'Issuance\x20policy\x20per\x20the\x20venue\x20(who\x20may\x20hold\x20a\x20passport)','typical_mistakes':['Order-dependent\x20issuance\x20legs\x20(no\x20order\x20exists\x20at\x20issuance\x20time)'],'derived_rules':[{'id':'GP_NO_ORDER_AT_ISSUANCE','requirement':'Order-dependent\x20issuance\x20legs\x20are\x20structurally\x20dead\x20(no\x20order\x20exists\x20at\x20issuance\x20time)','enforced_by':BINDING_VERIFIER}]},{'host':'treasury_external_deposit','evaluation_timing':'At\x20the\x20external\x20deposit\x20tx\x20—\x20the\x20guard\x20runs\x20against\x20the\x20depositor\x27s\x20passport\x20BEFORE\x20any\x20balance\x20credit','signer_subject':'The\x20DEPOSITOR\x20(tx\x20sender,\x20passport\x20carrier)\x20—\x20the\x20guard\x20gates\x20who\x20may\x20fund\x20the\x20treasury\x20through\x20this\x20channel','order_anchor':'NO\x20—\x20the\x20treasury\x20has\x20no\x20order\x20scope;\x20order.*\x20legs\x20have\x20nothing\x20to\x20resolve\x20against','submission_channel':'The\x20deposit\x20passport\x27s\x20submissions:\x20the\x20optional\x20amount\x20identifier\x20resolves\x20a\x20NUMBER\x20slot\x20(type-asserted\x20at\x20bind\x20time);\x20the\x20optional\x20store_from_id\x20resolves\x20an\x20ADDRESS-compatible\x20slot','identity_obligation':'Whoever\x20passes\x20the\x20guard\x20may\x20deposit\x20—\x20eligibility\x20IS\x20the\x20guard\x20tree;\x20there\x20is\x20no\x20additional\x20host-side\x20identity\x20check','typical_mistakes':['Treating\x20the\x20amount\x20identifier\x20as\x20a\x20global\x20deposit\x20cap\x20—\x20it\x20only\x20sizes\x20THIS\x20channel\x27s\x20credit;\x20submitted\x20amount\x20≤\x20coin\x20value\x20with\x20the\x20remainder\x20refunded\x20to\x20the\x20depositor\x20(partial\x20deposit)','Omitting\x20the\x20amount\x20identifier:\x20the\x20WHOLE\x20coin\x20is\x20credited\x20unconditionally\x20once\x20the\x20guard\x20passes','Expecting\x20store_from_id\x20to\x20verify\x20fund\x20provenance\x20—\x20it\x20is\x20only\x20RECORDED\x20in\x20the\x20history\x20record,\x20never\x20checked','Assuming\x20fail-closed\x20on\x20an\x20unregistered\x20guard:\x20a\x20deposit\x20through\x20a\x20guard\x20not\x20on\x20the\x20treasury\x27s\x20list\x20REFUNDS\x20the\x20coin\x20(fail-safe)'],'derived_rules':[{'id':'TD_AMOUNT_SLOT_SEMANTICS','requirement':'A\x20number\x20slot\x20referenced\x20as\x20the\x20deposit\x20amount\x20is\x20a\x20caller-declared\x20value:\x20disclose\x20whether\x20the\x20guard\x20bounds\x20it\x20(comparison\x20legs)\x20or\x20it\x20merely\x20sizes\x20the\x20credit','enforced_by':BINDING_VERIFIER}]},{'host':'treasury_external_withdraw','evaluation_timing':'At\x20the\x20external\x20withdraw\x20tx\x20—\x20the\x20guard\x20runs\x20first,\x20then\x20the\x20payee\x20lock\x20and\x20the\x20amount-vs-balance\x20assertion\x20BEFORE\x20any\x20debit','signer_subject':'The\x20WITHDRAWER,\x20who\x20is\x20forcibly\x20also\x20the\x20PAYEE\x20—\x20recipient\x20==\x20tx\x20sender\x20aborts\x20otherwise\x20(E_EXTERNAL_RECIPIENT_NOT_SIGNER)','order_anchor':'NO\x20—\x20the\x20treasury\x20has\x20no\x20order\x20scope;\x20order.*\x20legs\x20have\x20nothing\x20to\x20resolve\x20against','submission_channel':'The\x20withdraw\x20passport\x27s\x20submissions:\x20the\x20amount\x20identifier\x20(REQUIRED\x20at\x20bind\x20time,\x20number\x20type)\x20supplies\x20the\x20withdrawal\x20size;\x20the\x20optional\x20store_from_id\x20records\x20provenance','identity_obligation':'The\x20guard\x20must\x20gate\x20WHO\x20may\x20withdraw\x20—\x20the\x20host\x20only\x20locks\x20payee\x20==\x20signer;\x20anyone\x20passing\x20the\x20guard\x20can\x20move\x20funds\x20to\x20themselves','typical_mistakes':['Believing\x20the\x20guard\x20bounds\x20the\x20withdrawal\x20AMOUNT\x20—\x20the\x20number\x20slot\x20is\x20caller-DECLARED;\x20without\x20comparison\x20legs\x20on\x20that\x20slot\x20the\x20withdrawer\x20picks\x20any\x20amount\x20up\x20to\x20the\x20full\x20balance\x20(drain\x20surface)','Redirecting\x20the\x20payout\x20to\x20a\x20third\x20party\x20via\x20recipient\x20—\x20aborts\x20by\x20design;\x20third-party\x20payouts\x20belong\x20to\x20the\x20permissioned\x20withdraw\x20path','Amount\x20above\x20balance\x20aborts\x20fail-closed\x20(E_WITHDRAW_BALANCE_INSUFFICIENT)\x20—\x20unlike\x20the\x20deposit\x20channel\x27s\x20refund\x20path'],'derived_rules':[{'id':'TW_AMOUNT_UNBOUNDED','requirement':'If\x20the\x20amount\x20number\x20slot\x20appears\x20only\x20as\x20a\x20submission\x20source\x20and\x20never\x20inside\x20a\x20comparison\x20leg,\x20the\x20withdrawal\x20size\x20is\x20caller-chosen\x20—\x20disclose\x20the\x20drain\x20surface\x20on\x20non-open\x20venues','enforced_by':BINDING_VERIFIER}]},{'host':'arbitration_usage','evaluation_timing':'At\x20dispute\x20filing:\x20the\x20no-passport\x20channel\x20requires\x20usage_guard\x20NONE\x20(E_NEED_PASSPORT);\x20the\x20passport\x20channel\x20runs\x20the\x20guard\x20against\x20the\x20filing\x20passport\x20before\x20the\x20case\x20object\x20is\x20minted','signer_subject':'The\x20DISPUTER\x20(buyer\x20or\x20merchant\x20filing\x20through\x20the\x20Service\x20—\x20filing\x20never\x20bypasses\x20the\x20service-side\x20neutrality\x20checks)','order_anchor':'NO\x20at\x20guard\x20evaluation\x20—\x20the\x20guard\x20evaluates\x20against\x20the\x20passport\x20only;\x20the\x20order\x20is\x20a\x20dispute\x20parameter\x20and\x20the\x20Arb\x20case\x20does\x20not\x20exist\x20yet,\x20so\x20arb.*\x20legs\x20are\x20dead\x20here\x20too','submission_channel':'The\x20filing\x20passport\x27s\x20submissions\x20(the\x20guard\x20must\x20be\x20in\x20the\x20passport\x20impack\x20—\x20E_NOT_IMPACK_GUARD)','identity_obligation':'The\x20usage_guard\x20gates\x20WHO\x20may\x20open\x20a\x20case\x20at\x20this\x20venue\x20—\x20it\x20is\x20a\x20filing\x20gate,\x20NOT\x20the\x20voting\x20eligibility\x20rule\x20(that\x20is\x20voting_guard)','typical_mistakes':['Confusing\x20usage_guard\x20with\x20voting_guard\x20—\x20one\x20gates\x20filing\x20(dispute),\x20the\x20other\x20gates\x20vote\x20weight/eligibility','arb.*\x20or\x20order.*\x20query\x20legs\x20in\x20a\x20usage\x20guard\x20—\x20neither\x20resolves\x20at\x20filing\x20time\x20(no\x20case\x20minted,\x20order\x20not\x20in\x20guard\x20scope)','Assuming\x20setting\x20usage_guard\x20also\x20restricts\x20voting\x20—\x20voting\x20stays\x20open\x20unless\x20voting_guard\x20is\x20separately\x20configured'],'derived_rules':[{'id':'AU_DEAD_CASE_SCOPES','requirement':'Query\x20legs\x20in\x20the\x20arb.*\x20/\x20order.*\x20namespaces\x20are\x20structurally\x20dead\x20in\x20a\x20usage\x20guard\x20(no\x20case,\x20no\x20order\x20in\x20evaluation\x20scope)','enforced_by':BINDING_VERIFIER}]},{'host':'demand_present','evaluation_timing':'At\x20the\x20present\x20tx:\x20once\x20ANY\x20guard\x20is\x20registered\x20the\x20free\x20present\x20aborts\x20(E_NEED_PASSPORT);\x20the\x20presenter\x20supplies\x20a\x20passport\x20and\x20ONE\x20chosen\x20registered\x20guard,\x20evaluated\x20against\x20that\x20passport','signer_subject':'The\x20PRESENTER\x20(the\x20service\x20provider\x20side\x20presenting\x20into\x20the\x20demand)','order_anchor':'NO\x20—\x20presenting\x20precedes\x20any\x20order;\x20the\x20demand\x20object\x20itself\x20is\x20the\x20only\x20scope','submission_channel':'The\x20presenter\x27s\x20passport;\x20when\x20the\x20demand\x20guard\x20declares\x20a\x20service_identifier\x20slot\x20(object-type-validated\x20Service\x20at\x20bind\x20time),\x20the\x20PRESENTED\x20SERVICE\x20ADDRESS\x20comes\x20from\x20that\x20submission\x20and\x20OVERRIDES\x20the\x20tx\x20parameter','identity_obligation':'The\x20demand\x20owner\x20structures\x20guards\x20to\x20filter\x20who\x20may\x20present\x20—\x20the\x20presenter\x20must\x20pass\x20the\x20ONE\x20guard\x20they\x20choose','typical_mistakes':['Reading\x20the\x20guard\x20list\x20as\x20AND\x20—\x20the\x20host\x20is\x20presenter-chosen\x20OR:\x20passing\x20ANY\x20single\x20registered\x20guard\x20admits\x20the\x20present;\x20a\x20strict\x20gate\x20must\x20put\x20every\x20condition\x20inside\x20EVERY\x20guard\x20(or\x20into\x20one\x20guard)','Expecting\x20the\x20service\x20tx\x20parameter\x20to\x20win\x20—\x20a\x20service_identifier\x20submission\x20slot\x20overrides\x20it\x20(the\x20guard\x20authors\x20decide\x20what\x20may\x20be\x20presented)','Adding\x20a\x20second\x20guard\x20believing\x20it\x20tightens\x20the\x20gate\x20—\x20it\x20WIDENS\x20it\x20(another\x20acceptance\x20path)'],'derived_rules':[{'id':'DP_MULTI_GUARD_IS_OR','requirement':'Multiple\x20demand\x20guards\x20widen\x20the\x20gate\x20(presenter-chosen\x20OR);\x20flag\x20compositions\x20whose\x20design\x20intent\x20reads\x20as\x20AND','enforced_by':BINDING_VERIFIER}]},{'host':'repository_quote','evaluation_timing':'Never\x20a\x20tx-entry\x20gate:\x20quote_guard\x20is\x20checked\x20as\x20IMPACK\x20MEMBERSHIP\x20whenever\x20a\x20guard\x20tree\x20on\x20ANY\x20host\x20executes\x20a\x20repository.data\x20query\x20against\x20a\x20policy\x20that\x20declares\x20one\x20(the\x20native\x20guard\x20verification\x20consults\x20the\x20reading\x20passport\x27s\x20impack\x20snapshot)','signer_subject':'n/a\x20—\x20a\x20membership\x20check\x20on\x20the\x20reading\x20passport,\x20not\x20an\x20identity\x20evaluation','order_anchor':'n/a\x20—\x20orthogonal\x20to\x20order\x20scope','submission_channel':'The\x20reading\x20passport\x27s\x20impack\x20list:\x20the\x20policy\x27s\x20quote_guard\x20must\x20ride\x20every\x20passport\x20whose\x20guard\x20trees\x20read\x20governed\x20rows\x20(QUOTE-GUARD\x20CARRY)','identity_obligation':'The\x20quote_guard\x20defines\x20who\x20may\x20QUOTE\x20(read\x20pricing\x20data);\x20it\x20must\x20be\x20a\x20DEPENDED\x20guard\x20—\x20frozen\x20(immutable),\x20rep-flagged,\x20and\x20rely-free\x20—\x20asserted\x20at\x20quote-guard\x20binding\x20time\x20(E_NEED_DEPENDENT_GUARD)','typical_mistakes':['Designing\x20a\x20mutable\x20or\x20rely-carrying\x20quote\x20guard\x20—\x20the\x20chain\x20aborts\x20at\x20set\x20time;\x20quote\x20guards\x20are\x20frozen\x20shared\x20pricing\x20definitions\x20by\x20construction','Forgetting\x20QUOTE-GUARD\x20CARRY:\x20guard\x20trees\x20reading\x20governed\x20rows\x20fail\x20unless\x20the\x20consuming\x20passport\x20declares\x20the\x20quote_guard\x20in\x20its\x20impack','Confusing\x20the\x20quote\x20path\x20with\x20the\x20write\x20path\x20—\x20write_guards\x20evaluate\x20per\x20write\x20tx;\x20quote_guard\x20only\x20gates\x20reads\x20of\x20governed\x20data'],'derived_rules':[{'id':'RQ_CARRY_OBLIGATION','requirement':'A\x20guard\x20tree\x20containing\x20repository.data\x20queries\x20against\x20a\x20quoted\x20policy\x20obliges\x20the\x20consuming\x20passport\x20to\x20carry\x20that\x20policy\x27s\x20quote_guard\x20—\x20disclose\x20the\x20carry\x20requirement\x20at\x20design\x20time','enforced_by':BINDING_VERIFIER},{'id':'RQ_DEPENDED_ONLY','requirement':'Quote\x20guards\x20must\x20satisfy\x20the\x20depended\x20shape\x20(relies\x20empty\x20+\x20immutable\x20+\x20rep)\x20—\x20flag\x20mutable/relying\x20candidates\x20before\x20bind\x20time','enforced_by':BINDING_VERIFIER}]},{'host':'guard_relied','evaluation_timing':'Composite\x20(not\x20a\x20host\x20object):\x20wherever\x20the\x20PARENT\x20guard\x20is\x20bound,\x20its\x20relied\x20children\x20evaluate\x20in\x20the\x20SAME\x20host\x20evaluation\x20—\x20each\x20child\x20result\x20folds\x20into\x20the\x20parent\x20via\x20relies_logic_and\x20(default\x20true);\x20passport\x20verification\x20validates\x20children\x20BEFORE\x20the\x20parent','signer_subject':'INHERITED\x20from\x20the\x20parent\x27s\x20host\x20—\x20relied\x20children\x20see\x20the\x20parent\x20host\x27s\x20signer,\x20which\x20is\x20exactly\x20the\x20re-hosting\x20hazard\x20this\x20catalog\x20exists\x20for','order_anchor':'INHERITED\x20from\x20the\x20parent\x27s\x20host\x20—\x20order.*\x20legs\x20inside\x20relied\x20children\x20resolve\x20only\x20if\x20the\x20parent\x27s\x20host\x20provides\x20an\x20anchor','submission_channel':'The\x20SAME\x20passport\x20that\x20carries\x20the\x20parent:\x20guard_add\x20requires\x20every\x20relied\x20guard\x20already\x20present\x20(E_RELIES_GUARD_NOT_ADDED)\x20—\x20the\x20full\x20relies\x20closure\x20must\x20ride\x20every\x20passport','identity_obligation':'Chain-structured:\x20the\x20rely-adding\x20entry\x20accepts\x20only\x20DEPENDED\x20children\x20(relies\x20empty\x20+\x20immutable\x20+\x20rep)\x20—\x20depth\x20is\x20strictly\x201,\x20max\x20MAX_DEPENDED_COUNT\x20=\x204\x20children,\x20self-rely\x20aborts\x20(E_GUARD_SELF)','typical_mistakes':['Assuming\x20relied\x20children\x20keep\x20the\x20context\x20they\x20were\x20authored\x20under\x20—\x20they\x20INHERIT\x20the\x20parent\x20host\x27s\x20signer/order/slot\x20semantics\x20(re-hosting\x20the\x20parent\x20re-contextualizes\x20every\x20child:\x20audit\x20all\x20children\x20on\x20any\x20host\x20change)','Designing\x20multi-level\x20rely\x20chains\x20—\x20the\x20chain\x20flattens\x20to\x20depth\x201\x20on-chain\x20(children\x20must\x20be\x20depended)','Passports\x20carrying\x20the\x20parent\x20without\x20the\x20children\x20—\x20aborts\x20at\x20passport\x20build\x20(E_RELIES_GUARD_NOT_ADDED)','Mixing\x20relies_logic_and\x20polarity\x20without\x20re-checking\x20the\x20acceptance\x20surface\x20(default\x20AND;\x20OR\x20widens\x20to\x20any\x20passing\x20child)'],'derived_rules':[{'id':'GR_CHILD_HOST_REAUDIT','requirement':'On\x20any\x20host\x20change\x20of\x20a\x20guard\x20carrying\x20relies,\x20re-audit\x20every\x20relied\x20child\x20against\x20the\x20NEW\x20host\x27s\x20three\x20inputs\x20(signer\x20/\x20order\x20anchor\x20/\x20submission\x20channel)\x20—\x20bounded:\x20depth\x201,\x20max\x204\x20children','enforced_by':BINDING_VERIFIER},{'id':'GR_CLOSURE_CARRY','requirement':'Every\x20passport\x20carrying\x20a\x20relying\x20parent\x20must\x20carry\x20all\x20relied\x20children\x20first\x20(closure)\x20—\x20flag\x20designs\x20where\x20the\x20carry\x20surface\x20is\x20not\x20communicated','enforced_by':BINDING_VERIFIER}]}];export function getGuardHostContext(a){return GUARD_HOST_CONTEXTS['find'](b=>b['host']===a);}const ACTION_HOST={'buy':'service_buy_guard','forward':'machine_forward','allocate':'service_allocator_guard','claim_reward':'reward_claim','vote':'arbitration_voting','dispute':'arbitration_usage','write_repository':'repository_write','submit_progress':'progress_submission','gen_passport':'gen_passport'},CUSTOM_HOST_BY_OBJECT={'Demand':'demand_present','Repository':'repository_write'};export function catalogHostFromHint(a){if(!a||typeof a['action']!=='string')return undefined;if(a['action']==='custom'){const b=a['host_object']?CUSTOM_HOST_BY_OBJECT[a['host_object']]:undefined;return b??undefined;}return ACTION_HOST[a['action']]??undefined;}
1
+ export const BINDING_VERIFIER='guard-binding-verifier.ts\x20(shipped)';export const GUARD_HOST_CONTEXTS=[{'host':'machine_forward','evaluation_timing':'Every\x20tx\x20that\x20advances\x20the\x20edge\x20—\x20evaluated\x20per\x20call,\x20aborts\x20the\x20tx\x20on\x20failure','signer_subject':'The\x20node\x20ADVANCER\x20(operator,\x20keeper,\x20or\x20the\x20party\x20driving\x20the\x20workflow\x20step)','order_anchor':'YES\x20—\x20the\x20order\x20carrying\x20the\x20progress\x20is\x20in\x20scope;\x20order.*\x20queries\x20resolve\x20against\x20it\x20(T10:\x20bind\x20identity\x20legs\x20to\x20task-binding\x20slot\x20254,\x20never\x20a\x20free\x20submission\x20slot)','submission_channel':'Passport\x20carry-on\x20(task-guarded\x20edges\x20declare\x20slots\x20like\x20254;\x20undeclared\x20slots\x20make\x20the\x20edge\x20abort)','identity_obligation':'Caller\x20must\x20be\x20bound\x20to\x20the\x20workflow\x27s\x20operator\x20set\x20(order.owner\x20/\x20order.agent\x20has\x20/\x20named\x20operator\x20/\x20permission)\x20—\x20this\x20is\x20the\x20SOLE\x20identity\x20check\x20when\x20namedOperator\x20is\x20\x22\x22','typical_mistakes':['Identity\x20leg\x20anchored\x20to\x20a\x20free\x20submission\x20slot\x20(T10\x20hijack\x20—\x20attacker\x20submits\x20their\x20own\x20order\x20at\x20slot\x20254)','Reusing\x20a\x20buy-guard\x20here:\x20the\x20buyer\x20identity\x20is\x20NOT\x20the\x20advancer\x20identity'],'derived_rules':[{'id':'MF_SLOT_IDENTITY_ANCHOR','requirement':'Identity\x20legs\x20on\x20task-guarded\x20edges\x20must\x20anchor\x20to\x20the\x20edge\x27s\x20declared\x20task-binding\x20slot,\x20never\x20a\x20free\x20submission\x20slot\x20the\x20caller\x20controls\x20(T10\x20hijack)','enforced_by':BINDING_VERIFIER},{'id':'PERM_INDEX_UNRESOLVED','requirement':'An\x20edge\x20declaring\x20permission_index\x20references\x20must\x20resolve\x20against\x20the\x20host\x20Service\x27s\x20Permission\x20face\x20(at\x20least\x20one\x20entity\x20grant\x20per\x20index)\x20—\x20an\x20ungranted\x20index\x20makes\x20the\x20edge\x20un\x20executable\x20for\x20everyone\x20(R7-01,\x20rex7\x20o9:\x20ArbRefund\x201002\x20vs\x20entity_count\x200\x20welded\x20the\x20winning-relief\x20track)','enforced_by':BINDING_VERIFIER}]},{'host':'service_allocator_guard','evaluation_timing':'When\x20a\x20tx\x20reaches\x20the\x20allocator\x20(settlement\x20trigger)\x20—\x20the\x20rail\x27s\x20guard\x20decides\x20whether\x20the\x20payout\x20route\x20opens','signer_subject':'The\x20SETTLEMENT\x20TRIGGERER\x20—\x20possibly\x20ANY\x20address\x20(the\x20allocator\x20entry\x20does\x20not\x20check\x20who\x20calls)','order_anchor':'YES\x20for\x20order-bound\x20rails\x20(the\x20allocator\x20resolves\x20the\x20order\x27s\x20escrow);\x20progress.current\x20is\x20available.\x20order.claimed_by\x20exists\x20but\x20is\x20OFF-LIMITS\x20on\x20fund\x20rails\x20(decision\x2011\x20two-rail\x20independence:\x20a\x20rail\x20whose\x20satisfiability\x20flips\x20on\x20the\x20claimed\x20axis\x20is\x20the\x20RAIL_CLAIMED_BY_LEG\x20critical)','submission_channel':'Passport\x20of\x20the\x20triggering\x20tx\x20(usually\x20absent\x20or\x20minimal\x20—\x20do\x20not\x20rely\x20on\x20submission\x20slots\x20here)','identity_obligation':'Must\x20bind\x20the\x20triggerer\x20(context(Signer)\x20comparison,\x20order.agent\x20has,\x20permission.*)\x20UNLESS\x20the\x20scene\x20verifies\x20identity\x20upstream\x20(level3_scene_combined)\x20or\x20the\x20venue\x20is\x20intentionally\x20open-trigger\x20—\x20otherwise\x20any\x20bystander\x20can\x20accelerate/drain\x20the\x20payout\x20(sahr).\x20Machine-enforced\x20check:\x20RAIL_NO_CALLER_IDENTITY\x20(info\x20disclosure)','typical_mistakes':['Pasting\x20a\x20forward-edge\x20identity\x20guard\x20here\x20—\x20it\x20binds\x20the\x20WRONG\x20subject\x20(advancer\x20vs\x20settlement\x20triggerer)','No\x20identity\x20leg\x20at\x20all\x20on\x20a\x20non-open\x20venue','Requiring\x20submission\x20slots\x20that\x20the\x20settlement\x20tx\x20never\x20carries'],'derived_rules':[{'id':'RAIL_NO_CALLER_IDENTITY','requirement':'An\x20allocator\x20gate\x20with\x20no\x20caller-identity\x20leg\x20is\x20triggerable\x20by\x20any\x20address\x20—\x20disclosure;\x20legitimate\x20only\x20for\x20scene-verified\x20or\x20intentionally\x20open-trigger\x20venues','enforced_by':'allocator-rail-verifier.ts\x20(shipped,\x20info)'},{'id':'RAIL_TERMINAL_UNCOVERED','requirement':'Every\x20machine\x20terminal\x20state\x20must\x20have\x20a\x20satisfiable\x20rail\x20through\x20some\x20allocator\x20row','enforced_by':'allocator-rail-verifier.ts\x20(shipped)'},{'id':'RAIL_AWARD_EXIT_MISSING','requirement':'Every\x20terminal\x20—\x20including\x20the\x20terminals\x20an\x20awarded\x20order\x20rests\x20at\x20—\x20must\x20keep\x20a\x20fund\x20exit\x20row\x20on\x20the\x20NODE\x20axis,\x20else\x20escrow\x20strands\x20(decision\x2011:\x20coverage\x20is\x20node-keyed,\x20never\x20claimed-keyed)','enforced_by':'allocator-rail-verifier.ts\x20(shipped)'},{'id':'RAIL_CLAIMED_BY_LEG','requirement':'Decision\x2011\x20two-rail\x20independence:\x20a\x20fund\x20rail\x20whose\x20satisfiability\x20flips\x20on\x20the\x20order.claimed_by\x20axis\x20READS\x20the\x20payout\x20stamp\x20—\x20fund\x20rails\x20are\x20node-gated\x20only;\x20the\x20award\x20is\x20the\x20indemnity\x20track\x27s\x20separate\x20commercial\x20payout\x20(double\x20collection\x20is\x20legal,\x20disclosed\x20at\x20the\x20MCP\x20confirmation\x20gate)','enforced_by':'allocator-rail-verifier.ts\x20(shipped,\x20critical)'},{'id':'RAIL_DEAD_LITERAL','requirement':'Sibling\x20literals\x20contradicting\x20a\x20conjunction-scoped\x20equality\x20are\x20unsatisfiable\x20—\x20dead\x20rows\x20strand\x20the\x20states\x20they\x20were\x20meant\x20to\x20serve','enforced_by':'allocator-rail-verifier.ts\x20(shipped)'}]},{'host':'reward_claim','evaluation_timing':'At\x20the\x20reward\x20claim\x20tx\x20(the\x20claimant\x27s\x20tx)\x20—\x20before\x20the\x20once-slot\x20is\x20consumed','signer_subject':'The\x20CLAIMANT\x20(whoever\x20signs\x20the\x20claim\x20tx)','order_anchor':'NO\x20by\x20default\x20—\x20the\x20Reward\x20object\x20carries\x20no\x20order\x20context;\x20order.*\x20legs\x20have\x20nothing\x20to\x20resolve\x20against\x20UNLESS\x20the\x20guard\x27s\x20table\x20declares\x20an\x20order-slot\x20submission\x20that\x20the\x20claimant\x27s\x20passport\x20fills\x20(per-order\x20bounty\x20shape:\x20guard\x20+\x20store_from\x20scoping)','submission_channel':'Passport\x20submission\x20on\x20the\x20claim\x20tx\x20(the\x20submitted-object\x20slots),\x20or\x20constant\x20table\x20entries\x20only','identity_obligation':'Identity,\x20when\x20required,\x20must\x20ride\x20the\x20submission\x20channel\x20(e.g.\x20an\x20order-owner\x20slot\x20filled\x20by\x20the\x20claimant\x27s\x20passport)\x20—\x20NOT\x20order.*\x20direct\x20reads;\x20per-order\x20once-scoping\x20comes\x20from\x20the\x20claim\x20key\x20(recipient,\x20guard,\x20store_from)\x20with\x20the\x20v139\x20store_from\x20behavior,\x20not\x20from\x20guard\x20legs','typical_mistakes':['order.owner\x20/\x20progress.current\x20legs\x20pasted\x20from\x20a\x20forward\x20guard\x20—\x20they\x20abort\x20or\x20mislead\x20(no\x20order\x20anchor\x20in\x20the\x20claim\x20context)','Assuming\x20per-order\x20once\x20semantics\x20without\x20the\x20store_from\x20binding'],'derived_rules':[{'id':'RC_NO_ORDER_ANCHOR','requirement':'order.*\x20/\x20progress.*\x20query\x20legs\x20are\x20structurally\x20dead\x20here\x20(no\x20order\x20anchor\x20in\x20the\x20claim\x20context)\x20unless\x20an\x20order-slot\x20submission\x20is\x20declared','enforced_by':BINDING_VERIFIER}]},{'host':'service_buy_guard','evaluation_timing':'Inside\x20the\x20purchase\x20tx\x20itself,\x20before\x20the\x20order\x20is\x20created','signer_subject':'The\x20BUYER\x20(tx\x20sender)','order_anchor':'NO\x20—\x20the\x20order\x20does\x20not\x20exist\x20yet;\x20only\x20service-side\x20and\x20repository/permission\x20state\x20is\x20readable','submission_channel':'Passport\x20supplied\x20with\x20the\x20purchase','identity_obligation':'Buyer\x20binding\x20per\x20the\x20venue\x20policy\x20(level1\x20strict\x20single\x20/\x20level2\x20allowlist\x20/\x20level3\x20scene-verified)','typical_mistakes':['Reading\x20order.*\x20state\x20(nothing\x20exists\x20yet\x20—\x20aborts\x20or,\x20pre-136\x20semantics,\x20resolves\x20nothing)','Escrow/funding\x20checks\x20that\x20belong\x20to\x20the\x20allocator\x20rail\x20instead'],'derived_rules':[{'id':'SB_NO_ORDER_STATE','requirement':'order.*\x20query\x20legs\x20are\x20structurally\x20dead\x20(the\x20order\x20does\x20not\x20exist\x20inside\x20the\x20purchase\x20tx)','enforced_by':BINDING_VERIFIER}]},{'host':'arbitration_voting','evaluation_timing':'At\x20arbitration\x20vote\x20casts\x20/\x20resolution\x20entry\x20—\x20per\x20voting-rule\x20evaluation','signer_subject':'The\x20VOTER\x20/\x20arbitrator\x20operator','order_anchor':'Indirect\x20—\x20the\x20Arb\x20case\x20is\x20in\x20scope\x20(arb.*\x20queries);\x20the\x20underlying\x20order\x20is\x20reachable\x20through\x20the\x20case\x20when\x20the\x20flow\x20passes\x20it','submission_channel':'Passport\x20of\x20the\x20voter\x27s\x20tx','identity_obligation':'Voter\x20must\x20satisfy\x20the\x20voting_guard\x27s\x20weight/eligibility\x20rule\x20(or\x20the\x20arb\x20is\x20open-vote\x20by\x20design)','typical_mistakes':['Treating\x20the\x20arb\x20case\x20as\x20an\x20order\x20(arb.*\x20fields\x20differ\x20from\x20order.*\x20fields)','Evidence\x20legs\x20(arb.indemnity)\x20used\x20where\x20the\x20variant\x20is\x20not\x20guaranteed\x20(enum\x20payload\x20aborts)'],'derived_rules':[{'id':'AV_ARB_NAMESPACE','requirement':'Case-scoped\x20queries\x20must\x20use\x20arb.*\x20fields\x20—\x20order.*\x20fields\x20do\x20not\x20resolve\x20against\x20an\x20Arb\x20case','enforced_by':BINDING_VERIFIER}]},{'host':'progress_submission','evaluation_timing':'At\x20progress\x20submission/attestation\x20points\x20(history-bearing\x20edges)','signer_subject':'The\x20SUBMITTER\x20(operator\x20or\x20buyer\x20attestant)','order_anchor':'YES\x20—\x20same\x20order\x20context\x20as\x20machine_forward','submission_channel':'The\x20submission\x20payload\x20itself\x20(this\x20host\x27s\x20purpose\x20is\x20filling\x20history/slots)','identity_obligation':'Submitter\x20binding\x20mirrors\x20the\x20forward-edge\x20obligation\x20for\x20the\x20edge\x20it\x20rides','typical_mistakes':['Skipping\x20the\x20identity\x20leg\x20because\x20\x27it\x27s\x20just\x20an\x20attestation\x27\x20—\x20attestations\x20are\x20replayable\x20without\x20one'],'derived_rules':[{'id':'PS_IDENTITY_REQUIRED','requirement':'Every\x20attestation\x20edge\x20must\x20carry\x20an\x20identity\x20leg\x20—\x20attestations\x20are\x20replayable\x20without\x20one','enforced_by':BINDING_VERIFIER}]},{'host':'repository_write','evaluation_timing':'At\x20the\x20write-guarded\x20repository\x20op\x20(data\x20upsert\x20through\x20a\x20guarded\x20channel)','signer_subject':'The\x20WRITER','order_anchor':'Only\x20if\x20the\x20row\x20is\x20order-keyed\x20and\x20the\x20op\x20passes\x20it;\x20row-key\x20semantics\x20are\x20the\x20guard\x27s\x20own\x20business','submission_channel':'Passport\x20of\x20the\x20writing\x20tx\x20(quote_guard\x20references\x20must\x20be\x20in\x20the\x20impack\x20list\x20—\x20QUOTE-GUARD\x20CARRY)','identity_obligation':'Writer\x20must\x20be\x20a\x20trusted\x20role\x20for\x20the\x20key\x20family\x20(permission-resolved\x20patterns)\x20—\x20repository\x20rows\x20feed\x20aggregates\x20(sum/count)\x20that\x20other\x20guards\x20price\x20against','typical_mistakes':['Open-write\x20rows\x20feeding\x20SUM_BOUND\x20pricing\x20aggregates\x20(forgery\x20by\x20write)','Missing\x20quote_guard\x20in\x20the\x20passport\x20(aborts\x20fail-closed)'],'derived_rules':[{'id':'RW_QUOTE_GUARD_CARRY','requirement':'Guard\x20trees\x20reading\x20governed\x20repository\x20rows\x20require\x20the\x20row\x20policy\x27s\x20quote_guard\x20in\x20the\x20reading\x20passport\x27s\x20impack\x20(QUOTE-GUARD\x20CARRY)','enforced_by':BINDING_VERIFIER},{'id':'RW_OPEN_WRITE_FEEDS_AGGREGATE','requirement':'Open-write\x20rows\x20must\x20not\x20feed\x20SUM/COUNT\x20aggregates\x20that\x20other\x20guards\x20price\x20against\x20(forgery\x20by\x20write)','enforced_by':BINDING_VERIFIER}]},{'host':'gen_passport','evaluation_timing':'At\x20passport\x20generation\x20(issuance\x20gating)','signer_subject':'The\x20PASSPORT\x20REQUESTER','order_anchor':'Service-side\x20state\x20only\x20(same\x20posture\x20as\x20service_buy_guard)','submission_channel':'n/a\x20(the\x20passport\x20is\x20the\x20product\x20of\x20this\x20host)','identity_obligation':'Issuance\x20policy\x20per\x20the\x20venue\x20(who\x20may\x20hold\x20a\x20passport)','typical_mistakes':['Order-dependent\x20issuance\x20legs\x20(no\x20order\x20exists\x20at\x20issuance\x20time)'],'derived_rules':[{'id':'GP_NO_ORDER_AT_ISSUANCE','requirement':'Order-dependent\x20issuance\x20legs\x20are\x20structurally\x20dead\x20(no\x20order\x20exists\x20at\x20issuance\x20time)','enforced_by':BINDING_VERIFIER}]},{'host':'treasury_external_deposit','evaluation_timing':'At\x20the\x20external\x20deposit\x20tx\x20—\x20the\x20guard\x20runs\x20against\x20the\x20depositor\x27s\x20passport\x20BEFORE\x20any\x20balance\x20credit','signer_subject':'The\x20DEPOSITOR\x20(tx\x20sender,\x20passport\x20carrier)\x20—\x20the\x20guard\x20gates\x20who\x20may\x20fund\x20the\x20treasury\x20through\x20this\x20channel','order_anchor':'NO\x20—\x20the\x20treasury\x20has\x20no\x20order\x20scope;\x20order.*\x20legs\x20have\x20nothing\x20to\x20resolve\x20against','submission_channel':'The\x20deposit\x20passport\x27s\x20submissions:\x20the\x20optional\x20amount\x20identifier\x20resolves\x20a\x20NUMBER\x20slot\x20(type-asserted\x20at\x20bind\x20time);\x20the\x20optional\x20store_from_id\x20resolves\x20an\x20ADDRESS-compatible\x20slot','identity_obligation':'Whoever\x20passes\x20the\x20guard\x20may\x20deposit\x20—\x20eligibility\x20IS\x20the\x20guard\x20tree;\x20there\x20is\x20no\x20additional\x20host-side\x20identity\x20check','typical_mistakes':['Treating\x20the\x20amount\x20identifier\x20as\x20a\x20global\x20deposit\x20cap\x20—\x20it\x20only\x20sizes\x20THIS\x20channel\x27s\x20credit;\x20submitted\x20amount\x20≤\x20coin\x20value\x20with\x20the\x20remainder\x20refunded\x20to\x20the\x20depositor\x20(partial\x20deposit)','Omitting\x20the\x20amount\x20identifier:\x20the\x20WHOLE\x20coin\x20is\x20credited\x20unconditionally\x20once\x20the\x20guard\x20passes','Expecting\x20store_from_id\x20to\x20verify\x20fund\x20provenance\x20—\x20it\x20is\x20only\x20RECORDED\x20in\x20the\x20history\x20record,\x20never\x20checked','Assuming\x20fail-closed\x20on\x20an\x20unregistered\x20guard:\x20a\x20deposit\x20through\x20a\x20guard\x20not\x20on\x20the\x20treasury\x27s\x20list\x20REFUNDS\x20the\x20coin\x20(fail-safe)'],'derived_rules':[{'id':'TD_AMOUNT_SLOT_SEMANTICS','requirement':'A\x20number\x20slot\x20referenced\x20as\x20the\x20deposit\x20amount\x20is\x20a\x20caller-declared\x20value:\x20disclose\x20whether\x20the\x20guard\x20bounds\x20it\x20(comparison\x20legs)\x20or\x20it\x20merely\x20sizes\x20the\x20credit','enforced_by':BINDING_VERIFIER}]},{'host':'treasury_external_withdraw','evaluation_timing':'At\x20the\x20external\x20withdraw\x20tx\x20—\x20the\x20guard\x20runs\x20first,\x20then\x20the\x20payee\x20lock\x20and\x20the\x20amount-vs-balance\x20assertion\x20BEFORE\x20any\x20debit','signer_subject':'The\x20WITHDRAWER,\x20who\x20is\x20forcibly\x20also\x20the\x20PAYEE\x20—\x20recipient\x20==\x20tx\x20sender\x20aborts\x20otherwise\x20(E_EXTERNAL_RECIPIENT_NOT_SIGNER)','order_anchor':'NO\x20—\x20the\x20treasury\x20has\x20no\x20order\x20scope;\x20order.*\x20legs\x20have\x20nothing\x20to\x20resolve\x20against','submission_channel':'The\x20withdraw\x20passport\x27s\x20submissions:\x20the\x20amount\x20identifier\x20(REQUIRED\x20at\x20bind\x20time,\x20number\x20type)\x20supplies\x20the\x20withdrawal\x20size;\x20the\x20optional\x20store_from_id\x20records\x20provenance','identity_obligation':'The\x20guard\x20must\x20gate\x20WHO\x20may\x20withdraw\x20—\x20the\x20host\x20only\x20locks\x20payee\x20==\x20signer;\x20anyone\x20passing\x20the\x20guard\x20can\x20move\x20funds\x20to\x20themselves','typical_mistakes':['Believing\x20the\x20guard\x20bounds\x20the\x20withdrawal\x20AMOUNT\x20—\x20the\x20number\x20slot\x20is\x20caller-DECLARED;\x20without\x20comparison\x20legs\x20on\x20that\x20slot\x20the\x20withdrawer\x20picks\x20any\x20amount\x20up\x20to\x20the\x20full\x20balance\x20(drain\x20surface)','Redirecting\x20the\x20payout\x20to\x20a\x20third\x20party\x20via\x20recipient\x20—\x20aborts\x20by\x20design;\x20third-party\x20payouts\x20belong\x20to\x20the\x20permissioned\x20withdraw\x20path','Amount\x20above\x20balance\x20aborts\x20fail-closed\x20(E_WITHDRAW_BALANCE_INSUFFICIENT)\x20—\x20unlike\x20the\x20deposit\x20channel\x27s\x20refund\x20path'],'derived_rules':[{'id':'TW_AMOUNT_UNBOUNDED','requirement':'If\x20the\x20amount\x20number\x20slot\x20appears\x20only\x20as\x20a\x20submission\x20source\x20and\x20never\x20inside\x20a\x20comparison\x20leg,\x20the\x20withdrawal\x20size\x20is\x20caller-chosen\x20—\x20disclose\x20the\x20drain\x20surface\x20on\x20non-open\x20venues','enforced_by':BINDING_VERIFIER}]},{'host':'arbitration_usage','evaluation_timing':'At\x20dispute\x20filing:\x20the\x20no-passport\x20channel\x20requires\x20usage_guard\x20NONE\x20(E_NEED_PASSPORT);\x20the\x20passport\x20channel\x20runs\x20the\x20guard\x20against\x20the\x20filing\x20passport\x20before\x20the\x20case\x20object\x20is\x20minted','signer_subject':'The\x20DISPUTER\x20(buyer\x20or\x20merchant\x20filing\x20through\x20the\x20Service\x20—\x20filing\x20never\x20bypasses\x20the\x20service-side\x20neutrality\x20checks)','order_anchor':'NO\x20at\x20guard\x20evaluation\x20—\x20the\x20guard\x20evaluates\x20against\x20the\x20passport\x20only;\x20the\x20order\x20is\x20a\x20dispute\x20parameter\x20and\x20the\x20Arb\x20case\x20does\x20not\x20exist\x20yet,\x20so\x20arb.*\x20legs\x20are\x20dead\x20here\x20too','submission_channel':'The\x20filing\x20passport\x27s\x20submissions\x20(the\x20guard\x20must\x20be\x20in\x20the\x20passport\x20impack\x20—\x20E_NOT_IMPACK_GUARD)','identity_obligation':'The\x20usage_guard\x20gates\x20WHO\x20may\x20open\x20a\x20case\x20at\x20this\x20venue\x20—\x20it\x20is\x20a\x20filing\x20gate,\x20NOT\x20the\x20voting\x20eligibility\x20rule\x20(that\x20is\x20voting_guard)','typical_mistakes':['Confusing\x20usage_guard\x20with\x20voting_guard\x20—\x20one\x20gates\x20filing\x20(dispute),\x20the\x20other\x20gates\x20vote\x20weight/eligibility','arb.*\x20or\x20order.*\x20query\x20legs\x20in\x20a\x20usage\x20guard\x20—\x20neither\x20resolves\x20at\x20filing\x20time\x20(no\x20case\x20minted,\x20order\x20not\x20in\x20guard\x20scope)','Assuming\x20setting\x20usage_guard\x20also\x20restricts\x20voting\x20—\x20voting\x20stays\x20open\x20unless\x20voting_guard\x20is\x20separately\x20configured'],'derived_rules':[{'id':'AU_DEAD_CASE_SCOPES','requirement':'Query\x20legs\x20in\x20the\x20arb.*\x20/\x20order.*\x20namespaces\x20are\x20structurally\x20dead\x20in\x20a\x20usage\x20guard\x20(no\x20case,\x20no\x20order\x20in\x20evaluation\x20scope)','enforced_by':BINDING_VERIFIER}]},{'host':'demand_present','evaluation_timing':'At\x20the\x20present\x20tx:\x20once\x20ANY\x20guard\x20is\x20registered\x20the\x20free\x20present\x20aborts\x20(E_NEED_PASSPORT);\x20the\x20presenter\x20supplies\x20a\x20passport\x20and\x20ONE\x20chosen\x20registered\x20guard,\x20evaluated\x20against\x20that\x20passport','signer_subject':'The\x20PRESENTER\x20(the\x20service\x20provider\x20side\x20presenting\x20into\x20the\x20demand)','order_anchor':'NO\x20—\x20presenting\x20precedes\x20any\x20order;\x20the\x20demand\x20object\x20itself\x20is\x20the\x20only\x20scope','submission_channel':'The\x20presenter\x27s\x20passport;\x20when\x20the\x20demand\x20guard\x20declares\x20a\x20service_identifier\x20slot\x20(object-type-validated\x20Service\x20at\x20bind\x20time),\x20the\x20PRESENTED\x20SERVICE\x20ADDRESS\x20comes\x20from\x20that\x20submission\x20and\x20OVERRIDES\x20the\x20tx\x20parameter','identity_obligation':'The\x20demand\x20owner\x20structures\x20guards\x20to\x20filter\x20who\x20may\x20present\x20—\x20the\x20presenter\x20must\x20pass\x20the\x20ONE\x20guard\x20they\x20choose','typical_mistakes':['Reading\x20the\x20guard\x20list\x20as\x20AND\x20—\x20the\x20host\x20is\x20presenter-chosen\x20OR:\x20passing\x20ANY\x20single\x20registered\x20guard\x20admits\x20the\x20present;\x20a\x20strict\x20gate\x20must\x20put\x20every\x20condition\x20inside\x20EVERY\x20guard\x20(or\x20into\x20one\x20guard)','Expecting\x20the\x20service\x20tx\x20parameter\x20to\x20win\x20—\x20a\x20service_identifier\x20submission\x20slot\x20overrides\x20it\x20(the\x20guard\x20authors\x20decide\x20what\x20may\x20be\x20presented)','Adding\x20a\x20second\x20guard\x20believing\x20it\x20tightens\x20the\x20gate\x20—\x20it\x20WIDENS\x20it\x20(another\x20acceptance\x20path)'],'derived_rules':[{'id':'DP_MULTI_GUARD_IS_OR','requirement':'Multiple\x20demand\x20guards\x20widen\x20the\x20gate\x20(presenter-chosen\x20OR);\x20flag\x20compositions\x20whose\x20design\x20intent\x20reads\x20as\x20AND','enforced_by':BINDING_VERIFIER}]},{'host':'repository_quote','evaluation_timing':'Never\x20a\x20tx-entry\x20gate:\x20quote_guard\x20is\x20checked\x20as\x20IMPACK\x20MEMBERSHIP\x20whenever\x20a\x20guard\x20tree\x20on\x20ANY\x20host\x20executes\x20a\x20repository.data\x20query\x20against\x20a\x20policy\x20that\x20declares\x20one\x20(the\x20native\x20guard\x20verification\x20consults\x20the\x20reading\x20passport\x27s\x20impack\x20snapshot)','signer_subject':'n/a\x20—\x20a\x20membership\x20check\x20on\x20the\x20reading\x20passport,\x20not\x20an\x20identity\x20evaluation','order_anchor':'n/a\x20—\x20orthogonal\x20to\x20order\x20scope','submission_channel':'The\x20reading\x20passport\x27s\x20impack\x20list:\x20the\x20policy\x27s\x20quote_guard\x20must\x20ride\x20every\x20passport\x20whose\x20guard\x20trees\x20read\x20governed\x20rows\x20(QUOTE-GUARD\x20CARRY)','identity_obligation':'The\x20quote_guard\x20defines\x20who\x20may\x20QUOTE\x20(read\x20pricing\x20data);\x20it\x20must\x20be\x20a\x20DEPENDED\x20guard\x20—\x20frozen\x20(immutable),\x20rep-flagged,\x20and\x20rely-free\x20—\x20asserted\x20at\x20quote-guard\x20binding\x20time\x20(E_NEED_DEPENDENT_GUARD)','typical_mistakes':['Designing\x20a\x20mutable\x20or\x20rely-carrying\x20quote\x20guard\x20—\x20the\x20chain\x20aborts\x20at\x20set\x20time;\x20quote\x20guards\x20are\x20frozen\x20shared\x20pricing\x20definitions\x20by\x20construction','Forgetting\x20QUOTE-GUARD\x20CARRY:\x20guard\x20trees\x20reading\x20governed\x20rows\x20fail\x20unless\x20the\x20consuming\x20passport\x20declares\x20the\x20quote_guard\x20in\x20its\x20impack','Confusing\x20the\x20quote\x20path\x20with\x20the\x20write\x20path\x20—\x20write_guards\x20evaluate\x20per\x20write\x20tx;\x20quote_guard\x20only\x20gates\x20reads\x20of\x20governed\x20data'],'derived_rules':[{'id':'RQ_CARRY_OBLIGATION','requirement':'A\x20guard\x20tree\x20containing\x20repository.data\x20queries\x20against\x20a\x20quoted\x20policy\x20obliges\x20the\x20consuming\x20passport\x20to\x20carry\x20that\x20policy\x27s\x20quote_guard\x20—\x20disclose\x20the\x20carry\x20requirement\x20at\x20design\x20time','enforced_by':BINDING_VERIFIER},{'id':'RQ_DEPENDED_ONLY','requirement':'Quote\x20guards\x20must\x20satisfy\x20the\x20depended\x20shape\x20(relies\x20empty\x20+\x20immutable\x20+\x20rep)\x20—\x20flag\x20mutable/relying\x20candidates\x20before\x20bind\x20time','enforced_by':BINDING_VERIFIER}]},{'host':'guard_relied','evaluation_timing':'Composite\x20(not\x20a\x20host\x20object):\x20wherever\x20the\x20PARENT\x20guard\x20is\x20bound,\x20its\x20relied\x20children\x20evaluate\x20in\x20the\x20SAME\x20host\x20evaluation\x20—\x20each\x20child\x20result\x20folds\x20into\x20the\x20parent\x20via\x20relies_logic_and\x20(default\x20true);\x20passport\x20verification\x20validates\x20children\x20BEFORE\x20the\x20parent','signer_subject':'INHERITED\x20from\x20the\x20parent\x27s\x20host\x20—\x20relied\x20children\x20see\x20the\x20parent\x20host\x27s\x20signer,\x20which\x20is\x20exactly\x20the\x20re-hosting\x20hazard\x20this\x20catalog\x20exists\x20for','order_anchor':'INHERITED\x20from\x20the\x20parent\x27s\x20host\x20—\x20order.*\x20legs\x20inside\x20relied\x20children\x20resolve\x20only\x20if\x20the\x20parent\x27s\x20host\x20provides\x20an\x20anchor','submission_channel':'The\x20SAME\x20passport\x20that\x20carries\x20the\x20parent:\x20guard_add\x20requires\x20every\x20relied\x20guard\x20already\x20present\x20(E_RELIES_GUARD_NOT_ADDED)\x20—\x20the\x20full\x20relies\x20closure\x20must\x20ride\x20every\x20passport','identity_obligation':'Chain-structured:\x20the\x20rely-adding\x20entry\x20accepts\x20only\x20DEPENDED\x20children\x20(relies\x20empty\x20+\x20immutable\x20+\x20rep)\x20—\x20depth\x20is\x20strictly\x201,\x20max\x20MAX_DEPENDED_COUNT\x20=\x204\x20children,\x20self-rely\x20aborts\x20(E_GUARD_SELF)','typical_mistakes':['Assuming\x20relied\x20children\x20keep\x20the\x20context\x20they\x20were\x20authored\x20under\x20—\x20they\x20INHERIT\x20the\x20parent\x20host\x27s\x20signer/order/slot\x20semantics\x20(re-hosting\x20the\x20parent\x20re-contextualizes\x20every\x20child:\x20audit\x20all\x20children\x20on\x20any\x20host\x20change)','Designing\x20multi-level\x20rely\x20chains\x20—\x20the\x20chain\x20flattens\x20to\x20depth\x201\x20on-chain\x20(children\x20must\x20be\x20depended)','Passports\x20carrying\x20the\x20parent\x20without\x20the\x20children\x20—\x20aborts\x20at\x20passport\x20build\x20(E_RELIES_GUARD_NOT_ADDED)','Mixing\x20relies_logic_and\x20polarity\x20without\x20re-checking\x20the\x20acceptance\x20surface\x20(default\x20AND;\x20OR\x20widens\x20to\x20any\x20passing\x20child)'],'derived_rules':[{'id':'GR_CHILD_HOST_REAUDIT','requirement':'On\x20any\x20host\x20change\x20of\x20a\x20guard\x20carrying\x20relies,\x20re-audit\x20every\x20relied\x20child\x20against\x20the\x20NEW\x20host\x27s\x20three\x20inputs\x20(signer\x20/\x20order\x20anchor\x20/\x20submission\x20channel)\x20—\x20bounded:\x20depth\x201,\x20max\x204\x20children','enforced_by':BINDING_VERIFIER},{'id':'GR_CLOSURE_CARRY','requirement':'Every\x20passport\x20carrying\x20a\x20relying\x20parent\x20must\x20carry\x20all\x20relied\x20children\x20first\x20(closure)\x20—\x20flag\x20designs\x20where\x20the\x20carry\x20surface\x20is\x20not\x20communicated','enforced_by':BINDING_VERIFIER}]}];export function getGuardHostContext(a){return GUARD_HOST_CONTEXTS['find'](b=>b['host']===a);}const ACTION_HOST={'buy':'service_buy_guard','forward':'machine_forward','allocate':'service_allocator_guard','claim_reward':'reward_claim','vote':'arbitration_voting','dispute':'arbitration_usage','write_repository':'repository_write','submit_progress':'progress_submission','gen_passport':'gen_passport'},CUSTOM_HOST_BY_OBJECT={'Demand':'demand_present','Repository':'repository_write'};export function catalogHostFromHint(a){if(!a||typeof a['action']!=='string')return undefined;if(a['action']==='custom'){const b=a['host_object']?CUSTOM_HOST_BY_OBJECT[a['host_object']]:undefined;return b??undefined;}return ACTION_HOST[a['action']]??undefined;}
@@ -1 +1 @@
1
- import{validateGuardData,MAX_DESCRIPTION_LENGTH,MAX_GUARD_TABLE_ITEM_LENGTH,MAX_NAME_LENGTH,ValueType}from'@wowok/wowok';import{rootReferencedIdentifiers}from'./guard-risk.js';import{evaluateGuardDraft}from'./guard-eval.js';import{findScene,inferSceneFromAction}from'./guard-ledger.js';import{suggestTemplateForScene}from'./guard-templates.js';import{validateGuardTreeShape}from'./guard-render.js';import{isBoolReturningQuery}from'../schema/utils/guard-query-utils.js';import{valueTypeName}from'./guard-submission-brief.js';const VALUE_TYPE_ID_TO_NAME={[ValueType['Bool']]:'Bool',[ValueType['Address']]:'Address',[ValueType['String']]:'String',[ValueType['U8']]:'U8',[ValueType['U16']]:'U16',[ValueType['U32']]:'U32',[ValueType['U64']]:'U64',[ValueType['U128']]:'U128',[ValueType['U256']]:'U256',[ValueType['VecBool']]:'VecBool',[ValueType['VecAddress']]:'VecAddress',[ValueType['VecString']]:'VecString',[ValueType['VecU8']]:'VecU8',[ValueType['VecU16']]:'VecU16',[ValueType['VecU32']]:'VecU32',[ValueType['VecU64']]:'VecU64',[ValueType['VecU128']]:'VecU128',[ValueType['VecU256']]:'VecU256',[ValueType['VecVecU8']]:'VecVecU8'};function normalizeValueTypeNames(a){if(!a['table']['some'](b=>typeof b['value_type']==='number'))return a;return{...a,'table':a['table']['map'](b=>typeof b['value_type']==='number'?{...b,'value_type':VALUE_TYPE_ID_TO_NAME[b['value_type']]??String(b['value_type'])}:b)};}function deepClone(a){return JSON['parse'](JSON['stringify'](a));}function rootToString(a){return JSON['stringify'](a);}function canonicalNode(a){if(a===null||typeof a!=='object')return JSON['stringify'](a)??'null';if(Array['isArray'](a))return'['+a['map'](canonicalNode)['join'](',')+']';const b=Object['keys'](a)['sort']();return'{'+b['map'](c=>JSON['stringify'](c)+':'+canonicalNode(a[c]))['join'](',')+'}';}const GE_NODE='logic_as_u256_greater_or_equal',LE_NODE='logic_as_u256_lesser_or_equal';function findDegenerateTimeWindows(a){const b=[],c=new Set(),d=g=>{const h=g['filter'](j=>j?.['type']===GE_NODE&&Array['isArray'](j['nodes'])&&j['nodes']['length']>=0x2),i=g['filter'](j=>j?.['type']===LE_NODE&&Array['isArray'](j['nodes'])&&j['nodes']['length']>=0x2);for(const j of h){for(const k of i){const l=canonicalNode(j['nodes'][0x0])===canonicalNode(k['nodes'][0x0]),m=canonicalNode(j['nodes'][0x1])===canonicalNode(k['nodes'][0x1]);if(!l||!m)continue;const n=canonicalNode(j)+'|'+canonicalNode(k);if(c['has'](n))continue;c['add'](n),b['push']({'ge':j,'le':k});}}},e=g=>{if(g?.['type']==='logic_and'&&Array['isArray'](g['nodes']))return g['nodes']['flatMap'](e);return[g];},f=g=>{if(!g||typeof g!=='object')return;if(g['type']==='logic_not')return;if(g['type']==='logic_and'&&Array['isArray'](g['nodes'])){const h=e(g);d(h),h['forEach'](f);return;}if(g['type']==='logic_or'&&Array['isArray'](g['nodes'])){for(const i of g['nodes']){i?.['type']==='logic_and'&&Array['isArray'](i['nodes'])?(d(i['nodes']),i['nodes']['forEach'](f)):f(i);}return;}if(g['type']===GE_NODE||g['type']===LE_NODE)d([g]);if(Array['isArray'](g['nodes']))g['nodes']['forEach'](f);};return f(a),b;}function hasSignerContext(a){const b=rootToString(a);return b['includes']('\x22Signer\x22')||b['includes']('\x22context\x22:\x22Signer\x22')||b['includes']('\x22context\x22:\x20\x22Signer\x22');}function getSubmissionEntries(a){return a['filter'](b=>b['b_submission']===!![]);}function inferValueType(a){if(typeof a==='string'){if(a['startsWith']('0x')&&a['length']>=0x3)return'Address';return'String';}if(typeof a==='number'){if(Number['isInteger'](a)){if(a>=0x0&&a<=0xff)return'U8';if(a>=0x0&&a<=0xffff)return'U16';return'U64';}return'U256';}if(typeof a==='boolean')return'Bool';if(Array['isArray'](a)){if(a['length']>0x0){const b=inferValueType(a[0x0]);if(b==='Address')return'Vec<Address>';if(b==='String')return'Vec<String>';if(b==='Bool')return'Vec<Bool>';}return'Vec<Address>';}return undefined;}function sdkIssueToDiagnostic(a){return{'code':a['code'],'message':a['message'],'severity':a['severity'],'source':'sdk','location':{'path':a['path']},'fix':{'description':'SDK\x20validation\x20failed\x20('+(a['sdk_error']??'InvalidParam')+');\x20manual\x20fix\x20required','auto_fixable':![]}};}async function checkSdkSyntax(a){const b=validateGuardTreeShape(a['root']);if(b['length']>0x0)return b['map'](g=>({'code':'G-001','message':g['message'],'severity':'error','source':'sdk','location':{'path':g['path']},'fix':{'description':'Unary\x20operators\x20(logic_not,\x20value_type,\x20vec_length,\x20calc_string_length,\x20convert_*)\x20take\x20a\x20single\x20\x27node\x27\x20child;\x20only\x20multi-operand\x20forms\x20(logic_and,\x20logic_or,\x20logic_equal,\x20logic_as_u256_*,\x20calc_number_*,\x20vec_contains_*)\x20take\x20a\x20\x27nodes\x27\x20array.','auto_fixable':![]}}));const c=a['table']['map'](g=>({'identifier':g['identifier'],'b_submission':g['b_submission']??![],'value_type':g['value_type']??'Address','value':g['value'],'name':g['name']??''}));let d;try{d=await validateGuardData({'description':a['description'],'table':c,'root':a['root'],'rely':a['rely']});}catch(g){const h=g?.['message']??String(g),i=/guard tree ([^:]+):/['exec'](h);return[{'code':'G-001','message':h,'severity':'error','source':'sdk','location':{'path':i?toJsonPointer(i[0x1]):'/root'},'fix':{'description':'Repair\x20the\x20tree\x20at\x20the\x20named\x20path:\x20unary\x20operators\x20(logic_not,\x20convert_*,\x20value_type)\x20take\x20a\x20single\x20\x27node\x27\x20child;\x20only\x20multi-operand\x20forms\x20(logic_and,\x20logic_or,\x20logic_equal,\x20calc_*,\x20vec_*)\x20take\x20\x27nodes\x27.','auto_fixable':![]}}];}const f=d['map'](sdkIssueToDiagnostic);if(!hasRepositoryIdSlotRef(a['root']))return f;return f['map'](j=>j['code']==='G-008'&&/invalid parameter:checkType/i['test'](j['message'])?{...j,'severity':'warning','message':j['message']+'\x20—\x20KNOWN\x20ANALYZER\x20GAP\x20(rex5\x20T-29):\x20the\x20checker\x20does\x20not\x20implement\x20the\x20id\x20slot-reference\x20grammar\x20'+'({identifier:N})\x20that\x20the\x20chain\x20resolves\x20for\x20repository-data\x20queries;\x20chain-proven\x20guards\x20ship\x20this\x20exact\x20shape.','fix':{'description':'Do\x20NOT\x20rebuild\x20the\x20guard\x20on\x20this\x20diagnostic\x20alone:\x20run\x20a\x20free\x20dry\x20run\x20of\x20the\x20guarded\x20operation.\x20'+'If\x20it\x20accepts\x20the\x20slot-reference\x20leg\x20on-chain,\x20the\x20guard\x20is\x20valid\x20—\x20the\x20SDK\x20checker\x27s\x20grammar\x20gap\x20is\x20tracked\x20separately.','auto_fixable':![]}}:j);}function hasRepositoryIdSlotRef(a){const b=c=>{if(!c||typeof c!=='object')return![];if(Array['isArray'](c))return c['some'](b);const d=c;if(typeof d['type']==='string'&&d['type']['startsWith']('query_repository_data')&&d['id']!==undefined&&d['id']!==null&&typeof d['id']==='object'&&!Array['isArray'](d['id'])&&Number['isFinite'](d['id']['identifier']))return!![];return Object['values'](d)['some'](b);};return b(a);}function toJsonPointer(a){const b=a['replace'](/^\/+/,'');return b['startsWith']('root')?'/'+b:'/root/'+b;}function checkSemanticErrors(a,b){const d=[],{table:e,root:f,binding_hint:g}=a,h=g?findScene(g['host_object']??'',g['binding_field']??''):undefined,i=getSubmissionEntries(e);if(i['length']>0x0&&f&&!hasSignerContext(f)){const k=i['some'](n=>n['value_type']==='Address'),l=h?.['id']==='service_order_allocators_guard'&&g?.['sharing_recipients']!==undefined&&g['sharing_recipients']['length']>0x0&&!g['sharing_recipients']['includes']('Signer'),m=h?.['id']==='service_order_allocators_guard'&&i['length']>0x0&&i['every'](n=>!rootReferencedIdentifiers(f)['has'](n['identifier']));if(k&&!l&&!m){const n=i['filter'](o=>o['value_type']==='Address')['map'](o=>e['indexOf'](o));d['push']({'code':'LE-04','message':'Submitted\x20data\x20has\x20no\x20Signer\x20binding\x20(submission\x20forgery\x20risk)','severity':'error','source':'lint','location':{'path':n['map'](o=>'/table/'+o)['join']('\x20→\x20')},'fix':{'description':'Add\x20logic_equal(context(Signer),\x20identifier[N])\x20in\x20root\x20to\x20bind\x20the\x20submitter\x20identity','auto_fixable':![]}});}}if(h?.['id']==='arbitration_voting_guard'){const o=i['some'](p=>['U8','U16','U32','U64','U128','U256']['includes'](p['value_type']??''));if(o){const p=i['filter'](q=>['U8','U16','U32','U64','U128','U256']['includes'](q['value_type']??''))['map'](q=>e['indexOf'](q));d['push']({'code':'LE-05','message':'voting_guard\x20voting\x20weight\x20comes\x20from\x20submitted\x20data\x20(weight\x20forgery\x20risk)','severity':'error','source':'lint','location':{'path':p['map'](q=>'/table/'+q)['join']('\x20→\x20')},'fix':{'description':'Derive\x20arbitrator\x20weights\x20from\x20the\x20Arb\x20object\x20via\x20witness\x20(e.g.\x20105\x20TypeArbArbitration)\x20rather\x20than\x20submitting\x20them\x20directly','auto_fixable':![]}});}}if(h?.['id']==='gen_passport_guard'||g?.['action']==='gen_passport'){const q=rootToString(f);if(q['includes']('1167')||q['includes']('repository.data')){const r=q['includes']('quote_guard');r&&d['push']({'code':'LE-06','message':'repository.data\x20query\x20with\x20quote_guard:\x20rigid\x20verification\x20requirement\x20—\x20ensure\x20Passport\x20includes\x20quote_guard\x20verification\x20with\x20necessary\x20submissions\x20(e.g.,\x20Payment\x20proof)','severity':'info','source':'lint','location':{'path':'/root'},'fix':{'description':'Ensure\x20the\x20quote_guard\x20is\x20verified:\x20user\x20submits\x20Payment\x20via\x20Passport,\x20quote_guard\x20verifies\x20Payment\x20fields,\x20repository\x20data\x20query\x20passes','auto_fixable':![]}});}}if(g?.['host_object']&&h&&b?.['host_published']!==!![]){const s=g['host_object'],t=e['filter'](u=>!u['b_submission']&&u['value_type']==='Address'&&typeof u['value']==='string'&&u['value']['startsWith']('0x')&&u['object_type']===s);if(t['length']>0x0){const u=t['map'](x=>e['indexOf'](x)),w=b?.['host_published']===![];d['push']({'code':'LE-07','message':'Circular\x20reference\x20uses\x20an\x20address\x20rather\x20than\x20a\x20name\x20(Host\x20Object\x20may\x20not\x20be\x20published\x20yet\x20when\x20the\x20Guard\x20is\x20created)','severity':w?'error':'warning','source':'lint','location':{'path':u['map'](x=>'/table/'+x+'/value')['join']('\x20→\x20')},'fix':{'description':'Change\x20value\x20from\x20an\x20address\x20to\x20an\x20object\x20name\x20(e.g.\x20\x22service1\x22);\x20the\x20SDK\x20will\x20resolve\x20it\x20to\x20an\x20address\x20after\x20the\x20Host\x20Object\x20is\x20published','auto_fixable':![]}});}}const j=e['filter'](x=>x['b_submission']===![]&&Array['isArray'](x['value'])&&x['value']['length']===0x0);j['length']>0x0&&d['push']({'code':'LE-10','message':'Static\x20table\x20slot(s)\x20'+j['map'](x=>x['identifier'])['join'](',\x20')+'\x20carry\x20an\x20EMPTY\x20array\x20value\x20—\x20'+'guard\x20table\x20construction\x20silently\x20DROPS\x20empty\x20vectors:\x20the\x20created\x20Guard\x20will\x20MISS\x20these\x20rows\x20while\x20creation\x20still\x20succeeds.','severity':'error','source':'lint','location':{'path':j['map'](x=>'/table['+x['identifier']+']')['join']('\x20→\x20')},'fix':{'description':'Give\x20each\x20flagged\x20slot\x20a\x20non-empty\x20static\x20value,\x20or\x20flip\x20it\x20to\x20b_submission=true\x20and\x20supply\x20the\x20value\x20at\x20Guard\x20trigger\x20time\x20(protocol\x20once-slots:\x20255\x20keys\x20on\x20the\x20submitted\x20bytes,\x20254\x20on\x20the\x20chain-derived\x20object\x20key).','auto_fixable':![]}});for(const {}of findDegenerateTimeWindows(f)){d['push']({'code':'LE-08','message':'Degenerate\x20time\x20window:\x20the\x20same\x20conjunction\x20asserts\x20`L\x20>=\x20R`\x20and\x20`L\x20<=\x20R`\x20over\x20'+'structurally\x20identical\x20operands.\x20Their\x20conjunction\x20is\x20`L\x20==\x20R`\x20—\x20on\x20a\x20millisecond\x20Clock\x20'+'an\x20~1\x20ms\x20window,\x20i.e.\x20the\x20guarded\x20forward\x20is\x20effectively\x20unreachable.\x20'+'`logic_as_u256_greater_or_equal`\x20is\x20a\x20LOWER\x20bound\x20(deadline\x20passed);\x20an\x20upper\x20bound\x20'+'(`logic_as_u256_lesser_or_equal`)\x20must\x20use\x20a\x20DIFFERENT\x20right-hand\x20side.','severity':'error','source':'lint','location':{'path':'/root'},'fix':{'description':'For\x20\x22the\x20deadline\x20has\x20passed\x22,\x20keep\x20ONLY\x20`L\x20>=\x20R`\x20and\x20delete\x20the\x20`<=`\x20clause.\x20'+'For\x20\x22the\x20window\x20is\x20open\x22,\x20keep\x20both\x20clauses\x20but\x20make\x20the\x20right-hand\x20sides\x20differ,\x20'+'e.g.\x20`L\x20>=\x20t`\x20and\x20`L\x20<=\x20t\x20+\x20K`.\x20Remember\x20`progress.current_time`\x20is\x20refreshed\x20on\x20'+'every\x20forward,\x20so\x20anchoring\x20a\x20release\x20lock\x20on\x20it\x20restarts\x20the\x20clock\x20at\x20each\x20node\x20change.','auto_fixable':![]}});}{const x=[],y=(A,B)=>{if(!B||typeof B!=='object')return;if(B['type']==='query'&&B['query']!==undefined){if(!isBoolReturningQuery(B['query'])){const C=typeof B['query']==='string'?B['query']:String(B['query']);x['push']({'op':A,'describe':'query\x20'+C,'claimedByTwin':/claimed_by/i['test'](C)&&!/\bsome\b/i['test'](C)});}}else{if(B['type']==='identifier'&&B['identifier']!==undefined){const D=e['find'](F=>F['identifier']===B['identifier']),E=D?.['value_type'];E&&E!=='Bool'&&E!=='Value'&&x['push']({'op':A,'describe':'identifier\x20'+B['identifier']+'\x20(table\x20value_type\x20'+E+')','claimedByTwin':![]});}}},z=A=>{if(!A||typeof A!=='object')return;if(A['type']==='logic_not'){y('logic_not',A['node']),z(A['node']);return;}Array['isArray'](A['nodes'])&&((A['type']==='logic_and'||A['type']==='logic_or')&&A['nodes']['forEach'](B=>y(A['type'],B)),A['nodes']['forEach'](z));if(A['node'])z(A['node']);};z(f);for(const A of x){d['push']({'code':'LE-09','message':A['op']+'\x20consumes\x20a\x20non-Bool\x20leaf\x20('+A['describe']+')\x20—\x20Bool\x20operators\x20take\x20Bool\x20operands\x20only\x20(crs\x20P2-1/P2-2)'+(A['claimedByTwin']?'.\x20TEACHING:\x20order.claimed_by\x20(query\x201571)\x20returns\x20Address;\x20its\x20Bool\x20twin\x20is\x20`order.claimed_by\x20some`\x20(query\x201570)\x20—\x20use\x20THAT\x20in\x20logic_not\x20/\x20logic_equal.':'.\x20TEACHING:\x20wrap\x20the\x20leaf\x20in\x20logic_equal[leaf,\x20identifier[N]]\x20(any\x20type)\x20or\x20a\x20logic_as_u256_*\x20operator\x20(numeric\x20comparison)\x20to\x20produce\x20a\x20Bool.'),'severity':'error','source':'lint','location':{'path':'/root'},'fix':{'description':A['claimedByTwin']?'Replace\x20query\x20order.claimed_by\x20with\x20order.claimed_by\x20some\x20(query\x201570)':'Wrap\x20the\x20leaf\x20in\x20logic_equal\x20against\x20identifier[N]\x20so\x20'+A['op']+'\x20receives\x20a\x20Bool','auto_fixable':![]}});}}{const B=new Set(['U8','U16','U32','U64','U128','U256']),C=(F,G)=>{if(!F||typeof F!=='object')return;if(Array['isArray'](F)){F['forEach'](I=>C(I,G));return;}const H=F;if(H['type']==='calc_string_length')return;if(Number['isFinite'](H['identifier']))G['add'](H['identifier']);for(const [I,J]of Object['entries'](H)){if(I==='object'&&typeof H['type']==='string'&&H['type']['startsWith']('query'))continue;C(J,G);}},D=[],E=F=>{if(!F||typeof F!=='object')return;if(Array['isArray'](F)){F['forEach'](E);return;}const G=F;if(typeof G['type']==='string'&&G['type']['startsWith']('logic_as_u256')){const H=new Set();C(G['nodes']??G,H);const I=[...H]['filter'](J=>{const K=e['find'](M=>M['identifier']===J),L=K?.['value_type'];return L!==undefined&&!B['has'](L)&&L!=='Value';});if(I['length']>0x0)D['push']({'op':G['type'],'ids':I});}Object['values'](G)['forEach'](J=>E(J));};E(f);for(const F of D){const G=F['ids']['map'](H=>{const I=e['find'](J=>J['identifier']===H);return'identifier\x20'+H+'\x20(value_type\x20'+I?.['value_type']+')';})['join'](',\x20');d['push']({'code':'LE-11','message':F['op']+'\x20compares\x20a\x20NON-NUMERIC\x20table\x20row\x20('+G+')\x20—\x20the\x20on-chain\x20predicate_matches\x20'+'treats\x20the\x20type\x20mismatch\x20as\x20an\x20honest\x20non-match,\x20so\x20this\x20leg\x20evaluates\x20FALSE\x20on\x20EVERY\x20run:\x20'+'the\x20guard\x20compiles\x20and\x20publishes\x20but\x20its\x20action\x20can\x20never\x20fire\x20(h1w9\x20F-05:\x20an\x20entire\x20payout\x20rail\x20'+'silently\x20dead-ended\x20this\x20way).\x20Numeric\x20predicates\x20(logic_as_u256_*)\x20require\x20numeric\x20rows\x20(U8-U256).','severity':'error','source':'lint','location':{'path':'/root'},'fix':{'description':'Re-type\x20the\x20row\x20to\x20a\x20numeric\x20value_type\x20(and\x20re-derive\x20its\x20writer\x20to\x20store\x20numbers),\x20or\x20replace\x20the\x20predicate\x20with\x20a\x20type-honest\x20comparison\x20(logic_equal\x20against\x20the\x20row\x27s\x20actual\x20type).\x20After\x20publish\x20the\x20guard\x20data\x20is\x20IMMUTABLE\x20—\x20fix\x20before\x20materialization','auto_fixable':![]}});}}return d;}function checkSyntaxHints(a){const b=[],{table:c}=a;(!a['description']||a['description']['trim']()==='')&&b['push']({'code':'SH-01','message':'description\x20is\x20missing\x20or\x20empty','severity':'info','source':'lint','location':{'path':'/description'},'fix':{'description':'Add\x20a\x20description,\x20e.g.\x20\x27Service\x20buy_guard:\x20whitelist\x20validation\x27','auto_fixable':!![]}});for(let d=0x0;d<c['length'];d++){const e=c[d];(!e['name']||e['name']['trim']()==='')&&b['push']({'code':'SH-03','message':'table['+d+']\x20is\x20missing\x20name','severity':'warning','source':'lint','location':{'path':'/table/'+d+'/name'},'fix':{'description':'Add\x20a\x20name,\x20e.g.\x20\x22data\x20entry\x20'+e['identifier']+'\x22','auto_fixable':!![]}});}for(let f=0x0;f<c['length'];f++){const g=c[f];!g['value_type']&&b['push']({'code':'SH-05','message':'table['+f+']\x20is\x20missing\x20value_type','severity':'warning','source':'lint','location':{'path':'/table/'+f+'/value_type'},'fix':{'description':'Infer\x20value_type\x20from\x20value\x20(e.g.\x20Address/String/U64,\x20etc.)','auto_fixable':!![]}});}c['length']>MAX_GUARD_TABLE_ITEM_LENGTH&&b['push']({'code':'SH-07','message':'table\x20entry\x20count\x20'+c['length']+'\x20exceeds\x20the\x20maximum\x20limit\x20'+MAX_GUARD_TABLE_ITEM_LENGTH,'severity':'error','source':'lint','location':{'path':'/table'},'fix':{'description':'Slim\x20down\x20the\x20table\x20by\x20merging\x20similar\x20entries,\x20or\x20split\x20into\x20multiple\x20Guards\x20+\x20rely','auto_fixable':![]}});for(let h=0x0;h<c['length'];h++){c[h]['b_submission']===undefined&&b['push']({'code':'SH-10','message':'table['+h+']\x20b_submission\x20is\x20missing','severity':'info','source':'lint','location':{'path':'/table/'+h+'/b_submission'},'fix':{'description':'Set\x20to\x20false\x20(constant)\x20or\x20true\x20(submitted\x20data)','auto_fixable':!![]}});}for(let j=0x0;j<c['length'];j++){const k=c[j];k['b_submission']===!![]&&k['value']!==undefined&&k['value']!==null&&b['push']({'code':'SH-11','message':'table['+j+']\x20has\x20a\x20redundant\x20value\x20field\x20on\x20b_submission=true\x20entry\x20(the\x20verifier\x20supplies\x20the\x20value\x20at\x20runtime;\x20this\x20value\x20is\x20ignored\x20by\x20BCS\x20encoding\x20and\x20wastes\x20gas)','severity':'warning','source':'lint','location':{'path':'/table/'+j+'/value'},'fix':{'description':'Remove\x20the\x20value\x20field\x20—\x20it\x20is\x20ignored\x20for\x20b_submission=true\x20entries','auto_fixable':!![]}});}return b;}function checkSuggestions(a){const b=[],{root:c,binding_hint:d,table:e,description:f}=a;if(c){const i=rootToString(c);if(i['includes']('vec_contains_address')&&i['includes']('Signer'))b['push']({'code':'SG-01','message':'Matches\x20Pattern\x20P04\x20(whitelist\x20validation)','severity':'hint','source':'lint','location':{'path':'/root'},'fix':{'description':'Refer\x20to\x20the\x20P04\x20Pattern\x20to\x20ensure\x20best\x20practices','auto_fixable':![]}});else{if(i['includes']('logic_equal')&&i['includes']('Signer')){const j=e['some'](k=>!k['b_submission']&&k['value_type']==='Address'&&typeof k['value']==='string'&&k['value']['length']>0x0);j&&b['push']({'code':'SG-01','message':'Matches\x20Pattern\x20P04\x20(whitelist\x20validation\x20—\x20single-address\x20variant)','severity':'hint','source':'lint','location':{'path':'/root'},'fix':{'description':'P04\x20single-address\x20form;\x20for\x20multi-address\x20scenarios,\x20consider\x20vec_contains_address','auto_fixable':![]}});}}(i['includes']('logic_as_u256_greater')||i['includes']('logic_as_u256_lesser'))&&b['push']({'code':'SG-01','message':'Matches\x20Pattern\x20P02\x20(numeric\x20threshold\x20validation)','severity':'hint','source':'lint','location':{'path':'/root'},'fix':{'description':'Suitable\x20for\x20amount/quantity\x20threshold\x20validation\x20scenarios','auto_fixable':![]}}),i['includes']('convert_witness')&&b['push']({'code':'SG-01','message':'Matches\x20Pattern\x20P09\x20(witness-derived\x20validation)','severity':'hint','source':'lint','location':{'path':'/root'},'fix':{'description':'Suitable\x20for\x20cross-object\x20relationship\x20validation\x20(e.g.\x20Order→Progress)','auto_fixable':![]}});}if(d?.['action']){const k=['buy','forward','allocate','claim_reward','vote','dispute','write_repository','submit_progress','gen_passport'];if(k['includes'](d['action'])){const l=inferSceneFromAction(d['action']);if(l){const m=suggestTemplateForScene(l['id']);m&&b['push']({'code':'SG-02','message':'Recommended\x20scene\x20template:\x20'+m['name'],'severity':'hint','source':'lint','location':{'path':'/'},'fix':{'description':'Refer\x20to\x20template\x20'+m['id']+'\x20('+m['example_use_case']+')','auto_fixable':![]}});}}}const g=n=>new TextEncoder()['encode'](n)['length'],h=getSubmissionEntries(e);for(const [n,o]of e['entries']()){const p=o['name']??'';if(p['length']===0x0)continue;if(g(p)>MAX_NAME_LENGTH)b['push']({'code':'SG-03','message':'table['+n+']\x20name\x20is\x20'+g(p)+'\x20BCS\x20characters,\x20maximum\x20is\x20'+MAX_NAME_LENGTH+'.\x20Use\x20a\x20short\x20identifier\x20(e.g.\x20\x27order_id\x27,\x20\x27delivery_node\x27);\x20the\x20human-readable\x20explanation\x20belongs\x20in\x20the\x20Guard\x27s\x20\x27description\x27\x20field','severity':'warning','source':'lint','location':{'path':'/table/'+n+'/name'},'fix':{'description':'Shorten\x20the\x20name\x20to\x20'+MAX_NAME_LENGTH+'\x20BCS\x20characters\x20or\x20fewer','auto_fixable':![]}});else p['toLowerCase']()['startsWith']('0x')&&b['push']({'code':'SG-03','message':'table['+n+']\x20name\x20must\x20not\x20start\x20with\x20\x220x\x22\x20(reserved\x20for\x20object\x20IDs)','severity':'warning','source':'lint','location':{'path':'/table/'+n+'/name'},'fix':{'description':'Rename\x20the\x20entry\x20without\x20the\x200x\x20prefix','auto_fixable':![]}});}if(h['length']>0x0){const q=(f??'')['trim']();q['length']<0xa&&b['push']({'code':'SG-03','message':'This\x20Guard\x20accepts\x20submitted\x20data\x20('+h['length']+'\x20table\x20'+(h['length']===0x1?'entry':'entries')+'\x20with\x20b_submission=true)\x20but\x20its\x20description\x20is\x20too\x20short\x20for\x20a\x20verifier\x20to\x20know\x20what\x20to\x20submit.\x20Explain\x20the\x20expected\x20submitted\x20data\x20in\x20the\x20Guard\x27s\x20\x27description\x27\x20field,\x20e.g.\x20\x27user-submitted\x20operation\x20type\x20(return/damage)\x27','severity':'info','source':'lint','location':{'path':'/'},'fix':{'description':'Explain\x20the\x20expected\x20submitted\x20data\x20in\x20the\x20Guard\x27s\x20\x27description\x27\x20field','auto_fixable':![]}});}if(c){const r=rootToString(c),s=r['includes']('proof.signer'),t=r['includes']('proof.time'),u=r['includes']('calc_string_length'),v=h['some'](w=>w['value_type']==='String');if(s&&t)b['push']({'code':'SG-04','message':'Strict-mode\x20privacy-delivery\x20guard\x20detected\x20(proof.signer\x20+\x20proof.time).\x20'+'Recommended\x20three\x20conditions:\x20Signer==proof.signer\x20(submitter\x20accountability),\x20'+'proof.time>order.time\x20(freshness),\x20order.service==service\x20(project\x20binding).\x20'+'No\x20content\x20verification\x20—\x20only\x20submission\x20responsibility\x20(\x27whoever\x20benefits\x20bears\x20the\x20burden\x20of\x20proof\x27).','severity':'info','source':'lint','location':{'path':'/root'},'fix':{'description':'Ensure\x20all\x20three\x20conditions\x20are\x20present\x20(logic_and).\x20Refer\x20to\x20template\x20tpl_forward_privacy_delivery_proof.\x20'+'Query\x20IDs:\x20proof.signer=1958,\x20proof.time=1960,\x20order.time=1574,\x20order.service=1563.','auto_fixable':![]}});else u&&v&&b['push']({'code':'SG-04','message':'Broad-mode\x20privacy-delivery\x20guard\x20detected\x20(String\x20submission\x20+\x20length\x20check,\x20e.g.\x20Merkle\x20Root\x20length\x20==\x2066).\x20'+'This\x20trusts\x20the\x20submitter\x27s\x20honesty;\x20the\x20counterparty\x20can\x20dispute\x20by\x20checking\x20their\x20own\x20Messenger\x20conversation.\x20'+'Suitable\x20as\x20an\x20arbitration\x20basis,\x20not\x20a\x20fund-flow\x20gate.','severity':'info','source':'lint','location':{'path':'/root'},'fix':{'description':'For\x20stronger\x20assurance,\x20consider\x20strict\x20mode:\x20submit\x20a\x20Proof\x20object\x20address\x20(from\x20messenger.submitChainProof)\x20+\x20'+'Order\x20address,\x20then\x20verify\x20proof.signer/proof.time/order.service.\x20See\x20template\x20tpl_forward_privacy_delivery_proof.','auto_fixable':![]}});}return b;}export function autoFixGuard(a){const b=deepClone(a),c=[];(!b['description']||b['description']['trim']()==='')&&(b['description']='Guard\x20(table:\x20'+b['table']['length']+'\x20items,\x20root:\x20'+(b['root']?.['type']??'unknown')+')',c['push']({'diagnostic_code':'SH-01','description':'Fill\x20in\x20default\x20description','after':b['description'],'path':'/description'}));if(b['description']&&b['description']['length']>MAX_DESCRIPTION_LENGTH){const f=b['description'];b['description']=b['description']['substring'](0x0,MAX_DESCRIPTION_LENGTH),c['push']({'diagnostic_code':'G-001','description':'Truncate\x20description\x20to\x20'+MAX_DESCRIPTION_LENGTH+'\x20characters','before':f['length']+'\x20characters','after':b['description']['length']+'\x20characters','path':'/description'});}for(let g=0x0;g<b['table']['length'];g++){const h=b['table'][g];(!h['name']||h['name']['trim']()==='')&&(h['name']='data\x20entry\x20'+h['identifier'],c['push']({'diagnostic_code':'SH-03','description':'table['+g+']\x20fill\x20in\x20name','after':h['name'],'path':'/table/'+g+'/name'}));}for(let j=0x0;j<b['table']['length'];j++){const k=b['table'][j];if(!k['value_type']&&k['value']!==undefined&&k['value']!==null){const l=inferValueType(k['value']);l&&(k['value_type']=l,c['push']({'diagnostic_code':'SH-05','description':'table['+j+']\x20infer\x20value_type','after':l,'path':'/table/'+j+'/value_type'}));}}const d=new Map();let e=0x0;for(let m=0x0;m<b['table']['length'];m++){const n=b['table'][m];if(!d['has'](n['identifier']))d['set'](n['identifier'],e),n['identifier']!==e&&c['push']({'diagnostic_code':'G-007','description':'table['+m+']\x20identifier\x20'+n['identifier']+'\x20→\x20'+e,'before':String(n['identifier']),'after':String(e),'path':'/table/'+m+'/identifier'}),n['identifier']=e,e++;else{const o=n['identifier'];n['identifier']=e,d['set'](o,e),c['push']({'diagnostic_code':'G-007','description':'table['+m+']\x20identifier\x20'+o+'\x20duplicate\x20→\x20reallocated\x20to\x20'+e,'before':String(o),'after':String(e),'path':'/table/'+m+'/identifier'}),e++;}}for(let p=0x0;p<b['table']['length'];p++){const q=b['table'][p];q['b_submission']===undefined&&(q['b_submission']=![],c['push']({'diagnostic_code':'SH-10','description':'table['+p+']\x20b_submission\x20default\x20set\x20to\x20false','after':'false','path':'/table/'+p+'/b_submission'}));}if(b['rely']?.['guards']&&b['rely']['guards']['length']>0x0){const r=[...new Set(b['rely']['guards'])];r['length']!==b['rely']['guards']['length']&&(c['push']({'diagnostic_code':'G-009','description':'rely\x20deduplicate:\x20'+b['rely']['guards']['length']+'\x20→\x20'+r['length'],'before':JSON['stringify'](b['rely']['guards']),'after':JSON['stringify'](r),'path':'/rely/guards'}),b['rely']['guards']=r);}for(let s=0x0;s<b['table']['length'];s++){const t=b['table'][s];if(t['b_submission']===!![]&&t['value']!==undefined&&t['value']!==null){const u=JSON['stringify'](t['value']);delete t['value'],c['push']({'diagnostic_code':'SH-11','description':'table['+s+']\x20remove\x20redundant\x20value\x20on\x20b_submission=true\x20entry','before':u,'after':'(removed)','path':'/table/'+s+'/value'});}}return{'fixed':b,'actions':c};}export async function lintGuard(a,b){const c=b?.['auto_fix']??!![],d=normalizeValueTypeNames(a),{table:e,root:f,rely:g,binding_hint:h}=d,i=[];let j;const k=await checkSdkSyntax(d);i['push'](...k);const l=checkSemanticErrors(d,b);i['push'](...l);const m=checkSyntaxHints(d);i['push'](...m);let n,o=[];if(c){const {fixed:w,actions:x}=autoFixGuard(d);x['length']>0x0&&(n=w,o=x);}if(e['length']>0x0&&f){const y=h?findScene(h['host_object']??'',h['binding_field']??''):undefined,z=e['map'](B=>({'identifier':B['identifier'],'b_submission':B['b_submission']??![],'value_type':B['value_type']??'Address','value':B['value'],'name':B['name'],'object_type':B['object_type']})),A=evaluateGuardDraft({'table':z,'root':f,'rely':g,'scene':y,'sharing_recipients':h?.['sharing_recipients']});j=A['assessment'];for(const B of j['risks']){const C=B['level']==='critical'||B['level']==='high'?'error':B['level']==='medium'?'warning':B['level']==='low'?'info':'hint',D=B['evidence']??'',E=D['startsWith']('/')?D:'/';i['push']({'code':B['id'],'message':'['+B['level']+']\x20'+B['title'],'severity':C,'source':'risk','location':{'path':E},'fix':{'description':B['mitigation'],'auto_fixable':![]}});}}const p=checkSuggestions(d);i['push'](...p);const q=i['filter'](F=>F['severity']==='error')['length'],s=i['filter'](F=>F['severity']==='warning')['length'],t=i['filter'](F=>F['severity']==='info'||F['severity']==='hint')['length'],u=q===0x0;let v;if(q>0x0)v='Fix\x20'+q+'\x20error(s)\x20and\x20re-run\x20lint';else s>0x0?v='Consider\x20addressing\x20'+s+'\x20warning(s),\x20then\x20submit\x20to\x20SDK\x20newGuard()\x20for\x20final\x20syntax\x20validation':v='lint\x20passed\x20(no\x20errors);\x20submit\x20to\x20SDK\x20newGuard()\x20for\x20final\x20syntax\x20validation\x20before\x20going\x20on-chain';return{'json_summary':{'table_count':e['length'],'root_type':f?.['type']??'unknown','has_rely':!!g?.['guards']?.['length'],'rely_count':g?.['guards']?.['length']??0x0,'has_description':!!d['description']},'diagnostics':i,'fixed_json':n,'fix_actions':o,'risk_assessment':j,'summary':{'errors':q,'warnings':s,'infos':t,'auto_fixes_applied':o['length'],'ready':u,'next_step':v}};}export async function isGuardReady(a){const b=await lintGuard(a,{'auto_fix':![]});return b['summary']['ready'];}export async function getGuardErrors(a){const b=await lintGuard(a,{'auto_fix':![]});return b['diagnostics']['filter'](c=>c['severity']==='error');}export function formatLintResult(a){const b=[];b['push']('===\x20Guard\x20JSON\x20Lint\x20Report\x20==='),b['push'](''),b['push']('Summary:'),b['push']('\x20\x20Errors:\x20\x20\x20\x20\x20'+a['summary']['errors']),b['push']('\x20\x20Warnings:\x20\x20\x20'+a['summary']['warnings']),b['push']('\x20\x20Infos:\x20\x20\x20\x20\x20\x20'+a['summary']['infos']),b['push']('\x20\x20Auto-fixes:\x20'+a['summary']['auto_fixes_applied']),b['push']('\x20\x20Ready:\x20\x20\x20\x20\x20\x20'+(a['summary']['ready']?'YES':'NO')),b['push']('\x20\x20Next\x20step:\x20\x20'+a['summary']['next_step']),b['push']('');if(a['fix_actions']['length']>0x0){b['push']('---\x20Auto-fix\x20Actions\x20---');for(const g of a['fix_actions']){b['push']('\x20\x20['+g['diagnostic_code']+']\x20'+g['description']),b['push']('\x20\x20\x20\x20Path:\x20'+g['path']),g['before']&&g['after']&&b['push']('\x20\x20\x20\x20'+g['before']+'\x20->\x20'+g['after']);}b['push']('');}const c=a['diagnostics']['filter'](h=>h['severity']==='error'),e=a['diagnostics']['filter'](h=>h['severity']==='warning'),f=a['diagnostics']['filter'](h=>h['severity']==='info'||h['severity']==='hint');if(c['length']>0x0){b['push']('---\x20Errors\x20(must\x20fix)\x20---');for(const h of c){b['push']('\x20\x20['+h['code']+']\x20('+h['source']+')\x20'+h['message']),b['push']('\x20\x20\x20\x20Path:\x20'+h['location']['path']);if(h['fix'])b['push']('\x20\x20\x20\x20Fix:\x20\x20'+h['fix']['description']);}b['push']('');}if(e['length']>0x0){b['push']('---\x20Warnings\x20(consider\x20fixing)\x20---');for(const i of e){b['push']('\x20\x20['+i['code']+']\x20('+i['source']+')\x20'+i['message']),b['push']('\x20\x20\x20\x20Path:\x20'+i['location']['path']);if(i['fix'])b['push']('\x20\x20\x20\x20Fix:\x20\x20'+i['fix']['description']);}b['push']('');}if(f['length']>0x0){b['push']('---\x20Info\x20&\x20Hints\x20---');for(const j of f){b['push']('\x20\x20['+j['code']+']\x20('+j['source']+')\x20'+j['message']),b['push']('\x20\x20\x20\x20Path:\x20'+j['location']['path']);}}return b['join']('\x0a');}export function translateGuardTypeError(a){if(!a)return undefined;let b='',c=-0x1,d=-0x1;const e=a['match'](/([\w.[\]-]+)\s*(?:→|->)\s*checkType:\s*(\d+)\s+require type:\s*(\d+)/);if(e)b=e[0x1],c=Number(e[0x2]),d=Number(e[0x3]);else{const j=a['match'](/checkType:\s*(\d+)\s+require type:\s*(\d+)/);if(!j)return undefined;c=Number(j[0x1]),d=Number(j[0x2]);}const f=b?'at\x20'+b+':\x20':'',g=valueTypeName(c),h=valueTypeName(d),i=[];if(d===0x0){i['push'](f+'the\x20parent\x20operator\x20needs\x20a\x20BOOL\x20operand,\x20but\x20the\x20child\x20returns\x20'+g+'.');if(c===0x1&&/claimed_by/i['test'](a))i['push']('TEACHING\x20(Bool/Address\x20twin,\x20crs\x20P2-2):\x20order.claimed_by\x20(query\x201571)\x20returns\x20Address;\x20'+'its\x20Bool\x20twin\x20is\x20`order.claimed_by\x20some`\x20(query\x201570\x20—\x20has\x20ANY\x20claimer).\x20Invert\x20THAT\x20with\x20'+'logic_not,\x20or\x20assert\x20logic_equal[query\x201570,\x20false].');else{if(c===0x1)i['push']('TEACHING:\x20wrap\x20the\x20Address\x20leaf\x20in\x20logic_equal\x20against\x20identifier[N]\x20—\x20'+'logic_equal[{type:\x22query\x22,\x20query:\x22...\x22},\x20{type:\x22identifier\x22,\x20identifier:N}].\x20'+'A\x20Bool\x20operator\x20(logic_and/or/not)\x20can\x20never\x20consume\x20a\x20bare\x20Address.');else{if(c===0x2)i['push']('TEACHING:\x20wrap\x20the\x20String\x20leaf\x20in\x20logic_equal\x20against\x20identifier[N].\x20A\x20multi-node\x20'+'membership\x20test\x20\x27current\x20in\x20{a,b,c}\x27\x20has\x20NO\x20set\x20operator\x20yet\x20(crs\x20P2-1):\x20express\x20one\x20'+'logic_equal\x20per\x20value\x20joined\x20by\x20logic_or\x20—\x20each\x20value\x20a\x20frozen\x20table\x20entry\x20(Guards\x20are\x20'+'create-only,\x20IMMUT-003).');else c>=0x3&&c<=0x8?i['push']('TEACHING:\x20numeric\x20leaf\x20—\x20compare\x20via\x20the\x20logic_as_u256_greater/lesser/equal\x20variants,\x20'+'or\x20wrap\x20in\x20logic_equal\x20against\x20a\x20numeric\x20identifier[N].'):i['push']('TEACHING:\x20wrap\x20the\x20leaf\x20in\x20a\x20Bool-producing\x20operator\x20(logic_equal\x20/\x20logic_as_u256_*)\x20'+'before\x20feeding\x20logic_and/or/not.');}}}else i['push'](f+'the\x20operator\x20requires\x20'+h+',\x20but\x20the\x20child\x20returns\x20'+g+'.\x20TEACHING:\x20align\x20the\x20operand\x20'+'types\x20—\x20wrap\x20in\x20logic_equal\x20(any\x20type)\x20or\x20convert\x20with\x20the\x20logic_as_u256_*\x20family\x20(numeric)\x20'+'before\x20the\x20comparison.');return['GUARD\x20TYPE\x20ERROR\x20(with\x20teaching\x20notes\x20below):',a['trim'](),...i]['join']('\x0a');}
1
+ import{validateGuardData,MAX_DESCRIPTION_LENGTH,MAX_GUARD_TABLE_ITEM_LENGTH,MAX_NAME_LENGTH,ValueType}from'@wowok/wowok';import{rootReferencedIdentifiers}from'./guard-risk.js';import{parseGuardNodeGates}from'./guard-node-gates.js';import{evaluateGuardDraft}from'./guard-eval.js';import{findScene,inferSceneFromAction}from'./guard-ledger.js';import{suggestTemplateForScene}from'./guard-templates.js';import{validateGuardTreeShape}from'./guard-render.js';import{isBoolReturningQuery}from'../schema/utils/guard-query-utils.js';import{valueTypeName}from'./guard-submission-brief.js';const VALUE_TYPE_ID_TO_NAME={[ValueType['Bool']]:'Bool',[ValueType['Address']]:'Address',[ValueType['String']]:'String',[ValueType['U8']]:'U8',[ValueType['U16']]:'U16',[ValueType['U32']]:'U32',[ValueType['U64']]:'U64',[ValueType['U128']]:'U128',[ValueType['U256']]:'U256',[ValueType['VecBool']]:'VecBool',[ValueType['VecAddress']]:'VecAddress',[ValueType['VecString']]:'VecString',[ValueType['VecU8']]:'VecU8',[ValueType['VecU16']]:'VecU16',[ValueType['VecU32']]:'VecU32',[ValueType['VecU64']]:'VecU64',[ValueType['VecU128']]:'VecU128',[ValueType['VecU256']]:'VecU256',[ValueType['VecVecU8']]:'VecVecU8'};function normalizeValueTypeNames(a){if(!a['table']['some'](b=>typeof b['value_type']==='number'))return a;return{...a,'table':a['table']['map'](b=>typeof b['value_type']==='number'?{...b,'value_type':VALUE_TYPE_ID_TO_NAME[b['value_type']]??String(b['value_type'])}:b)};}function deepClone(a){return JSON['parse'](JSON['stringify'](a));}function rootToString(a){return JSON['stringify'](a);}function canonicalNode(a){if(a===null||typeof a!=='object')return JSON['stringify'](a)??'null';if(Array['isArray'](a))return'['+a['map'](canonicalNode)['join'](',')+']';const b=Object['keys'](a)['sort']();return'{'+b['map'](c=>JSON['stringify'](c)+':'+canonicalNode(a[c]))['join'](',')+'}';}const GE_NODE='logic_as_u256_greater_or_equal',LE_NODE='logic_as_u256_lesser_or_equal';function findDegenerateTimeWindows(a){const b=[],c=new Set(),d=g=>{const h=g['filter'](j=>j?.['type']===GE_NODE&&Array['isArray'](j['nodes'])&&j['nodes']['length']>=0x2),i=g['filter'](j=>j?.['type']===LE_NODE&&Array['isArray'](j['nodes'])&&j['nodes']['length']>=0x2);for(const j of h){for(const k of i){const l=canonicalNode(j['nodes'][0x0])===canonicalNode(k['nodes'][0x0]),m=canonicalNode(j['nodes'][0x1])===canonicalNode(k['nodes'][0x1]);if(!l||!m)continue;const n=canonicalNode(j)+'|'+canonicalNode(k);if(c['has'](n))continue;c['add'](n),b['push']({'ge':j,'le':k});}}},e=g=>{if(g?.['type']==='logic_and'&&Array['isArray'](g['nodes']))return g['nodes']['flatMap'](e);return[g];},f=g=>{if(!g||typeof g!=='object')return;if(g['type']==='logic_not')return;if(g['type']==='logic_and'&&Array['isArray'](g['nodes'])){const h=e(g);d(h),h['forEach'](f);return;}if(g['type']==='logic_or'&&Array['isArray'](g['nodes'])){for(const i of g['nodes']){i?.['type']==='logic_and'&&Array['isArray'](i['nodes'])?(d(i['nodes']),i['nodes']['forEach'](f)):f(i);}return;}if(g['type']===GE_NODE||g['type']===LE_NODE)d([g]);if(Array['isArray'](g['nodes']))g['nodes']['forEach'](f);};return f(a),b;}function hasSignerContext(a){const b=rootToString(a);return b['includes']('\x22Signer\x22')||b['includes']('\x22context\x22:\x22Signer\x22')||b['includes']('\x22context\x22:\x20\x22Signer\x22');}function getSubmissionEntries(a){return a['filter'](b=>b['b_submission']===!![]);}function inferValueType(a){if(typeof a==='string'){if(a['startsWith']('0x')&&a['length']>=0x3)return'Address';return'String';}if(typeof a==='number'){if(Number['isInteger'](a)){if(a>=0x0&&a<=0xff)return'U8';if(a>=0x0&&a<=0xffff)return'U16';return'U64';}return'U256';}if(typeof a==='boolean')return'Bool';if(Array['isArray'](a)){if(a['length']>0x0){const b=inferValueType(a[0x0]);if(b==='Address')return'Vec<Address>';if(b==='String')return'Vec<String>';if(b==='Bool')return'Vec<Bool>';}return'Vec<Address>';}return undefined;}function sdkIssueToDiagnostic(a){return{'code':a['code'],'message':a['message'],'severity':a['severity'],'source':'sdk','location':{'path':a['path']},'fix':{'description':'SDK\x20validation\x20failed\x20('+(a['sdk_error']??'InvalidParam')+');\x20manual\x20fix\x20required','auto_fixable':![]}};}async function checkSdkSyntax(a){const b=validateGuardTreeShape(a['root']);if(b['length']>0x0)return b['map'](g=>({'code':'G-001','message':g['message'],'severity':'error','source':'sdk','location':{'path':g['path']},'fix':{'description':'Unary\x20operators\x20(logic_not,\x20value_type,\x20vec_length,\x20calc_string_length,\x20convert_*)\x20take\x20a\x20single\x20\x27node\x27\x20child;\x20only\x20multi-operand\x20forms\x20(logic_and,\x20logic_or,\x20logic_equal,\x20logic_as_u256_*,\x20calc_number_*,\x20vec_contains_*)\x20take\x20a\x20\x27nodes\x27\x20array.','auto_fixable':![]}}));const c=a['table']['map'](g=>({'identifier':g['identifier'],'b_submission':g['b_submission']??![],'value_type':g['value_type']??'Address','value':g['value'],'name':g['name']??''}));let d;try{d=await validateGuardData({'description':a['description'],'table':c,'root':a['root'],'rely':a['rely']});}catch(g){const h=g?.['message']??String(g),i=/guard tree ([^:]+):/['exec'](h);return[{'code':'G-001','message':h,'severity':'error','source':'sdk','location':{'path':i?toJsonPointer(i[0x1]):'/root'},'fix':{'description':'Repair\x20the\x20tree\x20at\x20the\x20named\x20path:\x20unary\x20operators\x20(logic_not,\x20convert_*,\x20value_type)\x20take\x20a\x20single\x20\x27node\x27\x20child;\x20only\x20multi-operand\x20forms\x20(logic_and,\x20logic_or,\x20logic_equal,\x20calc_*,\x20vec_*)\x20take\x20\x27nodes\x27.','auto_fixable':![]}}];}const f=d['map'](sdkIssueToDiagnostic);if(!hasRepositoryIdSlotRef(a['root']))return f;return f['map'](j=>j['code']==='G-008'&&/invalid parameter:checkType/i['test'](j['message'])?{...j,'severity':'warning','message':j['message']+'\x20—\x20KNOWN\x20ANALYZER\x20GAP\x20(rex5\x20T-29):\x20the\x20checker\x20does\x20not\x20implement\x20the\x20id\x20slot-reference\x20grammar\x20'+'({identifier:N})\x20that\x20the\x20chain\x20resolves\x20for\x20repository-data\x20queries;\x20chain-proven\x20guards\x20ship\x20this\x20exact\x20shape.','fix':{'description':'Do\x20NOT\x20rebuild\x20the\x20guard\x20on\x20this\x20diagnostic\x20alone:\x20run\x20a\x20free\x20dry\x20run\x20of\x20the\x20guarded\x20operation.\x20'+'If\x20it\x20accepts\x20the\x20slot-reference\x20leg\x20on-chain,\x20the\x20guard\x20is\x20valid\x20—\x20the\x20SDK\x20checker\x27s\x20grammar\x20gap\x20is\x20tracked\x20separately.','auto_fixable':![]}}:j);}function hasRepositoryIdSlotRef(a){const b=c=>{if(!c||typeof c!=='object')return![];if(Array['isArray'](c))return c['some'](b);const d=c;if(typeof d['type']==='string'&&d['type']['startsWith']('query_repository_data')&&d['id']!==undefined&&d['id']!==null&&typeof d['id']==='object'&&!Array['isArray'](d['id'])&&Number['isFinite'](d['id']['identifier']))return!![];return Object['values'](d)['some'](b);};return b(a);}function toJsonPointer(a){const b=a['replace'](/^\/+/,'');return b['startsWith']('root')?'/'+b:'/root/'+b;}function checkSemanticErrors(a,b){const d=[],{table:e,root:f,binding_hint:g}=a,h=g?findScene(g['host_object']??'',g['binding_field']??''):undefined,i=getSubmissionEntries(e);if(i['length']>0x0&&f&&!hasSignerContext(f)){const k=i['some'](n=>n['value_type']==='Address'),l=h?.['id']==='service_order_allocators_guard'&&g?.['sharing_recipients']!==undefined&&g['sharing_recipients']['length']>0x0&&!g['sharing_recipients']['includes']('Signer'),m=h?.['id']==='service_order_allocators_guard'&&i['length']>0x0&&i['every'](n=>!rootReferencedIdentifiers(f)['has'](n['identifier']));if(k&&!l&&!m){const n=i['filter'](o=>o['value_type']==='Address')['map'](o=>e['indexOf'](o));d['push']({'code':'LE-04','message':'Submitted\x20data\x20has\x20no\x20Signer\x20binding\x20(submission\x20forgery\x20risk)','severity':'error','source':'lint','location':{'path':n['map'](o=>'/table/'+o)['join']('\x20→\x20')},'fix':{'description':'Add\x20logic_equal(context(Signer),\x20identifier[N])\x20in\x20root\x20to\x20bind\x20the\x20submitter\x20identity','auto_fixable':![]}});}}if(h?.['id']==='arbitration_voting_guard'){const o=i['some'](p=>['U8','U16','U32','U64','U128','U256']['includes'](p['value_type']??''));if(o){const p=i['filter'](q=>['U8','U16','U32','U64','U128','U256']['includes'](q['value_type']??''))['map'](q=>e['indexOf'](q));d['push']({'code':'LE-05','message':'voting_guard\x20voting\x20weight\x20comes\x20from\x20submitted\x20data\x20(weight\x20forgery\x20risk)','severity':'error','source':'lint','location':{'path':p['map'](q=>'/table/'+q)['join']('\x20→\x20')},'fix':{'description':'Derive\x20arbitrator\x20weights\x20from\x20the\x20Arb\x20object\x20via\x20witness\x20(e.g.\x20105\x20TypeArbArbitration)\x20rather\x20than\x20submitting\x20them\x20directly','auto_fixable':![]}});}}if(h?.['id']==='gen_passport_guard'||g?.['action']==='gen_passport'){const q=rootToString(f);if(q['includes']('1167')||q['includes']('repository.data')){const r=q['includes']('quote_guard');r&&d['push']({'code':'LE-06','message':'repository.data\x20query\x20with\x20quote_guard:\x20rigid\x20verification\x20requirement\x20—\x20ensure\x20Passport\x20includes\x20quote_guard\x20verification\x20with\x20necessary\x20submissions\x20(e.g.,\x20Payment\x20proof)','severity':'info','source':'lint','location':{'path':'/root'},'fix':{'description':'Ensure\x20the\x20quote_guard\x20is\x20verified:\x20user\x20submits\x20Payment\x20via\x20Passport,\x20quote_guard\x20verifies\x20Payment\x20fields,\x20repository\x20data\x20query\x20passes','auto_fixable':![]}});}}if(g?.['host_object']&&h&&b?.['host_published']!==!![]){const s=g['host_object'],t=e['filter'](u=>!u['b_submission']&&u['value_type']==='Address'&&typeof u['value']==='string'&&u['value']['startsWith']('0x')&&u['object_type']===s);if(t['length']>0x0){const u=t['map'](x=>e['indexOf'](x)),w=b?.['host_published']===![];d['push']({'code':'LE-07','message':'Circular\x20reference\x20uses\x20an\x20address\x20rather\x20than\x20a\x20name\x20(Host\x20Object\x20may\x20not\x20be\x20published\x20yet\x20when\x20the\x20Guard\x20is\x20created)','severity':w?'error':'warning','source':'lint','location':{'path':u['map'](x=>'/table/'+x+'/value')['join']('\x20→\x20')},'fix':{'description':'Change\x20value\x20from\x20an\x20address\x20to\x20an\x20object\x20name\x20(e.g.\x20\x22service1\x22);\x20the\x20SDK\x20will\x20resolve\x20it\x20to\x20an\x20address\x20after\x20the\x20Host\x20Object\x20is\x20published','auto_fixable':![]}});}}const j=e['filter'](x=>x['b_submission']===![]&&Array['isArray'](x['value'])&&x['value']['length']===0x0);j['length']>0x0&&d['push']({'code':'LE-10','message':'Static\x20table\x20slot(s)\x20'+j['map'](x=>x['identifier'])['join'](',\x20')+'\x20carry\x20an\x20EMPTY\x20array\x20value\x20—\x20'+'guard\x20table\x20construction\x20silently\x20DROPS\x20empty\x20vectors:\x20the\x20created\x20Guard\x20will\x20MISS\x20these\x20rows\x20while\x20creation\x20still\x20succeeds.','severity':'error','source':'lint','location':{'path':j['map'](x=>'/table['+x['identifier']+']')['join']('\x20→\x20')},'fix':{'description':'Give\x20each\x20flagged\x20slot\x20a\x20non-empty\x20static\x20value,\x20or\x20flip\x20it\x20to\x20b_submission=true\x20and\x20supply\x20the\x20value\x20at\x20Guard\x20trigger\x20time\x20(protocol\x20once-slots:\x20255\x20keys\x20on\x20the\x20submitted\x20bytes,\x20254\x20on\x20the\x20chain-derived\x20object\x20key).','auto_fixable':![]}});for(const {}of findDegenerateTimeWindows(f)){d['push']({'code':'LE-08','message':'Degenerate\x20time\x20window:\x20the\x20same\x20conjunction\x20asserts\x20`L\x20>=\x20R`\x20and\x20`L\x20<=\x20R`\x20over\x20'+'structurally\x20identical\x20operands.\x20Their\x20conjunction\x20is\x20`L\x20==\x20R`\x20—\x20on\x20a\x20millisecond\x20Clock\x20'+'an\x20~1\x20ms\x20window,\x20i.e.\x20the\x20guarded\x20forward\x20is\x20effectively\x20unreachable.\x20'+'`logic_as_u256_greater_or_equal`\x20is\x20a\x20LOWER\x20bound\x20(deadline\x20passed);\x20an\x20upper\x20bound\x20'+'(`logic_as_u256_lesser_or_equal`)\x20must\x20use\x20a\x20DIFFERENT\x20right-hand\x20side.','severity':'error','source':'lint','location':{'path':'/root'},'fix':{'description':'For\x20\x22the\x20deadline\x20has\x20passed\x22,\x20keep\x20ONLY\x20`L\x20>=\x20R`\x20and\x20delete\x20the\x20`<=`\x20clause.\x20'+'For\x20\x22the\x20window\x20is\x20open\x22,\x20keep\x20both\x20clauses\x20but\x20make\x20the\x20right-hand\x20sides\x20differ,\x20'+'e.g.\x20`L\x20>=\x20t`\x20and\x20`L\x20<=\x20t\x20+\x20K`.\x20Remember\x20`progress.current_time`\x20is\x20refreshed\x20on\x20'+'every\x20forward,\x20so\x20anchoring\x20a\x20release\x20lock\x20on\x20it\x20restarts\x20the\x20clock\x20at\x20each\x20node\x20change.','auto_fixable':![]}});}{const x=[],y=(A,B)=>{if(!B||typeof B!=='object')return;if(B['type']==='query'&&B['query']!==undefined){if(!isBoolReturningQuery(B['query'])){const C=typeof B['query']==='string'?B['query']:String(B['query']);x['push']({'op':A,'describe':'query\x20'+C,'claimedByTwin':/claimed_by/i['test'](C)&&!/\bsome\b/i['test'](C)});}}else{if(B['type']==='identifier'&&B['identifier']!==undefined){const D=e['find'](F=>F['identifier']===B['identifier']),E=D?.['value_type'];E&&E!=='Bool'&&E!=='Value'&&x['push']({'op':A,'describe':'identifier\x20'+B['identifier']+'\x20(table\x20value_type\x20'+E+')','claimedByTwin':![]});}}},z=A=>{if(!A||typeof A!=='object')return;if(A['type']==='logic_not'){y('logic_not',A['node']),z(A['node']);return;}Array['isArray'](A['nodes'])&&((A['type']==='logic_and'||A['type']==='logic_or')&&A['nodes']['forEach'](B=>y(A['type'],B)),A['nodes']['forEach'](z));if(A['node'])z(A['node']);};z(f);for(const A of x){d['push']({'code':'LE-09','message':A['op']+'\x20consumes\x20a\x20non-Bool\x20leaf\x20('+A['describe']+')\x20—\x20Bool\x20operators\x20take\x20Bool\x20operands\x20only\x20(crs\x20P2-1/P2-2)'+(A['claimedByTwin']?'.\x20TEACHING:\x20order.claimed_by\x20(query\x201571)\x20returns\x20Address;\x20its\x20Bool\x20twin\x20is\x20`order.claimed_by\x20some`\x20(query\x201570)\x20—\x20use\x20THAT\x20in\x20logic_not\x20/\x20logic_equal.':'.\x20TEACHING:\x20wrap\x20the\x20leaf\x20in\x20logic_equal[leaf,\x20identifier[N]]\x20(any\x20type)\x20or\x20a\x20logic_as_u256_*\x20operator\x20(numeric\x20comparison)\x20to\x20produce\x20a\x20Bool.'),'severity':'error','source':'lint','location':{'path':'/root'},'fix':{'description':A['claimedByTwin']?'Replace\x20query\x20order.claimed_by\x20with\x20order.claimed_by\x20some\x20(query\x201570)':'Wrap\x20the\x20leaf\x20in\x20logic_equal\x20against\x20identifier[N]\x20so\x20'+A['op']+'\x20receives\x20a\x20Bool','auto_fixable':![]}});}}{const B=new Set(['U8','U16','U32','U64','U128','U256']),C=(F,G)=>{if(!F||typeof F!=='object')return;if(Array['isArray'](F)){F['forEach'](K=>C(K,G));return;}const H=F;if(H['type']==='calc_string_length')return;if(Number['isFinite'](H['identifier']))G['add'](H['identifier']);const I=H['type'],J=typeof I==='string'&&(I==='query'||I['startsWith']('query_')||I['startsWith']('query'));for(const [K,L]of Object['entries'](H)){if(J&&(K==='object'||K==='parameters'||K==='id'||K==='ids'||K==='where'||K==='conditions'||K==='convert_witness'))continue;C(L,G);}},D=[],E=F=>{if(!F||typeof F!=='object')return;if(Array['isArray'](F)){F['forEach'](E);return;}const G=F;if(typeof G['type']==='string'&&G['type']['startsWith']('logic_as_u256')){const H=new Set();C(G['nodes']??G,H);const I=[...H]['filter'](J=>{const K=e['find'](M=>M['identifier']===J),L=K?.['value_type'];return L!==undefined&&!B['has'](L)&&L!=='Value';});if(I['length']>0x0)D['push']({'op':G['type'],'ids':I});}Object['values'](G)['forEach'](J=>E(J));};E(f);for(const F of D){const G=F['ids']['map'](H=>{const I=e['find'](J=>J['identifier']===H);return'identifier\x20'+H+'\x20(value_type\x20'+I?.['value_type']+')';})['join'](',\x20');d['push']({'code':'LE-11','message':F['op']+'\x20compares\x20a\x20NON-NUMERIC\x20table\x20row\x20('+G+')\x20—\x20the\x20on-chain\x20predicate_matches\x20'+'treats\x20the\x20type\x20mismatch\x20as\x20an\x20honest\x20non-match,\x20so\x20this\x20leg\x20evaluates\x20FALSE\x20on\x20EVERY\x20run:\x20'+'the\x20guard\x20compiles\x20and\x20publishes\x20but\x20its\x20action\x20can\x20never\x20fire\x20(h1w9\x20F-05:\x20an\x20entire\x20payout\x20rail\x20'+'silently\x20dead-ended\x20this\x20way).\x20Numeric\x20predicates\x20(logic_as_u256_*)\x20require\x20numeric\x20rows\x20(U8-U256).','severity':'error','source':'lint','location':{'path':'/root'},'fix':{'description':'Re-type\x20the\x20row\x20to\x20a\x20numeric\x20value_type\x20(and\x20re-derive\x20its\x20writer\x20to\x20store\x20numbers),\x20or\x20replace\x20the\x20predicate\x20with\x20a\x20type-honest\x20comparison\x20(logic_equal\x20against\x20the\x20row\x27s\x20actual\x20type).\x20After\x20publish\x20the\x20guard\x20data\x20is\x20IMMUTABLE\x20—\x20fix\x20before\x20materialization','auto_fixable':![]}});}}{const H=parseGuardNodeGates(f,e)['filter'](I=>I!=='');H['length']>0x0&&d['push']({'code':'LE-12','message':'progress.current\x20pins\x20node-name\x20literal(s)\x20['+H['map'](I=>'\x22'+I+'\x22')['join'](',\x20')+'].\x20'+'The\x20chain\x20names\x20a\x20Machine\x27s\x20INIT\x20(first)\x20node\x20with\x20the\x20EMPTY\x20string:\x20if\x20this\x20guard\x20is\x20bound\x20to\x20'+'the\x20forward\x20leaving\x20the\x20init\x20node\x20(entry\x20pair\x20prev_node:\x22\x22),\x20progress.current\x20is\x20\x22\x22\x20at\x20evaluation\x20'+'time\x20and\x20the\x20equality\x20leg(s)\x20are\x20ALWAYS\x20FALSE\x20—\x20the\x20first\x20order\x20strands\x20forever\x20'+'(nnd3-mn-261103\x20F-NND-02).\x20On\x20a\x20non-init\x20source\x20node\x20the\x20same\x20legs\x20are\x20correct\x20node\x20gates.','severity':'warning','source':'lint','location':{'path':'/root'},'fix':{'description':'Verify\x20which\x20machine\x20forward\x20this\x20guard\x20binds\x20to.\x20If\x20it\x20gates\x20the\x20init\x20forward,\x20delete\x20the\x20progress.current\x20==\x20<node-name>\x20leg\x20(or\x20pin\x20\x22\x22\x20—\x20the\x20init\x20node\x27s\x20actual\x20name).\x20After\x20publish\x20the\x20guard\x20data\x20is\x20IMMUTABLE','auto_fixable':![]}});}return d;}function checkSyntaxHints(a){const b=[],{table:c}=a;(!a['description']||a['description']['trim']()==='')&&b['push']({'code':'SH-01','message':'description\x20is\x20missing\x20or\x20empty','severity':'info','source':'lint','location':{'path':'/description'},'fix':{'description':'Add\x20a\x20description,\x20e.g.\x20\x27Service\x20buy_guard:\x20whitelist\x20validation\x27','auto_fixable':!![]}});for(let d=0x0;d<c['length'];d++){const e=c[d];(!e['name']||e['name']['trim']()==='')&&b['push']({'code':'SH-03','message':'table['+d+']\x20is\x20missing\x20name','severity':'warning','source':'lint','location':{'path':'/table/'+d+'/name'},'fix':{'description':'Add\x20a\x20name,\x20e.g.\x20\x22data\x20entry\x20'+e['identifier']+'\x22','auto_fixable':!![]}});}for(let f=0x0;f<c['length'];f++){const g=c[f];!g['value_type']&&b['push']({'code':'SH-05','message':'table['+f+']\x20is\x20missing\x20value_type','severity':'warning','source':'lint','location':{'path':'/table/'+f+'/value_type'},'fix':{'description':'Infer\x20value_type\x20from\x20value\x20(e.g.\x20Address/String/U64,\x20etc.)','auto_fixable':!![]}});}c['length']>MAX_GUARD_TABLE_ITEM_LENGTH&&b['push']({'code':'SH-07','message':'table\x20entry\x20count\x20'+c['length']+'\x20exceeds\x20the\x20maximum\x20limit\x20'+MAX_GUARD_TABLE_ITEM_LENGTH,'severity':'error','source':'lint','location':{'path':'/table'},'fix':{'description':'Slim\x20down\x20the\x20table\x20by\x20merging\x20similar\x20entries,\x20or\x20split\x20into\x20multiple\x20Guards\x20+\x20rely','auto_fixable':![]}});for(let h=0x0;h<c['length'];h++){c[h]['b_submission']===undefined&&b['push']({'code':'SH-10','message':'table['+h+']\x20b_submission\x20is\x20missing','severity':'info','source':'lint','location':{'path':'/table/'+h+'/b_submission'},'fix':{'description':'Set\x20to\x20false\x20(constant)\x20or\x20true\x20(submitted\x20data)','auto_fixable':!![]}});}for(let j=0x0;j<c['length'];j++){const k=c[j];k['b_submission']===!![]&&k['value']!==undefined&&k['value']!==null&&b['push']({'code':'SH-11','message':'table['+j+']\x20has\x20a\x20redundant\x20value\x20field\x20on\x20b_submission=true\x20entry\x20(the\x20verifier\x20supplies\x20the\x20value\x20at\x20runtime;\x20this\x20value\x20is\x20ignored\x20by\x20BCS\x20encoding\x20and\x20wastes\x20gas)','severity':'warning','source':'lint','location':{'path':'/table/'+j+'/value'},'fix':{'description':'Remove\x20the\x20value\x20field\x20—\x20it\x20is\x20ignored\x20for\x20b_submission=true\x20entries','auto_fixable':!![]}});}return b;}function checkSuggestions(a){const b=[],{root:c,binding_hint:d,table:e,description:f}=a;if(c){const i=rootToString(c);if(i['includes']('vec_contains_address')&&i['includes']('Signer'))b['push']({'code':'SG-01','message':'Matches\x20Pattern\x20P04\x20(whitelist\x20validation)','severity':'hint','source':'lint','location':{'path':'/root'},'fix':{'description':'Refer\x20to\x20the\x20P04\x20Pattern\x20to\x20ensure\x20best\x20practices','auto_fixable':![]}});else{if(i['includes']('logic_equal')&&i['includes']('Signer')){const j=e['some'](k=>!k['b_submission']&&k['value_type']==='Address'&&typeof k['value']==='string'&&k['value']['length']>0x0);j&&b['push']({'code':'SG-01','message':'Matches\x20Pattern\x20P04\x20(whitelist\x20validation\x20—\x20single-address\x20variant)','severity':'hint','source':'lint','location':{'path':'/root'},'fix':{'description':'P04\x20single-address\x20form;\x20for\x20multi-address\x20scenarios,\x20consider\x20vec_contains_address','auto_fixable':![]}});}}(i['includes']('logic_as_u256_greater')||i['includes']('logic_as_u256_lesser'))&&b['push']({'code':'SG-01','message':'Matches\x20Pattern\x20P02\x20(numeric\x20threshold\x20validation)','severity':'hint','source':'lint','location':{'path':'/root'},'fix':{'description':'Suitable\x20for\x20amount/quantity\x20threshold\x20validation\x20scenarios','auto_fixable':![]}}),i['includes']('convert_witness')&&b['push']({'code':'SG-01','message':'Matches\x20Pattern\x20P09\x20(witness-derived\x20validation)','severity':'hint','source':'lint','location':{'path':'/root'},'fix':{'description':'Suitable\x20for\x20cross-object\x20relationship\x20validation\x20(e.g.\x20Order→Progress)','auto_fixable':![]}});}if(d?.['action']){const k=['buy','forward','allocate','claim_reward','vote','dispute','write_repository','submit_progress','gen_passport'];if(k['includes'](d['action'])){const l=inferSceneFromAction(d['action']);if(l){const m=suggestTemplateForScene(l['id']);m&&b['push']({'code':'SG-02','message':'Recommended\x20scene\x20template:\x20'+m['name'],'severity':'hint','source':'lint','location':{'path':'/'},'fix':{'description':'Refer\x20to\x20template\x20'+m['id']+'\x20('+m['example_use_case']+')','auto_fixable':![]}});}}}const g=n=>new TextEncoder()['encode'](n)['length'],h=getSubmissionEntries(e);for(const [n,o]of e['entries']()){const p=o['name']??'';if(p['length']===0x0)continue;if(g(p)>MAX_NAME_LENGTH)b['push']({'code':'SG-03','message':'table['+n+']\x20name\x20is\x20'+g(p)+'\x20BCS\x20characters,\x20maximum\x20is\x20'+MAX_NAME_LENGTH+'.\x20Use\x20a\x20short\x20identifier\x20(e.g.\x20\x27order_id\x27,\x20\x27delivery_node\x27);\x20the\x20human-readable\x20explanation\x20belongs\x20in\x20the\x20Guard\x27s\x20\x27description\x27\x20field','severity':'warning','source':'lint','location':{'path':'/table/'+n+'/name'},'fix':{'description':'Shorten\x20the\x20name\x20to\x20'+MAX_NAME_LENGTH+'\x20BCS\x20characters\x20or\x20fewer','auto_fixable':![]}});else p['toLowerCase']()['startsWith']('0x')&&b['push']({'code':'SG-03','message':'table['+n+']\x20name\x20must\x20not\x20start\x20with\x20\x220x\x22\x20(reserved\x20for\x20object\x20IDs)','severity':'warning','source':'lint','location':{'path':'/table/'+n+'/name'},'fix':{'description':'Rename\x20the\x20entry\x20without\x20the\x200x\x20prefix','auto_fixable':![]}});}if(h['length']>0x0){const q=(f??'')['trim']();q['length']<0xa&&b['push']({'code':'SG-03','message':'This\x20Guard\x20accepts\x20submitted\x20data\x20('+h['length']+'\x20table\x20'+(h['length']===0x1?'entry':'entries')+'\x20with\x20b_submission=true)\x20but\x20its\x20description\x20is\x20too\x20short\x20for\x20a\x20verifier\x20to\x20know\x20what\x20to\x20submit.\x20Explain\x20the\x20expected\x20submitted\x20data\x20in\x20the\x20Guard\x27s\x20\x27description\x27\x20field,\x20e.g.\x20\x27user-submitted\x20operation\x20type\x20(return/damage)\x27','severity':'info','source':'lint','location':{'path':'/'},'fix':{'description':'Explain\x20the\x20expected\x20submitted\x20data\x20in\x20the\x20Guard\x27s\x20\x27description\x27\x20field','auto_fixable':![]}});}if(c){const r=rootToString(c),s=r['includes']('proof.signer'),t=r['includes']('proof.time'),u=r['includes']('calc_string_length'),v=h['some'](w=>w['value_type']==='String');if(s&&t)b['push']({'code':'SG-04','message':'Strict-mode\x20privacy-delivery\x20guard\x20detected\x20(proof.signer\x20+\x20proof.time).\x20'+'Recommended\x20three\x20conditions:\x20Signer==proof.signer\x20(submitter\x20accountability),\x20'+'proof.time>order.time\x20(freshness),\x20order.service==service\x20(project\x20binding).\x20'+'No\x20content\x20verification\x20—\x20only\x20submission\x20responsibility\x20(\x27whoever\x20benefits\x20bears\x20the\x20burden\x20of\x20proof\x27).','severity':'info','source':'lint','location':{'path':'/root'},'fix':{'description':'Ensure\x20all\x20three\x20conditions\x20are\x20present\x20(logic_and).\x20Refer\x20to\x20template\x20tpl_forward_privacy_delivery_proof.\x20'+'Query\x20IDs:\x20proof.signer=1958,\x20proof.time=1960,\x20order.time=1574,\x20order.service=1563.','auto_fixable':![]}});else u&&v&&b['push']({'code':'SG-04','message':'Broad-mode\x20privacy-delivery\x20guard\x20detected\x20(String\x20submission\x20+\x20length\x20check,\x20e.g.\x20Merkle\x20Root\x20length\x20==\x2066).\x20'+'This\x20trusts\x20the\x20submitter\x27s\x20honesty;\x20the\x20counterparty\x20can\x20dispute\x20by\x20checking\x20their\x20own\x20Messenger\x20conversation.\x20'+'Suitable\x20as\x20an\x20arbitration\x20basis,\x20not\x20a\x20fund-flow\x20gate.','severity':'info','source':'lint','location':{'path':'/root'},'fix':{'description':'For\x20stronger\x20assurance,\x20consider\x20strict\x20mode:\x20submit\x20a\x20Proof\x20object\x20address\x20(from\x20messenger.submitChainProof)\x20+\x20'+'Order\x20address,\x20then\x20verify\x20proof.signer/proof.time/order.service.\x20See\x20template\x20tpl_forward_privacy_delivery_proof.','auto_fixable':![]}});}return b;}export function autoFixGuard(a){const b=deepClone(a),c=[];(!b['description']||b['description']['trim']()==='')&&(b['description']='Guard\x20(table:\x20'+b['table']['length']+'\x20items,\x20root:\x20'+(b['root']?.['type']??'unknown')+')',c['push']({'diagnostic_code':'SH-01','description':'Fill\x20in\x20default\x20description','after':b['description'],'path':'/description'}));if(b['description']&&b['description']['length']>MAX_DESCRIPTION_LENGTH){const f=b['description'];b['description']=b['description']['substring'](0x0,MAX_DESCRIPTION_LENGTH),c['push']({'diagnostic_code':'G-001','description':'Truncate\x20description\x20to\x20'+MAX_DESCRIPTION_LENGTH+'\x20characters','before':f['length']+'\x20characters','after':b['description']['length']+'\x20characters','path':'/description'});}for(let g=0x0;g<b['table']['length'];g++){const h=b['table'][g];(!h['name']||h['name']['trim']()==='')&&(h['name']='data\x20entry\x20'+h['identifier'],c['push']({'diagnostic_code':'SH-03','description':'table['+g+']\x20fill\x20in\x20name','after':h['name'],'path':'/table/'+g+'/name'}));}for(let j=0x0;j<b['table']['length'];j++){const k=b['table'][j];if(!k['value_type']&&k['value']!==undefined&&k['value']!==null){const l=inferValueType(k['value']);l&&(k['value_type']=l,c['push']({'diagnostic_code':'SH-05','description':'table['+j+']\x20infer\x20value_type','after':l,'path':'/table/'+j+'/value_type'}));}}const d=new Map();let e=0x0;for(let m=0x0;m<b['table']['length'];m++){const n=b['table'][m];if(!d['has'](n['identifier']))d['set'](n['identifier'],e),n['identifier']!==e&&c['push']({'diagnostic_code':'G-007','description':'table['+m+']\x20identifier\x20'+n['identifier']+'\x20→\x20'+e,'before':String(n['identifier']),'after':String(e),'path':'/table/'+m+'/identifier'}),n['identifier']=e,e++;else{const o=n['identifier'];n['identifier']=e,d['set'](o,e),c['push']({'diagnostic_code':'G-007','description':'table['+m+']\x20identifier\x20'+o+'\x20duplicate\x20→\x20reallocated\x20to\x20'+e,'before':String(o),'after':String(e),'path':'/table/'+m+'/identifier'}),e++;}}for(let p=0x0;p<b['table']['length'];p++){const q=b['table'][p];q['b_submission']===undefined&&(q['b_submission']=![],c['push']({'diagnostic_code':'SH-10','description':'table['+p+']\x20b_submission\x20default\x20set\x20to\x20false','after':'false','path':'/table/'+p+'/b_submission'}));}if(b['rely']?.['guards']&&b['rely']['guards']['length']>0x0){const r=[...new Set(b['rely']['guards'])];r['length']!==b['rely']['guards']['length']&&(c['push']({'diagnostic_code':'G-009','description':'rely\x20deduplicate:\x20'+b['rely']['guards']['length']+'\x20→\x20'+r['length'],'before':JSON['stringify'](b['rely']['guards']),'after':JSON['stringify'](r),'path':'/rely/guards'}),b['rely']['guards']=r);}for(let s=0x0;s<b['table']['length'];s++){const t=b['table'][s];if(t['b_submission']===!![]&&t['value']!==undefined&&t['value']!==null){const u=JSON['stringify'](t['value']);delete t['value'],c['push']({'diagnostic_code':'SH-11','description':'table['+s+']\x20remove\x20redundant\x20value\x20on\x20b_submission=true\x20entry','before':u,'after':'(removed)','path':'/table/'+s+'/value'});}}return{'fixed':b,'actions':c};}export async function lintGuard(a,b){const c=b?.['auto_fix']??!![],d=normalizeValueTypeNames(a),{table:e,root:f,rely:g,binding_hint:h}=d,i=[];let j;const k=await checkSdkSyntax(d);i['push'](...k);const l=checkSemanticErrors(d,b);i['push'](...l);const m=checkSyntaxHints(d);i['push'](...m);let n,o=[];if(c){const {fixed:w,actions:x}=autoFixGuard(d);x['length']>0x0&&(n=w,o=x);}if(e['length']>0x0&&f){const y=h?findScene(h['host_object']??'',h['binding_field']??''):undefined,z=e['map'](B=>({'identifier':B['identifier'],'b_submission':B['b_submission']??![],'value_type':B['value_type']??'Address','value':B['value'],'name':B['name'],'object_type':B['object_type']})),A=evaluateGuardDraft({'table':z,'root':f,'rely':g,'scene':y,'sharing_recipients':h?.['sharing_recipients']});j=A['assessment'];for(const B of j['risks']){const C=B['level']==='critical'||B['level']==='high'?'error':B['level']==='medium'?'warning':B['level']==='low'?'info':'hint',D=B['evidence']??'',E=D['startsWith']('/')?D:'/';i['push']({'code':B['id'],'message':'['+B['level']+']\x20'+B['title'],'severity':C,'source':'risk','location':{'path':E},'fix':{'description':B['mitigation'],'auto_fixable':![]}});}}const p=checkSuggestions(d);i['push'](...p);const q=i['filter'](F=>F['severity']==='error')['length'],s=i['filter'](F=>F['severity']==='warning')['length'],t=i['filter'](F=>F['severity']==='info'||F['severity']==='hint')['length'],u=q===0x0;let v;if(q>0x0)v='Fix\x20'+q+'\x20error(s)\x20and\x20re-run\x20lint';else s>0x0?v='Consider\x20addressing\x20'+s+'\x20warning(s),\x20then\x20submit\x20to\x20SDK\x20newGuard()\x20for\x20final\x20syntax\x20validation':v='lint\x20passed\x20(no\x20errors);\x20submit\x20to\x20SDK\x20newGuard()\x20for\x20final\x20syntax\x20validation\x20before\x20going\x20on-chain';return{'json_summary':{'table_count':e['length'],'root_type':f?.['type']??'unknown','has_rely':!!g?.['guards']?.['length'],'rely_count':g?.['guards']?.['length']??0x0,'has_description':!!d['description']},'diagnostics':i,'fixed_json':n,'fix_actions':o,'risk_assessment':j,'summary':{'errors':q,'warnings':s,'infos':t,'auto_fixes_applied':o['length'],'ready':u,'next_step':v}};}export async function isGuardReady(a){const b=await lintGuard(a,{'auto_fix':![]});return b['summary']['ready'];}export async function getGuardErrors(a){const b=await lintGuard(a,{'auto_fix':![]});return b['diagnostics']['filter'](c=>c['severity']==='error');}export function formatLintResult(a){const b=[];b['push']('===\x20Guard\x20JSON\x20Lint\x20Report\x20==='),b['push'](''),b['push']('Summary:'),b['push']('\x20\x20Errors:\x20\x20\x20\x20\x20'+a['summary']['errors']),b['push']('\x20\x20Warnings:\x20\x20\x20'+a['summary']['warnings']),b['push']('\x20\x20Infos:\x20\x20\x20\x20\x20\x20'+a['summary']['infos']),b['push']('\x20\x20Auto-fixes:\x20'+a['summary']['auto_fixes_applied']),b['push']('\x20\x20Ready:\x20\x20\x20\x20\x20\x20'+(a['summary']['ready']?'YES':'NO')),b['push']('\x20\x20Next\x20step:\x20\x20'+a['summary']['next_step']),b['push']('');if(a['fix_actions']['length']>0x0){b['push']('---\x20Auto-fix\x20Actions\x20---');for(const g of a['fix_actions']){b['push']('\x20\x20['+g['diagnostic_code']+']\x20'+g['description']),b['push']('\x20\x20\x20\x20Path:\x20'+g['path']),g['before']&&g['after']&&b['push']('\x20\x20\x20\x20'+g['before']+'\x20->\x20'+g['after']);}b['push']('');}const c=a['diagnostics']['filter'](h=>h['severity']==='error'),e=a['diagnostics']['filter'](h=>h['severity']==='warning'),f=a['diagnostics']['filter'](h=>h['severity']==='info'||h['severity']==='hint');if(c['length']>0x0){b['push']('---\x20Errors\x20(must\x20fix)\x20---');for(const h of c){b['push']('\x20\x20['+h['code']+']\x20('+h['source']+')\x20'+h['message']),b['push']('\x20\x20\x20\x20Path:\x20'+h['location']['path']);if(h['fix'])b['push']('\x20\x20\x20\x20Fix:\x20\x20'+h['fix']['description']);}b['push']('');}if(e['length']>0x0){b['push']('---\x20Warnings\x20(consider\x20fixing)\x20---');for(const i of e){b['push']('\x20\x20['+i['code']+']\x20('+i['source']+')\x20'+i['message']),b['push']('\x20\x20\x20\x20Path:\x20'+i['location']['path']);if(i['fix'])b['push']('\x20\x20\x20\x20Fix:\x20\x20'+i['fix']['description']);}b['push']('');}if(f['length']>0x0){b['push']('---\x20Info\x20&\x20Hints\x20---');for(const j of f){b['push']('\x20\x20['+j['code']+']\x20('+j['source']+')\x20'+j['message']),b['push']('\x20\x20\x20\x20Path:\x20'+j['location']['path']);}}return b['join']('\x0a');}export function translateGuardTypeError(a){if(!a)return undefined;let b='',c=-0x1,d=-0x1;const e=a['match'](/([\w.[\]-]+)\s*(?:→|->)\s*checkType:\s*(\d+)\s+require type:\s*(\d+)/);if(e)b=e[0x1],c=Number(e[0x2]),d=Number(e[0x3]);else{const j=a['match'](/checkType:\s*(\d+)\s+require type:\s*(\d+)/);if(!j)return undefined;c=Number(j[0x1]),d=Number(j[0x2]);}const f=b?'at\x20'+b+':\x20':'',g=valueTypeName(c),h=valueTypeName(d),i=[];if(d===0x0){i['push'](f+'the\x20parent\x20operator\x20needs\x20a\x20BOOL\x20operand,\x20but\x20the\x20child\x20returns\x20'+g+'.');if(c===0x1&&/claimed_by/i['test'](a))i['push']('TEACHING\x20(Bool/Address\x20twin,\x20crs\x20P2-2):\x20order.claimed_by\x20(query\x201571)\x20returns\x20Address;\x20'+'its\x20Bool\x20twin\x20is\x20`order.claimed_by\x20some`\x20(query\x201570\x20—\x20has\x20ANY\x20claimer).\x20Invert\x20THAT\x20with\x20'+'logic_not,\x20or\x20assert\x20logic_equal[query\x201570,\x20false].');else{if(c===0x1)i['push']('TEACHING:\x20wrap\x20the\x20Address\x20leaf\x20in\x20logic_equal\x20against\x20identifier[N]\x20—\x20'+'logic_equal[{type:\x22query\x22,\x20query:\x22...\x22},\x20{type:\x22identifier\x22,\x20identifier:N}].\x20'+'A\x20Bool\x20operator\x20(logic_and/or/not)\x20can\x20never\x20consume\x20a\x20bare\x20Address.');else{if(c===0x2)i['push']('TEACHING:\x20wrap\x20the\x20String\x20leaf\x20in\x20logic_equal\x20against\x20identifier[N].\x20A\x20multi-node\x20'+'membership\x20test\x20\x27current\x20in\x20{a,b,c}\x27\x20has\x20NO\x20set\x20operator\x20yet\x20(crs\x20P2-1):\x20express\x20one\x20'+'logic_equal\x20per\x20value\x20joined\x20by\x20logic_or\x20—\x20each\x20value\x20a\x20frozen\x20table\x20entry\x20(Guards\x20are\x20'+'create-only,\x20IMMUT-003).');else c>=0x3&&c<=0x8?i['push']('TEACHING:\x20numeric\x20leaf\x20—\x20compare\x20via\x20the\x20logic_as_u256_greater/lesser/equal\x20variants,\x20'+'or\x20wrap\x20in\x20logic_equal\x20against\x20a\x20numeric\x20identifier[N].'):i['push']('TEACHING:\x20wrap\x20the\x20leaf\x20in\x20a\x20Bool-producing\x20operator\x20(logic_equal\x20/\x20logic_as_u256_*)\x20'+'before\x20feeding\x20logic_and/or/not.');}}}else i['push'](f+'the\x20operator\x20requires\x20'+h+',\x20but\x20the\x20child\x20returns\x20'+g+'.\x20TEACHING:\x20align\x20the\x20operand\x20'+'types\x20—\x20wrap\x20in\x20logic_equal\x20(any\x20type)\x20or\x20convert\x20with\x20the\x20logic_as_u256_*\x20family\x20(numeric)\x20'+'before\x20the\x20comparison.');return['GUARD\x20TYPE\x20ERROR\x20(with\x20teaching\x20notes\x20below):',a['trim'](),...i]['join']('\x0a');}
@@ -1,6 +1,8 @@
1
1
  export declare function recordMachineNodeNames(label: unknown, nodes: unknown): void;
2
2
  export declare function resetNodeGateRegistry(): void;
3
- export declare function parseGuardNodeGates(root: unknown, table?: unknown): string[];
3
+ export declare function parseGuardNodeGates(root: unknown, table?: unknown, opts?: {
4
+ equalityOnly?: boolean;
5
+ }): string[];
4
6
  export declare function lintGuardNodeGates(gates: string[]): string;
5
7
  export declare function recordCreatedGuard(name?: unknown, address?: unknown): void;
6
8
  export declare function resetCreatedGuardRegistry(): void;
@@ -1 +1 @@
1
- const machineNodeRegistry=new Map();export function recordMachineNodeNames(a,b){if(typeof a!=='string'||a['trim']()==='')return;if(!Array['isArray'](b))return;const c=[];for(const e of b){const f=e?.['name'];if(typeof f==='string'&&f['trim']()!=='')c['push'](f);}if(c['length']===0x0)return;const d=a['trim']()['toLowerCase']();machineNodeRegistry['set'](d,{'label':a['trim'](),'names':c});}export function resetNodeGateRegistry(){machineNodeRegistry['clear']();}function registrySets(){return[...machineNodeRegistry['values']()];}export function parseGuardNodeGates(a,b){try{const c=new Map();if(Array['isArray'](b))for(const i of b){if(typeof i!=='object'||i===null)continue;const j=i,k=Number(j['identifier']),l=j['value'];if(Number['isFinite'](k)&&typeof l==='string')c['set'](k,l);}const d=m=>{if(typeof m!=='object'||m===null)return undefined;const n=m;if(n['type']==='constant'&&typeof n['value']==='string')return n['value'];if(n['type']==='identifier'&&typeof n['identifier']==='number')return c['get'](n['identifier']);return undefined;},e=m=>typeof m==='object'&&m!==null&&m['type']==='query'&&m['query']==='progress.current',f=[],g=new Set(),h=m=>{if(Array['isArray'](m)){for(const p of m)h(p);return;}if(typeof m!=='object'||m===null)return;const n=m,o=typeof n['type']==='string'?n['type']:'';if(o['startsWith']('logic')&&o!=='logic_not'){const q=Array['isArray'](n['nodes'])?n['nodes']:undefined,r=q?.[0x0]??n['left'],s=q?.[0x1]??n['right'];let t;if(e(r))t=d(s);else{if(e(s))t=d(r);}t!==undefined&&!g['has'](t)&&(g['add'](t),f['push'](t));}for(const u of Object['values'](n))h(u);};return h(a),f;}catch{return[];}}function editDistanceWithin(c,d,e){if(Math['abs'](c['length']-d['length'])>e)return![];const f=new Array(d['length']+0x1),g=new Array(d['length']+0x1);for(let h=0x0;h<=d['length'];h++)f[h]=h;for(let k=0x1;k<=c['length'];k++){g[0x0]=k;let l=g[0x0];for(let m=0x1;m<=d['length'];m++){const n=c[k-0x1]===d[m-0x1]?0x0:0x1;g[m]=Math['min'](f[m]+0x1,g[m-0x1]+0x1,f[m-0x1]+n);if(g[m]<l)l=g[m];}if(l>e)return![];for(let o=0x0;o<=d['length'];o++)f[o]=g[o];}return f[d['length']]<=e;}function findNearMatch(a,b){const c=a['toLowerCase']();let d;for(const e of b){for(const f of e['names']){if(f['toLowerCase']()===c)return{'machineLabel':e['label'],'nodeName':f,'distance':0x0};editDistanceWithin(a,f,0x2)&&(d===undefined||f['length']<d['nodeName']['length'])&&(d={'machineLabel':e['label'],'nodeName':f,'distance':0x2});}}return d;}export function lintGuardNodeGates(a){try{const b=a['filter'](h=>typeof h==='string'&&h['trim']()!=='');if(b['length']===0x0)return'';const c=registrySets();if(c['length']===0x0)return'NODE-NAME\x20GATE\x20LINT\x20(advisory):\x20this\x20Guard\x20pins\x20progress.current\x20to\x20node\x20name(s)\x20'+b['map'](g=>'\x22'+g+'\x22')['join'](',\x20')+'\x20—\x20but\x20no\x20Machine\x20built\x20in\x20this\x20session\x20is\x20registered,\x20so\x20the\x20names\x20could\x20not\x20be\x20cross-checked.\x20'+'Before\x20binding,\x20verify\x20each\x20pinned\x20name\x20against\x20the\x20target\x20Machine\x27s\x20node\x20list\x20EXACTLY\x20'+'(case-sensitive):\x20a\x20typo\x20here\x20dead-ends\x20the\x20branch\x20silently\x20(the\x20Guard\x20never\x20fires)\x20and\x20'+'Guard\x20objects\x20are\x20immutable\x20after\x20creation.';const d=new Set();for(const g of c)for(const h of g['names'])d['add'](h);const e=b['filter'](i=>!d['has'](i));if(e['length']===0x0)return'';const f=['NODE-NAME\x20GATE\x20LINT\x20(advisory):\x20this\x20Guard\x20pins\x20progress.current\x20to\x20node\x20name(s)\x20'+e['map'](i=>'\x22'+i+'\x22')['join'](',\x20')+'\x20that\x20match\x20NO\x20node\x20of\x20any\x20Machine\x20built\x20in\x20this\x20session.\x20If\x20the\x20target\x20Machine\x20is\x20one\x20of\x20them,\x20'+'the\x20gate\x20can\x20never\x20fire\x20(a\x20typo\x20is\x20a\x20silent\x20dead\x20branch;\x20Guard\x20objects\x20are\x20immutable\x20after\x20creation).'];for(const i of e){const j=findNearMatch(i,c);f['push'](j?'\x20\x20•\x20\x22'+i+'\x22\x20—\x20closest\x20known\x20node:\x20\x22'+j['nodeName']+'\x22\x20(machine\x20\x22'+j['machineLabel']+'\x22'+(j['distance']===0x0?',\x20case\x20differs)':')')+'\x20—\x20likely\x20typo,\x20fix\x20the\x20table\x20value\x20BEFORE\x20binding.':'\x20\x20•\x20\x22'+i+'\x22\x20—\x20no\x20similar\x20node\x20in\x20this\x20session\x27s\x20machines;\x20if\x20the\x20target\x20Machine\x20was\x20built\x20'+'earlier\x20or\x20elsewhere,\x20verify\x20this\x20name\x20against\x20its\x20node\x20list\x20before\x20binding.');}return f['push']('\x20\x20The\x20publish-time\x20escrow-exit\x20gate\x20re-checks\x20terminal\x20coverage\x20on\x20the\x20frozen\x20graph;\x20this\x20lint\x20is\x20'+'the\x20earlier\x20catch.\x20Advisory\x20only.'),f['join']('\x0a');}catch{return'';}}const createdGuardRegistry=new Map();export function recordCreatedGuard(a,b){const c=typeof a==='string'&&a['trim']()!==''?a['trim']():undefined,d=typeof b==='string'&&b['startsWith']('0x')?b['toLowerCase']():undefined;if(!c&&!d)return;createdGuardRegistry['set']((c??d)['toLowerCase'](),{'label':c,'address':d});}export function resetCreatedGuardRegistry(){createdGuardRegistry['clear']();}function collectForwardGuardBindings(a){let b=0x0,c=0x0;const d=f=>typeof f==='number'||typeof f==='string'&&f['trim']()!==''&&Number['isFinite'](Number(f)),e=f=>{if(Array['isArray'](f)){for(const i of f)e(i);return;}if(typeof f!=='object'||f===null)return;const h=f;if(d(h['weight'])){b++;const j=h['guard'],k=typeof j==='string'?j['trim']()!=='':typeof j==='object'&&j!==null?typeof j['guard']==='string'&&String(j['guard'])['trim']()!=='':![];if(k)c++;}for(const l of Object['values'](h))e(l);};return e(a),{'forwards':b,'bound':c};}export function lintMachineGuardBindings(a){try{if(createdGuardRegistry['size']===0x0)return'';const {forwards:b,bound:c}=collectForwardGuardBindings(a);if(b===0x0||c>0x0)return'';const d=[...createdGuardRegistry['values']()]['map'](e=>e['label']??e['address']??'?');return['ORPHAN-GUARD\x20PUBLISH\x20CHECK\x20(tv8-tn-261030\x20F-29):\x20this\x20Machine\x20publishes\x20'+b+'\x20forward(s)\x20and\x20binds\x20ZERO\x20guards,\x20'+('while\x20'+createdGuardRegistry['size']+'\x20Guard\x20object(s)\x20were\x20created\x20in\x20this\x20session\x20('+d['join'](',\x20')+').'),'This\x20is\x20the\x20silent\x20write-side\x20loss\x20shape:\x20a\x20guard\x20declared\x20through\x20an\x20unresolved\x20reference\x20or\x20an\x20undefined\x20'+'value\x20is\x20DROPPED\x20during\x20serialization\x20BEFORE\x20the\x20transaction\x20—\x20the\x20publish\x20succeeds\x20with\x20identity-only\x20'+'forwards\x20and\x20zero\x20warnings,\x20and\x20the\x20graph\x20FREEZES\x20at\x20publish,\x20turning\x20every\x20created\x20Guard\x20into\x20an\x20orphan\x20'+'no\x20later\x20operation\x20can\x20re-bind.','If\x20identity-only\x20rails\x20are\x20intentional\x20for\x20this\x20Machine,\x20ignore\x20this\x20check.\x20Otherwise\x20STOP\x20before\x20any\x20'+'object\x20depends\x20on\x20this\x20machine:\x20read\x20back\x20the\x20published\x20node\x20table\x20and\x20confirm\x20whether\x20the\x20guard\x20fields\x20'+'actually\x20landed\x20on\x20chain\x20—\x20if\x20they\x20did\x20not,\x20rebuild\x20and\x20republish\x20NOW\x20while\x20the\x20graph\x20is\x20still\x20editable\x20'+'(mutation\x20is\x20impossible\x20after\x20publish).']['join']('\x0a');}catch{return'';}}
1
+ const machineNodeRegistry=new Map();export function recordMachineNodeNames(a,b){if(typeof a!=='string'||a['trim']()==='')return;if(!Array['isArray'](b))return;const c=[];for(const e of b){const f=e?.['name'];if(typeof f==='string'&&f['trim']()!=='')c['push'](f);}if(c['length']===0x0)return;const d=a['trim']()['toLowerCase']();machineNodeRegistry['set'](d,{'label':a['trim'](),'names':c});}export function resetNodeGateRegistry(){machineNodeRegistry['clear']();}function registrySets(){return[...machineNodeRegistry['values']()];}export function parseGuardNodeGates(a,b,c){try{const d=new Map();if(Array['isArray'](b))for(const j of b){if(typeof j!=='object'||j===null)continue;const k=j,l=Number(k['identifier']),m=k['value'];if(Number['isFinite'](l)&&typeof m==='string')d['set'](l,m);}const e=n=>{if(typeof n!=='object'||n===null)return undefined;const o=n;if(o['type']==='constant'&&typeof o['value']==='string')return o['value'];if(o['type']==='identifier'&&typeof o['identifier']==='number')return d['get'](o['identifier']);return undefined;},f=n=>typeof n==='object'&&n!==null&&n['type']==='query'&&n['query']==='progress.current',g=[],h=new Set(),i=n=>{if(Array['isArray'](n)){for(const q of n)i(q);return;}if(typeof n!=='object'||n===null)return;const o=n,p=typeof o['type']==='string'?o['type']:'';if(p['startsWith']('logic')&&p!=='logic_not'&&(!c?.['equalityOnly']||p==='logic_equal')){const r=Array['isArray'](o['nodes'])?o['nodes']:undefined,s=r?.[0x0]??o['left'],t=r?.[0x1]??o['right'];let u;if(f(s))u=e(t);else{if(f(t))u=e(s);}u!==undefined&&!h['has'](u)&&(h['add'](u),g['push'](u));}for(const w of Object['values'](o))i(w);};return i(a),g;}catch{return[];}}function editDistanceWithin(c,d,e){if(Math['abs'](c['length']-d['length'])>e)return![];const f=new Array(d['length']+0x1),g=new Array(d['length']+0x1);for(let h=0x0;h<=d['length'];h++)f[h]=h;for(let k=0x1;k<=c['length'];k++){g[0x0]=k;let l=g[0x0];for(let m=0x1;m<=d['length'];m++){const n=c[k-0x1]===d[m-0x1]?0x0:0x1;g[m]=Math['min'](f[m]+0x1,g[m-0x1]+0x1,f[m-0x1]+n);if(g[m]<l)l=g[m];}if(l>e)return![];for(let o=0x0;o<=d['length'];o++)f[o]=g[o];}return f[d['length']]<=e;}function findNearMatch(a,b){const c=a['toLowerCase']();let d;for(const e of b){for(const f of e['names']){if(f['toLowerCase']()===c)return{'machineLabel':e['label'],'nodeName':f,'distance':0x0};editDistanceWithin(a,f,0x2)&&(d===undefined||f['length']<d['nodeName']['length'])&&(d={'machineLabel':e['label'],'nodeName':f,'distance':0x2});}}return d;}export function lintGuardNodeGates(a){try{const b=a['filter'](h=>typeof h==='string'&&h['trim']()!=='');if(b['length']===0x0)return'';const c=registrySets();if(c['length']===0x0)return'NODE-NAME\x20GATE\x20LINT\x20(advisory):\x20this\x20Guard\x20pins\x20progress.current\x20to\x20node\x20name(s)\x20'+b['map'](g=>'\x22'+g+'\x22')['join'](',\x20')+'\x20—\x20but\x20no\x20Machine\x20built\x20in\x20this\x20session\x20is\x20registered,\x20so\x20the\x20names\x20could\x20not\x20be\x20cross-checked.\x20'+'Before\x20binding,\x20verify\x20each\x20pinned\x20name\x20against\x20the\x20target\x20Machine\x27s\x20node\x20list\x20EXACTLY\x20'+'(case-sensitive):\x20a\x20typo\x20here\x20dead-ends\x20the\x20branch\x20silently\x20(the\x20Guard\x20never\x20fires)\x20and\x20'+'Guard\x20objects\x20are\x20immutable\x20after\x20creation.';const d=new Set();for(const g of c)for(const h of g['names'])d['add'](h);const e=b['filter'](i=>!d['has'](i));if(e['length']===0x0)return'';const f=['NODE-NAME\x20GATE\x20LINT\x20(advisory):\x20this\x20Guard\x20pins\x20progress.current\x20to\x20node\x20name(s)\x20'+e['map'](i=>'\x22'+i+'\x22')['join'](',\x20')+'\x20that\x20match\x20NO\x20node\x20of\x20any\x20Machine\x20built\x20in\x20this\x20session.\x20If\x20the\x20target\x20Machine\x20is\x20one\x20of\x20them,\x20'+'the\x20gate\x20can\x20never\x20fire\x20(a\x20typo\x20is\x20a\x20silent\x20dead\x20branch;\x20Guard\x20objects\x20are\x20immutable\x20after\x20creation).'];for(const i of e){const j=findNearMatch(i,c);f['push'](j?'\x20\x20•\x20\x22'+i+'\x22\x20—\x20closest\x20known\x20node:\x20\x22'+j['nodeName']+'\x22\x20(machine\x20\x22'+j['machineLabel']+'\x22'+(j['distance']===0x0?',\x20case\x20differs)':')')+'\x20—\x20likely\x20typo,\x20fix\x20the\x20table\x20value\x20BEFORE\x20binding.':'\x20\x20•\x20\x22'+i+'\x22\x20—\x20no\x20similar\x20node\x20in\x20this\x20session\x27s\x20machines;\x20if\x20the\x20target\x20Machine\x20was\x20built\x20'+'earlier\x20or\x20elsewhere,\x20verify\x20this\x20name\x20against\x20its\x20node\x20list\x20before\x20binding.');}return f['push']('\x20\x20The\x20publish-time\x20escrow-exit\x20gate\x20re-checks\x20terminal\x20coverage\x20on\x20the\x20frozen\x20graph;\x20this\x20lint\x20is\x20'+'the\x20earlier\x20catch.\x20Advisory\x20only.'),f['join']('\x0a');}catch{return'';}}const createdGuardRegistry=new Map();export function recordCreatedGuard(a,b){const c=typeof a==='string'&&a['trim']()!==''?a['trim']():undefined,d=typeof b==='string'&&b['startsWith']('0x')?b['toLowerCase']():undefined;if(!c&&!d)return;createdGuardRegistry['set']((c??d)['toLowerCase'](),{'label':c,'address':d});}export function resetCreatedGuardRegistry(){createdGuardRegistry['clear']();}function collectForwardGuardBindings(a){let b=0x0,c=0x0;const d=f=>typeof f==='number'||typeof f==='string'&&f['trim']()!==''&&Number['isFinite'](Number(f)),e=f=>{if(Array['isArray'](f)){for(const i of f)e(i);return;}if(typeof f!=='object'||f===null)return;const h=f;if(d(h['weight'])){b++;const j=h['guard'],k=typeof j==='string'?j['trim']()!=='':typeof j==='object'&&j!==null?typeof j['guard']==='string'&&String(j['guard'])['trim']()!=='':![];if(k)c++;}for(const l of Object['values'](h))e(l);};return e(a),{'forwards':b,'bound':c};}export function lintMachineGuardBindings(a){try{if(createdGuardRegistry['size']===0x0)return'';const {forwards:b,bound:c}=collectForwardGuardBindings(a);if(b===0x0||c>0x0)return'';const d=[...createdGuardRegistry['values']()]['map'](e=>e['label']??e['address']??'?');return['ORPHAN-GUARD\x20PUBLISH\x20CHECK\x20(tv8-tn-261030\x20F-29):\x20this\x20Machine\x20publishes\x20'+b+'\x20forward(s)\x20and\x20binds\x20ZERO\x20guards,\x20'+('while\x20'+createdGuardRegistry['size']+'\x20Guard\x20object(s)\x20were\x20created\x20in\x20this\x20session\x20('+d['join'](',\x20')+').'),'This\x20is\x20the\x20silent\x20write-side\x20loss\x20shape:\x20a\x20guard\x20declared\x20through\x20an\x20unresolved\x20reference\x20or\x20an\x20undefined\x20'+'value\x20is\x20DROPPED\x20during\x20serialization\x20BEFORE\x20the\x20transaction\x20—\x20the\x20publish\x20succeeds\x20with\x20identity-only\x20'+'forwards\x20and\x20zero\x20warnings,\x20and\x20the\x20graph\x20FREEZES\x20at\x20publish,\x20turning\x20every\x20created\x20Guard\x20into\x20an\x20orphan\x20'+'no\x20later\x20operation\x20can\x20re-bind.','If\x20identity-only\x20rails\x20are\x20intentional\x20for\x20this\x20Machine,\x20ignore\x20this\x20check.\x20Otherwise\x20STOP\x20before\x20any\x20'+'object\x20depends\x20on\x20this\x20machine:\x20read\x20back\x20the\x20published\x20node\x20table\x20and\x20confirm\x20whether\x20the\x20guard\x20fields\x20'+'actually\x20landed\x20on\x20chain\x20—\x20if\x20they\x20did\x20not,\x20rebuild\x20and\x20republish\x20NOW\x20while\x20the\x20graph\x20is\x20still\x20editable\x20'+'(mutation\x20is\x20impossible\x20after\x20publish).']['join']('\x0a');}catch{return'';}}