@wowok/agent-mcp 3.3.9 → 3.4.0
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.
- package/dist/chain-semantics/field-capability.js +1 -1
- package/dist/chain-semantics/freeze-map.js +1 -1
- package/dist/chain-semantics/fund-flow.js +1 -1
- package/dist/chain-semantics/guard-verbs.js +1 -1
- package/dist/chain-semantics/object-graph.js +1 -1
- package/dist/composition/audit.js +1 -1
- package/dist/composition/compile.d.ts +3 -2
- package/dist/composition/compile.js +1 -1
- package/dist/composition/inflight.d.ts +6 -0
- package/dist/composition/inflight.js +1 -1
- package/dist/composition/materialize.d.ts +4 -0
- package/dist/composition/materialize.js +1 -1
- package/dist/composition/param-disclosure.d.ts +61 -0
- package/dist/composition/param-disclosure.js +1 -0
- package/dist/composition/plan.d.ts +11 -1
- package/dist/composition/plan.js +1 -1
- package/dist/customer/account-events.js +1 -1
- package/dist/data/api/api.spec.js +1 -1
- package/dist/data/api/cli.js +1 -1
- package/dist/data/api/server.d.ts +1 -0
- package/dist/data/api/server.js +1 -1
- package/dist/data/projection/store.d.ts +2 -1
- package/dist/data/projection/store.js +1 -1
- package/dist/data/projection/types.d.ts +10 -0
- package/dist/data/sync/cdc.js +1 -1
- package/dist/data/sync/cdc.spec.js +1 -1
- package/dist/data/sync/store.d.ts +5 -0
- package/dist/data/sync/store.js +1 -1
- package/dist/data/sync/types.d.ts +2 -0
- package/dist/evaluation/builtins/graph-service.spec.js +1 -1
- package/dist/evaluation/engine.js +1 -1
- package/dist/evaluation/guard-scan.js +1 -1
- package/dist/experience/realtime-feedback.js +1 -1
- package/dist/extensions/business-modules.js +1 -1
- package/dist/extensions/industry-pack.js +1 -1
- package/dist/extensions/modes.js +1 -1
- package/dist/graph/onchain/expand.js +1 -1
- package/dist/graph/onchain/exposure.js +1 -1
- package/dist/harness/recover.js +1 -1
- package/dist/index.js +1 -1
- package/dist/knowledge/allocation-risk.js +1 -1
- package/dist/knowledge/allocation-templates.js +1 -1
- package/dist/knowledge/allocator-rail-verifier.js +1 -1
- package/dist/knowledge/arb-fund-facts.d.ts +1 -0
- package/dist/knowledge/arb-fund-facts.js +1 -1
- package/dist/knowledge/arbitration-ledger.js +1 -1
- package/dist/knowledge/arbitration-risk.d.ts +1 -0
- package/dist/knowledge/arbitration-risk.js +1 -1
- package/dist/knowledge/audit-rules.js +1 -1
- package/dist/knowledge/baselines/rules/allocation.json +6 -6
- package/dist/knowledge/baselines/rules/arb.json +2 -2
- package/dist/knowledge/baselines/rules/guard.json +11 -11
- package/dist/knowledge/baselines/rules/order.json +1 -1
- package/dist/knowledge/baselines/rules/plan.json +1 -1
- package/dist/knowledge/baselines/semantic-facts.js +1 -1
- package/dist/knowledge/builtin-templates.d.ts +14 -1
- package/dist/knowledge/builtin-templates.js +1 -1
- package/dist/knowledge/catalog-facts.d.ts +4 -0
- package/dist/knowledge/catalog-facts.js +1 -0
- package/dist/knowledge/commission-landing.js +1 -1
- package/dist/knowledge/component-schema.d.ts +64 -0
- package/dist/knowledge/component-schema.js +1 -0
- package/dist/knowledge/entity-recipient-guard.js +1 -1
- package/dist/knowledge/event-semantics.js +1 -1
- package/dist/knowledge/fee-param-bindings.d.ts +26 -0
- package/dist/knowledge/fee-param-bindings.js +1 -0
- package/dist/knowledge/fund-layer.js +1 -1
- package/dist/knowledge/getting-started.d.ts +2 -2
- package/dist/knowledge/getting-started.js +1 -1
- package/dist/knowledge/guard-anchor-reach.js +1 -1
- package/dist/knowledge/guard-design-patterns.js +1 -1
- package/dist/knowledge/guard-ledger.js +1 -1
- package/dist/knowledge/guard-lint.d.ts +1 -0
- package/dist/knowledge/guard-lint.js +1 -1
- package/dist/knowledge/guard-puzzle.js +1 -1
- package/dist/knowledge/guard-risk.js +1 -1
- package/dist/knowledge/guard-templates.d.ts +1 -1
- package/dist/knowledge/guard-templates.js +1 -1
- package/dist/knowledge/guard-translation.js +1 -1
- package/dist/knowledge/index.js +1 -1
- package/dist/knowledge/industry-registry.js +1 -1
- package/dist/knowledge/industry-strategy.js +1 -1
- package/dist/knowledge/jsonrpc-enum.d.ts +14 -3
- package/dist/knowledge/jsonrpc-enum.js +1 -1
- package/dist/knowledge/knob-docs.d.ts +5 -0
- package/dist/knowledge/knob-docs.js +1 -0
- package/dist/knowledge/machine-templates.js +1 -1
- package/dist/knowledge/machine-topology.js +1 -1
- package/dist/knowledge/machine-translation.js +1 -1
- package/dist/knowledge/onchain-constants.d.ts +2 -0
- package/dist/knowledge/onchain-constants.js +1 -1
- package/dist/knowledge/order-ledger.js +1 -1
- package/dist/knowledge/param-schema.d.ts +70 -0
- package/dist/knowledge/param-schema.js +1 -0
- package/dist/knowledge/param-tiers.d.ts +25 -0
- package/dist/knowledge/param-tiers.js +1 -0
- package/dist/knowledge/passport-ledger.d.ts +1 -1
- package/dist/knowledge/passport-ledger.js +1 -1
- package/dist/knowledge/pattern-resolutions.d.ts +106 -0
- package/dist/knowledge/pattern-resolutions.js +1 -0
- package/dist/knowledge/projection.spec.js +1 -1
- package/dist/knowledge/safety-rules.js +1 -1
- package/dist/knowledge/scenario-modes.d.ts +1 -0
- package/dist/knowledge/scenario-modes.js +1 -1
- package/dist/knowledge/scenario-topology.js +1 -1
- package/dist/knowledge/service-allocation-semantics.js +1 -1
- package/dist/knowledge/service-ledger.js +1 -1
- package/dist/knowledge/service-templates.js +1 -1
- package/dist/knowledge/strategy-manuals.d.ts +1 -1
- package/dist/knowledge/strategy-manuals.js +1 -1
- package/dist/knowledge/template-loader.d.ts +101 -1
- package/dist/knowledge/template-loader.js +1 -1
- package/dist/knowledge/template-nav.d.ts +7 -0
- package/dist/knowledge/template-nav.js +1 -0
- package/dist/knowledge/template-registry.js +1 -1
- package/dist/knowledge/template-scanner.d.ts +33 -0
- package/dist/knowledge/template-scanner.js +1 -1
- package/dist/knowledge/template-test-profiles.d.ts +17 -0
- package/dist/knowledge/template-test-profiles.js +1 -0
- package/dist/knowledge/template-validation.d.ts +1 -0
- package/dist/knowledge/template-validation.js +1 -1
- package/dist/knowledge/tools-reference.js +1 -1
- package/dist/knowledge/treasury-templates.js +1 -1
- package/dist/knowledge/workflow-guidance.js +1 -1
- package/dist/monitor/MonitorLoop.js +1 -1
- package/dist/participation/time-window.d.ts +37 -0
- package/dist/participation/time-window.js +1 -0
- package/dist/playbooks/service-build/business-puzzle.js +1 -1
- package/dist/playbooks/service-build/machine-panorama.d.ts +1 -0
- package/dist/playbooks/service-build/machine-panorama.js +1 -1
- package/dist/playbooks/service-build/merchant-guide.d.ts +4 -1
- package/dist/playbooks/service-build/merchant-guide.js +1 -1
- package/dist/playbooks/service-build/migration-planner.js +1 -1
- package/dist/playbooks/service-build/object-panorama.js +1 -1
- package/dist/playbooks/service-build/participation-radar.d.ts +1 -0
- package/dist/playbooks/service-build/participation-radar.js +1 -1
- package/dist/playbooks/service-build/relationship-profile.js +1 -1
- package/dist/playbooks/service-build/service-panorama.d.ts +1 -0
- package/dist/playbooks/service-build/service-panorama.js +1 -1
- package/dist/playbooks/service-build/service-quote.js +1 -1
- package/dist/playbooks/service-build/service-quote.spec.js +1 -1
- package/dist/playbooks/service-build/workflow-design-assessment.js +1 -1
- package/dist/relationship/registry.js +1 -1
- package/dist/review/index.js +1 -1
- package/dist/runtime/instance-registry.d.ts +7 -1
- package/dist/runtime/instance-registry.js +1 -1
- package/dist/safety/confirm-gate.js +1 -1
- package/dist/schema/benchmark-migration/index.d.ts +2 -0
- package/dist/schema/benchmark-migration/index.js +1 -1
- package/dist/schema/call/allocation.js +1 -1
- package/dist/schema/call/arbitration.js +1 -1
- package/dist/schema/call/base.d.ts +8 -0
- package/dist/schema/call/base.js +1 -1
- package/dist/schema/call/bridge.d.ts +2 -0
- package/dist/schema/call/error-codes.d.ts +1 -1
- package/dist/schema/call/error-codes.js +1 -1
- package/dist/schema/call/guard.js +1 -1
- package/dist/schema/call/handler.js +1 -1
- package/dist/schema/call/machine.js +1 -1
- package/dist/schema/call/semantic.js +1 -1
- package/dist/schema/call/service.d.ts +3 -3
- package/dist/schema/call/service.js +1 -1
- package/dist/schema/common/index.js +1 -1
- package/dist/schema/evaluation/index.d.ts +8 -0
- package/dist/schema/evaluation/index.js +1 -1
- package/dist/schema/goal/planning.d.ts +1 -0
- package/dist/schema/goal/planning.js +1 -1
- package/dist/schema/industry-pack/index.d.ts +29 -0
- package/dist/schema/industry-pack/index.js +1 -1
- package/dist/schema/local/index.d.ts +20 -0
- package/dist/schema/local/index.js +1 -1
- package/dist/schema/messenger/index.d.ts +2 -0
- package/dist/schema/messenger/index.js +1 -1
- package/dist/schema/operations.d.ts +1 -1
- package/dist/schema/operations.js +1 -1
- package/dist/schema/query/bi.d.ts +106 -0
- package/dist/schema/query/bi.js +1 -1
- package/dist/schema/query/index.d.ts +5 -5
- package/dist/schema/query/index.js +1 -1
- package/dist/schema/schema-version.js +1 -1
- package/dist/schema/watch/index.js +1 -1
- package/dist/schema-query-impl/index.js +1 -1
- package/dist/schemas/account_operation.output.json +4 -2
- package/dist/schemas/benchmark_migration_operation.output.json +3 -3
- package/dist/schemas/benchmark_migration_operation.schema.json +16 -2
- package/dist/schemas/bridge_operation.output.json +4 -2
- package/dist/schemas/bridge_operation.schema.json +5 -5
- package/dist/schemas/evaluation_operation.output.json +16 -0
- package/dist/schemas/guard2file.schema.json +1 -1
- package/dist/schemas/index.json +1 -1
- package/dist/schemas/industry_pack_operation.output.json +150 -1
- package/dist/schemas/industry_pack_operation.schema.json +9 -3
- package/dist/schemas/keeper_operation.output.json +2 -2
- package/dist/schemas/local_cache_operation.output.json +4 -2
- package/dist/schemas/local_history_operation.output.json +4 -2
- package/dist/schemas/local_info_operation.output.json +4 -2
- package/dist/schemas/local_mark_operation.output.json +4 -2
- package/dist/schemas/machineNode2file.schema.json +1 -1
- package/dist/schemas/messenger_operation.output.json +13 -2
- package/dist/schemas/messenger_operation.schema.json +41 -34
- package/dist/schemas/monitor_events.output.json +2 -2
- package/dist/schemas/monitor_subscription.output.json +2 -2
- package/dist/schemas/onchain_events.output.json +14 -14
- package/dist/schemas/onchain_operations.output.json +13 -10
- package/dist/schemas/onchain_operations.schema.json +124 -99
- package/dist/schemas/onchain_operations_allocation.schema.json +7 -6
- package/dist/schemas/onchain_operations_arbitration.schema.json +7 -6
- package/dist/schemas/onchain_operations_contact.schema.json +4 -3
- package/dist/schemas/onchain_operations_demand.schema.json +4 -3
- package/dist/schemas/onchain_operations_gen_passport.schema.json +4 -3
- package/dist/schemas/onchain_operations_gen_proof.schema.json +1 -1
- package/dist/schemas/onchain_operations_guard.schema.json +7 -6
- package/dist/schemas/onchain_operations_machine.schema.json +9 -7
- package/dist/schemas/onchain_operations_order.schema.json +6 -4
- package/dist/schemas/onchain_operations_payment.schema.json +2 -2
- package/dist/schemas/onchain_operations_permission.schema.json +19 -15
- package/dist/schemas/onchain_operations_personal.schema.json +17 -14
- package/dist/schemas/onchain_operations_progress.schema.json +6 -4
- package/dist/schemas/onchain_operations_proof.schema.json +4 -3
- package/dist/schemas/onchain_operations_repository.schema.json +9 -7
- package/dist/schemas/onchain_operations_reward.schema.json +5 -4
- package/dist/schemas/onchain_operations_service.schema.json +15 -12
- package/dist/schemas/onchain_operations_treasury.schema.json +4 -3
- package/dist/schemas/onchain_table_data.output.json +18 -13
- package/dist/schemas/onchain_table_data.schema.json +13 -13
- package/dist/schemas/query_toolkit.output.json +301 -33
- package/dist/schemas/query_toolkit.schema.json +6 -6
- package/dist/schemas/watch_operation.output.json +3 -3
- package/dist/schemas/workflow_operation.schema.json +3 -2
- package/dist/schemas/wowok_buildin_info.schema.json +1 -1
- package/dist/task/playbook.js +1 -1
- package/dist/tools/handlers/benchmark-migration.d.ts +1 -0
- package/dist/tools/handlers/benchmark-migration.js +1 -1
- package/dist/tools/handlers/config.js +1 -1
- package/dist/tools/handlers/evaluation.js +1 -1
- package/dist/tools/handlers/evaluation.spec.js +1 -1
- package/dist/tools/handlers/industry-pack.js +1 -1
- package/dist/tools/handlers/messenger.js +1 -1
- package/dist/tools/handlers/onchain.d.ts +4 -0
- package/dist/tools/handlers/onchain.js +1 -1
- package/dist/tools/index.js +1 -1
- package/dist/tools/registry/business.js +1 -1
- package/dist/tools/registry/onchain.js +1 -1
- package/dist/tools/registry/query.js +1 -1
- package/dist/tools/sanitize-output.js +1 -1
- package/dist/tools/sanitize-output.spec.js +1 -1
- package/dist/tools/types.d.ts +1 -0
- package/dist/tools/upgrade-check.d.ts +22 -0
- package/dist/tools/upgrade-check.js +1 -1
- package/dist/tools/wrap.d.ts +1 -1
- package/dist/tools/wrap.js +1 -1
- package/package.json +7 -6
|
@@ -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
|
|
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\x20on\x20chain)','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','owner-only\x20controlled\x20Proof\x20bind\x20(E_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-internal)'],'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.','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)'],'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)'],'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':0x75,'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.','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\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':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
|
|
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)\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)','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'],'consequence':'Write-policy\x20mistakes\x20are\x20repairable\x20—\x20unlike\x20Machine/Service\x20publish.','sources':[{'file':'repository.move','line':0x2ee,'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':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':0x6b3,'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':0x26d,'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:216)\x20->\x20coin\x20to\x20recipient\x20(reward.move:327)'],'invariants':['passport\x20must\x20satisfy\x20the\x20matched\x20RewardGuard'],'sources':[{'file':'reward.move','line':0xd8,'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:721/:728),\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:541)','unwrap=true\x20(single\x20PTB):\x20the\x20receipt\x20is\x20unwrapped\x20to\x20the\x20transaction\x20sender\x20in\x20the\x20same\x20transaction\x20(reward.move:566)'],'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':0x2d1,'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
|
+
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\x20the\x20Order,\x20the\x20on-chain\x20purchase\x20entry)','order-bound\x20Allocation\x20creation\x20(splits\x20coin,\x20sets\x20payment_info.for_object=order,\x20on\x20the\x20order-bound\x20funding\x20path)'],'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':['the\x20allocation\x20release\x20(on-chain\x20allocation\x20entry)','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\x20on-chain\x20allocation\x20path\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':0x6b3,'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(arbitrations\x20whitelist\x20+\x20E33\x20conflict\x20check\x20on\x20chain)','arbitration.compensate\x20->\x20order.compensate\x20writes\x20claimed_by','compensation_fund\x20split\x20->\x20public\x20transfer\x20to\x20order.owner\x20(on-chain\x20payout\x20to\x20the\x20order\x20owner)'],'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':['the\x20order\x27s\x20indemnity\x20accounting\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(on-chain\x20allocation\x20rule)','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':0x26d,'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(public\x20transfer\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':['the\x20reward\x20claim\x20->\x20coin\x20to\x20recipient\x20(on-chain\x20reward\x20pool\x20exit)'],'invariants':['passport\x20must\x20satisfy\x20the\x20matched\x20RewardGuard'],'sources':[{'file':'reward.move','line':0xd8,'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(the\x20on-chain\x20balance-recovery\x20rail),\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;\x20the\x20payment\x20receipt\x20is\x20minted\x20on\x20chain','unwrap=true\x20(single\x20PTB):\x20the\x20receipt\x20is\x20unwrapped\x20to\x20the\x20transaction\x20sender\x20in\x20the\x20same\x20transaction'],'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':0x2d1,'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(on-chain\x20quote\x20step)','the\x20buy\x20path\x20destroys\x20the\x20coupon\x20after\x20capturing\x20its\x20semantics\x20(on-chain\x20burn\x20at\x20purchase)'],'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 GUARD_QUERY_SOURCE='ts-sdk/packages/wowok/src/w/call/guard-ins.ts#GUARDQUERY';export const NATIVE_VALIDATION={'entry':'the\x20native\x20guard-data\x20validation\x20call\x20(
|
|
1
|
+
export const GUARD_QUERY_SOURCE='ts-sdk/packages/wowok/src/w/call/guard-ins.ts#GUARDQUERY';export const NATIVE_VALIDATION={'entry':'the\x20native\x20guard-data\x20validation\x20call\x20(invoked\x20on\x20every\x20guard\x20check)','semantics':['Query\x20on\x20absent\x20object\x20/\x20unset\x20Option\x20/\x20missing\x20collection\x20entry\x20aborts\x20with\x20VM\x20error\x20(e.g.\x20W_FIELD_NOT_FOUND)\x20—\x20the\x20Guard\x20does\x20NOT\x20silently\x20return\x200.\x20Safe\x20failure\x20mode,\x20NOT\x20a\x20null-bypass\x20risk.','Guard.rep\x20flag:\x20false\x20means\x20the\x20queried\x20object\x20or\x20first\x20parameter\x20failed\x20validation.','Empty-value\x20table\x20constant\x20crashes\x20with\x20MovePrimitiveRuntimeError\x20(A-5):\x20vector::borrow(&item.value,0)\x20without\x20length\x20check.'],'sources':[{'file':'guard.move','line':0x10,'pattern':'native\x20fun\x20validate_guard_data'},{'file':'guard.move','line':0x146,'pattern':'validate_guard_data(&table_data,\x20input)'},{'file':'guard.move','line':0x8b,'pattern':'rep:\x20bool'}]};export const PATH_DEPENDENT_TIME_QUERIES=[{'queryPrefix':'progress.current_time','semantics':'Time\x20of\x20ENTERING\x20the\x20current\x20node,\x20not\x20of\x20any\x20business\x20event.\x20A\x20buyer\x20leaving\x20a\x20review\x20(detour\x20via\x20reviewed\x20node)\x20postpones\x20merchant\x20settlement\x20windows.','findings':['E-10','D-14'],'sources':[{'file':'progress.move','line':0x75,'pattern':'current_time:\x20u64'}]},{'queryPrefix':'progress.session.forward.time','semantics':'Per-forward\x20last-op\x20time\x20inside\x20the\x20current\x20session;\x20also\x20path-local.','findings':['E-10'],'sources':[{'file':'progress.move','line':0x36,'pattern':'time:\x20u64'}]}];export const STABLE_TIME_QUERIES=[{'queryPrefix':'order.time','semantics':'Order\x20creation\x20time.\x20Never\x20moves.\x20Preferred\x20anchor\x20for\x20settlement/refund\x20windows.'}];export const WRITE_ONLY_QUERY_PREFIXES=[{'queryPrefix':'order.required_info','field':'Order.required_info','findings':['A-1','A-10']},{'queryPrefix':'order.claimed_by','field':'Order.claimed_by','findings':['A-3']},{'queryPrefix':'service.repository','field':'Service.repositories','findings':['A-10']},{'queryPrefix':'service.reward','field':'Service.rewards','findings':['A-10']},{'queryPrefix':'service.sale.wip','field':'Sale.wip','findings':['A-10','A-15']},{'queryPrefix':'machine.consensus_repository','field':'Machine.consensus_repositories','findings':['A-10']}];
|
|
@@ -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':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':0x7d,'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':0x6c,'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:750-769).\x20The\x20passport-based\x20id-data\x20removal\x20call\x20always\x20aborts\x20(A-8).','source':{'file':'repository.move','line':0x212,'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':0xd2,'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
|
+
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':0x7d,'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':0x6c,'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.\x20The\x20passport-based\x20id-data\x20removal\x20call\x20always\x20aborts\x20(A-8).','source':{'file':'repository.move','line':0x212,'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':0xd2,'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—\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\x20never\x20shared.\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,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_sum_where_bound','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']('$');}const REACH_GREATER_TYPES={'logic_as_u256_greater':'gt','logic_as_u256_greater_or_equal':'ge'},REACH_LESSER_TYPES={'logic_as_u256_lesser':'lt','logic_as_u256_lesser_or_equal':'le'},REACH_EQUAL_TYPES=new Set(['logic_as_u256_equal','logic_equal']);function reachChannel(a){if(a['type']==='context'&&typeof a['context']==='string')return'context:'+a['context'];const b=a['query'];if(a['type']==='query'&&(typeof b==='string'||typeof b==='number'))return'query:'+String(b)['trim']()['toLowerCase']();return undefined;}function reachConstant(a,b){const c=d=>typeof d==='string'||typeof d==='number'||typeof d==='boolean';if(a['type']==='identifier'&&typeof a['identifier']==='number'){const d=b['find'](e=>typeof e==='object'&&e!==null&&e['identifier']===a['identifier']);if(d===undefined||d['b_submission']===!![])return undefined;return c(d['value'])?d['value']:undefined;}if(a['type']==='constant')return c(a['value'])?a['value']:undefined;return undefined;}function flattenAndChain(a,b=[]){if(typeof a!=='object'||a===null)return b;const c=a;if(c['type']==='logic_and'){const d=Array['isArray'](c['nodes'])?c['nodes']:Array['isArray'](c['and'])?c['and']:[];for(const e of d)flattenAndChain(e,b);return b;}return b['push'](c),b;}function reachLegsOf(a){const b=Array['isArray'](a['params']['table'])?a['params']['table']:[],c=a['params']['root']??a['params']['logic'],d={'legs':[],'selfStrict':[]};if(typeof c!=='object'||c===null)return d;for(const e of flattenAndChain(c)){const f=typeof e['type']==='string'?e['type']:'',g=Array['isArray'](e['nodes'])?e['nodes']:undefined;if(g===undefined||g['length']<0x2)continue;const h=REACH_GREATER_TYPES[f],j=REACH_LESSER_TYPES[f],k=REACH_EQUAL_TYPES['has'](f);if(h===undefined&&j===undefined&&!k)continue;const l=g[0x0];if(typeof l!=='object'||l===null)continue;const m=reachChannel(l),n=reachConstant(l,b);for(let o=0x1;o<g['length'];o++){const p=g[o];if(typeof p!=='object'||p===null)continue;const q=reachConstant(p,b),r=reachChannel(p);if(m!==undefined&&q!==undefined)d['legs']['push']({'channel':m,'dir':k?'eq':h??j,'constant':q});else{if(r!==undefined&&n!==undefined){const s=k?'eq':h!==undefined?h==='gt'?'lt':'le':j==='lt'?'gt':'ge';d['legs']['push']({'channel':r,'dir':s,'constant':n});}else m!==undefined&&r!==undefined&&(m===r&&(h==='gt'||j==='lt')&&d['selfStrict']['push']({'channel':m,'dir':h==='gt'?'gt':'lt'}));}}}return d;}function reachNumeric(a){if(typeof a==='number')return Number['isFinite'](a)?a:undefined;if(typeof a==='string'&&a['trim']()!==''&&!Number['isNaN'](Number(a)))return Number(a);return undefined;}function findReachContradictions(c,f,g=[]){const h=[];for(const l of g){h['push']('guard\x20\x27'+c+'\x27\x20('+l['channel']+'):\x20'+(l['dir']==='gt'?'>':'<')+'\x20itself\x20—\x20'+'unsatisfiable\x20(same-binding\x20self-comparison)');}const k=new Map();for(const m of f){const n=k['get'](m['channel'])??[];n['push'](m),k['set'](m['channel'],n);}for(const [o,p]of k){const q=p['filter'](v=>v['dir']==='gt'||v['dir']==='ge'),r=p['filter'](v=>v['dir']==='lt'||v['dir']==='le');for(const v of q){const w=reachNumeric(v['constant']);if(w===undefined)continue;for(const x of r){const y=reachNumeric(x['constant']);if(y===undefined)continue;(w>y||w===y&&(v['dir']==='gt'||x['dir']==='lt'))&&h['push']('guard\x20\x27'+c+'\x27\x20('+o+'):\x20'+(v['dir']==='gt'?'>':'>=')+'\x20'+String(v['constant'])+'\x20'+('contradicts\x20'+(x['dir']==='lt'?'<':'<=')+'\x20'+String(x['constant'])+'\x20—\x20unsatisfiable'));}}const t=p['filter'](z=>z['dir']==='eq');for(let z=0x0;z<t['length'];z++){for(let A=z+0x1;A<t['length'];A++){const B=t[z],C=t[A],D=reachNumeric(B['constant']),E=reachNumeric(C['constant']),F=typeof B['constant']==='boolean'&&typeof C['constant']==='boolean'&&B['constant']!==C['constant'],G=D!==undefined&&E!==undefined&&D!==E;(F||G)&&h['push']('guard\x20\x27'+c+'\x27\x20('+o+'):\x20==\x20'+String(B['constant'])+'\x20'+('contradicts\x20==\x20'+String(C['constant'])+'\x20—\x20unsatisfiable'));}}for(const H of t){const I=reachNumeric(H['constant']);if(I===undefined)continue;for(const J of q){J['dir']==='gt'&&reachNumeric(J['constant'])===I&&h['push']('guard\x20\x27'+c+'\x27\x20('+o+'):\x20==\x20'+String(H['constant'])+'\x20'+('contradicts\x20>\x20'+String(J['constant'])+'\x20—\x20unsatisfiable'));}for(const K of r){K['dir']==='lt'&&reachNumeric(K['constant'])===I&&h['push']('guard\x20\x27'+c+'\x27\x20('+o+'):\x20==\x20'+String(H['constant'])+'\x20'+('contradicts\x20<\x20'+String(K['constant'])+'\x20—\x20unsatisfiable'));}}}return h;}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'],s=Array['isArray'](q?.['forwards'])?q['forwards']:[],t=[];for(const u of s){const v=u?.['guard'];isRef(v)&&(t['push'](v['$ref']),h['push'](v['$ref']));}if(typeof r==='string')e['push']({'prev':r,'next':m,'guards':t});}}const i=b['params']['pairs'];if(Array['isArray'](i))for(const w of i){const x=w;if(typeof x?.['prev_node']==='string'&&typeof x?.['next_node']==='string'){const y=Array['isArray'](x['forwards'])?x['forwards']:[],z=[];for(const A of y){const B=A?.['guard'];isRef(B)&&(z['push'](B['$ref']),h['push'](B['$ref']));}e['push']({'prev':x['prev_node'],'next':x['next_node'],'guards':z});}}const j=new Set(e['map'](C=>C['prev'])['filter'](C=>C!==''));return{'nodes':d,'edges':e,'terminals':d['filter'](C=>!j['has'](C)),'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;}const TIME_CMP_TYPES={'logic_as_u256_greater':'gt','logic_as_u256_greater_or_equal':'ge','logic_as_u256_lesser':'lt','logic_as_u256_lesser_or_equal':'le','logic_as_u256_equal':'eq','logic_equal':'eq'};function isClockContext(a){return a['type']==='context'&&a['context']==='Clock';}function subtreeHasBranch(a){if(Array['isArray'](a))return a['some'](subtreeHasBranch);if(typeof a!=='object'||a===null)return![];const b=a;if(b['type']==='logic_or'||b['type']==='logic_not')return!![];return Object['values'](b)['some'](subtreeHasBranch);}function guardWindowOpen(c){if(typeof c!=='object'||c===null)return!![];if(subtreeHasBranch(c))return!![];let d=![];for(const e of flattenAndChain(c)){const f=TIME_CMP_TYPES[typeof e['type']==='string'?e['type']:''];if(f===undefined)continue;const g=Array['isArray'](e['nodes'])?e['nodes']:undefined;if(g===undefined||g['length']<0x2)continue;const h=g[0x0],i=g[0x1];if(typeof h!=='object'||h===null||typeof i!=='object'||i===null)continue;const j=isClockContext(h),k=isClockContext(i);if(j&&!k){if(f==='lt'||f==='le'||f==='eq')d=!![];}else{if(!j&&k){const l=f==='gt'||f==='ge'?'lt':f==='lt'||f==='le'?'gt':'eq';if(l==='lt')d=!![];}}}return!d;}export function planFacts(a){const b=new Map(createsOf(a,'guard')['map'](as=>[as['id'],guardProjection(as)])),c=allocatorRows(a),d=machineProjection(a),f=createsOf(a,'service')['length']>0x0,h=createsOf(a,'repository')['length']>0x0,i=a['steps']['some'](as=>{if(!(as['op']==='create'&&as['object']==='service'||as['op']==='configure'&&as['method']==='sales'))return![];const at=as['params']['sales'];return Array['isArray'](at)&&at['length']>0x0;}),j=new Set();for(const as of c){const at=as['guardStep']===undefined?undefined:b['get'](as['guardStep']);for(const au of at?.['acceptedNodes']??[])j['add'](au);}const k=new Set(d?.['optionalNodes']??[]),l=(d?.['terminals']??[])['filter'](av=>!k['has'](av)),o=new Set(),q=new Set(c['map'](av=>av['guardStep'])['filter'](av=>av!==undefined));for(const av of d?.['edges']??[]){if(av['next']===''||av['guards']['length']===0x0)continue;for(const aw of av['guards']){if(!q['has'](aw))continue;if((b['get'](aw)?.['acceptedNodes']['length']??0x0)===0x0)o['add'](av['next']);}}const u=l['find'](ax=>!j['has'](ax)&&!o['has'](ax)),w=a['pending_guards']??[],x=w['filter'](ax=>ax['site']==='allocator')['length'],y=w['filter'](ax=>ax['site']==='allocator'||ax['site']==='machine_edge'),z=w['filter'](ax=>ax['site']==='service_buy'),A=y[0x0]?.['key'],B=z[0x0]?.['key'],C=d?.['nodes']['find'](ax=>/return/i['test'](ax)),D=a['steps']['some'](ax=>{if(ax['op']==='configure'&&ax['method']==='arbitrations'){const ay=ax['params']['objects'];return Array['isArray'](ay)&&ay['length']>0x0;}if(ax['op']==='create'&&ax['object']==='service'){const az=ax['params']['arbitrations'];return Array['isArray'](az)&&az['length']>0x0;}return![];});let E,F=![];for(const ax of a['steps']){if(ax['op']==='configure'&&ax['method']==='compensation_fund_add'){F=!![];const ay=numericAmount(ax['params']['balance']);if(ay!==undefined)E=(E??0x0)+ay;}}let G,H;const I=az=>{if(!Array['isArray'](az))return;for(const aA of az){const aB=numericAmount(aA?.['price']);aB!==undefined&&aB>0x0&&(G=Math['max'](G??0x0,aB),H=H===undefined?aB:Math['min'](H,aB));}};for(const az of a['steps']){if(az['op']==='create'&&az['object']==='service')I(az['params']['sales']);if(az['op']==='configure'&&az['method']==='sales')I(az['params']['sales']);}const J=E!==undefined&&G!==undefined,K=createsOf(a,'reward')['length']>0x0;let L,M;if(K)for(const aA of a['steps']){if(aA['op']==='configure'&&aA['method']==='guard_add'){const aB=aA['params']['amount'];if(aB!==undefined&&aB!==null&&aB['type']==='Fixed'){const aC=numericAmount(aB['value']);if(aC!==undefined)L=Math['max'](L??0x0,aC);}}if(aA['op']==='configure'&&aA['method']==='coin_add'&&/^reward/['test'](aA['id'])){const aD=numericAmount(aA['params']['coin']);if(aD!==undefined)M=(M??0x0)+aD;}}const N=L!==undefined&&H!==undefined,O=/^(arb\.indemnity|arb\.order|arb\.status|order\.dispute)/,P=/settled|refunded|reviewed|completed|closed|cancel/i;let Q;if(d!==undefined)for(const aE of d['edges']){if(aE['next']===''||aE['guards']['length']===0x0)continue;if(!P['test'](aE['prev']))continue;if(aE['guards']['some'](aF=>b['get'](aF)?.['queries']['some'](aG=>O['test'](aG)))){Q=aE['prev'];break;}}const R=Q!==undefined&&(!F||E===0x0),S=new Map();for(const aF of createsOf(a,'guard')){S['set'](aF['id'],aF['params']['root']??aF['params']['logic']);}const T=d?.['edges']??[],U=aG=>aG['guards']['length']===0x0||aG['guards']['every'](aH=>{const aI=S['get'](aH);return aI===undefined||guardWindowOpen(aI);});let V;for(const aG of T){if(aG['prev']!==''||aG['next']==='')continue;const aH=T['filter'](aI=>aI['prev']===aG['next']);if(aH['length']===0x0)continue;if(aH['every'](aI=>!U(aI)))V??=aG['next'];}const W=c['some'](aI=>aI['guardStep']===undefined&&aI['guardKey']!==undefined),X=T['filter'](aI=>aI['guards']['length']>0x0&&aI['guards']['some'](aJ=>b['get'](aJ)?.['queries']['some'](aK=>O['test'](aK))));let Y=![];if(X['length']>0x0&&!W){const aI=new Set(X['map'](aL=>aL['next'])['filter'](aL=>aL!=='')),aJ=new Set(X['flatMap'](aL=>aL['guards'])),aK=new Set();for(const aL of c){const aM=aL['guardStep']===undefined?undefined:b['get'](aL['guardStep']);if(aM===undefined)continue;if(aM['acceptedNodes']['length']>0x0){for(const aN of aM['acceptedNodes'])aK['add'](aN);}else for(const aO of T){aO['next']!==''&&aO['guards']['includes'](aL['guardStep'])&&aK['add'](aO['next']);}}for(const aP of c){const aQ=aP['guardStep']===undefined?undefined:b['get'](aP['guardStep']);if(aQ===undefined)continue;if(aQ['queries']['some'](aR=>O['test'](aR))||aJ['has'](aP['guardStep'])){Y=!![];break;}}if(!Y)for(const aR of aI){if(aK['has'](aR)){Y=!![];break;}}}const Z=X['length']>0x0&&!Y&&!W,a0=X[0x0]===undefined?undefined:X[0x0]['prev']!==''?X[0x0]['prev']:X[0x0]['next'],a1=[];for(const aS of a['steps']){const aT=aS['op']==='create'&&aS['object']==='service',aU=aS['op']==='configure'&&aS['method']==='sales';if(!aT&&!aU)continue;const aV=aS['params'];if(typeof aV['description']==='string')a1['push'](aV['description']);if(!Array['isArray'](aV['sales']))continue;for(const aW of aV['sales']){if(typeof aW!=='object'||aW===null)continue;for(const aX of Object['values'](aW)){if(typeof aX==='string')a1['push'](aX);}}}const a2=a1['flatMap'](aY=>extractProseWindowPromises(aY)),a3=collectEnforcedWindowMs(a),a4=a2['filter'](aY=>!a3['has'](aY['ms'])),a5=[];for(const aY of a1){const aZ=UNANCHORED_RESTART_RE['exec'](aY);if(aZ)a5['push'](aZ[0x0]);}const a6=c['filter'](b0=>b0['track']==='refund'),a7=a6['map'](b0=>b0['guardStep']===undefined?undefined:b['get'](b0['guardStep']))['find'](b0=>b0!==undefined&&!b0['queries']['some'](b1=>b1['startsWith']('order.claimed_by')))?.['stepId'],a8=new Map();for(const b0 of d?.['edges']??[]){for(const b1 of b0['guards']){const b2=a8['get'](b1)??[];if(b0['prev']!=='')b2['push'](b0['prev']);if(b0['next']!=='')b2['push'](b0['next']);a8['set'](b1,b2);}}let a9,aa=![];for(const b3 of b['values']()){if(b3['queries']['some'](isPathDependentTimeQuery)){a9??=b3['stepId'];if(d!==undefined){const b4=[...b3['acceptedNodes'],...a8['get'](b3['stepId'])??[]];for(const b5 of b4){if(pathCountCap2(d['edges'],b5)>=0x2){aa=!![],a9=b3['stepId'];break;}}}}if(aa)break;}const ab=[...b['values']()]['flatMap'](b6=>b6['queries']);let ac;for(const b6 of WRITE_ONLY_ENFORCEMENT_SOURCES){for(const b7 of createsOf(a,b6['object'])){if(b6['extract'](b7)&&!ab['some'](b8=>b8['startsWith'](b6['coverQuery']))){ac=b6['param'];break;}}if(ac!==undefined)break;}const ad=new Set();for(const b8 of a['steps']){if(b8['op']==='create'&&b8['object']==='guard')continue;const b9=refsOf(b8['op']==='publish'?b8['target']:b8['params']);for(const ba of b9)ad['add'](ba);if(b8['op']==='configure'){for(const bb of refsOf(b8['target']))ad['add'](bb);}}const ae=[...b['keys']()]['find'](bc=>!ad['has'](bc)),af=[...b['values']()]['find'](bc=>!h&&bc['queries']['some'](bd=>bd['startsWith']('repository.')))?.['stepId'];let ag;if(f&&d!==undefined)for(const bc of d['forwardGuardRefs']){const bd=b['get'](bc);if(bd===undefined)continue;const be=bd['table']['some'](bf=>bf['identifier']===TASK_BINDING_SLOT&&bf['b_submission']===!![]);if(!be){ag=bc;break;}}let ah;for(const bf of c){if(bf['guardStep']===undefined||bf['identifierLegs']['length']===0x0)continue;const bg=b['get'](bf['guardStep']);if(bg===undefined)continue;for(const bh of bf['identifierLegs']){const bi=bg['table']['find'](bj=>bj['identifier']===bh);if(bi===undefined||bi['b_submission']!==!![]||bi['value_type']!=='Address'){ah='slot\x20'+bh+'\x20of\x20guard\x20\x27'+bf['guardStep']+'\x27';break;}}if(ah!==undefined)break;}const ai=new Set();for(const bj of createsOf(a,'repository')){const bk=bj['params']['policies'];if(!Array['isArray'](bk))continue;for(const bl of bk){const bm=bl?.['name'];if(typeof bm==='string')ai['add'](bm);}}const aj=[];if(ai['size']>0x0)for(const bn of createsOf(a,'guard')){const bo=Array['isArray'](bn['params']['table'])?bn['params']['table']:[];for(const bp of collectRepoWhereQueries(bn['params']['root']??bn['params']['logic'])){const bq=staticStringOperand(bp['key'],bo);if(bq===undefined)continue;if(!isPlanLocalObjectOperand(bp['object'],bo))continue;!ai['has'](bq)&&aj['push']('\x27'+bq+'\x27\x20in\x20guard\x20\x27'+bn['id']+'\x27');}}const ak=new Set();for(const br of createsOf(a,'repository')){const bs=br['params']['policies'];if(!Array['isArray'](bs))continue;for(const bt of bs){const bu=bt?.['write_guard'];if(!Array['isArray'](bu))continue;for(const bv of bu){const bw=bv?.['guard'],bx=isRef(bw)?bw['$ref']:bw;if(typeof bx==='string')ak['add'](bx);}}}let al,am=0x0;for(const by of createsOf(a,'guard')){if(!ak['has'](by['id']))continue;rootNegatesRepoDataHas(by['params']['root']??by['params']['logic'])&&(am++,al??=by['id']);}let an,ao=0x0;for(const bz of createsOf(a,'service')){const bA=bz['params']['customer_required'];if(!Array['isArray'](bA)||bA['length']===0x0)continue;bz['params']['buy_guard']===undefined&&(ao++,an??=bz['id']);}let ap,aq=0x0;for(const bB of d?.['edges']??[]){if(bB['prev']===''||bB['guards']['length']===0x0)continue;for(const bC of bB['guards']){const bD=b['get'](bC);if(bD===undefined||bD['acceptedNodes']['length']===0x0)continue;!bD['acceptedNodes']['includes'](bB['prev'])&&(aq++,ap??=bC+'\x20on\x20edge\x20'+bB['prev']+'->'+bB['next']+'\x20(guard\x20pins\x20progress.current\x20in\x20'+('['+bD['acceptedNodes']['join'](',\x20')+']\x20—\x20never\x20\x27'+bB['prev']+'\x27)'));}}const ar=[];for(const bE of createsOf(a,'guard')){const bF=reachLegsOf(bE);ar['push'](...findReachContradictions(bE['id'],bF['legs'],bF['selfStrict']));}return{'has_service':f,'has_machine':d!==undefined,'has_repository':h,'sales_step_present':i,'allocator_row_count':c['length'],'refund_row_count':a6['length'],'terminal_count':l['length'],'terminal_nodes_display':l['join'](',\x20'),'pending_allocator_guard_count':x,'pending_guard_total':w['length'],...u===undefined?{}:{'first_uncovered_terminal':u},...a7===undefined?{}:{'first_refund_guard_missing_claimed_by':a7},...a9===undefined?{}:{'first_path_dependent_anchor':a9},'path_sensitive':aa,...ac===undefined?{}:{'first_write_only_unenforced_field':ac},...ae===undefined?{}:{'first_orphan_guard':ae},...af===undefined?{}:{'first_repo_query_without_repository':af},'repo_write_once_guard_count':am,...al===undefined?{}:{'first_repo_write_once_guard':al},'customer_required_unbacked_count':ao,...an===undefined?{}:{'first_customer_required_unbacked':an},...ag===undefined?{}:{'first_edge_guard_missing_254':ag},'node_mismatched_guard_count':aq,...ap===undefined?{}:{'first_node_mismatched_guard':ap},'guard_reach_contradiction_count':ar['length'],...ar['length']>0x0?{'first_guard_reach_contradiction':ar[0x0],'guard_reach_contradiction_display':ar['join'](';\x20')}:{},...ah===undefined?{}:{'first_alloc_slot_missing':ah},...A===undefined?{}:{'first_pending_fund_guard':A,'pending_fund_guard_count':y['length'],'pending_fund_guard_keys_display':y['map'](bG=>bG['key'])['join'](',\x20')},...B===undefined?{}:{'first_pending_buy_guard':B,'pending_buy_guard_count':z['length'],'pending_buy_guard_keys_display':z['map'](bG=>bG['key'])['join'](',\x20')},'has_return_rail':C!==undefined,...C===undefined?{}:{'return_rail_node':C},'has_arbitration_binding':D,'fund_topup_present':F,...E===undefined?{}:{'fund_topup_amount':E},...J?{'fund_ceiling_breach':E<MAX_INDEMNITY_MULTIPLE*G,'fund_ceiling_basis':MAX_INDEMNITY_MULTIPLE+'x\x20the\x20highest\x20SKU\x20price','fund_concurrent_orders_coverable':Math['floor'](E/(MAX_INDEMNITY_MULTIPLE*G))}:{},'fund_ceiling_unverifiable':F&&!J,...L!==undefined?{'reward_bounty_amount':L,...M!==undefined?{'reward_funding_amount':M}:{},...M!==undefined&&L>0x0?{'reward_max_claims':Math['floor'](M/L)}:{},...N?{'lowest_sku_price':H,'reward_scale_breach':L>0.5*H,'reward_scale_ratio_display':(L/H)['toFixed'](0x2)+'x\x20the\x20cheapest\x20SKU\x20price'}:{'reward_scale_unverifiable':!![]}}:{},...R?{'first_arb_exit_node':Q,'fund_arb_route_unfunded':!![]}:{},...V===undefined?{}:{'entry_no_open_exit':!![],'entry_strand_node':V},...Z&&a0!==undefined?{'arb_promise_without_settle_rail':!![],'arb_promise_node':a0}:{},...X['length']>0x0&&W&&a0!==undefined?{'arb_key_plane_opaque':!![],'arb_key_plane_node':a0}:{},...a2['length']>0x0?{'prose_window_promise_count':a2['length'],'enforced_window_ms_display':[...a3]['sort']((bG,bH)=>bG-bH)['map'](formatMs)['join'](',\x20')||'none',...a4['length']>0x0?{'prose_time_mismatch_count':a4['length'],'first_prose_time_mismatch':a4[0x0]['quote'],'prose_time_mismatch_display':a4['map'](bG=>bG['quote'])['join'](';\x20')}:{}}:{},...a5['length']>0x0?{'unanchored_window_promise_count':a5['length'],'first_unanchored_window_promise':a5[0x0]}:{},...ai['size']>0x0?{'repo_policy_keys_display':[...ai]['join'](',\x20'),...aj['length']>0x0?{'repo_gate_key_unbacked_count':aj['length'],'first_repo_gate_key_unbacked':aj[0x0],'repo_gate_key_unbacked_display':aj['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_sum_where_bound','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']('$');}const REACH_GREATER_TYPES={'logic_as_u256_greater':'gt','logic_as_u256_greater_or_equal':'ge'},REACH_LESSER_TYPES={'logic_as_u256_lesser':'lt','logic_as_u256_lesser_or_equal':'le'},REACH_EQUAL_TYPES=new Set(['logic_as_u256_equal','logic_equal']);function reachChannel(a){if(a['type']==='context'&&typeof a['context']==='string')return'context:'+a['context'];const b=a['query'];if(a['type']==='query'&&(typeof b==='string'||typeof b==='number'))return'query:'+String(b)['trim']()['toLowerCase']();return undefined;}function reachConstant(a,b){const c=d=>typeof d==='string'||typeof d==='number'||typeof d==='boolean';if(a['type']==='identifier'&&typeof a['identifier']==='number'){const d=b['find'](e=>typeof e==='object'&&e!==null&&e['identifier']===a['identifier']);if(d===undefined||d['b_submission']===!![])return undefined;return c(d['value'])?d['value']:undefined;}if(a['type']==='constant')return c(a['value'])?a['value']:undefined;return undefined;}function flattenAndChain(a,b=[]){if(typeof a!=='object'||a===null)return b;const c=a;if(c['type']==='logic_and'){const d=Array['isArray'](c['nodes'])?c['nodes']:Array['isArray'](c['and'])?c['and']:[];for(const e of d)flattenAndChain(e,b);return b;}return b['push'](c),b;}function reachLegsOf(a){const b=Array['isArray'](a['params']['table'])?a['params']['table']:[],c=a['params']['root']??a['params']['logic'],d={'legs':[],'selfStrict':[]};if(typeof c!=='object'||c===null)return d;for(const e of flattenAndChain(c)){const f=typeof e['type']==='string'?e['type']:'',g=Array['isArray'](e['nodes'])?e['nodes']:undefined;if(g===undefined||g['length']<0x2)continue;const h=REACH_GREATER_TYPES[f],j=REACH_LESSER_TYPES[f],k=REACH_EQUAL_TYPES['has'](f);if(h===undefined&&j===undefined&&!k)continue;const l=g[0x0];if(typeof l!=='object'||l===null)continue;const m=reachChannel(l),n=reachConstant(l,b);for(let o=0x1;o<g['length'];o++){const p=g[o];if(typeof p!=='object'||p===null)continue;const q=reachConstant(p,b),r=reachChannel(p);if(m!==undefined&&q!==undefined)d['legs']['push']({'channel':m,'dir':k?'eq':h??j,'constant':q});else{if(r!==undefined&&n!==undefined){const s=k?'eq':h!==undefined?h==='gt'?'lt':'le':j==='lt'?'gt':'ge';d['legs']['push']({'channel':r,'dir':s,'constant':n});}else m!==undefined&&r!==undefined&&(m===r&&(h==='gt'||j==='lt')&&d['selfStrict']['push']({'channel':m,'dir':h==='gt'?'gt':'lt'}));}}}return d;}function reachNumeric(a){if(typeof a==='number')return Number['isFinite'](a)?a:undefined;if(typeof a==='string'&&a['trim']()!==''&&!Number['isNaN'](Number(a)))return Number(a);return undefined;}function findReachContradictions(c,f,g=[]){const h=[];for(const l of g){h['push']('guard\x20\x27'+c+'\x27\x20('+l['channel']+'):\x20'+(l['dir']==='gt'?'>':'<')+'\x20itself\x20—\x20'+'unsatisfiable\x20(same-binding\x20self-comparison)');}const k=new Map();for(const m of f){const n=k['get'](m['channel'])??[];n['push'](m),k['set'](m['channel'],n);}for(const [o,p]of k){const q=p['filter'](v=>v['dir']==='gt'||v['dir']==='ge'),r=p['filter'](v=>v['dir']==='lt'||v['dir']==='le');for(const v of q){const w=reachNumeric(v['constant']);if(w===undefined)continue;for(const x of r){const y=reachNumeric(x['constant']);if(y===undefined)continue;(w>y||w===y&&(v['dir']==='gt'||x['dir']==='lt'))&&h['push']('guard\x20\x27'+c+'\x27\x20('+o+'):\x20'+(v['dir']==='gt'?'>':'>=')+'\x20'+String(v['constant'])+'\x20'+('contradicts\x20'+(x['dir']==='lt'?'<':'<=')+'\x20'+String(x['constant'])+'\x20—\x20unsatisfiable'));}}const t=p['filter'](z=>z['dir']==='eq');for(let z=0x0;z<t['length'];z++){for(let A=z+0x1;A<t['length'];A++){const B=t[z],C=t[A],D=reachNumeric(B['constant']),E=reachNumeric(C['constant']),F=typeof B['constant']==='boolean'&&typeof C['constant']==='boolean'&&B['constant']!==C['constant'],G=D!==undefined&&E!==undefined&&D!==E;(F||G)&&h['push']('guard\x20\x27'+c+'\x27\x20('+o+'):\x20==\x20'+String(B['constant'])+'\x20'+('contradicts\x20==\x20'+String(C['constant'])+'\x20—\x20unsatisfiable'));}}for(const H of t){const I=reachNumeric(H['constant']);if(I===undefined)continue;for(const J of q){J['dir']==='gt'&&reachNumeric(J['constant'])===I&&h['push']('guard\x20\x27'+c+'\x27\x20('+o+'):\x20==\x20'+String(H['constant'])+'\x20'+('contradicts\x20>\x20'+String(J['constant'])+'\x20—\x20unsatisfiable'));}for(const K of r){K['dir']==='lt'&&reachNumeric(K['constant'])===I&&h['push']('guard\x20\x27'+c+'\x27\x20('+o+'):\x20==\x20'+String(H['constant'])+'\x20'+('contradicts\x20<\x20'+String(K['constant'])+'\x20—\x20unsatisfiable'));}}}return h;}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'],s=Array['isArray'](q?.['forwards'])?q['forwards']:[],t=[];for(const u of s){const v=u?.['guard'];isRef(v)&&(t['push'](v['$ref']),h['push'](v['$ref']));}if(typeof r==='string')e['push']({'prev':r,'next':m,'guards':t});}}const i=b['params']['pairs'];if(Array['isArray'](i))for(const w of i){const x=w;if(typeof x?.['prev_node']==='string'&&typeof x?.['next_node']==='string'){const y=Array['isArray'](x['forwards'])?x['forwards']:[],z=[];for(const A of y){const B=A?.['guard'];isRef(B)&&(z['push'](B['$ref']),h['push'](B['$ref']));}e['push']({'prev':x['prev_node'],'next':x['next_node'],'guards':z});}}const j=new Set(e['filter'](C=>C['prev']!==''&&C['prev']!==C['next'])['map'](C=>C['prev']));return{'nodes':d,'edges':e,'terminals':d['filter'](C=>!j['has'](C)),'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;}const TIME_CMP_TYPES={'logic_as_u256_greater':'gt','logic_as_u256_greater_or_equal':'ge','logic_as_u256_lesser':'lt','logic_as_u256_lesser_or_equal':'le','logic_as_u256_equal':'eq','logic_equal':'eq'};function isClockContext(a){return a['type']==='context'&&a['context']==='Clock';}function subtreeHasBranch(a){if(Array['isArray'](a))return a['some'](subtreeHasBranch);if(typeof a!=='object'||a===null)return![];const b=a;if(b['type']==='logic_or'||b['type']==='logic_not')return!![];return Object['values'](b)['some'](subtreeHasBranch);}function guardWindowOpen(c){if(typeof c!=='object'||c===null)return!![];if(subtreeHasBranch(c))return!![];let d=![];for(const e of flattenAndChain(c)){const f=TIME_CMP_TYPES[typeof e['type']==='string'?e['type']:''];if(f===undefined)continue;const g=Array['isArray'](e['nodes'])?e['nodes']:undefined;if(g===undefined||g['length']<0x2)continue;const h=g[0x0],i=g[0x1];if(typeof h!=='object'||h===null||typeof i!=='object'||i===null)continue;const j=isClockContext(h),k=isClockContext(i);if(j&&!k){if(f==='lt'||f==='le'||f==='eq')d=!![];}else{if(!j&&k){const l=f==='gt'||f==='ge'?'lt':f==='lt'||f==='le'?'gt':'eq';if(l==='lt')d=!![];}}}return!d;}export function planFacts(a){const b=new Map(createsOf(a,'guard')['map'](as=>[as['id'],guardProjection(as)])),c=allocatorRows(a),d=machineProjection(a),f=createsOf(a,'service')['length']>0x0,h=createsOf(a,'repository')['length']>0x0,i=a['steps']['some'](as=>{if(!(as['op']==='create'&&as['object']==='service'||as['op']==='configure'&&as['method']==='sales'))return![];const at=as['params']['sales'];return Array['isArray'](at)&&at['length']>0x0;}),j=new Set();for(const as of c){const at=as['guardStep']===undefined?undefined:b['get'](as['guardStep']);for(const au of at?.['acceptedNodes']??[])j['add'](au);}const k=new Set(d?.['optionalNodes']??[]),l=(d?.['terminals']??[])['filter'](av=>!k['has'](av)),o=new Set(),q=new Set(c['map'](av=>av['guardStep'])['filter'](av=>av!==undefined));for(const av of d?.['edges']??[]){if(av['next']===''||av['guards']['length']===0x0)continue;for(const aw of av['guards']){if(!q['has'](aw))continue;if((b['get'](aw)?.['acceptedNodes']['length']??0x0)===0x0)o['add'](av['next']);}}const u=l['find'](ax=>!j['has'](ax)&&!o['has'](ax)),w=a['pending_guards']??[],x=w['filter'](ax=>ax['site']==='allocator')['length'],y=w['filter'](ax=>ax['site']==='allocator'||ax['site']==='machine_edge'),z=w['filter'](ax=>ax['site']==='service_buy'),A=y[0x0]?.['key'],B=z[0x0]?.['key'],C=d?.['nodes']['find'](ax=>/return/i['test'](ax)),D=a['steps']['some'](ax=>{if(ax['op']==='configure'&&ax['method']==='arbitrations'){const ay=ax['params']['objects'];return Array['isArray'](ay)&&ay['length']>0x0;}if(ax['op']==='create'&&ax['object']==='service'){const az=ax['params']['arbitrations'];return Array['isArray'](az)&&az['length']>0x0;}return![];});let E,F=![];for(const ax of a['steps']){if(ax['op']==='configure'&&ax['method']==='compensation_fund_add'){F=!![];const ay=numericAmount(ax['params']['balance']);if(ay!==undefined)E=(E??0x0)+ay;}}let G,H;const I=az=>{if(!Array['isArray'](az))return;for(const aA of az){const aB=numericAmount(aA?.['price']);aB!==undefined&&aB>0x0&&(G=Math['max'](G??0x0,aB),H=H===undefined?aB:Math['min'](H,aB));}};for(const az of a['steps']){if(az['op']==='create'&&az['object']==='service')I(az['params']['sales']);if(az['op']==='configure'&&az['method']==='sales')I(az['params']['sales']);}const J=E!==undefined&&G!==undefined,K=createsOf(a,'reward')['length']>0x0;let L,M;if(K)for(const aA of a['steps']){if(aA['op']==='configure'&&aA['method']==='guard_add'){const aB=aA['params']['amount'];if(aB!==undefined&&aB!==null&&aB['type']==='Fixed'){const aC=numericAmount(aB['value']);if(aC!==undefined)L=Math['max'](L??0x0,aC);}}if(aA['op']==='configure'&&aA['method']==='coin_add'&&/^reward/['test'](aA['id'])){const aD=numericAmount(aA['params']['coin']);if(aD!==undefined)M=(M??0x0)+aD;}}const N=L!==undefined&&H!==undefined,O=/^(arb\.indemnity|arb\.order|arb\.status|order\.dispute)/,P=/settled|refunded|reviewed|completed|closed|cancel/i;let Q;if(d!==undefined)for(const aE of d['edges']){if(aE['next']===''||aE['guards']['length']===0x0)continue;if(!P['test'](aE['prev']))continue;if(aE['guards']['some'](aF=>b['get'](aF)?.['queries']['some'](aG=>O['test'](aG)))){Q=aE['prev'];break;}}const R=Q!==undefined&&(!F||E===0x0),S=new Map();for(const aF of createsOf(a,'guard')){S['set'](aF['id'],aF['params']['root']??aF['params']['logic']);}const T=d?.['edges']??[],U=aG=>aG['guards']['length']===0x0||aG['guards']['every'](aH=>{const aI=S['get'](aH);return aI===undefined||guardWindowOpen(aI);});let V;for(const aG of T){if(aG['prev']!==''||aG['next']==='')continue;const aH=T['filter'](aI=>aI['prev']===aG['next']);if(aH['length']===0x0)continue;if(aH['every'](aI=>!U(aI)))V??=aG['next'];}const W=c['some'](aI=>aI['guardStep']===undefined&&aI['guardKey']!==undefined),X=T['filter'](aI=>aI['guards']['length']>0x0&&aI['guards']['some'](aJ=>b['get'](aJ)?.['queries']['some'](aK=>O['test'](aK))));let Y=![];if(X['length']>0x0&&!W){const aI=new Set(X['map'](aL=>aL['next'])['filter'](aL=>aL!=='')),aJ=new Set(X['flatMap'](aL=>aL['guards'])),aK=new Set();for(const aL of c){const aM=aL['guardStep']===undefined?undefined:b['get'](aL['guardStep']);if(aM===undefined)continue;if(aM['acceptedNodes']['length']>0x0){for(const aN of aM['acceptedNodes'])aK['add'](aN);}else for(const aO of T){aO['next']!==''&&aO['guards']['includes'](aL['guardStep'])&&aK['add'](aO['next']);}}for(const aP of c){const aQ=aP['guardStep']===undefined?undefined:b['get'](aP['guardStep']);if(aQ===undefined)continue;if(aQ['queries']['some'](aR=>O['test'](aR))||aJ['has'](aP['guardStep'])){Y=!![];break;}}if(!Y)for(const aR of aI){if(aK['has'](aR)){Y=!![];break;}}}const Z=X['length']>0x0&&!Y&&!W,a0=X[0x0]===undefined?undefined:X[0x0]['prev']!==''?X[0x0]['prev']:X[0x0]['next'],a1=[];for(const aS of a['steps']){const aT=aS['op']==='create'&&aS['object']==='service',aU=aS['op']==='configure'&&aS['method']==='sales';if(!aT&&!aU)continue;const aV=aS['params'];if(typeof aV['description']==='string')a1['push'](aV['description']);if(!Array['isArray'](aV['sales']))continue;for(const aW of aV['sales']){if(typeof aW!=='object'||aW===null)continue;for(const aX of Object['values'](aW)){if(typeof aX==='string')a1['push'](aX);}}}const a2=a1['flatMap'](aY=>extractProseWindowPromises(aY)),a3=collectEnforcedWindowMs(a),a4=a2['filter'](aY=>!a3['has'](aY['ms'])),a5=[];for(const aY of a1){const aZ=UNANCHORED_RESTART_RE['exec'](aY);if(aZ)a5['push'](aZ[0x0]);}const a6=c['filter'](b0=>b0['track']==='refund'),a7=a6['map'](b0=>b0['guardStep']===undefined?undefined:b['get'](b0['guardStep']))['find'](b0=>b0!==undefined&&!b0['queries']['some'](b1=>b1['startsWith']('order.claimed_by')))?.['stepId'],a8=new Map();for(const b0 of d?.['edges']??[]){for(const b1 of b0['guards']){const b2=a8['get'](b1)??[];if(b0['prev']!=='')b2['push'](b0['prev']);if(b0['next']!=='')b2['push'](b0['next']);a8['set'](b1,b2);}}let a9,aa=![];for(const b3 of b['values']()){if(b3['queries']['some'](isPathDependentTimeQuery)){a9??=b3['stepId'];if(d!==undefined){const b4=[...b3['acceptedNodes'],...a8['get'](b3['stepId'])??[]];for(const b5 of b4){if(pathCountCap2(d['edges'],b5)>=0x2){aa=!![],a9=b3['stepId'];break;}}}}if(aa)break;}const ab=[...b['values']()]['flatMap'](b6=>b6['queries']);let ac;for(const b6 of WRITE_ONLY_ENFORCEMENT_SOURCES){for(const b7 of createsOf(a,b6['object'])){if(b6['extract'](b7)&&!ab['some'](b8=>b8['startsWith'](b6['coverQuery']))){ac=b6['param'];break;}}if(ac!==undefined)break;}const ad=new Set();for(const b8 of a['steps']){if(b8['op']==='create'&&b8['object']==='guard')continue;const b9=refsOf(b8['op']==='publish'?b8['target']:b8['params']);for(const ba of b9)ad['add'](ba);if(b8['op']==='configure'){for(const bb of refsOf(b8['target']))ad['add'](bb);}}const ae=[...b['keys']()]['find'](bc=>!ad['has'](bc)),af=[...b['values']()]['find'](bc=>!h&&bc['queries']['some'](bd=>bd['startsWith']('repository.')))?.['stepId'];let ag;if(f&&d!==undefined)for(const bc of d['forwardGuardRefs']){const bd=b['get'](bc);if(bd===undefined)continue;const be=bd['table']['some'](bf=>bf['identifier']===TASK_BINDING_SLOT&&bf['b_submission']===!![]);if(!be){ag=bc;break;}}let ah;for(const bf of c){if(bf['guardStep']===undefined||bf['identifierLegs']['length']===0x0)continue;const bg=b['get'](bf['guardStep']);if(bg===undefined)continue;for(const bh of bf['identifierLegs']){const bi=bg['table']['find'](bj=>bj['identifier']===bh);if(bi===undefined||bi['b_submission']!==!![]||bi['value_type']!=='Address'){ah='slot\x20'+bh+'\x20of\x20guard\x20\x27'+bf['guardStep']+'\x27';break;}}if(ah!==undefined)break;}const ai=new Set();for(const bj of createsOf(a,'repository')){const bk=bj['params']['policies'];if(!Array['isArray'](bk))continue;for(const bl of bk){const bm=bl?.['name'];if(typeof bm==='string')ai['add'](bm);}}const aj=[];if(ai['size']>0x0)for(const bn of createsOf(a,'guard')){const bo=Array['isArray'](bn['params']['table'])?bn['params']['table']:[];for(const bp of collectRepoWhereQueries(bn['params']['root']??bn['params']['logic'])){const bq=staticStringOperand(bp['key'],bo);if(bq===undefined)continue;if(!isPlanLocalObjectOperand(bp['object'],bo))continue;!ai['has'](bq)&&aj['push']('\x27'+bq+'\x27\x20in\x20guard\x20\x27'+bn['id']+'\x27');}}const ak=new Set();for(const br of createsOf(a,'repository')){const bs=br['params']['policies'];if(!Array['isArray'](bs))continue;for(const bt of bs){const bu=bt?.['write_guard'];if(!Array['isArray'](bu))continue;for(const bv of bu){const bw=bv?.['guard'],bx=isRef(bw)?bw['$ref']:bw;if(typeof bx==='string')ak['add'](bx);}}}let al,am=0x0;for(const by of createsOf(a,'guard')){if(!ak['has'](by['id']))continue;rootNegatesRepoDataHas(by['params']['root']??by['params']['logic'])&&(am++,al??=by['id']);}let an,ao=0x0;for(const bz of createsOf(a,'service')){const bA=bz['params']['customer_required'];if(!Array['isArray'](bA)||bA['length']===0x0)continue;bz['params']['buy_guard']===undefined&&(ao++,an??=bz['id']);}let ap,aq=0x0;for(const bB of d?.['edges']??[]){if(bB['prev']===''||bB['guards']['length']===0x0)continue;for(const bC of bB['guards']){const bD=b['get'](bC);if(bD===undefined||bD['acceptedNodes']['length']===0x0)continue;!bD['acceptedNodes']['includes'](bB['prev'])&&(aq++,ap??=bC+'\x20on\x20edge\x20'+bB['prev']+'->'+bB['next']+'\x20(guard\x20pins\x20progress.current\x20in\x20'+('['+bD['acceptedNodes']['join'](',\x20')+']\x20—\x20never\x20\x27'+bB['prev']+'\x27)'));}}const ar=[];for(const bE of createsOf(a,'guard')){const bF=reachLegsOf(bE);ar['push'](...findReachContradictions(bE['id'],bF['legs'],bF['selfStrict']));}return{'has_service':f,'has_machine':d!==undefined,'has_repository':h,'sales_step_present':i,'allocator_row_count':c['length'],'refund_row_count':a6['length'],'terminal_count':l['length'],'terminal_nodes_display':l['join'](',\x20'),'pending_allocator_guard_count':x,'pending_guard_total':w['length'],...u===undefined?{}:{'first_uncovered_terminal':u},...a7===undefined?{}:{'first_refund_guard_missing_claimed_by':a7},...a9===undefined?{}:{'first_path_dependent_anchor':a9},'path_sensitive':aa,...ac===undefined?{}:{'first_write_only_unenforced_field':ac},...ae===undefined?{}:{'first_orphan_guard':ae},...af===undefined?{}:{'first_repo_query_without_repository':af},'repo_write_once_guard_count':am,...al===undefined?{}:{'first_repo_write_once_guard':al},'customer_required_unbacked_count':ao,...an===undefined?{}:{'first_customer_required_unbacked':an},...ag===undefined?{}:{'first_edge_guard_missing_254':ag},'node_mismatched_guard_count':aq,...ap===undefined?{}:{'first_node_mismatched_guard':ap},'guard_reach_contradiction_count':ar['length'],...ar['length']>0x0?{'first_guard_reach_contradiction':ar[0x0],'guard_reach_contradiction_display':ar['join'](';\x20')}:{},...ah===undefined?{}:{'first_alloc_slot_missing':ah},...A===undefined?{}:{'first_pending_fund_guard':A,'pending_fund_guard_count':y['length'],'pending_fund_guard_keys_display':y['map'](bG=>bG['key'])['join'](',\x20')},...B===undefined?{}:{'first_pending_buy_guard':B,'pending_buy_guard_count':z['length'],'pending_buy_guard_keys_display':z['map'](bG=>bG['key'])['join'](',\x20')},'has_return_rail':C!==undefined,...C===undefined?{}:{'return_rail_node':C},'has_arbitration_binding':D,'fund_topup_present':F,...E===undefined?{}:{'fund_topup_amount':E},...J?{'fund_ceiling_breach':E<MAX_INDEMNITY_MULTIPLE*G,'fund_ceiling_basis':MAX_INDEMNITY_MULTIPLE+'x\x20the\x20highest\x20SKU\x20price','fund_concurrent_orders_coverable':Math['floor'](E/(MAX_INDEMNITY_MULTIPLE*G))}:{},'fund_ceiling_unverifiable':F&&!J,...L!==undefined?{'reward_bounty_amount':L,...M!==undefined?{'reward_funding_amount':M}:{},...M!==undefined&&L>0x0?{'reward_max_claims':Math['floor'](M/L)}:{},...N?{'lowest_sku_price':H,'reward_scale_breach':L>0.5*H,'reward_scale_ratio_display':(L/H)['toFixed'](0x2)+'x\x20the\x20cheapest\x20SKU\x20price'}:{'reward_scale_unverifiable':!![]}}:{},...R?{'first_arb_exit_node':Q,'fund_arb_route_unfunded':!![]}:{},...V===undefined?{}:{'entry_no_open_exit':!![],'entry_strand_node':V},...Z&&a0!==undefined?{'arb_promise_without_settle_rail':!![],'arb_promise_node':a0}:{},...X['length']>0x0&&W&&a0!==undefined?{'arb_key_plane_opaque':!![],'arb_key_plane_node':a0}:{},...a2['length']>0x0?{'prose_window_promise_count':a2['length'],'enforced_window_ms_display':[...a3]['sort']((bG,bH)=>bG-bH)['map'](formatMs)['join'](',\x20')||'none',...a4['length']>0x0?{'prose_time_mismatch_count':a4['length'],'first_prose_time_mismatch':a4[0x0]['quote'],'prose_time_mismatch_display':a4['map'](bG=>bG['quote'])['join'](';\x20')}:{}}:{},...a5['length']>0x0?{'unanchored_window_promise_count':a5['length'],'first_unanchored_window_promise':a5[0x0]}:{},...ai['size']>0x0?{'repo_policy_keys_display':[...ai]['join'](',\x20'),...aj['length']>0x0?{'repo_gate_key_unbacked_count':aj['length'],'first_repo_gate_key_unbacked':aj[0x0],'repo_gate_key_unbacked_display':aj['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,6 +1,6 @@
|
|
|
1
1
|
import type { IndustryTemplate } from "../knowledge/template-loader.js";
|
|
2
2
|
import type { JsonValue, Plan } from "./plan.js";
|
|
3
|
-
export type CompilableTemplate = Pick<IndustryTemplate, "id" | "machine_shape" | "guards" | "allocator" | "fee_params" | "arbitration_mode" | "conditional_guards" | "review_mode" | "after_sales_mode" | "acceptance_mode" | "installment_mode" | "affiliate_mode" | "crowdfunding_mode" | "logistics_mode" | "compensation_fund_policy"> & {
|
|
3
|
+
export type CompilableTemplate = Pick<IndustryTemplate, "id" | "machine_shape" | "guards" | "allocator" | "fee_params" | "arbitration_mode" | "conditional_guards" | "review_mode" | "after_sales_mode" | "acceptance_mode" | "installment_mode" | "affiliate_mode" | "crowdfunding_mode" | "logistics_mode" | "compensation_fund_policy" | "settlement_window_merge"> & {
|
|
4
4
|
build_notes?: string[];
|
|
5
5
|
};
|
|
6
6
|
export interface GuardSpec {
|
|
@@ -32,7 +32,7 @@ export type GuardResolution = {
|
|
|
32
32
|
} | {
|
|
33
33
|
kind: "omit";
|
|
34
34
|
};
|
|
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_COMPLEMENT_INVALID" | "ALLOCATOR_FIX_UNSUPPORTED" | "REVIEW_NODE_MISSING" | "REVIEW_REWARD_GUARD_MISSING" | "REVIEW_REWARD_UNFUNDED" | "REVIEW_REWARD_AMOUNT_MISSING" | "REVIEW_REWARD_EVIDENCE_NO_STAMP" | "COMPENSATION_FUND_REQUIRED" | "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_SIGNER_KEYED_ROWS" | "CROWDFUNDING_DISCLOSURE_MISSING" | "POLICY_KEY_UNRESOLVED" | "CREDENTIAL_CYCLE" | "NAMED_OPERATOR_RAIL_CONFLICT" | "NAMED_OPERATOR_ROSTER_UNDISCLOSED" | "FORWARD_GUARD_IDENTITY_NAMED_CONFLICT" | "LOGISTICS_COURIER_RAIL_MISSING" | "LOGISTICS_COURIER_FEE_POOLED" | "LOGISTICS_PICKUP_CUTOFF_MISSING" | "LOGISTICS_CARRIER_EVIDENCE_MISSING" | "LOGISTICS_TRANSIT_LOSS_UNCOVERED" | "LOGISTICS_DISPATCH_UNDISCLOSED" | "PERMISSION_INDEX_DROPPED" | "RELEASE_EDGE_PERMISSIONLESS";
|
|
35
|
+
export type CompileBlockerCode = "MACHINE_EDGES_MISSING" | "SELECTOR_VALUE_UNKNOWN" | "EDGE_UNKNOWN_PREV" | "GUARD_CYCLE" | "RELEASE_EDGE_NO_IDENTITY" | "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_COMPLEMENT_INVALID" | "RATE_SUM_INVALID" | "ALLOCATOR_FIX_UNSUPPORTED" | "REVIEW_NODE_MISSING" | "REVIEW_REWARD_GUARD_MISSING" | "REVIEW_REWARD_UNFUNDED" | "REVIEW_REWARD_AMOUNT_MISSING" | "REVIEW_REWARD_EVIDENCE_NO_STAMP" | "COMPENSATION_FUND_REQUIRED" | "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_SIGNER_KEYED_ROWS" | "CROWDFUNDING_DISCLOSURE_MISSING" | "POLICY_KEY_UNRESOLVED" | "CREDENTIAL_CYCLE" | "NAMED_OPERATOR_RAIL_CONFLICT" | "NAMED_OPERATOR_ROSTER_UNDISCLOSED" | "FORWARD_GUARD_IDENTITY_NAMED_CONFLICT" | "LOGISTICS_COURIER_RAIL_MISSING" | "LOGISTICS_COURIER_FEE_POOLED" | "LOGISTICS_PICKUP_CUTOFF_MISSING" | "LOGISTICS_CARRIER_EVIDENCE_MISSING" | "LOGISTICS_TRANSIT_LOSS_UNCOVERED" | "LOGISTICS_DISPATCH_UNDISCLOSED" | "PERMISSION_INDEX_DROPPED" | "RELEASE_EDGE_PERMISSIONLESS" | "FEE_PARAM_COUPLING_MISMATCH" | "WINDOW_MATH_MISMATCH" | "INCENTIVE_RATING_FLOOR_MISMATCH" | "MONEY_RAIL_CALLER_LEG_MISSING" | "CAMPAIGN_DEADLINE_CONFLICT" | "MERGED_LOCK_MISMATCH";
|
|
36
36
|
export declare function normalizeInlineGuardTable(table: unknown[], base: string): unknown[];
|
|
37
37
|
export interface CompileBlocker {
|
|
38
38
|
code: CompileBlockerCode;
|
|
@@ -43,6 +43,7 @@ export interface CompileOptions {
|
|
|
43
43
|
intent?: string;
|
|
44
44
|
merchantPermissionIndex?: number;
|
|
45
45
|
guardResolutions?: Record<string, GuardResolution>;
|
|
46
|
+
buildTimeMs?: number;
|
|
46
47
|
}
|
|
47
48
|
export interface CompileResult {
|
|
48
49
|
plan: Plan;
|