@wowok/agent-mcp 3.3.5 → 3.3.7
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/eval-order.d.ts +17 -0
- package/dist/chain-semantics/eval-order.js +1 -0
- 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/index.d.ts +1 -0
- package/dist/chain-semantics/index.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 +2 -1
- package/dist/composition/compile.js +1 -1
- package/dist/composition/materialize.js +1 -1
- package/dist/data/api/api.spec.d.ts +1 -0
- package/dist/data/api/api.spec.js +1 -0
- package/dist/data/api/cli.d.ts +1 -0
- package/dist/data/api/cli.js +1 -0
- package/dist/data/api/head.d.ts +16 -0
- package/dist/data/api/head.js +1 -0
- package/dist/data/api/head.spec.d.ts +1 -0
- package/dist/data/api/head.spec.js +1 -0
- package/dist/data/api/index.d.ts +2 -0
- package/dist/data/api/index.js +1 -0
- package/dist/data/api/match.d.ts +69 -0
- package/dist/data/api/match.js +1 -0
- package/dist/data/api/match.spec.d.ts +1 -0
- package/dist/data/api/match.spec.js +1 -0
- package/dist/data/api/server.d.ts +12 -0
- package/dist/data/api/server.js +1 -0
- package/dist/data/projection/cli.d.ts +1 -0
- package/dist/data/projection/cli.js +1 -0
- package/dist/data/projection/edges.d.ts +8 -0
- package/dist/data/projection/edges.js +1 -0
- package/dist/data/projection/edges.spec.d.ts +1 -0
- package/dist/data/projection/edges.spec.js +1 -0
- package/dist/data/projection/facets.d.ts +18 -0
- package/dist/data/projection/facets.js +1 -0
- package/dist/data/projection/facets.spec.d.ts +1 -0
- package/dist/data/projection/facets.spec.js +1 -0
- package/dist/data/projection/facts.d.ts +40 -0
- package/dist/data/projection/facts.js +1 -0
- package/dist/data/projection/index.d.ts +6 -0
- package/dist/data/projection/index.js +1 -0
- package/dist/data/projection/project.d.ts +10 -0
- package/dist/data/projection/project.js +1 -0
- package/dist/data/projection/projection.spec.d.ts +1 -0
- package/dist/data/projection/projection.spec.js +1 -0
- package/dist/data/projection/schema.d.ts +1 -0
- package/dist/data/projection/schema.js +1 -0
- package/dist/data/projection/store.d.ts +49 -0
- package/dist/data/projection/store.js +1 -0
- package/dist/data/projection/types.d.ts +137 -0
- package/dist/data/projection/types.js +1 -0
- package/dist/data/sync/cdc.d.ts +34 -0
- package/dist/data/sync/cdc.js +1 -0
- package/dist/data/sync/cdc.spec.d.ts +1 -0
- package/dist/data/sync/cdc.spec.js +1 -0
- package/dist/data/sync/graphql-source.d.ts +16 -0
- package/dist/data/sync/graphql-source.js +1 -0
- package/dist/data/sync/index.d.ts +5 -0
- package/dist/data/sync/index.js +1 -0
- package/dist/data/sync/reconciler.d.ts +14 -0
- package/dist/data/sync/reconciler.js +1 -0
- package/dist/data/sync/reconciler.spec.d.ts +1 -0
- package/dist/data/sync/reconciler.spec.js +1 -0
- package/dist/data/sync/schema.d.ts +1 -0
- package/dist/data/sync/schema.js +1 -0
- package/dist/data/sync/store.d.ts +19 -0
- package/dist/data/sync/store.js +1 -0
- package/dist/data/sync/sync.spec.d.ts +1 -0
- package/dist/data/sync/sync.spec.js +1 -0
- package/dist/data/sync/synchronizer.d.ts +10 -0
- package/dist/data/sync/synchronizer.js +1 -0
- package/dist/data/sync/types.d.ts +162 -0
- package/dist/data/sync/types.js +1 -0
- package/dist/evaluation/builtins/demand-match.js +1 -1
- package/dist/evaluation/builtins/graph-service.spec.js +1 -1
- package/dist/evaluation/capability.d.ts +1 -0
- package/dist/evaluation/engine.js +1 -1
- package/dist/evaluation/extract.d.ts +7 -1
- package/dist/evaluation/extract.js +1 -1
- package/dist/evaluation/match-policy.d.ts +142 -0
- package/dist/evaluation/match-policy.js +1 -0
- package/dist/evaluation/match-policy.spec.d.ts +1 -0
- package/dist/evaluation/match-policy.spec.js +1 -0
- package/dist/experience/realtime-feedback.js +1 -1
- package/dist/extensions/business-modules.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/intent/types.d.ts +1 -1
- package/dist/intent/types.js +1 -1
- package/dist/keeper/detectors.d.ts +3 -0
- package/dist/keeper/detectors.js +1 -1
- package/dist/keeper/keeper.spec.js +1 -1
- package/dist/knowledge/allocator-rail-verifier.js +1 -1
- package/dist/knowledge/arbitration-ledger.js +1 -1
- package/dist/knowledge/audit-rules.js +1 -1
- package/dist/knowledge/baselines/rules/plan.json +113 -3
- package/dist/knowledge/builtin-templates.d.ts +6 -1
- package/dist/knowledge/builtin-templates.js +1 -1
- package/dist/knowledge/event-semantics.js +1 -1
- package/dist/knowledge/getting-started.js +1 -1
- package/dist/knowledge/guard-design-patterns.d.ts +1 -1
- package/dist/knowledge/guard-design-patterns.js +1 -1
- package/dist/knowledge/guard-ledger.js +1 -1
- package/dist/knowledge/guard-puzzle.js +1 -1
- package/dist/knowledge/guard-render.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-generalizer.d.ts +4 -0
- package/dist/knowledge/industry-generalizer.js +1 -1
- package/dist/knowledge/industry-registry.js +1 -1
- package/dist/knowledge/jsonrpc-enum.d.ts +26 -10
- package/dist/knowledge/jsonrpc-enum.js +1 -1
- package/dist/knowledge/projection.d.ts +54 -0
- package/dist/knowledge/projection.js +1 -0
- package/dist/knowledge/projection.spec.d.ts +1 -0
- package/dist/knowledge/projection.spec.js +1 -0
- package/dist/knowledge/recipient-constraint.d.ts +1 -1
- package/dist/knowledge/recipient-constraint.js +1 -1
- package/dist/knowledge/semantic-ir.d.ts +113 -0
- package/dist/knowledge/semantic-ir.js +1 -0
- package/dist/knowledge/service-ledger.d.ts +1 -1
- package/dist/knowledge/service-ledger.js +1 -1
- package/dist/knowledge/strategy-manuals.js +1 -1
- package/dist/knowledge/template-loader.d.ts +34 -0
- package/dist/knowledge/template-loader.js +1 -1
- package/dist/knowledge/template-prose.d.ts +50 -0
- package/dist/knowledge/template-prose.js +1 -0
- package/dist/knowledge/template-registry.js +1 -1
- package/dist/knowledge/template-scanner.d.ts +1 -1
- package/dist/knowledge/template-scanner.js +1 -1
- package/dist/knowledge/tools-reference.js +1 -1
- package/dist/monitor/MonitorLoop.js +1 -1
- package/dist/monitor/normalize.d.ts +1 -1
- package/dist/monitor/normalize.js +1 -1
- package/dist/monitor/types.js +1 -1
- package/dist/playbooks/service-build/business-puzzle.js +1 -1
- package/dist/playbooks/service-build/machine-panorama.js +1 -1
- package/dist/playbooks/service-build/merchant-guide.d.ts +4 -0
- package/dist/playbooks/service-build/merchant-guide.js +1 -1
- package/dist/playbooks/service-build/migration-planner.d.ts +2 -1
- package/dist/playbooks/service-build/migration-planner.js +1 -1
- package/dist/playbooks/service-build/mode-actions.d.ts +7 -0
- package/dist/playbooks/service-build/mode-actions.js +1 -1
- package/dist/playbooks/service-build/object-panorama.d.ts +22 -1
- package/dist/playbooks/service-build/object-panorama.js +1 -1
- 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/reverse-mapping-nk4.spec.js +1 -1
- package/dist/playbooks/service-build/reverse-mapping.d.ts +1 -0
- package/dist/playbooks/service-build/reverse-mapping.js +1 -1
- 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/review/index.js +1 -1
- package/dist/role/profiles.js +1 -1
- package/dist/safety/confirm-gate.js +1 -1
- package/dist/schema/benchmark-migration/index.d.ts +64 -10
- 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/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/proof.js +1 -1
- package/dist/schema/call/reward.d.ts +10 -0
- package/dist/schema/call/reward.js +1 -1
- package/dist/schema/call/semantic.js +1 -1
- package/dist/schema/call/service.js +1 -1
- package/dist/schema/common/index.js +1 -1
- package/dist/schema/evaluation/index.d.ts +341 -0
- package/dist/schema/evaluation/index.js +1 -1
- package/dist/schema/goal/index.d.ts +2 -0
- package/dist/schema/goal/planning.d.ts +3 -0
- package/dist/schema/goal/planning.js +1 -1
- package/dist/schema/industry-pack/index.d.ts +62 -0
- package/dist/schema/industry-pack/modes.d.ts +62 -0
- package/dist/schema/industry-pack/modes.js +1 -1
- package/dist/schema/intent-radar/index.d.ts +3 -0
- package/dist/schema/intent-radar/index.js +1 -1
- package/dist/schema/local/index.d.ts +20 -0
- package/dist/schema/local/index.js +1 -1
- package/dist/schema/operations.d.ts +5 -0
- package/dist/schema/query/bi.d.ts +4 -0
- package/dist/schema/query/bi.js +1 -1
- package/dist/schema/query/index.d.ts +145 -47
- package/dist/schema/query/index.js +1 -1
- package/dist/schema/schema-version.js +1 -1
- package/dist/schema-query-impl/index.js +1 -1
- package/dist/schemas/account_operation.output.json +2 -0
- package/dist/schemas/benchmark_migration_operation.output.json +42 -0
- package/dist/schemas/benchmark_migration_operation.schema.json +208 -5
- package/dist/schemas/bridge_operation.output.json +2 -0
- package/dist/schemas/evaluation_operation.output.json +624 -2
- package/dist/schemas/evaluation_operation.schema.json +598 -4
- package/dist/schemas/goal_operation.schema.json +18 -10
- package/dist/schemas/index.json +1 -1
- package/dist/schemas/industry_pack_operation.output.json +86 -2
- package/dist/schemas/industry_pack_operation.schema.json +199 -0
- package/dist/schemas/intent_radar.output.json +2 -0
- package/dist/schemas/intent_radar.schema.json +1 -0
- package/dist/schemas/local_cache_operation.output.json +2 -0
- package/dist/schemas/local_history_operation.output.json +2 -0
- package/dist/schemas/local_info_operation.output.json +2 -0
- package/dist/schemas/local_mark_operation.output.json +2 -0
- package/dist/schemas/onchain_events.output.json +281 -11
- package/dist/schemas/onchain_events.schema.json +5 -1
- package/dist/schemas/onchain_operations.output.json +2 -0
- package/dist/schemas/onchain_operations.schema.json +914 -314
- package/dist/schemas/onchain_operations_allocation.schema.json +1 -1
- package/dist/schemas/onchain_operations_arbitration.schema.json +1 -1
- package/dist/schemas/onchain_operations_gen_proof.schema.json +1 -1
- package/dist/schemas/onchain_operations_guard.schema.json +660 -94
- package/dist/schemas/onchain_operations_reward.schema.json +35 -1
- package/dist/schemas/onchain_operations_service.schema.json +4 -4
- package/dist/schemas/query_toolkit.output.json +333 -0
- package/dist/tools/handlers/benchmark-migration.d.ts +5 -2
- 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/intent-radar.js +1 -1
- package/dist/tools/handlers/messenger.d.ts +1 -0
- package/dist/tools/handlers/messenger.js +1 -1
- package/dist/tools/handlers/onchain.d.ts +2 -0
- package/dist/tools/handlers/onchain.js +1 -1
- package/dist/tools/handlers/query.js +1 -1
- package/dist/tools/handlers/wip.js +1 -1
- package/dist/tools/index.js +1 -1
- package/dist/tools/registry/agent.js +1 -1
- package/dist/tools/registry/business.js +1 -1
- package/dist/tools/registry/query.js +1 -1
- package/dist/tools/wip-verify-ledger.d.ts +14 -0
- package/dist/tools/wip-verify-ledger.js +1 -0
- package/dist/tools/wrap.d.ts +4 -0
- package/dist/tools/wrap.js +1 -1
- package/package.json +7 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
export const CORE_BUSINESS_MODULES=[{'id':'milestone_escrow','name':'Milestone\x20Escrow','description':'Funds\x20held\x20in\x20Order\x20and\x20released\x20per\x20milestone\x20completion.\x20Protects\x20both\x20merchant\x20and\x20user.','objectTypes':['service','machine','order','allocation'],'templateRefs':[{'template_id':'freelance-machine','object_type':'machine','purpose':'Milestone\x20workflow\x20with\x20accept/reject\x20nodes'},{'template_id':'milestone-allocation','object_type':'allocation','purpose':'Per-milestone\x20fund\x20release'}],'requiredConstraints':[{'constraint_id':'order_allocators_bound','description':'Order\x20must\x20have\x20allocators\x20bound\x20before\x20publish','level':'hard','blocking':!![]},{'constraint_id':'machine_published','description':'Machine\x20must\x20be\x20published\x20and\x20bound\x20to\x20Service','level':'hard','blocking':!![]},{'constraint_id':'milestone_forward_guarded','description':'Each\x20milestone\x20forward\x20must\x20have\x20a\x20guard','level':'soft','blocking':![]}],'evaluationImpact':[{'dimension':'fund_safety','effect':'boost','description':'Escrow\x20ensures\x20funds\x20not\x20released\x20until\x20verification'},{'dimension':'escrow_quality','effect':'required','description':'Module\x20requires\x20proper\x20escrow\x20configuration'},{'dimension':'operational_risk','effect':'boost','description':'Milestones\x20reduce\x20single-point\x20delivery\x20risk'}],'industryFit':{'freelance':0x5f,'education':0x50,'rental':0x3c,'retail':0x28,'subscription':0x1e,'travel':0x32,'licensing':0x55,'crowdfunding':0x55,'general':0x46},'addressesPainPoints':['Client\x20never\x20approves\x20deliverables','Merchant\x20delivers\x20but\x20cannot\x20get\x20paid','Full\x20upfront\x20payment\x20with\x20no\x20delivery\x20guarantee'],'intentSignals':[/milestone/i,/escrow/i,/pay(ment)? (per|on|at|upon) (each )?(milestone|stage|delivery|approval)/i,/staged? (payment|release)/i,/progress payment/i,/hold funds until/i],'userProtections':['Funds\x20held\x20in\x20escrow\x20until\x20milestone\x20verified','Can\x20reject\x20substandard\x20deliverables','Refund\x20for\x20unstarted\x20milestones'],'merchantObligations':['Must\x20deliver\x20each\x20milestone\x20to\x20defined\x20acceptance\x20criteria','Must\x20configure\x20Machine\x20with\x20proper\x20forward\x20guards'],'requiresKeeper':!![],'keeperHint':'Keeper\x20must\x20monitor\x20Machine\x20node\x20timeouts\x20and\x20trigger\x20adminUnhold\x20if\x20user\x20does\x20not\x20respond'},{'id':'independent_arbitration','name':'Independent\x20Arbitration','description':'Third-party\x20arbitration\x20with\x20Guard-weighted\x20voting.\x20Arbitration\x20Permission\x20MUST\x20differ\x20from\x20Service\x20Permission\x20(contract-enforced).','objectTypes':['arb','permission','guard'],'templateRefs':[{'template_id':'arbitration-3-voters','object_type':'arb','purpose':'3-voter\x20arbitration\x20with\x20weighted\x20voting'},{'template_id':'voting-guard-weighted','object_type':'guard','purpose':'Vote\x20weight\x20from\x20Guard\x20config'}],'requiredConstraints':[{'constraint_id':'arbitration_permission_independent','description':'Arbitration.permission\x20!=\x20Service.permission','level':'hard','blocking':!![]},{'constraint_id':'voting_guard_configured','description':'At\x20least\x20one\x20voting_guard\x20must\x20be\x20configured','level':'soft','blocking':![]},{'constraint_id':'arbitration_bound_to_service','description':'Arbitration\x20must\x20be\x20in\x20Service.arbitrations\x20list','level':'hard','blocking':!![]}],'evaluationImpact':[{'dimension':'arbitration_coverage','effect':'required','description':'Module\x20requires\x20arbitration\x20configuration'},{'dimension':'arbitration_fairness','effect':'required','description':'Independent\x20permission\x20ensures\x20neutrality'},{'dimension':'governance_risk','effect':'boost','description':'Reduces\x20platform-as-judge\x20risk'}],'industryFit':{'freelance':0x5a,'education':0x4b,'rental':0x55,'retail':0x4b,'subscription':0x3c,'travel':0x50,'licensing':0x5a,'crowdfunding':0x50,'general':0x46},'addressesPainPoints':['Platform\x20acts\x20as\x20both\x20judge\x20and\x20party','Arbitration\x20fees\x20too\x20high\x20for\x20small\x20claims','No\x20binding\x20dispute\x20resolution'],'intentSignals':[/arbitrat/i,/dispute/i,/mediat/i,/third[ -]?party (resolution|judgement|judgment|venue)/i,/voting/i,/ruling/i,/appeal/i],'userProtections':['Independent\x20arbitrators\x20(not\x20merchant\x20or\x20platform)','Guard-weighted\x20voting\x20prevents\x20Sybil\x20attacks','Micro-arbitration:\x20no\x20per-case\x20fees'],'merchantObligations':['Must\x20accept\x20arbitration\x20verdict','Must\x20maintain\x20compensation_fund\x20for\x20indemnities'],'requiresKeeper':![]},{'id':'wip_provenance','name':'WIP\x20Provenance','description':'Work-in-progress\x20hash\x20commitments\x20on-chain\x20via\x20Repository.\x20Prevents\x20tampering\x20of\x20delivery\x20evidence.','objectTypes':['repository','guard','proof'],'templateRefs':[{'template_id':'wip-hash-guard','object_type':'guard','purpose':'Verify\x20WIP\x20hash\x20matches\x20commitment'},{'template_id':'delivery-proof','object_type':'proof','purpose':'On-chain\x20delivery\x20confirmation'}],'requiredConstraints':[{'constraint_id':'repository_published','description':'Repository\x20must\x20be\x20published','level':'hard','blocking':!![]},{'constraint_id':'wip_hash_before_delivery','description':'WIP\x20hash\x20must\x20be\x20committed\x20before\x20delivery','level':'soft','blocking':![]}],'evaluationImpact':[{'dimension':'proof_integrity','effect':'required','description':'WIP\x20hash\x20provides\x20tamper-proof\x20evidence'},{'dimension':'transparency','effect':'boost','description':'On-chain\x20commitment\x20is\x20publicly\x20verifiable'}],'industryFit':{'freelance':0x5a,'education':0x55,'rental':0x5f,'retail':0x46,'subscription':0x3c,'travel':0x46,'licensing':0x5f,'crowdfunding':0x55,'general':0x4b},'addressesPainPoints':['Evidence\x20stored\x20on\x20platform\x20servers\x20can\x20be\x20tampered','No\x20proof\x20of\x20pre-delivery\x20state\x20(e.g.\x20rental\x20condition)','Dispute\x20resolution\x20relies\x20on\x20trust\x20in\x20platform'],'intentSignals':[/\bwip\b/i,/work[ -]?in[ -]?progress/i,/\bhash\b/i,/evidence/i,/tamper/i,/proof of (work|progress|delivery)/i],'userProtections':['WIP\x20hash\x20commitment\x20is\x20immutable\x20on-chain','Guard\x20automatically\x20verifies\x20hash\x20match','Repository\x20history\x20is\x20auditable'],'merchantObligations':['Must\x20commit\x20WIP\x20hash\x20at\x20defined\x20checkpoints','Must\x20use\x20Repository\x20for\x20evidence\x20storage'],'requiresKeeper':![]},{'id':'multi_tier_allocation','name':'Multi-Tier\x20Allocation','description':'Order\x20funds\x20automatically\x20split\x20among\x20multiple\x20recipients.\x20Fully\x20transparent\x20on-chain.','objectTypes':['allocation','treasury','payment'],'templateRefs':[{'template_id':'multi-tier-allocation','object_type':'allocation','purpose':'Waterfall\x20fund\x20distribution'},{'template_id':'supplier-waterfall','object_type':'allocation','purpose':'Supplier\x20payment\x20tiers'}],'requiredConstraints':[{'constraint_id':'allocators_configured','description':'Allocators\x20must\x20be\x20configured\x20with\x20recipients','level':'hard','blocking':!![]},{'constraint_id':'sharing_sum_100','description':'Allocation\x20percentages\x20must\x20sum\x20to\x20100%','level':'hard','blocking':!![]},{'constraint_id':'platform_fee_zero','description':'Platform\x20fee\x20should\x20be\x200\x20or\x20user-defined','level':'soft','blocking':![]}],'evaluationImpact':[{'dimension':'fee_transparency','effect':'required','description':'All\x20allocations\x20visible\x20on-chain'},{'dimension':'supplier_visibility','effect':'boost','description':'Supplier\x20payments\x20are\x20auditable'}],'industryFit':{'freelance':0x3c,'education':0x32,'rental':0x28,'retail':0x50,'subscription':0x46,'travel':0x5f,'licensing':0x62,'crowdfunding':0x50,'general':0x46},'addressesPainPoints':['Multi-layer\x20commission\x20hidden\x20from\x20users','Suppliers\x20paid\x20opaquely','Platform\x20takes\x20undisclosed\x20FX\x20spread'],'intentSignals':[/multi[ -]?tier/i,/waterfall/i,/\bsplit/i,/divide/i,/distribut/i,/tiered payout/i],'userProtections':['Full\x20allocation\x20waterfall\x20visible\x20on-chain','No\x20hidden\x20fees','Can\x20verify\x20supplier\x20payments'],'merchantObligations':['Must\x20declare\x20all\x20allocation\x20recipients\x20upfront','Cannot\x20change\x20allocation\x20after\x20publish'],'requiresKeeper':![]},{'id':'subscription_with_proof','name':'Subscription\x20with\x20Delivery\x20Proof','description':'Each\x20billing\x20cycle\x20requires\x20proof\x20of\x20content\x20delivery\x20before\x20charging.\x20Prevents\x20creator\x20abandonment.','objectTypes':['service','guard','repository','progress'],'templateRefs':[{'template_id':'subscription-machine','object_type':'machine','purpose':'Cycle-based\x20workflow'},{'template_id':'delivery-guard-cycle','object_type':'guard','purpose':'Verify\x20content\x20delivery\x20per\x20cycle'}],'requiredConstraints':[{'constraint_id':'delivery_guard_per_cycle','description':'Each\x20cycle\x20must\x20have\x20a\x20delivery\x20guard','level':'hard','blocking':!![]},{'constraint_id':'repository_updated','description':'Repository\x20must\x20be\x20updated\x20with\x20cycle\x20content\x20hash','level':'soft','blocking':![]}],'evaluationImpact':[{'dimension':'content_commitment','effect':'required','description':'Delivery\x20proof\x20required\x20before\x20each\x20charge'},{'dimension':'timeout_protection','effect':'boost','description':'Cycles\x20enforce\x20regular\x20delivery'}],'industryFit':{'freelance':0x28,'education':0x55,'rental':0x1e,'retail':0x14,'subscription':0x62,'travel':0x1e,'licensing':0x28,'crowdfunding':0x19,'general':0x32},'addressesPainPoints':['Creator\x20abandons\x20after\x20collecting\x20subscriptions','Silent\x20auto-renewal\x20with\x20no\x20delivery\x20proof','No\x20mechanism\x20to\x20hold\x20creators\x20accountable'],'intentSignals':[/subscri/i,/recurring/i,/billing cycle/i,/auto[ -]?renew/i,/renewal/i,/membership/i],'userProtections':['Payment\x20only\x20after\x20delivery\x20proof\x20verified','Can\x20cancel\x20if\x20delivery\x20guard\x20fails','Cycle\x20history\x20on-chain'],'merchantObligations':['Must\x20deliver\x20content\x20and\x20commit\x20hash\x20each\x20cycle','Must\x20configure\x20delivery_guard\x20per\x20cycle'],'requiresKeeper':!![],'keeperHint':'Keeper\x20triggers\x20cycle\x20transitions\x20and\x20verifies\x20delivery_guard\x20conditions'},{'id':'accept_timeout_protection','name':'Accept\x20Timeout\x20Protection','description':'If\x20user\x20does\x20not\x20accept/reject\x20within\x20N\x20days,\x20auto-accept\x20advances\x20the\x20Machine.\x20Protects\x20merchant\x20from\x20indefinite\x20stalls.','objectTypes':['machine','guard'],'templateRefs':[{'template_id':'timeout-forward','object_type':'machine','purpose':'Forward\x20with\x20time_guard\x20+\x20adminUnhold\x20fallback'}],'requiredConstraints':[{'constraint_id':'time_guard_configured','description':'time_guard\x20must\x20be\x20set\x20on\x20accept\x20forward','level':'hard','blocking':!![]},{'constraint_id':'adminUnhold_permission','description':'Admin\x20must\x20have\x20PROGRESS_UNHOLD\x20(224)\x20permission','level':'soft','blocking':![]}],'evaluationImpact':[{'dimension':'timeout_protection','effect':'required','description':'Auto-advance\x20prevents\x20indefinite\x20user\x20stalls'},{'dimension':'operational_risk','effect':'boost','description':'Reduces\x20delivery\x20timeline\x20uncertainty'}],'industryFit':{'freelance':0x5f,'education':0x46,'rental':0x50,'retail':0x3c,'subscription':0x28,'travel':0x3c,'licensing':0x55,'crowdfunding':0x46,'general':0x4b},'addressesPainPoints':['Buyer\x20never\x20approves\x20deliverables\x20(common\x20on\x20incumbent\x20talent\x20marketplaces)','Merchant\x20cash\x20flow\x20blocked\x20by\x20inactive\x20buyer','Infinite\x20revision\x20loops\x20without\x20resolution'],'intentSignals':[/timeout/i,/time[ -]?out/i,/auto[ -]?accept/i,/never (approves?|responds?|accepts?)/i,/unresponsive/i,/inactive (buyer|client)/i,/\bstall/i,/\bdeadline\b/i],'userProtections':['Still\x20has\x20full\x20N\x20days\x20to\x20review\x20and\x20reject','Rejection\x20triggers\x20arbitration\x20if\x20configured'],'merchantObligations':['Must\x20configure\x20time_guard\x20on\x20forward','Timeout\x20value\x20comes\x20from\x20the\x20template\x27s\x20window\x20fee_params\x20(e.g.\x20escrow_release_days;\x20override\x20per\x20build\x20via\x20fee_overrides)\x20—\x20never\x20a\x20hardcoded\x20number'],'requiresKeeper':!![],'keeperHint':'Keeper\x20monitors\x20time_guard\x20deadlines\x20and\x20advances\x20the\x20timeout\x20forward\x20when\x20the\x20window\x20elapses\x20(adminUnhold\x20is\x20only\x20the\x20hold-release\x20escape\x20hatch,\x20never\x20the\x20timeout\x20path)'},{'id':'refund_guarantee','name':'Refund\x20Guarantee','description':'Service\x20maintains\x20compensation_fund\x20for\x20refunds.\x20Refund_guard\x20validates\x20eligibility\x20and\x20transfers\x20funds\x20back\x20to\x20Order.','objectTypes':['service','guard','order'],'templateRefs':[{'template_id':'refund-guard','object_type':'guard','purpose':'Validate\x20refund\x20eligibility'}],'requiredConstraints':[{'constraint_id':'compensation_fund_positive','description':'compensation_fund_add\x20>\x200','level':'hard','blocking':!![]},{'constraint_id':'refund_guard_configured','description':'Service\x20must\x20have\x20refund_guard','level':'soft','blocking':![]}],'evaluationImpact':[{'dimension':'fund_safety','effect':'boost','description':'Compensation\x20fund\x20backs\x20refund\x20promise'},{'dimension':'consumer_diligence','effect':'boost','description':'Shows\x20merchant\x20confidence\x20in\x20service\x20quality'}],'industryFit':{'freelance':0x46,'education':0x55,'rental':0x5a,'retail':0x5f,'subscription':0x50,'travel':0x55,'licensing':0x4b,'crowdfunding':0x5f,'general':0x50},'addressesPainPoints':['Refund\x20trapped\x20in\x20incumbent\x20platform\x20balance','No\x20refund\x20mechanism\x20for\x20service\x20failure','Refund\x20decision\x20centralized\x20at\x20platform'],'intentSignals':[/refund/i,/money[ -]?back/i,/guarantee/i],'userProtections':['Refund\x20goes\x20back\x20to\x20Order\x20(not\x20platform\x20balance)','Guard\x20validates\x20eligibility\x20(not\x20platform\x20discretion)','Compensation\x20fund\x20guarantees\x20liquidity'],'merchantObligations':['Must\x20maintain\x20compensation_fund\x20>\x200','Must\x20configure\x20refund_guard\x20rules'],'requiresKeeper':![]},{'id':'reputation_on_chain','name':'On-Chain\x20Reputation','description':'Merchant\x20and\x20user\x20behavior\x20permanently\x20recorded\x20on\x20Registrar.\x20Evaluations,\x20completions,\x20and\x20disputes\x20contribute\x20to\x20reputation\x20score.','objectTypes':['service','order','arb'],'templateRefs':[],'requiredConstraints':[{'constraint_id':'service_published','description':'Service\x20must\x20be\x20published\x20to\x20accumulate\x20reputation','level':'soft','blocking':![]}],'evaluationImpact':[{'dimension':'reputation_verifiability','effect':'required','description':'On-chain\x20history\x20is\x20tamper-proof'},{'dimension':'trust','effect':'boost','description':'Reputation\x20signals\x20reduce\x20information\x20asymmetry'}],'industryFit':{'freelance':0x5a,'education':0x50,'rental':0x55,'retail':0x5a,'subscription':0x55,'travel':0x50,'licensing':0x50,'crowdfunding':0x41,'general':0x55},'addressesPainPoints':['Fake\x20reviews\x20and\x20rating\x20manipulation','No\x20cross-platform\x20reputation\x20portability','Platform\x20can\x20delete\x20negative\x20reviews'],'intentSignals':[/reputation/i,/\breviews?\b/i,/\brating/i,/track record/i,/feedback/i],'userProtections':['Reputation\x20is\x20on-chain\x20and\x20immutable','Can\x20verify\x20merchant\x27s\x20complete\x20transaction\x20history','Dispute\x20outcomes\x20affect\x20reputation\x20permanently'],'merchantObligations':['All\x20service\x20interactions\x20become\x20part\x20of\x20permanent\x20record','Cannot\x20hide\x20negative\x20outcomes'],'requiresKeeper':![]},{'id':'supplier_collaboration','name':'Supplier\x20Collaboration','description':'Enable\x20merchant\x20to\x20delegate\x20sub-services\x20to\x20suppliers\x20with\x20transparent\x20payment\x20splitting.\x20No\x20platform\x20intermediary.','objectTypes':['service','allocation','demand'],'templateRefs':[{'template_id':'supplier-demand','object_type':'demand','purpose':'Create\x20sub-service\x20demand\x20for\x20suppliers'},{'template_id':'supplier-allocation','object_type':'allocation','purpose':'Split\x20order\x20payment\x20with\x20suppliers'}],'requiredConstraints':[{'constraint_id':'demand_configured','description':'Demand\x20must\x20reference\x20main\x20Service','level':'soft','blocking':![]},{'constraint_id':'allocation_sharing_configured','description':'Allocation\x20sharing\x20must\x20include\x20suppliers','level':'hard','blocking':!![]}],'evaluationImpact':[{'dimension':'supplier_visibility','effect':'required','description':'Supplier\x20payments\x20transparent\x20on-chain'},{'dimension':'governance_risk','effect':'boost','description':'No\x20platform\x20controls\x20supplier\x20relationships'}],'industryFit':{'freelance':0x3c,'education':0x46,'rental':0x28,'retail':0x55,'subscription':0x32,'travel':0x5a,'licensing':0x41,'crowdfunding':0x1e,'general':0x3c},'addressesPainPoints':['Supplier\x20payments\x20opaque\x20to\x20end\x20user','Platform\x20controls\x20supplier\x20relationships','No\x20direct\x20merchant-supplier\x20collaboration'],'intentSignals':[/supplier/i,/subcontract/i,/outsourc/i,/vendor/i,/sub[ -]?service/i,/delegate to/i],'userProtections':['Can\x20see\x20all\x20suppliers\x20involved\x20in\x20service','Supplier\x20payments\x20are\x20on-chain\x20auditable','Merchant\x20remains\x20accountable\x20for\x20supplier\x20quality'],'merchantObligations':['Must\x20declare\x20all\x20suppliers\x20upfront','Must\x20ensure\x20supplier\x20deliverables\x20meet\x20criteria'],'requiresKeeper':![]},{'id':'damage_attestation','name':'Damage\x20Attestation','description':'Rental-specific:\x20pre/post\x20condition\x20photos\x20hashed\x20to\x20Repository.\x20Guard\x20compares\x20hashes\x20to\x20automatically\x20enforce\x20damage\x20deductions.','objectTypes':['repository','guard','service'],'templateRefs':[{'template_id':'rental-condition-guard','object_type':'guard','purpose':'Compare\x20pre/post\x20rental\x20condition\x20hashes'},{'template_id':'condition-repository','object_type':'repository','purpose':'Store\x20rental\x20condition\x20evidence'}],'requiredConstraints':[{'constraint_id':'pre_rental_hash','description':'Pre-rental\x20condition\x20hash\x20must\x20be\x20committed','level':'hard','blocking':!![]},{'constraint_id':'post_rental_hash','description':'Post-rental\x20condition\x20hash\x20must\x20be\x20committed','level':'hard','blocking':!![]}],'evaluationImpact':[{'dimension':'proof_integrity','effect':'required','description':'Condition\x20hashes\x20prevent\x20tampering'},{'dimension':'arbitration_fairness','effect':'boost','description':'Objective\x20evidence\x20reduces\x20dispute\x20bias'}],'industryFit':{'freelance':0x14,'education':0x1e,'rental':0x62,'retail':0x28,'subscription':0x14,'travel':0x3c,'licensing':0x19,'crowdfunding':0x14,'general':0x28},'addressesPainPoints':['Landlord\x20claims\x20damage\x20without\x20proof\x20(common\x20on\x20incumbent\x20short-stay\x20platforms)','No\x20mandatory\x20pre-rental\x20photo\x20(vehicle-rental\x20damage\x20claims\x20denied)','Platform\x20arbitrates\x20damage\x20disputes\x20opaquely'],'intentSignals':[/damage/i,/condition (photo|report|check|record)/i,/pre[ -]?rental/i,/post[ -]?rental/i,/attest/i,/wear and tear/i],'userProtections':['Pre-rental\x20hash\x20commits\x20baseline\x20condition','Guard\x20automatically\x20compares\x20post-rental\x20state','Cannot\x20be\x20charged\x20for\x20pre-existing\x20damage'],'merchantObligations':['Must\x20commit\x20pre-rental\x20condition\x20hash','Must\x20commit\x20post-rental\x20condition\x20hash','Must\x20use\x20Repository\x20for\x20evidence\x20storage'],'requiresKeeper':!![],'keeperHint':'Keeper\x20triggers\x20post-rental\x20hash\x20collection\x20and\x20initiates\x20damage\x20Guard\x20comparison'},{'id':'discount_lifecycle','name':'Discount\x20Lifecycle','description':'Coupon\x20promotions\x20bound\x20to\x20a\x20Service\x20(percentage\x20or\x20fixed-amount\x20off):\x20minted\x20to\x20recipients,\x20redeemed\x20automatically\x20at\x20buy,\x20burned\x20on\x20use.\x20Chain\x20truth:\x20a\x20redeemed\x20coupon\x27s\x20balance\x20decrements\x20PERMANENTLY\x20(no\x20restock,\x20no\x20revert),\x20and\x20standing\x20renewal\x20discounts\x20are\x20NOT\x20constructible\x20(the\x20renew\x20path\x20has\x20no\x20discount\x20hook\x20—\x20every\x20renewal\x20re-prices\x20from\x20the\x20SKU\x20price).','objectTypes':['service'],'templateRefs':[],'requiredConstraints':[{'constraint_id':'discount_budget_planned','description':'Total\x20discount\x20budget\x20(max_uses\x20x\x20discount_value)\x20planned\x20before\x20minting\x20—\x20the\x20burn\x20is\x20irreversible','level':'hard','blocking':!![]},{'constraint_id':'discount_burn_disclosed','description':'Burn-on-use\x20semantics\x20(permanent\x20decrement,\x20no\x20revert)\x20disclosed\x20in\x20the\x20promotion\x20terms','level':'hard','blocking':!![]},{'constraint_id':'discount_renewal_disclosed','description':'\x27First\x20period\x20X%\x20off,\x20then\x20standard\x27\x20disclosed\x20in\x20the\x20listing/WIP\x20BEFORE\x20purchase\x20(renewals\x20re-price\x20from\x20the\x20SKU\x20price\x20—\x20anti-dark-pattern)','level':'soft','blocking':![]}],'evaluationImpact':[{'dimension':'promotion_integrity','effect':'required','description':'Coupon\x20budget\x20and\x20burn\x20semantics\x20are\x20planned\x20and\x20disclosed,\x20never\x20improvised'},{'dimension':'fee_transparency','effect':'boost','description':'The\x20discounted\x20price\x20at\x20redemption\x20is\x20computed\x20by\x20the\x20chain,\x20not\x20asserted\x20by\x20prose'}],'industryFit':{'freelance':0x2d,'education':0x46,'rental':0x32,'retail':0x5f,'subscription':0x55,'travel':0x50,'licensing':0x3c,'crowdfunding':0x37,'general':0x46},'addressesPainPoints':['Coupon\x20systems\x20locked\x20inside\x20incumbent\x20platforms','Promotions\x20improvised\x20after\x20publish\x20with\x20no\x20budget\x20plan','Discount\x20promises\x20that\x20silently\x20change\x20at\x20renewal'],'intentSignals':[/coupon/i,/discount/i,/\bpromo/i,/voucher/i,/percentage off/i,/first[ -]?period off/i],'userProtections':['Redemption\x20is\x20computed\x20on-chain\x20at\x20buy\x20(no\x20manual\x20discount\x20approval)','Renewal\x20price\x20is\x20the\x20SKU\x20price\x20—\x20a\x20first-period\x20coupon\x20cannot\x20silently\x20renew\x20at\x20the\x20discounted\x20price','Expired\x20coupons\x20cannot\x20redeem'],'merchantObligations':['Plan\x20the\x20total\x20discount\x20budget\x20(max_uses\x20x\x20value)\x20before\x20minting','Disclose\x20burn-on-use\x20and\x20renewal\x20re-pricing\x20in\x20the\x20promotion\x20terms','Never\x20promise\x20a\x20standing\x20renewal\x20discount\x20(not\x20constructible\x20on-chain)'],'requiresKeeper':![]},{'id':'praise_incentive','name':'Review\x20Praise\x20Incentive','description':'Sale-time-planned\x20claim\x20Reward\x20for\x20buyer\x20reviews\x20(template\x20review_mode\x20\x27review_reward\x27):\x20the\x20build\x20emits\x20the\x20Reward\x20object,\x20attaches\x20the\x20replay-armed\x20claim\x20guard,\x20binds\x20it\x20to\x20the\x20Service,\x20and\x20funds\x20it\x20via\x20the\x20reward_funding\x20input\x20—\x20so\x20the\x20incentive\x20is\x20perceivable\x20by\x20the\x20buyer\x20BEFORE\x20ordering,\x20and\x20an\x20unfunded\x20or\x20unguarded\x20incentive\x20promise\x20must\x20not\x20publish.','objectTypes':['service','reward','guard'],'templateRefs':[],'requiredConstraints':[{'constraint_id':'reward_pool_funded','description':'reward_funding\x20input\x20present\x20at\x20build\x20(an\x20unfunded\x20incentive\x20promise\x20must\x20not\x20publish)','level':'hard','blocking':!![]},{'constraint_id':'reward_claim_replay_armed','description':'Claim\x20guard\x20carries\x20the\x20record-gate\x20idempotency\x20leg\x20(replay-drain\x20target\x20otherwise)','level':'hard','blocking':!![]}],'evaluationImpact':[{'dimension':'trust','effect':'boost','description':'Funded,\x20perceivable\x20review\x20incentives\x20raise\x20honest\x20review\x20volume'},{'dimension':'promotion_integrity','effect':'required','description':'Incentive\x20terms\x20are\x20chain-enforced\x20(funded\x20pool\x20+\x20guarded\x20claim),\x20not\x20prose\x20promises'}],'industryFit':{'freelance':0x4b,'education':0x41,'rental':0x2d,'retail':0x55,'subscription':0x4b,'travel':0x41,'licensing':0x2d,'crowdfunding':0x2d,'general':0x41},'addressesPainPoints':['No\x20mechanism\x20to\x20incentivize\x20honest\x20buyer\x20reviews','Review\x20rewards\x20locked\x20inside\x20incumbent\x20platforms','Incentive\x20promises\x20that\x20evaporate\x20after\x20purchase'],'intentSignals':[/incentive/i,/reward/i,/cashback/i,/rebate/i,/bonus/i,/\btips?\b/i],'userProtections':['Incentive\x20perceivable\x20BEFORE\x20ordering\x20(funded\x20at\x20build,\x20not\x20after)','Claim\x20terms\x20chain-enforced\x20with\x20replay\x20protection','Rating\x20polarity\x20recorded\x20as\x20range-queryable\x20on-chain\x20rows\x20(1-5\x20rating\x20column)'],'merchantObligations':['Fund\x20the\x20reward\x20pool\x20at\x20build\x20time\x20(reward_funding)','Keep\x20the\x20claim\x20guard\x20replay-armed\x20(record-gate\x20leg)','Disclose\x20claim\x20terms\x20in\x20the\x20listing/WIP\x20promise'],'requiresKeeper':![]},{'id':'after_sales_guarantee','name':'After-Sales\x20Guarantee','description':'Declared\x20buyer\x20after-sales\x20remedy\x20(template\x20after_sales_mode\x20\x27return\x27\x20|\x20\x27exchange\x27\x20|\x20\x27warranty\x27):\x20the\x20machine_shape\x20ships\x20the\x20backing\x20rail\x20(e.g.\x20return_requested\x20->\x20returned),\x20riding\x20a\x20claimed_by\x20polarity\x20pair\x20—\x20the\x20refund\x20leg\x20pays\x20the\x20buyer\x20at\x20claimed_by\x20none,\x20the\x20merchant-recovery\x20leg\x20at\x20claimed_by\x20some\x20—\x20with\x20the\x20remedy\x20window\x20anchored\x20on\x20the\x20delivered\x20ENTRY\x20time\x20so\x20a\x20buyer\x20cannot\x20stall\x20the\x20merchant,\x20and\x20de-conflicted\x20against\x20settlement\x20so\x20refund\x20and\x20ruling\x20payouts\x20never\x20double-pay.','objectTypes':['machine','guard','allocation','order'],'templateRefs':[],'requiredConstraints':[{'constraint_id':'after_sales_rail_present','description':'machine_shape\x20carries\x20a\x20node\x20backing\x20the\x20declared\x20after_sales_mode\x20(compile\x20AFTER_SALES_RAIL_MISSING\x20/\x20scanner\x20R-AFTER-SALES-RAIL)','level':'hard','blocking':!![]},{'constraint_id':'after_sales_polarity_pair','description':'refund\x20leg\x20claimed_by\x20some==false\x20paired\x20with\x20merchant-recovery\x20leg\x20some==true\x20(INV-C1,\x20RAIL_POLARITY_COLLISION\x20backstop)','level':'hard','blocking':!![]},{'constraint_id':'after_sales_window_anchored','description':'remedy\x20window\x20anchored\x20on\x20the\x20delivered\x20ENTRY\x20time,\x20not\x20a\x20drifting\x20current_time\x20(INV-C2,\x20TIME-ANCHOR-01)','level':'hard','blocking':!![]},{'constraint_id':'after_sales_no_double_remedy','description':'after-sales\x20refund\x20and\x20arbitration/award\x20payout\x20are\x20mutually\x20exclusive\x20rails\x20(INV-C3,\x20DUAL-RAIL-01)','level':'soft','blocking':![]}],'evaluationImpact':[{'dimension':'fund_safety','effect':'required','description':'The\x20claimed_by\x20polarity\x20pair\x20means\x20an\x20order\x20is\x20refunded\x20OR\x20recovered,\x20never\x20both'},{'dimension':'consumer_diligence','effect':'boost','description':'A\x20declared,\x20structurally-backed\x20remedy\x20window\x20is\x20verifiable\x20before\x20purchase'}],'industryFit':{'freelance':0x28,'education':0x2d,'rental':0x46,'retail':0x62,'subscription':0x23,'travel':0x37,'licensing':0x41,'crowdfunding':0x37,'general':0x3c},'addressesPainPoints':['Return/refund\x20policy\x20locked\x20inside\x20incumbent\x20platforms','No\x20enforced\x20return\x20window\x20—\x20buyer\x20stalls\x20or\x20merchant\x20refuses','Refund\x20and\x20dispute\x20payout\x20both\x20fire\x20(double-pay)','Exchange/warranty\x20promised\x20in\x20prose\x20with\x20no\x20on-chain\x20rail'],'intentSignals':[/after[ -]?sales/i,/\breturn/i,/exchange/i,/warranty/i,/remedy/i],'userProtections':['Remedy\x20window\x20is\x20chain-anchored\x20on\x20delivery\x20entry\x20(verifiable,\x20not\x20merchant\x20discretion)','Refund\x20returns\x20to\x20the\x20Order\x20(not\x20a\x20platform\x20balance)','The\x20polarity\x20pair\x20guarantees\x20exactly\x20one\x20remedy\x20pays'],'merchantObligations':['Ship\x20the\x20backing\x20rail\x20for\x20the\x20declared\x20after_sales_mode','Anchor\x20the\x20remedy\x20window\x20on\x20the\x20delivered\x20entry\x20time','Keep\x20the\x20refund\x20and\x20recovery\x20legs\x20a\x20claimed_by\x20polarity\x20pair\x20(never\x20both\x20satisfiable)'],'requiresKeeper':![]},{'id':'acceptance_judging','name':'Acceptance\x20&\x20Judging','description':'Declared\x20acceptance_mode\x20(\x27milestone\x27\x20|\x20\x27contest\x27\x20|\x20\x27bounty\x27\x20|\x20\x27agent\x27):\x20who\x20decides\x20the\x20escrow\x20releases\x20and\x20how\x20many\x20redelivery\x20rounds\x20are\x20allowed.\x20A\x20judge-decided\x20mode\x20routes\x20the\x20release\x20decision\x20to\x20an\x20independent\x20venue\x20(arbitration_mode\x20\x27third_party\x27)\x20so\x20the\x20payout-owing\x20party\x20never\x20self-adjudicates;\x20a\x20finite\x20revision_rounds_max\x20is\x20backed\x20by\x20a\x20counter\x20Repository\x20guard\x20because\x20the\x20chain\x20bounds\x20edges,\x20not\x20visits;\x20the\x20acceptance\x20and\x20timeout\x20siblings\x20are\x20distinct\x20forwards\x20so\x20the\x20buyer\x27s\x20approval\x20and\x20the\x20auto-accept\x20deadline\x20never\x20race\x20into\x20one\x20node.','objectTypes':['machine','guard','allocation','arb','repository'],'templateRefs':[],'requiredConstraints':[{'constraint_id':'acceptance_judge_independent','description':'a\x20judge-decided\x20acceptance_mode\x20(contest/bounty/agent)\x20declares\x20arbitration_mode\x20\x27third_party\x27\x20(INV-A3,\x20compile\x20ACCEPTANCE_JUDGE_NOT_INDEPENDENT\x20/\x20scanner\x20R-ACCEPTANCE-JUDGE)','level':'hard','blocking':!![]},{'constraint_id':'acceptance_revision_bounded','description':'a\x20finite\x20revision_rounds_max\x20is\x20backed\x20by\x20a\x20counter\x20Repository\x20guard,\x20or\x20declared\x20\x27unlimited\x27\x20(INV-A1,\x20compile\x20ACCEPTANCE_REVISION_UNBOUNDED\x20/\x20scanner\x20R-ACCEPTANCE-REVISION)','level':'hard','blocking':!![]},{'constraint_id':'acceptance_race_free','description':'the\x20acceptance\x20forward\x20and\x20its\x20timeout\x20complement\x20are\x20distinct\x20siblings,\x20never\x20a\x20dual-prev\x20race\x20into\x20one\x20node\x20(INV-A2,\x20widened\x20R-REVIEW-NORACE)','level':'soft','blocking':![]}],'evaluationImpact':[{'dimension':'arbitration_fairness','effect':'required','description':'A\x20judge-decided\x20release\x20routes\x20through\x20an\x20independent\x20venue,\x20not\x20the\x20payout-owing\x20party'},{'dimension':'fund_safety','effect':'boost','description':'A\x20finite\x20revision\x20cap\x20the\x20chain\x20can\x20actually\x20enforce\x20(counter-backed)\x20prevents\x20an\x20unbounded\x20redelivery\x20drain'},{'dimension':'operational_risk','effect':'boost','description':'Distinct\x20accept/timeout\x20siblings\x20keep\x20the\x20buyer\x27s\x20decision\x20and\x20the\x20auto-accept\x20deadline\x20from\x20deadlocking\x20the\x20node'}],'industryFit':{'freelance':0x60,'education':0x37,'rental':0x1e,'retail':0x23,'subscription':0x1e,'travel':0x28,'licensing':0x4b,'crowdfunding':0x23,'general':0x3c},'addressesPainPoints':['Contest/bounty\x20winner\x20picked\x20by\x20the\x20party\x20holding\x20the\x20escrow\x20(self-adjudication)','Revision\x20rounds\x20promised\x20as\x20finite\x20in\x20prose\x20but\x20unbounded\x20on-chain\x20(progress.move\x20caps\x20edges,\x20not\x20visits)','Buyer\x20approval\x20and\x20auto-accept\x20timeout\x20racing\x20into\x20one\x20node\x20(deadlock\x20or\x20double-advance)','Agent-task\x20evaluator\x20not\x20identity-bound\x20to\x20the\x20delivery'],'intentSignals':[/acceptance/i,/judg(e|ing)/i,/contest/i,/bounty/i,/revision/i,/redeliver/i,/deliverable approv/i,/who decides/i],'userProtections':['A\x20judge-decided\x20release\x20is\x20ruled\x20by\x20an\x20independent\x20venue,\x20verifiable\x20before\x20purchase','A\x20finite\x20revision\x20cap\x20is\x20genuinely\x20enforceable\x20(counter\x20guard),\x20not\x20a\x20prose\x20promise','Auto-accept\x20only\x20fires\x20on\x20its\x20own\x20distinct\x20timeout\x20forward,\x20never\x20by\x20racing\x20the\x20buyer\x27s\x20decision'],'merchantObligations':['Declare\x20arbitration_mode\x20\x27third_party\x27\x20for\x20any\x20judge-decided\x20acceptance_mode','Back\x20a\x20finite\x20revision_rounds_max\x20with\x20a\x20counter\x20Repository\x20guard,\x20or\x20declare\x20it\x20\x27unlimited\x27\x20honestly','Keep\x20the\x20acceptance\x20and\x20timeout\x20forwards\x20distinct\x20siblings\x20(distinct\x20forward\x20names)'],'requiresKeeper':!![],'keeperHint':'A\x20judge-decided\x20acceptance\x20needs\x20a\x20keeper\x20to\x20push\x20the\x20ruling/placement\x20terminal\x20forward\x20once\x20the\x20independent\x20venue\x20decides;\x20the\x20accept-timeout\x20forward\x20also\x20needs\x20a\x20keeper\x20at\x20the\x20window\x20deadline'},{'id':'installment_deposit','name':'Installment\x20&\x20Deposit','description':'Declared\x20installment_mode\x20(\x27deposit_balance\x27\x20|\x20\x27milestone_n\x27):\x20the\x20buyer\x20pays\x20in\x20stages\x20—\x20a\x20deposit\x20now\x20and\x20the\x20balance\x20later,\x20or\x20N\x20milestone\x20captures.\x20Each\x20later\x20capture\x20rides\x20the\x20one-PTB\x20order_renew\x20call\x20(fund\x20+\x20record\x20+\x20advance).\x20PRE-STATE\x20CONSTRAINT\x20(esound-mn-261021\x20B-1,\x20mainnet-verified):\x20a\x20guard\x20reading\x20allocation.balance\x20sees\x20only\x20the\x20COMMITTED\x20pre-transaction\x20balance\x20—\x20the\x20same-PTB\x20payment\x20is\x20INVISIBLE\x20to\x20it,\x20so\x20a\x20balance-gated\x20capture\x20forward\x20ALWAYS\x20aborts\x20when\x20advanced\x20by\x20order_renew.\x20A\x20capture\x20forward\x20therefore\x20EITHER\x20binds\x20the\x20fund\x20gate\x20and\x20draws\x20on\x20funds\x20committed\x20in\x20a\x20prior\x20transaction\x20(prepaid-full\x20at\x20buy\x20—\x20staged-release\x20semantics),\x20OR\x20is\x20gate-less\x20and\x20relies\x20on\x20this\x20module\x27s\x20order_renew\x20routing\x20to\x20land\x20the\x20funds;\x20every\x20deposit-held\x20state\x20carries\x20a\x20refund/cancel\x20exit\x20rail\x20(a\x20full\x20refund\x20or\x20a\x20declared\x20kill\x20fee)\x20because\x20the\x20chain\x20imposes\x20no\x20obligation\x20to\x20pay\x20the\x20balance,\x20so\x20a\x20buyer\x20who\x20walks\x20away\x20never\x20strands\x20the\x20paid\x20portion.','objectTypes':['machine','guard','allocation','order','payment'],'templateRefs':[],'requiredConstraints':[{'constraint_id':'installment_funding_gated','description':'every\x20capture\x20forward\x20(a\x20due\x20state\x20advancing\x20into\x20a\x20paid\x20state)\x20either\x20binds\x20a\x20fund-gate\x20Guard\x20reading\x20allocation.balance\x20(satisfiable\x20only\x20against\x20funds\x20committed\x20in\x20a\x20PRIOR\x20transaction\x20—\x20prepaid\x20shape,\x20INV-B1,\x20compile\x20INSTALLMENT_FUNDING_UNGATED\x20/\x20scanner\x20R-INSTALLMENT-FUNDING)\x20or\x20is\x20gate-less\x20and\x20relies\x20on\x20the\x20order_renew\x20routing\x20to\x20land\x20the\x20funds\x20same-PTB\x20(a\x20balance\x20gate\x20+\x20same-PTB\x20order_renew\x20ALWAYS\x20aborts\x20—\x20esound-mn-261021\x20B-1)','level':'soft','blocking':![]},{'constraint_id':'installment_deposit_exit','description':'every\x20deposit-held\x20state\x20carries\x20a\x20refund/cancel/forfeit\x20exit\x20rail\x20so\x20the\x20paid\x20portion\x20is\x20never\x20stranded\x20(INV-B2,\x20compile\x20INSTALLMENT_DEPOSIT_STRANDED\x20/\x20scanner\x20R-INSTALLMENT-DEPOSIT)','level':'soft','blocking':![]},{'constraint_id':'installment_release_once','description':'the\x20release\x20allocator\x20is\x20once_per_order\x20and\x20order-anchored\x20so\x20a\x20replay\x20cannot\x20re-capture\x20(INV-B3,\x20rides\x20the\x20existing\x20E-2\x20/\x20once-slot\x20/\x20order-anchor\x20audit)','level':'soft','blocking':![]}],'evaluationImpact':[{'dimension':'fund_safety','effect':'required','description':'The\x20capture\x20cannot\x20zero-value-advance:\x20gate-less\x20captures\x20land\x20funds\x20via\x20the\x20order_renew\x20routing;\x20balance-gated\x20captures\x20draw\x20on\x20prior-transaction\x20funds\x20(PRE-STATE\x20CONSTRAINT\x20—\x20same-PTB\x20funding\x20is\x20invisible\x20to\x20guards,\x20esound-mn-261021\x20B-1)'},{'dimension':'consumer_diligence','effect':'boost','description':'A\x20declared\x20deposit-exit\x20policy\x20(full\x20refund\x20vs\x20kill\x20fee)\x20is\x20verifiable\x20before\x20the\x20buyer\x20commits\x20the\x20deposit'},{'dimension':'operational_risk','effect':'boost','description':'once_per_order\x20+\x20order\x20anchor\x20on\x20the\x20release\x20keeps\x20a\x20replay\x20from\x20re-capturing\x20or\x20double-releasing'}],'industryFit':{'freelance':0x46,'education':0x2d,'rental':0x37,'retail':0x5a,'subscription':0x28,'travel':0x32,'licensing':0x1e,'crowdfunding':0x37,'general':0x3c},'addressesPainPoints':['Pre-order\x20/\x20deposit-then-balance\x20sales\x20locked\x20inside\x20incumbent\x20platforms','A\x20later\x20payment\x20recorded\x20without\x20the\x20funds\x20actually\x20landing\x20(zero-value\x20advance)','A\x20buyer\x20who\x20walks\x20away\x20strands\x20the\x20deposit\x20with\x20no\x20on-chain\x20exit','Milestone\x20billing\x20where\x20a\x20replay\x20re-charges\x20or\x20double-releases'],'intentSignals':[/installment/i,/deposit/i,/pay in stages/i,/down[ -]?payment/i,/balance (later|afterwards?)/i,/part(ial)? payment/i,/staged? payment/i],'userProtections':['A\x20capture\x20forward\x20cannot\x20zero-value-advance\x20(gate-less\x20captures\x20land\x20funds\x20via\x20the\x20order_renew\x20routing;\x20balance-gated\x20captures\x20require\x20prior-transaction\x20funds)','The\x20deposit-exit\x20policy\x20is\x20declared\x20and\x20structurally\x20backed\x20before\x20purchase','The\x20release\x20is\x20once-per-order\x20and\x20order-anchored,\x20so\x20no\x20replay\x20double-charges'],'merchantObligations':['Give\x20every\x20capture\x20forward\x20a\x20funding\x20story:\x20gate-less\x20+\x20order_renew\x20routing,\x20or\x20a\x20balance\x20fund\x20gate\x20fed\x20by\x20PRIOR-transaction\x20funds\x20(prepaid\x20shape\x20—\x20a\x20gate\x20plus\x20same-PTB\x20order_renew\x20always\x20aborts,\x20esound-mn-261021\x20B-1)','Ship\x20a\x20deposit-exit\x20rail\x20(refund\x20or\x20declared\x20kill\x20fee)\x20from\x20every\x20deposit-held\x20state','Make\x20the\x20release\x20allocator\x20once_per_order\x20and\x20order-anchored','Disclose\x20the\x20deposit\x20amount,\x20balance\x20window,\x20and\x20exit\x20policy\x20in\x20the\x20listing/WIP\x20promise'],'requiresKeeper':!![],'keeperHint':'The\x20balance-window\x20deadline\x20(a\x20buyer\x20who\x20never\x20pays\x20the\x20balance)\x20needs\x20a\x20keeper\x20to\x20drive\x20the\x20deposit-exit\x20rail\x20at\x20the\x20window\x20close;\x20a\x20milestone\x20capture\x20timeout\x20likewise'},{'id':'affiliate_commission','name':'Affiliate\x20Commission','description':'Declared\x20affiliate_mode\x20(\x27commission\x27):\x20the\x20merchant\x20sells\x20through\x20referral/affiliate\x20partners\x20and\x20owes\x20the\x20referring\x20partner\x20an\x20independent\x20commission\x20leg.\x20The\x20commission\x20is\x20window-anchored\x20—\x20it\x20accrues\x20at\x20attribution\x20but\x20is\x20claimable\x20only\x20after\x20the\x20attribution/refund\x20window\x20closes,\x20so\x20an\x20in-window\x20refund\x20never\x20has\x20to\x20reverse\x20an\x20already-paid\x20partner\x20(the\x20chain\x20has\x20no\x20debit/clawback\x20primitive,\x20so\x20a\x20released\x20commission\x20is\x20unrecoverable\x20and\x20the\x20template\x20must\x20disclose\x20that\x20honestly).\x20The\x20commission\x20leg\x20is\x20an\x20INDEPENDENT\x20allocation\x20off\x20a\x20dedicated\x20pool,\x20never\x20a\x20drain\x20of\x20the\x20buyer\x27s\x20goods\x20escrow.','objectTypes':['machine','guard','allocation','repository'],'templateRefs':[],'requiredConstraints':[{'constraint_id':'affiliate_rail_present','description':'a\x20declared\x20commission\x20overlay\x20has\x20a\x20commission-family\x20machine\x20node\x20or\x20a\x20commission\x20allocator\x20row,\x20and\x20the\x20leg\x20is\x20INDEPENDENT\x20of\x20the\x20goods\x20escrow\x20(INV-D3,\x20compile\x20AFFILIATE_RAIL_MISSING\x20/\x20scanner\x20R-AFFILIATE-RAIL)','level':'soft','blocking':![]},{'constraint_id':'affiliate_clawback_disclosed','description':'a\x20build_note\x20discloses\x20the\x20post-lock\x20no-clawback\x20truth\x20—\x20a\x20released\x20commission\x20cannot\x20be\x20reversed\x20on\x20chain\x20(INV-D2,\x20compile\x20AFFILIATE_CLAWBACK_UNDISCLOSED\x20/\x20scanner\x20R-AFFILIATE-DISCLOSURE)','level':'soft','blocking':![]},{'constraint_id':'affiliate_window_anchored','description':'the\x20commission\x20claim\x20is\x20gated\x20by\x20a\x20window-anchored\x20guard\x20so\x20it\x20is\x20claimable\x20only\x20after\x20the\x20attribution/refund\x20window\x20closes\x20(INV-D1,\x20rides\x20the\x20generic\x20TIME-ANCHOR-01\x20audit)','level':'soft','blocking':![]}],'evaluationImpact':[{'dimension':'fund_safety','effect':'required','description':'The\x20commission\x20leg\x20is\x20an\x20independent\x20allocation\x20off\x20its\x20own\x20pool,\x20never\x20a\x20Surplus/Rate\x20drain\x20of\x20the\x20buyer\x27s\x20goods\x20escrow\x20(防抢池)'},{'dimension':'consumer_diligence','effect':'boost','description':'The\x20post-lock\x20no-clawback\x20truth\x20is\x20disclosed\x20before\x20purchase,\x20so\x20a\x20buyer/merchant\x20never\x20assumes\x20a\x20reversal\x20the\x20chain\x20cannot\x20do'},{'dimension':'operational_risk','effect':'boost','description':'The\x20window\x20anchor\x20means\x20an\x20in-window\x20refund\x20never\x20has\x20to\x20reverse\x20an\x20already-paid\x20partner\x20—\x20the\x20unrecoverable\x20surface\x20is\x20minimized\x20by\x20construction'}],'industryFit':{'freelance':0x3c,'education':0x37,'rental':0x23,'retail':0x50,'subscription':0x41,'travel':0x3c,'licensing':0x46,'crowdfunding':0x3c,'general':0x3c},'addressesPainPoints':['Referral/affiliate\x20payouts\x20locked\x20inside\x20incumbent\x20affiliate\x20networks\x20with\x20opaque\x20attribution','A\x20commission\x20drained\x20from\x20the\x20buyer\x27s\x20goods\x20escrow\x20instead\x20of\x20an\x20independent\x20pool\x20(抢池)','A\x20refund\x20after\x20commission\x20release\x20falsely\x20assumed\x20to\x20claw\x20back\x20the\x20partner\x20payout\x20(no\x20on-chain\x20debit\x20exists)','Attribution\x20claimed\x20instantly,\x20before\x20the\x20refund\x20window,\x20then\x20unrecoverable\x20when\x20the\x20order\x20refunds'],'intentSignals':[/affiliate/i,/referral/i,/referr/i,/commission/i,/revenue[ -]?shar/i,/partner[ -]?payout/i],'userProtections':['The\x20commission\x20is\x20paid\x20from\x20a\x20dedicated\x20pool,\x20so\x20the\x20buyer\x27s\x20goods\x20escrow\x20is\x20never\x20drained\x20by\x20the\x20partner\x20leg','The\x20post-lock\x20no-clawback\x20reality\x20is\x20disclosed\x20before\x20purchase,\x20not\x20discovered\x20at\x20refund\x20time','The\x20commission\x20is\x20only\x20claimable\x20after\x20the\x20attribution/refund\x20window\x20closes,\x20so\x20an\x20in-window\x20refund\x20is\x20clean'],'merchantObligations':['Route\x20the\x20commission\x20through\x20an\x20INDEPENDENT\x20allocation\x20leg\x20to\x20an\x20explicit\x20non-empty\x20partner\x20Entity','Gate\x20the\x20claim\x20with\x20a\x20window-anchored\x20guard\x20(claimable\x20only\x20after\x20the\x20attribution/refund\x20window)','Disclose\x20the\x20post-lock\x20no-clawback\x20truth\x20in\x20a\x20build_note\x20and\x20the\x20listing\x20promise','Declare\x20the\x20commission\x20rate/bps\x20and\x20the\x20attribution\x20window\x20in\x20the\x20listing\x20so\x20a\x20partner\x20can\x20price\x20it\x20before\x20referral'],'requiresKeeper':!![],'keeperHint':'The\x20attribution/refund\x20window\x20deadline\x20needs\x20a\x20keeper\x20to\x20open\x20the\x20commission\x20claim\x20once\x20the\x20window\x20closes\x20(the\x20claim\x20guard\x27s\x20time\x20gate\x20arms\x20at\x20entry_time\x20+\x20window)'},{'id':'crowdfunding','name':'Crowdfunding\x20Campaign','description':'Declared\x20crowdfunding_mode\x20(\x27threshold\x27\x20all-or-nothing\x20/\x20\x27flexible\x27\x20keep-it-all):\x20backers\x20each\x20escrow\x20a\x20contribution\x20in\x20its\x20OWN\x20unpooled\x20Allocation\x20(for_object\x20=\x20their\x20order,\x20never\x20balance-joined,\x20so\x20attribution\x20survives).\x20A\x20shared\x20campaign\x20Repository\x20records\x20one\x20writer-bound\x20numeric\x20row\x20per\x20contribution\x20(id_from\x20signer,\x20value\x20=\x20amount).\x20At\x20an\x20ABSOLUTE\x20campaign\x20deadline\x20a\x20settlement\x20guard\x20reads\x20the\x20on-chain\x20aggregate\x20(repository.data\x20sum-where,\x20query\x201174\x20→\x20U256)\x20and\x20decides:\x20aggregate\x20>=\x20goal\x20→\x20release\x20every\x20contribution\x20to\x20the\x20project\x20Entity;\x20aggregate\x20<\x20goal\x20(threshold\x20model)\x20→\x20refund\x20each\x20backer\x20their\x20own\x20contribution\x20(slot\x200\x20—\x20the\x20submitted\x20Order,\x20extracted\x20by\x20owner_receive;\x20NEVER\x20slot\x20254\x20on\x20a\x20refund\x20rail).\x20The\x20flexible\x20model\x20has\x20no\x20goal\x20and\x20no\x20refund\x20leg\x20—\x20contributions\x20release\x20at\x20the\x20deadline\x20and\x20are\x20non-refundable\x20(disclosed).\x20The\x20aggregate\x20is\x20attested-roster\x20evidence,\x20not\x20a\x20chain-verified\x20custody\x20proof;\x20a\x20raise\x20is\x20never\x20an\x20investment.','objectTypes':['machine','guard','allocation','repository'],'templateRefs':[],'requiredConstraints':[{'constraint_id':'crowdfunding_exit_rail_present','description':'a\x20declared\x20campaign\x20has\x20a\x20release/settlement\x20rail,\x20and\x20a\x20threshold\x20campaign\x20additionally\x20has\x20a\x20refund\x20rail\x20—\x20the\x20two-leg\x20escrow-exit\x20(release\x20XOR\x20refund,\x20D-BUG-2)\x20so\x20contributions\x20never\x20strand\x20at\x20the\x20deadline\x20(INV-E1,\x20compile\x20CROWDFUNDING_THRESHOLD_GATE_MISSING\x20/\x20scanner\x20R-CROWDFUNDING-RAIL)','level':'soft','blocking':![]},{'constraint_id':'crowdfunding_aggregate_writer_bound','description':'a\x20threshold\x20aggregate\x20reads\x20a\x20repository.data\x20sum-where\x20over\x20WRITER-BOUND\x20rows\x20(id_from\x20signer\x20+\x20an\x20identity\x20write_guard\x20order.owner==Signer),\x20never\x20an\x20existence\x20read\x20(INV-E2\x20/\x20R-X1-17,\x20compile\x20CROWDFUNDING_AGGREGATE_UNBOUND\x20/\x20scanner\x20R-CROWDFUNDING-AGGREGATE)','level':'soft','blocking':![]},{'constraint_id':'crowdfunding_disclosure_present','description':'build_notes\x20disclose\x20the\x20L-04\x20aggregate\x20trust\x20boundary\x20(threshold),\x20the\x20L-01\x20non-investment\x20statement,\x20the\x20L-05\x20KYC/AML\x20caution,\x20and\x20—\x20for\x20a\x20flexible\x20build\x20—\x20the\x20NO-REFUND\x20keep-it-all\x20posture\x20(INV-E3,\x20compile\x20CROWDFUNDING_DISCLOSURE_MISSING\x20/\x20scanner\x20R-CROWDFUNDING-DISCLOSURE)','level':'soft','blocking':![]}],'evaluationImpact':[{'dimension':'fund_safety','effect':'required','description':'Each\x20contribution\x20is\x20escrowed\x20UNPOOLED\x20(for_object\x20=\x20its\x20own\x20order,\x20never\x20balance::join)\x20so\x20a\x20missed\x20campaign\x20refunds\x20every\x20backer\x20their\x20OWN\x20money;\x20the\x20release/refund\x20legs\x20are\x20mutually\x20exclusive\x20(D-BUG-2)'},{'dimension':'consumer_diligence','effect':'boost','description':'The\x20aggregate-trust\x20boundary,\x20the\x20non-investment\x20posture\x20and\x20(flexible)\x20the\x20no-refund\x20reality\x20are\x20disclosed\x20before\x20contribution,\x20so\x20a\x20backer\x20never\x20assumes\x20a\x20chain-verified\x20custody\x20proof\x20or\x20a\x20refund\x20the\x20model\x20does\x20not\x20have'},{'dimension':'operational_risk','effect':'boost','description':'One\x20ABSOLUTE\x20shared\x20deadline\x20(not\x20per-order\x20entry+duration)\x20means\x20every\x20backer\x20settles\x20at\x20the\x20same\x20cutoff;\x20the\x20writer-bound\x20ledger\x20makes\x20the\x20raise\x20total\x20attributable\x20and\x20honest'}],'industryFit':{'freelance':0x1e,'education':0x28,'rental':0x14,'retail':0x3c,'subscription':0x23,'travel':0x19,'licensing':0x2d,'crowdfunding':0x64,'general':0x37},'addressesPainPoints':['An\x20all-or-nothing\x20raise\x20where\x20a\x20missed\x20goal\x20must\x20refund\x20every\x20backer,\x20but\x20pooled\x20custody\x20loses\x20per-backer\x20attribution','A\x20funding\x20total\x20presented\x20as\x20a\x20chain-verified\x20custody\x20proof\x20when\x20it\x20is\x20only\x20an\x20attested\x20sum\x20over\x20keeper-supplied\x20rows','A\x20backer\x20mistaking\x20a\x20flexible\x20keep-it-all\x20raise\x20for\x20a\x20refundable\x20all-or-nothing\x20campaign','Pooled\x20cross-border\x20fundraising\x20treated\x20as\x20a\x20casual\x20purchase\x20despite\x20HIGH\x20securities\x20/\x20money-transmission\x20/\x20KYC-AML\x20exposure'],'intentSignals':[/crowdfund/i,/\bbackers?\b/i,/campaign/i,/all[ -]?or[ -]?nothing/i,/fundrais/i,/\bpledge/i,/raise (funds|money)/i,/keep[ -]?it[ -]?all/i],'userProtections':['Each\x20contribution\x20is\x20escrowed\x20to\x20the\x20backer\x27s\x20OWN\x20order\x20(unpooled),\x20so\x20a\x20missed\x20threshold\x20refunds\x20exactly\x20their\x20money','The\x20aggregate-trust\x20boundary\x20and\x20the\x20non-investment\x20posture\x20are\x20disclosed\x20before\x20contribution','A\x20flexible\x20raise\x20states\x20the\x20NO-REFUND\x20keep-it-all\x20posture\x20up\x20front,\x20never\x20blurred\x20with\x20all-or-nothing','Delivery\x20after\x20a\x20successful\x20raise\x20is\x20backed\x20by\x20the\x20compensation\x20fund\x20+\x20third-party\x20arbitration'],'merchantObligations':['Escrow\x20each\x20contribution\x20UNPOOLED\x20(for_object\x20=\x20the\x20funder\x27s\x20order),\x20never\x20balance-joined\x20into\x20a\x20shared\x20pot','Bind\x20the\x20campaign\x20Repository\x20write_guard\x20to\x20the\x20contributing\x20backer\x20(id_from\x20signer,\x20order.owner==Signer)\x20so\x20the\x20aggregate\x20cannot\x20be\x20forged','Gate\x20release\x20on\x20the\x20sum-where\x20aggregate\x20ANDed\x20with\x20an\x20ABSOLUTE\x20shared\x20campaign\x20deadline;\x20pair\x20the\x20refund\x20leg\x20with\x20a\x20recover_gate\x20rail\x20(D-BUG-2)','Disclose\x20the\x20L-04\x20aggregate\x20trust\x20boundary,\x20the\x20L-01\x20non-investment\x20statement,\x20the\x20L-05\x20KYC/AML\x20caution,\x20and\x20(flexible)\x20the\x20no-refund\x20posture\x20in\x20build_notes\x20and\x20the\x20listing'],'requiresKeeper':!![],'keeperHint':'The\x20ABSOLUTE\x20campaign\x20deadline\x20needs\x20a\x20keeper\x20to\x20drive\x20settlement\x20once\x20Clock\x20>=\x20deadline:\x20on\x20a\x20met\x20goal\x20advance\x20each\x20order\x20to\x20the\x20release\x20terminal;\x20on\x20a\x20missed\x20threshold\x20enumerate\x20contributor\x20ids\x20via\x20find-where\x20(1176)\x20/\x20keys-where\x20(1177,\x20max\x20100\x20per\x20batch)\x20and\x20advance\x20each\x20refund\x20leg'}];export function getBusinessModule(a){return CORE_BUSINESS_MODULES['find'](b=>b['id']===a);}export function getModulesForIndustry(a){return[...CORE_BUSINESS_MODULES]['sort']((c,d)=>(d['industryFit'][a]??0x0)-(c['industryFit'][a]??0x0));}export function recommendModules(a,b,c){const d=c?.['minFit']??0x32,e=c?.['maxModules']??0x5,f=CORE_BUSINESS_MODULES['map'](g=>{let h=g['industryFit'][a]??0x32;const i=b['toLowerCase']();for(const j of g['addressesPainPoints']){const k=j['toLowerCase']()['split'](/\s+/),l=k['filter'](n=>i['includes'](n))['length'];h+=l*0x5;}return{'module':g,'score':Math['min'](h,0x64)};});return f['filter'](g=>g['score']>=d)['sort']((g,h)=>h['score']-g['score'])['slice'](0x0,e)['map'](g=>g['module']);}export function moduleHasIntentEvidence(a,b){if(!a['intentSignals']||a['intentSignals']['length']===0x0)return![];return a['intentSignals']['some'](c=>c['test'](b));}export function checkModuleConstraints(a,b,c){const d=a['requiredConstraints']['filter'](h=>h['blocking']&&!b['has'](h['constraint_id']))['map'](h=>h['constraint_id']),e=d['length']===0x0,f=a['evaluationImpact']['filter'](h=>h['effect']==='boost'||h['effect']==='required')['reduce']((h,i)=>h+(i['effect']==='required'?0xf:0x8),0x0),g=c?.['evidenceMatched']===![]?0x0:f;return{'module':a['id'],'adopted':e,'reason':e?undefined:'Missing\x20required\x20constraints:\x20'+d['join'](',\x20'),'missingConstraints':d['length']>0x0?d:undefined,'estimatedScoreBoost':Math['min'](g,0x64),'evidence_matched':c?.['evidenceMatched']};}export function calculateModuleScoreBoost(a){const b={};for(const c of a){for(const d of c['evaluationImpact']){const e=d['effect']==='required'?0xf:d['effect']==='boost'?0x8:0x3;b[d['dimension']]=(b[d['dimension']]??0x0)+e;}}return b;}
|
|
1
|
+
export const CORE_BUSINESS_MODULES=[{'id':'milestone_escrow','name':'Milestone\x20Escrow','description':'Funds\x20held\x20in\x20Order\x20and\x20released\x20per\x20milestone\x20completion.\x20Protects\x20both\x20merchant\x20and\x20user.','objectTypes':['service','machine','order','allocation'],'templateRefs':[{'template_id':'freelance-machine','object_type':'machine','purpose':'Milestone\x20workflow\x20with\x20accept/reject\x20nodes'},{'template_id':'milestone-allocation','object_type':'allocation','purpose':'Per-milestone\x20fund\x20release'}],'requiredConstraints':[{'constraint_id':'order_allocators_bound','description':'Order\x20must\x20have\x20allocators\x20bound\x20before\x20publish','level':'hard','blocking':!![]},{'constraint_id':'machine_published','description':'Machine\x20must\x20be\x20published\x20and\x20bound\x20to\x20Service','level':'hard','blocking':!![]},{'constraint_id':'milestone_forward_guarded','description':'Each\x20milestone\x20forward\x20must\x20have\x20a\x20guard','level':'soft','blocking':![]}],'evaluationImpact':[{'dimension':'fund_safety','effect':'boost','description':'Escrow\x20ensures\x20funds\x20not\x20released\x20until\x20verification'},{'dimension':'escrow_quality','effect':'required','description':'Module\x20requires\x20proper\x20escrow\x20configuration'},{'dimension':'operational_risk','effect':'boost','description':'Milestones\x20reduce\x20single-point\x20delivery\x20risk'}],'industryFit':{'freelance':0x5f,'education':0x50,'rental':0x3c,'retail':0x28,'subscription':0x1e,'travel':0x32,'licensing':0x55,'crowdfunding':0x55,'general':0x46},'addressesPainPoints':['Client\x20never\x20approves\x20deliverables','Merchant\x20delivers\x20but\x20cannot\x20get\x20paid','Full\x20upfront\x20payment\x20with\x20no\x20delivery\x20guarantee'],'intentSignals':[/milestone/i,/escrow/i,/pay(ment)? (per|on|at|upon) (each )?(milestone|stage|delivery|approval)/i,/staged? (payment|release)/i,/progress payment/i,/hold funds until/i],'userProtections':['Funds\x20held\x20in\x20escrow\x20until\x20milestone\x20verified','Can\x20reject\x20substandard\x20deliverables','Refund\x20for\x20unstarted\x20milestones'],'merchantObligations':['Must\x20deliver\x20each\x20milestone\x20to\x20defined\x20acceptance\x20criteria','Must\x20configure\x20Machine\x20with\x20proper\x20forward\x20guards'],'requiresKeeper':!![],'keeperHint':'Keeper\x20must\x20monitor\x20Machine\x20node\x20timeouts\x20and\x20trigger\x20adminUnhold\x20if\x20user\x20does\x20not\x20respond'},{'id':'independent_arbitration','name':'Independent\x20Arbitration','description':'Third-party\x20arbitration\x20with\x20Guard-weighted\x20voting.\x20Arbitration\x20Permission\x20MUST\x20differ\x20from\x20Service\x20Permission\x20(contract-enforced).','objectTypes':['arb','permission','guard'],'templateRefs':[{'template_id':'arbitration-3-voters','object_type':'arb','purpose':'3-voter\x20arbitration\x20with\x20weighted\x20voting'},{'template_id':'voting-guard-weighted','object_type':'guard','purpose':'Vote\x20weight\x20from\x20Guard\x20config'}],'requiredConstraints':[{'constraint_id':'arbitration_permission_independent','description':'Arbitration.permission\x20!=\x20Service.permission','level':'hard','blocking':!![]},{'constraint_id':'voting_guard_configured','description':'At\x20least\x20one\x20voting_guard\x20must\x20be\x20configured','level':'soft','blocking':![]},{'constraint_id':'arbitration_bound_to_service','description':'Arbitration\x20must\x20be\x20in\x20Service.arbitrations\x20list','level':'hard','blocking':!![]}],'evaluationImpact':[{'dimension':'arbitration_coverage','effect':'required','description':'Module\x20requires\x20arbitration\x20configuration'},{'dimension':'arbitration_fairness','effect':'required','description':'Independent\x20permission\x20ensures\x20neutrality'},{'dimension':'governance_risk','effect':'boost','description':'Reduces\x20platform-as-judge\x20risk'}],'industryFit':{'freelance':0x5a,'education':0x4b,'rental':0x55,'retail':0x4b,'subscription':0x3c,'travel':0x50,'licensing':0x5a,'crowdfunding':0x50,'general':0x46},'addressesPainPoints':['Platform\x20acts\x20as\x20both\x20judge\x20and\x20party','Arbitration\x20fees\x20too\x20high\x20for\x20small\x20claims','No\x20binding\x20dispute\x20resolution'],'intentSignals':[/arbitrat/i,/dispute/i,/mediat/i,/third[ -]?party (resolution|judgement|judgment|venue)/i,/voting/i,/ruling/i,/appeal/i],'userProtections':['Independent\x20arbitrators\x20(not\x20merchant\x20or\x20platform)','Guard-weighted\x20voting\x20prevents\x20Sybil\x20attacks','Micro-arbitration:\x20no\x20per-case\x20fees'],'merchantObligations':['Must\x20accept\x20arbitration\x20verdict','Must\x20maintain\x20compensation_fund\x20for\x20indemnities'],'requiresKeeper':![]},{'id':'wip_provenance','name':'WIP\x20Provenance','description':'Work-in-progress\x20hash\x20commitments\x20on-chain\x20via\x20Repository.\x20Prevents\x20tampering\x20of\x20delivery\x20evidence.','objectTypes':['repository','guard','proof'],'templateRefs':[{'template_id':'wip-hash-guard','object_type':'guard','purpose':'Verify\x20WIP\x20hash\x20matches\x20commitment'},{'template_id':'delivery-proof','object_type':'proof','purpose':'On-chain\x20delivery\x20confirmation'}],'requiredConstraints':[{'constraint_id':'repository_published','description':'Repository\x20must\x20be\x20published','level':'hard','blocking':!![]},{'constraint_id':'wip_hash_before_delivery','description':'WIP\x20hash\x20must\x20be\x20committed\x20before\x20delivery','level':'soft','blocking':![]}],'evaluationImpact':[{'dimension':'proof_integrity','effect':'required','description':'WIP\x20hash\x20provides\x20tamper-proof\x20evidence'},{'dimension':'transparency','effect':'boost','description':'On-chain\x20commitment\x20is\x20publicly\x20verifiable'}],'industryFit':{'freelance':0x5a,'education':0x55,'rental':0x5f,'retail':0x46,'subscription':0x3c,'travel':0x46,'licensing':0x5f,'crowdfunding':0x55,'general':0x4b},'addressesPainPoints':['Evidence\x20stored\x20on\x20platform\x20servers\x20can\x20be\x20tampered','No\x20proof\x20of\x20pre-delivery\x20state\x20(e.g.\x20rental\x20condition)','Dispute\x20resolution\x20relies\x20on\x20trust\x20in\x20platform'],'intentSignals':[/\bwip\b/i,/work[ -]?in[ -]?progress/i,/\bhash\b/i,/evidence/i,/tamper/i,/proof of (work|progress|delivery)/i],'userProtections':['WIP\x20hash\x20commitment\x20is\x20immutable\x20on-chain','Guard\x20automatically\x20verifies\x20hash\x20match','Repository\x20history\x20is\x20auditable'],'merchantObligations':['Must\x20commit\x20WIP\x20hash\x20at\x20defined\x20checkpoints','Must\x20use\x20Repository\x20for\x20evidence\x20storage'],'requiresKeeper':![]},{'id':'multi_tier_allocation','name':'Multi-Tier\x20Allocation','description':'Order\x20funds\x20automatically\x20split\x20among\x20multiple\x20recipients.\x20Fully\x20transparent\x20on-chain.','objectTypes':['allocation','treasury','payment'],'templateRefs':[{'template_id':'multi-tier-allocation','object_type':'allocation','purpose':'Waterfall\x20fund\x20distribution'},{'template_id':'supplier-waterfall','object_type':'allocation','purpose':'Supplier\x20payment\x20tiers'}],'requiredConstraints':[{'constraint_id':'allocators_configured','description':'Allocators\x20must\x20be\x20configured\x20with\x20recipients','level':'hard','blocking':!![]},{'constraint_id':'sharing_sum_100','description':'Allocation\x20percentages\x20must\x20sum\x20to\x20100%','level':'hard','blocking':!![]},{'constraint_id':'platform_fee_zero','description':'Platform\x20fee\x20should\x20be\x200\x20or\x20user-defined','level':'soft','blocking':![]}],'evaluationImpact':[{'dimension':'fee_transparency','effect':'required','description':'All\x20allocations\x20visible\x20on-chain'},{'dimension':'supplier_visibility','effect':'boost','description':'Supplier\x20payments\x20are\x20auditable'}],'industryFit':{'freelance':0x3c,'education':0x32,'rental':0x28,'retail':0x50,'subscription':0x46,'travel':0x5f,'licensing':0x62,'crowdfunding':0x50,'general':0x46},'addressesPainPoints':['Multi-layer\x20commission\x20hidden\x20from\x20users','Suppliers\x20paid\x20opaquely','Platform\x20takes\x20undisclosed\x20FX\x20spread'],'intentSignals':[/multi[ -]?tier/i,/waterfall/i,/\bsplit/i,/divide/i,/distribut/i,/tiered payout/i],'userProtections':['Full\x20allocation\x20waterfall\x20visible\x20on-chain','No\x20hidden\x20fees','Can\x20verify\x20supplier\x20payments'],'merchantObligations':['Must\x20declare\x20all\x20allocation\x20recipients\x20upfront','Cannot\x20change\x20allocation\x20after\x20publish'],'requiresKeeper':![]},{'id':'subscription_with_proof','name':'Subscription\x20with\x20Delivery\x20Proof','description':'Each\x20billing\x20cycle\x20requires\x20proof\x20of\x20content\x20delivery\x20before\x20charging.\x20Prevents\x20creator\x20abandonment.','objectTypes':['service','guard','repository','progress'],'templateRefs':[{'template_id':'subscription-machine','object_type':'machine','purpose':'Cycle-based\x20workflow'},{'template_id':'delivery-guard-cycle','object_type':'guard','purpose':'Verify\x20content\x20delivery\x20per\x20cycle'}],'requiredConstraints':[{'constraint_id':'delivery_guard_per_cycle','description':'Each\x20cycle\x20must\x20have\x20a\x20delivery\x20guard','level':'hard','blocking':!![]},{'constraint_id':'repository_updated','description':'Repository\x20must\x20be\x20updated\x20with\x20cycle\x20content\x20hash','level':'soft','blocking':![]}],'evaluationImpact':[{'dimension':'content_commitment','effect':'required','description':'Delivery\x20proof\x20required\x20before\x20each\x20charge'},{'dimension':'timeout_protection','effect':'boost','description':'Cycles\x20enforce\x20regular\x20delivery'}],'industryFit':{'freelance':0x28,'education':0x55,'rental':0x1e,'retail':0x14,'subscription':0x62,'travel':0x1e,'licensing':0x28,'crowdfunding':0x19,'general':0x32},'addressesPainPoints':['Creator\x20abandons\x20after\x20collecting\x20subscriptions','Silent\x20auto-renewal\x20with\x20no\x20delivery\x20proof','No\x20mechanism\x20to\x20hold\x20creators\x20accountable'],'intentSignals':[/subscri/i,/recurring/i,/billing cycle/i,/auto[ -]?renew/i,/renewal/i,/membership/i],'userProtections':['Payment\x20only\x20after\x20delivery\x20proof\x20verified','Can\x20cancel\x20if\x20delivery\x20guard\x20fails','Cycle\x20history\x20on-chain'],'merchantObligations':['Must\x20deliver\x20content\x20and\x20commit\x20hash\x20each\x20cycle','Must\x20configure\x20delivery_guard\x20per\x20cycle'],'requiresKeeper':!![],'keeperHint':'Keeper\x20triggers\x20cycle\x20transitions\x20and\x20verifies\x20delivery_guard\x20conditions'},{'id':'accept_timeout_protection','name':'Accept\x20Timeout\x20Protection','description':'If\x20user\x20does\x20not\x20accept/reject\x20within\x20N\x20days,\x20auto-accept\x20advances\x20the\x20Machine.\x20Protects\x20merchant\x20from\x20indefinite\x20stalls.','objectTypes':['machine','guard'],'templateRefs':[{'template_id':'timeout-forward','object_type':'machine','purpose':'Forward\x20with\x20time_guard\x20+\x20adminUnhold\x20fallback'}],'requiredConstraints':[{'constraint_id':'time_guard_configured','description':'time_guard\x20must\x20be\x20set\x20on\x20accept\x20forward','level':'hard','blocking':!![]},{'constraint_id':'adminUnhold_permission','description':'Admin\x20must\x20have\x20PROGRESS_UNHOLD\x20(224)\x20permission','level':'soft','blocking':![]}],'evaluationImpact':[{'dimension':'timeout_protection','effect':'required','description':'Auto-advance\x20prevents\x20indefinite\x20user\x20stalls'},{'dimension':'operational_risk','effect':'boost','description':'Reduces\x20delivery\x20timeline\x20uncertainty'}],'industryFit':{'freelance':0x5f,'education':0x46,'rental':0x50,'retail':0x3c,'subscription':0x28,'travel':0x3c,'licensing':0x55,'crowdfunding':0x46,'general':0x4b},'addressesPainPoints':['Buyer\x20never\x20approves\x20deliverables\x20(common\x20on\x20incumbent\x20talent\x20marketplaces)','Merchant\x20cash\x20flow\x20blocked\x20by\x20inactive\x20buyer','Infinite\x20revision\x20loops\x20without\x20resolution'],'intentSignals':[/timeout/i,/time[ -]?out/i,/auto[ -]?accept/i,/never (approves?|responds?|accepts?)/i,/unresponsive/i,/inactive (buyer|client)/i,/\bstall/i,/\bdeadline\b/i],'userProtections':['Still\x20has\x20full\x20N\x20days\x20to\x20review\x20and\x20reject','Rejection\x20triggers\x20arbitration\x20if\x20configured'],'merchantObligations':['Must\x20configure\x20time_guard\x20on\x20forward','Timeout\x20value\x20comes\x20from\x20the\x20template\x27s\x20window\x20fee_params\x20(e.g.\x20escrow_release_days;\x20override\x20per\x20build\x20via\x20fee_overrides)\x20—\x20never\x20a\x20hardcoded\x20number'],'requiresKeeper':!![],'keeperHint':'Keeper\x20monitors\x20time_guard\x20deadlines\x20and\x20advances\x20the\x20timeout\x20forward\x20when\x20the\x20window\x20elapses\x20(adminUnhold\x20is\x20only\x20the\x20hold-release\x20escape\x20hatch,\x20never\x20the\x20timeout\x20path)'},{'id':'refund_guarantee','name':'Refund\x20Guarantee','description':'Service\x20maintains\x20compensation_fund\x20for\x20refunds.\x20Refund_guard\x20validates\x20eligibility\x20and\x20transfers\x20funds\x20back\x20to\x20Order.','objectTypes':['service','guard','order'],'templateRefs':[{'template_id':'refund-guard','object_type':'guard','purpose':'Validate\x20refund\x20eligibility'}],'requiredConstraints':[{'constraint_id':'compensation_fund_positive','description':'compensation_fund_add\x20>\x200','level':'hard','blocking':!![]},{'constraint_id':'refund_guard_configured','description':'Service\x20must\x20have\x20refund_guard','level':'soft','blocking':![]}],'evaluationImpact':[{'dimension':'fund_safety','effect':'boost','description':'Compensation\x20fund\x20backs\x20refund\x20promise'},{'dimension':'consumer_diligence','effect':'boost','description':'Shows\x20merchant\x20confidence\x20in\x20service\x20quality'}],'industryFit':{'freelance':0x46,'education':0x55,'rental':0x5a,'retail':0x5f,'subscription':0x50,'travel':0x55,'licensing':0x4b,'crowdfunding':0x5f,'general':0x50},'addressesPainPoints':['Refund\x20trapped\x20in\x20incumbent\x20platform\x20balance','No\x20refund\x20mechanism\x20for\x20service\x20failure','Refund\x20decision\x20centralized\x20at\x20platform'],'intentSignals':[/refund/i,/money[ -]?back/i,/guarantee/i],'userProtections':['Refund\x20goes\x20back\x20to\x20Order\x20(not\x20platform\x20balance)','Guard\x20validates\x20eligibility\x20(not\x20platform\x20discretion)','Compensation\x20fund\x20guarantees\x20liquidity'],'merchantObligations':['Must\x20maintain\x20compensation_fund\x20>\x200','Must\x20configure\x20refund_guard\x20rules'],'requiresKeeper':![]},{'id':'reputation_on_chain','name':'On-Chain\x20Reputation','description':'Merchant\x20and\x20user\x20behavior\x20permanently\x20recorded\x20on\x20Registrar.\x20Evaluations,\x20completions,\x20and\x20disputes\x20contribute\x20to\x20reputation\x20score.','objectTypes':['service','order','arb'],'templateRefs':[],'requiredConstraints':[{'constraint_id':'service_published','description':'Service\x20must\x20be\x20published\x20to\x20accumulate\x20reputation','level':'soft','blocking':![]}],'evaluationImpact':[{'dimension':'reputation_verifiability','effect':'required','description':'On-chain\x20history\x20is\x20tamper-proof'},{'dimension':'trust','effect':'boost','description':'Reputation\x20signals\x20reduce\x20information\x20asymmetry'}],'industryFit':{'freelance':0x5a,'education':0x50,'rental':0x55,'retail':0x5a,'subscription':0x55,'travel':0x50,'licensing':0x50,'crowdfunding':0x41,'general':0x55},'addressesPainPoints':['Fake\x20reviews\x20and\x20rating\x20manipulation','No\x20cross-platform\x20reputation\x20portability','Platform\x20can\x20delete\x20negative\x20reviews'],'intentSignals':[/reputation/i,/\breviews?\b/i,/\brating/i,/track record/i,/feedback/i],'userProtections':['Reputation\x20is\x20on-chain\x20and\x20immutable','Can\x20verify\x20merchant\x27s\x20complete\x20transaction\x20history','Dispute\x20outcomes\x20affect\x20reputation\x20permanently'],'merchantObligations':['All\x20service\x20interactions\x20become\x20part\x20of\x20permanent\x20record','Cannot\x20hide\x20negative\x20outcomes'],'requiresKeeper':![]},{'id':'supplier_collaboration','name':'Supplier\x20Collaboration','description':'Enable\x20merchant\x20to\x20delegate\x20sub-services\x20to\x20suppliers\x20with\x20transparent\x20payment\x20splitting.\x20No\x20platform\x20intermediary.','objectTypes':['service','allocation','demand'],'templateRefs':[{'template_id':'supplier-demand','object_type':'demand','purpose':'Create\x20sub-service\x20demand\x20for\x20suppliers'},{'template_id':'supplier-allocation','object_type':'allocation','purpose':'Split\x20order\x20payment\x20with\x20suppliers'}],'requiredConstraints':[{'constraint_id':'demand_configured','description':'Demand\x20must\x20reference\x20main\x20Service','level':'soft','blocking':![]},{'constraint_id':'allocation_sharing_configured','description':'Allocation\x20sharing\x20must\x20include\x20suppliers','level':'hard','blocking':!![]}],'evaluationImpact':[{'dimension':'supplier_visibility','effect':'required','description':'Supplier\x20payments\x20transparent\x20on-chain'},{'dimension':'governance_risk','effect':'boost','description':'No\x20platform\x20controls\x20supplier\x20relationships'}],'industryFit':{'freelance':0x3c,'education':0x46,'rental':0x28,'retail':0x55,'subscription':0x32,'travel':0x5a,'licensing':0x41,'crowdfunding':0x1e,'general':0x3c},'addressesPainPoints':['Supplier\x20payments\x20opaque\x20to\x20end\x20user','Platform\x20controls\x20supplier\x20relationships','No\x20direct\x20merchant-supplier\x20collaboration'],'intentSignals':[/supplier/i,/subcontract/i,/outsourc/i,/vendor/i,/sub[ -]?service/i,/delegate to/i],'userProtections':['Can\x20see\x20all\x20suppliers\x20involved\x20in\x20service','Supplier\x20payments\x20are\x20on-chain\x20auditable','Merchant\x20remains\x20accountable\x20for\x20supplier\x20quality'],'merchantObligations':['Must\x20declare\x20all\x20suppliers\x20upfront','Must\x20ensure\x20supplier\x20deliverables\x20meet\x20criteria'],'requiresKeeper':![]},{'id':'damage_attestation','name':'Damage\x20Attestation','description':'Rental-specific:\x20pre/post\x20condition\x20photos\x20hashed\x20to\x20Repository.\x20Guard\x20compares\x20hashes\x20to\x20automatically\x20enforce\x20damage\x20deductions.','objectTypes':['repository','guard','service'],'templateRefs':[{'template_id':'rental-condition-guard','object_type':'guard','purpose':'Compare\x20pre/post\x20rental\x20condition\x20hashes'},{'template_id':'condition-repository','object_type':'repository','purpose':'Store\x20rental\x20condition\x20evidence'}],'requiredConstraints':[{'constraint_id':'pre_rental_hash','description':'Pre-rental\x20condition\x20hash\x20must\x20be\x20committed','level':'hard','blocking':!![]},{'constraint_id':'post_rental_hash','description':'Post-rental\x20condition\x20hash\x20must\x20be\x20committed','level':'hard','blocking':!![]}],'evaluationImpact':[{'dimension':'proof_integrity','effect':'required','description':'Condition\x20hashes\x20prevent\x20tampering'},{'dimension':'arbitration_fairness','effect':'boost','description':'Objective\x20evidence\x20reduces\x20dispute\x20bias'}],'industryFit':{'freelance':0x14,'education':0x1e,'rental':0x62,'retail':0x28,'subscription':0x14,'travel':0x3c,'licensing':0x19,'crowdfunding':0x14,'general':0x28},'addressesPainPoints':['Landlord\x20claims\x20damage\x20without\x20proof\x20(common\x20on\x20incumbent\x20short-stay\x20platforms)','No\x20mandatory\x20pre-rental\x20photo\x20(vehicle-rental\x20damage\x20claims\x20denied)','Platform\x20arbitrates\x20damage\x20disputes\x20opaquely'],'intentSignals':[/damage/i,/condition (photo|report|check|record)/i,/pre[ -]?rental/i,/post[ -]?rental/i,/attest/i,/wear and tear/i],'userProtections':['Pre-rental\x20hash\x20commits\x20baseline\x20condition','Guard\x20automatically\x20compares\x20post-rental\x20state','Cannot\x20be\x20charged\x20for\x20pre-existing\x20damage'],'merchantObligations':['Must\x20commit\x20pre-rental\x20condition\x20hash','Must\x20commit\x20post-rental\x20condition\x20hash','Must\x20use\x20Repository\x20for\x20evidence\x20storage'],'requiresKeeper':!![],'keeperHint':'Keeper\x20triggers\x20post-rental\x20hash\x20collection\x20and\x20initiates\x20damage\x20Guard\x20comparison'},{'id':'discount_lifecycle','name':'Discount\x20Lifecycle','description':'Coupon\x20promotions\x20bound\x20to\x20a\x20Service\x20(percentage\x20or\x20fixed-amount\x20off):\x20minted\x20to\x20recipients,\x20redeemed\x20automatically\x20at\x20buy,\x20burned\x20on\x20use.\x20Chain\x20truth:\x20a\x20redeemed\x20coupon\x27s\x20balance\x20decrements\x20PERMANENTLY\x20(no\x20restock,\x20no\x20revert),\x20and\x20standing\x20renewal\x20discounts\x20are\x20NOT\x20constructible\x20(the\x20renew\x20path\x20has\x20no\x20discount\x20hook\x20—\x20every\x20renewal\x20re-prices\x20from\x20the\x20SKU\x20price).','objectTypes':['service'],'templateRefs':[],'requiredConstraints':[{'constraint_id':'discount_budget_planned','description':'Total\x20discount\x20budget\x20(max_uses\x20x\x20discount_value)\x20planned\x20before\x20minting\x20—\x20the\x20burn\x20is\x20irreversible','level':'hard','blocking':!![]},{'constraint_id':'discount_burn_disclosed','description':'Burn-on-use\x20semantics\x20(permanent\x20decrement,\x20no\x20revert)\x20disclosed\x20in\x20the\x20promotion\x20terms','level':'hard','blocking':!![]},{'constraint_id':'discount_renewal_disclosed','description':'\x27First\x20period\x20X%\x20off,\x20then\x20standard\x27\x20disclosed\x20in\x20the\x20listing/WIP\x20BEFORE\x20purchase\x20(renewals\x20re-price\x20from\x20the\x20SKU\x20price\x20—\x20anti-dark-pattern)','level':'soft','blocking':![]}],'evaluationImpact':[{'dimension':'promotion_integrity','effect':'required','description':'Coupon\x20budget\x20and\x20burn\x20semantics\x20are\x20planned\x20and\x20disclosed,\x20never\x20improvised'},{'dimension':'fee_transparency','effect':'boost','description':'The\x20discounted\x20price\x20at\x20redemption\x20is\x20computed\x20by\x20the\x20chain,\x20not\x20asserted\x20by\x20prose'}],'industryFit':{'freelance':0x2d,'education':0x46,'rental':0x32,'retail':0x5f,'subscription':0x55,'travel':0x50,'licensing':0x3c,'crowdfunding':0x37,'general':0x46},'addressesPainPoints':['Coupon\x20systems\x20locked\x20inside\x20incumbent\x20platforms','Promotions\x20improvised\x20after\x20publish\x20with\x20no\x20budget\x20plan','Discount\x20promises\x20that\x20silently\x20change\x20at\x20renewal'],'intentSignals':[/coupon/i,/discount/i,/\bpromo/i,/voucher/i,/percentage off/i,/first[ -]?period off/i],'userProtections':['Redemption\x20is\x20computed\x20on-chain\x20at\x20buy\x20(no\x20manual\x20discount\x20approval)','Renewal\x20price\x20is\x20the\x20SKU\x20price\x20—\x20a\x20first-period\x20coupon\x20cannot\x20silently\x20renew\x20at\x20the\x20discounted\x20price','Expired\x20coupons\x20cannot\x20redeem'],'merchantObligations':['Plan\x20the\x20total\x20discount\x20budget\x20(max_uses\x20x\x20value)\x20before\x20minting','Disclose\x20burn-on-use\x20and\x20renewal\x20re-pricing\x20in\x20the\x20promotion\x20terms','Never\x20promise\x20a\x20standing\x20renewal\x20discount\x20(not\x20constructible\x20on-chain)'],'requiresKeeper':![]},{'id':'praise_incentive','name':'Review\x20Praise\x20Incentive','description':'Sale-time-planned\x20claim\x20Reward\x20for\x20buyer\x20reviews\x20(template\x20review_mode\x20\x27review_reward\x27):\x20the\x20build\x20emits\x20the\x20Reward\x20object,\x20attaches\x20the\x20replay-armed\x20claim\x20guard,\x20binds\x20it\x20to\x20the\x20Service,\x20and\x20funds\x20it\x20via\x20the\x20reward_funding\x20input\x20—\x20so\x20the\x20incentive\x20is\x20perceivable\x20by\x20the\x20buyer\x20BEFORE\x20ordering,\x20and\x20an\x20unfunded\x20or\x20unguarded\x20incentive\x20promise\x20must\x20not\x20publish.','objectTypes':['service','reward','guard'],'templateRefs':[],'requiredConstraints':[{'constraint_id':'reward_pool_funded','description':'reward_funding\x20input\x20present\x20at\x20build\x20(an\x20unfunded\x20incentive\x20promise\x20must\x20not\x20publish)','level':'hard','blocking':!![]},{'constraint_id':'reward_claim_replay_armed','description':'Claim\x20guard\x20carries\x20the\x20record-gate\x20idempotency\x20leg\x20(replay-drain\x20target\x20otherwise)','level':'hard','blocking':!![]}],'evaluationImpact':[{'dimension':'trust','effect':'boost','description':'Funded,\x20perceivable\x20review\x20incentives\x20raise\x20honest\x20review\x20volume'},{'dimension':'promotion_integrity','effect':'required','description':'Incentive\x20terms\x20are\x20chain-enforced\x20(funded\x20pool\x20+\x20guarded\x20claim),\x20not\x20prose\x20promises'}],'industryFit':{'freelance':0x4b,'education':0x41,'rental':0x2d,'retail':0x55,'subscription':0x4b,'travel':0x41,'licensing':0x2d,'crowdfunding':0x2d,'general':0x41},'addressesPainPoints':['No\x20mechanism\x20to\x20incentivize\x20honest\x20buyer\x20reviews','Review\x20rewards\x20locked\x20inside\x20incumbent\x20platforms','Incentive\x20promises\x20that\x20evaporate\x20after\x20purchase'],'intentSignals':[/incentive/i,/reward/i,/cashback/i,/rebate/i,/bonus/i,/\btips?\b/i],'userProtections':['Incentive\x20perceivable\x20BEFORE\x20ordering\x20(funded\x20at\x20build,\x20not\x20after)','Claim\x20terms\x20chain-enforced\x20with\x20replay\x20protection','Rating\x20polarity\x20recorded\x20as\x20range-queryable\x20on-chain\x20rows\x20(1-5\x20rating\x20column)'],'merchantObligations':['Fund\x20the\x20reward\x20pool\x20at\x20build\x20time\x20(reward_funding)','Keep\x20the\x20claim\x20guard\x20replay-armed\x20(record-gate\x20leg)','Disclose\x20claim\x20terms\x20in\x20the\x20listing/WIP\x20promise'],'requiresKeeper':![]},{'id':'after_sales_guarantee','name':'After-Sales\x20Guarantee','description':'Declared\x20buyer\x20after-sales\x20remedy\x20(template\x20after_sales_mode\x20\x27return\x27\x20|\x20\x27exchange\x27\x20|\x20\x27warranty\x27):\x20the\x20machine_shape\x20ships\x20the\x20backing\x20rail\x20(e.g.\x20return_requested\x20->\x20returned),\x20riding\x20a\x20claimed_by\x20polarity\x20pair\x20—\x20the\x20refund\x20leg\x20pays\x20the\x20buyer\x20at\x20claimed_by\x20none,\x20the\x20merchant-recovery\x20leg\x20at\x20claimed_by\x20some\x20—\x20with\x20the\x20remedy\x20window\x20anchored\x20on\x20the\x20delivered\x20ENTRY\x20time\x20so\x20a\x20buyer\x20cannot\x20stall\x20the\x20merchant,\x20and\x20de-conflicted\x20against\x20settlement\x20so\x20refund\x20and\x20ruling\x20payouts\x20never\x20double-pay.','objectTypes':['machine','guard','allocation','order'],'templateRefs':[],'requiredConstraints':[{'constraint_id':'after_sales_rail_present','description':'machine_shape\x20carries\x20a\x20node\x20backing\x20the\x20declared\x20after_sales_mode\x20(compile\x20AFTER_SALES_RAIL_MISSING\x20/\x20scanner\x20R-AFTER-SALES-RAIL)','level':'hard','blocking':!![]},{'constraint_id':'after_sales_polarity_pair','description':'refund\x20leg\x20claimed_by\x20some==false\x20paired\x20with\x20merchant-recovery\x20leg\x20some==true\x20(INV-C1,\x20RAIL_POLARITY_COLLISION\x20backstop)','level':'hard','blocking':!![]},{'constraint_id':'after_sales_window_anchored','description':'remedy\x20window\x20anchored\x20on\x20the\x20delivered\x20ENTRY\x20time,\x20not\x20a\x20drifting\x20current_time\x20(INV-C2,\x20TIME-ANCHOR-01)','level':'hard','blocking':!![]},{'constraint_id':'after_sales_no_double_remedy','description':'after-sales\x20refund\x20and\x20arbitration/award\x20payout\x20are\x20mutually\x20exclusive\x20rails\x20(INV-C3,\x20DUAL-RAIL-01)','level':'soft','blocking':![]}],'evaluationImpact':[{'dimension':'fund_safety','effect':'required','description':'The\x20claimed_by\x20polarity\x20pair\x20means\x20an\x20order\x20is\x20refunded\x20OR\x20recovered,\x20never\x20both'},{'dimension':'consumer_diligence','effect':'boost','description':'A\x20declared,\x20structurally-backed\x20remedy\x20window\x20is\x20verifiable\x20before\x20purchase'}],'industryFit':{'freelance':0x28,'education':0x2d,'rental':0x46,'retail':0x62,'subscription':0x23,'travel':0x37,'licensing':0x41,'crowdfunding':0x37,'general':0x3c},'addressesPainPoints':['Return/refund\x20policy\x20locked\x20inside\x20incumbent\x20platforms','No\x20enforced\x20return\x20window\x20—\x20buyer\x20stalls\x20or\x20merchant\x20refuses','Refund\x20and\x20dispute\x20payout\x20both\x20fire\x20(double-pay)','Exchange/warranty\x20promised\x20in\x20prose\x20with\x20no\x20on-chain\x20rail'],'intentSignals':[/after[ -]?sales/i,/\breturn/i,/exchange/i,/warranty/i,/remedy/i],'userProtections':['Remedy\x20window\x20is\x20chain-anchored\x20on\x20delivery\x20entry\x20(verifiable,\x20not\x20merchant\x20discretion)','Refund\x20returns\x20to\x20the\x20Order\x20(not\x20a\x20platform\x20balance)','The\x20polarity\x20pair\x20guarantees\x20exactly\x20one\x20remedy\x20pays'],'merchantObligations':['Ship\x20the\x20backing\x20rail\x20for\x20the\x20declared\x20after_sales_mode','Anchor\x20the\x20remedy\x20window\x20on\x20the\x20delivered\x20entry\x20time','Keep\x20the\x20refund\x20and\x20recovery\x20legs\x20a\x20claimed_by\x20polarity\x20pair\x20(never\x20both\x20satisfiable)'],'requiresKeeper':![]},{'id':'acceptance_judging','name':'Acceptance\x20&\x20Judging','description':'Declared\x20acceptance_mode\x20(\x27milestone\x27\x20|\x20\x27contest\x27\x20|\x20\x27bounty\x27\x20|\x20\x27agent\x27):\x20who\x20decides\x20the\x20escrow\x20releases\x20and\x20how\x20many\x20redelivery\x20rounds\x20are\x20allowed.\x20A\x20judge-decided\x20mode\x20routes\x20the\x20release\x20decision\x20to\x20an\x20independent\x20venue\x20(arbitration_mode\x20\x27third_party\x27)\x20so\x20the\x20payout-owing\x20party\x20never\x20self-adjudicates;\x20a\x20finite\x20revision_rounds_max\x20is\x20backed\x20by\x20a\x20counter\x20Repository\x20guard\x20because\x20the\x20chain\x20bounds\x20edges,\x20not\x20visits;\x20the\x20acceptance\x20and\x20timeout\x20siblings\x20are\x20distinct\x20forwards\x20so\x20the\x20buyer\x27s\x20approval\x20and\x20the\x20auto-accept\x20deadline\x20never\x20race\x20into\x20one\x20node.','objectTypes':['machine','guard','allocation','arb','repository'],'templateRefs':[],'requiredConstraints':[{'constraint_id':'acceptance_judge_independent','description':'a\x20judge-decided\x20acceptance_mode\x20(contest/bounty/agent)\x20declares\x20arbitration_mode\x20\x27third_party\x27\x20(INV-A3,\x20compile\x20ACCEPTANCE_JUDGE_NOT_INDEPENDENT\x20/\x20scanner\x20R-ACCEPTANCE-JUDGE)','level':'hard','blocking':!![]},{'constraint_id':'acceptance_revision_bounded','description':'a\x20finite\x20revision_rounds_max\x20is\x20backed\x20by\x20a\x20counter\x20Repository\x20guard,\x20or\x20declared\x20\x27unlimited\x27\x20(INV-A1,\x20compile\x20ACCEPTANCE_REVISION_UNBOUNDED\x20/\x20scanner\x20R-ACCEPTANCE-REVISION)','level':'hard','blocking':!![]},{'constraint_id':'acceptance_race_free','description':'the\x20acceptance\x20forward\x20and\x20its\x20timeout\x20complement\x20are\x20distinct\x20siblings,\x20never\x20a\x20dual-prev\x20race\x20into\x20one\x20node\x20(INV-A2,\x20widened\x20R-REVIEW-NORACE)','level':'soft','blocking':![]}],'evaluationImpact':[{'dimension':'arbitration_fairness','effect':'required','description':'A\x20judge-decided\x20release\x20routes\x20through\x20an\x20independent\x20venue,\x20not\x20the\x20payout-owing\x20party'},{'dimension':'fund_safety','effect':'boost','description':'A\x20finite\x20revision\x20cap\x20the\x20chain\x20can\x20actually\x20enforce\x20(counter-backed)\x20prevents\x20an\x20unbounded\x20redelivery\x20drain'},{'dimension':'operational_risk','effect':'boost','description':'Distinct\x20accept/timeout\x20siblings\x20keep\x20the\x20buyer\x27s\x20decision\x20and\x20the\x20auto-accept\x20deadline\x20from\x20deadlocking\x20the\x20node'}],'industryFit':{'freelance':0x60,'education':0x37,'rental':0x1e,'retail':0x23,'subscription':0x1e,'travel':0x28,'licensing':0x4b,'crowdfunding':0x23,'general':0x3c},'addressesPainPoints':['Contest/bounty\x20winner\x20picked\x20by\x20the\x20party\x20holding\x20the\x20escrow\x20(self-adjudication)','Revision\x20rounds\x20promised\x20as\x20finite\x20in\x20prose\x20but\x20unbounded\x20on-chain\x20(progress.move\x20caps\x20edges,\x20not\x20visits)','Buyer\x20approval\x20and\x20auto-accept\x20timeout\x20racing\x20into\x20one\x20node\x20(deadlock\x20or\x20double-advance)','Agent-task\x20evaluator\x20not\x20identity-bound\x20to\x20the\x20delivery'],'intentSignals':[/acceptance/i,/judg(e|ing)/i,/contest/i,/bounty/i,/revision/i,/redeliver/i,/deliverable approv/i,/who decides/i],'userProtections':['A\x20judge-decided\x20release\x20is\x20ruled\x20by\x20an\x20independent\x20venue,\x20verifiable\x20before\x20purchase','A\x20finite\x20revision\x20cap\x20is\x20genuinely\x20enforceable\x20(counter\x20guard),\x20not\x20a\x20prose\x20promise','Auto-accept\x20only\x20fires\x20on\x20its\x20own\x20distinct\x20timeout\x20forward,\x20never\x20by\x20racing\x20the\x20buyer\x27s\x20decision'],'merchantObligations':['Declare\x20arbitration_mode\x20\x27third_party\x27\x20for\x20any\x20judge-decided\x20acceptance_mode','Back\x20a\x20finite\x20revision_rounds_max\x20with\x20a\x20counter\x20Repository\x20guard,\x20or\x20declare\x20it\x20\x27unlimited\x27\x20honestly','Keep\x20the\x20acceptance\x20and\x20timeout\x20forwards\x20distinct\x20siblings\x20(distinct\x20forward\x20names)'],'requiresKeeper':!![],'keeperHint':'A\x20judge-decided\x20acceptance\x20needs\x20a\x20keeper\x20to\x20push\x20the\x20ruling/placement\x20terminal\x20forward\x20once\x20the\x20independent\x20venue\x20decides;\x20the\x20accept-timeout\x20forward\x20also\x20needs\x20a\x20keeper\x20at\x20the\x20window\x20deadline'},{'id':'installment_deposit','name':'Installment\x20&\x20Deposit','description':'Declared\x20installment_mode\x20(\x27deposit_balance\x27\x20|\x20\x27milestone_n\x27):\x20the\x20buyer\x20pays\x20in\x20stages\x20—\x20a\x20deposit\x20now\x20and\x20the\x20balance\x20later,\x20or\x20N\x20milestone\x20captures.\x20Each\x20later\x20capture\x20rides\x20the\x20one-PTB\x20order_renew\x20call\x20(fund\x20+\x20record\x20+\x20advance).\x20PRE-STATE\x20CONSTRAINT\x20(esound-mn-261021\x20B-1,\x20mainnet-verified):\x20a\x20guard\x20reading\x20allocation.balance\x20sees\x20only\x20the\x20COMMITTED\x20pre-transaction\x20balance\x20—\x20the\x20same-PTB\x20payment\x20is\x20INVISIBLE\x20to\x20it,\x20so\x20a\x20balance-gated\x20capture\x20forward\x20ALWAYS\x20aborts\x20when\x20advanced\x20by\x20order_renew.\x20A\x20capture\x20forward\x20therefore\x20EITHER\x20binds\x20the\x20fund\x20gate\x20and\x20draws\x20on\x20funds\x20committed\x20in\x20a\x20prior\x20transaction\x20(prepaid-full\x20at\x20buy\x20—\x20staged-release\x20semantics),\x20OR\x20is\x20gate-less\x20and\x20relies\x20on\x20this\x20module\x27s\x20order_renew\x20routing\x20to\x20land\x20the\x20funds;\x20every\x20deposit-held\x20state\x20carries\x20a\x20refund/cancel\x20exit\x20rail\x20(a\x20full\x20refund\x20or\x20a\x20declared\x20kill\x20fee)\x20because\x20the\x20chain\x20imposes\x20no\x20obligation\x20to\x20pay\x20the\x20balance,\x20so\x20a\x20buyer\x20who\x20walks\x20away\x20never\x20strands\x20the\x20paid\x20portion.','objectTypes':['machine','guard','allocation','order','payment'],'templateRefs':[],'requiredConstraints':[{'constraint_id':'installment_funding_gated','description':'every\x20capture\x20forward\x20(a\x20due\x20state\x20advancing\x20into\x20a\x20paid\x20state)\x20either\x20binds\x20a\x20fund-gate\x20Guard\x20reading\x20allocation.balance\x20(satisfiable\x20only\x20against\x20funds\x20committed\x20in\x20a\x20PRIOR\x20transaction\x20—\x20prepaid\x20shape,\x20INV-B1,\x20compile\x20INSTALLMENT_FUNDING_UNGATED\x20/\x20scanner\x20R-INSTALLMENT-FUNDING)\x20or\x20is\x20gate-less\x20and\x20relies\x20on\x20the\x20order_renew\x20routing\x20to\x20land\x20the\x20funds\x20same-PTB\x20(a\x20balance\x20gate\x20+\x20same-PTB\x20order_renew\x20ALWAYS\x20aborts\x20—\x20esound-mn-261021\x20B-1)','level':'soft','blocking':![]},{'constraint_id':'installment_deposit_exit','description':'every\x20deposit-held\x20state\x20carries\x20a\x20refund/cancel/forfeit\x20exit\x20rail\x20so\x20the\x20paid\x20portion\x20is\x20never\x20stranded\x20(INV-B2,\x20compile\x20INSTALLMENT_DEPOSIT_STRANDED\x20/\x20scanner\x20R-INSTALLMENT-DEPOSIT)','level':'soft','blocking':![]},{'constraint_id':'installment_release_once','description':'the\x20release\x20allocator\x20is\x20once_per_order\x20and\x20order-anchored\x20so\x20a\x20replay\x20cannot\x20re-capture\x20(INV-B3,\x20rides\x20the\x20existing\x20E-2\x20/\x20once-slot\x20/\x20order-anchor\x20audit)','level':'soft','blocking':![]}],'evaluationImpact':[{'dimension':'fund_safety','effect':'required','description':'The\x20capture\x20cannot\x20zero-value-advance:\x20gate-less\x20captures\x20land\x20funds\x20via\x20the\x20order_renew\x20routing;\x20balance-gated\x20captures\x20draw\x20on\x20prior-transaction\x20funds\x20(PRE-STATE\x20CONSTRAINT\x20—\x20same-PTB\x20funding\x20is\x20invisible\x20to\x20guards,\x20esound-mn-261021\x20B-1)'},{'dimension':'consumer_diligence','effect':'boost','description':'A\x20declared\x20deposit-exit\x20policy\x20(full\x20refund\x20vs\x20kill\x20fee)\x20is\x20verifiable\x20before\x20the\x20buyer\x20commits\x20the\x20deposit'},{'dimension':'operational_risk','effect':'boost','description':'once_per_order\x20+\x20order\x20anchor\x20on\x20the\x20release\x20keeps\x20a\x20replay\x20from\x20re-capturing\x20or\x20double-releasing'}],'industryFit':{'freelance':0x46,'education':0x2d,'rental':0x37,'retail':0x5a,'subscription':0x28,'travel':0x32,'licensing':0x1e,'crowdfunding':0x37,'general':0x3c},'addressesPainPoints':['Pre-order\x20/\x20deposit-then-balance\x20sales\x20locked\x20inside\x20incumbent\x20platforms','A\x20later\x20payment\x20recorded\x20without\x20the\x20funds\x20actually\x20landing\x20(zero-value\x20advance)','A\x20buyer\x20who\x20walks\x20away\x20strands\x20the\x20deposit\x20with\x20no\x20on-chain\x20exit','Milestone\x20billing\x20where\x20a\x20replay\x20re-charges\x20or\x20double-releases'],'intentSignals':[/installment/i,/deposit/i,/pay in stages/i,/down[ -]?payment/i,/balance (later|afterwards?)/i,/part(ial)? payment/i,/staged? payment/i],'userProtections':['A\x20capture\x20forward\x20cannot\x20zero-value-advance\x20(gate-less\x20captures\x20land\x20funds\x20via\x20the\x20order_renew\x20routing;\x20balance-gated\x20captures\x20require\x20prior-transaction\x20funds)','The\x20deposit-exit\x20policy\x20is\x20declared\x20and\x20structurally\x20backed\x20before\x20purchase','The\x20release\x20is\x20once-per-order\x20and\x20order-anchored,\x20so\x20no\x20replay\x20double-charges'],'merchantObligations':['Give\x20every\x20capture\x20forward\x20a\x20funding\x20story:\x20gate-less\x20+\x20order_renew\x20routing,\x20or\x20a\x20balance\x20fund\x20gate\x20fed\x20by\x20PRIOR-transaction\x20funds\x20(prepaid\x20shape\x20—\x20a\x20gate\x20plus\x20same-PTB\x20order_renew\x20always\x20aborts,\x20esound-mn-261021\x20B-1)','Ship\x20a\x20deposit-exit\x20rail\x20(refund\x20or\x20declared\x20kill\x20fee)\x20from\x20every\x20deposit-held\x20state','Make\x20the\x20release\x20allocator\x20once_per_order\x20and\x20order-anchored','Disclose\x20the\x20deposit\x20amount,\x20balance\x20window,\x20and\x20exit\x20policy\x20in\x20the\x20listing/WIP\x20promise'],'requiresKeeper':!![],'keeperHint':'The\x20balance-window\x20deadline\x20(a\x20buyer\x20who\x20never\x20pays\x20the\x20balance)\x20needs\x20a\x20keeper\x20to\x20drive\x20the\x20deposit-exit\x20rail\x20at\x20the\x20window\x20close;\x20a\x20milestone\x20capture\x20timeout\x20likewise'},{'id':'affiliate_commission','name':'Affiliate\x20Commission','description':'Declared\x20affiliate_mode\x20(\x27commission\x27):\x20the\x20merchant\x20sells\x20through\x20referral/affiliate\x20partners\x20and\x20owes\x20the\x20referring\x20partner\x20an\x20independent\x20commission\x20leg.\x20The\x20commission\x20is\x20window-anchored\x20—\x20it\x20accrues\x20at\x20attribution\x20but\x20is\x20claimable\x20only\x20after\x20the\x20attribution/refund\x20window\x20closes,\x20so\x20an\x20in-window\x20refund\x20never\x20has\x20to\x20reverse\x20an\x20already-paid\x20partner\x20(the\x20chain\x20has\x20no\x20debit/clawback\x20primitive,\x20so\x20a\x20released\x20commission\x20is\x20unrecoverable\x20and\x20the\x20template\x20must\x20disclose\x20that\x20honestly).\x20The\x20commission\x20leg\x20is\x20an\x20INDEPENDENT\x20allocation\x20off\x20a\x20dedicated\x20pool,\x20never\x20a\x20drain\x20of\x20the\x20buyer\x27s\x20goods\x20escrow.','objectTypes':['machine','guard','allocation','repository'],'templateRefs':[],'requiredConstraints':[{'constraint_id':'affiliate_rail_present','description':'a\x20declared\x20commission\x20overlay\x20has\x20a\x20commission-family\x20machine\x20node\x20or\x20a\x20commission\x20allocator\x20row,\x20and\x20the\x20leg\x20is\x20INDEPENDENT\x20of\x20the\x20goods\x20escrow\x20(INV-D3,\x20compile\x20AFFILIATE_RAIL_MISSING\x20/\x20scanner\x20R-AFFILIATE-RAIL)','level':'soft','blocking':![]},{'constraint_id':'affiliate_clawback_disclosed','description':'a\x20build_note\x20discloses\x20the\x20post-lock\x20no-clawback\x20truth\x20—\x20a\x20released\x20commission\x20cannot\x20be\x20reversed\x20on\x20chain\x20(INV-D2,\x20compile\x20AFFILIATE_CLAWBACK_UNDISCLOSED\x20/\x20scanner\x20R-AFFILIATE-DISCLOSURE)','level':'soft','blocking':![]},{'constraint_id':'affiliate_window_anchored','description':'the\x20commission\x20claim\x20is\x20gated\x20by\x20a\x20window-anchored\x20guard\x20so\x20it\x20is\x20claimable\x20only\x20after\x20the\x20attribution/refund\x20window\x20closes\x20(INV-D1,\x20rides\x20the\x20generic\x20TIME-ANCHOR-01\x20audit)','level':'soft','blocking':![]}],'evaluationImpact':[{'dimension':'fund_safety','effect':'required','description':'The\x20commission\x20leg\x20is\x20an\x20independent\x20allocation\x20off\x20its\x20own\x20pool,\x20never\x20a\x20Surplus/Rate\x20drain\x20of\x20the\x20buyer\x27s\x20goods\x20escrow\x20(anti-grab-pool)'},{'dimension':'consumer_diligence','effect':'boost','description':'The\x20post-lock\x20no-clawback\x20truth\x20is\x20disclosed\x20before\x20purchase,\x20so\x20a\x20buyer/merchant\x20never\x20assumes\x20a\x20reversal\x20the\x20chain\x20cannot\x20do'},{'dimension':'operational_risk','effect':'boost','description':'The\x20window\x20anchor\x20means\x20an\x20in-window\x20refund\x20never\x20has\x20to\x20reverse\x20an\x20already-paid\x20partner\x20—\x20the\x20unrecoverable\x20surface\x20is\x20minimized\x20by\x20construction'}],'industryFit':{'freelance':0x3c,'education':0x37,'rental':0x23,'retail':0x50,'subscription':0x41,'travel':0x3c,'licensing':0x46,'crowdfunding':0x3c,'general':0x3c},'addressesPainPoints':['Referral/affiliate\x20payouts\x20locked\x20inside\x20incumbent\x20affiliate\x20networks\x20with\x20opaque\x20attribution','A\x20commission\x20drained\x20from\x20the\x20buyer\x27s\x20goods\x20escrow\x20instead\x20of\x20an\x20independent\x20pool\x20(pool-grabbing)','A\x20refund\x20after\x20commission\x20release\x20falsely\x20assumed\x20to\x20claw\x20back\x20the\x20partner\x20payout\x20(no\x20on-chain\x20debit\x20exists)','Attribution\x20claimed\x20instantly,\x20before\x20the\x20refund\x20window,\x20then\x20unrecoverable\x20when\x20the\x20order\x20refunds'],'intentSignals':[/affiliate/i,/referral/i,/referr/i,/commission/i,/revenue[ -]?shar/i,/partner[ -]?payout/i],'userProtections':['The\x20commission\x20is\x20paid\x20from\x20a\x20dedicated\x20pool,\x20so\x20the\x20buyer\x27s\x20goods\x20escrow\x20is\x20never\x20drained\x20by\x20the\x20partner\x20leg','The\x20post-lock\x20no-clawback\x20reality\x20is\x20disclosed\x20before\x20purchase,\x20not\x20discovered\x20at\x20refund\x20time','The\x20commission\x20is\x20only\x20claimable\x20after\x20the\x20attribution/refund\x20window\x20closes,\x20so\x20an\x20in-window\x20refund\x20is\x20clean'],'merchantObligations':['Route\x20the\x20commission\x20through\x20an\x20INDEPENDENT\x20allocation\x20leg\x20to\x20an\x20explicit\x20non-empty\x20partner\x20Entity','Gate\x20the\x20claim\x20with\x20a\x20window-anchored\x20guard\x20(claimable\x20only\x20after\x20the\x20attribution/refund\x20window)','Disclose\x20the\x20post-lock\x20no-clawback\x20truth\x20in\x20a\x20build_note\x20and\x20the\x20listing\x20promise','Declare\x20the\x20commission\x20rate/bps\x20and\x20the\x20attribution\x20window\x20in\x20the\x20listing\x20so\x20a\x20partner\x20can\x20price\x20it\x20before\x20referral'],'requiresKeeper':!![],'keeperHint':'The\x20attribution/refund\x20window\x20deadline\x20needs\x20a\x20keeper\x20to\x20open\x20the\x20commission\x20claim\x20once\x20the\x20window\x20closes\x20(the\x20claim\x20guard\x27s\x20time\x20gate\x20arms\x20at\x20entry_time\x20+\x20window)'},{'id':'crowdfunding','name':'Crowdfunding\x20Campaign','description':'Declared\x20crowdfunding_mode\x20(\x27threshold\x27\x20all-or-nothing\x20/\x20\x27flexible\x27\x20keep-it-all):\x20backers\x20each\x20escrow\x20a\x20contribution\x20in\x20its\x20OWN\x20unpooled\x20Allocation\x20(for_object\x20=\x20their\x20order,\x20never\x20balance-joined,\x20so\x20attribution\x20survives).\x20A\x20shared\x20campaign\x20Repository\x20records\x20one\x20writer-bound\x20numeric\x20row\x20per\x20contribution\x20(id_from\x20signer,\x20value\x20=\x20amount).\x20At\x20an\x20ABSOLUTE\x20campaign\x20deadline\x20a\x20settlement\x20guard\x20reads\x20the\x20on-chain\x20aggregate\x20(repository.data\x20sum-where,\x20query\x201174\x20→\x20U256)\x20and\x20decides:\x20aggregate\x20>=\x20goal\x20→\x20release\x20every\x20contribution\x20to\x20the\x20project\x20Entity;\x20aggregate\x20<\x20goal\x20(threshold\x20model)\x20→\x20refund\x20each\x20backer\x20their\x20own\x20contribution\x20(slot\x200\x20—\x20the\x20submitted\x20Order,\x20extracted\x20by\x20owner_receive;\x20NEVER\x20slot\x20254\x20on\x20a\x20refund\x20rail).\x20The\x20flexible\x20model\x20has\x20no\x20goal\x20and\x20no\x20refund\x20leg\x20—\x20contributions\x20release\x20at\x20the\x20deadline\x20and\x20are\x20non-refundable\x20(disclosed).\x20The\x20aggregate\x20is\x20attested-roster\x20evidence,\x20not\x20a\x20chain-verified\x20custody\x20proof;\x20a\x20raise\x20is\x20never\x20an\x20investment.','objectTypes':['machine','guard','allocation','repository'],'templateRefs':[],'requiredConstraints':[{'constraint_id':'crowdfunding_exit_rail_present','description':'a\x20declared\x20campaign\x20has\x20a\x20release/settlement\x20rail,\x20and\x20a\x20threshold\x20campaign\x20additionally\x20has\x20a\x20refund\x20rail\x20—\x20the\x20two-leg\x20escrow-exit\x20(release\x20XOR\x20refund,\x20D-BUG-2)\x20so\x20contributions\x20never\x20strand\x20at\x20the\x20deadline\x20(INV-E1,\x20compile\x20CROWDFUNDING_THRESHOLD_GATE_MISSING\x20/\x20scanner\x20R-CROWDFUNDING-RAIL)','level':'soft','blocking':![]},{'constraint_id':'crowdfunding_aggregate_writer_bound','description':'a\x20threshold\x20aggregate\x20reads\x20the\x20ESCROW-BOUND\x20sum\x20(query\x201179,\x20per-row\x20min(row,\x20order.amount))\x20over\x20ORDER-KEYED\x20rows\x20(policy\x20id_from\x20unset,\x20row\x20id\x20=\x20the\x20funder\x27s\x20Order\x20address\x20+\x20an\x20identity\x20write_guard\x20order.owner==Signer),\x20never\x20a\x20self-reported\x20free-form\x20sum\x20over\x20wallet-keyed\x20rows\x20(INV-E2\x20/\x20R-X1-17,\x20compile\x20CROWDFUNDING_AGGREGATE_UNBOUND\x20/\x20CROWDFUNDING_SIGNER_KEYED_ROWS\x20/\x20scanner\x20R-CROWDFUNDING-AGGREGATE)','level':'soft','blocking':![]},{'constraint_id':'crowdfunding_disclosure_present','description':'build_notes\x20disclose\x20the\x20L-04\x20aggregate\x20trust\x20boundary\x20(threshold),\x20the\x20L-01\x20non-investment\x20statement,\x20the\x20L-05\x20KYC/AML\x20caution,\x20and\x20—\x20for\x20a\x20flexible\x20build\x20—\x20the\x20NO-REFUND\x20keep-it-all\x20posture\x20(INV-E3,\x20compile\x20CROWDFUNDING_DISCLOSURE_MISSING\x20/\x20scanner\x20R-CROWDFUNDING-DISCLOSURE)','level':'soft','blocking':![]}],'evaluationImpact':[{'dimension':'fund_safety','effect':'required','description':'Each\x20contribution\x20is\x20escrowed\x20UNPOOLED\x20(for_object\x20=\x20its\x20own\x20order,\x20never\x20balance::join)\x20so\x20a\x20missed\x20campaign\x20refunds\x20every\x20backer\x20their\x20OWN\x20money;\x20the\x20release/refund\x20legs\x20are\x20mutually\x20exclusive\x20(D-BUG-2)'},{'dimension':'consumer_diligence','effect':'boost','description':'The\x20aggregate-trust\x20boundary,\x20the\x20non-investment\x20posture\x20and\x20(flexible)\x20the\x20no-refund\x20reality\x20are\x20disclosed\x20before\x20contribution,\x20so\x20a\x20backer\x20never\x20assumes\x20a\x20chain-verified\x20custody\x20proof\x20or\x20a\x20refund\x20the\x20model\x20does\x20not\x20have'},{'dimension':'operational_risk','effect':'boost','description':'One\x20ABSOLUTE\x20shared\x20deadline\x20(not\x20per-order\x20entry+duration)\x20means\x20every\x20backer\x20settles\x20at\x20the\x20same\x20cutoff;\x20the\x20writer-bound\x20ledger\x20makes\x20the\x20raise\x20total\x20attributable\x20and\x20honest'}],'industryFit':{'freelance':0x1e,'education':0x28,'rental':0x14,'retail':0x3c,'subscription':0x23,'travel':0x19,'licensing':0x2d,'crowdfunding':0x64,'general':0x37},'addressesPainPoints':['An\x20all-or-nothing\x20raise\x20where\x20a\x20missed\x20goal\x20must\x20refund\x20every\x20backer,\x20but\x20pooled\x20custody\x20loses\x20per-backer\x20attribution','A\x20funding\x20total\x20presented\x20as\x20a\x20chain-verified\x20custody\x20proof\x20when\x20it\x20is\x20only\x20an\x20attested\x20sum\x20over\x20keeper-supplied\x20rows','A\x20backer\x20mistaking\x20a\x20flexible\x20keep-it-all\x20raise\x20for\x20a\x20refundable\x20all-or-nothing\x20campaign','Pooled\x20cross-border\x20fundraising\x20treated\x20as\x20a\x20casual\x20purchase\x20despite\x20HIGH\x20securities\x20/\x20money-transmission\x20/\x20KYC-AML\x20exposure'],'intentSignals':[/crowdfund/i,/\bbackers?\b/i,/campaign/i,/all[ -]?or[ -]?nothing/i,/fundrais/i,/\bpledge/i,/raise (funds|money)/i,/keep[ -]?it[ -]?all/i],'userProtections':['Each\x20contribution\x20is\x20escrowed\x20to\x20the\x20backer\x27s\x20OWN\x20order\x20(unpooled),\x20so\x20a\x20missed\x20threshold\x20refunds\x20exactly\x20their\x20money','The\x20aggregate-trust\x20boundary\x20and\x20the\x20non-investment\x20posture\x20are\x20disclosed\x20before\x20contribution','A\x20flexible\x20raise\x20states\x20the\x20NO-REFUND\x20keep-it-all\x20posture\x20up\x20front,\x20never\x20blurred\x20with\x20all-or-nothing','Delivery\x20after\x20a\x20successful\x20raise\x20is\x20backed\x20by\x20the\x20compensation\x20fund\x20+\x20third-party\x20arbitration'],'merchantObligations':['Escrow\x20each\x20contribution\x20UNPOOLED\x20(for_object\x20=\x20the\x20funder\x27s\x20order),\x20never\x20balance-joined\x20into\x20a\x20shared\x20pot','Bind\x20the\x20campaign\x20Repository\x20write_guard\x20to\x20the\x20contributing\x20backer\x20(id_from\x20signer,\x20order.owner==Signer)\x20so\x20the\x20aggregate\x20cannot\x20be\x20forged','Gate\x20release\x20on\x20the\x20sum-where\x20aggregate\x20ANDed\x20with\x20an\x20ABSOLUTE\x20shared\x20campaign\x20deadline;\x20pair\x20the\x20refund\x20leg\x20with\x20a\x20recover_gate\x20rail\x20(D-BUG-2)','Disclose\x20the\x20L-04\x20aggregate\x20trust\x20boundary,\x20the\x20L-01\x20non-investment\x20statement,\x20the\x20L-05\x20KYC/AML\x20caution,\x20and\x20(flexible)\x20the\x20no-refund\x20posture\x20in\x20build_notes\x20and\x20the\x20listing'],'requiresKeeper':!![],'keeperHint':'The\x20ABSOLUTE\x20campaign\x20deadline\x20needs\x20a\x20keeper\x20to\x20drive\x20settlement\x20once\x20Clock\x20>=\x20deadline:\x20on\x20a\x20met\x20goal\x20advance\x20each\x20order\x20to\x20the\x20release\x20terminal;\x20on\x20a\x20missed\x20threshold\x20enumerate\x20contributor\x20ids\x20via\x20find-where\x20(1176)\x20/\x20keys-where\x20(1177,\x20max\x20100\x20per\x20batch)\x20and\x20advance\x20each\x20refund\x20leg'}];export function getBusinessModule(a){return CORE_BUSINESS_MODULES['find'](b=>b['id']===a);}export function getModulesForIndustry(a){return[...CORE_BUSINESS_MODULES]['sort']((c,d)=>(d['industryFit'][a]??0x0)-(c['industryFit'][a]??0x0));}export function recommendModules(a,b,c){const d=c?.['minFit']??0x32,e=c?.['maxModules']??0x5,f=CORE_BUSINESS_MODULES['map'](g=>{let h=g['industryFit'][a]??0x32;const i=b['toLowerCase']();for(const j of g['addressesPainPoints']){const k=j['toLowerCase']()['split'](/\s+/),l=k['filter'](n=>i['includes'](n))['length'];h+=l*0x5;}return{'module':g,'score':Math['min'](h,0x64)};});return f['filter'](g=>g['score']>=d)['sort']((g,h)=>h['score']-g['score'])['slice'](0x0,e)['map'](g=>g['module']);}export function moduleHasIntentEvidence(a,b){if(!a['intentSignals']||a['intentSignals']['length']===0x0)return![];return a['intentSignals']['some'](c=>c['test'](b));}export function checkModuleConstraints(a,b,c){const d=a['requiredConstraints']['filter'](h=>h['blocking']&&!b['has'](h['constraint_id']))['map'](h=>h['constraint_id']),e=d['length']===0x0,f=a['evaluationImpact']['filter'](h=>h['effect']==='boost'||h['effect']==='required')['reduce']((h,i)=>h+(i['effect']==='required'?0xf:0x8),0x0),g=c?.['evidenceMatched']===![]?0x0:f;return{'module':a['id'],'adopted':e,'reason':e?undefined:'Missing\x20required\x20constraints:\x20'+d['join'](',\x20'),'missingConstraints':d['length']>0x0?d:undefined,'estimatedScoreBoost':Math['min'](g,0x64),'evidence_matched':c?.['evidenceMatched']};}export function calculateModuleScoreBoost(a){const b={};for(const c of a){for(const d of c['evaluationImpact']){const e=d['effect']==='required'?0xf:d['effect']==='boost'?0x8:0x3;b[d['dimension']]=(b[d['dimension']]??0x0)+e;}}return b;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{EDGE_SCHEMAS,EDGE_SCHEMA_BY_ID}from'./edge-schema.js';import{extractCoinType,extractEventRefs,extractObjectEdges,extractReverseRefs,extractTableRefs,inferObjectType,REVERSE_GROUP_WILDCARD}from'./extract.js';import{mergeBudget}from'./dataplane.js';import{deriveOrderCompletion,terminalNamesOfEdges}from'./order-status.js';import{LINKER_RING_LIMIT as a99a}from'./sdk-batch.js';import{wowAddressKind}from'@wowok/wowok';function readStats(a){const b=a;if(b['stats'])return{'batches':b['stats']['batches'],'byChannel':{...b['stats']['byChannel']},'dedupHits':b['stats']['dedupHits']};if(b['batches'])return{'batches':Object['values'](b['batches'])['reduce']((c,d)=>c+d,0x0),'byChannel':{...b['batches']},'dedupHits':b['dedupHits']??0x0};return{'batches':0x0,'byChannel':{'objects':0x0,'keyedFields':0x0,'tables':0x0,'events':0x0},'dedupHits':0x0};}function isEoa(a){return wowAddressKind(a)==='user';}function isWfNodeId(a){return a['includes']('::node::');}class Gate{['wl'];constructor(a){this['wl']=a;}['allows'](a,b){if(this['wl']['deny']?.['includes'](a['id']))return![];const c=this['wl']['familyDepths']?.[a['family']];if(c!==undefined&&b>=c)return![];if(this['wl']['schemas'])return this['wl']['schemas']['includes'](a['id']);if(this['wl']['families']&&!this['wl']['families']['includes'](a['family']))return![];return!![];}['allowsTable'](a,b){if(a['read']['kind']!=='table')return![];if(this['wl']['deny']?.['includes'](a['id']))return![];const c=this['wl']['familyDepths']?.[a['family']];if(c!==undefined&&b>=c)return![];if(this['wl']['families']&&!this['wl']['families']['includes'](a['family']))return![];return!!this['wl']['tableEdges']?.['includes'](a['id']);}['allowsEvent'](a,b){if(a['read']['kind']!=='event')return![];if(this['wl']['deny']?.['includes'](a['id']))return![];const c=this['wl']['familyDepths']?.[a['family']];if(c!==undefined&&b>=c)return![];if(this['wl']['families']&&!this['wl']['families']['includes'](a['family']))return![];return!!this['wl']['eventEdges']?.['includes'](a['id']);}['effectiveMaxHops'](a){const b=a['maxHops'],c=this['wl']['schemaHops']?.[a['id']];if(b===undefined)return c;if(c===undefined)return b;return Math['min'](b,c);}}class GraphBuilder{['graph'];['edgeIds']=new Set();['budget'];['exhausted']={};constructor(a,b,c){this['budget']=c,this['graph']={'network':a,'seed':b,'builtAt':Date['now'](),'nodes':new Map(),'edges':[],'out':new Map(),'inc':new Map(),'gaps':[],'truncations':[],'rpcReport':{'batches':0x0,'byChannel':{'objects':0x0,'keyedFields':0x0,'tables':0x0,'events':0x0},'dedupHits':0x0},'budgetExhausted':{}};}['addSeed'](a){const b=inferObjectType(a),c={'id':a,'kind':isWfNodeId(a)?'wfnode':isEoa(a)?'eoa':'object','objectType':b??undefined,'state':'seed','origins':[],'depth':0x0};return this['graph']['nodes']['set'](a,c),c;}['addNode'](a,b,c){const d=this['graph']['nodes']['get'](a);if(d){if(c)d['origins']['push']({'via':c['schema'],'from':c['from'],'depth':b});return d;}if(this['graph']['nodes']['size']>=this['budget']['maxNodes'])return this['exhausted']['nodes']=!![],undefined;const e=isWfNodeId(a),f=e?undefined:inferObjectType(a),g={'id':a,'kind':e?'wfnode':isEoa(a)?'eoa':'object','objectType':f??undefined,'state':e?'stub':'seed','origins':c?[{'via':c['schema'],'from':c['from'],'depth':b}]:[],'depth':b};return this['graph']['nodes']['set'](a,g),g;}['addEdge'](a,b,c,d,e){const f=c['to'],g=c['key']?'|'+c['key']:'',h=a['id']+'|'+b+'→'+f+g;if(this['edgeIds']['has'](h))return;this['edgeIds']['add'](h);const i={'id':h,'schema':a['id'],'family':a['family'],'from':b,'to':f,'retention':a['retention'],'observedAt':d,'payload':c['payload'],'truncated':e||a['retention']==='bounded_window','key':c['key']};this['graph']['edges']['push'](i),pushMap(this['graph']['out'],b,i),pushMap(this['graph']['inc'],f,i);}['markTruncation'](a){this['graph']['truncations']['push'](a);}['finalize'](a){return this['graph']['rpcReport']=readStats(a),this['graph']['budgetExhausted']=this['exhausted'],this['graph'];}}function pushMap(a,b,c){const d=a['get'](b);if(d)d['push'](c);else a['set'](b,[c]);}export async function expandTopology(a,c){const d=c['seed']['toLowerCase'](),e=mergeBudget(c['budget']),f=new Gate(c['edges']??{}),h=new GraphBuilder(c['network'],d,e);h['addSeed'](d);const i=new Set(),j=new Set(),l=new Set(),m=new Map(),n=new Set();let o=new Set([d]);for(let p=0x0;p<=e['maxDepth'];p++){if(o['size']===0x0)break;if(h['exhausted']['nodes'])break;const q=Date['now'](),r=new Map(),t=(D,E)=>{const F=r['get'](D);if(F)return F;const G=new Map();r['set'](D,G);const H=h['graph']['nodes']['get'](D);if(H&&H['origins']['length']>0x0&&!E['has'](D)){E['add'](D);for(const I of H['origins']){if(!I['via']||!I['from']||E['has'](I['from']))continue;const J=t(I['from'],E);for(const [L,M]of J){if(M<(G['get'](L)??Infinity))G['set'](L,M);}const K=(J['get'](I['via'])??0x0)+0x1;if(K<(G['get'](I['via'])??Infinity))G['set'](I['via'],K);}E['delete'](D);}return G;},u=[...o]['filter'](D=>{const E=h['graph']['nodes']['get'](D);return E['kind']==='object'&&(E['state']==='seed'||E['state']==='stub')&&!i['has'](D);}),v=new Set();if(u['length']>0x0){const D=await a['getObjects'](u);if(readStats(a)['batches']>=e['maxRpcs'])h['exhausted']['rpcs']=!![];for(const E of u){const F=h['graph']['nodes']['get'](E),G=lookupMapLower(D,E);i['add'](E);if(!G){F['state']='error',F['error']='not_found_or_failed',h['graph']['gaps']['push'](E);continue;}F['state']='fetched',F['raw']=G,F['objectType']=String(G['type']??F['objectType']??inferObjectType(E)??''),F['coinType']=extractCoinType(G['type_raw']),v['add'](E);}}const w=[];for(const H of v){const I=h['graph']['nodes']['get'](H);if(!I['objectType']||!I['raw'])continue;for(const J of extractObjectEdges(I['objectType'],I['raw'])){const K=EDGE_SCHEMA_BY_ID['get'](J['schemaId']);if(!K||!f['allows'](K,p))continue;w['push']({'schema':K,'sourceId':H,'refs':J['refs'],'observed':J['refs']['length']});}}const x=[...v]['filter'](L=>{const M=h['graph']['nodes']['get'](L);return EDGE_SCHEMAS['some'](N=>N['source']===M['objectType']&&N['read']['kind']==='table');});for(const L of x){const M=h['graph']['nodes']['get'](L),N=EDGE_SCHEMAS['filter'](P=>P['source']===M['objectType']&&P['read']['kind']==='table'&&f['allowsTable'](P,p)),O=new Map();for(const P of N){const Q=P['read']['rowType'],R=O['get'](Q)??[];R['push'](P),O['set'](Q,R);}for(const [S,T]of O){const U=L+'|'+S;if(l['has'](U))continue;l['add'](U);const V=Math['max'](...T['map'](a0=>e['perKindCaps'][a0['id']]??e['maxFanoutPerNode']));let W,X=![];try{const a0=await a['getTable'](L,{'maxItems':V});if(readStats(a)['batches']>=e['maxRpcs'])h['exhausted']['rpcs']=!![];W=a0['items'],X=a0['truncated'];}catch{h['graph']['gaps']['push'](L+'#'+S);continue;}const Y=new Set(T['map'](a1=>a1['id'])),Z=extractTableRefs(S,L,W)['filter'](a1=>{const a2=EDGE_SCHEMA_BY_ID['get'](a1['schemaId']);return a2['read']['kind']==='derived'||Y['has'](a1['schemaId']);});for(const a1 of Z){const a2=EDGE_SCHEMA_BY_ID['get'](a1['schemaId']);let a3=a1['refs'];a2['family']==='M'&&M['coinType']&&(a3=a3['map'](a4=>({...a4,'payload':{'coinType':M['coinType'],...a4['payload']}}))),w['push']({'schema':a2,'sourceId':L,'refs':a3,'observed':a3['length']});}X&&h['markTruncation']({'nodeId':L,'schema':T[0x0]['id'],'observed':W['length'],'limit':V,'reason':'table_page'});}}const y=[...o]['filter'](a4=>{const a5=h['graph']['nodes']['get'](a4);return a5['kind']!=='wfnode'&&(a5['kind']==='eoa'||a5['state']==='fetched');}),z=new Map(),A=new Map();for(const a4 of y){const a5=h['graph']['nodes']['get'](a4);for(const a6 of EDGE_SCHEMAS){if(a6['read']['kind']!=='reverse'||!f['allows'](a6,p))continue;if(!sourceMatches(a6['source'],a5))continue;const a7=a6['read']['parent'],a8=a4+'|'+a7;if(j['has'](a8))continue;if(!z['has'](a7))z['set'](a7,[]);z['get'](a7)['push'](a4);const a9=a4+'|'+a7+'|schema',aa=A['get'](a9)??[];aa['push'](a6),A['set'](a9,aa);}}for(const [ab,ac]of z){for(const ae of ac)j['add'](ae+'|'+ab);let ad=new Map();try{ad=await a['getKeyedFields'](ab,ac);if(readStats(a)['batches']>=e['maxRpcs'])h['exhausted']['rpcs']=!![];}catch{h['graph']['gaps']['push']('reverse:'+ab);continue;}for(const af of ac){const ag=A['get'](af+'|'+ab+'|schema')??[],ah=lookupMapLower(ad,af);if(!ah)continue;const ai=extractReverseRefs(ab,ah['data']??ah);for(const aj of ag){const ak=aj['read'];for(const al of ai){if(al['schemaId']!==REVERSE_GROUP_WILDCARD&&al['schemaId']!==aj['id'])continue;let am=al['refs']['map'](an=>an['to']?an:{...an,'to':af});ak['kind']==='reverse'&&ak['filterType']&&(am=am['filter'](an=>inferObjectType(an['to'])===ak['filterType']));if(am['length']===0x0)continue;w['push']({'schema':aj,'sourceId':af,'refs':am,'observed':am['length']});}}}}for(const an of EDGE_SCHEMAS){const ao=an['read'];if(ao['kind']!=='event'||!f['allowsEvent'](an,p))continue;const ap=[...o]['filter'](ar=>{if(n['has'](ar+'|'+an['id']))return![];return sourceMatches(an['source'],h['graph']['nodes']['get'](ar));});if(ap['length']===0x0)continue;let aq=m['get'](ao['eventType']);if(!aq){aq={'events':[],'truncated':![],'failed':![]};try{const ar=await a['getEvents'](ao['eventType'],{'maxPages':e['maxEventPages']});if(readStats(a)['batches']>=e['maxRpcs'])h['exhausted']['rpcs']=!![];aq['events']=ar['events'],aq['truncated']=ar['truncated'],ar['truncated']&&ar['events']['length']===0x0&&(aq['failed']=!![],h['graph']['gaps']['push']('events:'+ao['eventType']));}catch{aq['failed']=!![],h['graph']['gaps']['push']('events:'+ao['eventType']);}m['set'](ao['eventType'],aq);}if(aq['failed']){for(const as of ap)n['add'](as+'|'+an['id']);continue;}if(aq['truncated']){h['exhausted']['eventPages']=!![];for(const at of ap){h['markTruncation']({'nodeId':at,'schema':an['id'],'observed':aq['events']['length'],'limit':e['maxEventPages'],'reason':'event_pages'});}}for(const au of ap){n['add'](au+'|'+an['id']);const av=extractEventRefs(ao,au,aq['events']);if(av['length']===0x0)continue;w['push']({'schema':an,'sourceId':au,'refs':av,'observed':av['length'],'truncated':aq['truncated']});}}const B=new Set(),C=new Map();for(const aw of w){const ax=e['perKindCaps'][aw['schema']['id']]??e['maxFanoutPerNode'],ay=C['get'](aw['sourceId'])??0x0,az=Math['max'](0x0,e['maxFanoutPerNode']-ay),aA=Math['min'](ax,az),aB=aw['refs']['slice'](0x0,aA);aw['refs']['length']>aA&&h['markTruncation']({'nodeId':aw['sourceId'],'schema':aw['schema']['id'],'observed':aw['refs']['length'],'limit':a99a,'reason':'fanout'});const aC=new Map();for(const aD of aB){const aE=aD['from']??aw['sourceId'],aF=isWfNodeId(aD['to'])?p:p+0x1,aG=h['graph']['nodes']['has'](aD['to']),aH=f['effectiveMaxHops'](aw['schema']);if(aH!==undefined){const aJ=(t(aE,new Set())['get'](aw['schema']['id'])??0x0)+0x1;if(aJ>aH&&!aG){aC['set'](aE,(aC['get'](aE)??0x0)+0x1);continue;}}if(aF>e['maxDepth']&&!aG){h['exhausted']['depth']=!![];continue;}const aI=h['addNode'](aD['to'],Math['min'](aF,e['maxDepth']),{'schema':aw['schema']['id'],'from':aE});if(!aI)break;h['addEdge'](aw['schema'],aE,aD,q,aw['truncated']===!![]||aw['refs']['length']>aA),C['set'](aw['sourceId'],ay+0x1);if(!isWfNodeId(aD['to'])&&aF<=e['maxDepth'])B['add'](aD['to']);}for(const [aK,aL]of aC){h['markTruncation']({'nodeId':aK,'schema':aw['schema']['id'],'observed':aL,'limit':f['effectiveMaxHops'](aw['schema'])??0x0,'reason':'schema_hops'});}}if(h['exhausted']['rpcs']){h['graph']['gaps']['push']('budget:maxRpcs');break;}o=B;}return h['finalize'](a);}function sourceMatches(a,b){if(a==='ANY')return!![];if(a==='EOA')return b['kind']==='eoa';return b['objectType']===a;}function lookupMapLower(a,b){const c=a['get'](b);if(c!==undefined)return c;for(const [d,e]of a)if(d['toLowerCase']()===b)return e;return undefined;}export function orderCompletionInGraph(a,b){const c=a['nodes']['get'](b['toLowerCase']()),d=c?.['raw']?.['data']??c?.['raw']??{},e=String(d['machine']??''),f=String(d['progress']??''),g=a['nodes']['get'](f['toLowerCase']()),h=String((g?.['raw']?.['data']??g?.['raw']??{})['current']??'');let i=null;if(e){const j=e['toLowerCase']()+'::node::',k=a['edges']['filter'](l=>l['schema']==='wf.transition'&&l['from']['startsWith'](j))['map'](l=>({'node':l['payload']?.['node'],'prev_node':l['payload']?.['prevNode']}));if(k['length']>0x0)i=terminalNamesOfEdges(k);}return deriveOrderCompletion({'machine':e||null,'progress':f||null,'currentNode':h||null,'terminalNames':i});}
|
|
1
|
+
import{EDGE_SCHEMAS,EDGE_SCHEMA_BY_ID}from'./edge-schema.js';import{extractCoinType,extractEventRefs,extractObjectEdges,extractReverseRefs,extractTableRefs,inferObjectType,REVERSE_GROUP_WILDCARD}from'./extract.js';import{mergeBudget}from'./dataplane.js';import{deriveOrderCompletion,terminalNamesOfEdges}from'./order-status.js';import{LINKER_RING_LIMIT as a133a}from'./sdk-batch.js';import{wowAddressKind}from'@wowok/wowok';function readStats(a){const b=a;if(b['stats'])return{'batches':b['stats']['batches'],'byChannel':{...b['stats']['byChannel']},'dedupHits':b['stats']['dedupHits']};if(b['batches'])return{'batches':Object['values'](b['batches'])['reduce']((c,d)=>c+d,0x0),'byChannel':{...b['batches']},'dedupHits':b['dedupHits']??0x0};return{'batches':0x0,'byChannel':{'objects':0x0,'keyedFields':0x0,'tables':0x0,'events':0x0},'dedupHits':0x0};}function isEoa(a){return wowAddressKind(a)==='user';}function isWfNodeId(a){return a['includes']('::node::');}class Gate{['wl'];constructor(a){this['wl']=a;}['allows'](a,b){if(this['wl']['deny']?.['includes'](a['id']))return![];const c=this['wl']['familyDepths']?.[a['family']];if(c!==undefined&&b>=c)return![];if(this['wl']['schemas'])return this['wl']['schemas']['includes'](a['id']);if(this['wl']['families']&&!this['wl']['families']['includes'](a['family']))return![];return!![];}['allowsTable'](a,b){if(a['read']['kind']!=='table')return![];if(this['wl']['deny']?.['includes'](a['id']))return![];const c=this['wl']['familyDepths']?.[a['family']];if(c!==undefined&&b>=c)return![];if(this['wl']['families']&&!this['wl']['families']['includes'](a['family']))return![];return!!this['wl']['tableEdges']?.['includes'](a['id']);}['allowsEvent'](a,b){if(a['read']['kind']!=='event')return![];if(this['wl']['deny']?.['includes'](a['id']))return![];const c=this['wl']['familyDepths']?.[a['family']];if(c!==undefined&&b>=c)return![];if(this['wl']['families']&&!this['wl']['families']['includes'](a['family']))return![];return!!this['wl']['eventEdges']?.['includes'](a['id']);}['effectiveMaxHops'](a){const b=a['maxHops'],c=this['wl']['schemaHops']?.[a['id']];if(b===undefined)return c;if(c===undefined)return b;return Math['min'](b,c);}}class GraphBuilder{['graph'];['edgeIds']=new Set();['budget'];['exhausted']={};constructor(a,b,c){this['budget']=c,this['graph']={'network':a,'seed':b,'builtAt':Date['now'](),'nodes':new Map(),'edges':[],'out':new Map(),'inc':new Map(),'gaps':[],'truncations':[],'rpcReport':{'batches':0x0,'byChannel':{'objects':0x0,'keyedFields':0x0,'tables':0x0,'events':0x0},'dedupHits':0x0},'budgetExhausted':{}};}['addSeed'](a){const b=inferObjectType(a),c={'id':a,'kind':isWfNodeId(a)?'wfnode':isEoa(a)?'eoa':'object','objectType':b??undefined,'state':'seed','origins':[],'depth':0x0};return this['graph']['nodes']['set'](a,c),c;}['addNode'](a,b,c){const d=this['graph']['nodes']['get'](a);if(d){if(c)d['origins']['push']({'via':c['schema'],'from':c['from'],'depth':b});return d;}if(this['graph']['nodes']['size']>=this['budget']['maxNodes'])return this['exhausted']['nodes']=!![],undefined;const e=isWfNodeId(a),f=e?undefined:inferObjectType(a),g={'id':a,'kind':e?'wfnode':isEoa(a)?'eoa':'object','objectType':f??undefined,'state':e?'stub':'seed','origins':c?[{'via':c['schema'],'from':c['from'],'depth':b}]:[],'depth':b};return this['graph']['nodes']['set'](a,g),g;}['addEdge'](a,b,c,d,e){const f=c['to'],g=c['key']?'|'+c['key']:'',h=a['id']+'|'+b+'→'+f+g;if(this['edgeIds']['has'](h))return;this['edgeIds']['add'](h);const i={'id':h,'schema':a['id'],'family':a['family'],'from':b,'to':f,'retention':a['retention'],'observedAt':d,'payload':c['payload'],'truncated':e||a['retention']==='bounded_window','key':c['key']};this['graph']['edges']['push'](i),pushMap(this['graph']['out'],b,i),pushMap(this['graph']['inc'],f,i);}['markTruncation'](a){this['graph']['truncations']['push'](a);}['finalize'](a){return this['graph']['rpcReport']=readStats(a),this['graph']['budgetExhausted']=this['exhausted'],this['graph'];}}function pushMap(a,b,c){const d=a['get'](b);if(d)d['push'](c);else a['set'](b,[c]);}export async function expandTopology(a,c){const d=c['seed']['toLowerCase'](),e=mergeBudget(c['budget']),f=new Gate(c['edges']??{}),h=new GraphBuilder(c['network'],d,e);h['addSeed'](d);const i=new Set(),j=new Set(),l=new Set(),m=new Map(),n=new Set();let o=new Set([d]);for(let p=0x0;p<=e['maxDepth'];p++){if(o['size']===0x0)break;if(h['exhausted']['nodes'])break;const q=Date['now'](),r=new Map(),t=(D,E)=>{const F=r['get'](D);if(F)return F;const G=new Map();r['set'](D,G);const H=h['graph']['nodes']['get'](D);if(H&&H['origins']['length']>0x0&&!E['has'](D)){E['add'](D);for(const I of H['origins']){if(!I['via']||!I['from']||E['has'](I['from']))continue;const J=t(I['from'],E);for(const [L,M]of J){if(M<(G['get'](L)??Infinity))G['set'](L,M);}const K=(J['get'](I['via'])??0x0)+0x1;if(K<(G['get'](I['via'])??Infinity))G['set'](I['via'],K);}E['delete'](D);}return G;},u=[...o]['filter'](D=>{const E=h['graph']['nodes']['get'](D);return E['kind']==='object'&&(E['state']==='seed'||E['state']==='stub')&&!i['has'](D);}),v=new Set();if(u['length']>0x0){const D=await a['getObjects'](u);if(readStats(a)['batches']>=e['maxRpcs'])h['exhausted']['rpcs']=!![];for(const E of u){const F=h['graph']['nodes']['get'](E),G=lookupMapLower(D,E);i['add'](E);if(!G){F['state']='error',F['error']='not_found_or_failed',h['graph']['gaps']['push'](E);continue;}F['state']='fetched',F['raw']=G,F['objectType']=String(G['type']??F['objectType']??inferObjectType(E)??''),F['coinType']=extractCoinType(G['type_raw']),v['add'](E);}}const w=[];for(const H of v){const I=h['graph']['nodes']['get'](H);if(!I['objectType']||!I['raw'])continue;for(const J of extractObjectEdges(I['objectType'],I['raw'])){const K=EDGE_SCHEMA_BY_ID['get'](J['schemaId']);if(!K||!f['allows'](K,p))continue;w['push']({'schema':K,'sourceId':H,'refs':J['refs'],'observed':J['refs']['length']});}}const x=[...v]['filter'](L=>{const M=h['graph']['nodes']['get'](L);return EDGE_SCHEMAS['some'](N=>N['source']===M['objectType']&&N['read']['kind']==='table');});for(const L of x){const M=h['graph']['nodes']['get'](L),N=EDGE_SCHEMAS['filter'](P=>P['source']===M['objectType']&&P['read']['kind']==='table'&&f['allowsTable'](P,p)),O=new Map();for(const P of N){const Q=P['read']['rowType'],R=O['get'](Q)??[];R['push'](P),O['set'](Q,R);}for(const [S,T]of O){const U=L+'|'+S;if(l['has'](U))continue;l['add'](U);const V=Math['max'](...T['map'](a0=>e['perKindCaps'][a0['id']]??e['maxFanoutPerNode']));let W,X=![];try{const a0=await a['getTable'](L,{'maxItems':V});if(readStats(a)['batches']>=e['maxRpcs'])h['exhausted']['rpcs']=!![];W=a0['items'],X=a0['truncated'];}catch{h['graph']['gaps']['push'](L+'#'+S);continue;}const Y=new Set(T['map'](a1=>a1['id'])),Z=extractTableRefs(S,L,W)['filter'](a1=>{const a2=EDGE_SCHEMA_BY_ID['get'](a1['schemaId']);return a2['read']['kind']==='derived'||Y['has'](a1['schemaId']);});for(const a1 of Z){const a2=EDGE_SCHEMA_BY_ID['get'](a1['schemaId']);let a3=a1['refs'];a2['family']==='M'&&M['coinType']&&(a3=a3['map'](a4=>({...a4,'payload':{'coinType':M['coinType'],...a4['payload']}}))),w['push']({'schema':a2,'sourceId':L,'refs':a3,'observed':a3['length']});}X&&h['markTruncation']({'nodeId':L,'schema':T[0x0]['id'],'observed':W['length'],'limit':V,'reason':'table_page'});}}const y=[...o]['filter'](a4=>{const a5=h['graph']['nodes']['get'](a4);return a5['kind']!=='wfnode'&&(a5['kind']==='eoa'||a5['state']==='fetched');}),z=new Map(),A=new Map();for(const a4 of y){const a5=h['graph']['nodes']['get'](a4);for(const a6 of EDGE_SCHEMAS){if(a6['read']['kind']!=='reverse'||!f['allows'](a6,p))continue;if(!sourceMatches(a6['source'],a5))continue;const a7=a6['read']['parent'],a8=a4+'|'+a7;if(j['has'](a8))continue;if(!z['has'](a7))z['set'](a7,[]);z['get'](a7)['push'](a4);const a9=a4+'|'+a7+'|schema',aa=A['get'](a9)??[];aa['push'](a6),A['set'](a9,aa);}}for(const [ab,ac]of z){for(const ae of ac)j['add'](ae+'|'+ab);let ad=new Map();try{ad=await a['getKeyedFields'](ab,ac);if(readStats(a)['batches']>=e['maxRpcs'])h['exhausted']['rpcs']=!![];}catch{h['graph']['gaps']['push']('reverse:'+ab);continue;}for(const af of ac){const ag=A['get'](af+'|'+ab+'|schema')??[],ah=lookupMapLower(ad,af);if(!ah)continue;const ai=extractReverseRefs(ab,ah['data']??ah);for(const aj of ag){const ak=aj['read'];for(const al of ai){if(al['schemaId']!==REVERSE_GROUP_WILDCARD&&al['schemaId']!==aj['id'])continue;let am=al['refs']['map'](an=>an['to']?an:{...an,'to':af});ak['kind']==='reverse'&&ak['filterType']&&(am=am['filter'](an=>inferObjectType(an['to'])===ak['filterType']));if(am['length']===0x0)continue;w['push']({'schema':aj,'sourceId':af,'refs':am,'observed':am['length']});}}}}for(const an of EDGE_SCHEMAS){const ao=an['read'];if(ao['kind']!=='event'||!f['allowsEvent'](an,p))continue;const ap=[...o]['filter'](ar=>{if(n['has'](ar+'|'+an['id']))return![];return sourceMatches(an['source'],h['graph']['nodes']['get'](ar));});if(ap['length']===0x0)continue;let aq=m['get'](ao['eventType']);if(!aq){aq={'events':[],'truncated':![],'failed':![]};try{const ar=await a['getEvents'](ao['eventType'],{'maxPages':e['maxEventPages']});if(readStats(a)['batches']>=e['maxRpcs'])h['exhausted']['rpcs']=!![];aq['events']=ar['events'],aq['truncated']=ar['truncated'],ar['truncated']&&ar['events']['length']===0x0&&(aq['failed']=!![],h['graph']['gaps']['push']('events:'+ao['eventType']));}catch{aq['failed']=!![],h['graph']['gaps']['push']('events:'+ao['eventType']);}m['set'](ao['eventType'],aq);}if(aq['failed']){for(const as of ap)n['add'](as+'|'+an['id']);continue;}if(aq['truncated']){h['exhausted']['eventPages']=!![];for(const at of ap){h['markTruncation']({'nodeId':at,'schema':an['id'],'observed':aq['events']['length'],'limit':e['maxEventPages'],'reason':'event_pages'});}}for(const au of ap){n['add'](au+'|'+an['id']);const av=extractEventRefs(ao,au,aq['events']);if(av['length']===0x0)continue;w['push']({'schema':an,'sourceId':au,'refs':av,'observed':av['length'],'truncated':aq['truncated']});}}const B=new Set(),C=new Map();for(const aw of w){const ax=e['perKindCaps'][aw['schema']['id']]??e['maxFanoutPerNode'],ay=C['get'](aw['sourceId'])??0x0,az=Math['max'](0x0,e['maxFanoutPerNode']-ay),aA=Math['min'](ax,az),aB=aw['refs']['slice'](0x0,aA);aw['refs']['length']>aA&&h['markTruncation']({'nodeId':aw['sourceId'],'schema':aw['schema']['id'],'observed':aw['refs']['length'],'limit':a133a,'reason':'fanout'});const aC=new Map();for(const aD of aB){const aE=aD['from']??aw['sourceId'],aF=isWfNodeId(aD['to'])?p:p+0x1,aG=h['graph']['nodes']['has'](aD['to']),aH=f['effectiveMaxHops'](aw['schema']);if(aH!==undefined){const aJ=(t(aE,new Set())['get'](aw['schema']['id'])??0x0)+0x1;if(aJ>aH&&!aG){aC['set'](aE,(aC['get'](aE)??0x0)+0x1);continue;}}if(aF>e['maxDepth']&&!aG){h['exhausted']['depth']=!![];continue;}const aI=h['addNode'](aD['to'],Math['min'](aF,e['maxDepth']),{'schema':aw['schema']['id'],'from':aE});if(!aI)break;h['addEdge'](aw['schema'],aE,aD,q,aw['truncated']===!![]||aw['refs']['length']>aA),C['set'](aw['sourceId'],ay+0x1);if(!isWfNodeId(aD['to'])&&aF<=e['maxDepth'])B['add'](aD['to']);}for(const [aK,aL]of aC){h['markTruncation']({'nodeId':aK,'schema':aw['schema']['id'],'observed':aL,'limit':f['effectiveMaxHops'](aw['schema'])??0x0,'reason':'schema_hops'});}}if(h['exhausted']['rpcs']){h['graph']['gaps']['push']('budget:maxRpcs');break;}o=B;}return h['finalize'](a);}function sourceMatches(a,b){if(a==='ANY')return!![];if(a==='EOA')return b['kind']==='eoa';return b['objectType']===a;}function lookupMapLower(a,b){const c=a['get'](b);if(c!==undefined)return c;for(const [d,e]of a)if(d['toLowerCase']()===b)return e;return undefined;}export function orderCompletionInGraph(a,b){const c=a['nodes']['get'](b['toLowerCase']()),d=c?.['raw']?.['data']??c?.['raw']??{},e=String(d['machine']??''),f=String(d['progress']??''),g=a['nodes']['get'](f['toLowerCase']()),h=String((g?.['raw']?.['data']??g?.['raw']??{})['current']??'');let i=null;if(e){const j=e['toLowerCase']()+'::node::',k=a['edges']['filter'](l=>l['schema']==='wf.transition'&&l['from']['startsWith'](j))['map'](l=>({'node':l['payload']?.['node'],'prev_node':l['payload']?.['prevNode']}));if(k['length']>0x0)i=terminalNamesOfEdges(k);}return deriveOrderCompletion({'machine':e||null,'progress':f||null,'currentNode':h||null,'terminalNames':i});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{applyExposureGate as
|
|
1
|
+
import{applyExposureGate as a136a}from'../../config/exposure.js';export{resolveViability,factRef,parseFactRef}from'../../config/exposure.js';export const EXPOSURE_ROLES={'buyer':'buyer','merchant':'merchant','supplier':'supplier','collaborator':'collaborator','arbitrator':'arbitrator','system':'system','neutral':'neutral'};export function applyExposureGate(a,b){return a136a(a,b);}export function lossParty(a,b){return{'role':a,'basis':b};}export function gainPath(a,b,c,d){return{'role':a,'path':b,'viability':c,'gate':d};}
|
package/dist/harness/recover.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const RECOVERY_RULES={'insufficient_balance':{'error_code':'insufficient_balance','strategy':'claim_faucet','max_attempts':0x3,'automation':'semi','detail':'1.\x20Testnet:\x20claim\x20WOW\x20from\x20the\x20faucet\x202.\x20Mainnet:\x20transfer\x20ETH/USDT/USDC/WBTC\x20via\x20the\x20ETH\x20mainnet\x20cross-chain\x20bridge\x20(query\x20active\x20EVM\x20account\x20→\x20top\x20up\x20from\x20external\x20wallet\x20→\x20confirm\x20→\x20cross-chain)\x203.\x20Point\x20the\x20user\x20to\x20the\x20live\x20airdrop\x20page\x20(https://wowok.net/airdrop.html)\x20for\x20the\x20current\x20round\x204.\x20Retry\x20original\x20operation.\x20NOTE:\x20this\x20rule\x20is\x20for\x20the\x20SIGNING\x20ACCOUNT\x27s\x20wallet/gas\x20only\x20—\x20an\x20on-chain\x20POOL\x20shortage\x20(reward/allocation)\x20classifies\x20as\x20pool_shortage,\x20never\x20here','user_prompt':'Insufficient\x20balance\x20for\x20gas\x20or\x20operation.\x20How\x20to\x20obtain\x20WOW\x20tokens:\x20(1)\x20Testnet\x20—\x20claim\x20WOW\x20from\x20the\x20faucet\x20(https://faucet.testnet.wowok.net);\x20all\x20merchant\x20and\x20order\x20testing\x20can\x20use\x20WOW\x20as\x20the\x20payment\x20token.\x20(2)\x20Mainnet\x20—\x20transfer\x20ETH\x20/\x20USDT\x20/\x20USDC\x20/\x20WBTC\x20via\x20the\x20ETH\x20mainnet\x20cross-chain\x20bridge:\x20first\x20query\x20the\x20active\x20EVM\x20account\x20(bridge_operation\x20query_active_evm_account,\x20auto-generated\x20on\x20first\x20use),\x20then\x20transfer\x20from\x20an\x20external\x20wallet\x20(e.g.\x20MetaMask)\x20to\x20that\x20address,\x20confirm\x20the\x20balance\x20arrived,\x20and\x20cross-chain\x20to\x20WOW\x20mainnet\x20(bridge_operation\x20cross_chain_evm_to_wow).\x20(3)\x20WOW\x20airdrop:\x20current\x20round\x20status,\x20pool\x20and\x20eligibility\x20are\x20published\x20live\x20at\x20https://wowok.net/airdrop.html\x20(referral:\x20https://wowok.net/refer.html)\x20—\x20open\x20that\x20page\x20rather\x20than\x20assuming\x20a\x20round\x20is\x20live\x20or\x20closed.\x20Query\x20wowok_buildin_info\x20with\x20info=\x27funding\x20guidance\x27\x20for\x20the\x20canonical\x20funding\x20guidance.'},'pool_shortage':{'error_code':'pool_shortage','strategy':'adjust_params','max_attempts':0x1,'automation':'semi','detail':'An\x20on-chain\x20POOL\x20cannot\x20cover\x20the\x20operation\x20(reward.move:243\x20abort\x206\x20/\x20'+'allocation.move:509\x20abort\x207)\x20—\x20a\x20pool\x20funding\x20problem,\x20NOT\x20the\x20caller\x27s\x20wallet;\x20a\x20faucet\x20claim\x20will\x20NOT\x20help\x20and\x20re-sending\x20the\x20rail\x20unchanged\x20changes\x20nothing.\x201.\x20Reward\x20pool:\x20the\x20reward\x20ISSUER\x20tops\x20it\x20up\x20with\x20reward\x20coin_add\x20(permission\x20153)\x20—\x20the\x20claim\x20key\x20slot\x20is\x20written\x20BEFORE\x20the\x20balance\x20assert\x20and\x20the\x20abort\x20rolls\x20it\x20back,\x20so\x20NOTHING\x20was\x20consumed;\x20the\x20identical\x20claim\x20succeeds\x20after\x20the\x20top-up\x20(mainnet-proven,\x20T14).\x202.\x20Allocation\x20pool:\x20the\x20payer\x20side\x20funds\x20the\x20order/allocation\x20first\x20(order\x20renew,\x20payment\x20create\x20into\x20the\x20allocation),\x20then\x20re-runs\x20the\x20rail;\x20if\x20the\x20pool\x20is\x20drained\x20because\x20the\x20rail\x20ALREADY\x20paid\x20(balance\x200,\x20once-slot\x20consumed),\x20verify\x20via\x20the\x20Payment\x20record\x20instead\x20of\x20retrying.\x203.\x20As\x20the\x20BUYER:\x20report\x20the\x20shortage\x20to\x20the\x20merchant\x20—\x20never\x20fund\x20a\x20pool\x20you\x20do\x20not\x20own','user_prompt':'The\x20on-chain\x20pool\x20backing\x20this\x20operation\x20is\x20short\x20of\x20funds.\x20The\x20pool\x27s\x20owner\x20must\x20top\x20it\x20up\x20(reward\x20coin_add\x20/\x20allocation\x20funding)\x20—\x20a\x20faucet\x20claim\x20will\x20not\x20help.\x20As\x20the\x20buyer,\x20ask\x20the\x20merchant\x20to\x20fund\x20the\x20pool.'},'stock_exhausted':{'error_code':'stock_exhausted','strategy':'adjust_params','max_attempts':0x1,'automation':'semi','detail':'Merchant-side\x20inventory\x20shortfall\x20(Move\x20service:16\x20E_STOCK_NOT_ENOUGH)\x20—\x20NOT\x20a\x20buyer\x20balance\x20problem,\x20so\x20a\x20faucet\x20claim\x20will\x20NOT\x20help.\x201.\x20Reduce\x20the\x20purchase\x20quantity\x20to\x20the\x20item\x27s\x20remaining\x20stock\x202.\x20Pick\x20another\x20sale\x20item\x203.\x20Ask\x20the\x20merchant\x20to\x20restock,\x20then\x20retry','user_prompt':'The\x20sale\x20item\x27s\x20stock\x20is\x20exhausted\x20for\x20the\x20requested\x20quantity.\x20Reduce\x20the\x20quantity,\x20choose\x20another\x20item,\x20or\x20ask\x20the\x20merchant\x20to\x20restock.'},'sale_suspended':{'error_code':'sale_suspended','strategy':'adjust_params','max_attempts':0x1,'automation':'semi','detail':'The\x20merchant\x20suspended\x20this\x20sale\x20item\x20(Move\x20service:34\x20E_SALE_SUSPENDED).\x201.\x20Pick\x20another\x20(non-suspended)\x20item\x202.\x20Contact\x20the\x20merchant\x20to\x20resume\x20the\x20sale,\x20then\x20retry','user_prompt':'The\x20sale\x20item\x20is\x20suspended\x20by\x20the\x20merchant.\x20Please\x20choose\x20another\x20item\x20or\x20contact\x20the\x20merchant.'},'discount_invalid':{'error_code':'discount_invalid','strategy':'adjust_params','max_attempts':0x1,'automation':'semi','detail':'The\x20discount\x20is\x20outside\x20its\x20[time_start,\x20time_end]\x20validity\x20window\x20(Move\x20service:35\x20E_DISCOUNT_TIME_INVALID).\x201.\x20Retry\x20without\x20the\x20discount\x202.\x20Ask\x20the\x20merchant\x20for\x20a\x20fresh\x20discount,\x20then\x20retry','user_prompt':'The\x20discount\x20is\x20not\x20valid\x20at\x20the\x20current\x20time\x20(outside\x20its\x20validity\x20window).\x20Buy\x20without\x20the\x20discount\x20or\x20ask\x20the\x20merchant\x20for\x20a\x20new\x20one.'},'rate_limit':{'error_code':'rate_limit','strategy':'retry','max_attempts':0x5,'automation':'full','detail':'Rate\x20limit\x20hit\x20(HTTP\x20429).\x20Exponential\x20backoff\x20retry:\x202s\x20/\x204s\x20/\x208s\x20/\x2016s\x20/\x2032s.\x20Avoid\x20parallel\x20calls\x20while\x20the\x20limit\x20window\x20is\x20active.'},'gas_exceeded':{'error_code':'gas_exceeded','strategy':'adjust_params','max_attempts':0x3,'automation':'semi','detail':'Gas\x20budget\x20exceeded.\x201.\x20Increase\x20the\x20gas_budget\x20parameter\x202.\x20Reduce\x20the\x20operation\x20size\x20(fewer\x20objects\x20per\x20transaction)\x203.\x20Retry\x20the\x20original\x20operation','user_prompt':'Gas\x20budget\x20exceeded.\x20Increase\x20the\x20gas\x20budget\x20or\x20reduce\x20the\x20operation\x20size,\x20then\x20retry.'},'insufficient_gas':{'error_code':'insufficient_gas','strategy':'adjust_params','max_attempts':0x1,'automation':'semi','detail':'Gas\x20exhausted\x20—\x20the\x20transaction\x20failed\x20deterministically\x20and\x20did\x20NOT\x20commit\x20on-chain\x20(no\x20state\x20changed;\x20commit-state\x20verification\x20is\x20NOT\x20needed).\x201.\x20Raise\x20the\x20gas_budget\x20parameter\x20above\x20the\x20failed\x20transaction\x27s\x20gas_used\x202.\x20If\x20the\x20account\x20balance\x20cannot\x20cover\x20any\x20budget,\x20fund\x20the\x20signing\x20account\x20with\x20gas\x20tokens\x20first\x203.\x20Resubmit\x20as\x20a\x20FRESH\x20call\x20—\x20do\x20NOT\x20replay\x20the\x20same\x20transaction','user_prompt':'The\x20transaction\x20ran\x20out\x20of\x20gas\x20and\x20did\x20not\x20commit\x20on-chain.\x20Increase\x20the\x20gas\x20budget\x20(or\x20fund\x20the\x20account\x20with\x20gas)\x20and\x20submit\x20a\x20fresh\x20transaction\x20—\x20retrying\x20unchanged\x20will\x20fail\x20the\x20same\x20way.'},'bcs_error':{'error_code':'bcs_error','strategy':'adjust_params','max_attempts':0x2,'automation':'semi','detail':'BCS\x20serialization/deserialization\x20error\x20—\x20a\x20parameter\x20does\x20not\x20match\x20the\x20expected\x20type/structure.\x201.\x20Query\x20the\x20operation\x20schema\x20(schema_query)\x202.\x20Fix\x20the\x20offending\x20parameter\x20type\x20(e.g.\x20BigInt\x20vs\x20number,\x20vector\x20element\x20type)\x203.\x20Retry','user_prompt':'A\x20parameter\x20failed\x20serialization.\x20Check\x20the\x20parameter\x20types\x20against\x20the\x20schema\x20and\x20retry.'},'signature_error':{'error_code':'signature_error','strategy':'switch_account','max_attempts':0x2,'automation':'semi','detail':'Signature\x20verification\x20failed.\x201.\x20Verify\x20the\x20account\x20is\x20not\x20suspended\x202.\x20Check\x20the\x20network\x20matches\x20the\x20account\x27s\x203.\x20Switch\x20to\x20a\x20healthy\x20account\x20and\x20retry','user_prompt':'Signature\x20verification\x20failed.\x20The\x20account\x20may\x20be\x20suspended\x20or\x20misconfigured.\x20Switch\x20accounts\x20or\x20check\x20the\x20configuration\x20and\x20retry.'},'config_error':{'error_code':'config_error','strategy':'escalate_human','max_attempts':0x1,'automation':'manual','detail':'Local\x20configuration\x20error\x20(network\x20not\x20specified,\x20persistent\x20storage\x20not\x20set).\x201.\x20Show\x20the\x20user\x20which\x20configuration\x20is\x20missing\x202.\x20Guide\x20the\x20user\x20through\x20the\x20account_operation/config\x20setup\x203.\x20Retry\x20after\x20the\x20user\x20fixes\x20it','user_prompt':'Local\x20configuration\x20is\x20incomplete.\x20Please\x20finish\x20the\x20account/network\x20setup\x20and\x20retry.'},'wip_verification_failed':{'error_code':'wip_verification_failed','strategy':'adjust_params','max_attempts':0x2,'automation':'semi','detail':'WIP\x20file\x20not\x20publicly\x20reachable\x20/\x20hash\x20mismatch.\x201.\x20Upload\x20via\x20the\x20wip\x20storage\x20service\x20(wip_file\x20type=\x27upload\x27\x20—\x20official\x20free\x20store\x20or\x20storage=\x27custom\x27)\x202.\x20Or\x20deploy\x20to\x20a\x20public\x20URL\x20(GitHub\x20Pages\x20/\x20IPFS\x20/\x20own\x20site)\x203.\x20Update\x20the\x20sale\x27s\x20wip\x20URL\x204.\x20Re-run\x20the\x20operation','user_prompt':'The\x20WIP\x20file\x20could\x20not\x20be\x20verified\x20from\x20a\x20public\x20URL.\x20Upload\x20it\x20with\x20wip_file\x20type=\x27upload\x27\x20(official\x20free\x20store\x20or\x20your\x20own\x20service)\x20or\x20deploy\x20it\x20(GitHub\x20Pages\x20/\x20IPFS),\x20update\x20the\x20sale\x27s\x20WIP\x20URL,\x20and\x20retry.'},'wip_storage_unavailable':{'error_code':'wip_storage_unavailable','strategy':'retry','max_attempts':0x3,'automation':'full','detail':'Transient\x20wip\x20storage\x20transport\x20failure.\x201.\x20Retry\x20the\x20same\x20request\x20with\x20bounded\x20backoff\x202.\x20Large\x20WIP\x20files\x20are\x20network-sensitive:\x20compress\x20images\x20before\x20generate\x20(each\x20image\x20<=\x202MB,\x20total\x20<=\x2010MB)\x203.\x20Check\x20connectivity\x20to\x20the\x20storage\x20base\x20URL\x20if\x20retries\x20keep\x20failing','user_prompt':'The\x20wip\x20storage\x20request\x20failed\x20due\x20to\x20a\x20network\x20problem.\x20Retry\x20the\x20upload;\x20if\x20it\x20keeps\x20failing,\x20reduce\x20the\x20file\x20size\x20or\x20check\x20connectivity.'},'wip_storage_rejected':{'error_code':'wip_storage_rejected','strategy':'adjust_params','max_attempts':0x1,'automation':'semi','detail':'WIP\x20storage\x20service\x20rejected\x20the\x20request\x20(HTTP\x204xx\x20—\x20deterministic\x20client-side\x20fault,\x20retrying\x20unchanged\x20fails\x20identically).\x20400:\x20malformed\x20body\x20or\x20failed\x20WIP\x20validation\x20—\x20re-generate\x20via\x20wip_file\x20type=\x27generate\x27\x20401:\x20re-sign\x20with\x20a\x20fresh\x20nonce\x20inside\x20the\x20timestamp\x20window\x20403:\x20check\x20storage\x20service\x20configuration\x20404:\x20file\x20does\x20not\x20exist\x20—\x20re-upload\x20409:\x20quota\x20—\x20delete\x20old\x20files\x20via\x20wip_file\x20type=\x27list\x27\x20then\x20delete\x20413:\x20compress\x20images\x20(each\x20<=\x202MB,\x20total\x20<=\x2010MB)\x20and\x20regenerate','user_prompt':'The\x20WIP\x20storage\x20service\x20rejected\x20the\x20request\x20(HTTP\x204xx).\x20Fix\x20the\x20specific\x20fault\x20(re-generate/re-sign/re-upload\x20per\x20the\x20status\x20code)\x20and\x20retry\x20—\x20do\x20not\x20retry\x20unchanged.'},'network_error':{'error_code':'network_error','strategy':'retry','max_attempts':0x5,'automation':'full','detail':'Transport\x20failure\x20(timeout\x20/\x20connection\x20reset\x20/\x20RPC\x20unreachable\x20/\x20HTTP\x205xx\x20gateway\x20error).\x20Exponential\x20backoff\x20retry:\x201s\x20/\x202s\x20/\x204s\x20/\x208s\x20/\x2016s.\x20Switch\x20RPC\x20node\x20if\x20available.\x20READS:\x20a\x20plain\x20retry\x20is\x20safe.\x20FUND-MOVING\x20WRITES:\x20before\x20any\x20resubmission,\x20verify\x20whether\x20the\x20previous\x20attempt\x20landed\x20(query\x20the\x20reported\x20digest\x20directly,\x20or\x20the\x20expected\x20object\x20via\x20the\x20sender\x27s\x20recent\x20on-chain\x20objects\x20/\x20onchain_events)\x20—\x20if\x20it\x20landed,\x20ADOPT\x20it\x20and\x20stop;\x20a\x20blind\x20backoff\x20retry\x20of\x20a\x20landed\x20write\x20moves\x20the\x20funds\x20a\x20second\x20time.'},'submission_unknown':{'error_code':'submission_unknown','strategy':'query_and_retry','max_attempts':0x2,'automation':'semi','detail':'Transport-level\x20failure\x20after\x20the\x20request\x20left\x20the\x20client\x20—\x20the\x20submission\x20state\x20is\x20UNKNOWN\x20and\x20the\x20transaction\x20may\x20already\x20be\x20committed.\x20NEVER\x20auto-retry\x20a\x20write\x20here.\x201.\x20Verify\x20commit\x20state\x20on-chain:\x20query_toolkit\x20for\x20the\x20object\x20this\x20call\x20would\x20create/modify\x20(resolve\x20the\x20reference\x20from\x20the\x20call\x27s\x20own\x20arguments),\x20or\x20onchain_events\x20for\x20the\x20sender\x27s\x20recent\x20transactions.\x202.\x20If\x20the\x20expected\x20object\x20EXISTS,\x20adopt\x20it\x20and\x20continue\x20the\x20workflow\x20(the\x20operation\x20succeeded\x20despite\x20the\x20transport\x20error).\x203.\x20If\x20confirmed\x20ABSENT,\x20resubmit\x20the\x20SAME\x20call\x20once\x20—\x20for\x20a\x20FIRST-EVER\x20transaction\x20on\x20a\x20fresh\x20account\x20make\x20that\x20resubmission\x20with\x20env.no_auto_register=true\x20and\x20SAY\x20SO\x20(the\x20SDK\x20silently\x20appends\x20an\x20entity\x20registration\x20to\x20a\x20first\x20business\x20call;\x20if\x20that\x20appended\x20leg\x20was\x20the\x20failing\x20leg\x20the\x20skip\x20lets\x20the\x20call\x20through\x20—\x20ziroom-mn-261013\x20live\x20case;\x20if\x20the\x20resubmission\x20aborts,\x20the\x20envelope\x20now\x20names\x20the\x20abort\x20—\x20re-enable\x20auto\x20registration\x20and\x20retry).\x204.\x20If\x20the\x20reported\x20digest\x20does\x20not\x20resolve\x20or\x20the\x20failure\x20repeats,\x20STOP\x20looping\x20on\x20digest\x20checks\x20and\x20re-run\x20the\x20SAME\x20call\x20with\x20env.dry_run=true\x20—\x20the\x20simulation\x20surfaces\x20the\x20real\x20failure\x20(exact\x20Move\x20abort)\x20without\x20gas\x20or\x20duplicate\x20risk.\x205.\x20Reads\x20are\x20idempotent\x20—\x20retry\x20immediately.\x206.\x20M-K2\x20replay\x20discipline:\x20a\x20FAILED\x20receipt\x20is\x20final\x20—\x20its\x20digest\x20is\x20consumed\x20and\x20replaying\x20the\x20same\x20bytes\x20returns\x20the\x20same\x20failure\x20forever;\x20fix\x20the\x20cause\x20(usually\x20funding)\x20and\x20build\x20a\x20FRESH\x20transaction.\x20Live\x20mainnet\x20incident\x20behind\x20this\x20rule:\x20an\x20order_new\x20-32603\x20\x27did\x20not\x20complete\x27\x20had\x20committed;\x20the\x20blind\x20retry\x20created\x20a\x20second\x20order\x20with\x20a\x20second\x20full\x20escrow\x20and\x20a\x20second\x20stock\x20decrement','user_prompt':'The\x20request\x20failed\x20at\x20transport\x20level\x20but\x20may\x20have\x20already\x20been\x20committed\x20on-chain.\x20Verify\x20whether\x20the\x20expected\x20object\x20exists\x20(query\x20it)\x20before\x20any\x20retry\x20—\x20a\x20blind\x20retry\x20can\x20duplicate\x20the\x20operation\x20(double\x20escrow).\x20For\x20read\x20operations,\x20a\x20plain\x20retry\x20is\x20safe.'},'transaction_expired':{'error_code':'transaction_expired','strategy':'retry','max_attempts':0x3,'automation':'full','detail':'The\x20transaction\x20expired\x20before\x20execution\x20(epoch\x20boundary\x20or\x20validator/gateway\x20outage)\x20—\x20it\x20did\x20NOT\x20land\x20and\x20nothing\x20was\x20committed.\x20Bounded\x20backoff\x20retry:\x2010s\x20/\x2030s\x20/\x2060s,\x20resubmit\x20the\x20SAME\x20call\x20unchanged.\x20If\x20a\x20dry_run\x20passes\x20while\x20the\x20real\x20call\x20keeps\x20failing,\x20the\x20fault\x20is\x20chain-side\x20—\x20wait\x20it\x20out.\x20Verify\x20with\x20onchain_events\x20if\x20unsure.'},'guard_rejected':{'error_code':'guard_rejected','strategy':'fill_submission','max_attempts':0x2,'automation':'semi','detail':'1.\x20Parse\x20Guard\x20table\x20structure\x202.\x20If\x20the\x20Guard\x20defines\x20submission\x20items,\x20fill\x20them\x20and\x20resubmit\x20with\x20call_with_submission\x203.\x20If\x20it\x20defines\x20none,\x20the\x20rule\x20evaluated\x20false\x20—\x20typical\x20causes:\x20a\x20TIME\x20WINDOW\x20(Clock\x20deadline/opening\x20comparison\x20—\x20this\x20call\x20may\x20sit\x20outside\x20the\x20window,\x20and\x20a\x20mis-oriented\x20comparison\x20inverts\x20it:\x20everything\x20inside\x20rejected,\x20everything\x20after\x20admitted)\x20or\x20an\x20IDENTITY\x20condition\x20(signer/state\x20checks\x20—\x20the\x20caller\x20may\x20not\x20be\x20the\x20address\x20the\x20rule\x20expects);\x20adjust\x20the\x20call\x27s\x20parameters\x20or\x20change\x20the\x20Guard\x20(docs#40)\x204.\x20When\x20the\x20failure\x20is\x20passport\x20E_VERIFY_FAILED\x20and\x20a\x20submission\x20was\x20supplied,\x20the\x20response\x20appends\x20a\x20\x27Guard\x20diagnosis\x20(dry-run)\x27\x20line\x20naming\x20the\x20first\x20failing\x20impact\x20guard\x20—\x20fix\x20that\x20guard\x20first\x205.\x20A\x20TIME-window\x20rejection\x20may\x20simply\x20be\x20EARLY:\x20re-run\x20the\x20SAME\x20call\x20with\x20env.dry_run=true\x20to\x20probe\x20the\x20window\x20for\x20free\x20(guard\x20rejections\x20do\x20NOT\x20consume\x20the\x20total\x20retry\x20budget;\x20only\x20the\x20per-code\x20cap\x20of\x202\x20applies)','user_prompt':'Guard\x20verification\x20rejected.\x20If\x20the\x20Guard\x20defines\x20submission\x20items,\x20fill\x20in\x20the\x20required\x20submission\x20data\x20and\x20resubmit;\x20if\x20it\x20defines\x20none,\x20the\x20Guard\x20rule\x20evaluated\x20false\x20—\x20the\x20usual\x20causes\x20are\x20a\x20time\x20window\x20(this\x20call\x20may\x20be\x20outside\x20the\x20Clock\x20deadline/opening\x20window)\x20or\x20an\x20identity\x20condition\x20(the\x20caller\x20is\x20not\x20the\x20address\x20the\x20rule\x20expects);\x20adjust\x20this\x20call\x27s\x20parameters\x20or\x20change\x20the\x20Guard\x20rule.\x20When\x20the\x20response\x20includes\x20a\x20\x27Guard\x20diagnosis\x20(dry-run)\x27\x20line,\x20it\x20names\x20the\x20first\x20failing\x20impact\x20guard\x20—\x20address\x20that\x20guard\x20first.\x20A\x20time-window\x20rejection\x20may\x20simply\x20be\x20early:\x20probe\x20the\x20window\x20with\x20env.dry_run=true\x20(free\x20—\x20guard\x20rejections\x20do\x20not\x20consume\x20the\x20total\x20retry\x20budget).'},'time_lock_not_elapsed':{'error_code':'time_lock_not_elapsed','strategy':'wait_and_retry','max_attempts':0x1,'automation':'semi','detail':'1.\x20Verify\x20Service\x20is\x20paused\x20(bPaused=true).\x20If\x20not,\x20submit\x20pause=true\x20first.\x202.\x20Wait\x20until\x20paused_time\x20+\x20setting_lock_duration\x20<=\x20current\x20clock.\x203.\x20Retry\x20the\x20original\x20operation.\x20Do\x20NOT\x20recreate\x20the\x20object.','user_prompt':'Service\x20setting_lock_duration\x20has\x20not\x20elapsed\x20since\x20the\x20Service\x20was\x20paused.\x20Please\x20pause\x20the\x20Service\x20if\x20it\x20is\x20not\x20already\x20paused,\x20wait\x20for\x20the\x20lock\x20duration\x20to\x20elapse,\x20then\x20retry.'},'immutable_violation':{'error_code':'immutable_violation','strategy':'recreate','max_attempts':0x1,'automation':'semi','detail':'1.\x20Stop\x20modification\x20attempt\x202.\x20Evaluate\x20creating\x20a\x20new\x20object\x20as\x20replacement\x203.\x20Re-plan\x20affected\x20phases','user_prompt':'Cannot\x20modify\x20an\x20immutable\x20object.\x20A\x20new\x20object\x20must\x20be\x20created\x20as\x20a\x20replacement.\x20Confirm\x20to\x20proceed\x20with\x20recreation.'},'permission_denied':{'error_code':'permission_denied','strategy':'switch_account','max_attempts':0x2,'automation':'semi','detail':'1.\x20Query\x20object\x27s\x20permission_guard\x202.\x20List\x20accounts\x20with\x20permission\x203.\x20Switch\x20account\x20or\x20prompt\x20user\x20to\x20add\x20permission','user_prompt':'Current\x20account\x20lacks\x20permission\x20for\x20this\x20operation.\x20Switch\x20to\x20an\x20authorized\x20account\x20or\x20update\x20the\x20Permission\x20object.'},'object_not_found':{'error_code':'object_not_found','strategy':'query_and_retry','max_attempts':0x3,'automation':'semi','detail':'1.\x20Verify\x20the\x20referenced\x20name/ID\x20spelling\x20(local_mark_list)\x20and\x20that\x20the\x20object\x20exists\x20on\x20the\x20current\x20network\x202.\x20If\x20recently\x20created,\x20re-query\x20the\x20object\x20(may\x20be\x20sync\x20delay)\x203.\x20If\x20truly\x20absent,\x20search\x20for\x20similar\x20objects\x204.\x20Prompt\x20user\x20to\x20reselect','user_prompt':'Referenced\x20object\x20not\x20found.\x20First\x20verify\x20the\x20name/ID\x20spelling\x20and\x20that\x20the\x20object\x20exists\x20on\x20the\x20current\x20network;\x20if\x20it\x20was\x20created\x20recently,\x20this\x20may\x20be\x20a\x20synchronization\x20delay\x20—\x20retry.\x20If\x20the\x20issue\x20persists,\x20please\x20select\x20a\x20valid\x20object.'},'state_conflict':{'error_code':'state_conflict','strategy':'adjust_params','max_attempts':0x2,'automation':'full','detail':'1.\x20Query\x20object\x27s\x20current\x20true\x20state\x202.\x20Update\x20ODG\x20status\x20annotations\x203.\x20Adjust\x20subsequent\x20operations\x20(e.g.,\x20skip\x20completed\x20steps)'},'invalid_parameter':{'error_code':'invalid_parameter','strategy':'adjust_params','max_attempts':0x2,'automation':'semi','detail':'1.\x20Query\x20the\x20relevant\x20schema\x202.\x20Auto-fix\x20obvious\x20errors\x20(e.g.,\x20BigInt\x20vs\x20string)\x203.\x20If\x20unfixable,\x20prompt\x20user','user_prompt':'Parameter\x20validation\x20failed.\x20Please\x20check\x20the\x20parameter\x20types\x20and\x20values\x20against\x20the\x20schema\x20and\x20retry.'},'move_abort_unmapped':{'error_code':'move_abort_unmapped','strategy':'stop','max_attempts':0x1,'automation':'manual','detail':'The\x20chain\x27s\x20business\x20logic\x20aborted\x20and\x20the\x20(module,\x20abort\x20code)\x20pair\x20has\x20no\x20local\x20mapping.\x20Read\x20the\x20module\x20and\x20abort\x20code\x20from\x20move_abort_info\x20/\x20the\x20message\x20(rendered\x20as\x20\x27abort\x20(N)\x27),\x20resolve\x20their\x20meaning\x20from\x20the\x20module\x27s\x20documentation\x20or\x20the\x20wowok-tools\x20Skill,\x20fix\x20the\x20business\x20cause,\x20and\x20issue\x20a\x20NEW\x20call.\x20Do\x20NOT\x20restart\x20the\x20server\x20and\x20do\x20NOT\x20retry\x20the\x20identical\x20call\x20—\x20it\x20aborts\x20deterministically.','user_prompt':'The\x20operation\x20was\x20rejected\x20by\x20the\x20chain\x27s\x20business\x20logic\x20and\x20its\x20abort\x20code\x20is\x20not\x20mapped\x20locally.\x20The\x20module\x20name\x20and\x20abort\x20code\x20in\x20the\x20error\x20are\x20authoritative\x20—\x20review\x20them\x20(and\x20the\x20object\x20state\x20via\x20query_toolkit)\x20before\x20adjusting\x20anything.'},'missing_data':{'error_code':'missing_data','strategy':'adjust_params','max_attempts':0x2,'automation':'semi','detail':'A\x20guard\x20rule\x20read\x20a\x20keyed\x20table\x20row\x20that\x20does\x20NOT\x20exist\x20(repository.data\x20/\x20oracle\x20entry)\x20and\x20the\x20verifier\x20surfaced\x20it\x20as\x20a\x20location-only\x20fault\x20inside\x20the\x20passport\x20module\x20—\x20no\x20abort\x20code,\x20because\x20the\x20framework\x20cannot\x20express\x20\x27row\x20absent\x27\x20as\x20an\x20abort.\x20This\x20is\x20a\x20DATA\x20problem:\x201.\x20Identify\x20the\x20repository\x20and\x20key\x20the\x20guard\x20rule\x20reads\x20(guard2file\x20/\x20analyze_guard_semantics\x20on\x20the\x20guard\x20source)\x202.\x20Have\x20the\x20row\x27s\x20producer\x20write\x20it\x20(e.g.\x20an\x20oracle\x20timestamp\x20like\x20checkin_ts),\x20or\x20add\x20it\x20with\x20repository\x20data_add\x20(data_add.name\x20must\x20match\x20a\x20policy\x20rule\x20name)\x203.\x20Retry\x20the\x20SAME\x20call\x20unchanged\x20—\x20a\x20dry_run\x20that\x20turns\x20clean\x20after\x20the\x20row\x20exists\x20confirms\x20the\x20diagnosis','user_prompt':'A\x20guard\x20rule\x20references\x20a\x20data\x20row\x20that\x20has\x20not\x20been\x20written\x20yet\x20(location-only\x20fault\x20inside\x20the\x20passport\x20module\x20—\x20NOT\x20a\x20network\x20problem).\x20Identify\x20the\x20repository\x20row\x20the\x20guard\x20expects\x20(guard2file\x20/\x20analyze_guard_semantics),\x20write\x20it\x20with\x20repository\x20data_add\x20(or\x20let\x20its\x20producer\x20write\x20it),\x20then\x20retry.'},'state_not_visible':{'error_code':'state_not_visible','strategy':'wait_and_retry','max_attempts':0x3,'automation':'full','detail':'The\x20state\x20this\x20call\x20needs\x20was\x20JUST\x20written\x20and\x20is\x20not\x20yet\x20visible\x20to\x20reads\x20(write-to-visibility\x20window),\x20or\x20it\x20does\x20not\x20exist\x20at\x20all.\x201.\x20If\x20a\x20write\x20on\x20this\x20order/machine\x20committed\x20within\x20the\x20last\x20few\x20seconds,\x20wait\x20500ms\x20(doubling\x20each\x20attempt)\x20and\x20replay\x20the\x20SAME\x20call\x20UNCHANGED\x20—\x20NEVER\x20edit\x20parameters\x20to\x20\x27fix\x27\x20a\x20visibility\x20window;\x20an\x20aborted\x20call\x20never\x20landed,\x20so\x20the\x20replay\x20cannot\x20double-spend.\x202.\x20If\x20the\x20fault\x20persists\x20past\x20~3\x20attempts\x20(or\x20nothing\x20was\x20just\x20written),\x20the\x20state\x20is\x20deterministically\x20ABSENT\x20—\x20stop\x20retrying:\x20for\x20a\x20forward-info\x20miss\x20query\x20the\x20Machine\x27s\x20node\x20table\x20(onchain_table_data\x20onchain_table_item_machine_node)\x20and\x20use\x20an\x20existing\x20node/next_node/forward\x20triple;\x20for\x20a\x20guard-read\x20repository\x20row\x20follow\x20the\x20missing_data\x20path\x20(write\x20the\x20row).','user_prompt':'A\x20just-committed\x20write\x20is\x20not\x20visible\x20to\x20this\x20read\x20yet.\x20The\x20same\x20call\x20will\x20be\x20replayed\x20after\x20a\x20short\x20wait\x20—\x20no\x20parameter\x20change\x20is\x20needed.\x20If\x20it\x20keeps\x20failing,\x20the\x20required\x20state\x20is\x20genuinely\x20missing\x20and\x20must\x20be\x20created\x20first.'},'unknown':{'error_code':'unknown','strategy':'escalate_human','max_attempts':0x1,'automation':'manual','detail':'1.\x20Report\x20full\x20error\x20context\x20to\x20the\x20user\x202.\x20Escalate\x20to\x20human\x20intervention\x203.\x20Flag\x20for\x20error-classification\x20rule\x20addition','user_prompt':'An\x20unclassified\x20error\x20occurred.\x20Please\x20review\x20the\x20error\x20details\x20and\x20contact\x20support\x20if\x20needed.'}};const operationAttempts=new Map();function getAttemptCount(a,b){const c=operationAttempts['get'](a);if(!c)return 0x0;return c['get'](b)??0x0;}function incrementAttempt(a,b){!operationAttempts['has'](a)&&operationAttempts['set'](a,new Map());const c=operationAttempts['get'](a),d=(c['get'](b)??0x0)+0x1;return c['set'](b,d),d;}const BUDGET_EXEMPT_CODES=new Set(['guard_rejected']);function getBudgetAttempts(a){const b=operationAttempts['get'](a);if(!b)return 0x0;let c=0x0;for(const [d,e]of b){if(!BUDGET_EXEMPT_CODES['has'](d))c+=e;}return c;}export function resetAttempts(a){operationAttempts['delete'](a);}export function recover(a,b,c){const d=RECOVERY_RULES[a]??RECOVERY_RULES['unknown'],e=0x5,f=getBudgetAttempts(b),g=getAttemptCount(b,a);if(d['max_attempts']<=0x1||d['strategy']==='stop')return{'strategy':d['strategy'],'should_retry':![],'max_attempts':d['max_attempts'],'current_attempt':g,'adjusted_params':d['adjusted_params'],'user_prompt':d['user_prompt'],'detail':d['detail']};if(f>=e)return{'strategy':'stop','should_retry':![],'max_attempts':e,'current_attempt':f,'detail':'Total\x20retry\x20limit\x20('+e+')\x20reached\x20for\x20operation\x20'+b+'.\x20Escalating\x20to\x20human\x20intervention.\x20Attempts\x20recorded\x20for\x20this\x20operation\x20id:\x20'+([...(operationAttempts['get'](b)??new Map())['entries']()]['map'](([j,k])=>j+':'+k)['join'](',\x20')||'none')+'.','user_prompt':'Maximum\x20retry\x20attempts\x20reached.\x20Manual\x20intervention\x20required.'};if(g>=d['max_attempts'])return{'strategy':'escalate_human','should_retry':![],'max_attempts':d['max_attempts'],'current_attempt':g,'detail':'Per-error-code\x20retry\x20limit\x20('+d['max_attempts']+')\x20reached\x20for\x20'+a+'.\x20Escalating\x20to\x20human.','user_prompt':'Recovery\x20attempts\x20for\x20'+a+'\x20exhausted.\x20Manual\x20intervention\x20required.'};const h=incrementAttempt(b,a),i={'strategy':d['strategy'],'should_retry':d['automation']==='full'||h<d['max_attempts'],'max_attempts':d['max_attempts'],'current_attempt':h,'adjusted_params':d['adjusted_params'],'user_prompt':d['user_prompt'],'detail':d['detail']};return i['should_retry']&&c?.['retryable']===![]&&a!=='guard_rejected'&&d['strategy']!=='fill_submission'&&d['strategy']!=='query_and_retry'&&(i['should_retry']=![],i['detail']+='\x20NON-RETRYABLE\x20CLASSIFICATION:\x20retrying\x20the\x20IDENTICAL\x20call\x20fails\x20identically\x20—\x20apply\x20the\x20strategy\x20above\x20to\x20fix\x20the\x20cause,\x20then\x20submit\x20a\x20FRESH\x20call.'),i;}export function getBackoffDelay(a){return Math['pow'](0x2,a-0x1)*0x3e8;}
|
|
1
|
+
export const RECOVERY_RULES={'insufficient_balance':{'error_code':'insufficient_balance','strategy':'claim_faucet','max_attempts':0x3,'automation':'semi','detail':'1.\x20Testnet:\x20claim\x20WOW\x20from\x20the\x20faucet\x202.\x20Mainnet:\x20transfer\x20ETH/USDT/USDC/WBTC\x20via\x20the\x20ETH\x20mainnet\x20cross-chain\x20bridge\x20(query\x20active\x20EVM\x20account\x20→\x20top\x20up\x20from\x20external\x20wallet\x20→\x20confirm\x20→\x20cross-chain)\x203.\x20Point\x20the\x20user\x20to\x20the\x20live\x20airdrop\x20page\x20(https://wowok.net/airdrop.html)\x20for\x20the\x20current\x20round\x204.\x20Retry\x20original\x20operation.\x20NOTE:\x20this\x20rule\x20is\x20for\x20the\x20SIGNING\x20ACCOUNT\x27s\x20wallet/gas\x20only\x20—\x20an\x20on-chain\x20POOL\x20shortage\x20(reward/allocation)\x20classifies\x20as\x20pool_shortage,\x20never\x20here','user_prompt':'Insufficient\x20balance\x20for\x20gas\x20or\x20operation.\x20How\x20to\x20obtain\x20WOW\x20tokens:\x20(1)\x20Testnet\x20—\x20claim\x20WOW\x20from\x20the\x20faucet\x20(https://faucet.testnet.wowok.net);\x20all\x20merchant\x20and\x20order\x20testing\x20can\x20use\x20WOW\x20as\x20the\x20payment\x20token.\x20(2)\x20Mainnet\x20—\x20transfer\x20ETH\x20/\x20USDT\x20/\x20USDC\x20/\x20WBTC\x20via\x20the\x20ETH\x20mainnet\x20cross-chain\x20bridge:\x20first\x20query\x20the\x20active\x20EVM\x20account\x20(bridge_operation\x20query_active_evm_account,\x20auto-generated\x20on\x20first\x20use),\x20then\x20transfer\x20from\x20an\x20external\x20wallet\x20(e.g.\x20MetaMask)\x20to\x20that\x20address,\x20confirm\x20the\x20balance\x20arrived,\x20and\x20cross-chain\x20to\x20WOW\x20mainnet\x20(bridge_operation\x20cross_chain_evm_to_wow).\x20(3)\x20WOW\x20airdrop:\x20current\x20round\x20status,\x20pool\x20and\x20eligibility\x20are\x20published\x20live\x20at\x20https://wowok.net/airdrop.html\x20(referral:\x20https://wowok.net/refer.html)\x20—\x20open\x20that\x20page\x20rather\x20than\x20assuming\x20a\x20round\x20is\x20live\x20or\x20closed.\x20Query\x20wowok_buildin_info\x20with\x20info=\x27funding\x20guidance\x27\x20for\x20the\x20canonical\x20funding\x20guidance.'},'pool_shortage':{'error_code':'pool_shortage','strategy':'adjust_params','max_attempts':0x1,'automation':'semi','detail':'An\x20on-chain\x20POOL\x20cannot\x20cover\x20the\x20operation\x20(reward.move:243\x20abort\x206\x20/\x20'+'allocation.move:509\x20abort\x207)\x20—\x20a\x20pool\x20funding\x20problem,\x20NOT\x20the\x20caller\x27s\x20wallet;\x20a\x20faucet\x20claim\x20will\x20NOT\x20help\x20and\x20re-sending\x20the\x20rail\x20unchanged\x20changes\x20nothing.\x201.\x20Reward\x20pool:\x20the\x20reward\x20ISSUER\x20tops\x20it\x20up\x20with\x20reward\x20coin_add\x20(permission\x20153)\x20—\x20the\x20claim\x20key\x20slot\x20is\x20written\x20BEFORE\x20the\x20balance\x20assert\x20and\x20the\x20abort\x20rolls\x20it\x20back,\x20so\x20NOTHING\x20was\x20consumed;\x20the\x20identical\x20claim\x20succeeds\x20after\x20the\x20top-up\x20(mainnet-proven,\x20T14).\x202.\x20Allocation\x20pool:\x20the\x20payer\x20side\x20funds\x20the\x20order/allocation\x20first\x20(order\x20renew,\x20payment\x20create\x20into\x20the\x20allocation),\x20then\x20re-runs\x20the\x20rail;\x20if\x20the\x20pool\x20is\x20drained\x20because\x20the\x20rail\x20ALREADY\x20paid\x20(balance\x200,\x20once-slot\x20consumed),\x20verify\x20via\x20the\x20Payment\x20record\x20instead\x20of\x20retrying.\x203.\x20As\x20the\x20BUYER:\x20report\x20the\x20shortage\x20to\x20the\x20merchant\x20—\x20never\x20fund\x20a\x20pool\x20you\x20do\x20not\x20own','user_prompt':'The\x20on-chain\x20pool\x20backing\x20this\x20operation\x20is\x20short\x20of\x20funds.\x20The\x20pool\x27s\x20owner\x20must\x20top\x20it\x20up\x20(reward\x20coin_add\x20/\x20allocation\x20funding)\x20—\x20a\x20faucet\x20claim\x20will\x20not\x20help.\x20As\x20the\x20buyer,\x20ask\x20the\x20merchant\x20to\x20fund\x20the\x20pool.'},'stock_exhausted':{'error_code':'stock_exhausted','strategy':'adjust_params','max_attempts':0x1,'automation':'semi','detail':'Merchant-side\x20inventory\x20shortfall\x20(Move\x20service:16\x20E_STOCK_NOT_ENOUGH)\x20—\x20NOT\x20a\x20buyer\x20balance\x20problem,\x20so\x20a\x20faucet\x20claim\x20will\x20NOT\x20help.\x201.\x20Reduce\x20the\x20purchase\x20quantity\x20to\x20the\x20item\x27s\x20remaining\x20stock\x202.\x20Pick\x20another\x20sale\x20item\x203.\x20Ask\x20the\x20merchant\x20to\x20restock,\x20then\x20retry','user_prompt':'The\x20sale\x20item\x27s\x20stock\x20is\x20exhausted\x20for\x20the\x20requested\x20quantity.\x20Reduce\x20the\x20quantity,\x20choose\x20another\x20item,\x20or\x20ask\x20the\x20merchant\x20to\x20restock.'},'sale_suspended':{'error_code':'sale_suspended','strategy':'adjust_params','max_attempts':0x1,'automation':'semi','detail':'The\x20merchant\x20suspended\x20this\x20sale\x20item\x20(Move\x20service:34\x20E_SALE_SUSPENDED).\x201.\x20Pick\x20another\x20(non-suspended)\x20item\x202.\x20Contact\x20the\x20merchant\x20to\x20resume\x20the\x20sale,\x20then\x20retry','user_prompt':'The\x20sale\x20item\x20is\x20suspended\x20by\x20the\x20merchant.\x20Please\x20choose\x20another\x20item\x20or\x20contact\x20the\x20merchant.'},'discount_invalid':{'error_code':'discount_invalid','strategy':'adjust_params','max_attempts':0x1,'automation':'semi','detail':'The\x20discount\x20is\x20outside\x20its\x20[time_start,\x20time_end]\x20validity\x20window\x20(Move\x20service:35\x20E_DISCOUNT_TIME_INVALID).\x201.\x20Retry\x20without\x20the\x20discount\x202.\x20Ask\x20the\x20merchant\x20for\x20a\x20fresh\x20discount,\x20then\x20retry','user_prompt':'The\x20discount\x20is\x20not\x20valid\x20at\x20the\x20current\x20time\x20(outside\x20its\x20validity\x20window).\x20Buy\x20without\x20the\x20discount\x20or\x20ask\x20the\x20merchant\x20for\x20a\x20new\x20one.'},'rate_limit':{'error_code':'rate_limit','strategy':'retry','max_attempts':0x5,'automation':'full','detail':'Rate\x20limit\x20hit\x20(HTTP\x20429).\x20Exponential\x20backoff\x20retry:\x202s\x20/\x204s\x20/\x208s\x20/\x2016s\x20/\x2032s.\x20Avoid\x20parallel\x20calls\x20while\x20the\x20limit\x20window\x20is\x20active.'},'gas_exceeded':{'error_code':'gas_exceeded','strategy':'adjust_params','max_attempts':0x3,'automation':'semi','detail':'Gas\x20budget\x20exceeded.\x201.\x20Increase\x20the\x20gas_budget\x20parameter\x202.\x20Reduce\x20the\x20operation\x20size\x20(fewer\x20objects\x20per\x20transaction)\x203.\x20Retry\x20the\x20original\x20operation','user_prompt':'Gas\x20budget\x20exceeded.\x20Increase\x20the\x20gas\x20budget\x20or\x20reduce\x20the\x20operation\x20size,\x20then\x20retry.'},'insufficient_gas':{'error_code':'insufficient_gas','strategy':'adjust_params','max_attempts':0x1,'automation':'semi','detail':'Gas\x20exhausted\x20—\x20the\x20transaction\x20failed\x20deterministically\x20and\x20did\x20NOT\x20commit\x20on-chain\x20(no\x20state\x20changed;\x20commit-state\x20verification\x20is\x20NOT\x20needed).\x201.\x20Raise\x20the\x20gas_budget\x20parameter\x20above\x20the\x20failed\x20transaction\x27s\x20gas_used\x202.\x20If\x20the\x20account\x20balance\x20cannot\x20cover\x20any\x20budget,\x20fund\x20the\x20signing\x20account\x20with\x20gas\x20tokens\x20first\x203.\x20Resubmit\x20as\x20a\x20FRESH\x20call\x20—\x20do\x20NOT\x20replay\x20the\x20same\x20transaction','user_prompt':'The\x20transaction\x20ran\x20out\x20of\x20gas\x20and\x20did\x20not\x20commit\x20on-chain.\x20Increase\x20the\x20gas\x20budget\x20(or\x20fund\x20the\x20account\x20with\x20gas)\x20and\x20submit\x20a\x20fresh\x20transaction\x20—\x20retrying\x20unchanged\x20will\x20fail\x20the\x20same\x20way.'},'bcs_error':{'error_code':'bcs_error','strategy':'adjust_params','max_attempts':0x2,'automation':'semi','detail':'BCS\x20serialization/deserialization\x20error\x20—\x20a\x20parameter\x20does\x20not\x20match\x20the\x20expected\x20type/structure.\x201.\x20Query\x20the\x20operation\x20schema\x20(schema_query)\x202.\x20Fix\x20the\x20offending\x20parameter\x20type\x20(e.g.\x20BigInt\x20vs\x20number,\x20vector\x20element\x20type)\x203.\x20Retry','user_prompt':'A\x20parameter\x20failed\x20serialization.\x20Check\x20the\x20parameter\x20types\x20against\x20the\x20schema\x20and\x20retry.'},'signature_error':{'error_code':'signature_error','strategy':'switch_account','max_attempts':0x2,'automation':'semi','detail':'Signature\x20verification\x20failed.\x201.\x20Verify\x20the\x20account\x20is\x20not\x20suspended\x202.\x20Check\x20the\x20network\x20matches\x20the\x20account\x27s\x203.\x20Switch\x20to\x20a\x20healthy\x20account\x20and\x20retry','user_prompt':'Signature\x20verification\x20failed.\x20The\x20account\x20may\x20be\x20suspended\x20or\x20misconfigured.\x20Switch\x20accounts\x20or\x20check\x20the\x20configuration\x20and\x20retry.'},'config_error':{'error_code':'config_error','strategy':'escalate_human','max_attempts':0x1,'automation':'manual','detail':'Local\x20configuration\x20error\x20(network\x20not\x20specified,\x20persistent\x20storage\x20not\x20set).\x201.\x20Show\x20the\x20user\x20which\x20configuration\x20is\x20missing\x202.\x20Guide\x20the\x20user\x20through\x20the\x20account_operation/config\x20setup\x203.\x20Retry\x20after\x20the\x20user\x20fixes\x20it','user_prompt':'Local\x20configuration\x20is\x20incomplete.\x20Please\x20finish\x20the\x20account/network\x20setup\x20and\x20retry.'},'wip_verification_failed':{'error_code':'wip_verification_failed','strategy':'adjust_params','max_attempts':0x2,'automation':'semi','detail':'WIP\x20file\x20not\x20publicly\x20reachable\x20/\x20hash\x20mismatch.\x201.\x20Upload\x20via\x20the\x20wip\x20storage\x20service\x20(wip_file\x20type=\x27upload\x27\x20—\x20official\x20free\x20store\x20or\x20storage=\x27custom\x27)\x202.\x20Or\x20deploy\x20to\x20a\x20public\x20URL\x20(GitHub\x20Pages\x20/\x20IPFS\x20/\x20own\x20site)\x203.\x20Update\x20the\x20sale\x27s\x20wip\x20URL\x204.\x20Re-run\x20the\x20operation','user_prompt':'The\x20WIP\x20file\x20could\x20not\x20be\x20verified\x20from\x20a\x20public\x20URL.\x20Upload\x20it\x20with\x20wip_file\x20type=\x27upload\x27\x20(official\x20free\x20store\x20or\x20your\x20own\x20service)\x20or\x20deploy\x20it\x20(GitHub\x20Pages\x20/\x20IPFS),\x20update\x20the\x20sale\x27s\x20WIP\x20URL,\x20and\x20retry.'},'wip_storage_unavailable':{'error_code':'wip_storage_unavailable','strategy':'retry','max_attempts':0x3,'automation':'full','detail':'Transient\x20wip\x20storage\x20transport\x20failure.\x201.\x20Retry\x20the\x20same\x20request\x20with\x20bounded\x20backoff\x202.\x20Large\x20WIP\x20files\x20are\x20network-sensitive:\x20compress\x20images\x20before\x20generate\x20(each\x20image\x20<=\x202MB,\x20total\x20<=\x2010MB)\x203.\x20Check\x20connectivity\x20to\x20the\x20storage\x20base\x20URL\x20if\x20retries\x20keep\x20failing','user_prompt':'The\x20wip\x20storage\x20request\x20failed\x20due\x20to\x20a\x20network\x20problem.\x20Retry\x20the\x20upload;\x20if\x20it\x20keeps\x20failing,\x20reduce\x20the\x20file\x20size\x20or\x20check\x20connectivity.'},'wip_storage_rejected':{'error_code':'wip_storage_rejected','strategy':'adjust_params','max_attempts':0x1,'automation':'semi','detail':'WIP\x20storage\x20service\x20rejected\x20the\x20request\x20(HTTP\x204xx\x20—\x20deterministic\x20client-side\x20fault,\x20retrying\x20unchanged\x20fails\x20identically).\x20400:\x20malformed\x20body\x20or\x20failed\x20WIP\x20validation\x20—\x20re-generate\x20via\x20wip_file\x20type=\x27generate\x27\x20401:\x20re-sign\x20with\x20a\x20fresh\x20nonce\x20inside\x20the\x20timestamp\x20window\x20403:\x20check\x20storage\x20service\x20configuration\x20404:\x20file\x20does\x20not\x20exist\x20—\x20re-upload\x20409:\x20quota\x20—\x20delete\x20old\x20files\x20via\x20wip_file\x20type=\x27list\x27\x20then\x20delete\x20413:\x20compress\x20images\x20(each\x20<=\x202MB,\x20total\x20<=\x2010MB)\x20and\x20regenerate','user_prompt':'The\x20WIP\x20storage\x20service\x20rejected\x20the\x20request\x20(HTTP\x204xx).\x20Fix\x20the\x20specific\x20fault\x20(re-generate/re-sign/re-upload\x20per\x20the\x20status\x20code)\x20and\x20retry\x20—\x20do\x20not\x20retry\x20unchanged.'},'network_error':{'error_code':'network_error','strategy':'retry','max_attempts':0x5,'automation':'full','detail':'Transport\x20failure\x20(timeout\x20/\x20connection\x20reset\x20/\x20RPC\x20unreachable\x20/\x20HTTP\x205xx\x20gateway\x20error).\x20Exponential\x20backoff\x20retry:\x201s\x20/\x202s\x20/\x204s\x20/\x208s\x20/\x2016s.\x20Switch\x20RPC\x20node\x20if\x20available.\x20READS:\x20a\x20plain\x20retry\x20is\x20safe.\x20FUND-MOVING\x20WRITES:\x20before\x20any\x20resubmission,\x20verify\x20whether\x20the\x20previous\x20attempt\x20landed\x20(query\x20the\x20reported\x20digest\x20directly,\x20or\x20the\x20expected\x20object\x20via\x20the\x20sender\x27s\x20recent\x20on-chain\x20objects\x20/\x20onchain_events)\x20—\x20if\x20it\x20landed,\x20ADOPT\x20it\x20and\x20stop;\x20a\x20blind\x20backoff\x20retry\x20of\x20a\x20landed\x20write\x20moves\x20the\x20funds\x20a\x20second\x20time.'},'submission_unknown':{'error_code':'submission_unknown','strategy':'query_and_retry','max_attempts':0x2,'automation':'semi','detail':'Transport-level\x20failure\x20after\x20the\x20request\x20left\x20the\x20client\x20—\x20the\x20submission\x20state\x20is\x20UNKNOWN\x20and\x20the\x20transaction\x20may\x20already\x20be\x20committed.\x20NEVER\x20auto-retry\x20a\x20write\x20here.\x201.\x20Verify\x20commit\x20state\x20on-chain:\x20query_toolkit\x20for\x20the\x20object\x20this\x20call\x20would\x20create/modify\x20(resolve\x20the\x20reference\x20from\x20the\x20call\x27s\x20own\x20arguments),\x20or\x20onchain_events\x20for\x20the\x20sender\x27s\x20recent\x20transactions.\x202.\x20If\x20the\x20expected\x20object\x20EXISTS,\x20adopt\x20it\x20and\x20continue\x20the\x20workflow\x20(the\x20operation\x20succeeded\x20despite\x20the\x20transport\x20error).\x203.\x20If\x20confirmed\x20ABSENT,\x20resubmit\x20the\x20SAME\x20call\x20once\x20—\x20for\x20a\x20FIRST-EVER\x20transaction\x20on\x20a\x20fresh\x20account\x20make\x20that\x20resubmission\x20with\x20env.no_auto_register=true\x20and\x20SAY\x20SO\x20(the\x20SDK\x20silently\x20appends\x20an\x20entity\x20registration\x20to\x20a\x20first\x20business\x20call;\x20if\x20that\x20appended\x20leg\x20was\x20the\x20failing\x20leg\x20the\x20skip\x20lets\x20the\x20call\x20through\x20—\x20ziroom-mn-261013\x20live\x20case;\x20if\x20the\x20resubmission\x20aborts,\x20the\x20envelope\x20now\x20names\x20the\x20abort\x20—\x20re-enable\x20auto\x20registration\x20and\x20retry).\x204.\x20If\x20the\x20reported\x20digest\x20does\x20not\x20resolve\x20or\x20the\x20failure\x20repeats,\x20STOP\x20looping\x20on\x20digest\x20checks\x20and\x20re-run\x20the\x20SAME\x20call\x20with\x20env.dry_run=true\x20—\x20the\x20simulation\x20surfaces\x20the\x20real\x20failure\x20(exact\x20Move\x20abort)\x20without\x20gas\x20or\x20duplicate\x20risk.\x205.\x20Reads\x20are\x20idempotent\x20—\x20retry\x20immediately.\x206.\x20M-K2\x20replay\x20discipline:\x20a\x20FAILED\x20receipt\x20is\x20final\x20—\x20its\x20digest\x20is\x20consumed\x20and\x20replaying\x20the\x20same\x20bytes\x20returns\x20the\x20same\x20failure\x20forever;\x20fix\x20the\x20cause\x20(usually\x20funding)\x20and\x20build\x20a\x20FRESH\x20transaction.\x20Live\x20mainnet\x20incident\x20behind\x20this\x20rule:\x20an\x20order_new\x20-32603\x20\x27did\x20not\x20complete\x27\x20had\x20committed;\x20the\x20blind\x20retry\x20created\x20a\x20second\x20order\x20with\x20a\x20second\x20full\x20escrow\x20and\x20a\x20second\x20stock\x20decrement','user_prompt':'The\x20request\x20failed\x20at\x20transport\x20level\x20but\x20may\x20have\x20already\x20been\x20committed\x20on-chain.\x20Verify\x20whether\x20the\x20expected\x20object\x20exists\x20(query\x20it)\x20before\x20any\x20retry\x20—\x20a\x20blind\x20retry\x20can\x20duplicate\x20the\x20operation\x20(double\x20escrow).\x20For\x20read\x20operations,\x20a\x20plain\x20retry\x20is\x20safe.'},'transaction_expired':{'error_code':'transaction_expired','strategy':'retry','max_attempts':0x3,'automation':'full','detail':'The\x20transaction\x20expired\x20before\x20execution\x20(epoch\x20boundary\x20or\x20validator/gateway\x20outage)\x20—\x20it\x20did\x20NOT\x20land\x20and\x20nothing\x20was\x20committed.\x20Bounded\x20backoff\x20retry:\x2010s\x20/\x2030s\x20/\x2060s,\x20resubmit\x20the\x20SAME\x20call\x20unchanged.\x20If\x20a\x20dry_run\x20passes\x20while\x20the\x20real\x20call\x20keeps\x20failing,\x20the\x20fault\x20is\x20chain-side\x20—\x20wait\x20it\x20out.\x20Verify\x20with\x20onchain_events\x20if\x20unsure.'},'guard_rejected':{'error_code':'guard_rejected','strategy':'fill_submission','max_attempts':0x2,'automation':'semi','detail':'1.\x20Parse\x20Guard\x20table\x20structure\x202.\x20If\x20the\x20Guard\x20defines\x20submission\x20items,\x20fill\x20them\x20and\x20resubmit\x20with\x20call_with_submission\x203.\x20If\x20it\x20defines\x20none,\x20the\x20rule\x20evaluated\x20false\x20—\x20typical\x20causes:\x20a\x20TIME\x20WINDOW\x20(Clock\x20deadline/opening\x20comparison\x20—\x20this\x20call\x20may\x20sit\x20outside\x20the\x20window,\x20and\x20a\x20mis-oriented\x20comparison\x20inverts\x20it:\x20everything\x20inside\x20rejected,\x20everything\x20after\x20admitted),\x20an\x20IDENTITY\x20condition\x20(signer/state\x20checks\x20—\x20the\x20caller\x20may\x20not\x20be\x20the\x20address\x20the\x20rule\x20expects),\x20or\x20a\x20DATA-DEPENDENCY\x20ORDERING\x20(R-03,\x20nnd-tn-261025:\x20the\x20rule\x20reads\x20a\x20repository\x20row\x20/\x20workflow\x20state\x20that\x20does\x20not\x20hold\x20yet\x20—\x20e.g.\x20a\x20repository\x20data_add\x20whose\x20policy\x20write_guard\x20checks\x20progress.current\x20is\x20only\x20admitted\x20AFTER\x20the\x20machine\x20reaches\x20the\x20granting\x20node,\x20while\x20that\x20node\x27s\x20forward\x20may\x20read\x20this\x20very\x20row;\x20the\x20fix\x20is\x20ORDER,\x20not\x20parameters\x20—\x20find\x20the\x20reading\x20node\x20via\x20the\x20machine\x20node\x20table\x20(onchain_table_data)\x20or\x20analyze_guard_semantics,\x20advance\x20there\x20first,\x20then\x20re-run\x20the\x20SAME\x20write);\x20adjust\x20the\x20call\x27s\x20parameters\x20or\x20change\x20the\x20Guard\x20(docs#40)\x204.\x20When\x20the\x20failure\x20is\x20passport\x20E_VERIFY_FAILED\x20and\x20a\x20submission\x20was\x20supplied,\x20the\x20response\x20appends\x20a\x20\x27Guard\x20diagnosis\x20(dry-run)\x27\x20line\x20naming\x20the\x20first\x20failing\x20impact\x20guard\x20—\x20fix\x20that\x20guard\x20first\x205.\x20A\x20TIME-window\x20rejection\x20may\x20simply\x20be\x20EARLY:\x20re-run\x20the\x20SAME\x20call\x20with\x20env.dry_run=true\x20to\x20probe\x20the\x20window\x20for\x20free\x20(guard\x20rejections\x20do\x20NOT\x20consume\x20the\x20total\x20retry\x20budget;\x20only\x20the\x20per-code\x20cap\x20of\x202\x20applies)','user_prompt':'Guard\x20verification\x20rejected.\x20If\x20the\x20Guard\x20defines\x20submission\x20items,\x20fill\x20in\x20the\x20required\x20submission\x20data\x20and\x20resubmit;\x20if\x20it\x20defines\x20none,\x20the\x20Guard\x20rule\x20evaluated\x20false\x20—\x20the\x20usual\x20causes\x20are\x20a\x20time\x20window\x20(this\x20call\x20may\x20be\x20outside\x20the\x20Clock\x20deadline/opening\x20window),\x20an\x20identity\x20condition\x20(the\x20caller\x20is\x20not\x20the\x20address\x20the\x20rule\x20expects),\x20or\x20a\x20data-dependency\x20ordering\x20(the\x20rule\x20reads\x20a\x20row\x20/\x20workflow\x20state\x20that\x20does\x20not\x20hold\x20yet\x20—\x20advance\x20the\x20workflow\x20to\x20the\x20granting\x20node\x20first,\x20then\x20re-run\x20the\x20same\x20write);\x20adjust\x20this\x20call\x27s\x20parameters\x20or\x20change\x20the\x20Guard\x20rule.\x20When\x20the\x20response\x20includes\x20a\x20\x27Guard\x20diagnosis\x20(dry-run)\x27\x20line,\x20it\x20names\x20the\x20first\x20failing\x20impact\x20guard\x20—\x20address\x20that\x20guard\x20first.\x20A\x20time-window\x20rejection\x20may\x20simply\x20be\x20early:\x20probe\x20the\x20window\x20with\x20env.dry_run=true\x20(free\x20—\x20guard\x20rejections\x20do\x20not\x20consume\x20the\x20total\x20retry\x20budget).'},'time_lock_not_elapsed':{'error_code':'time_lock_not_elapsed','strategy':'wait_and_retry','max_attempts':0x1,'automation':'semi','detail':'1.\x20Verify\x20Service\x20is\x20paused\x20(bPaused=true).\x20If\x20not,\x20submit\x20pause=true\x20first.\x202.\x20Wait\x20until\x20paused_time\x20+\x20setting_lock_duration\x20<=\x20current\x20clock.\x203.\x20Retry\x20the\x20original\x20operation.\x20Do\x20NOT\x20recreate\x20the\x20object.','user_prompt':'Service\x20setting_lock_duration\x20has\x20not\x20elapsed\x20since\x20the\x20Service\x20was\x20paused.\x20Please\x20pause\x20the\x20Service\x20if\x20it\x20is\x20not\x20already\x20paused,\x20wait\x20for\x20the\x20lock\x20duration\x20to\x20elapse,\x20then\x20retry.'},'immutable_violation':{'error_code':'immutable_violation','strategy':'recreate','max_attempts':0x1,'automation':'semi','detail':'1.\x20Stop\x20modification\x20attempt\x202.\x20Evaluate\x20creating\x20a\x20new\x20object\x20as\x20replacement\x203.\x20Re-plan\x20affected\x20phases','user_prompt':'Cannot\x20modify\x20an\x20immutable\x20object.\x20A\x20new\x20object\x20must\x20be\x20created\x20as\x20a\x20replacement.\x20Confirm\x20to\x20proceed\x20with\x20recreation.'},'permission_denied':{'error_code':'permission_denied','strategy':'switch_account','max_attempts':0x2,'automation':'semi','detail':'1.\x20Query\x20object\x27s\x20permission_guard\x202.\x20List\x20accounts\x20with\x20permission\x203.\x20Switch\x20account\x20or\x20prompt\x20user\x20to\x20add\x20permission','user_prompt':'Current\x20account\x20lacks\x20permission\x20for\x20this\x20operation.\x20Switch\x20to\x20an\x20authorized\x20account\x20or\x20update\x20the\x20Permission\x20object.'},'object_not_found':{'error_code':'object_not_found','strategy':'query_and_retry','max_attempts':0x3,'automation':'semi','detail':'1.\x20Verify\x20the\x20referenced\x20name/ID\x20spelling\x20(local_mark_list)\x20and\x20that\x20the\x20object\x20exists\x20on\x20the\x20current\x20network\x202.\x20If\x20recently\x20created,\x20re-query\x20the\x20object\x20(may\x20be\x20sync\x20delay)\x203.\x20If\x20truly\x20absent,\x20search\x20for\x20similar\x20objects\x204.\x20Prompt\x20user\x20to\x20reselect','user_prompt':'Referenced\x20object\x20not\x20found.\x20First\x20verify\x20the\x20name/ID\x20spelling\x20and\x20that\x20the\x20object\x20exists\x20on\x20the\x20current\x20network;\x20if\x20it\x20was\x20created\x20recently,\x20this\x20may\x20be\x20a\x20synchronization\x20delay\x20—\x20retry.\x20If\x20the\x20issue\x20persists,\x20please\x20select\x20a\x20valid\x20object.'},'state_conflict':{'error_code':'state_conflict','strategy':'adjust_params','max_attempts':0x2,'automation':'full','detail':'1.\x20Query\x20object\x27s\x20current\x20true\x20state\x202.\x20Update\x20ODG\x20status\x20annotations\x203.\x20Adjust\x20subsequent\x20operations\x20(e.g.,\x20skip\x20completed\x20steps)'},'invalid_parameter':{'error_code':'invalid_parameter','strategy':'adjust_params','max_attempts':0x2,'automation':'semi','detail':'1.\x20Query\x20the\x20relevant\x20schema\x202.\x20Auto-fix\x20obvious\x20errors\x20(e.g.,\x20BigInt\x20vs\x20string)\x203.\x20If\x20unfixable,\x20prompt\x20user','user_prompt':'Parameter\x20validation\x20failed.\x20Please\x20check\x20the\x20parameter\x20types\x20and\x20values\x20against\x20the\x20schema\x20and\x20retry.'},'move_abort_unmapped':{'error_code':'move_abort_unmapped','strategy':'stop','max_attempts':0x1,'automation':'manual','detail':'The\x20chain\x27s\x20business\x20logic\x20aborted\x20and\x20the\x20(module,\x20abort\x20code)\x20pair\x20has\x20no\x20local\x20mapping.\x20Read\x20the\x20module\x20and\x20abort\x20code\x20from\x20move_abort_info\x20/\x20the\x20message\x20(rendered\x20as\x20\x27abort\x20(N)\x27),\x20resolve\x20their\x20meaning\x20from\x20the\x20module\x27s\x20documentation\x20or\x20the\x20wowok-tools\x20Skill,\x20fix\x20the\x20business\x20cause,\x20and\x20issue\x20a\x20NEW\x20call.\x20Do\x20NOT\x20restart\x20the\x20server\x20and\x20do\x20NOT\x20retry\x20the\x20identical\x20call\x20—\x20it\x20aborts\x20deterministically.','user_prompt':'The\x20operation\x20was\x20rejected\x20by\x20the\x20chain\x27s\x20business\x20logic\x20and\x20its\x20abort\x20code\x20is\x20not\x20mapped\x20locally.\x20The\x20module\x20name\x20and\x20abort\x20code\x20in\x20the\x20error\x20are\x20authoritative\x20—\x20review\x20them\x20(and\x20the\x20object\x20state\x20via\x20query_toolkit)\x20before\x20adjusting\x20anything.'},'missing_data':{'error_code':'missing_data','strategy':'adjust_params','max_attempts':0x2,'automation':'semi','detail':'A\x20guard\x20rule\x20read\x20a\x20keyed\x20table\x20row\x20that\x20does\x20NOT\x20exist\x20(repository.data\x20/\x20oracle\x20entry)\x20and\x20the\x20verifier\x20surfaced\x20it\x20as\x20a\x20location-only\x20fault\x20inside\x20the\x20passport\x20module\x20—\x20no\x20abort\x20code,\x20because\x20the\x20framework\x20cannot\x20express\x20\x27row\x20absent\x27\x20as\x20an\x20abort.\x20This\x20is\x20a\x20DATA\x20problem:\x201.\x20Identify\x20the\x20repository\x20and\x20key\x20the\x20guard\x20rule\x20reads\x20(guard2file\x20/\x20analyze_guard_semantics\x20on\x20the\x20guard\x20source)\x202.\x20Have\x20the\x20row\x27s\x20producer\x20write\x20it\x20(e.g.\x20an\x20oracle\x20timestamp\x20like\x20checkin_ts),\x20or\x20add\x20it\x20with\x20repository\x20data_add\x20(data_add.name\x20must\x20match\x20a\x20policy\x20rule\x20name)\x203.\x20Retry\x20the\x20SAME\x20call\x20unchanged\x20—\x20a\x20dry_run\x20that\x20turns\x20clean\x20after\x20the\x20row\x20exists\x20confirms\x20the\x20diagnosis.\x20OR-BRANCH\x20NOTE\x20(alg26\x20261026\x20F-A26-13):\x20a\x20guard\x27s\x20OR\x20does\x20NOT\x20short-circuit\x20—\x20every\x20branch\x20is\x20evaluated,\x20so\x20a\x20row\x20read\x20by\x20ANY\x20branch\x20must\x20exist\x20even\x20when\x20the\x20taken\x20path\x20would\x20not\x20read\x20it;\x20seed\x20initial\x20rows\x20(e.g.\x20a\x20counter\x20at\x200)\x20for\x20every\x20OR\x20branch\x20before\x20first\x20use','user_prompt':'A\x20guard\x20rule\x20references\x20a\x20data\x20row\x20that\x20has\x20not\x20been\x20written\x20yet\x20(location-only\x20fault\x20inside\x20the\x20passport\x20module\x20—\x20NOT\x20a\x20network\x20problem).\x20Identify\x20the\x20repository\x20row\x20the\x20guard\x20expects\x20(guard2file\x20/\x20analyze_guard_semantics),\x20write\x20it\x20with\x20repository\x20data_add\x20(or\x20let\x20its\x20producer\x20write\x20it),\x20then\x20retry.'},'state_not_visible':{'error_code':'state_not_visible','strategy':'wait_and_retry','max_attempts':0x3,'automation':'full','detail':'The\x20state\x20this\x20call\x20needs\x20was\x20JUST\x20written\x20and\x20is\x20not\x20yet\x20visible\x20to\x20reads\x20(write-to-visibility\x20window),\x20or\x20it\x20does\x20not\x20exist\x20at\x20all.\x201.\x20If\x20a\x20write\x20on\x20this\x20order/machine\x20committed\x20within\x20the\x20last\x20few\x20seconds,\x20wait\x20500ms\x20(doubling\x20each\x20attempt)\x20and\x20replay\x20the\x20SAME\x20call\x20UNCHANGED\x20—\x20NEVER\x20edit\x20parameters\x20to\x20\x27fix\x27\x20a\x20visibility\x20window;\x20an\x20aborted\x20call\x20never\x20landed,\x20so\x20the\x20replay\x20cannot\x20double-spend.\x202.\x20If\x20the\x20fault\x20persists\x20past\x20~3\x20attempts\x20(or\x20nothing\x20was\x20just\x20written),\x20the\x20state\x20is\x20deterministically\x20ABSENT\x20—\x20stop\x20retrying:\x20for\x20a\x20forward-info\x20miss\x20query\x20the\x20Machine\x27s\x20node\x20table\x20(onchain_table_data\x20onchain_table_item_machine_node)\x20and\x20use\x20an\x20existing\x20node/next_node/forward\x20triple\x20—\x20on\x20an\x20already-built\x20machine\x20check\x20TOPOLOGY\x20first\x20(alg26\x20261026\x20F-A26-14):\x20the\x20forward\x20may\x20simply\x20not\x20be\x20an\x20out-edge\x20of\x20the\x20order\x27s\x20CURRENT\x20node,\x20which\x20no\x20retry\x20can\x20fix;\x20for\x20a\x20guard-read\x20repository\x20row\x20follow\x20the\x20missing_data\x20path\x20(write\x20the\x20row).','user_prompt':'A\x20just-committed\x20write\x20is\x20not\x20visible\x20to\x20this\x20read\x20yet.\x20The\x20same\x20call\x20will\x20be\x20replayed\x20after\x20a\x20short\x20wait\x20—\x20no\x20parameter\x20change\x20is\x20needed.\x20If\x20it\x20keeps\x20failing,\x20the\x20required\x20state\x20is\x20genuinely\x20missing\x20and\x20must\x20be\x20created\x20first.'},'anchor_unavailable':{'error_code':'anchor_unavailable','strategy':'escalate_human','max_attempts':0x1,'automation':'manual','detail':'The\x20messenger\x20WTS\x20evidence\x20chain\x20is\x20unavailable:\x20the\x20server\x20key-book\x20anchor\x20could\x20not\x20be\x20confirmed\x20on\x20the\x20current\x20network\x20(signer\x20not\x20pinned\x20for\x20this\x20network,\x20anchor\x20repository\x20absent\x20on-chain\x20—\x20typical\x20after\x20a\x20chain\x20re-genesis\x20—\x20or\x20the\x20anchor\x20chain\x20read\x20failed).\x20This\x20is\x20an\x20INFRASTRUCTURE\x20configuration\x20gap,\x20NOT\x20a\x20guard\x20rejection,\x20a\x20network\x20fault,\x20or\x20a\x20parameter\x20problem\x20—\x20signing\x20and\x20anchoring\x20fail\x20closed\x20by\x20design\x20(an\x20unconfirmed\x20key\x20book\x20cannot\x20ground\x20evidence).\x20Remedy\x20(out\x20of\x20band,\x20no\x20retry\x20will\x20help):\x201.\x20Deploy\x20or\x20re-anchor\x20the\x20messenger\x20server\x20key\x20book\x20on\x20the\x20target\x20network\x202.\x20Pin\x20its\x20signer\x20for\x20that\x20network\x20in\x20the\x20SDK\x20keybook\x20table\x203.\x20Until\x20then,\x20treat\x20the\x20messenger\x20channel\x20as\x20private\x20communication\x20WITHOUT\x20third-party\x20provability\x20(verify_wts\x20still\x20returns\x20a\x20structured\x20valid:false\x20verdict\x20with\x20the\x20anchor\x20reason)','user_prompt':'The\x20WTS\x20evidence\x20chain\x20cannot\x20be\x20anchored\x20on\x20this\x20network:\x20the\x20messenger\x20server\x20key-book\x20anchor\x20is\x20missing\x20or\x20unconfirmed.\x20This\x20needs\x20an\x20out-of-band\x20keybook\x20deployment\x20plus\x20SDK\x20signer\x20pinning\x20for\x20the\x20network\x20—\x20retrying\x20the\x20call\x20will\x20fail\x20the\x20same\x20way.\x20Until\x20fixed,\x20messenger\x20communication\x20remains\x20private\x20but\x20cannot\x20be\x20turned\x20into\x20third-party-verifiable\x20evidence.'},'delivery_unknown':{'error_code':'delivery_unknown','strategy':'query_and_retry','max_attempts':0x1,'automation':'semi','detail':'The\x20messenger\x20send\x20failed\x20at\x20transport\x20level\x20AFTER\x20submission:\x20delivery\x20state\x20is\x20UNKNOWN\x20because\x20the\x20relay\x20may\x20have\x20already\x20committed\x20the\x20message\x20despite\x20the\x20client-side\x20failure.\x20A\x20blind\x20re-send\x20DOUBLE-DELIVERS\x20the\x20same\x20encrypted\x20payload,\x20so\x20the\x20retry\x20loop\x20is\x20verify-first:\x20read\x20the\x20conversation\x20(watch_conversations\x20/\x20message\x20list)\x20and\x20check\x20for\x20the\x20identical\x20payload;\x20re-send\x20only\x20after\x20confirming\x20it\x20never\x20arrived.\x20Note\x20the\x20message,\x20when\x20it\x20did\x20arrive,\x20is\x20fully\x20end-to-end\x20encrypted\x20—\x20only\x20delivery\x20is\x20uncertain','user_prompt':'The\x20send\x20failed\x20after\x20submission,\x20so\x20delivery\x20is\x20uncertain\x20(the\x20server\x20may\x20have\x20committed\x20it\x20anyway).\x20Do\x20NOT\x20resend\x20blindly:\x20first\x20check\x20the\x20conversation\x20for\x20the\x20same\x20message;\x20resend\x20only\x20if\x20it\x20never\x20arrived.'},'unknown':{'error_code':'unknown','strategy':'escalate_human','max_attempts':0x1,'automation':'manual','detail':'1.\x20Report\x20full\x20error\x20context\x20to\x20the\x20user\x202.\x20Escalate\x20to\x20human\x20intervention\x203.\x20Flag\x20for\x20error-classification\x20rule\x20addition','user_prompt':'An\x20unclassified\x20error\x20occurred.\x20Please\x20review\x20the\x20error\x20details\x20and\x20contact\x20support\x20if\x20needed.'}};const operationAttempts=new Map();function getAttemptCount(a,b){const c=operationAttempts['get'](a);if(!c)return 0x0;return c['get'](b)??0x0;}function incrementAttempt(a,b){!operationAttempts['has'](a)&&operationAttempts['set'](a,new Map());const c=operationAttempts['get'](a),d=(c['get'](b)??0x0)+0x1;return c['set'](b,d),d;}const BUDGET_EXEMPT_CODES=new Set(['guard_rejected']);function getBudgetAttempts(a){const b=operationAttempts['get'](a);if(!b)return 0x0;let c=0x0;for(const [d,e]of b){if(!BUDGET_EXEMPT_CODES['has'](d))c+=e;}return c;}export function resetAttempts(a){operationAttempts['delete'](a);}export function recover(a,b,c){const d=RECOVERY_RULES[a]??RECOVERY_RULES['unknown'],e=0x5,f=getBudgetAttempts(b),g=getAttemptCount(b,a);if(d['max_attempts']<=0x1||d['strategy']==='stop')return{'strategy':d['strategy'],'should_retry':![],'max_attempts':d['max_attempts'],'current_attempt':g,'adjusted_params':d['adjusted_params'],'user_prompt':d['user_prompt'],'detail':d['detail']};if(f>=e)return{'strategy':'stop','should_retry':![],'max_attempts':e,'current_attempt':f,'detail':'Total\x20retry\x20limit\x20('+e+')\x20reached\x20for\x20operation\x20'+b+'.\x20Escalating\x20to\x20human\x20intervention.\x20Attempts\x20recorded\x20for\x20this\x20operation\x20id:\x20'+([...(operationAttempts['get'](b)??new Map())['entries']()]['map'](([j,k])=>j+':'+k)['join'](',\x20')||'none')+'.','user_prompt':'Maximum\x20retry\x20attempts\x20reached.\x20Manual\x20intervention\x20required.'};if(g>=d['max_attempts'])return{'strategy':'escalate_human','should_retry':![],'max_attempts':d['max_attempts'],'current_attempt':g,'detail':'Per-error-code\x20retry\x20limit\x20('+d['max_attempts']+')\x20reached\x20for\x20'+a+'.\x20Escalating\x20to\x20human.','user_prompt':'Recovery\x20attempts\x20for\x20'+a+'\x20exhausted.\x20Manual\x20intervention\x20required.'};const h=incrementAttempt(b,a),i={'strategy':d['strategy'],'should_retry':d['automation']==='full'||h<d['max_attempts'],'max_attempts':d['max_attempts'],'current_attempt':h,'adjusted_params':d['adjusted_params'],'user_prompt':d['user_prompt'],'detail':d['detail']};return i['should_retry']&&c?.['retryable']===![]&&a!=='guard_rejected'&&d['strategy']!=='fill_submission'&&d['strategy']!=='query_and_retry'&&(i['should_retry']=![],i['detail']+='\x20NON-RETRYABLE\x20CLASSIFICATION:\x20retrying\x20the\x20IDENTICAL\x20call\x20fails\x20identically\x20—\x20apply\x20the\x20strategy\x20above\x20to\x20fix\x20the\x20cause,\x20then\x20submit\x20a\x20FRESH\x20call.'),i;}export function getBackoffDelay(a){return Math['pow'](0x2,a-0x1)*0x3e8;}
|