@wowok/agent-mcp 3.3.2 → 3.3.5

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 (232) hide show
  1. package/dist/chain-semantics/field-capability.js +1 -1
  2. package/dist/chain-semantics/freeze-map.js +1 -1
  3. package/dist/chain-semantics/fund-flow.js +1 -1
  4. package/dist/chain-semantics/object-graph.js +1 -1
  5. package/dist/composition/audit.js +1 -1
  6. package/dist/composition/compile.d.ts +5 -2
  7. package/dist/composition/compile.js +1 -1
  8. package/dist/composition/inflight.d.ts +27 -3
  9. package/dist/composition/inflight.js +1 -1
  10. package/dist/config/judgment.d.ts +111 -1
  11. package/dist/config/judgment.js +1 -1
  12. package/dist/evaluation/arbitration-game.d.ts +4 -0
  13. package/dist/evaluation/arbitration-game.js +1 -1
  14. package/dist/evaluation/builtins/graph-service.js +1 -1
  15. package/dist/evaluation/builtins/graph-service.spec.js +1 -1
  16. package/dist/evaluation/game-strategy.d.ts +6 -0
  17. package/dist/evaluation/game-strategy.js +1 -1
  18. package/dist/evaluation/node-game.d.ts +7 -0
  19. package/dist/evaluation/node-game.js +1 -1
  20. package/dist/evaluation/value-risk.d.ts +8 -0
  21. package/dist/evaluation/value-risk.js +1 -0
  22. package/dist/experience/realtime-feedback.js +1 -1
  23. package/dist/extensions/business-modules.js +1 -1
  24. package/dist/extensions/industry-pack.js +1 -1
  25. package/dist/graph/onchain/analyze.js +1 -1
  26. package/dist/graph/onchain/analyze.spec.js +1 -1
  27. package/dist/graph/onchain/expand.js +1 -1
  28. package/dist/graph/onchain/exposure.js +1 -1
  29. package/dist/graph/onchain/facet-projection.js +1 -1
  30. package/dist/graph/onchain/facet-projection.spec.js +1 -1
  31. package/dist/graph/onchain/facts.d.ts +20 -0
  32. package/dist/graph/onchain/facts.js +1 -1
  33. package/dist/graph/onchain/facts.spec.js +1 -1
  34. package/dist/graph/onchain/object-held-receipts.d.ts +20 -0
  35. package/dist/graph/onchain/object-held-receipts.js +1 -0
  36. package/dist/graph/onchain/object-held-receipts.spec.d.ts +1 -0
  37. package/dist/graph/onchain/object-held-receipts.spec.js +1 -0
  38. package/dist/graph/onchain/sdk-batch.d.ts +1 -0
  39. package/dist/graph/onchain/sdk-batch.js +1 -1
  40. package/dist/harness/index.d.ts +1 -0
  41. package/dist/harness/recover.d.ts +2 -1
  42. package/dist/harness/recover.js +1 -1
  43. package/dist/knowledge/allocation-ledger.d.ts +0 -1
  44. package/dist/knowledge/allocation-ledger.js +1 -1
  45. package/dist/knowledge/allocation-puzzle.js +1 -1
  46. package/dist/knowledge/allocation-risk.js +1 -1
  47. package/dist/knowledge/arb-fund-facts.d.ts +7 -0
  48. package/dist/knowledge/arb-fund-facts.js +1 -1
  49. package/dist/knowledge/audit-rules.js +1 -1
  50. package/dist/knowledge/baselines/judgment-baselines.json +502 -81
  51. package/dist/knowledge/baselines/rules/allocation.json +0 -14
  52. package/dist/knowledge/baselines/rules/graph.json +4 -4
  53. package/dist/knowledge/baselines/rules/plan.json +33 -3
  54. package/dist/knowledge/builtin-templates.d.ts +1 -1
  55. package/dist/knowledge/builtin-templates.js +1 -1
  56. package/dist/knowledge/discount-threshold.js +1 -1
  57. package/dist/knowledge/event-semantics.js +1 -1
  58. package/dist/knowledge/game-scenarios.d.ts +21 -0
  59. package/dist/knowledge/game-scenarios.js +1 -0
  60. package/dist/knowledge/getting-started.js +1 -1
  61. package/dist/knowledge/guard-bindings.js +1 -1
  62. package/dist/knowledge/guard-design-patterns.d.ts +1 -1
  63. package/dist/knowledge/guard-design-patterns.js +1 -1
  64. package/dist/knowledge/guard-field-cognition.js +1 -1
  65. package/dist/knowledge/guard-leg-map.d.ts +5 -0
  66. package/dist/knowledge/guard-leg-map.js +1 -0
  67. package/dist/knowledge/guard-puzzle.js +1 -1
  68. package/dist/knowledge/guard-render.js +1 -1
  69. package/dist/knowledge/guard-risk.js +1 -1
  70. package/dist/knowledge/guard-submission-prompt.js +1 -1
  71. package/dist/knowledge/guard-templates.d.ts +1 -1
  72. package/dist/knowledge/guard-templates.js +1 -1
  73. package/dist/knowledge/guard-translation.js +1 -1
  74. package/dist/knowledge/index.js +1 -1
  75. package/dist/knowledge/industry-registry.js +1 -1
  76. package/dist/knowledge/industry-strategy.js +1 -1
  77. package/dist/knowledge/jsonrpc-enum.js +1 -1
  78. package/dist/knowledge/onchain-constants.d.ts +4 -2
  79. package/dist/knowledge/onchain-constants.js +1 -1
  80. package/dist/knowledge/order-ledger.d.ts +1 -1
  81. package/dist/knowledge/order-ledger.js +1 -1
  82. package/dist/knowledge/order-puzzle.d.ts +3 -0
  83. package/dist/knowledge/order-risk.d.ts +1 -1
  84. package/dist/knowledge/passport-ledger.d.ts +12 -0
  85. package/dist/knowledge/passport-ledger.js +1 -1
  86. package/dist/knowledge/payment-tracker.js +1 -1
  87. package/dist/knowledge/protocol-facts.d.ts +1 -0
  88. package/dist/knowledge/protocol-facts.js +1 -1
  89. package/dist/knowledge/recipient-constraint.d.ts +9 -0
  90. package/dist/knowledge/recipient-constraint.js +1 -1
  91. package/dist/knowledge/repository-write-semantics.d.ts +1 -1
  92. package/dist/knowledge/repository-write-semantics.js +1 -1
  93. package/dist/knowledge/scenario-modes.d.ts +1 -0
  94. package/dist/knowledge/scenario-modes.js +1 -1
  95. package/dist/knowledge/service-ledger.d.ts +14 -0
  96. package/dist/knowledge/service-ledger.js +1 -1
  97. package/dist/knowledge/strategy-manuals.js +1 -1
  98. package/dist/knowledge/template-loader.d.ts +1 -0
  99. package/dist/knowledge/template-loader.js +1 -1
  100. package/dist/knowledge/template-registry.js +1 -1
  101. package/dist/knowledge/template-scanner.d.ts +4 -0
  102. package/dist/knowledge/template-scanner.js +1 -1
  103. package/dist/knowledge/workflow-guidance.d.ts +2 -0
  104. package/dist/knowledge/workflow-guidance.js +1 -1
  105. package/dist/monitor/MonitorLoop.js +1 -1
  106. package/dist/participation/allocation-advice.d.ts +8 -1
  107. package/dist/participation/allocation-advice.js +1 -1
  108. package/dist/participation/game-context.d.ts +25 -0
  109. package/dist/participation/game-context.js +1 -0
  110. package/dist/participation/node-action-advisor.d.ts +64 -0
  111. package/dist/participation/node-action-advisor.js +1 -0
  112. package/dist/participation/radar-core.js +1 -1
  113. package/dist/playbooks/service-build/business-puzzle.js +1 -1
  114. package/dist/playbooks/service-build/machine-panorama.js +1 -1
  115. package/dist/playbooks/service-build/merchant-guide.d.ts +1 -0
  116. package/dist/playbooks/service-build/merchant-guide.js +1 -1
  117. package/dist/playbooks/service-build/migration-planner.d.ts +2 -2
  118. package/dist/playbooks/service-build/migration-planner.js +1 -1
  119. package/dist/playbooks/service-build/object-panorama.d.ts +13 -1
  120. package/dist/playbooks/service-build/object-panorama.js +1 -1
  121. package/dist/playbooks/service-build/participation-radar.js +1 -1
  122. package/dist/playbooks/service-build/relationship-profile.js +1 -1
  123. package/dist/playbooks/service-build/service-panorama.d.ts +8 -0
  124. package/dist/playbooks/service-build/service-panorama.js +1 -1
  125. package/dist/playbooks/service-build/service-quote.js +1 -1
  126. package/dist/playbooks/service-build/service-quote.spec.js +1 -1
  127. package/dist/review/index.js +1 -1
  128. package/dist/review/repository.js +1 -1
  129. package/dist/role/intent.d.ts +23 -0
  130. package/dist/role/intent.js +1 -0
  131. package/dist/safety/confirm-gate.js +1 -1
  132. package/dist/schema/benchmark-migration/index.d.ts +4 -0
  133. package/dist/schema/benchmark-migration/index.js +1 -1
  134. package/dist/schema/call/allocation.d.ts +3 -0
  135. package/dist/schema/call/allocation.js +1 -1
  136. package/dist/schema/call/arbitration.js +1 -1
  137. package/dist/schema/call/base.d.ts +77 -0
  138. package/dist/schema/call/base.js +1 -1
  139. package/dist/schema/call/bridge.d.ts +4 -0
  140. package/dist/schema/call/error-codes.d.ts +1 -1
  141. package/dist/schema/call/error-codes.js +1 -1
  142. package/dist/schema/call/guard.js +1 -1
  143. package/dist/schema/call/handler.js +1 -1
  144. package/dist/schema/call/machine.d.ts +10 -0
  145. package/dist/schema/call/machine.js +1 -1
  146. package/dist/schema/call/order.d.ts +14 -0
  147. package/dist/schema/call/order.js +1 -1
  148. package/dist/schema/call/progress.js +1 -1
  149. package/dist/schema/call/repository.d.ts +4 -0
  150. package/dist/schema/call/semantic.d.ts +6 -0
  151. package/dist/schema/call/semantic.js +1 -1
  152. package/dist/schema/call/service.d.ts +34 -0
  153. package/dist/schema/call/service.js +1 -1
  154. package/dist/schema/common/index.js +1 -1
  155. package/dist/schema/keeper/index.d.ts +2 -0
  156. package/dist/schema/local/index.d.ts +43 -0
  157. package/dist/schema/local/index.js +1 -1
  158. package/dist/schema/messenger/index.d.ts +2 -0
  159. package/dist/schema/operations.d.ts +30 -0
  160. package/dist/schema/operations.js +1 -1
  161. package/dist/schema/persona/index.d.ts +484 -0
  162. package/dist/schema/query/bi.d.ts +6 -0
  163. package/dist/schema/query/bi.js +1 -1
  164. package/dist/schema/query/index.d.ts +207 -48
  165. package/dist/schema/query/index.js +1 -1
  166. package/dist/schema/schema-version.js +1 -1
  167. package/dist/schema-query-impl/index.js +1 -1
  168. package/dist/schemas/account_operation.output.json +15 -8
  169. package/dist/schemas/account_operation.schema.json +1 -1
  170. package/dist/schemas/benchmark_migration_operation.output.json +8 -5
  171. package/dist/schemas/benchmark_migration_operation.schema.json +5 -4
  172. package/dist/schemas/bridge_operation.output.json +15 -8
  173. package/dist/schemas/index.json +1 -1
  174. package/dist/schemas/keeper_operation.output.json +13 -8
  175. package/dist/schemas/local_cache_operation.output.json +36 -8
  176. package/dist/schemas/local_cache_operation.schema.json +16 -1
  177. package/dist/schemas/local_history_operation.output.json +15 -8
  178. package/dist/schemas/local_info_operation.output.json +15 -8
  179. package/dist/schemas/local_info_operation.schema.json +5 -1
  180. package/dist/schemas/local_mark_operation.output.json +15 -8
  181. package/dist/schemas/messenger_operation.output.json +13 -8
  182. package/dist/schemas/monitor_events.output.json +13 -8
  183. package/dist/schemas/monitor_subscription.output.json +13 -8
  184. package/dist/schemas/onchain_events.output.json +68 -19
  185. package/dist/schemas/onchain_events.schema.json +4 -0
  186. package/dist/schemas/onchain_operations.output.json +116 -28
  187. package/dist/schemas/onchain_operations.schema.json +246 -113
  188. package/dist/schemas/onchain_operations_allocation.schema.json +9 -5
  189. package/dist/schemas/onchain_operations_arbitration.schema.json +3 -3
  190. package/dist/schemas/onchain_operations_contact.schema.json +1 -1
  191. package/dist/schemas/onchain_operations_demand.schema.json +3 -3
  192. package/dist/schemas/onchain_operations_gen_passport.schema.json +1 -1
  193. package/dist/schemas/onchain_operations_guard.schema.json +99 -63
  194. package/dist/schemas/onchain_operations_machine.schema.json +10 -1
  195. package/dist/schemas/onchain_operations_order.schema.json +25 -3
  196. package/dist/schemas/onchain_operations_progress.schema.json +4 -4
  197. package/dist/schemas/onchain_operations_proof.schema.json +1 -1
  198. package/dist/schemas/onchain_operations_repository.schema.json +5 -1
  199. package/dist/schemas/onchain_operations_reward.schema.json +4 -4
  200. package/dist/schemas/onchain_operations_service.schema.json +74 -16
  201. package/dist/schemas/onchain_operations_treasury.schema.json +7 -7
  202. package/dist/schemas/onchain_table_data.output.json +18 -9
  203. package/dist/schemas/persona_operation.output.json +1387 -0
  204. package/dist/schemas/persona_operation.schema.json +219 -0
  205. package/dist/schemas/query_toolkit.output.json +113 -60
  206. package/dist/schemas/query_toolkit.schema.json +9 -1
  207. package/dist/schemas/workflow_operation.schema.json +1 -1
  208. package/dist/schemas/wowok_buildin_info.output.json +259 -0
  209. package/dist/schemas/wowok_buildin_info.schema.json +121 -0
  210. package/dist/tools/build-fingerprint.d.ts +28 -0
  211. package/dist/tools/build-fingerprint.js +1 -0
  212. package/dist/tools/handlers/benchmark-migration.js +1 -1
  213. package/dist/tools/handlers/bridge.js +1 -1
  214. package/dist/tools/handlers/config.js +1 -1
  215. package/dist/tools/handlers/dispatch-expectations.js +1 -1
  216. package/dist/tools/handlers/local.js +1 -1
  217. package/dist/tools/handlers/messenger.js +1 -1
  218. package/dist/tools/handlers/onchain-name-registration.d.ts +11 -0
  219. package/dist/tools/handlers/onchain-name-registration.js +1 -1
  220. package/dist/tools/handlers/onchain.d.ts +10 -0
  221. package/dist/tools/handlers/onchain.js +1 -1
  222. package/dist/tools/handlers/query.js +1 -1
  223. package/dist/tools/handlers/review-chain.d.ts +9 -13
  224. package/dist/tools/handlers/review-chain.js +1 -1
  225. package/dist/tools/move-fn-index.gen.js +1 -1
  226. package/dist/tools/registry/local.js +1 -1
  227. package/dist/tools/registry/onchain.js +1 -1
  228. package/dist/tools/registry/query.js +1 -1
  229. package/dist/tools/upgrade-check.d.ts +1 -0
  230. package/dist/tools/upgrade-check.js +1 -1
  231. package/dist/tools/wrap.js +1 -1
  232. package/package.json +3 -3
@@ -1 +1 @@
1
- export const FIELD_CAPABILITY={'Order.dispute':{'writeBy':['order.dispute\x20(package,\x20via\x20the\x20Service-bound\x20dispute\x20filing\x20flow)'],'readBy':['order.dispute\x20count/contains\x20check\x20(MAX_DISPUTE_COUNT\x20gate,\x20order.move:119-123)','guard-query:\x20order.dispute\x20count\x20/\x20has'],'enforcedBy':['filing\x20is\x20allowlist-gated:\x20the\x20Service-bound\x20dispute\x20entry\x20points\x20enforce\x20the\x20arbitrator\x20allowlist\x20(39),\x20the\x20neutrality\x20rule\x20(33)\x20and\x20the\x20order\x20binding\x20(26)\x20BEFORE\x20the\x20case\x20is\x20minted;\x20the\x20Service-blind\x20arbitration-module\x20dispute\x20entries\x20abort\x20E_DISPUTE_DEPRECATED\x20(arbitration\x2010)'],'writeOnly':![],'notes':'A-11\x20CLOSED:\x20filing-time\x20enforcement\x20replaced\x20the\x20old\x20abort-only-at-compensation\x20surface;\x20an\x20off-allowlist\x20venue\x20can\x20no\x20longer\x20be\x20filed\x20against\x20at\x20all.','findings':['A-10','A-11'],'source':{'file':'order.move','line':0x48,'pattern':'dispute:\x20vector<address>'}},'Order.required_info':{'writeBy':['owner-only\x20order\x20field\x20update\x20(order.move:79-82)','owner-only\x20controlled\x20Proof\x20bind\x20(order.move:93-100,\x20E_REQUIRED_INFO_PROOF_NOT_BOUND\x20on\x20mismatch)'],'readBy':['guard-query:\x20order.required_info\x20some\x20/\x20value'],'enforcedBy':[],'writeOnly':!![],'notes':'buy\x20path\x20never\x20reads\x20customer_required/required_info\x20(A-1).\x20Owner-write-only\x20field.\x20The\x20controlled\x20bind\x20makes\x20the\x20TARGET\x20verifiable\x20(about==order,\x20creator==owner);\x20the\x20FIELD\x20stays\x20attestation-only\x20—\x20presence\x20gates\x20only.','findings':['A-1','A-10'],'source':{'file':'order.move','line':0x4c,'pattern':'required_info:\x20Option<address>'}},'Order.claimed_by':{'writeBy':['order.compensate\x20(package,\x20order.move:114-117)'],'readBy':['the\x20not-yet-claimed\x20assert\x20on\x20the\x20compensate/dispute\x20path','guard-query:\x20order.claimed_by\x20some\x20/\x20value'],'enforcedBy':['blocks\x20second\x20compensate/dispute'],'writeOnly':![],'notes':'NOT\x20read\x20by\x20allocation.alloc\x20—\x20refund\x20rail\x20must\x20self-check\x20via\x20refund\x20guard\x20(DUAL-RAIL-01).\x20Deliberate\x20design,\x20order.move:238-259.','findings':['A-3'],'source':{'file':'order.move','line':0x4b,'pattern':'claimed_by:\x20Option<address>'}},'Order.time':{'writeBy':['order.new\x20(clock::timestamp_ms\x20at\x20creation)'],'readBy':['guard-query:\x20order.time'],'enforcedBy':['template-declared\x20time\x20anchors'],'writeOnly':![],'notes':'Stable\x20anchor\x20for\x20window\x20guards\x20—\x20unlike\x20Progress.current_time\x20it\x20is\x20path-INDEPENDENT.','source':{'file':'order.move','line':0x4d,'pattern':'time:\x20u64'}},'Service.customer_required':{'writeBy':['service\x20settings\x20(pre-publish)'],'readBy':['guard-query'],'enforcedBy':[],'writeOnly':!![],'notes':'A-1:\x20declared\x20but\x20never\x20enforced\x20on\x20buy.\x20Fix\x20=\x20body-level\x20assert\x20in\x20order\x20creation\x20(protocol\x20upgrade).','findings':['A-1'],'source':{'file':'service.move','line':0xe2,'pattern':'customer_required:\x20vector<String>'}},'Service.repositories':{'writeBy':['service\x20settings'],'readBy':['guard-query:\x20service.repository\x20count\x20/\x20has'],'enforcedBy':[],'writeOnly':!![],'findings':['A-10'],'source':{'file':'service.move','line':0xdd,'pattern':'repositories:\x20vector<address>'}},'Service.rewards':{'writeBy':['service\x20settings'],'readBy':['guard-query'],'enforcedBy':[],'writeOnly':!![],'findings':['A-10'],'source':{'file':'service.move','line':0xe8,'pattern':'rewards:\x20vector<address>'}},'Service.order_allocators':{'writeBy':['service\x20settings\x20(pre-publish\x20replace;\x20post-publish\x20append-only)'],'readBy':['buy\x20path\x20(order-bound\x20Allocation\x20creation)','guard-query'],'enforcedBy':['publish\x20requires\x20non-empty\x20(E_NO_ALLOCATOR,\x20service.move:689-700)'],'writeOnly':![],'notes':'Replacement\x20frozen\x20at\x20publish\x20(E_ALREADY_PUBLISHED\x20on\x20the\x20pre-publish\x20replacement\x20path).\x20Append-only\x20additions\x20remain\x20possible\x20via\x20the\x20allocator-append\x20mutation\x20—\x20prefix\x20allocators\x20+\x20threshold\x20frozen,\x20EALLOCATORS_NOT_EXTENSION=20\x20on\x20violation\x20(J1).\x20Zero\x20allocator\x20rows\x20=\x20no\x20settlement\x20and\x20no\x20refund\x20rail\x20(B-1).','findings':['B-1','A-2'],'source':{'file':'service.move','line':0xe7,'pattern':'order_allocators:\x20Option<Allocators>'}},'Sale.wip':{'writeBy':['service\x20sales\x20mutation'],'readBy':['guard-query'],'enforcedBy':[],'writeOnly':!![],'notes':'wip_hash\x20IS\x20enforced\x20at\x20quote\x20(E_WIP_HASH_NOT_MATCH);\x20wip\x20url\x20itself\x20is\x20not.\x20No\x20on-chain\x20escrow\x20of\x20wip\x20content\x20(A-15).','findings':['A-10','A-15'],'source':{'file':'service.move','line':0x80,'pattern':'wip:\x20String'}},'Machine.consensus_repositories':{'writeBy':['machine\x20settings\x20(pre-publish)'],'readBy':['guard-query:\x20machine.consensus_repository\x20count\x20/\x20has'],'enforcedBy':[],'writeOnly':!![],'findings':['A-10'],'source':{'file':'machine.move','line':0x163,'pattern':'consensus_repositories:\x20vector<address>'}},'Machine.nodes':{'writeBy':['machine\x20graph\x20mutation\x20(pre-publish)'],'readBy':['progress\x20node-advance','guard-query'],'enforcedBy':['publish\x20freeze\x20—\x20publishing\x20blocks\x20all\x20later\x20graph\x20changes'],'writeOnly':![],'notes':'Missing\x20edge\x20after\x20publish\x20=\x20permanent\x20brick\x20(A-2);\x20L1\x20must\x20dry-run\x20terminal\x20reachability\x20pre-publish.','findings':['A-2'],'source':{'file':'machine.move','line':0x162,'pattern':'nodes:\x20ParentLinkedTable<String,\x20vector<NodePair>>'}},'Progress.current_time':{'writeBy':['progress\x20node\x20entry\x20(timestamp\x20refreshed\x20on\x20every\x20advance,\x20progress.move:458)'],'readBy':['guard-query:\x20progress.current_time'],'enforcedBy':['window\x20guards\x20anchored\x20on\x20it'],'writeOnly':![],'notes':'PATH-DEPENDENT:\x20=\x20time\x20of\x20entering\x20CURRENT\x20node.\x20Routing\x20through\x20extra\x20nodes\x20(e.g.\x20reviewed)\x20postpones\x20settlement\x20windows\x20(E-10).\x20TIME-ANCHOR-01\x20checks\x20anchor\x20invariance\x20across\x20paths.','findings':['E-10','D-14'],'source':{'file':'progress.move','line':0x55,'pattern':'current_time:\x20u64'}},'Discount.benchmark':{'writeBy':['service.discounts\x20(creation)'],'readBy':['quote\x20price\x20calc\x20(discount\x20application)'],'enforcedBy':[],'writeOnly':![],'notes':'A-4:\x20below-benchmark\x20coupon\x20does\x20NOT\x20change\x20price\x20but\x20IS\x20still\x20burned\x20(a\x20discounted\x20quote\x20sets\x20discount:some\x20and\x20the\x20buy\x20path\x20destroys\x20the\x20coupon\x20unconditionally).','findings':['A-4'],'source':{'file':'service.move','line':0x9a,'pattern':'benchmark:\x20Option<u64>'}},'Allocation.payment_info.for_object':{'writeBy':['buy\x20path\x20(set\x20to\x20the\x20Order\x20anchor\x20at\x20Allocation\x20creation)'],'readBy':['allocation.alloc\x20(ENO_PAYMENT_INFO\x20assert)'],'enforcedBy':['alloc\x20aborts\x20when\x20absent'],'writeOnly':![],'notes':'None\x20+\x20GuardIdentifier\x20recipient\x20=\x20CRITICAL\x20(funds\x20unrouteable)\x20—\x20template_scan\x20R-RECIPIENT-03\x20territory.','source':{'file':'allocation.move','line':0x1eb,'pattern':'payment_info:\x20Option<PaymentInfo>'}},'Treasury.inflow':{'writeBy':['treasury\x20deposit\x20paths'],'readBy':['guard-query','direct\x20field\x20accessor\x20treasury.inflow'],'enforcedBy':[],'writeOnly':![],'notes':'owner_receive\x20moves\x20value\x20out\x20WITHOUT\x20touching\x20outflow\x20—\x20never\x20re-derive\x20inflow\x20from\x20events\x20(treasury.move:86-88).','source':{'file':'treasury.move','line':0x4f,'pattern':'inflow:\x20u128'}},'Contact.permission':{'writeBy':['contact\x20settings'],'readBy':[],'enforcedBy':[],'writeOnly':![],'notes':'Never\x20consulted\x20anywhere\x20—\x20the\x20contact\x20status-change\x20call\x20(contact.move:33-43)\x20ignores\x20it\x20(A-16).\x20Not\x20part\x20of\x20the\x20A-10\x20guard-query\x20cluster:\x20it\x20has\x20no\x20reader\x20at\x20all.','findings':['A-16'],'source':{'file':'contact.move','line':0x1e,'pattern':'permission:\x20address'}}};
1
+ export const FIELD_CAPABILITY={'Order.dispute':{'writeBy':['order.dispute\x20(package,\x20via\x20the\x20Service-bound\x20dispute\x20filing\x20flow)'],'readBy':['order.dispute\x20count/contains\x20check\x20(MAX_DISPUTE_COUNT\x20gate,\x20order.move:119-123)','guard-query:\x20order.dispute\x20count\x20/\x20has'],'enforcedBy':['filing\x20is\x20allowlist-gated:\x20the\x20Service-bound\x20dispute\x20entry\x20points\x20enforce\x20the\x20arbitrator\x20allowlist\x20(39),\x20the\x20neutrality\x20rule\x20(33)\x20and\x20the\x20order\x20binding\x20(26)\x20BEFORE\x20the\x20case\x20is\x20minted;\x20the\x20arbitration-module\x20filing\x20entries\x20are\x20package-internal\x20and\x20cannot\x20be\x20called\x20directly'],'writeOnly':![],'notes':'A-11\x20CLOSED:\x20filing-time\x20enforcement\x20replaced\x20the\x20old\x20abort-only-at-compensation\x20surface;\x20an\x20off-allowlist\x20venue\x20can\x20no\x20longer\x20be\x20filed\x20against\x20at\x20all.','findings':['A-10','A-11'],'source':{'file':'order.move','line':0x48,'pattern':'dispute:\x20vector<address>'}},'Order.required_info':{'writeBy':['owner-only\x20order\x20field\x20update\x20(order.move:79-82)','owner-only\x20controlled\x20Proof\x20bind\x20(order.move:93-100,\x20E_REQUIRED_INFO_PROOF_NOT_BOUND\x20on\x20mismatch)'],'readBy':['guard-query:\x20order.required_info\x20some\x20/\x20value'],'enforcedBy':[],'writeOnly':!![],'notes':'buy\x20path\x20never\x20reads\x20customer_required/required_info\x20(A-1).\x20Owner-write-only\x20field.\x20The\x20controlled\x20bind\x20makes\x20the\x20TARGET\x20verifiable\x20(about==order,\x20creator==owner);\x20the\x20FIELD\x20stays\x20attestation-only\x20—\x20presence\x20gates\x20only.','findings':['A-1','A-10'],'source':{'file':'order.move','line':0x4c,'pattern':'required_info:\x20Option<address>'}},'Order.claimed_by':{'writeBy':['order.compensate\x20(package,\x20order.move:114-117)'],'readBy':['the\x20not-yet-claimed\x20assert\x20on\x20the\x20compensate/dispute\x20path','guard-query:\x20order.claimed_by\x20some\x20/\x20value'],'enforcedBy':['blocks\x20second\x20compensate/dispute'],'writeOnly':![],'notes':'NOT\x20read\x20by\x20allocation.alloc\x20—\x20refund\x20rail\x20must\x20self-check\x20via\x20refund\x20guard\x20(DUAL-RAIL-01).\x20Deliberate\x20design,\x20order.move:238-259.','findings':['A-3'],'source':{'file':'order.move','line':0x4b,'pattern':'claimed_by:\x20Option<address>'}},'Order.time':{'writeBy':['order.new\x20(clock::timestamp_ms\x20at\x20creation)'],'readBy':['guard-query:\x20order.time'],'enforcedBy':['template-declared\x20time\x20anchors'],'writeOnly':![],'notes':'Stable\x20anchor\x20for\x20window\x20guards\x20—\x20unlike\x20Progress.current_time\x20it\x20is\x20path-INDEPENDENT.','source':{'file':'order.move','line':0x4d,'pattern':'time:\x20u64'}},'Service.customer_required':{'writeBy':['service\x20settings\x20(pre-publish)'],'readBy':['guard-query'],'enforcedBy':[],'writeOnly':!![],'notes':'A-1:\x20declared\x20but\x20never\x20enforced\x20on\x20buy.\x20Fix\x20=\x20body-level\x20assert\x20in\x20order\x20creation\x20(protocol\x20upgrade).','findings':['A-1'],'source':{'file':'service.move','line':0xfe,'pattern':'customer_required:\x20vector<String>'}},'Service.repositories':{'writeBy':['service\x20settings'],'readBy':['guard-query:\x20service.repository\x20count\x20/\x20has'],'enforcedBy':[],'writeOnly':!![],'findings':['A-10'],'source':{'file':'service.move','line':0xf9,'pattern':'repositories:\x20vector<address>'}},'Service.rewards':{'writeBy':['service\x20settings'],'readBy':['guard-query'],'enforcedBy':[],'writeOnly':!![],'findings':['A-10'],'source':{'file':'service.move','line':0x104,'pattern':'rewards:\x20vector<address>'}},'Service.order_allocators':{'writeBy':['service\x20settings\x20(pre-publish\x20replace;\x20post-publish\x20append-only)'],'readBy':['buy\x20path\x20(order-bound\x20Allocation\x20creation)','guard-query'],'enforcedBy':['publish\x20requires\x20non-empty\x20(E_NO_ALLOCATOR,\x20service.move:689-700)'],'writeOnly':![],'notes':'Replacement\x20frozen\x20at\x20publish\x20(E_ALREADY_PUBLISHED\x20on\x20the\x20pre-publish\x20replacement\x20path).\x20Append-only\x20additions\x20remain\x20possible\x20via\x20the\x20allocator-append\x20mutation\x20—\x20prefix\x20allocators\x20+\x20threshold\x20frozen,\x20EALLOCATORS_NOT_EXTENSION=20\x20on\x20violation\x20(J1).\x20Zero\x20allocator\x20rows\x20=\x20no\x20settlement\x20and\x20no\x20refund\x20rail\x20(B-1).','findings':['B-1','A-2'],'source':{'file':'service.move','line':0x103,'pattern':'order_allocators:\x20Option<Allocators>'}},'Sale.wip':{'writeBy':['service\x20sales\x20mutation'],'readBy':['guard-query'],'enforcedBy':[],'writeOnly':!![],'notes':'wip_hash\x20IS\x20enforced\x20at\x20quote\x20(E_WIP_HASH_NOT_MATCH);\x20wip\x20url\x20itself\x20is\x20not.\x20No\x20on-chain\x20escrow\x20of\x20wip\x20content\x20(A-15).','findings':['A-10','A-15'],'source':{'file':'service.move','line':0x95,'pattern':'wip:\x20String'}},'Machine.consensus_repositories':{'writeBy':['machine\x20settings\x20(pre-publish)'],'readBy':['guard-query:\x20machine.consensus_repository\x20count\x20/\x20has'],'enforcedBy':[],'writeOnly':!![],'findings':['A-10'],'source':{'file':'machine.move','line':0x175,'pattern':'consensus_repositories:\x20vector<address>'}},'Machine.nodes':{'writeBy':['machine\x20graph\x20mutation\x20(pre-publish)'],'readBy':['progress\x20node-advance','guard-query'],'enforcedBy':['publish\x20freeze\x20—\x20publishing\x20blocks\x20all\x20later\x20graph\x20changes'],'writeOnly':![],'notes':'Missing\x20edge\x20after\x20publish\x20=\x20permanent\x20brick\x20(A-2);\x20L1\x20must\x20dry-run\x20terminal\x20reachability\x20pre-publish.','findings':['A-2'],'source':{'file':'machine.move','line':0x174,'pattern':'nodes:\x20ParentLinkedTable<String,\x20vector<NodePair>>'}},'Progress.current_time':{'writeBy':['progress\x20node\x20entry\x20(timestamp\x20refreshed\x20on\x20every\x20advance,\x20progress.move:458)'],'readBy':['guard-query:\x20progress.current_time'],'enforcedBy':['window\x20guards\x20anchored\x20on\x20it'],'writeOnly':![],'notes':'PATH-DEPENDENT:\x20=\x20time\x20of\x20entering\x20CURRENT\x20node.\x20Routing\x20through\x20extra\x20nodes\x20(e.g.\x20reviewed)\x20postpones\x20settlement\x20windows\x20(E-10).\x20TIME-ANCHOR-01\x20checks\x20anchor\x20invariance\x20across\x20paths.','findings':['E-10','D-14'],'source':{'file':'progress.move','line':0x55,'pattern':'current_time:\x20u64'}},'Discount.benchmark':{'writeBy':['service.discounts\x20(creation)'],'readBy':['quote\x20price\x20calc\x20(discount\x20application)'],'enforcedBy':[],'writeOnly':![],'notes':'A-4:\x20below-benchmark\x20coupon\x20does\x20NOT\x20change\x20price\x20but\x20IS\x20still\x20burned\x20(a\x20discounted\x20quote\x20sets\x20discount:some\x20and\x20the\x20buy\x20path\x20destroys\x20the\x20coupon\x20unconditionally).','findings':['A-4'],'source':{'file':'service.move','line':0xb6,'pattern':'benchmark:\x20Option<u64>'}},'Allocation.payment_info.for_object':{'writeBy':['buy\x20path\x20(set\x20to\x20the\x20Order\x20anchor\x20at\x20Allocation\x20creation)'],'readBy':['allocation.alloc\x20(ENO_PAYMENT_INFO\x20assert)'],'enforcedBy':['alloc\x20aborts\x20when\x20absent'],'writeOnly':![],'notes':'None\x20+\x20GuardIdentifier\x20recipient\x20=\x20CRITICAL\x20(funds\x20unrouteable)\x20—\x20template_scan\x20R-RECIPIENT-03\x20territory.','source':{'file':'allocation.move','line':0x1e9,'pattern':'payment_info:\x20Option<PaymentInfo>'}},'Treasury.inflow':{'writeBy':['treasury\x20deposit\x20paths'],'readBy':['guard-query','direct\x20field\x20accessor\x20treasury.inflow'],'enforcedBy':[],'writeOnly':![],'notes':'owner_receive\x20moves\x20value\x20out\x20WITHOUT\x20touching\x20outflow\x20—\x20never\x20re-derive\x20inflow\x20from\x20events\x20(treasury.move:86-88).','source':{'file':'treasury.move','line':0x4f,'pattern':'inflow:\x20u128'}},'Contact.permission':{'writeBy':['contact\x20settings'],'readBy':[],'enforcedBy':[],'writeOnly':![],'notes':'Never\x20consulted\x20anywhere\x20—\x20the\x20contact\x20status-change\x20call\x20(contact.move:33-43)\x20ignores\x20it\x20(A-16).\x20Not\x20part\x20of\x20the\x20A-10\x20guard-query\x20cluster:\x20it\x20has\x20no\x20reader\x20at\x20all.','findings':['A-16'],'source':{'file':'contact.move','line':0x1e,'pattern':'permission:\x20address'}}};
@@ -1 +1 @@
1
- export const FREEZE_MAP={'service_publish':{'object':'Service<T>','trigger':'service.publish','frozen':['order_allocators:\x20full\x20replacement\x20blocked\x20(E_ALREADY_PUBLISHED);\x20append-only\x20additions\x20remain\x20possible\x20via\x20the\x20allocator-append\x20mutation\x20(prefix/threshold\x20frozen\x20—\x20EALLOCATORS_NOT_EXTENSION=20)','all\x20settings\x20paths\x20(every\x20mutation\x20aborts\x20once\x20published)'],'preconditions':['order_allocators\x20must\x20be\x20non-empty\x20(E_NO_ALLOCATOR)','compensation_fund\x20>\x200\x20implies\x20arbitrations\x20non-empty'],'consequence':'Wrong/missing\x20allocator\x20or\x20unreachable\x20business-terminal\x20node\x20=\x20permanent\x20brick;\x20the\x20only\x20remedy\x20is\x20a\x20new\x20Service\x20(A-2).','findings':['A-2'],'sources':[{'file':'service.move','line':0x344,'pattern':'E_ALREADY_PUBLISHED'},{'file':'service.move','line':0x31b,'pattern':'E_NO_ALLOCATOR'}]},'machine_publish':{'object':'Machine','trigger':'machine.publish','frozen':['entire\x20graph:\x20nodes/pairs/forwards\x20(publish\x20blocks\x20every\x20later\x20graph\x20mutation)'],'preconditions':['publishability\x20checks:\x20E_NO_ENTRY_EDGE(19)\x20E_EDGE_SOURCE_NOT_FOUND(20)\x20E_FORWARD_NO_IDENTITY(21)\x20E_UNREACHABLE_THRESHOLD(22)'],'consequence':'A\x20missing\x20paid->closed_cancel\x20edge\x20can\x20never\x20be\x20added\x20later\x20(A-2/F-2).','findings':['A-2'],'sources':[{'file':'machine.move','line':0x16a,'pattern':'assert_not_published'},{'file':'machine.move','line':0x33,'pattern':'E_NO_ENTRY_EDGE'}]},'forward_construction':{'object':'machine.Forward','trigger':'machine\x20forward\x20construction,\x20guarded\x20or\x20plain\x20(pre-publish)','frozen':[],'preconditions':['permissionIndex\x20>=\x201000\x20(USER_DEFINED_PERM_INDEX,\x20machine.move:91,117)\x20—\x20template\x20perm\x202/3\x20aborts\x20on\x20chain\x20(B-8)','retained_submission\x20ids\x20must\x20exist\x20as\x20the\x20guard\x27s\x20submission\x20slots\x20AND\x20be\x20marked\x20retained\x20(E_SUBMISSION_SLOT_MISSING\x2023\x20/\x20E_SUBMISSION_SLOT_NOT_RETAINED\x2024,\x20machine.move:127-128)','one\x20of\x20namedOperator\x20|\x20permissionIndex\x20|\x20guard\x20must\x20be\x20set\x20(E_PERMISSION_NOT_DEFINED)'],'consequence':'Bad\x20forwards\x20fail\x20at\x20build\x20time\x20—\x20but\x20only\x20if\x20the\x20tool\x20layer\x20surfaces\x20the\x20abort\x20reason.','findings':['B-8'],'sources':[{'file':'machine.move','line':0x6b,'pattern':'USER_DEFINED_PERM_INDEX'},{'file':'machine.move','line':0x7f,'pattern':'E_SUBMISSION_SLOT_MISSING'}]},'repository_no_freeze':{'object':'Repository','trigger':'(none\x20—\x20no\x20publish\x20concept)','frozen':[],'preconditions':['policies\x20mutable\x20post-share\x20via\x20the\x20permission-guarded\x20policy\x20add/set/remove/clear\x20calls\x20(repository.move:730-813)'],'consequence':'Write-policy\x20mistakes\x20are\x20repairable\x20—\x20unlike\x20Machine/Service\x20publish.','sources':[{'file':'repository.move','line':0x2da,'pattern':'public\x20fun\x20policy_add'}]},'discount_creation':{'object':'Discount','trigger':'service.discounts\x20(creation)','frozen':['all\x20fields\x20including\x20transferable\x20and\x20benchmark'],'preconditions':['discount_type\x20in\x20{0\x20rates,\x201\x20minus};\x20rates\x20requires\x20off\x20<=\x2010000','time_end\x20>=\x20time_start\x20(default\x20now)'],'consequence':'Non-transferable\x20coupon\x20can\x20never\x20be\x20re-homed;\x20benchmark\x20errors\x20burn\x20buyer\x20coupons\x20(A-4).','findings':['A-4'],'sources':[{'file':'service.move','line':0xa2,'pattern':'fun\x20discounts'}]}};
1
+ export const FREEZE_MAP={'service_publish':{'object':'Service<T>','trigger':'service.publish','frozen':['order_allocators:\x20full\x20replacement\x20blocked\x20(E_ALREADY_PUBLISHED);\x20append-only\x20additions\x20remain\x20possible\x20via\x20the\x20allocator-append\x20mutation\x20(prefix/threshold\x20frozen\x20—\x20EALLOCATORS_NOT_EXTENSION=20)','all\x20settings\x20paths\x20(every\x20mutation\x20aborts\x20once\x20published)'],'preconditions':['order_allocators\x20must\x20be\x20non-empty\x20(E_NO_ALLOCATOR)','compensation_fund\x20>\x200\x20implies\x20arbitrations\x20non-empty'],'consequence':'Wrong/missing\x20allocator\x20or\x20unreachable\x20business-terminal\x20node\x20=\x20permanent\x20brick;\x20the\x20only\x20remedy\x20is\x20a\x20new\x20Service\x20(A-2).','findings':['A-2'],'sources':[{'file':'service.move','line':0x367,'pattern':'E_ALREADY_PUBLISHED'},{'file':'service.move','line':0x348,'pattern':'E_NO_ALLOCATOR'}]},'machine_publish':{'object':'Machine','trigger':'machine.publish','frozen':['entire\x20graph:\x20nodes/pairs/forwards\x20(publish\x20blocks\x20every\x20later\x20graph\x20mutation)'],'preconditions':['publishability\x20checks:\x20E_NO_ENTRY_EDGE(19)\x20E_EDGE_SOURCE_NOT_FOUND(20)\x20E_FORWARD_NO_IDENTITY(21)\x20E_UNREACHABLE_THRESHOLD(22)'],'consequence':'A\x20missing\x20paid->closed_cancel\x20edge\x20can\x20never\x20be\x20added\x20later\x20(A-2/F-2).','findings':['A-2'],'sources':[{'file':'machine.move','line':0x17c,'pattern':'assert_not_published'},{'file':'machine.move','line':0x33,'pattern':'E_NO_ENTRY_EDGE'}]},'forward_construction':{'object':'machine.Forward','trigger':'machine\x20forward\x20construction,\x20guarded\x20or\x20plain\x20(pre-publish)','frozen':[],'preconditions':['permissionIndex\x20>=\x201000\x20(USER_DEFINED_PERM_INDEX,\x20machine.move:91,117)\x20—\x20template\x20perm\x202/3\x20aborts\x20on\x20chain\x20(B-8)','retained_submission\x20ids\x20must\x20exist\x20as\x20the\x20guard\x27s\x20submission\x20slots\x20AND\x20be\x20marked\x20retained\x20(E_SUBMISSION_SLOT_MISSING\x2023\x20/\x20E_SUBMISSION_SLOT_NOT_RETAINED\x2024,\x20machine.move:127-128)','one\x20of\x20namedOperator\x20|\x20permissionIndex\x20|\x20guard\x20must\x20be\x20set\x20(E_PERMISSION_NOT_DEFINED)'],'consequence':'Bad\x20forwards\x20fail\x20at\x20build\x20time\x20—\x20but\x20only\x20if\x20the\x20tool\x20layer\x20surfaces\x20the\x20abort\x20reason.','findings':['B-8'],'sources':[{'file':'machine.move','line':0x75,'pattern':'USER_DEFINED_PERM_INDEX'},{'file':'machine.move','line':0x89,'pattern':'E_SUBMISSION_SLOT_MISSING'}]},'repository_no_freeze':{'object':'Repository','trigger':'(none\x20—\x20no\x20publish\x20concept)','frozen':[],'preconditions':['policies\x20mutable\x20post-share\x20via\x20the\x20permission-guarded\x20policy\x20add/set/remove/clear\x20calls\x20(repository.move:741-824)'],'consequence':'Write-policy\x20mistakes\x20are\x20repairable\x20—\x20unlike\x20Machine/Service\x20publish.','sources':[{'file':'repository.move','line':0x2e5,'pattern':'public\x20fun\x20policy_add'}]},'discount_creation':{'object':'Discount','trigger':'service.discounts\x20(creation)','frozen':['all\x20fields\x20including\x20transferable\x20and\x20benchmark'],'preconditions':['discount_type\x20in\x20{0\x20rates,\x201\x20minus};\x20rates\x20requires\x20off\x20<=\x2010000','time_end\x20>=\x20time_start\x20(default\x20now)'],'consequence':'Non-transferable\x20coupon\x20can\x20never\x20be\x20re-homed;\x20benchmark\x20errors\x20burn\x20buyer\x20coupons\x20(A-4).','findings':['A-4'],'sources':[{'file':'service.move','line':0xbe,'pattern':'fun\x20discounts'}]}};
@@ -1 +1 @@
1
- export const FUND_FLOWS={'buy_entry':{'kind':'entry','summary':'Buyer\x20pays:\x20coin\x20split\x20->\x20Order\x20+\x20Allocation\x20escrow\x20anchored\x20to\x20the\x20order.','path':['service\x20buy\x20(creates\x20Order,\x20service.move:459)','order-bound\x20Allocation\x20creation\x20(splits\x20coin,\x20sets\x20payment_info.for_object=order,\x20service.move:408)'],'invariants':['Allocation.balance\x20==\x20order\x20amount\x20at\x20creation','quote.ctx\x20binds\x20quote\x20to\x20tx\x20digest;\x20stock\x20deducted\x20in\x20same\x20tx\x20as\x20buy'],'sources':[{'file':'service.move','line':0x1db,'pattern':'buy2_imp'},{'file':'service.move','line':0x1a8,'pattern':'order_allocation'}]},'exit_alloc':{'kind':'exit','summary':'Escrow\x20exit\x201\x20(settlement\x20/\x20refund):\x20guard-matched\x20allocators\x20distribute\x20the\x20pool.','path':['allocation.alloc\x20(allocation.move:408)','per\x20matched\x20allocator:\x20once-slot\x20(OnceKey{guard,\x20allocator\x20index,\x20key})\x20consumed','Payment<T>\x20created;\x20CoinWrapper<T>\x20transferred\x20to\x20each\x20recipient','recipient\x20unwraps\x20via\x20payment.unwrap\x20/\x20order.owner_receive'],'invariants':['balance\x20>=\x20allocators.threshold\x20(EINSUFFICIENT_BALANCE)','balance\x20>\x200\x20(EZERO_DISTRIBUTION)\x20—\x20replay\x20on\x20drained\x20pool\x20aborts','payment_info\x20must\x20be\x20some\x20(ENO_PAYMENT_INFO)','every\x20allocator\x20with\x20matching\x20guard\x20RUNS,\x20in\x20vector\x20order,\x20against\x20the\x20shrinking\x20pool','once-slot\x20per\x20allocator\x20index\x20makes\x20replay\x20of\x20the\x20same\x20guard\x20abort'],'findings':['A-3'],'sources':[{'file':'allocation.move','line':0x1ef,'pattern':'public\x20fun\x20alloc<T>'},{'file':'allocation.move','line':0x1f6,'pattern':'EZERO_DISTRIBUTION'}]},'exit_compensation':{'kind':'exit','summary':'Escrow\x20exit\x202\x20(arbitration\x20indemnity):\x20service\x20compensation_fund\x20pays\x20order\x20owner\x20directly.','path':['service\x20compensation\x20claim\x20(service.move:516;\x20arbitrations\x20whitelist\x20+\x20E33\x20conflict\x20check\x20at\x20:525-527)','arbitration.compensate\x20->\x20order.compensate\x20writes\x20claimed_by','compensation_fund\x20split\x20->\x20public_transfer\x20to\x20order.owner\x20(service.move:541)'],'invariants':['order\x20must\x20not\x20be\x20already\x20claimed\x20(E_ORDER_ALREADY_CLAIMED)','claiming\x20arbitration\x20must\x20be\x20in\x20service.arbitrations\x20whitelist'],'sources':[{'file':'service.move','line':0x204,'pattern':'compensation_claim'},{'file':'service.move','line':0x21d,'pattern':'order::owner(order)'},{'file':'order.move','line':0x72,'pattern':'public(package)\x20fun\x20compensate'}]},'dual_rail_fact':{'kind':'fact','summary':'A-3\x20dual\x20rail:\x20alloc\x20never\x20reads\x20claimed_by;\x20compensate\x20never\x20touches\x20the\x20escrow\x20balance.','path':['order.move:238-259\x20(deliberate:\x20refund-of-principal\x20+\x20damages\x20in\x20one\x20case\x20is\x20legal)'],'invariants':['Double-pay\x20prevention\x20is\x20delegated\x20to\x20template\x20convention:\x20refund\x20guard\x20MUST\x20assert\x20claimed_by\x20is\x20none','Tool\x20layer\x20MUST\x20enforce\x20this\x20convention\x20via\x20rule\x20DUAL-RAIL-01\x20—\x20the\x20chain\x20will\x20not'],'findings':['A-3'],'sources':[{'file':'order.move','line':0xee,'pattern':'claimed_by'}]},'buyer_receive':{'kind':'exit','summary':'Buyer\x20claims\x20inbound\x20funds:\x20order.owner_receive\x20unwraps\x20Payment\x20and\x20transfers\x20coin\x20to\x20owner.','path':['order.owner_receive\x20(order.move:279-283,\x20public_transfer\x20to\x20self.owner)'],'invariants':['only\x20order.owner\x20receives'],'sources':[{'file':'order.move','line':0x117,'pattern':'owner_receive'}]},'reward_claim':{'kind':'exit','summary':'Reward\x20pool\x20exit\x201\x20(incentive):\x20guard+passport\x20gated\x20claim\x20transfers\x20coin\x20to\x20recipient.','path':['reward.claim\x20(reward.move:181)\x20->\x20coin\x20to\x20recipient\x20(reward.move:268)'],'invariants':['passport\x20must\x20satisfy\x20the\x20matched\x20RewardGuard'],'sources':[{'file':'reward.move','line':0xb5,'pattern':'public\x20fun\x20claim<T>'}]},'reward_withdraw':{'kind':'exit','summary':'Reward\x20pool\x20exit\x202\x20(balance\x20recovery,\x20ETS-B):\x20permission-gated\x20withdraw\x20leaves\x20inside\x20a\x20Payment\x20object\x20receipt.','path':['reward.withdraw[_and_unwrap]\x20(reward.move:577/:584),\x20precheck\x20E_GUARD_LOCKED_TIME\x20(the\x20internal\x20withdrawal\x20lock)','the\x20escrowed\x20coin\x20is\x20wrapped\x20and\x20delivered\x20to\x20the\x20recipient;\x20the\x20reward\x20source\x20is\x20recorded\x20in\x20the\x20payment\x27s\x20source\x20set;\x20payment.create\x20mints\x20the\x20receipt\x20(reward.move:422)','unwrap=true\x20(single\x20PTB):\x20the\x20receipt\x20is\x20unwrapped\x20to\x20the\x20transaction\x20sender\x20in\x20the\x20same\x20transaction\x20(reward.move:447)'],'invariants':['permission\x20index\x20158\x20(REWARD_WITHDRAW)\x20on\x20the\x20Reward\x27s\x20Permission\x20object','blocked\x20while\x20guard_not_added_expiration_time\x20is\x20Some\x20and\x20in\x20the\x20future\x20(E_GUARD_LOCKED_TIME)','claim\x20replay\x20protection\x20(once-slots)\x20is\x20untouched\x20—\x20withdraw\x20never\x20reads\x20recipient\x20records'],'sources':[{'file':'reward.move','line':0x241,'pattern':'public\x20fun\x20withdraw<T>'}]},'treasury_flows':{'kind':'internal','summary':'Treasury:\x20deposit/withdraw/guard-driven\x20external\x20flows;\x20owner_receive\x20bypasses\x20outflow\x20counter.','path':['treasury.deposit\x20/\x20withdraw\x20(external_*_guard\x20driven\x20variants)','treasury.owner_receive\x20moves\x20value\x20out\x20WITHOUT\x20touching\x20outflow'],'invariants':['inflow\x20and\x20outflow\x20are\x20u128\x20accumulators;\x20conservation\x20audit\x20must\x20read\x20fields,\x20not\x20events'],'sources':[{'file':'treasury.move','line':0x48,'pattern':'public\x20struct\x20Treasury<phantom\x20T>\x20has\x20key'}]},'discount_burn':{'kind':'fact','summary':'A-4:\x20coupon\x20burned\x20unconditionally\x20at\x20buy,\x20even\x20when\x20benchmark\x20unmet\x20(price\x20unchanged).','path':['the\x20discounted\x20quote\x20sets\x20quote.discount=some\x20unconditionally\x20(service.move:351)','the\x20buy\x20path\x20destroys\x20the\x20coupon\x20unconditionally\x20(service.move:469)'],'invariants':['Fix\x20(protocol\x20upgrade,\x20body-level):\x20the\x20discounted\x20quote\x20returns\x20discount:none\x20below\x20benchmark'],'findings':['A-4'],'sources':[{'file':'service.move','line':0x15f,'pattern':'discount'},{'file':'service.move','line':0x1eb,'pattern':'discount_destroy'}]},'conservation_gap':{'kind':'fact','summary':'No\x20on-chain\x20conservation\x20check:\x20accumulator_*\x20are\x20private\x20and\x20sender==@0x0\x20is\x20unreachable.','path':[],'invariants':['Conservation\x20(sum\x20in\x20==\x20sum\x20out\x20+\x20balances)\x20MUST\x20be\x20audited\x20by\x20the\x20tool\x20layer\x20post-materialization\x20(A-14)'],'findings':['A-14'],'sources':[{'file':'service.move','line':0xe4,'pattern':'compensation_fund:\x20Balance<T>'}]}};
1
+ export const FUND_FLOWS={'buy_entry':{'kind':'entry','summary':'Buyer\x20pays:\x20coin\x20split\x20->\x20Order\x20+\x20Allocation\x20escrow\x20anchored\x20to\x20the\x20order.','path':['service\x20buy\x20(creates\x20Order,\x20service.move:459)','order-bound\x20Allocation\x20creation\x20(splits\x20coin,\x20sets\x20payment_info.for_object=order,\x20service.move:408)'],'invariants':['Allocation.balance\x20==\x20order\x20amount\x20at\x20creation','quote.ctx\x20binds\x20quote\x20to\x20tx\x20digest;\x20stock\x20deducted\x20in\x20same\x20tx\x20as\x20buy'],'sources':[{'file':'service.move','line':0x206,'pattern':'buy2_imp'},{'file':'service.move','line':0x1d3,'pattern':'order_allocation'}]},'exit_alloc':{'kind':'exit','summary':'Escrow\x20exit\x201\x20(settlement\x20/\x20refund):\x20guard-matched\x20allocators\x20distribute\x20the\x20pool.','path':['allocation.alloc\x20(allocation.move:408)','per\x20matched\x20allocator:\x20once-slot\x20(OnceKey{guard,\x20allocator\x20index,\x20key})\x20consumed','Payment<T>\x20created;\x20CoinWrapper<T>\x20transferred\x20to\x20each\x20recipient','recipient\x20unwraps\x20via\x20payment.unwrap\x20/\x20order.owner_receive'],'invariants':['balance\x20>=\x20allocators.threshold\x20(EINSUFFICIENT_BALANCE)','balance\x20>\x200\x20(EZERO_DISTRIBUTION)\x20—\x20replay\x20on\x20drained\x20pool\x20aborts','payment_info\x20must\x20be\x20some\x20(ENO_PAYMENT_INFO)','every\x20allocator\x20with\x20matching\x20guard\x20RUNS,\x20in\x20vector\x20order,\x20against\x20the\x20shrinking\x20pool','once-slot\x20per\x20allocator\x20index\x20makes\x20replay\x20of\x20the\x20same\x20guard\x20abort'],'findings':['A-3'],'sources':[{'file':'allocation.move','line':0x1ee,'pattern':'public\x20fun\x20alloc<T>'},{'file':'allocation.move','line':0x1f5,'pattern':'EZERO_DISTRIBUTION'}]},'allocation_pool_no_exit':{'kind':'fact','summary':'F-BS-32\x20FINAL\x20RULING\x20(b31\x20audit\x202026-10-22):\x20Allocation\x20has\x20NO\x20drain\x20exit\x20—\x20value\x20leaves\x20a\x20pool\x20ONLY\x20through\x20allocator\x20legs\x20whose\x20guards\x20PASS.','path':['the\x20ONLY\x20sanctioned\x20remedy\x20for\x20a\x20frozen\x20residual\x20is\x20PRE-PUBLISH:\x20extend\x20the\x20allocator\x20set\x20(append-only,\x20publish-gated)\x20with\x20a\x20leg\x20whose\x20guard\x20opens\x20under\x20consensus,\x20or\x20accept\x20the\x20freeze','no\x20order-anchored,\x20service-anchored,\x20or\x20flag-gated\x20side\x20exit\x20exists\x20—\x20a\x20guard-bypassing\x20drain\x20is\x20a\x20backdoor\x20by\x20construction\x20and\x20was\x20REJECTED\x20at\x20the\x20language\x20level'],'invariants':['every\x20entry\x20in\x20allocation.move\x20upholds\x20\x27no\x20value\x20moves\x20without\x20a\x20matching\x20guard\x27\x20—\x20a\x20drain\x20primitive\x20is\x20a\x20rejected\x20shape,\x20NEVER\x20re-propose\x20it','frozen\x20residuals\x20are\x20prevented\x20pre-publish\x20by\x20the\x20AB7-C1\x20shape\x20gate\x20(recipient\x20!=\x20anchor)\x20and\x20allocator\x20planning;\x20mainnet\x200x1dcf3f3a\x20(0.01\x20frozen,\x20no\x20exit)\x20stands\x20as\x20the\x20accepted\x20cost\x20of\x20the\x20discipline'],'findings':['F-BS-32'],'sources':[{'file':'allocation.move','line':0x78,'pattern':'pool-drain\x20primitive\x20REJECTED'},{'file':'service.move','line':0x68c,'pattern':'NO\x20drain\x20entry\x20exists'}]},'exit_compensation':{'kind':'exit','summary':'Escrow\x20exit\x202\x20(arbitration\x20indemnity):\x20service\x20compensation_fund\x20pays\x20order\x20owner\x20directly.','path':['service\x20compensation\x20claim\x20(service.move:516;\x20arbitrations\x20whitelist\x20+\x20E33\x20conflict\x20check\x20at\x20:525-527)','arbitration.compensate\x20->\x20order.compensate\x20writes\x20claimed_by','compensation_fund\x20split\x20->\x20public_transfer\x20to\x20order.owner\x20(service.move:541)'],'invariants':['order\x20must\x20not\x20be\x20already\x20claimed\x20(E_ORDER_ALREADY_CLAIMED)','claiming\x20arbitration\x20must\x20be\x20in\x20service.arbitrations\x20whitelist'],'sources':[{'file':'service.move','line':0x243,'pattern':'compensation_claim'},{'file':'service.move','line':0x25c,'pattern':'order::owner(order)'},{'file':'order.move','line':0x72,'pattern':'public(package)\x20fun\x20compensate'}]},'dual_rail_fact':{'kind':'fact','summary':'A-3\x20dual\x20rail:\x20alloc\x20never\x20reads\x20claimed_by;\x20compensate\x20never\x20touches\x20the\x20escrow\x20balance.','path':['order.move:238-259\x20(deliberate:\x20refund-of-principal\x20+\x20damages\x20in\x20one\x20case\x20is\x20legal)'],'invariants':['Double-pay\x20prevention\x20is\x20delegated\x20to\x20template\x20convention:\x20refund\x20guard\x20MUST\x20assert\x20claimed_by\x20is\x20none','Tool\x20layer\x20MUST\x20enforce\x20this\x20convention\x20via\x20rule\x20DUAL-RAIL-01\x20—\x20the\x20chain\x20will\x20not'],'findings':['A-3'],'sources':[{'file':'order.move','line':0x10c,'pattern':'claimed_by'}]},'order_anchored_refund':{'kind':'fact','summary':'Order-anchored\x20refunds\x20are\x20deliberate:\x20a\x20GuardIdentifier\x20leg\x20on\x20an\x20order\x20escrow\x20pays\x20the\x20Order\x20OBJECT,\x20and\x20the\x20Order\x27s\x20owner-claim\x20entry\x20extracts\x20the\x20CoinWrapper\x20to\x20order.owner.','path':['GuardIdentifier\x20leg\x20asserts\x20its\x20passport-submitted\x20address\x20==\x20payment_info.for_object\x20(allocation.move)','the\x20service\x27s\x20escrow\x20setup\x20binds\x20payment_info.for_object\x20to\x20the\x20paying\x20Order','the\x20payment\x20batch\x20transfer\x20moves\x20the\x20CoinWrapper\x20to\x20the\x20Order\x20address','the\x20Order\x27s\x20owner-claim\x20entry\x20receives\x20into\x20the\x20shared\x20Order\x27s\x20own\x20UID\x20(&mut\x20self.id),\x20then\x20transfers\x20the\x20coin\x20to\x20self.owner'],'invariants':['an\x20object\x20address\x20CAN\x20receive:\x20transfer::public_receive\x20only\x20needs\x20&mut\x20UID\x20of\x20the\x20parent,\x20and\x20a\x20shared\x20object\x20qualifies','authorization\x20and\x20destination\x20are\x20separate:\x20the\x20guard\x20decides\x20who\x20may\x20trigger\x20(order.owner\x20or\x20an\x20agent),\x20the\x20payee\x20is\x20always\x20self.owner','the\x20payee\x20is\x20read\x20at\x20extraction\x20time,\x20so\x20a\x20later\x20ownership\x20change\x20is\x20followed\x20automatically','a\x20mismatched\x20submission\x20aborts\x2015\x20—\x20that\x20is\x20the\x20cross-order\x20redirect\x20guard,\x20not\x20a\x20ban\x20on\x20the\x20shape','step\x202\x20is\x20mandatory:\x20the\x20wrapper\x20stays\x20on\x20the\x20Order\x20until\x20the\x20owner-claim\x20entry\x20runs.\x20Build\x20the\x20Receiving\x20from\x20the\x20wrapper\x27s\x20id/version/digest\x20(alloc\x20tx\x20effects);\x20the\x20RPC\x20owned-objects\x20query\x20hardcodes\x20OwnerKind::Address\x20and\x20returns\x20nothing\x20for\x20object-owned\x20children'],'sources':[{'file':'allocation.move','line':0x262,'pattern':'ERECIPIENT_NOT_FOR_OBJECT'},{'file':'service.move','line':0x1d3,'pattern':'order_allocation'},{'file':'order.move','line':0x139,'pattern':'owner_receive'}]},'buyer_receive':{'kind':'exit','summary':'Buyer\x20claims\x20inbound\x20funds:\x20order.owner_receive\x20unwraps\x20Payment\x20and\x20transfers\x20coin\x20to\x20owner.','path':['order.owner_receive\x20(order.move:279-283,\x20public_transfer\x20to\x20self.owner)'],'invariants':['only\x20order.owner\x20receives'],'sources':[{'file':'order.move','line':0x13a,'pattern':'owner_receive'}]},'reward_claim':{'kind':'exit','summary':'Reward\x20pool\x20exit\x201\x20(incentive):\x20guard+passport\x20gated\x20claim\x20transfers\x20coin\x20to\x20recipient.','path':['reward.claim\x20(reward.move:181)\x20->\x20coin\x20to\x20recipient\x20(reward.move:268)'],'invariants':['passport\x20must\x20satisfy\x20the\x20matched\x20RewardGuard'],'sources':[{'file':'reward.move','line':0xb5,'pattern':'public\x20fun\x20claim<T>'}]},'reward_withdraw':{'kind':'exit','summary':'Reward\x20pool\x20exit\x202\x20(balance\x20recovery,\x20ETS-B):\x20permission-gated\x20withdraw\x20leaves\x20inside\x20a\x20Payment\x20object\x20receipt.','path':['reward.withdraw[_and_unwrap]\x20(reward.move:577/:584),\x20precheck\x20E_GUARD_LOCKED_TIME\x20(the\x20internal\x20withdrawal\x20lock)','the\x20escrowed\x20coin\x20is\x20wrapped\x20and\x20delivered\x20to\x20the\x20recipient;\x20the\x20reward\x20source\x20is\x20recorded\x20in\x20the\x20payment\x27s\x20source\x20set;\x20payment.create\x20mints\x20the\x20receipt\x20(reward.move:422)','unwrap=true\x20(single\x20PTB):\x20the\x20receipt\x20is\x20unwrapped\x20to\x20the\x20transaction\x20sender\x20in\x20the\x20same\x20transaction\x20(reward.move:447)'],'invariants':['permission\x20index\x20158\x20(REWARD_WITHDRAW)\x20on\x20the\x20Reward\x27s\x20Permission\x20object','blocked\x20while\x20guard_not_added_expiration_time\x20is\x20Some\x20and\x20in\x20the\x20future\x20(E_GUARD_LOCKED_TIME)','claim\x20replay\x20protection\x20(once-slots)\x20is\x20untouched\x20—\x20withdraw\x20never\x20reads\x20recipient\x20records'],'sources':[{'file':'reward.move','line':0x241,'pattern':'public\x20fun\x20withdraw<T>'}]},'treasury_flows':{'kind':'internal','summary':'Treasury:\x20deposit/withdraw/guard-driven\x20external\x20flows;\x20owner_receive\x20bypasses\x20outflow\x20counter.','path':['treasury.deposit\x20/\x20withdraw\x20(external_*_guard\x20driven\x20variants)','treasury.owner_receive\x20moves\x20value\x20out\x20WITHOUT\x20touching\x20outflow'],'invariants':['inflow\x20and\x20outflow\x20are\x20u128\x20accumulators;\x20conservation\x20audit\x20must\x20read\x20fields,\x20not\x20events'],'sources':[{'file':'treasury.move','line':0x48,'pattern':'public\x20struct\x20Treasury<phantom\x20T>\x20has\x20key'}]},'discount_burn':{'kind':'fact','summary':'A-4:\x20coupon\x20burned\x20at\x20buy;\x20the\x20burned\x20object\x20leaves\x20only\x20a\x20dead\x20address\x20(F-ES-18\x20event\x20now\x20records\x20the\x20grant).','path':['the\x20discounted\x20quote\x20sets\x20quote.discount=some\x20when\x20benchmark\x20is\x20met\x20(service.move:411)','the\x20buy\x20path\x20destroys\x20the\x20coupon\x20after\x20capturing\x20its\x20semantics\x20(service.move:514)'],'invariants':['Fix\x20(protocol\x20upgrade,\x20body-level):\x20the\x20discounted\x20quote\x20returns\x20discount:none\x20below\x20benchmark','DiscountRedeemedEvent\x20(F-ES-18)\x20is\x20the\x20only\x20on-chain\x20record\x20of\x20what\x20the\x20burned\x20coupon\x20granted'],'findings':['A-4'],'sources':[{'file':'service.move','line':0x1b7,'pattern':'discount'},{'file':'service.move','line':0x21e,'pattern':'discount_destroy'}]},'conservation_gap':{'kind':'fact','summary':'No\x20on-chain\x20conservation\x20check:\x20accumulator_*\x20are\x20private\x20and\x20sender==@0x0\x20is\x20unreachable.','path':[],'invariants':['Conservation\x20(sum\x20in\x20==\x20sum\x20out\x20+\x20balances)\x20MUST\x20be\x20audited\x20by\x20the\x20tool\x20layer\x20post-materialization\x20(A-14)'],'findings':['A-14'],'sources':[{'file':'service.move','line':0x100,'pattern':'compensation_fund:\x20Balance<T>'}]}};
@@ -1 +1 @@
1
- export const OBJECT_GRAPH={'Sale':{'module':'service','ownership':'value','references':{},'valueFields':{'name':'String','price':'u64','stock':'u64','suspension':'bool','wip':'String\x20//\x20write-only\x20(A-10)','wip_hash':'String\x20//\x20enforced\x20at\x20quote\x20(E_WIP_HASH_NOT_MATCH)'},'notes':'Value\x20type\x20embedded\x20in\x20Service.sales;\x20no\x20independent\x20identity.','source':{'file':'service.move','line':0x7b,'pattern':'public\x20struct\x20Sale\x20has\x20store,\x20drop,\x20copy'},'findings':['A-10','A-15']},'Permission':{'module':'permission','ownership':'shared','references':{'um':'Contact?'},'valueFields':{'owner':'address','admin':'vector<address>','description':'String','remark':'vector<PermissionRemark>','table':'ParentLinkedTable<address,\x20vector<u16>>\x20//\x20entity/guard\x20->\x20perm\x20indexes'},'notes':'USER_DEFINED_PERM_INDEX_START=1000\x20enforced\x20at\x20construction;\x20the\x20permission\x20check\x20grants\x20all\x20indexes\x20to\x20admins.','source':{'file':'permission.move','line':0x21,'pattern':'public\x20struct\x20Permission\x20has\x20key'}},'Guard':{'module':'guard','ownership':'shared','references':{'relies':'address[]\x20//\x20any\x20object'},'valueFields':{'description':'String','table':'vector<TableItem>','validated':'vector<TableItemType>','input':'vector<u8>','relies_logic_and':'bool','immutable':'bool','rep':'bool'},'notes':'rep=false\x20means\x20the\x20queried\x20object/first\x20param\x20failed\x20the\x201167\x20query\x20validation.','source':{'file':'guard.move','line':0x6d,'pattern':'public\x20struct\x20Guard\x20has\x20key'}},'Machine':{'module':'machine','ownership':'shared','references':{'consensus_repositories':'Repository[]','um':'Contact?','permission':'Permission'},'valueFields':{'description':'String','nodes':'ParentLinkedTable<String,\x20vector<NodePair>>','bPaused':'bool','bPublished':'bool'},'notes':'Forward\x20=\x20{namedOperator?\x20|\x20permissionIndex?\x20(pre-check,\x20namedOperator\x20first)}\x20+\x20guard?\x20(post-check).\x20permissionIndex>=1000\x20at\x20construction;\x20retained_submission\x20must\x20be\x20subset\x20of\x20guard\x20submissions.\x20namedOperator\x20\x27\x27\x20(empty)\x20=\x20order\x20holder\x20—\x20the\x20open-subscription\x20buyer\x20self-advance\x20standard;\x20\x27\x27\x20may\x20coexist\x20with\x20permissionIndex\x20on\x20one\x20forward\x20(order\x20holder\x20OR\x20permission\x20entity).','source':{'file':'machine.move','line':0x15f,'pattern':'public\x20struct\x20Machine\x20has\x20key'}},'Service<T>':{'module':'service','typeParam':'T','ownership':'shared','references':{'repositories':'Repository[]','buy_guard':'Guard?','machine':'Machine?','arbitrations':'Arbitration<T>[]','order_allocators':'Guard\x20(via\x20Allocators.allocators[].guard)','rewards':'Reward<T>[]','um':'Contact?','permission':'Permission'},'valueFields':{'description':'String','location':'String','sales':'vector<Sale>','bPublished':'bool','bPaused':'bool','customer_required':'vector<String>','compensation_fund':'Balance<T>','paused_time':'Option<u64>','setting_lock_duration':'u64'},'notes':'customer_required\x20is\x20write-only,\x20buy\x20path\x20never\x20enforces\x20it\x20(A-1).\x20compensation_fund\x20pays\x20arbitrator\x20indemnity\x20directly\x20to\x20order\x20owner.','source':{'file':'service.move','line':0xd8,'pattern':'public\x20struct\x20Service<phantom\x20T>\x20has\x20key'},'findings':['A-1','A-4','A-9','A-10','A-15']},'Order':{'module':'order','ownership':'shared','references':{'service':'Service<T>','machine':'Machine?','progress':'Progress?','allocation':'Allocation<T>?','discount':'Discount?','claimed_by':'Arb<T>?','required_info':'Contact|Proof?','dispute':'Arb<T>[]','agent':'address[]'},'valueFields':{'items':'vector<SaleItem>','amount':'u64','owner':'address','time':'u64\x20//\x20order\x20creation'},'notes':'claimed_by\x20written\x20by\x20compensate;\x20NOT\x20read\x20by\x20allocation.alloc\x20(dual-rail,\x20A-3\x20deliberate).\x20required_info\x20writable\x20by\x20owner\x20only;\x20the\x20FIELD\x20stays\x20attestation-only\x20(A-1:\x20buy\x20never\x20requires\x20it),\x20but\x20a\x20controlled\x20Proof\x20bind\x20entry\x20(MOV-PROTOCOL-1212\x2011)\x20now\x20chain-enforces\x20proof-about==order\x20&&\x20proof-creator==owner\x20at\x20write\x20time\x20(rejection\x20aborts,\x20nothing\x20written).','source':{'file':'order.move','line':0x3f,'pattern':'public\x20struct\x20Order\x20has\x20key'},'findings':['A-1','A-3','A-10']},'Progress':{'module':'progress','ownership':'shared','references':{'machine':'Machine','task':'Order?','context_repositories':'Repository[]'},'valueFields':{'current':'String','namedOperator':'vector<NamedOperator>','session':'vector<Session>','history':'ParentTableVec<History>','current_time':'u64\x20//\x20TIME\x20OF\x20ENTERING\x20CURRENT\x20NODE,\x20path-dependent\x20(E-10)'},'notes':'current_time\x20refreshes\x20on\x20every\x20node\x20transition;\x20window\x20guards\x20anchored\x20on\x20it\x20are\x20path-dependent.','source':{'file':'progress.move','line':0x4c,'pattern':'public\x20struct\x20Progress\x20has\x20key'},'findings':['E-10','D-14','A-6']},'Allocation<T>':{'module':'allocation','typeParam':'T','ownership':'shared','references':{'allocators.allocators[].guard':'Guard','payment':'Payment<T>[]','payment_info.for_object':'Order\x20(anchor)'},'valueFields':{'balance':'Balance<T>','allocators':'Allocators','payment_info':'Option<PaymentInfo>'},'notes':'alloc\x20runs\x20EVERY\x20allocator\x20whose\x20guard\x20matches;\x20each\x20consumes\x20a\x20once-slot\x20keyed\x20by\x20allocator\x20index;\x20evaluated\x20in\x20vector\x20order\x20against\x20shrinking\x20pool.','source':{'file':'allocation.move','line':0x1e7,'pattern':'public\x20struct\x20Allocation<phantom\x20T>\x20has\x20key'},'findings':['A-3']},'Payment<T>':{'module':'payment','typeParam':'T','ownership':'shared','references':{'info.for_object':'object?','info.for_guard':'Guard?','from_object':'object?'},'valueFields':{'amount':'u64','time':'u64','info':'PaymentInfo','signer':'address','record':'vector<Revenue>'},'source':{'file':'payment.move','line':0x5c,'pattern':'public\x20struct\x20Payment<phantom\x20T>\x20has\x20key'}},'CoinWrapper<T>':{'module':'payment','typeParam':'T','ownership':'owned','references':{'payment':'Payment<T>'},'valueFields':{'balance':'Balance<T>'},'notes':'Transferred\x20to\x20each\x20recipient;\x20unwrap\x20yields\x20Coin<T>.','source':{'file':'payment.move','line':0x27,'pattern':'public\x20struct\x20CoinWrapper<phantom\x20T>\x20has\x20key,\x20store'}},'Arbitration<T>':{'module':'arbitration','typeParam':'T','ownership':'shared','references':{'voting_guard[].guard':'Guard','usage_guard':'Guard?','um':'Contact?','permission':'Permission'},'valueFields':{'description':'String','location':'String','fee':'u64','balance':'Balance<T>','bPaused':'bool'},'notes':'Independent\x20arbitrator\x20=\x20independent\x20account\x20+\x20independent\x20Permission.\x20Empty\x20voting_guard\x20=\x20open\x20voting.','source':{'file':'arbitration.move','line':0x2f,'pattern':'public\x20struct\x20Arbitration<phantom\x20T>\x20has\x20key'}},'Arb<T>':{'module':'arb','typeParam':'T','ownership':'shared','references':{'order':'Order','arbitration':'Arbitration<T>'},'valueFields':{'voted':'vector<Voted>','proposition':'vector<Proposition>','fee':'Balance<T>','feedback':'String','indemnity':'Option<Indemnity>','voting_deadline':'Option<u64>','objection':'String','status':'u8\x20//\x200..6\x20Principal_confirming..Withdrawn','compensation_time':'Option<u64>','time':'u64'},'source':{'file':'arb.move','line':0x96,'pattern':'public\x20struct\x20Arb<phantom\x20T>\x20has\x20key'}},'Repository':{'module':'repository','ownership':'shared','references':{'policies[].write_guard[].guard':'Guard','policies[].quote_guard':'Guard?','rewards':'Reward<T>[]','um':'Contact?','permission':'Permission'},'valueFields':{'description':'String','policies':'vector<PolicyRule>','data':'ParentTable<DataKey,\x20vector<u8>>'},'notes':'Policies\x20mutable\x20post-share\x20via\x20the\x20permission-guarded\x20policy\x20add/set/remove/clear\x20calls\x20(repository.move:695-776).\x20The\x20passport-based\x20id-data\x20removal\x20call\x20always\x20aborts\x20(A-8).','source':{'file':'repository.move','line':0x1fe,'pattern':'public\x20struct\x20Repository\x20has\x20key'},'findings':['A-8','A-10']},'Demand':{'module':'demand','ownership':'shared','references':{'rewards':'Reward<T>[]','guards[].guard':'Guard','um':'Contact?','permission':'Permission'},'valueFields':{'description':'String','location':'String','presenters':'ParentTable<address,\x20ServiceInfo>'},'source':{'file':'demand.move','line':0x49,'pattern':'public\x20struct\x20Demand\x20has\x20key'}},'Reward<T>':{'module':'reward','typeParam':'T','ownership':'shared','references':{'guards[].guard':'Guard','um':'Contact?','permission':'Permission'},'valueFields':{'description':'String','balance':'Balance<T>','guard_not_added_expiration_time':'Option<u64>','record':'ParentTable<address,\x20RecipientRecord>'},'source':{'file':'reward.move','line':0xa9,'pattern':'public\x20struct\x20Reward<phantom\x20T>\x20has\x20key'}},'Treasury<T>':{'module':'treasury','typeParam':'T','ownership':'shared','references':{'external_deposit_guard[].guard':'Guard','external_withdraw_guard[].guard':'Guard','um':'Contact?','permission':'Permission'},'valueFields':{'balance':'Balance<T>','history':'ParentTable<address,\x20Record>','inflow':'u128','outflow':'u128'},'notes':'owner_receive\x20moves\x20value\x20out\x20WITHOUT\x20touching\x20outflow;\x20read\x20inflow\x20field,\x20never\x20re-derive\x20from\x20events.','source':{'file':'treasury.move','line':0x48,'pattern':'public\x20struct\x20Treasury<phantom\x20T>\x20has\x20key'}},'Contact':{'module':'contact','ownership':'shared','references':{'permission':'Permission'},'valueFields':{'description':'String','location':'String','ims':'vector<Im>'},'notes':'The\x20contact\x20status-change\x20call\x20has\x20NO\x20permission\x20check;\x20the\x20permission\x20field\x20is\x20never\x20consulted\x20by\x20it\x20(A-16).','source':{'file':'contact.move','line':0x19,'pattern':'public\x20struct\x20Contact\x20has\x20key'},'findings':['A-16']},'Proof':{'module':'proof','ownership':'owned','references':{'about':'object?'},'valueFields':{'description':'String','proof':'String','item_count':'Option<u64>','server_pubkey':'String','server_signature':'String','signer':'address','proof_type':'u64','time':'u64'},'notes':'No\x20share_object\x20in\x20module;\x20owned\x20by\x20creator.\x20Carrier\x20for\x20WTS\x20evidence\x20anchors.','source':{'file':'proof.move','line':0xd,'pattern':'public\x20struct\x20Proof\x20has\x20key'}},'Discount':{'module':'service','ownership':'owned','references':{'service':'Service<T>'},'valueFields':{'name':'String','discount_type':'u8\x20//\x200=rates\x201=minus','benchmark':'Option<u64>','off':'u64','time_start':'u64','time_end':'u64','transferable':'bool'},'notes':'Transferred\x20to\x20buyer.\x20Burned\x20unconditionally\x20at\x20buy\x20even\x20when\x20benchmark\x20unmet\x20(A-4).','source':{'file':'service.move','line':0x96,'pattern':'public\x20struct\x20Discount\x20has\x20key'},'findings':['A-4']},'Passport':{'module':'passport','ownership':'owned','references':{'guard[].guard':'Guard','guard[].relies':'address[]','impack':'address[]'},'valueFields':{'result':'bool','tx_hash':'vector<u8>','time':'u64','signer':'address','has_verified':'bool'},'notes':'No\x20share_object\x20in\x20module;\x20carried\x20by\x20signer,\x20mutated\x20across\x20guard\x20checks.','source':{'file':'passport.move','line':0x28,'pattern':'public\x20struct\x20Passport\x20has\x20key'}},'EntityOrders':{'module':'entity_order','ownership':'singleton','references':{},'valueFields':{'table':'ParentTable<address,\x20vector<OrderRoleItem>>'},'notes':'Reverse\x20index\x20entity->orders.\x20FIFO\x20eviction\x20at\x205200\x20entries\x20(entity_order.move:72-78)\x20—\x20silent.','source':{'file':'entity_order.move','line':0x1e,'pattern':'public\x20struct\x20EntityOrders\x20has\x20key'},'findings':['A-13']},'EntityPermission':{'module':'entity_permission','ownership':'singleton','references':{},'valueFields':{'table':'ParentTable<address,\x20vector<PermissionItem>>'},'source':{'file':'entity_permission.move','line':0x1e,'pattern':'public\x20struct\x20EntityPermission\x20has\x20key'}},'EntityContact':{'module':'entity_contact','ownership':'singleton','references':{},'valueFields':{'table':'ParentTable<address,\x20vector<ContactItem>>'},'source':{'file':'entity_contact.move','line':0x18,'pattern':'public\x20struct\x20EntityContact\x20has\x20key'}},'ObjectLinkerCore':{'module':'object_linker','ownership':'singleton','references':{},'valueFields':{'table':'ParentTable<address,\x20vector<CoreLink>>\x20//\x20target\x20->\x20core\x20who[],\x20lossless'},'source':{'file':'object_linker.move','line':0x25,'pattern':'public\x20struct\x20ObjectLinkerCore\x20has\x20key'}},'ObjectLinkerTx':{'module':'object_linker','ownership':'singleton','references':{},'valueFields':{'table':'ParentTable<address,\x20TxBuffer>\x20//\x20target\x20->\x20recent\x20tx\x20who[],\x20lossy\x20FIFO'},'source':{'file':'object_linker.move','line':0x2b,'pattern':'public\x20struct\x20ObjectLinkerTx\x20has\x20key'}},'Registrar':{'module':'registrar','ownership':'singleton','references':{},'valueFields':{'table':'ParentTable<address,\x20Votes>\x20//\x20who\x20->\x20likes/dislikes/favors'},'source':{'file':'registrar.move','line':0xb4,'pattern':'public\x20struct\x20Registrar\x20has\x20key'}},'Entity':{'module':'registrar','ownership':'singleton','references':{},'valueFields':{'table':'ParentTable<address,\x20AddressInfo>'},'source':{'file':'registrar.move','line':0xb9,'pattern':'public\x20struct\x20Entity\x20has\x20key'}},'Messenger':{'module':'registrar','ownership':'singleton','references':{},'valueFields':{'table':'ParentTable<String,\x20PubKeyData>'},'notes':'DEAD:\x20struct\x20declared\x20but\x20share_object\x20commented\x20out\x20(registrar.move:209-212).\x20No\x20on-chain\x20Messenger\x20(A-16).','source':{'file':'registrar.move','line':0x278,'pattern':'public\x20struct\x20Messenger\x20has\x20key'},'findings':['A-16']},'Resource':{'module':'resource','ownership':'shared','references':{},'valueFields':{'table':'ParentTable<address,\x20AddressTag>'},'source':{'file':'resource.move','line':0x11,'pattern':'public\x20struct\x20Resource\x20has\x20key'}}};
1
+ export const OBJECT_GRAPH={'Sale':{'module':'service','ownership':'value','references':{},'valueFields':{'name':'String','price':'u64','stock':'u64','suspension':'bool','wip':'String\x20//\x20write-only\x20(A-10)','wip_hash':'String\x20//\x20enforced\x20at\x20quote\x20(E_WIP_HASH_NOT_MATCH)'},'notes':'Value\x20type\x20embedded\x20in\x20Service.sales;\x20no\x20independent\x20identity.','source':{'file':'service.move','line':0x90,'pattern':'public\x20struct\x20Sale\x20has\x20store,\x20drop,\x20copy'},'findings':['A-10','A-15']},'Permission':{'module':'permission','ownership':'shared','references':{'um':'Contact?'},'valueFields':{'owner':'address','admin':'vector<address>','description':'String','remark':'vector<PermissionRemark>','table':'ParentLinkedTable<address,\x20vector<u16>>\x20//\x20entity/guard\x20->\x20perm\x20indexes'},'notes':'USER_DEFINED_PERM_INDEX_START=1000\x20enforced\x20at\x20construction;\x20the\x20permission\x20check\x20grants\x20all\x20indexes\x20to\x20admins.','source':{'file':'permission.move','line':0x21,'pattern':'public\x20struct\x20Permission\x20has\x20key'}},'Guard':{'module':'guard','ownership':'shared','references':{'relies':'address[]\x20//\x20any\x20object'},'valueFields':{'description':'String','table':'vector<TableItem>','validated':'vector<TableItemType>','input':'vector<u8>','relies_logic_and':'bool','immutable':'bool','rep':'bool'},'notes':'rep=false\x20means\x20the\x20queried\x20object/first\x20param\x20failed\x20the\x201167\x20query\x20validation.','source':{'file':'guard.move','line':0x6d,'pattern':'public\x20struct\x20Guard\x20has\x20key'}},'Machine':{'module':'machine','ownership':'shared','references':{'consensus_repositories':'Repository[]','um':'Contact?','permission':'Permission'},'valueFields':{'description':'String','nodes':'ParentLinkedTable<String,\x20vector<NodePair>>','bPaused':'bool','bPublished':'bool'},'notes':'Forward\x20=\x20{namedOperator?\x20|\x20permissionIndex?\x20(pre-check,\x20namedOperator\x20first)}\x20+\x20guard?\x20(post-check).\x20permissionIndex>=1000\x20at\x20construction;\x20retained_submission\x20must\x20be\x20subset\x20of\x20guard\x20submissions.\x20namedOperator\x20\x27\x27\x20(empty)\x20=\x20order\x20holder\x20—\x20the\x20open-subscription\x20buyer\x20self-advance\x20standard;\x20\x27\x27\x20may\x20coexist\x20with\x20permissionIndex\x20on\x20one\x20forward\x20(order\x20holder\x20OR\x20permission\x20entity).','source':{'file':'machine.move','line':0x171,'pattern':'public\x20struct\x20Machine\x20has\x20key'}},'Service<T>':{'module':'service','typeParam':'T','ownership':'shared','references':{'repositories':'Repository[]','buy_guard':'Guard?','machine':'Machine?','arbitrations':'Arbitration<T>[]','order_allocators':'Guard\x20(via\x20Allocators.allocators[].guard)','rewards':'Reward<T>[]','um':'Contact?','permission':'Permission'},'valueFields':{'description':'String','location':'String','sales':'vector<Sale>','bPublished':'bool','bPaused':'bool','customer_required':'vector<String>','compensation_fund':'Balance<T>','paused_time':'Option<u64>','setting_lock_duration':'u64'},'notes':'customer_required\x20is\x20write-only,\x20buy\x20path\x20never\x20enforces\x20it\x20(A-1).\x20compensation_fund\x20pays\x20arbitrator\x20indemnity\x20directly\x20to\x20order\x20owner.','source':{'file':'service.move','line':0xf4,'pattern':'public\x20struct\x20Service<phantom\x20T>\x20has\x20key'},'findings':['A-1','A-4','A-9','A-10','A-15']},'Order':{'module':'order','ownership':'shared','references':{'service':'Service<T>','machine':'Machine?','progress':'Progress?','allocation':'Allocation<T>?','discount':'Discount?','claimed_by':'Arb<T>?','required_info':'Contact|Proof?','dispute':'Arb<T>[]','agent':'address[]'},'valueFields':{'items':'vector<SaleItem>','amount':'u64','owner':'address','time':'u64\x20//\x20order\x20creation'},'notes':'claimed_by\x20written\x20by\x20compensate;\x20NOT\x20read\x20by\x20allocation.alloc\x20(dual-rail,\x20A-3\x20deliberate).\x20required_info\x20writable\x20by\x20owner\x20only;\x20the\x20FIELD\x20stays\x20attestation-only\x20(A-1:\x20buy\x20never\x20requires\x20it),\x20but\x20a\x20controlled\x20Proof\x20bind\x20entry\x20(MOV-PROTOCOL-1212\x2011)\x20now\x20chain-enforces\x20proof-about==order\x20&&\x20proof-creator==owner\x20at\x20write\x20time\x20(rejection\x20aborts,\x20nothing\x20written).','source':{'file':'order.move','line':0x3f,'pattern':'public\x20struct\x20Order\x20has\x20key'},'findings':['A-1','A-3','A-10']},'Progress':{'module':'progress','ownership':'shared','references':{'machine':'Machine','task':'Order?','context_repositories':'Repository[]'},'valueFields':{'current':'String','namedOperator':'vector<NamedOperator>','session':'vector<Session>','history':'ParentTableVec<History>','current_time':'u64\x20//\x20TIME\x20OF\x20ENTERING\x20CURRENT\x20NODE,\x20path-dependent\x20(E-10)'},'notes':'current_time\x20refreshes\x20on\x20every\x20node\x20transition;\x20window\x20guards\x20anchored\x20on\x20it\x20are\x20path-dependent.','source':{'file':'progress.move','line':0x4c,'pattern':'public\x20struct\x20Progress\x20has\x20key'},'findings':['E-10','D-14','A-6']},'Allocation<T>':{'module':'allocation','typeParam':'T','ownership':'shared','references':{'allocators.allocators[].guard':'Guard','payment':'Payment<T>[]','payment_info.for_object':'Order\x20(anchor)'},'valueFields':{'balance':'Balance<T>','allocators':'Allocators','payment_info':'Option<PaymentInfo>'},'notes':'alloc\x20runs\x20EVERY\x20allocator\x20whose\x20guard\x20matches;\x20each\x20consumes\x20a\x20once-slot\x20keyed\x20by\x20allocator\x20index;\x20evaluated\x20in\x20vector\x20order\x20against\x20shrinking\x20pool.','source':{'file':'allocation.move','line':0x1e5,'pattern':'public\x20struct\x20Allocation<phantom\x20T>\x20has\x20key'},'findings':['A-3']},'Payment<T>':{'module':'payment','typeParam':'T','ownership':'shared','references':{'info.for_object':'object?','info.for_guard':'Guard?','from_object':'object?'},'valueFields':{'amount':'u64','time':'u64','info':'PaymentInfo','signer':'address','record':'vector<Revenue>'},'source':{'file':'payment.move','line':0x5c,'pattern':'public\x20struct\x20Payment<phantom\x20T>\x20has\x20key'}},'CoinWrapper<T>':{'module':'payment','typeParam':'T','ownership':'owned','references':{'payment':'Payment<T>'},'valueFields':{'balance':'Balance<T>'},'notes':'Transferred\x20to\x20each\x20recipient;\x20unwrap\x20yields\x20Coin<T>.','source':{'file':'payment.move','line':0x27,'pattern':'public\x20struct\x20CoinWrapper<phantom\x20T>\x20has\x20key,\x20store'}},'Arbitration<T>':{'module':'arbitration','typeParam':'T','ownership':'shared','references':{'voting_guard[].guard':'Guard','usage_guard':'Guard?','um':'Contact?','permission':'Permission'},'valueFields':{'description':'String','location':'String','fee':'u64','balance':'Balance<T>','bPaused':'bool'},'notes':'Independent\x20arbitrator\x20=\x20independent\x20account\x20+\x20independent\x20Permission.\x20Empty\x20voting_guard\x20=\x20open\x20voting.','source':{'file':'arbitration.move','line':0x2f,'pattern':'public\x20struct\x20Arbitration<phantom\x20T>\x20has\x20key'}},'Arb<T>':{'module':'arb','typeParam':'T','ownership':'shared','references':{'order':'Order','arbitration':'Arbitration<T>'},'valueFields':{'voted':'vector<Voted>','proposition':'vector<Proposition>','fee':'Balance<T>','feedback':'String','indemnity':'Option<Indemnity>','voting_deadline':'Option<u64>','objection':'String','status':'u8\x20//\x200..6\x20Principal_confirming..Withdrawn','compensation_time':'Option<u64>','time':'u64'},'source':{'file':'arb.move','line':0xb0,'pattern':'public\x20struct\x20Arb<phantom\x20T>\x20has\x20key'}},'Repository':{'module':'repository','ownership':'shared','references':{'policies[].write_guard[].guard':'Guard','policies[].quote_guard':'Guard?','rewards':'Reward<T>[]','um':'Contact?','permission':'Permission'},'valueFields':{'description':'String','policies':'vector<PolicyRule>','data':'ParentTable<DataKey,\x20vector<u8>>'},'notes':'Policies\x20mutable\x20post-share\x20via\x20the\x20permission-guarded\x20policy\x20add/set/remove/clear\x20calls\x20(repository.move:706-787).\x20The\x20passport-based\x20id-data\x20removal\x20call\x20always\x20aborts\x20(A-8).','source':{'file':'repository.move','line':0x209,'pattern':'public\x20struct\x20Repository\x20has\x20key'},'findings':['A-8','A-10']},'Demand':{'module':'demand','ownership':'shared','references':{'rewards':'Reward<T>[]','guards[].guard':'Guard','um':'Contact?','permission':'Permission'},'valueFields':{'description':'String','location':'String','presenters':'ParentTable<address,\x20ServiceInfo>'},'source':{'file':'demand.move','line':0x49,'pattern':'public\x20struct\x20Demand\x20has\x20key'}},'Reward<T>':{'module':'reward','typeParam':'T','ownership':'shared','references':{'guards[].guard':'Guard','um':'Contact?','permission':'Permission'},'valueFields':{'description':'String','balance':'Balance<T>','guard_not_added_expiration_time':'Option<u64>','record':'ParentTable<address,\x20RecipientRecord>'},'source':{'file':'reward.move','line':0xa9,'pattern':'public\x20struct\x20Reward<phantom\x20T>\x20has\x20key'}},'Treasury<T>':{'module':'treasury','typeParam':'T','ownership':'shared','references':{'external_deposit_guard[].guard':'Guard','external_withdraw_guard[].guard':'Guard','um':'Contact?','permission':'Permission'},'valueFields':{'balance':'Balance<T>','history':'ParentTable<address,\x20Record>','inflow':'u128','outflow':'u128'},'notes':'owner_receive\x20moves\x20value\x20out\x20WITHOUT\x20touching\x20outflow;\x20read\x20inflow\x20field,\x20never\x20re-derive\x20from\x20events.','source':{'file':'treasury.move','line':0x48,'pattern':'public\x20struct\x20Treasury<phantom\x20T>\x20has\x20key'}},'Contact':{'module':'contact','ownership':'shared','references':{'permission':'Permission'},'valueFields':{'description':'String','location':'String','ims':'vector<Im>'},'notes':'The\x20contact\x20status-change\x20call\x20has\x20NO\x20permission\x20check;\x20the\x20permission\x20field\x20is\x20never\x20consulted\x20by\x20it\x20(A-16).','source':{'file':'contact.move','line':0x19,'pattern':'public\x20struct\x20Contact\x20has\x20key'},'findings':['A-16']},'Proof':{'module':'proof','ownership':'owned','references':{'about':'object?'},'valueFields':{'description':'String','proof':'String','item_count':'Option<u64>','server_pubkey':'String','server_signature':'String','signer':'address','proof_type':'u64','time':'u64'},'notes':'No\x20share_object\x20in\x20module;\x20owned\x20by\x20creator.\x20Carrier\x20for\x20WTS\x20evidence\x20anchors.','source':{'file':'proof.move','line':0xd,'pattern':'public\x20struct\x20Proof\x20has\x20key'}},'Discount':{'module':'service','ownership':'owned','references':{'service':'Service<T>'},'valueFields':{'name':'String','discount_type':'u8\x20//\x200=rates\x201=minus','benchmark':'Option<u64>','off':'u64','time_start':'u64','time_end':'u64','transferable':'bool'},'notes':'Transferred\x20to\x20buyer.\x20Burned\x20unconditionally\x20at\x20buy\x20even\x20when\x20benchmark\x20unmet\x20(A-4).','source':{'file':'service.move','line':0xb2,'pattern':'public\x20struct\x20Discount\x20has\x20key'},'findings':['A-4']},'Passport':{'module':'passport','ownership':'owned','references':{'guard[].guard':'Guard','guard[].relies':'address[]','impack':'address[]'},'valueFields':{'result':'bool','tx_hash':'vector<u8>','time':'u64','signer':'address','has_verified':'bool'},'notes':'No\x20share_object\x20in\x20module;\x20carried\x20by\x20signer,\x20mutated\x20across\x20guard\x20checks.','source':{'file':'passport.move','line':0x39,'pattern':'public\x20struct\x20Passport\x20has\x20key'}},'EntityOrders':{'module':'entity_order','ownership':'singleton','references':{},'valueFields':{'table':'ParentTable<address,\x20vector<OrderRoleItem>>'},'notes':'Reverse\x20index\x20entity->orders.\x20FIFO\x20eviction\x20at\x205200\x20entries\x20(entity_order.move:72-78)\x20—\x20silent.','source':{'file':'entity_order.move','line':0x1e,'pattern':'public\x20struct\x20EntityOrders\x20has\x20key'},'findings':['A-13']},'EntityPermission':{'module':'entity_permission','ownership':'singleton','references':{},'valueFields':{'table':'ParentTable<address,\x20vector<PermissionItem>>'},'source':{'file':'entity_permission.move','line':0x1e,'pattern':'public\x20struct\x20EntityPermission\x20has\x20key'}},'EntityContact':{'module':'entity_contact','ownership':'singleton','references':{},'valueFields':{'table':'ParentTable<address,\x20vector<ContactItem>>'},'source':{'file':'entity_contact.move','line':0x18,'pattern':'public\x20struct\x20EntityContact\x20has\x20key'}},'ObjectLinkerCore':{'module':'object_linker','ownership':'singleton','references':{},'valueFields':{'table':'ParentTable<address,\x20vector<CoreLink>>\x20//\x20target\x20->\x20core\x20who[],\x20lossless'},'source':{'file':'object_linker.move','line':0x25,'pattern':'public\x20struct\x20ObjectLinkerCore\x20has\x20key'}},'ObjectLinkerTx':{'module':'object_linker','ownership':'singleton','references':{},'valueFields':{'table':'ParentTable<address,\x20TxBuffer>\x20//\x20target\x20->\x20recent\x20tx\x20who[],\x20lossy\x20FIFO'},'source':{'file':'object_linker.move','line':0x2b,'pattern':'public\x20struct\x20ObjectLinkerTx\x20has\x20key'}},'Registrar':{'module':'registrar','ownership':'singleton','references':{},'valueFields':{'table':'ParentTable<address,\x20Votes>\x20//\x20who\x20->\x20likes/dislikes/favors'},'source':{'file':'registrar.move','line':0xb4,'pattern':'public\x20struct\x20Registrar\x20has\x20key'}},'Entity':{'module':'registrar','ownership':'singleton','references':{},'valueFields':{'table':'ParentTable<address,\x20AddressInfo>'},'source':{'file':'registrar.move','line':0xb9,'pattern':'public\x20struct\x20Entity\x20has\x20key'}},'Messenger':{'module':'registrar','ownership':'singleton','references':{},'valueFields':{'table':'ParentTable<String,\x20PubKeyData>'},'notes':'DEAD:\x20struct\x20declared\x20but\x20share_object\x20commented\x20out\x20(registrar.move:209-212).\x20No\x20on-chain\x20Messenger\x20(A-16).','source':{'file':'registrar.move','line':0x278,'pattern':'public\x20struct\x20Messenger\x20has\x20key'},'findings':['A-16']},'Resource':{'module':'resource','ownership':'shared','references':{},'valueFields':{'table':'ParentTable<address,\x20AddressTag>'},'source':{'file':'resource.move','line':0x11,'pattern':'public\x20struct\x20Resource\x20has\x20key'}}};
@@ -1 +1 @@
1
- import{getJudgmentDoc}from'../config/judgment.js';import{evaluateRuleBook}from'../config/rule-engine.js';import{isPathDependentTimeQuery}from'../chain-semantics/index.js';import{MAX_INDEMNITY_MULTIPLE}from'../knowledge/onchain-constants.js';import{numericAmount}from'../knowledge/audit-rules.js';import{createsOf,isRef,refsOf,validatePlan}from'./plan.js';function collectQueries(a,b=[]){if(Array['isArray'](a)){for(const c of a)collectQueries(c,b);}else{if(typeof a==='object'&&a!==null){const d=a;d['type']==='query'&&typeof d['query']==='string'&&b['push']({'query':d['query']});for(const e of Object['values'](d))collectQueries(e,b);}}return b;}function acceptedProgressNodes(a,b){const c=new Map();if(Array['isArray'](b))for(const g of b){if(typeof g==='object'&&g!==null){const h=g;typeof h['identifier']==='number'&&typeof h['value']==='string'&&c['set'](h['identifier'],h['value']);}}const d=i=>{if(typeof i!=='object'||i===null)return undefined;const j=i;if(j['type']==='constant'&&typeof j['value']==='string')return j['value'];if(j['type']==='identifier'&&typeof j['identifier']==='number')return c['get'](j['identifier']);return undefined;},e=[],f=i=>{if(Array['isArray'](i)){for(const n of i)f(n);return;}if(typeof i!=='object'||i===null)return;const j=i,k=Array['isArray'](j['nodes'])?j['nodes']:undefined,l=k?.[0x0]??j['left'],m=k?.[0x1]??j['right'];if(typeof j['type']==='string'&&j['type']['startsWith']('logic')&&typeof l==='object'&&l!==null&&l['type']==='query'&&l['query']==='progress.current'){const o=d(m);if(o!==undefined)e['push'](o);}for(const p of Object['values'](j))f(p);};return f(a),e;}const REPO_WHERE_QUERY_TYPES=new Set(['query_repository_data_count_where','query_repository_data_sum_where','query_repository_data_find_where']);function collectRepoWhereQueries(a,b=[]){if(Array['isArray'](a)){for(const c of a)collectRepoWhereQueries(c,b);}else{if(typeof a==='object'&&a!==null){const d=a;typeof d['type']==='string'&&REPO_WHERE_QUERY_TYPES['has'](d['type'])&&b['push'](d);for(const e of Object['values'](d))collectRepoWhereQueries(e,b);}}return b;}function staticStringOperand(a,b){if(typeof a!=='object'||a===null)return undefined;const c=a;if(typeof c['identifier']==='number'){const d=b['find'](e=>typeof e==='object'&&e!==null&&e['identifier']===c['identifier']);if(d===undefined||d['b_submission']===!![])return undefined;return typeof d['value']==='string'?d['value']:undefined;}return typeof c['value']==='string'?c['value']:undefined;}function isPlanLocalObjectOperand(a,b){if(typeof a!=='object'||a===null)return![];const c=a;if(typeof c['identifier']!=='number')return![];const d=b['find'](f=>typeof f==='object'&&f!==null&&f['identifier']===c['identifier']);if(d===undefined||d['b_submission']===!![])return![];const e=d['value'];if(typeof e==='object'&&e!==null)return!![];return typeof e==='string'&&e['startsWith']('$');}function guardProjection(a){const b=a['params']['root']??a['params']['logic'],c=collectQueries(b)['map'](d=>d['query']);return{'stepId':a['id'],'queries':c,'acceptedNodes':acceptedProgressNodes(b,a['params']['table']),'table':Array['isArray'](a['params']['table'])?a['params']['table']:[]};}function allocatorRows(a){const b=[],c=d=>{if(typeof d==='object'&&d!==null&&!Array['isArray'](d)){const e=d;if(Array['isArray'](e['allocators']))d=e['allocators'];}if(!Array['isArray'](d))return;for(const f of d){if(typeof f!=='object'||f===null)continue;const g=f,h=g['guard'],i=g['guard_key'],j=Array['isArray'](g['sharing'])?g['sharing']:[],k=j['map'](l=>typeof l==='object'&&l!==null?l['who']:undefined)['map'](l=>typeof l==='object'&&l!==null?l['GuardIdentifier']:undefined)['filter'](l=>typeof l==='number');b['push']({'track':typeof g['track']==='string'?g['track']:'settlement','guardStep':isRef(h)?h['$ref']:undefined,'guardKey':typeof i==='string'?i:undefined,'identifierLegs':k});}};for(const d of a['steps']){if(d['op']==='create'&&d['object']==='service')c(d['params']['order_allocators']);if(d['op']==='configure'&&d['method']==='order_allocators')c(d['params']['allocators']);}return b;}function machineProjection(a){const b=createsOf(a,'machine')[0x0];if(b===undefined)return undefined;const c=b['params']['nodes'];if(!Array['isArray'](c))return{'nodes':[],'edges':[],'terminals':[],'optionalNodes':[],'forwardGuardRefs':[]};const d=[],e=[],f=[],h=[];for(const k of c){if(typeof k!=='object'||k===null)continue;const l=k,m=typeof l['name']==='string'?l['name']:undefined;if(m===undefined)continue;d['push'](m);if(l['optional']===!![])f['push'](m);const n=Array['isArray'](l['pairs'])?l['pairs']:[];for(const o of n){const q=o,r=q?.['prev_node'];if(typeof r==='string')e['push']({'prev':r,'next':m});const s=Array['isArray'](q?.['forwards'])?q['forwards']:[];for(const t of s){const u=t?.['guard'];if(isRef(u))h['push'](u['$ref']);}}}const i=b['params']['pairs'];if(Array['isArray'](i))for(const v of i){const w=v;typeof w?.['prev_node']==='string'&&typeof w?.['next_node']==='string'&&e['push']({'prev':w['prev_node'],'next':w['next_node']});}const j=new Set(e['map'](x=>x['prev'])['filter'](x=>x!==''));return{'nodes':d,'edges':e,'terminals':d['filter'](x=>!j['has'](x)),'optionalNodes':f,'forwardGuardRefs':h};}function pathCountCap2(a,b){const c=new Map();for(const g of a){const h=c['get'](g['prev'])??[];h['push'](g['next']),c['set'](g['prev'],h);}let d=0x0;const f=(i,j)=>{if(d>=0x2)return;if(i===b){d+=0x1;return;}if(j['has'](i))return;const k=new Set(j)['add'](i);for(const l of c['get'](i)??[])f(l,k);};for(const i of c['get']('')??[])f(i,new Set());return d;}const WRITE_ONLY_ENFORCEMENT_SOURCES=[{'object':'service','param':'customer_required','coverQuery':'order.required_info','extract':a=>Array['isArray'](a['params']['customer_required'])&&a['params']['customer_required']['length']>0x0},{'object':'service','param':'sales[].wip','coverQuery':'service.sale.wip','extract':a=>Array['isArray'](a['params']['sales'])&&a['params']['sales']['some'](b=>typeof b==='object'&&b!==null&&typeof b['wip']==='string'&&b['wip']['length']>0x0)}],PROSE_UNIT_MS={'minute':0xea60,'hour':0x36ee80,'hrs':0x36ee80,'hr':0x36ee80,'h':0x36ee80,'day':0x5265c00,'week':0x240c8400},PROSE_DURATION_RE=/(\d+)\s*[-\s]?\s*(minute|hour|hrs|hr|h|day|week)s?\b/gi,WINDOW_CONTEXT_RE=/review|accept|cancel|refund|return|window|claim|bounty|escrow|release|revision|dispute/i;function isPlausibleMsDuration(a){return Number['isFinite'](a)&&a>=0xea60&&a%0x3e8===0x0&&a<=0xa*0x16d*0x5265c00;}function formatMs(a){const b=a/0x5265c00;if(Number['isInteger'](b)&&b>=0x2)return b+'\x20days';const c=a/0x36ee80;if(Number['isInteger'](c)&&c>=0x2)return c+'\x20hours';return a/0xea60+'\x20minutes';}export function extractProseWindowPromises(a){const b=[];for(const c of a['matchAll'](PROSE_DURATION_RE)){const d=Number(c[0x1])*(PROSE_UNIT_MS[c[0x2]['toLowerCase']()]??NaN);if(!Number['isFinite'](d)||d<=0x0||c['index']===undefined)continue;const e=Math['max'](0x0,c['index']-0x50),f=Math['min'](a['length'],c['index']+c[0x0]['length']+0x50);if(!WINDOW_CONTEXT_RE['test'](a['slice'](e,f)))continue;b['push']({'ms':d,'quote':c[0x0]});}return b;}const UNANCHORED_RESTART_RE=/\b(?:restart|reset|renew|start(?:s)? again|begin(?:s)? again)[^.]{0,60}\b(?:window|timer|clock|period)\b|\b(?:window|timer|clock|period)\b[^.]{0,60}\b(?:restart|reset|renew)s?\b/i;function collectEnforcedWindowMs(a){const b=new Set();for(const c of createsOf(a,'guard')){const d=Array['isArray'](c['params']['table'])?c['params']['table']:[];for(const e of d){const f=e;if(f['b_submission']===!![]||f['value_type']!=='U64')continue;const g=f['value'],h=typeof g==='number'?g:typeof g==='string'&&g!==''&&!Number['isNaN'](Number(g))?Number(g):NaN;if(isPlausibleMsDuration(h))b['add'](h);}}return b;}export function planFacts(a){const b=new Map(createsOf(a,'guard')['map'](Y=>[Y['id'],guardProjection(Y)])),c=allocatorRows(a),d=machineProjection(a),e=createsOf(a,'service')['length']>0x0,f=createsOf(a,'repository')['length']>0x0,h=a['steps']['some'](Y=>{if(!(Y['op']==='create'&&Y['object']==='service'||Y['op']==='configure'&&Y['method']==='sales'))return![];const Z=Y['params']['sales'];return Array['isArray'](Z)&&Z['length']>0x0;}),i=new Set();for(const Y of c){const Z=Y['guardStep']===undefined?undefined:b['get'](Y['guardStep']);for(const a0 of Z?.['acceptedNodes']??[])i['add'](a0);}const j=new Set(d?.['optionalNodes']??[]),k=(d?.['terminals']??[])['filter'](a1=>!j['has'](a1)),l=k['find'](a1=>!i['has'](a1)),o=a['pending_guards']??[],q=o['filter'](a1=>a1['site']==='allocator')['length'],u=o['filter'](a1=>a1['site']==='allocator'||a1['site']==='machine_edge'),w=o['filter'](a1=>a1['site']==='service_buy'),x=u[0x0]?.['key'],y=w[0x0]?.['key'],z=d?.['nodes']['find'](a1=>/return/i['test'](a1)),A=a['steps']['some'](a1=>{if(a1['op']==='configure'&&a1['method']==='arbitrations'){const a2=a1['params']['objects'];return Array['isArray'](a2)&&a2['length']>0x0;}if(a1['op']==='create'&&a1['object']==='service'){const a3=a1['params']['arbitrations'];return Array['isArray'](a3)&&a3['length']>0x0;}return![];});let B,C=![];for(const a1 of a['steps']){if(a1['op']==='configure'&&a1['method']==='compensation_fund_add'){C=!![];const a2=numericAmount(a1['params']['balance']);if(a2!==undefined)B=(B??0x0)+a2;}}let D;const E=a3=>{if(!Array['isArray'](a3))return;for(const a4 of a3){const a5=numericAmount(a4?.['price']);if(a5!==undefined&&a5>0x0)D=Math['max'](D??0x0,a5);}};for(const a3 of a['steps']){if(a3['op']==='create'&&a3['object']==='service')E(a3['params']['sales']);if(a3['op']==='configure'&&a3['method']==='sales')E(a3['params']['sales']);}const F=B!==undefined&&D!==undefined,G=[];for(const a4 of a['steps']){const a5=a4['op']==='create'&&a4['object']==='service',a6=a4['op']==='configure'&&a4['method']==='sales';if(!a5&&!a6)continue;const a7=a4['params'];if(typeof a7['description']==='string')G['push'](a7['description']);if(!Array['isArray'](a7['sales']))continue;for(const a8 of a7['sales']){if(typeof a8!=='object'||a8===null)continue;for(const a9 of Object['values'](a8)){if(typeof a9==='string')G['push'](a9);}}}const H=G['flatMap'](aa=>extractProseWindowPromises(aa)),I=collectEnforcedWindowMs(a),J=H['filter'](aa=>!I['has'](aa['ms'])),K=[];for(const aa of G){const ab=UNANCHORED_RESTART_RE['exec'](aa);if(ab)K['push'](ab[0x0]);}const L=c['filter'](ac=>ac['track']==='refund'),M=L['map'](ac=>ac['guardStep']===undefined?undefined:b['get'](ac['guardStep']))['find'](ac=>ac!==undefined&&!ac['queries']['some'](ad=>ad['startsWith']('order.claimed_by')))?.['stepId'];let N,O=![];for(const ac of b['values']()){if(ac['queries']['some'](isPathDependentTimeQuery)){N??=ac['stepId'];if(d!==undefined)for(const ad of ac['acceptedNodes']){if(pathCountCap2(d['edges'],ad)>=0x2){O=!![],N=ac['stepId'];break;}}}if(O)break;}const P=[...b['values']()]['flatMap'](ae=>ae['queries']);let Q;for(const ae of WRITE_ONLY_ENFORCEMENT_SOURCES){for(const af of createsOf(a,ae['object'])){if(ae['extract'](af)&&!P['some'](ag=>ag['startsWith'](ae['coverQuery']))){Q=ae['param'];break;}}if(Q!==undefined)break;}const R=new Set();for(const ag of a['steps']){if(ag['op']==='create'&&ag['object']==='guard')continue;const ah=refsOf(ag['op']==='publish'?ag['target']:ag['params']);for(const ai of ah)R['add'](ai);if(ag['op']==='configure'){for(const aj of refsOf(ag['target']))R['add'](aj);}}const S=[...b['keys']()]['find'](ak=>!R['has'](ak)),T=[...b['values']()]['find'](ak=>!f&&ak['queries']['some'](al=>al['startsWith']('repository.')))?.['stepId'];let U;if(e&&d!==undefined)for(const ak of d['forwardGuardRefs']){const al=b['get'](ak);if(al===undefined)continue;const am=al['table']['some'](an=>an['identifier']===0xfe&&an['b_submission']===!![]);if(!am){U=ak;break;}}let V;for(const an of c){if(an['guardStep']===undefined||an['identifierLegs']['length']===0x0)continue;const ao=b['get'](an['guardStep']);if(ao===undefined)continue;for(const ap of an['identifierLegs']){const aq=ao['table']['find'](ar=>ar['identifier']===ap);if(aq===undefined||aq['b_submission']!==!![]||aq['value_type']!=='Address'){V='slot\x20'+ap+'\x20of\x20guard\x20\x27'+an['guardStep']+'\x27';break;}}if(V!==undefined)break;}const W=new Set();for(const ar of createsOf(a,'repository')){const as=ar['params']['policies'];if(!Array['isArray'](as))continue;for(const at of as){const au=at?.['name'];if(typeof au==='string')W['add'](au);}}const X=[];if(W['size']>0x0)for(const av of createsOf(a,'guard')){const aw=Array['isArray'](av['params']['table'])?av['params']['table']:[];for(const ax of collectRepoWhereQueries(av['params']['root']??av['params']['logic'])){const ay=staticStringOperand(ax['key'],aw);if(ay===undefined)continue;if(!isPlanLocalObjectOperand(ax['object'],aw))continue;!W['has'](ay)&&X['push']('\x27'+ay+'\x27\x20in\x20guard\x20\x27'+av['id']+'\x27');}}return{'has_service':e,'has_machine':d!==undefined,'has_repository':f,'sales_step_present':h,'allocator_row_count':c['length'],'refund_row_count':L['length'],'terminal_count':k['length'],'terminal_nodes_display':k['join'](',\x20'),'pending_allocator_guard_count':q,'pending_guard_total':o['length'],...l===undefined?{}:{'first_uncovered_terminal':l},...M===undefined?{}:{'first_refund_guard_missing_claimed_by':M},...N===undefined?{}:{'first_path_dependent_anchor':N},'path_sensitive':O,...Q===undefined?{}:{'first_write_only_unenforced_field':Q},...S===undefined?{}:{'first_orphan_guard':S},...T===undefined?{}:{'first_repo_query_without_repository':T},...U===undefined?{}:{'first_edge_guard_missing_254':U},...V===undefined?{}:{'first_alloc_slot_missing':V},...x===undefined?{}:{'first_pending_fund_guard':x,'pending_fund_guard_count':u['length'],'pending_fund_guard_keys_display':u['map'](az=>az['key'])['join'](',\x20')},...y===undefined?{}:{'first_pending_buy_guard':y,'pending_buy_guard_count':w['length'],'pending_buy_guard_keys_display':w['map'](az=>az['key'])['join'](',\x20')},'has_return_rail':z!==undefined,...z===undefined?{}:{'return_rail_node':z},'has_arbitration_binding':A,'fund_topup_present':C,...B===undefined?{}:{'fund_topup_amount':B},...F?{'fund_ceiling_breach':B<MAX_INDEMNITY_MULTIPLE*D,'fund_ceiling_basis':MAX_INDEMNITY_MULTIPLE+'x\x20the\x20highest\x20SKU\x20price'}:{},'fund_ceiling_unverifiable':C&&!F,...H['length']>0x0?{'prose_window_promise_count':H['length'],'enforced_window_ms_display':[...I]['sort']((az,aA)=>az-aA)['map'](formatMs)['join'](',\x20')||'none',...J['length']>0x0?{'prose_time_mismatch_count':J['length'],'first_prose_time_mismatch':J[0x0]['quote'],'prose_time_mismatch_display':J['map'](az=>az['quote'])['join'](';\x20')}:{}}:{},...K['length']>0x0?{'unanchored_window_promise_count':K['length'],'first_unanchored_window_promise':K[0x0]}:{},...W['size']>0x0?{'repo_policy_keys_display':[...W]['join'](',\x20'),...X['length']>0x0?{'repo_gate_key_unbacked_count':X['length'],'first_repo_gate_key_unbacked':X[0x0],'repo_gate_key_unbacked_display':X['join'](',\x20')}:{}}:{}};}function planRuleBook(){const a=getJudgmentDoc()['rules']['domains']['plan'];if(!a)throw new Error('factory\x20rule\x20pack\x20\x27plan\x27\x20missing\x20—\x20broken\x20installation');return a['rules'];}export function auditPlan(a){const b=validatePlan(a),c=planFacts(a),{findings:d}=evaluateRuleBook(planRuleBook(),c),e=b['length']>0x0||d['some'](g=>g['level']==='critical'||g['level']==='high');return{'issues':b,'findings':d,'facts':c,'blocking':e};}
1
+ import{getJudgmentDoc}from'../config/judgment.js';import{evaluateRuleBook}from'../config/rule-engine.js';import{isPathDependentTimeQuery}from'../chain-semantics/index.js';import{MAX_INDEMNITY_MULTIPLE,TASK_BINDING_SLOT}from'../knowledge/onchain-constants.js';import{numericAmount}from'../knowledge/audit-rules.js';import{createsOf,isRef,refsOf,validatePlan}from'./plan.js';function collectQueries(a,b=[]){if(Array['isArray'](a)){for(const c of a)collectQueries(c,b);}else{if(typeof a==='object'&&a!==null){const d=a;d['type']==='query'&&typeof d['query']==='string'&&b['push']({'query':d['query']});for(const e of Object['values'](d))collectQueries(e,b);}}return b;}function acceptedProgressNodes(a,b){const c=new Map();if(Array['isArray'](b))for(const g of b){if(typeof g==='object'&&g!==null){const h=g;typeof h['identifier']==='number'&&typeof h['value']==='string'&&c['set'](h['identifier'],h['value']);}}const d=i=>{if(typeof i!=='object'||i===null)return undefined;const j=i;if(j['type']==='constant'&&typeof j['value']==='string')return j['value'];if(j['type']==='identifier'&&typeof j['identifier']==='number')return c['get'](j['identifier']);return undefined;},e=[],f=i=>{if(Array['isArray'](i)){for(const n of i)f(n);return;}if(typeof i!=='object'||i===null)return;const j=i,k=Array['isArray'](j['nodes'])?j['nodes']:undefined,l=k?.[0x0]??j['left'],m=k?.[0x1]??j['right'];if(typeof j['type']==='string'&&j['type']['startsWith']('logic')&&typeof l==='object'&&l!==null&&l['type']==='query'&&l['query']==='progress.current'){const o=d(m);if(o!==undefined)e['push'](o);}for(const p of Object['values'](j))f(p);};return f(a),e;}const REPO_WHERE_QUERY_TYPES=new Set(['query_repository_data_count_where','query_repository_data_sum_where','query_repository_data_find_where']);function collectRepoWhereQueries(a,b=[]){if(Array['isArray'](a)){for(const c of a)collectRepoWhereQueries(c,b);}else{if(typeof a==='object'&&a!==null){const d=a;typeof d['type']==='string'&&REPO_WHERE_QUERY_TYPES['has'](d['type'])&&b['push'](d);for(const e of Object['values'](d))collectRepoWhereQueries(e,b);}}return b;}function isRepoDataHasRef(a){if(a['type']==='query'){const c=a['query'];if(typeof c==='string'&&c['trim']()['toLowerCase']()==='repository.data\x20has')return!![];if(c===0x48e||c==='1166')return!![];}const b=a['type'];return typeof b==='string'&&b['toLowerCase']()==='query_repository_data_has';}function subtreeRefsRepoDataHas(a){if(Array['isArray'](a))return a['some'](subtreeRefsRepoDataHas);if(typeof a!=='object'||a===null)return![];const b=a;if(isRepoDataHasRef(b))return!![];return Object['values'](b)['some'](subtreeRefsRepoDataHas);}function rootNegatesRepoDataHas(a){if(Array['isArray'](a))return a['some'](rootNegatesRepoDataHas);if(typeof a!=='object'||a===null)return![];const b=a;if(b['type']==='logic_not'&&subtreeRefsRepoDataHas(b['node']))return!![];return Object['values'](b)['some'](rootNegatesRepoDataHas);}function staticStringOperand(a,b){if(typeof a!=='object'||a===null)return undefined;const c=a;if(typeof c['identifier']==='number'){const d=b['find'](e=>typeof e==='object'&&e!==null&&e['identifier']===c['identifier']);if(d===undefined||d['b_submission']===!![])return undefined;return typeof d['value']==='string'?d['value']:undefined;}return typeof c['value']==='string'?c['value']:undefined;}function isPlanLocalObjectOperand(a,b){if(typeof a!=='object'||a===null)return![];const c=a;if(typeof c['identifier']!=='number')return![];const d=b['find'](f=>typeof f==='object'&&f!==null&&f['identifier']===c['identifier']);if(d===undefined||d['b_submission']===!![])return![];const e=d['value'];if(typeof e==='object'&&e!==null)return!![];return typeof e==='string'&&e['startsWith']('$');}function guardProjection(a){const b=a['params']['root']??a['params']['logic'],c=collectQueries(b)['map'](d=>d['query']);return{'stepId':a['id'],'queries':c,'acceptedNodes':acceptedProgressNodes(b,a['params']['table']),'table':Array['isArray'](a['params']['table'])?a['params']['table']:[]};}function allocatorRows(a){const b=[],c=d=>{if(typeof d==='object'&&d!==null&&!Array['isArray'](d)){const e=d;if(Array['isArray'](e['allocators']))d=e['allocators'];}if(!Array['isArray'](d))return;for(const f of d){if(typeof f!=='object'||f===null)continue;const g=f,h=g['guard'],i=g['guard_key'],j=Array['isArray'](g['sharing'])?g['sharing']:[],k=j['map'](l=>typeof l==='object'&&l!==null?l['who']:undefined)['map'](l=>typeof l==='object'&&l!==null?l['GuardIdentifier']:undefined)['filter'](l=>typeof l==='number');b['push']({'track':typeof g['track']==='string'?g['track']:'settlement','guardStep':isRef(h)?h['$ref']:undefined,'guardKey':typeof i==='string'?i:undefined,'identifierLegs':k});}};for(const d of a['steps']){if(d['op']==='create'&&d['object']==='service')c(d['params']['order_allocators']);if(d['op']==='configure'&&d['method']==='order_allocators')c(d['params']['allocators']);}return b;}function machineProjection(a){const b=createsOf(a,'machine')[0x0];if(b===undefined)return undefined;const c=b['params']['nodes'];if(!Array['isArray'](c))return{'nodes':[],'edges':[],'terminals':[],'optionalNodes':[],'forwardGuardRefs':[]};const d=[],e=[],f=[],h=[];for(const k of c){if(typeof k!=='object'||k===null)continue;const l=k,m=typeof l['name']==='string'?l['name']:undefined;if(m===undefined)continue;d['push'](m);if(l['optional']===!![])f['push'](m);const n=Array['isArray'](l['pairs'])?l['pairs']:[];for(const o of n){const q=o,r=q?.['prev_node'];if(typeof r==='string')e['push']({'prev':r,'next':m});const s=Array['isArray'](q?.['forwards'])?q['forwards']:[];for(const t of s){const u=t?.['guard'];if(isRef(u))h['push'](u['$ref']);}}}const i=b['params']['pairs'];if(Array['isArray'](i))for(const v of i){const w=v;typeof w?.['prev_node']==='string'&&typeof w?.['next_node']==='string'&&e['push']({'prev':w['prev_node'],'next':w['next_node']});}const j=new Set(e['map'](x=>x['prev'])['filter'](x=>x!==''));return{'nodes':d,'edges':e,'terminals':d['filter'](x=>!j['has'](x)),'optionalNodes':f,'forwardGuardRefs':h};}function pathCountCap2(a,b){const c=new Map();for(const g of a){const h=c['get'](g['prev'])??[];h['push'](g['next']),c['set'](g['prev'],h);}let d=0x0;const f=(i,j)=>{if(d>=0x2)return;if(i===b){d+=0x1;return;}if(j['has'](i))return;const k=new Set(j)['add'](i);for(const l of c['get'](i)??[])f(l,k);};for(const i of c['get']('')??[])f(i,new Set());return d;}const WRITE_ONLY_ENFORCEMENT_SOURCES=[{'object':'service','param':'customer_required','coverQuery':'order.required_info','extract':a=>Array['isArray'](a['params']['customer_required'])&&a['params']['customer_required']['length']>0x0},{'object':'service','param':'sales[].wip','coverQuery':'service.sale.wip','extract':a=>Array['isArray'](a['params']['sales'])&&a['params']['sales']['some'](b=>typeof b==='object'&&b!==null&&typeof b['wip']==='string'&&b['wip']['length']>0x0)}],PROSE_UNIT_MS={'minute':0xea60,'hour':0x36ee80,'hrs':0x36ee80,'hr':0x36ee80,'h':0x36ee80,'day':0x5265c00,'week':0x240c8400},PROSE_DURATION_RE=/(\d+)\s*[-\s]?\s*(minute|hour|hrs|hr|h|day|week)s?\b/gi,WINDOW_CONTEXT_RE=/review|accept|cancel|refund|return|window|claim|bounty|escrow|release|revision|dispute/i;function isPlausibleMsDuration(a){return Number['isFinite'](a)&&a>=0xea60&&a%0x3e8===0x0&&a<=0xa*0x16d*0x5265c00;}function formatMs(a){const b=a/0x5265c00;if(Number['isInteger'](b)&&b>=0x2)return b+'\x20days';const c=a/0x36ee80;if(Number['isInteger'](c)&&c>=0x2)return c+'\x20hours';return a/0xea60+'\x20minutes';}export function extractProseWindowPromises(a){const b=[];for(const c of a['matchAll'](PROSE_DURATION_RE)){const d=Number(c[0x1])*(PROSE_UNIT_MS[c[0x2]['toLowerCase']()]??NaN);if(!Number['isFinite'](d)||d<=0x0||c['index']===undefined)continue;const e=Math['max'](0x0,c['index']-0x50),f=Math['min'](a['length'],c['index']+c[0x0]['length']+0x50);if(!WINDOW_CONTEXT_RE['test'](a['slice'](e,f)))continue;b['push']({'ms':d,'quote':c[0x0]});}return b;}const UNANCHORED_RESTART_RE=/\b(?:restart|reset|renew|start(?:s)? again|begin(?:s)? again)[^.]{0,60}\b(?:window|timer|clock|period)\b|\b(?:window|timer|clock|period)\b[^.]{0,60}\b(?:restart|reset|renew)s?\b/i;function collectEnforcedWindowMs(a){const b=new Set();for(const c of createsOf(a,'guard')){const d=Array['isArray'](c['params']['table'])?c['params']['table']:[];for(const e of d){const f=e;if(f['b_submission']===!![]||f['value_type']!=='U64')continue;const g=f['value'],h=typeof g==='number'?g:typeof g==='string'&&g!==''&&!Number['isNaN'](Number(g))?Number(g):NaN;if(isPlausibleMsDuration(h))b['add'](h);}}return b;}export function planFacts(a){const b=new Map(createsOf(a,'guard')['map'](a3=>[a3['id'],guardProjection(a3)])),c=allocatorRows(a),d=machineProjection(a),e=createsOf(a,'service')['length']>0x0,f=createsOf(a,'repository')['length']>0x0,h=a['steps']['some'](a3=>{if(!(a3['op']==='create'&&a3['object']==='service'||a3['op']==='configure'&&a3['method']==='sales'))return![];const a4=a3['params']['sales'];return Array['isArray'](a4)&&a4['length']>0x0;}),i=new Set();for(const a3 of c){const a4=a3['guardStep']===undefined?undefined:b['get'](a3['guardStep']);for(const a5 of a4?.['acceptedNodes']??[])i['add'](a5);}const j=new Set(d?.['optionalNodes']??[]),k=(d?.['terminals']??[])['filter'](a6=>!j['has'](a6)),l=k['find'](a6=>!i['has'](a6)),o=a['pending_guards']??[],q=o['filter'](a6=>a6['site']==='allocator')['length'],u=o['filter'](a6=>a6['site']==='allocator'||a6['site']==='machine_edge'),w=o['filter'](a6=>a6['site']==='service_buy'),x=u[0x0]?.['key'],y=w[0x0]?.['key'],z=d?.['nodes']['find'](a6=>/return/i['test'](a6)),A=a['steps']['some'](a6=>{if(a6['op']==='configure'&&a6['method']==='arbitrations'){const a7=a6['params']['objects'];return Array['isArray'](a7)&&a7['length']>0x0;}if(a6['op']==='create'&&a6['object']==='service'){const a8=a6['params']['arbitrations'];return Array['isArray'](a8)&&a8['length']>0x0;}return![];});let B,C=![];for(const a6 of a['steps']){if(a6['op']==='configure'&&a6['method']==='compensation_fund_add'){C=!![];const a7=numericAmount(a6['params']['balance']);if(a7!==undefined)B=(B??0x0)+a7;}}let D;const E=a8=>{if(!Array['isArray'](a8))return;for(const a9 of a8){const aa=numericAmount(a9?.['price']);if(aa!==undefined&&aa>0x0)D=Math['max'](D??0x0,aa);}};for(const a8 of a['steps']){if(a8['op']==='create'&&a8['object']==='service')E(a8['params']['sales']);if(a8['op']==='configure'&&a8['method']==='sales')E(a8['params']['sales']);}const F=B!==undefined&&D!==undefined,G=[];for(const a9 of a['steps']){const aa=a9['op']==='create'&&a9['object']==='service',ab=a9['op']==='configure'&&a9['method']==='sales';if(!aa&&!ab)continue;const ac=a9['params'];if(typeof ac['description']==='string')G['push'](ac['description']);if(!Array['isArray'](ac['sales']))continue;for(const ad of ac['sales']){if(typeof ad!=='object'||ad===null)continue;for(const ae of Object['values'](ad)){if(typeof ae==='string')G['push'](ae);}}}const H=G['flatMap'](af=>extractProseWindowPromises(af)),I=collectEnforcedWindowMs(a),J=H['filter'](af=>!I['has'](af['ms'])),K=[];for(const af of G){const ag=UNANCHORED_RESTART_RE['exec'](af);if(ag)K['push'](ag[0x0]);}const L=c['filter'](ah=>ah['track']==='refund'),M=L['map'](ah=>ah['guardStep']===undefined?undefined:b['get'](ah['guardStep']))['find'](ah=>ah!==undefined&&!ah['queries']['some'](ai=>ai['startsWith']('order.claimed_by')))?.['stepId'];let N,O=![];for(const ah of b['values']()){if(ah['queries']['some'](isPathDependentTimeQuery)){N??=ah['stepId'];if(d!==undefined)for(const ai of ah['acceptedNodes']){if(pathCountCap2(d['edges'],ai)>=0x2){O=!![],N=ah['stepId'];break;}}}if(O)break;}const P=[...b['values']()]['flatMap'](aj=>aj['queries']);let Q;for(const aj of WRITE_ONLY_ENFORCEMENT_SOURCES){for(const ak of createsOf(a,aj['object'])){if(aj['extract'](ak)&&!P['some'](al=>al['startsWith'](aj['coverQuery']))){Q=aj['param'];break;}}if(Q!==undefined)break;}const R=new Set();for(const al of a['steps']){if(al['op']==='create'&&al['object']==='guard')continue;const am=refsOf(al['op']==='publish'?al['target']:al['params']);for(const an of am)R['add'](an);if(al['op']==='configure'){for(const ao of refsOf(al['target']))R['add'](ao);}}const S=[...b['keys']()]['find'](ap=>!R['has'](ap)),T=[...b['values']()]['find'](ap=>!f&&ap['queries']['some'](aq=>aq['startsWith']('repository.')))?.['stepId'];let U;if(e&&d!==undefined)for(const ap of d['forwardGuardRefs']){const aq=b['get'](ap);if(aq===undefined)continue;const ar=aq['table']['some'](as=>as['identifier']===TASK_BINDING_SLOT&&as['b_submission']===!![]);if(!ar){U=ap;break;}}let V;for(const as of c){if(as['guardStep']===undefined||as['identifierLegs']['length']===0x0)continue;const at=b['get'](as['guardStep']);if(at===undefined)continue;for(const au of as['identifierLegs']){const av=at['table']['find'](aw=>aw['identifier']===au);if(av===undefined||av['b_submission']!==!![]||av['value_type']!=='Address'){V='slot\x20'+au+'\x20of\x20guard\x20\x27'+as['guardStep']+'\x27';break;}}if(V!==undefined)break;}const W=new Set();for(const aw of createsOf(a,'repository')){const ax=aw['params']['policies'];if(!Array['isArray'](ax))continue;for(const ay of ax){const az=ay?.['name'];if(typeof az==='string')W['add'](az);}}const X=[];if(W['size']>0x0)for(const aA of createsOf(a,'guard')){const aB=Array['isArray'](aA['params']['table'])?aA['params']['table']:[];for(const aC of collectRepoWhereQueries(aA['params']['root']??aA['params']['logic'])){const aD=staticStringOperand(aC['key'],aB);if(aD===undefined)continue;if(!isPlanLocalObjectOperand(aC['object'],aB))continue;!W['has'](aD)&&X['push']('\x27'+aD+'\x27\x20in\x20guard\x20\x27'+aA['id']+'\x27');}}const Y=new Set();for(const aE of createsOf(a,'repository')){const aF=aE['params']['policies'];if(!Array['isArray'](aF))continue;for(const aG of aF){const aH=aG?.['write_guard'];if(!Array['isArray'](aH))continue;for(const aI of aH){const aJ=aI?.['guard'],aK=isRef(aJ)?aJ['$ref']:aJ;if(typeof aK==='string')Y['add'](aK);}}}let Z,a0=0x0;for(const aL of createsOf(a,'guard')){if(!Y['has'](aL['id']))continue;rootNegatesRepoDataHas(aL['params']['root']??aL['params']['logic'])&&(a0++,Z??=aL['id']);}let a1,a2=0x0;for(const aM of createsOf(a,'service')){const aN=aM['params']['customer_required'];if(!Array['isArray'](aN)||aN['length']===0x0)continue;aM['params']['buy_guard']===undefined&&(a2++,a1??=aM['id']);}return{'has_service':e,'has_machine':d!==undefined,'has_repository':f,'sales_step_present':h,'allocator_row_count':c['length'],'refund_row_count':L['length'],'terminal_count':k['length'],'terminal_nodes_display':k['join'](',\x20'),'pending_allocator_guard_count':q,'pending_guard_total':o['length'],...l===undefined?{}:{'first_uncovered_terminal':l},...M===undefined?{}:{'first_refund_guard_missing_claimed_by':M},...N===undefined?{}:{'first_path_dependent_anchor':N},'path_sensitive':O,...Q===undefined?{}:{'first_write_only_unenforced_field':Q},...S===undefined?{}:{'first_orphan_guard':S},...T===undefined?{}:{'first_repo_query_without_repository':T},'repo_write_once_guard_count':a0,...Z===undefined?{}:{'first_repo_write_once_guard':Z},'customer_required_unbacked_count':a2,...a1===undefined?{}:{'first_customer_required_unbacked':a1},...U===undefined?{}:{'first_edge_guard_missing_254':U},...V===undefined?{}:{'first_alloc_slot_missing':V},...x===undefined?{}:{'first_pending_fund_guard':x,'pending_fund_guard_count':u['length'],'pending_fund_guard_keys_display':u['map'](aO=>aO['key'])['join'](',\x20')},...y===undefined?{}:{'first_pending_buy_guard':y,'pending_buy_guard_count':w['length'],'pending_buy_guard_keys_display':w['map'](aO=>aO['key'])['join'](',\x20')},'has_return_rail':z!==undefined,...z===undefined?{}:{'return_rail_node':z},'has_arbitration_binding':A,'fund_topup_present':C,...B===undefined?{}:{'fund_topup_amount':B},...F?{'fund_ceiling_breach':B<MAX_INDEMNITY_MULTIPLE*D,'fund_ceiling_basis':MAX_INDEMNITY_MULTIPLE+'x\x20the\x20highest\x20SKU\x20price'}:{},'fund_ceiling_unverifiable':C&&!F,...H['length']>0x0?{'prose_window_promise_count':H['length'],'enforced_window_ms_display':[...I]['sort']((aO,aP)=>aO-aP)['map'](formatMs)['join'](',\x20')||'none',...J['length']>0x0?{'prose_time_mismatch_count':J['length'],'first_prose_time_mismatch':J[0x0]['quote'],'prose_time_mismatch_display':J['map'](aO=>aO['quote'])['join'](';\x20')}:{}}:{},...K['length']>0x0?{'unanchored_window_promise_count':K['length'],'first_unanchored_window_promise':K[0x0]}:{},...W['size']>0x0?{'repo_policy_keys_display':[...W]['join'](',\x20'),...X['length']>0x0?{'repo_gate_key_unbacked_count':X['length'],'first_repo_gate_key_unbacked':X[0x0],'repo_gate_key_unbacked_display':X['join'](',\x20')}:{}}:{}};}function planRuleBook(){const a=getJudgmentDoc()['rules']['domains']['plan'];if(!a)throw new Error('factory\x20rule\x20pack\x20\x27plan\x27\x20missing\x20—\x20broken\x20installation');return a['rules'];}export function auditPlan(a){const b=validatePlan(a),c=planFacts(a),{findings:d}=evaluateRuleBook(planRuleBook(),c),e=b['length']>0x0||d['some'](g=>g['level']==='critical'||g['level']==='high');return{'issues':b,'findings':d,'facts':c,'blocking':e};}
@@ -13,7 +13,11 @@ export interface GuardSpec {
13
13
  description?: string;
14
14
  id_from?: string;
15
15
  value_type?: string;
16
+ write_once?: boolean;
17
+ id_from_submission?: number;
18
+ data_from_submission?: number;
16
19
  };
20
+ params?: Record<string, unknown>;
17
21
  step_id?: string;
18
22
  }
19
23
  export type GuardResolution = {
@@ -28,8 +32,7 @@ export type GuardResolution = {
28
32
  } | {
29
33
  kind: "omit";
30
34
  };
31
- export type CompileBlockerCode = "MACHINE_EDGES_MISSING" | "EDGE_UNKNOWN_PREV" | "GUARD_CYCLE" | "GUARD_KEY_UNKNOWN" | "GUARD_TEMPLATE_PARAMS" | "GUARD_RESOLUTION_UNKNOWN" | "GUARD_OMIT_UNSUPPORTED" | "GUARD_SLOT_UNKNOWN" | "GUARD_FOREIGN_SERVICE" | "ALLOCATOR_VALUE_MISSING" | "ALLOCATOR_FIX_UNSUPPORTED" | "REVIEW_NODE_MISSING" | "REVIEW_REWARD_GUARD_MISSING" | "REVIEW_REWARD_UNFUNDED" | "REVIEW_REWARD_UNARMED" | "AFTER_SALES_RAIL_MISSING" | "ACCEPTANCE_JUDGE_NOT_INDEPENDENT" | "ACCEPTANCE_REVISION_UNBOUNDED" | "INSTALLMENT_FUNDING_UNGATED" | "INSTALLMENT_DEPOSIT_STRANDED" | "REPO_GUARD_POLICY_MISSING" | "RAIL_TERMINAL_UNCOVERED" | "RAIL_AWARD_EXIT_MISSING" | "RAIL_POLARITY_COLLISION" | "RAIL_DEAD_LITERAL" | "FORWARD_GUARD_PINNED_TO_NON_PREV" | "FORWARD_GUARD_IDENTITY_PERM_CONFLICT" | "PAIR_THRESHOLD_UNREACHABLE" | "PAIR_THRESHOLD_SINGLE_OPERATOR" | "AFFILIATE_RAIL_MISSING" | "AFFILIATE_CLAWBACK_UNDISCLOSED" | "CROWDFUNDING_THRESHOLD_GATE_MISSING" | "CROWDFUNDING_AGGREGATE_UNBOUND" | "CROWDFUNDING_DISCLOSURE_MISSING";
32
- export declare const TASK_BINDING_SLOT = 254;
35
+ export type CompileBlockerCode = "MACHINE_EDGES_MISSING" | "EDGE_UNKNOWN_PREV" | "GUARD_CYCLE" | "GUARD_KEY_UNKNOWN" | "GUARD_TEMPLATE_PARAMS" | "GUARD_PATTERN_UNKNOWN" | "GUARD_RESOLUTION_UNKNOWN" | "GUARD_OMIT_UNSUPPORTED" | "GUARD_SLOT_UNKNOWN" | "GUARD_FOREIGN_SERVICE" | "ALLOCATOR_VALUE_MISSING" | "ALLOCATOR_FIX_UNSUPPORTED" | "REVIEW_NODE_MISSING" | "REVIEW_REWARD_GUARD_MISSING" | "REVIEW_REWARD_UNFUNDED" | "REVIEW_REWARD_UNARMED" | "AFTER_SALES_RAIL_MISSING" | "ACCEPTANCE_JUDGE_NOT_INDEPENDENT" | "ACCEPTANCE_REVISION_UNBOUNDED" | "INSTALLMENT_FUNDING_UNGATED" | "INSTALLMENT_DEPOSIT_STRANDED" | "REPO_GUARD_POLICY_MISSING" | "REPO_GUARD_SUBMISSION_ID_FORBIDDEN" | "REPO_GUARD_SUBMISSION_SLOT_UNKNOWN" | "RAIL_TERMINAL_UNCOVERED" | "RAIL_AWARD_EXIT_MISSING" | "RAIL_POLARITY_COLLISION" | "RAIL_DEAD_LITERAL" | "FORWARD_GUARD_PINNED_TO_NON_PREV" | "FORWARD_GUARD_IDENTITY_PERM_CONFLICT" | "GUARD_IDENTITY_SLOT_NOT_TASKBOUND" | "PAIR_THRESHOLD_UNREACHABLE" | "PAIR_THRESHOLD_SINGLE_OPERATOR" | "AFFILIATE_RAIL_MISSING" | "AFFILIATE_CLAWBACK_UNDISCLOSED" | "CROWDFUNDING_THRESHOLD_GATE_MISSING" | "CROWDFUNDING_AGGREGATE_UNBOUND" | "CROWDFUNDING_DISCLOSURE_MISSING";
33
36
  export interface CompileBlocker {
34
37
  code: CompileBlockerCode;
35
38
  detail: string;