@wowok/agent-mcp 3.4.1 → 3.4.2
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/composition-truth.js +1 -1
- package/dist/extensions/capability.js +1 -1
- package/dist/extensions/industry-pack.js +1 -1
- package/dist/extensions/modes.js +1 -1
- package/dist/harness/recover.js +1 -1
- package/dist/knowledge/arbitration-templates.js +1 -1
- package/dist/knowledge/audit-rules.d.ts +2 -1
- package/dist/knowledge/audit-rules.js +1 -1
- package/dist/knowledge/builtin-templates.d.ts +17 -1
- package/dist/knowledge/builtin-templates.js +1 -1
- package/dist/knowledge/fee-param-bindings.js +1 -1
- package/dist/knowledge/guard-bindings.js +1 -1
- package/dist/knowledge/guard-field-cognition.js +1 -1
- package/dist/knowledge/guard-templates.js +1 -1
- package/dist/knowledge/param-schema.js +1 -1
- package/dist/knowledge/pattern-resolutions.js +1 -1
- package/dist/knowledge/scenario-modes.js +1 -1
- package/dist/knowledge/template-scanner.js +1 -1
- package/dist/knowledge/template-test-profiles.js +1 -1
- package/dist/participation/customer-interest.d.ts +4 -0
- package/dist/participation/customer-interest.js +1 -1
- package/dist/participation/node-action-advisor.d.ts +4 -0
- package/dist/participation/node-action-advisor.js +1 -1
- package/dist/participation/time-window.d.ts +11 -0
- package/dist/participation/time-window.js +1 -1
- package/dist/playbooks/service-build/participation-radar.js +1 -1
- package/dist/schema/benchmark-migration/index.js +1 -1
- package/dist/schema/call/allocation.js +1 -1
- package/dist/schema/call/proof.js +1 -1
- package/dist/schema/call/service.d.ts +15 -5
- package/dist/schema/call/service.js +1 -1
- package/dist/schema/operations.d.ts +3 -1
- package/dist/schema/query/index.js +1 -1
- package/dist/schemas/benchmark_migration_operation.schema.json +1 -1
- package/dist/schemas/index.json +1 -1
- package/dist/schemas/onchain_operations.schema.json +16 -6
- package/dist/schemas/onchain_operations_allocation.schema.json +1 -1
- package/dist/schemas/onchain_operations_guard.schema.json +2 -2
- package/dist/schemas/onchain_operations_proof.schema.json +1 -1
- package/dist/schemas/onchain_operations_service.schema.json +12 -2
- package/dist/schemas/query_toolkit.output.json +1 -1
- package/dist/tools/handlers/benchmark-migration.d.ts +9 -0
- package/dist/tools/handlers/benchmark-migration.js +1 -1
- package/dist/tools/handlers/onchain.d.ts +10 -0
- package/dist/tools/handlers/onchain.js +1 -1
- package/dist/tools/wrap.js +1 -1
- package/package.json +1 -1
package/dist/extensions/modes.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{getScenarioMode}from'../knowledge/scenario-modes.js';import{BUILTIN_TEMPLATES}from'../knowledge/builtin-templates.js';import{getIndustryTraits}from'../knowledge/industry-registry.js';import{getIndustryRiskChecks,getIndustryNeeds}from'../customer/index.js';import{SUPPORTED_INDUSTRIES}from'../customer/user-preferences.js';import{getFlywheelForIndustry}from'../knowledge/acquisition-flywheel.js';const GENERAL_TRAITS={'has_logistics':![],'communication_heavy':![],'pure_digital':![],'long_cycle':![],'deposit_required':![],'multi_tier_allocation':![],'regulatory_intensity':'low','trust_sensitivity':'medium','consumption_frequency':'occasional','avg_ticket_size':'medium'},GENERAL_FLYWHEEL={'industry':'general','trustSellingPoints':[],'keyActions':[],'rewardStrategy':'User-defined','discountStrategy':'User-defined','trustDescription':'User-defined\x20trust\x20mechanism'},GENERAL_MACHINE_SHAPE=[{'name':'paid','role':'Entry:\x20order\x20created\x20and\x20paid'},{'name':'delivering','role':'Service\x20delivery\x20in\x20progress'},{'name':'delivered','role':'Deliverable\x20available\x20for\x20review'},{'name':'completed','role':'Service\x20completed,\x20funds\x20released'},{'name':'cancelled','role':'Pre-delivery\x20cancellation\x20—\x20triggers\x20refund\x20Allocator','operator':'order_payer'}],GENERAL_ALLOCATOR={'recipient':'signer','count':0x1,'mode':'surplus','description':'Default:\x20surplus\x20to\x20service\x20owner\x20(general\x20fallback)'},RETAIL_D2C_MACHINE_SHAPE=[{'name':'ordered','role':'Entry:\x20order\x20created\x20(funds\x20escrowed\x20in\x20Allocation)'},{'name':'shipped','role':'Merchant\x20ships\x20goods'},{'name':'delivered','role':'Goods\x20delivered\x20to\x20buyer'},{'name':'completed','role':'Buyer\x20confirms\x20receipt\x20—\x20withdraw_guard\x20releases\x20funds','operator':'order_payer'},{'name':'cancelled','role':'Pre-ship\x20cancellation\x20—\x20refund_guard\x20refunds\x20buyer','operator':'order_payer'}],RETAIL_D2C_GUARDS=[{'template_id':'withdraw_guard_delivery','host':'service','purpose':'Release\x20funds\x20to\x20merchant\x20+\x20processor\x20on\x20order\x20completion\x20(delivery\x20confirmation)'},{'template_id':'refund_guard_cancellation','host':'service','purpose':'Refund\x20100%\x20to\x20buyer\x20on\x20order\x20cancellation'}],RETAIL_D2C_ALLOCATOR={'recipient':'entity','count':0x2,'mode':'rate','description':'Merchant\x2097%\x20+\x20Processor\x203%\x20(rate-based\x20split,\x20no\x20platform\x20commission)'},RETAIL_D2C_KEY_RISK='No\x20platform\x20arbitration\x20—\x20disputes\x20rely\x20on\x20optional\x20Arbitration\x20or\x20off-chain\x20chargeback',RETAIL_D2C_BUILD_NOTES=['Allocation\x20escrow\x20replaces\x20platform\x20custody\x20—\x20funds\x20locked\x20in\x20contract\x20until\x20Guard\x20releases','withdraw_guard\x20enforces\x20delivery\x20gate\x20—\x20merchant\x20must\x20reach\x20\x27completed\x27\x20state\x20to\x20receive\x20payment','refund_guard\x20ensures\x20100%\x20refund\x20on\x20cancellation\x20—\x20no\x20merchant\x20approval\x20needed','No\x20buy_guard\x20needed\x20—\x20D2C\x20doesn\x27t\x20gate\x20purchases\x20(open\x20storefront)','Arbitration\x20is\x20optional\x20—\x20add\x20when\x20dispute\x20volume\x20justifies\x20the\x20cost','Service\x20↔\x20Guard\x20circular\x20dependency:\x20create\x20Service\x20(unpublished)\x20→\x20create\x20Guards\x20→\x20update\x20Service\x20(publish)'],SUPPORTED_INDUSTRY_SET=new Set([...SUPPORTED_INDUSTRIES,'retail_d2c']);function fetchTemplate(a){const b=a==='retail_d2c'?'retail':a,c=getIndustryTraits(b)??GENERAL_TRAITS,d=SUPPORTED_INDUSTRY_SET['has'](a),e=a==='retail_d2c'?'retail':a,f=d?getIndustryRiskChecks(e):[],g=d?getIndustryNeeds(e):[],h=getFlywheelForIndustry(b)??GENERAL_FLYWHEEL;let i,j,k,l,m;if(a==='retail_d2c')i=RETAIL_D2C_MACHINE_SHAPE,j=RETAIL_D2C_GUARDS,k=RETAIL_D2C_ALLOCATOR,l=RETAIL_D2C_KEY_RISK,m=RETAIL_D2C_BUILD_NOTES;else{if(a==='general'){const n=getScenarioMode('general');i=GENERAL_MACHINE_SHAPE,j=[],k=GENERAL_ALLOCATOR,l=n?.['key_risk']??'No\x20safety\x20net\x20—\x20user\x20must\x20design\x20all\x20trust\x20mechanisms\x20manually',m=n?.['build_notes'];}else{const o=getScenarioMode(a);if(!o)throw new Error('No\x20scenario\x20mode\x20found\x20for\x20industry:\x20'+a);const p=BUILTIN_TEMPLATES['find'](q=>q['id']===o['default_template']);if(!p)throw new Error('Mode\x20\x27'+a+'\x27\x20default_template\x20\x27'+o['default_template']+'\x27\x20is\x20not\x20in\x20the\x20builtin\x20template\x20catalog');i=p['machine_shape'],j=p['guards'],k=p['allocator'],l=o['key_risk'],m=o['build_notes'];}}return{'traits':c,'risk_checks':f,'needs':g,'flywheel':h,'machine_shape':i,'guards':j,'allocator':k,'key_risk':l,'build_notes':m};}export const BUILTIN_MODES=[{'name':'freelance','display_name':'Freelance','version':'v1','source':'builtin',...fetchTemplate('freelance'),'analyze':{'key_questions':['Are\x20WIP\x20hashes\x20bound\x20to\x20each\x20milestone,\x20so\x20delivery\x20evidence\x20cannot\x20be\x20substituted\x20after\x20acceptance?','Does\x20the\x20acceptance\x20gate\x20have\x20a\x20time-bounded\x20escape\x20(keeper-driven\x20auto-accept),\x20or\x20can\x20a\x20silent\x20buyer\x20hold\x20the\x20provider\x27s\x20funds\x20hostage\x20indefinitely?']},'capabilities_used':['permission.index_create','permission.role_assign','guard.validate_buy','guard.validate_wip_hash','machine.node_topology','treasury.owner_receive','allocation.distribute','allocation.distribute_milestone','service.publish','progress.advance','arb.vote_weighted','contact.im_create'],'config_overrides':{'service':{'setting_lock_duration':'30d','engagement_type':'milestone'},'machine':{'wip_required':!![],'wip_hash_algorithm':'sha256','acceptance_gate':!![]}},'expected_benefits':[{'metric':'Dispute\x20rate\x20reduction','expected_value':'40%','evidence':'WIP\x20hash\x20+\x20milestone\x20allocation\x20enforces\x20delivery\x20evidence'},{'metric':'Delivery\x20confirmation\x20efficiency','expected_value':'+50%','evidence':'acceptance\x20gate\x20automates\x20acceptance\x20workflow'},{'metric':'Provider\x20payment\x20assurance','expected_value':'100%','evidence':'Funds\x20auto-release\x20to\x20provider\x20after\x20accepted\x20node'}],'risk_appetite':'balanced','risk_constraints':{'require_arbitration':!![],'require_compensation_fund':![],'require_wip_evidence':!![],'other_constraints':['setting_lock_duration\x20>=\x207d\x20to\x20lock\x20engagement-period\x20rules','Acceptance\x20timeout\x20=\x20the\x20template\x27s\x20escrow_release_days\x20(single\x20source:\x20fee_params,\x20override\x20via\x20fee_overrides).\x20Mechanism:\x20dual-branch\x20time-gated\x20forward\x20(pattern.time_lock_progress\x20anchored\x20on\x20the\x20delivered\x20entry);\x20a\x20keeper\x20advances\x20the\x20timeout\x20path.\x20adminUnhold\x20(224)\x20is\x20ONLY\x20the\x20hold-release\x20escape\x20hatch,\x20never\x20the\x20timeout\x20mechanism.']},'applicable_conditions':{'business_scale':'small','min_daily_orders':0x1,'other_conditions':['Suitable\x20for\x20mid-to-long-term\x20project\x20delivery','Requires\x20milestone-based\x20phased\x20acceptance']},'similar_industries':['rental','education'],'novel_capabilities':['allocation.distribute_milestone'],'disabled_builtin_constraints':['require_compensation_fund']},{'name':'rental','display_name':'Rental','version':'v1','source':'builtin',...fetchTemplate('rental'),'analyze':{'key_questions':['Is\x20the\x20deposit\x20escrowed\x20on-chain\x20and\x20sized\x20against\x20the\x20item\x27s\x20full\x20replacement\x20value,\x20not\x20just\x20the\x20rental\x20fee?','Are\x20pre-handover\x20and\x20post-return\x20WIP\x20states\x20hash-recorded,\x20so\x20damage\x20attribution\x20is\x20provable\x20rather\x20than\x20asserted?']},'capabilities_used':['permission.index_create','permission.role_assign','guard.validate_buy','guard.validate_wip_hash','machine.node_topology','treasury.owner_receive','allocation.distribute','service.publish','progress.advance','arb.vote_weighted','contact.im_create'],'config_overrides':{'treasury':{'deposit_escrow':!![],'deposit_deductible':!![]},'machine':{'wip_required':!![],'wip_stages':['handover_out','returned'],'inspection_gate':!![]}},'expected_benefits':[{'metric':'Deposit\x20dispute\x20rate','expected_value':'-60%','evidence':'pre-rental\x20WIP\x20mandatorily\x20records\x20item\x27s\x20original\x20state'},{'metric':'Damage\x20liability\x20accuracy','expected_value':'+70%','evidence':'pre/post\x20WIP\x20hash\x20comparison\x20eliminates\x20unfounded\x20deductions'},{'metric':'Trust\x20score','expected_value':'+25%','evidence':'compensation_fund\x20covers\x20damage\x20risk'}],'risk_appetite':'conservative','risk_constraints':{'require_arbitration':!![],'require_compensation_fund':!![],'require_wip_evidence':!![],'max_single_transaction':0x2710,'compensation_fund_coverage_ratio':0xa,'other_constraints':['Deposit\x20must\x20be\x20escrowed\x20(no\x20direct\x20transfer)','lock_duration\x20>=\x207d\x20to\x20prevent\x20arbitrary\x20merchant\x20withdrawal']},'applicable_conditions':{'business_scale':'small','min_daily_orders':0x1,'other_conditions':['Requires\x20physical\x20item\x20handover','Has\x20logistics\x20or\x20offline\x20delivery\x20leg']},'similar_industries':['retail','travel'],'novel_capabilities':[]},{'name':'education','display_name':'Education','version':'v1','source':'builtin',...fetchTemplate('education'),'analyze':{'key_questions':['Does\x20tuition\x20release\x20per\x20attended\x20session\x20(Progress\x20node),\x20so\x20undelivered\x20sessions\x20stay\x20refundable\x20if\x20the\x20institution\x20disappears?','Does\x20setting_lock_duration\x20span\x20the\x20full\x20term,\x20so\x20the\x20institution\x20cannot\x20tighten\x20refund\x20rules\x20mid-course?']},'capabilities_used':['permission.index_create','permission.role_assign','guard.validate_buy','guard.validate_wip_hash','machine.node_topology','treasury.owner_receive','allocation.distribute','allocation.distribute_milestone','service.publish','progress.advance','arb.vote_weighted','contact.im_create'],'config_overrides':{'allocation':{'strategy':{'recipient':'entity','count':0x1,'mode':'amount','description':'1/N\x20of\x20tuition\x20released\x20per\x20session\x20attendance'},'session_threshold':!![]},'service':{'setting_lock_duration':'120d','anti_runaway':!![]}},'expected_benefits':[{'metric':'Refund\x20dispute\x20rate','expected_value':'-50%','evidence':'per-session\x20release\x20distributes\x20tuition\x20by\x20class'},{'metric':'Institution\x20runaway\x20risk','expected_value':'eliminated','evidence':'Funds\x20release\x20per\x20session;\x20undelivered\x20portion\x20is\x20refundable'},{'metric':'Attendance\x20traceability','expected_value':'100%','evidence':'attendance_guard\x20signs\x20each\x20session'}],'risk_appetite':'conservative','risk_constraints':{'require_arbitration':!![],'require_compensation_fund':!![],'require_wip_evidence':![],'other_constraints':['setting_lock_duration\x20covers\x20the\x20entire\x20term\x20(>=90d)','Long-cycle\x20projects\x20must\x20monitor\x20>90d\x20progress']},'applicable_conditions':{'business_scale':'medium','min_daily_orders':0x1,'other_conditions':['Long-cycle\x20delivery','Requires\x20per-session\x20acceptance','Regulatory\x20intensity:\x20medium']},'similar_industries':['freelance','subscription'],'novel_capabilities':['allocation.distribute_milestone'],'disabled_builtin_constraints':['require_wip_evidence']},{'name':'travel','display_name':'Travel','version':'v1','source':'builtin',...fetchTemplate('travel'),'analyze':{'key_questions':['Does\x20each\x20itinerary\x20segment\x20have\x20its\x20own\x20guard\x20and\x20WIP\x20acceptance,\x20so\x20one\x20failed\x20leg\x20is\x20refundable\x20without\x20unwinding\x20the\x20whole\x20trip?','Is\x20the\x20multi-tier\x20allocation\x20waterfall\x20(agency\x20→\x20hotel/guide/driver)\x20visible\x20on-chain,\x20so\x20the\x20agency\x20cannot\x20silently\x20re-split\x20funds?']},'capabilities_used':['permission.index_create','permission.role_assign','guard.validate_buy','guard.validate_wip_hash','machine.node_topology','treasury.owner_receive','allocation.distribute','service.publish','progress.advance','arb.vote_weighted','contact.im_create'],'config_overrides':{'allocation':{'strategy':{'recipient':'entity','count':0x3,'mode':'amount','description':'Deposit\x2020%\x20to\x20agency,\x20final\x2080%\x20to\x20agency,\x20then\x20agency-side\x20Allocation\x20splits\x20to\x20hotel/guide/driver\x20per\x20segment'},'multi_tier_waterfall':!![],'guard_chaining':!![]},'service':{'supply_chain_suborders':!![],'segment_guard_required':!![]}},'expected_benefits':[{'metric':'Fund\x20transparency','expected_value':'100%','evidence':'multi-tier\x20allocation\x20splits\x20per\x20segment\x20to\x20hotel/guide/driver'},{'metric':'Itinerary\x20change\x20disputes','expected_value':'-45%','evidence':'segment\x20WIP\x20accepts\x20each\x20leg'},{'metric':'Breach\x20compensation\x20assurance','expected_value':'+60%','evidence':'compensation_fund\x20covers\x20itinerary\x20breach'}],'risk_appetite':'balanced','risk_constraints':{'require_arbitration':!![],'require_compensation_fund':!![],'require_wip_evidence':!![],'other_constraints':['Multi-tier\x20allocation\x20requires\x20guard\x20chaining\x20validation','deposit\x2020%\x20+\x20final\x2080%\x20two-stage\x20payment']},'applicable_conditions':{'business_scale':'medium','min_daily_orders':0x1,'other_conditions':['Multi-segment\x20itinerary\x20combination','Requires\x20hotel/guide/driver\x20multi-party\x20allocation']},'similar_industries':['rental','education'],'novel_capabilities':[]},{'name':'subscription','display_name':'Subscription','version':'v1','source':'builtin',...fetchTemplate('subscription'),'analyze':{'key_questions':['Is\x20every\x20periodic\x20charge\x20gated\x20by\x20an\x20explicit\x20user\x20confirmation,\x20with\x20no\x20auto-renew\x20default?','Can\x20the\x20subscriber\x20cancel\x20anytime\x20effective\x20next\x20period,\x20without\x20a\x20dead-end\x20node\x20in\x20the\x20machine?']},'capabilities_used':['permission.index_create','permission.role_assign','guard.validate_buy','machine.node_topology','treasury.owner_receive','allocation.distribute','service.publish','progress.advance','arb.vote_weighted','reward.claim_guard','contact.im_create'],'config_overrides':{'machine':{'no_auto_renew_trap':!![],'user_confirmed_charge':!![],'cancel_anytime':!![],'next_period_effective':!![]},'service':{'creator_data_subscription':!![],'periodic_billing':!![]}},'expected_benefits':[{'metric':'Renewal\x20rate','expected_value':'+25%','evidence':'loyalty\x20reward\x20+\x20transparent\x20subscription\x20mechanism'},{'metric':'Cancellation\x20disputes','expected_value':'eliminated','evidence':'cancel\x20anytime\x20+\x20no\x20auto-renew\x20trap'},{'metric':'Creator\x20retention','expected_value':'+30%','evidence':'deliver_guard_wip\x20prevents\x20content\x20dropout'}],'risk_appetite':'aggressive','risk_constraints':{'require_arbitration':![],'require_compensation_fund':![],'require_wip_evidence':![],'compensation_fund_coverage_ratio':0x3,'other_constraints':['Forbid\x20dead-end\x20nodes\x20(prevent\x20lock-in)','charge_guard\x20requires\x20user\x20confirmation\x20each\x20period']},'applicable_conditions':{'business_scale':'small','min_daily_orders':0x5,'other_conditions':['Pure-digital\x20delivery','Periodic\x20content\x20or\x20SaaS\x20service']},'similar_industries':['freelance','education'],'novel_capabilities':[],'disabled_builtin_constraints':['require_arbitration','require_compensation_fund','require_wip_evidence']},{'name':'retail','display_name':'Retail','version':'v1','source':'builtin',...fetchTemplate('retail'),'analyze':{'key_questions':['Is\x20the\x20logistics\x20tracking\x20number\x20recorded\x20as\x20WIP\x20before\x20the\x20confirm\x20gate,\x20so\x20receipt\x20disputes\x20have\x20carrier\x20evidence?','Is\x20the\x20refund\x20window\x20at\x20least\x207\x20days\x20with\x20an\x20on-chain\x20refund\x20path\x20that\x20does\x20not\x20rely\x20on\x20merchant\x20goodwill?']},'capabilities_used':['permission.index_create','permission.role_assign','guard.validate_buy','guard.validate_wip_hash','machine.node_topology','treasury.owner_receive','allocation.distribute','service.publish','progress.advance','arb.vote_weighted','reward.claim_guard','contact.im_create'],'config_overrides':{'machine':{'wip_required':!![],'wip_field':'tracking_number','confirm_gate':!![],'refund_requires_approval':!![]},'service':{'first_order_discount':!![]}},'expected_benefits':[{'metric':'Return\x20dispute\x20rate','expected_value':'-35%','evidence':'logistics\x20WIP\x20+\x20refund\x20path\x20assurance'},{'metric':'Repurchase\x20rate','expected_value':'+20%','evidence':'spend\x20cashback\x20reward'},{'metric':'Product\x20authenticity\x20traceability','expected_value':'100%','evidence':'WIP\x20verifies\x20product/logistics\x20info'}],'risk_appetite':'conservative','risk_constraints':{'require_arbitration':!![],'require_compensation_fund':!![],'require_wip_evidence':![],'compensation_fund_coverage_ratio':0x5,'other_constraints':['refund_window\x20>=\x207d','confirm_gate:\x20only\x20buyer\x20can\x20confirm\x20receipt']},'applicable_conditions':{'business_scale':'medium','min_daily_orders':0xa,'other_conditions':['Has\x20logistics\x20shipping\x20leg','High-frequency\x20small-ticket\x20transactions']},'similar_industries':['rental','subscription'],'novel_capabilities':[],'disabled_builtin_constraints':['require_wip_evidence']},{'name':'retail_d2c','display_name':'Retail\x20D2C\x20(Direct-to-Consumer)','version':'v1','source':'builtin',...fetchTemplate('retail_d2c'),'analyze':{'key_questions':['Do\x20withdraw_guard\x20and\x20refund_guard\x20fully\x20enclose\x20the\x20Allocation\x20escrow,\x20so\x20neither\x20side\x20can\x20move\x20funds\x20outside\x20the\x20contract\x20path?','With\x20no\x20platform\x20arbitration,\x20what\x20off-chain\x20recourse\x20(if\x20any)\x20backs\x20a\x20delivery\x20failure\x20—\x20and\x20is\x20that\x20acceptable\x20for\x20the\x20ticket\x20size?']},'capabilities_used':['permission.index_create','permission.role_assign','guard.validate_withdraw','guard.validate_refund','machine.node_topology','allocation.distribute','service.publish','progress.advance','contact.im_create'],'config_overrides':{'machine':{'wip_required':![],'confirm_gate':!![],'refund_requires_approval':![]},'service':{'multi_recipient_allocation':!![]}},'expected_benefits':[{'metric':'Merchant\x20revenue\x20share','expected_value':'97%','evidence':'No\x20platform\x20commission\x20—\x20only\x203%\x20processing\x20fee'},{'metric':'Fund\x20safety','expected_value':'contract-grade','evidence':'Allocation\x20escrow\x20+\x20Guard\x20verification\x20replaces\x20platform\x20custody'},{'metric':'Delivery\x20reliability','expected_value':'high','evidence':'withdraw_guard\x20enforces\x20delivery\x20confirmation\x20before\x20payment'}],'risk_appetite':'balanced','risk_constraints':{'require_arbitration':![],'require_compensation_fund':![],'require_wip_evidence':![],'other_constraints':['Allocation\x20escrow\x20required\x20(withdraw_guard\x20+\x20refund_guard)','Service\x20↔\x20Guard\x20circular\x20dependency\x20requires\x203-step\x20creation\x20pattern']},'applicable_conditions':{'business_scale':'small','min_daily_orders':0x1,'other_conditions':['Independent\x20storefront\x20(no\x20marketplace)','Merchant-managed\x20logistics','Allocation\x20escrow\x20model']},'similar_industries':['retail','subscription'],'novel_capabilities':['Allocation\x20escrow\x20as\x20platform-custody\x20alternative','Multi-recipient\x20allocation\x20(merchant\x20+\x20processor)'],'disabled_builtin_constraints':['require_arbitration','require_compensation_fund','require_wip_evidence']},{'name':'licensing','display_name':'Licensing','version':'v1','source':'builtin',...fetchTemplate('licensing'),'analyze':{'key_questions':['Is\x20the\x20license\x20grant\x20(terms\x20+\x20asset/certificate\x20hash)\x20anchored\x20as\x20a\x20WIP\x20artifact\x20and\x20an\x20evidence\x20Repository\x20row\x20BEFORE\x20release,\x20so\x20a\x20misrepresentation\x20dispute\x20has\x20an\x20on-chain\x20artifact\x20to\x20read?','Does\x20the\x20release\x20split\x20sum\x20to\x20exactly\x2010000\x20bps\x20across\x20explicit\x20NON-EMPTY\x20rights-holder\x20Entities\x20(no\x20empty\x20Entity\x20routing\x20the\x20share\x20to\x20the\x20deployer,\x20no\x20Surplus\x20draining\x20the\x20pool)?','Are\x20the\x20chain\x20GAPs\x20disclosed\x20honestly\x20—\x20the\x20auction\x20resolved\x20OFF-chain\x20(no\x20bid\x20ledger)\x20and\x20usage\x20caps\x20enforced\x20as\x20attested-counter\x20arbitration\x20evidence\x20(no\x20metering\x20oracle),\x20never\x20as\x20chain-enforced\x20limits?']},'capabilities_used':['permission.index_create','permission.role_assign','guard.validate_buy','guard.validate_wip_hash','machine.node_topology','treasury.owner_receive','allocation.distribute','service.publish','progress.advance','arb.vote_weighted','contact.im_create'],'config_overrides':{'machine':{'wip_required':!![],'confirm_gate':!![],'refund_requires_approval':!![]},'service':{'multi_recipient_allocation':!![]}},'expected_benefits':[{'metric':'Royalty-split\x20transparency','expected_value':'100%','evidence':'every\x20rights-holder\x20share\x20is\x20an\x20on-chain\x20Rate\x20leg\x20the\x20buyer\x20can\x20audit\x20before\x20ordering'},{'metric':'Misrepresentation\x20dispute\x20rate','expected_value':'-40%','evidence':'inspection-window\x20escrow\x20+\x20grant-artifact\x20WIP\x20anchor\x20the\x20terms\x20before\x20release'},{'metric':'Settlement\x20latency','expected_value':'seconds','evidence':'release\x20fires\x20on\x20buyer\x20accept\x20/\x20time-lock,\x20not\x20a\x20calendar\x20freeze'}],'risk_appetite':'conservative','risk_constraints':{'require_arbitration':!![],'require_compensation_fund':!![],'require_wip_evidence':!![],'other_constraints':['release\x20split\x20Rate\x20legs\x20sum\x20exactly\x2010000\x20(ERATE_NOT_10000);\x20every\x20recipient\x20an\x20explicit\x20NON-EMPTY\x20Entity','inspection/delivery\x20window\x20>=\x203d\x20so\x20the\x20buyer\x20can\x20verify\x20the\x20grant\x20before\x20auto-accept','🔴\x20auction\x20resolved\x20OFF-chain\x20(no\x20bid\x20ledger)\x20and\x20usage\x20caps\x20attested\x20(no\x20oracle)\x20—\x20disclosed,\x20never\x20chain-enforced']},'applicable_conditions':{'business_scale':'small','min_daily_orders':0x1,'other_conditions':['Pure-digital\x20grant\x20(no\x20logistics\x20leg)','Rights-holder\x20/\x20producer\x20/\x20publisher\x20owns\x20the\x20IP','Long-lived\x20value\x20(a\x20royalty\x20share\x20or\x20a\x20license\x20term)']},'similar_industries':['subscription','freelance'],'novel_capabilities':['Multi-recipient\x20royalty\x20split\x20(Allocation\x20Rate\x20plan)','Territory/qualification\x20allowlist\x20buy\x20gate','Inspection-window\x20escrow\x20before\x20release']},{'name':'crowdfunding','display_name':'Crowdfunding','version':'v1','source':'builtin',...fetchTemplate('crowdfunding'),'analyze':{'key_questions':['Is\x20each\x20contribution\x20escrowed\x20to\x20the\x20funder\x27s\x20OWN\x20Order\x20(for_object)\x20and\x20NEVER\x20pooled\x20via\x20balance::join,\x20so\x20per-backer\x20attribution\x20survives\x20settlement\x20or\x20refund?','Does\x20the\x20threshold\x20gate\x20read\x20a\x20WRITER-BOUND\x20Repository\x20numeric\x20row\x20(id_from\x20signer,\x20value\x20=\x20amount)\x20summed\x20via\x20the\x20sum-where\x20query,\x20ANDed\x20with\x20an\x20ABSOLUTE\x20shared\x20campaign\x20deadline\x20—\x20so\x20a\x20funder\x20cannot\x20inflate\x20the\x20total\x20and\x20every\x20backer\x20sees\x20the\x20same\x20cutoff?','Is\x20the\x20aggregate\x20total\x20disclosed\x20honestly\x20as\x20a\x20keeper-attested\x20Repository\x20sum\x20(arbitration\x20evidence,\x20NOT\x20a\x20chain-verified\x20money\x20oracle),\x20and\x20is\x20the\x20escrow-exit\x20two-leg\x20polarity\x20exact\x20(refund\x20claimed_by\x20some==false\x20XOR\x20recover_gate\x20claimed_by\x20some==true,\x20D-BUG-2)?']},'capabilities_used':['permission.index_create','permission.role_assign','guard.validate_buy','guard.validate_wip_hash','machine.node_topology','treasury.owner_receive','allocation.distribute','service.publish','progress.advance','arb.vote_weighted','contact.im_create'],'config_overrides':{'machine':{'wip_required':!![],'confirm_gate':!![],'refund_requires_approval':![]},'service':{'multi_recipient_allocation':!![]}},'expected_benefits':[{'metric':'Backer\x20attribution','expected_value':'100%','evidence':'each\x20contribution\x20is\x20a\x20for_object-bound\x20Allocation\x20on\x20the\x20funder\x27s\x20own\x20Order\x20—\x20never\x20pooled'},{'metric':'Unmet-threshold\x20refund','expected_value':'automatic','evidence':'the\x20sum-where\x20<\x20goal\x20leg\x20fires\x20the\x20refund\x20exit\x20with\x20no\x20merchant\x20approval\x20(D-BUG-2\x20polarity)'},{'metric':'Campaign\x20deadline\x20drift','expected_value':'0','evidence':'one\x20ABSOLUTE\x20Clock\x20timestamp\x20shared\x20by\x20every\x20funder,\x20not\x20per-order\x20entry+duration'}],'risk_appetite':'conservative','risk_constraints':{'require_arbitration':!![],'require_compensation_fund':!![],'require_wip_evidence':!![],'other_constraints':['per-contributor\x20Allocation\x20for_object\x20=\x20own\x20Order;\x20NEVER\x20balance::join\x20(attribution\x20survives)','threshold\x20gate\x20=\x20repository.data\x20sum-where\x20(1174)\x20over\x20WRITER-BOUND\x20rows\x20ANDed\x20with\x20an\x20ABSOLUTE\x20deadline','🔴\x20the\x20aggregate\x20total\x20is\x20a\x20keeper-attested\x20Repository\x20sum\x20(arbitration\x20evidence),\x20NOT\x20a\x20chain-verified\x20money\x20oracle\x20—\x20disclosed','🔴\x20L-01\x20never\x20promises\x20investment\x20returns\x20or\x20promotes\x20coin\x20price;\x20L-05\x20KYC/AML\x20+\x20cross-border\x20caution\x20(HIGH\x20regulatory\x20intensity)']},'applicable_conditions':{'business_scale':'small','min_daily_orders':0x1,'other_conditions':['Aggregate\x20funding\x20goal\x20with\x20a\x20fixed\x20campaign\x20deadline','Per-backer\x20reward\x20tiers\x20or\x20donation\x20(no\x20logistics\x20leg\x20required)','All-or-nothing\x20(refund\x20if\x20unmet)\x20or\x20keep-it-all\x20(no\x20refund)\x20campaign\x20shape']},'similar_industries':['retail','licensing'],'novel_capabilities':['Aggregate-goal\x20threshold\x20gate\x20via\x20writer-bound\x20Repository\x20sum-where','Per-contributor\x20for_object\x20escrow\x20(attribution-preserving,\x20never\x20pooled)','Absolute\x20shared\x20campaign\x20deadline\x20+\x20two-leg\x20escrow-exit\x20(release\x20XOR\x20refund)']},{'name':'delivery','display_name':'Local\x20Delivery','version':'v1','source':'builtin',...fetchTemplate('delivery'),'analyze':{'key_questions':['Who\x20writes\x20the\x20rider\x20roster\x20(permission\x20221)\x20—\x20is\x20that\x20admission\x20power\x20disclosed,\x20and\x20is\x20the\x20roster\x20budget\x20(60\x20rosters\x20/\x2080\x20addresses\x20per\x20Progress)\x20respected?','Does\x20settlement\x20depart\x20a\x20SERIAL\x20claim\x20window\x20(TPL-09)\x20with\x20settle_hours\x20>=\x20claim_window_hours,\x20so\x20no\x20payout\x20can\x20race\x20an\x20open\x20dispute\x20(FACT-ALLOC-03)?','Are\x20handover\x20records\x20(ready/pickup/deliver)\x20writer-bound\x20repository\x20rows,\x20and\x20is\x20the\x20buyer-facing\x20copy\x20honest\x20that\x20dispatch,\x20ETA\x20and\x20rider\x20pay\x20are\x20OFF-CHAIN?']},'capabilities_used':['permission.index_create','permission.role_assign','guard.validate_buy','guard.validate_wip_hash','machine.node_topology','treasury.owner_receive','allocation.distribute','service.publish','progress.advance','progress.named_operator','arb.vote_weighted','contact.im_create'],'config_overrides':{'machine':{'wip_required':!![],'confirm_gate':!![],'refund_requires_approval':![]},'service':{'multi_recipient_allocation':!![]}},'expected_benefits':[{'metric':'Silent-buyer\x20stranding','expected_value':'0','evidence':'buyer-first\x20confirmation\x20+\x20keeper\x20auto-confirm\x20within\x20auto_confirm_hours\x20(T-04)'},{'metric':'Payout/claim\x20race','expected_value':'unreachable','evidence':'the\x20serial\x20claim\x20window\x20makes\x20settlement\x20depart\x20only\x20after\x20filing\x20closes\x20(TPL-09)'},{'metric':'Rider\x20money-surface','expected_value':'0\x20legs','evidence':'the\x20escrow\x20can\x20never\x20pay\x20a\x20per-order\x20rider\x20(for_object\x20lock);\x20payroll\x20is\x20the\x20platform\x27s\x20off-chain\x20duty'}],'risk_appetite':'balanced','risk_constraints':{'require_arbitration':!![],'require_compensation_fund':![],'require_wip_evidence':!![],'other_constraints':['rider\x20roster\x20=\x20rider-admission\x20power;\x20disclose\x20the\x20roster\x20writer\x20(NAMED_OPERATOR_ROSTER_UNDISCLOSED)','settle_hours\x20>=\x20claim_window_hours\x20asserted\x20at\x20generation\x20(serial\x20window\x20math)','🔴\x20rider\x20pay\x20is\x20OFF-CHAIN\x20platform\x20payroll\x20—\x20never\x20model\x20a\x20per-order\x20rider\x20payout\x20leg','🔴\x20no\x20ETA/distance\x20oracle\x20—\x20pricing\x20and\x20delivery\x20estimates\x20are\x20not\x20chain-verifiable']},'applicable_conditions':{'business_scale':'small','min_daily_orders':0x1,'other_conditions':['Local\x20fulfillment\x20within\x20minutes-hours\x20windows\x20(perishable\x20or\x20time-boxed)','Per-order\x20dispatched\x20fulfillers\x20(no\x20fixed\x20staff\x20roster)','Fee-graded\x20cancellation\x20(free\x20pre-acceptance,\x20fee\x20post-acceptance)']},'similar_industries':['retail','group_buy'],'novel_capabilities':['Named-operator\x20roster\x20rail\x20for\x20per-order\x20dispatched\x20riders\x20(K-1)','Serial\x20claim\x20window\x20on\x20hours-scale\x20timing\x20(TPL-09)','Fee-graded\x20cancel\x20taxonomy\x20with\x20a\x20dedicated\x20kill\x20terminal']},{'name':'group_buy','display_name':'Community\x20Group-Buy','version':'v1','source':'builtin',...fetchTemplate('group_buy'),'analyze':{'key_questions':['Is\x20the\x20batch\x20cutoff\x20ONE\x20shared\x20absolute\x20timestamp\x20(keeper-written\x20Repository\x20row\x20+\x20time_source\x20oracle),\x20not\x20a\x20per-order\x20entry+duration\x20lock?','Does\x20the\x20leader\x20template\x20fix\x20the\x20supplier\x27s\x20sub-service\x20address\x20in\x20the\x20ConsolidateBatch\x20guard\x20table\x20(b_submission\x20false,\x20Address)\x20so\x20the\x20procurement\x20graph\x20is\x20diligence-able\x20before\x20any\x20buyer\x20pays?','In\x20threshold\x20mode,\x20are\x20contribution\x20rows\x20ORDER-keyed\x20with\x20the\x20escrow-bound\x20aggregate\x20(per-row\x20min(row,\x20order.amount,\x20live\x20allocation.balance\x20—\x20v139\x20live\x20cap))\x20and\x20the\x20live-escrow\x20+\x20claimed_by-false\x20legs\x20—\x20the\x20three\x20CROWDFUNDING_*\x20blockers\x20armed?']},'capabilities_used':['permission.index_create','permission.role_assign','guard.validate_buy','guard.validate_wip_hash','machine.node_topology','treasury.owner_receive','allocation.distribute','service.publish','progress.advance','progress.named_operator','repository.data_write','arb.vote_weighted','contact.im_create'],'config_overrides':{'machine':{'wip_required':!![],'confirm_gate':!![],'refund_requires_approval':![]},'service':{'multi_recipient_allocation':!![]}},'expected_benefits':[{'metric':'Cutoff\x20fairness','expected_value':'1\x20clock','evidence':'one\x20absolute\x20shared\x20cutoff\x20per\x20batch\x20(time_lock_absolute),\x20never\x20per-order\x20entry+duration'},{'metric':'Unformed-batch\x20refund','expected_value':'automatic','evidence':'ThresholdMissed\x20/\x20AbandonTimeout\x20rails\x20refund\x20per-order\x20with\x20no\x20merchant\x20grace'},{'metric':'Procurement\x20diligence','expected_value':'pre-order','evidence':'the\x20supplier\x20sub-service\x20address\x20is\x20a\x20fixed\x20guard-table\x20promise\x20(leader\x20shape)'}],'risk_appetite':'conservative','risk_constraints':{'require_arbitration':!![],'require_compensation_fund':!![],'require_wip_evidence':!![],'other_constraints':['batch\x20cutoff\x20=\x20shared\x20ABSOLUTE\x20timestamp\x20via\x20pattern.time_lock_absolute\x20+\x20time_source_repository_oracle','threshold\x20mode\x20reuses\x20the\x20crowdfunding\x20construction\x20(ORDER-keyed\x20rows,\x20escrow-bound\x20aggregate,\x20CROWDFUNDING_*\x20blockers)','🔴\x20multi-level\x20commission\x20is\x20NOT\x20expressible\x20—\x20single-layer\x20rate\x20leg\x20to\x20the\x20platform\x20Entity\x20with\x20off-chain\x20pass-through,\x20disclosed','🔴\x20delay\x20compensation\x20pays\x20from\x20compensation_fund,\x20NEVER\x20the\x20buyer\x20escrow\x20(Order\x20binds\x20<=\x201\x20allocator);\x20fund\x20pre-locked\x203x\x20(B2)']},'applicable_conditions':{'business_scale':'small','min_daily_orders':0x1,'other_conditions':['Neighborhood\x20batch\x20buying\x20with\x20a\x20daily/periodic\x20cutoff','Pickup-point\x20fulfillment\x20(staffed\x20point\x20or\x20automated\x20locker)','Leader\x20consolidation\x20ahead\x20of\x20a\x20supplier\x20sub-order']},'similar_industries':['crowdfunding','delivery'],'novel_capabilities':['Shared\x20absolute\x20batch\x20cutoff\x20via\x20keeper-written\x20Repository\x20row\x20+\x20time-source\x20oracle','Supply-chain\x20suborder\x20commitment\x20in\x20the\x20guard\x20table\x20(pre-order\x20diligence)','point_type-conditional\x20pickup\x20topology\x20(staffed\x20leader\x20rail\x20vs\x20automated\x20locker)']},{'name':'general','display_name':'General','version':'v1','source':'builtin',...fetchTemplate('general'),'analyze':{'key_questions':['Which\x20trust\x20mechanisms\x20(arbitration,\x20compensation\x20fund,\x20WIP\x20evidence)\x20are\x20missing\x20here,\x20and\x20what\x20does\x20each\x20absence\x20cost\x20in\x20the\x20worst\x20case?','What\x20is\x20the\x20single\x20point\x20of\x20failure\x20—\x20who\x20can\x20unilaterally\x20take\x20funds\x20or\x20stall\x20the\x20workflow?']},'capabilities_used':['permission.index_create','machine.node_topology','treasury.owner_receive','allocation.distribute','service.publish','progress.advance'],'expected_benefits':[{'metric':'Flexibility','expected_value':'100%','evidence':'User\x20customizes\x20all\x20trust\x20mechanism\x20parameters'},{'metric':'Degraded\x20safety','expected_value':'usable','evidence':'Can\x20fall\x20back\x20to\x20general\x20at\x20any\x20time'}],'risk_appetite':'balanced','risk_constraints':{'require_arbitration':![],'require_compensation_fund':![],'require_wip_evidence':![]},'applicable_conditions':{'business_scale':'small','other_conditions':['Fallback\x20degraded\x20mode','Hybrid\x20scenarios\x20not\x20covered\x20by\x20other\x20industries']},'similar_industries':[],'novel_capabilities':[],'disabled_builtin_constraints':['require_arbitration','require_compensation_fund','require_wip_evidence']}];
|
|
1
|
+
import{getScenarioMode}from'../knowledge/scenario-modes.js';import{BUILTIN_TEMPLATES}from'../knowledge/builtin-templates.js';import{getIndustryTraits}from'../knowledge/industry-registry.js';import{getIndustryRiskChecks,getIndustryNeeds}from'../customer/index.js';import{SUPPORTED_INDUSTRIES}from'../customer/user-preferences.js';import{getFlywheelForIndustry}from'../knowledge/acquisition-flywheel.js';const GENERAL_TRAITS={'has_logistics':![],'communication_heavy':![],'pure_digital':![],'long_cycle':![],'deposit_required':![],'multi_tier_allocation':![],'regulatory_intensity':'low','trust_sensitivity':'medium','consumption_frequency':'occasional','avg_ticket_size':'medium'},GENERAL_FLYWHEEL={'industry':'general','trustSellingPoints':[],'keyActions':[],'rewardStrategy':'User-defined','discountStrategy':'User-defined','trustDescription':'User-defined\x20trust\x20mechanism'},GENERAL_MACHINE_SHAPE=[{'name':'paid','role':'Entry:\x20order\x20created\x20and\x20paid'},{'name':'delivering','role':'Service\x20delivery\x20in\x20progress'},{'name':'delivered','role':'Deliverable\x20available\x20for\x20review'},{'name':'completed','role':'Service\x20completed,\x20funds\x20released'},{'name':'cancelled','role':'Pre-delivery\x20cancellation\x20—\x20triggers\x20refund\x20Allocator','operator':'order_payer'}],GENERAL_ALLOCATOR={'recipient':'signer','count':0x1,'mode':'surplus','description':'Default:\x20surplus\x20to\x20service\x20owner\x20(general\x20fallback)'},RETAIL_D2C_MACHINE_SHAPE=[{'name':'ordered','role':'Entry:\x20order\x20created\x20(funds\x20escrowed\x20in\x20Allocation)'},{'name':'shipped','role':'Merchant\x20ships\x20goods'},{'name':'delivered','role':'Goods\x20delivered\x20to\x20buyer'},{'name':'completed','role':'Buyer\x20confirms\x20receipt\x20—\x20withdraw_guard\x20releases\x20funds','operator':'order_payer'},{'name':'cancelled','role':'Pre-ship\x20cancellation\x20—\x20refund_guard\x20refunds\x20buyer','operator':'order_payer'}],RETAIL_D2C_GUARDS=[{'template_id':'withdraw_guard_delivery','host':'service','purpose':'Release\x20funds\x20to\x20merchant\x20+\x20processor\x20on\x20order\x20completion\x20(delivery\x20confirmation)'},{'template_id':'refund_guard_cancellation','host':'service','purpose':'Refund\x20100%\x20to\x20buyer\x20on\x20order\x20cancellation'}],RETAIL_D2C_ALLOCATOR={'recipient':'entity','count':0x2,'mode':'rate','description':'Merchant\x2097%\x20+\x20Processor\x203%\x20(rate-based\x20split,\x20no\x20platform\x20commission)'},RETAIL_D2C_KEY_RISK='No\x20platform\x20arbitration\x20—\x20disputes\x20rely\x20on\x20optional\x20Arbitration\x20or\x20off-chain\x20chargeback',RETAIL_D2C_BUILD_NOTES=['Allocation\x20escrow\x20replaces\x20platform\x20custody\x20—\x20funds\x20locked\x20in\x20contract\x20until\x20Guard\x20releases','withdraw_guard\x20enforces\x20delivery\x20gate\x20—\x20merchant\x20must\x20reach\x20\x27completed\x27\x20state\x20to\x20receive\x20payment','refund_guard\x20ensures\x20100%\x20refund\x20on\x20cancellation\x20—\x20no\x20merchant\x20approval\x20needed','No\x20buy_guard\x20needed\x20—\x20D2C\x20doesn\x27t\x20gate\x20purchases\x20(open\x20storefront)','Arbitration\x20is\x20optional\x20—\x20add\x20when\x20dispute\x20volume\x20justifies\x20the\x20cost','Service\x20↔\x20Guard\x20circular\x20dependency:\x20create\x20Service\x20(unpublished)\x20→\x20create\x20Guards\x20→\x20update\x20Service\x20(publish)'],SUPPORTED_INDUSTRY_SET=new Set([...SUPPORTED_INDUSTRIES,'retail_d2c']);function fetchTemplate(a){const b=a==='retail_d2c'?'retail':a,c=getIndustryTraits(b)??GENERAL_TRAITS,d=SUPPORTED_INDUSTRY_SET['has'](a),e=a==='retail_d2c'?'retail':a,f=d?getIndustryRiskChecks(e):[],g=d?getIndustryNeeds(e):[],h=getFlywheelForIndustry(b)??GENERAL_FLYWHEEL;let i,j,k,l,m;if(a==='retail_d2c')i=RETAIL_D2C_MACHINE_SHAPE,j=RETAIL_D2C_GUARDS,k=RETAIL_D2C_ALLOCATOR,l=RETAIL_D2C_KEY_RISK,m=RETAIL_D2C_BUILD_NOTES;else{if(a==='general'){const n=getScenarioMode('general');i=GENERAL_MACHINE_SHAPE,j=[],k=GENERAL_ALLOCATOR,l=n?.['key_risk']??'No\x20safety\x20net\x20—\x20user\x20must\x20design\x20all\x20trust\x20mechanisms\x20manually',m=n?.['build_notes'];}else{const o=getScenarioMode(a);if(!o)throw new Error('No\x20scenario\x20mode\x20found\x20for\x20industry:\x20'+a);const p=BUILTIN_TEMPLATES['find'](q=>q['id']===o['default_template']);if(!p)throw new Error('Mode\x20\x27'+a+'\x27\x20default_template\x20\x27'+o['default_template']+'\x27\x20is\x20not\x20in\x20the\x20builtin\x20template\x20catalog');i=p['machine_shape'],j=p['guards'],k=p['allocator'],l=o['key_risk'],m=o['build_notes'];}}return{'traits':c,'risk_checks':f,'needs':g,'flywheel':h,'machine_shape':i,'guards':j,'allocator':k,'key_risk':l,'build_notes':m};}export const BUILTIN_MODES=[{'name':'freelance','display_name':'Freelance','version':'v1','source':'builtin',...fetchTemplate('freelance'),'analyze':{'key_questions':['Are\x20WIP\x20hashes\x20bound\x20to\x20each\x20milestone,\x20so\x20delivery\x20evidence\x20cannot\x20be\x20substituted\x20after\x20acceptance?','Does\x20the\x20acceptance\x20gate\x20have\x20a\x20time-bounded\x20escape\x20(keeper-driven\x20auto-accept),\x20or\x20can\x20a\x20silent\x20buyer\x20hold\x20the\x20provider\x27s\x20funds\x20hostage\x20indefinitely?']},'capabilities_used':['permission.index_create','permission.role_assign','guard.validate_buy','guard.validate_wip_hash','machine.node_topology','treasury.owner_receive','allocation.distribute','allocation.distribute_milestone','service.publish','progress.advance','arb.vote_weighted','contact.im_create'],'config_overrides':{'service':{'setting_lock_duration':'30d','engagement_type':'milestone'},'machine':{'wip_required':!![],'wip_hash_algorithm':'sha256','acceptance_gate':!![]}},'expected_benefits':[{'metric':'Dispute\x20rate\x20reduction','expected_value':'40%','evidence':'WIP\x20hash\x20+\x20milestone\x20allocation\x20enforces\x20delivery\x20evidence'},{'metric':'Delivery\x20confirmation\x20efficiency','expected_value':'+50%','evidence':'acceptance\x20gate\x20automates\x20acceptance\x20workflow'},{'metric':'Provider\x20payment\x20assurance','expected_value':'100%','evidence':'Funds\x20auto-release\x20to\x20provider\x20after\x20accepted\x20node'}],'risk_appetite':'balanced','risk_constraints':{'require_arbitration':!![],'require_compensation_fund':![],'require_wip_evidence':!![],'other_constraints':['setting_lock_duration\x20>=\x207d\x20to\x20lock\x20engagement-period\x20rules','Acceptance\x20timeout\x20=\x20the\x20template\x27s\x20escrow_release_days\x20(single\x20source:\x20fee_params,\x20override\x20via\x20fee_overrides).\x20Mechanism:\x20dual-branch\x20time-gated\x20forward\x20(pattern.time_lock_progress\x20anchored\x20on\x20the\x20delivered\x20entry);\x20a\x20keeper\x20advances\x20the\x20timeout\x20path.\x20adminUnhold\x20(224)\x20is\x20ONLY\x20the\x20hold-release\x20escape\x20hatch,\x20never\x20the\x20timeout\x20mechanism.']},'applicable_conditions':{'business_scale':'small','min_daily_orders':0x1,'other_conditions':['Suitable\x20for\x20mid-to-long-term\x20project\x20delivery','Requires\x20milestone-based\x20phased\x20acceptance']},'similar_industries':['rental','education'],'novel_capabilities':['allocation.distribute_milestone'],'disabled_builtin_constraints':['require_compensation_fund']},{'name':'rental','display_name':'Rental','version':'v1','source':'builtin',...fetchTemplate('rental'),'analyze':{'key_questions':['Is\x20the\x20deposit\x20escrowed\x20on-chain\x20and\x20sized\x20against\x20the\x20item\x27s\x20full\x20replacement\x20value,\x20not\x20just\x20the\x20rental\x20fee?','Are\x20pre-handover\x20and\x20post-return\x20WIP\x20states\x20hash-recorded,\x20so\x20damage\x20attribution\x20is\x20provable\x20rather\x20than\x20asserted?']},'capabilities_used':['permission.index_create','permission.role_assign','guard.validate_buy','guard.validate_wip_hash','machine.node_topology','treasury.owner_receive','allocation.distribute','service.publish','progress.advance','arb.vote_weighted','contact.im_create'],'config_overrides':{'treasury':{'deposit_escrow':!![],'deposit_deductible':!![]},'machine':{'wip_required':!![],'wip_stages':['handover_out','returned'],'inspection_gate':!![]}},'expected_benefits':[{'metric':'Deposit\x20dispute\x20rate','expected_value':'-60%','evidence':'pre-rental\x20WIP\x20mandatorily\x20records\x20item\x27s\x20original\x20state'},{'metric':'Damage\x20liability\x20accuracy','expected_value':'+70%','evidence':'pre/post\x20WIP\x20hash\x20comparison\x20eliminates\x20unfounded\x20deductions'},{'metric':'Trust\x20score','expected_value':'+25%','evidence':'compensation_fund\x20covers\x20damage\x20risk'}],'risk_appetite':'conservative','risk_constraints':{'require_arbitration':!![],'require_compensation_fund':!![],'require_wip_evidence':!![],'max_single_transaction':0x2710,'compensation_fund_coverage_ratio':0xa,'other_constraints':['Deposit\x20must\x20be\x20escrowed\x20(no\x20direct\x20transfer)','lock_duration\x20>=\x207d\x20to\x20prevent\x20arbitrary\x20merchant\x20withdrawal']},'applicable_conditions':{'business_scale':'small','min_daily_orders':0x1,'other_conditions':['Requires\x20physical\x20item\x20handover','Has\x20logistics\x20or\x20offline\x20delivery\x20leg']},'similar_industries':['retail','travel'],'novel_capabilities':[]},{'name':'education','display_name':'Education','version':'v1','source':'builtin',...fetchTemplate('education'),'analyze':{'key_questions':['Does\x20tuition\x20release\x20per\x20attended\x20session\x20(Progress\x20node),\x20so\x20undelivered\x20sessions\x20stay\x20refundable\x20if\x20the\x20institution\x20disappears?','Does\x20setting_lock_duration\x20span\x20the\x20full\x20term,\x20so\x20the\x20institution\x20cannot\x20tighten\x20refund\x20rules\x20mid-course?']},'capabilities_used':['permission.index_create','permission.role_assign','guard.validate_buy','guard.validate_wip_hash','machine.node_topology','treasury.owner_receive','allocation.distribute','allocation.distribute_milestone','service.publish','progress.advance','arb.vote_weighted','contact.im_create'],'config_overrides':{'allocation':{'strategy':{'recipient':'entity','count':0x1,'mode':'amount','description':'1/N\x20of\x20tuition\x20released\x20per\x20session\x20attendance'},'session_threshold':!![]},'service':{'setting_lock_duration':'120d','anti_runaway':!![]}},'expected_benefits':[{'metric':'Refund\x20dispute\x20rate','expected_value':'-50%','evidence':'per-session\x20release\x20distributes\x20tuition\x20by\x20class'},{'metric':'Institution\x20runaway\x20risk','expected_value':'eliminated','evidence':'Funds\x20release\x20per\x20session;\x20undelivered\x20portion\x20is\x20refundable'},{'metric':'Attendance\x20traceability','expected_value':'100%','evidence':'attendance_guard\x20signs\x20each\x20session'}],'risk_appetite':'conservative','risk_constraints':{'require_arbitration':!![],'require_compensation_fund':!![],'require_wip_evidence':![],'other_constraints':['setting_lock_duration\x20covers\x20the\x20entire\x20term\x20(>=90d)','Long-cycle\x20projects\x20must\x20monitor\x20>90d\x20progress']},'applicable_conditions':{'business_scale':'medium','min_daily_orders':0x1,'other_conditions':['Long-cycle\x20delivery','Requires\x20per-session\x20acceptance','Regulatory\x20intensity:\x20medium']},'similar_industries':['freelance','subscription'],'novel_capabilities':['allocation.distribute_milestone'],'disabled_builtin_constraints':['require_wip_evidence']},{'name':'travel','display_name':'Travel','version':'v1','source':'builtin',...fetchTemplate('travel'),'analyze':{'key_questions':['Does\x20each\x20itinerary\x20segment\x20have\x20its\x20own\x20guard\x20and\x20WIP\x20acceptance,\x20so\x20one\x20failed\x20leg\x20is\x20refundable\x20without\x20unwinding\x20the\x20whole\x20trip?','Is\x20the\x20multi-tier\x20allocation\x20waterfall\x20(agency\x20→\x20hotel/guide/driver)\x20visible\x20on-chain,\x20so\x20the\x20agency\x20cannot\x20silently\x20re-split\x20funds?']},'capabilities_used':['permission.index_create','permission.role_assign','guard.validate_buy','guard.validate_wip_hash','machine.node_topology','treasury.owner_receive','allocation.distribute','service.publish','progress.advance','arb.vote_weighted','contact.im_create'],'config_overrides':{'allocation':{'strategy':{'recipient':'entity','count':0x3,'mode':'amount','description':'Deposit\x2020%\x20to\x20agency,\x20final\x2080%\x20to\x20agency,\x20then\x20agency-side\x20Allocation\x20splits\x20to\x20hotel/guide/driver\x20per\x20segment'},'multi_tier_waterfall':!![],'guard_chaining':!![]},'service':{'supply_chain_suborders':!![],'segment_guard_required':!![]}},'expected_benefits':[{'metric':'Fund\x20transparency','expected_value':'100%','evidence':'multi-tier\x20allocation\x20splits\x20per\x20segment\x20to\x20hotel/guide/driver'},{'metric':'Itinerary\x20change\x20disputes','expected_value':'-45%','evidence':'segment\x20WIP\x20accepts\x20each\x20leg'},{'metric':'Breach\x20compensation\x20assurance','expected_value':'+60%','evidence':'compensation_fund\x20covers\x20itinerary\x20breach'}],'risk_appetite':'balanced','risk_constraints':{'require_arbitration':!![],'require_compensation_fund':!![],'require_wip_evidence':!![],'other_constraints':['Multi-tier\x20allocation\x20requires\x20guard\x20chaining\x20validation','deposit\x2020%\x20+\x20final\x2080%\x20two-stage\x20payment']},'applicable_conditions':{'business_scale':'medium','min_daily_orders':0x1,'other_conditions':['Multi-segment\x20itinerary\x20combination','Requires\x20hotel/guide/driver\x20multi-party\x20allocation']},'similar_industries':['rental','education'],'novel_capabilities':[]},{'name':'subscription','display_name':'Subscription','version':'v1','source':'builtin',...fetchTemplate('subscription'),'analyze':{'key_questions':['Is\x20every\x20periodic\x20charge\x20gated\x20by\x20an\x20explicit\x20user\x20confirmation,\x20with\x20no\x20auto-renew\x20default?','Can\x20the\x20subscriber\x20cancel\x20anytime\x20effective\x20next\x20period,\x20without\x20a\x20dead-end\x20node\x20in\x20the\x20machine?']},'capabilities_used':['permission.index_create','permission.role_assign','guard.validate_buy','machine.node_topology','treasury.owner_receive','allocation.distribute','service.publish','progress.advance','arb.vote_weighted','reward.claim_guard','contact.im_create'],'config_overrides':{'machine':{'no_auto_renew_trap':!![],'user_confirmed_charge':!![],'cancel_anytime':!![],'next_period_effective':!![]},'service':{'creator_data_subscription':!![],'periodic_billing':!![]}},'expected_benefits':[{'metric':'Renewal\x20rate','expected_value':'+25%','evidence':'loyalty\x20reward\x20+\x20transparent\x20subscription\x20mechanism'},{'metric':'Cancellation\x20disputes','expected_value':'eliminated','evidence':'cancel\x20anytime\x20+\x20no\x20auto-renew\x20trap'},{'metric':'Creator\x20retention','expected_value':'+30%','evidence':'deliver_guard_wip\x20prevents\x20content\x20dropout'}],'risk_appetite':'aggressive','risk_constraints':{'require_arbitration':![],'require_compensation_fund':![],'require_wip_evidence':![],'compensation_fund_coverage_ratio':0x3,'other_constraints':['Forbid\x20dead-end\x20nodes\x20(prevent\x20lock-in)','charge_guard\x20requires\x20user\x20confirmation\x20each\x20period']},'applicable_conditions':{'business_scale':'small','min_daily_orders':0x5,'other_conditions':['Pure-digital\x20delivery','Periodic\x20content\x20or\x20SaaS\x20service']},'similar_industries':['freelance','education'],'novel_capabilities':[],'disabled_builtin_constraints':['require_arbitration','require_compensation_fund','require_wip_evidence']},{'name':'retail','display_name':'Retail','version':'v1','source':'builtin',...fetchTemplate('retail'),'analyze':{'key_questions':['Is\x20the\x20logistics\x20tracking\x20number\x20recorded\x20as\x20WIP\x20before\x20the\x20confirm\x20gate,\x20so\x20receipt\x20disputes\x20have\x20carrier\x20evidence?','Is\x20the\x20refund\x20window\x20at\x20least\x207\x20days\x20with\x20an\x20on-chain\x20refund\x20path\x20that\x20does\x20not\x20rely\x20on\x20merchant\x20goodwill?']},'capabilities_used':['permission.index_create','permission.role_assign','guard.validate_buy','guard.validate_wip_hash','machine.node_topology','treasury.owner_receive','allocation.distribute','service.publish','progress.advance','arb.vote_weighted','reward.claim_guard','contact.im_create'],'config_overrides':{'machine':{'wip_required':!![],'wip_field':'tracking_number','confirm_gate':!![],'refund_requires_approval':!![]},'service':{'first_order_discount':!![]}},'expected_benefits':[{'metric':'Return\x20dispute\x20rate','expected_value':'-35%','evidence':'logistics\x20WIP\x20+\x20refund\x20path\x20assurance'},{'metric':'Repurchase\x20rate','expected_value':'+20%','evidence':'spend\x20cashback\x20reward'},{'metric':'Product\x20authenticity\x20traceability','expected_value':'100%','evidence':'WIP\x20verifies\x20product/logistics\x20info'}],'risk_appetite':'conservative','risk_constraints':{'require_arbitration':!![],'require_compensation_fund':!![],'require_wip_evidence':![],'compensation_fund_coverage_ratio':0x5,'other_constraints':['refund_window\x20>=\x207d','confirm_gate:\x20only\x20buyer\x20can\x20confirm\x20receipt']},'applicable_conditions':{'business_scale':'medium','min_daily_orders':0xa,'other_conditions':['Has\x20logistics\x20shipping\x20leg','High-frequency\x20small-ticket\x20transactions']},'similar_industries':['rental','subscription'],'novel_capabilities':[],'disabled_builtin_constraints':['require_wip_evidence']},{'name':'retail_d2c','display_name':'Retail\x20D2C\x20(Direct-to-Consumer)','version':'v1','source':'builtin',...fetchTemplate('retail_d2c'),'analyze':{'key_questions':['Do\x20withdraw_guard\x20and\x20refund_guard\x20fully\x20enclose\x20the\x20Allocation\x20escrow,\x20so\x20neither\x20side\x20can\x20move\x20funds\x20outside\x20the\x20contract\x20path?','With\x20no\x20platform\x20arbitration,\x20what\x20off-chain\x20recourse\x20(if\x20any)\x20backs\x20a\x20delivery\x20failure\x20—\x20and\x20is\x20that\x20acceptable\x20for\x20the\x20ticket\x20size?']},'capabilities_used':['permission.index_create','permission.role_assign','guard.validate_withdraw','guard.validate_refund','machine.node_topology','allocation.distribute','service.publish','progress.advance','contact.im_create'],'config_overrides':{'machine':{'wip_required':![],'confirm_gate':!![],'refund_requires_approval':![]},'service':{'multi_recipient_allocation':!![]}},'expected_benefits':[{'metric':'Merchant\x20revenue\x20share','expected_value':'97%','evidence':'No\x20platform\x20commission\x20—\x20only\x203%\x20processing\x20fee'},{'metric':'Fund\x20safety','expected_value':'contract-grade','evidence':'Allocation\x20escrow\x20+\x20Guard\x20verification\x20replaces\x20platform\x20custody'},{'metric':'Delivery\x20reliability','expected_value':'high','evidence':'withdraw_guard\x20enforces\x20delivery\x20confirmation\x20before\x20payment'}],'risk_appetite':'balanced','risk_constraints':{'require_arbitration':![],'require_compensation_fund':![],'require_wip_evidence':![],'other_constraints':['Allocation\x20escrow\x20required\x20(withdraw_guard\x20+\x20refund_guard)','Service\x20↔\x20Guard\x20circular\x20dependency\x20requires\x203-step\x20creation\x20pattern']},'applicable_conditions':{'business_scale':'small','min_daily_orders':0x1,'other_conditions':['Independent\x20storefront\x20(no\x20marketplace)','Merchant-managed\x20logistics','Allocation\x20escrow\x20model']},'similar_industries':['retail','subscription'],'novel_capabilities':['Allocation\x20escrow\x20as\x20platform-custody\x20alternative','Multi-recipient\x20allocation\x20(merchant\x20+\x20processor)'],'disabled_builtin_constraints':['require_arbitration','require_compensation_fund','require_wip_evidence']},{'name':'licensing','display_name':'Licensing','version':'v1','source':'builtin',...fetchTemplate('licensing'),'analyze':{'key_questions':['Is\x20the\x20license\x20grant\x20(terms\x20+\x20asset/certificate\x20hash)\x20anchored\x20as\x20a\x20WIP\x20artifact\x20and\x20an\x20evidence\x20Repository\x20row\x20BEFORE\x20release,\x20so\x20a\x20misrepresentation\x20dispute\x20has\x20an\x20on-chain\x20artifact\x20to\x20read?','Does\x20the\x20release\x20split\x20sum\x20to\x20exactly\x2010000\x20bps\x20across\x20explicit\x20NON-EMPTY\x20rights-holder\x20Entities\x20(no\x20empty\x20Entity\x20routing\x20the\x20share\x20to\x20the\x20deployer,\x20no\x20Surplus\x20draining\x20the\x20pool)?','Are\x20the\x20chain\x20GAPs\x20disclosed\x20honestly\x20—\x20the\x20auction\x20resolved\x20OFF-chain\x20(no\x20bid\x20ledger)\x20and\x20usage\x20caps\x20enforced\x20as\x20attested-counter\x20arbitration\x20evidence\x20(no\x20metering\x20oracle),\x20never\x20as\x20chain-enforced\x20limits?']},'capabilities_used':['permission.index_create','permission.role_assign','guard.validate_buy','guard.validate_wip_hash','machine.node_topology','treasury.owner_receive','allocation.distribute','service.publish','progress.advance','arb.vote_weighted','contact.im_create'],'config_overrides':{'machine':{'wip_required':!![],'confirm_gate':!![],'refund_requires_approval':!![]},'service':{'multi_recipient_allocation':!![]}},'expected_benefits':[{'metric':'Royalty-split\x20transparency','expected_value':'100%','evidence':'every\x20rights-holder\x20share\x20is\x20an\x20on-chain\x20Rate\x20leg\x20the\x20buyer\x20can\x20audit\x20before\x20ordering'},{'metric':'Misrepresentation\x20dispute\x20rate','expected_value':'-40%','evidence':'inspection-window\x20escrow\x20+\x20grant-artifact\x20WIP\x20anchor\x20the\x20terms\x20before\x20release'},{'metric':'Settlement\x20latency','expected_value':'seconds','evidence':'release\x20fires\x20on\x20buyer\x20accept\x20/\x20time-lock,\x20not\x20a\x20calendar\x20freeze'}],'risk_appetite':'conservative','risk_constraints':{'require_arbitration':!![],'require_compensation_fund':!![],'require_wip_evidence':!![],'other_constraints':['release\x20split\x20Rate\x20legs\x20sum\x20exactly\x2010000\x20(ERATE_NOT_10000);\x20every\x20recipient\x20an\x20explicit\x20NON-EMPTY\x20Entity','inspection/delivery\x20window\x20>=\x203d\x20so\x20the\x20buyer\x20can\x20verify\x20the\x20grant\x20before\x20auto-accept','🔴\x20auction\x20resolved\x20OFF-chain\x20(no\x20bid\x20ledger)\x20and\x20usage\x20caps\x20attested\x20(no\x20oracle)\x20—\x20disclosed,\x20never\x20chain-enforced']},'applicable_conditions':{'business_scale':'small','min_daily_orders':0x1,'other_conditions':['Pure-digital\x20grant\x20(no\x20logistics\x20leg)','Rights-holder\x20/\x20producer\x20/\x20publisher\x20owns\x20the\x20IP','Long-lived\x20value\x20(a\x20royalty\x20share\x20or\x20a\x20license\x20term)']},'similar_industries':['subscription','freelance'],'novel_capabilities':['Multi-recipient\x20royalty\x20split\x20(Allocation\x20Rate\x20plan)','Territory/qualification\x20allowlist\x20buy\x20gate','Inspection-window\x20escrow\x20before\x20release']},{'name':'crowdfunding','display_name':'Crowdfunding','version':'v1','source':'builtin',...fetchTemplate('crowdfunding'),'analyze':{'key_questions':['Is\x20each\x20contribution\x20escrowed\x20to\x20the\x20funder\x27s\x20OWN\x20Order\x20(for_object)\x20and\x20NEVER\x20pooled\x20via\x20balance::join,\x20so\x20per-backer\x20attribution\x20survives\x20settlement\x20or\x20refund?','Does\x20the\x20threshold\x20gate\x20read\x20a\x20WRITER-BOUND\x20Repository\x20numeric\x20row\x20(id_from\x20signer,\x20value\x20=\x20amount)\x20summed\x20via\x20the\x20sum-where\x20query,\x20ANDed\x20with\x20an\x20ABSOLUTE\x20shared\x20campaign\x20deadline\x20—\x20so\x20a\x20funder\x20cannot\x20inflate\x20the\x20total\x20and\x20every\x20backer\x20sees\x20the\x20same\x20cutoff?','Is\x20the\x20aggregate\x20total\x20disclosed\x20honestly\x20as\x20a\x20keeper-attested\x20Repository\x20sum\x20(arbitration\x20evidence,\x20NOT\x20a\x20chain-verified\x20money\x20oracle),\x20and\x20is\x20the\x20escrow-exit\x20two-leg\x20polarity\x20exact\x20(refund\x20claimed_by\x20some==false\x20XOR\x20recover_gate\x20claimed_by\x20some==true,\x20D-BUG-2)?']},'capabilities_used':['permission.index_create','permission.role_assign','guard.validate_buy','guard.validate_wip_hash','machine.node_topology','treasury.owner_receive','allocation.distribute','service.publish','progress.advance','arb.vote_weighted','contact.im_create'],'config_overrides':{'machine':{'wip_required':!![],'confirm_gate':!![],'refund_requires_approval':![]},'service':{'multi_recipient_allocation':!![]}},'expected_benefits':[{'metric':'Backer\x20attribution','expected_value':'100%','evidence':'each\x20contribution\x20is\x20a\x20for_object-bound\x20Allocation\x20on\x20the\x20funder\x27s\x20own\x20Order\x20—\x20never\x20pooled'},{'metric':'Unmet-threshold\x20refund','expected_value':'automatic','evidence':'the\x20sum-where\x20<\x20goal\x20leg\x20fires\x20the\x20refund\x20exit\x20with\x20no\x20merchant\x20approval\x20(D-BUG-2\x20polarity)'},{'metric':'Campaign\x20deadline\x20drift','expected_value':'0','evidence':'one\x20ABSOLUTE\x20Clock\x20timestamp\x20shared\x20by\x20every\x20funder,\x20not\x20per-order\x20entry+duration'}],'risk_appetite':'conservative','risk_constraints':{'require_arbitration':!![],'require_compensation_fund':!![],'require_wip_evidence':!![],'other_constraints':['per-contributor\x20Allocation\x20for_object\x20=\x20own\x20Order;\x20NEVER\x20balance::join\x20(attribution\x20survives)','threshold\x20gate\x20=\x20repository.data\x20sum-where\x20(1174)\x20over\x20WRITER-BOUND\x20rows\x20ANDed\x20with\x20an\x20ABSOLUTE\x20deadline','🔴\x20the\x20aggregate\x20total\x20is\x20a\x20keeper-attested\x20Repository\x20sum\x20(arbitration\x20evidence),\x20NOT\x20a\x20chain-verified\x20money\x20oracle\x20—\x20disclosed','🔴\x20L-01\x20never\x20promises\x20investment\x20returns\x20or\x20promotes\x20coin\x20price;\x20L-05\x20KYC/AML\x20+\x20cross-border\x20caution\x20(HIGH\x20regulatory\x20intensity)']},'applicable_conditions':{'business_scale':'small','min_daily_orders':0x1,'other_conditions':['Aggregate\x20funding\x20goal\x20with\x20a\x20fixed\x20campaign\x20deadline','Per-backer\x20reward\x20tiers\x20or\x20donation\x20(no\x20logistics\x20leg\x20required)','All-or-nothing\x20(refund\x20if\x20unmet)\x20or\x20keep-it-all\x20(no\x20refund)\x20campaign\x20shape']},'similar_industries':['retail','licensing'],'novel_capabilities':['Aggregate-goal\x20threshold\x20gate\x20via\x20writer-bound\x20Repository\x20sum-where','Per-contributor\x20for_object\x20escrow\x20(attribution-preserving,\x20never\x20pooled)','Absolute\x20shared\x20campaign\x20deadline\x20+\x20two-leg\x20escrow-exit\x20(release\x20XOR\x20refund)']},{'name':'delivery','display_name':'Local\x20Delivery','version':'v1','source':'builtin',...fetchTemplate('delivery'),'analyze':{'key_questions':['Who\x20writes\x20the\x20rider\x20roster\x20(permission\x20221)\x20—\x20is\x20that\x20admission\x20power\x20disclosed,\x20and\x20is\x20the\x20roster\x20budget\x20(60\x20rosters\x20/\x2080\x20addresses\x20per\x20Progress)\x20respected?','Does\x20settlement\x20depart\x20a\x20SERIAL\x20claim\x20window\x20(TPL-09)\x20with\x20settle_hours\x20>=\x20claim_window_hours,\x20so\x20no\x20payout\x20can\x20race\x20an\x20open\x20dispute\x20(FACT-ALLOC-03)?','Are\x20handover\x20records\x20(ready/pickup/deliver)\x20writer-bound\x20repository\x20rows,\x20and\x20is\x20the\x20buyer-facing\x20copy\x20honest\x20that\x20dispatch,\x20ETA\x20and\x20rider\x20pay\x20are\x20OFF-CHAIN?']},'capabilities_used':['permission.index_create','permission.role_assign','guard.validate_buy','guard.validate_wip_hash','machine.node_topology','treasury.owner_receive','allocation.distribute','service.publish','progress.advance','progress.named_operator','arb.vote_weighted','contact.im_create'],'config_overrides':{'machine':{'wip_required':!![],'confirm_gate':!![],'refund_requires_approval':![]},'service':{'multi_recipient_allocation':!![]}},'expected_benefits':[{'metric':'Silent-buyer\x20stranding','expected_value':'0','evidence':'buyer-first\x20confirmation\x20+\x20keeper\x20auto-confirm\x20within\x20auto_confirm_hours\x20(T-04)'},{'metric':'Payout/claim\x20race','expected_value':'unreachable','evidence':'the\x20serial\x20claim\x20window\x20makes\x20settlement\x20depart\x20only\x20after\x20filing\x20closes\x20(TPL-09)'},{'metric':'Rider\x20money-surface','expected_value':'0\x20legs','evidence':'the\x20escrow\x20can\x20never\x20pay\x20a\x20per-order\x20rider\x20(for_object\x20lock);\x20payroll\x20is\x20the\x20platform\x27s\x20off-chain\x20duty'}],'risk_appetite':'balanced','risk_constraints':{'require_arbitration':!![],'require_compensation_fund':![],'require_wip_evidence':!![],'other_constraints':['rider\x20roster\x20=\x20rider-admission\x20power;\x20disclose\x20the\x20roster\x20writer\x20(NAMED_OPERATOR_ROSTER_UNDISCLOSED)','settle_hours\x20>=\x20claim_window_hours\x20asserted\x20at\x20generation\x20(serial\x20window\x20math)','🔴\x20rider\x20pay\x20is\x20OFF-CHAIN\x20platform\x20payroll\x20—\x20never\x20model\x20a\x20per-order\x20rider\x20payout\x20leg','🔴\x20no\x20ETA/distance\x20oracle\x20—\x20pricing\x20and\x20delivery\x20estimates\x20are\x20not\x20chain-verifiable']},'applicable_conditions':{'business_scale':'small','min_daily_orders':0x1,'other_conditions':['Local\x20fulfillment\x20within\x20minutes-hours\x20windows\x20(perishable\x20or\x20time-boxed)','Per-order\x20dispatched\x20fulfillers\x20(no\x20fixed\x20staff\x20roster)','Fee-graded\x20cancellation\x20(free\x20pre-acceptance,\x20fee\x20post-acceptance)']},'similar_industries':['retail','group_buy'],'novel_capabilities':['Named-operator\x20roster\x20rail\x20for\x20per-order\x20dispatched\x20riders\x20(K-1)','Serial\x20claim\x20window\x20on\x20hours-scale\x20timing\x20(TPL-09)','Fee-graded\x20cancel\x20taxonomy\x20with\x20a\x20dedicated\x20kill\x20terminal']},{'name':'group_buy','display_name':'Community\x20Group-Buy','version':'v1','source':'builtin',...fetchTemplate('group_buy'),'analyze':{'key_questions':['Is\x20the\x20batch\x20cutoff\x20ONE\x20shared\x20absolute\x20timestamp\x20(keeper-written\x20Repository\x20row\x20+\x20time_source\x20oracle),\x20not\x20a\x20per-order\x20entry+duration\x20lock?','Does\x20the\x20leader\x20template\x20fix\x20the\x20supplier\x27s\x20sub-service\x20address\x20in\x20the\x20ConsolidateBatch\x20guard\x20table\x20(b_submission\x20false,\x20Address)\x20so\x20the\x20procurement\x20graph\x20is\x20diligence-able\x20before\x20any\x20buyer\x20pays?','In\x20threshold\x20mode,\x20are\x20contribution\x20rows\x20ORDER-keyed\x20with\x20the\x20escrow-bound\x20aggregate\x20(per-row\x20min(row,\x20order.amount,\x20live\x20allocation.balance\x20—\x20v140\x20live\x20cap))\x20and\x20the\x20live-escrow\x20+\x20claimed_by-false\x20legs\x20—\x20the\x20three\x20CROWDFUNDING_*\x20blockers\x20armed?']},'capabilities_used':['permission.index_create','permission.role_assign','guard.validate_buy','guard.validate_wip_hash','machine.node_topology','treasury.owner_receive','allocation.distribute','service.publish','progress.advance','progress.named_operator','repository.data_write','arb.vote_weighted','contact.im_create'],'config_overrides':{'machine':{'wip_required':!![],'confirm_gate':!![],'refund_requires_approval':![]},'service':{'multi_recipient_allocation':!![]}},'expected_benefits':[{'metric':'Cutoff\x20fairness','expected_value':'1\x20clock','evidence':'one\x20absolute\x20shared\x20cutoff\x20per\x20batch\x20(time_lock_absolute),\x20never\x20per-order\x20entry+duration'},{'metric':'Unformed-batch\x20refund','expected_value':'automatic','evidence':'ThresholdMissed\x20/\x20AbandonTimeout\x20rails\x20refund\x20per-order\x20with\x20no\x20merchant\x20grace'},{'metric':'Procurement\x20diligence','expected_value':'pre-order','evidence':'the\x20supplier\x20sub-service\x20address\x20is\x20a\x20fixed\x20guard-table\x20promise\x20(leader\x20shape)'}],'risk_appetite':'conservative','risk_constraints':{'require_arbitration':!![],'require_compensation_fund':!![],'require_wip_evidence':!![],'other_constraints':['batch\x20cutoff\x20=\x20shared\x20ABSOLUTE\x20timestamp\x20via\x20pattern.time_lock_absolute\x20+\x20time_source_repository_oracle','threshold\x20mode\x20reuses\x20the\x20crowdfunding\x20construction\x20(ORDER-keyed\x20rows,\x20escrow-bound\x20aggregate,\x20CROWDFUNDING_*\x20blockers)','🔴\x20multi-level\x20commission\x20is\x20NOT\x20expressible\x20—\x20single-layer\x20rate\x20leg\x20to\x20the\x20platform\x20Entity\x20with\x20off-chain\x20pass-through,\x20disclosed','🔴\x20delay\x20compensation\x20pays\x20from\x20compensation_fund,\x20NEVER\x20the\x20buyer\x20escrow\x20(Order\x20binds\x20<=\x201\x20allocator);\x20fund\x20pre-locked\x203x\x20(B2)']},'applicable_conditions':{'business_scale':'small','min_daily_orders':0x1,'other_conditions':['Neighborhood\x20batch\x20buying\x20with\x20a\x20daily/periodic\x20cutoff','Pickup-point\x20fulfillment\x20(staffed\x20point\x20or\x20automated\x20locker)','Leader\x20consolidation\x20ahead\x20of\x20a\x20supplier\x20sub-order']},'similar_industries':['crowdfunding','delivery'],'novel_capabilities':['Shared\x20absolute\x20batch\x20cutoff\x20via\x20keeper-written\x20Repository\x20row\x20+\x20time-source\x20oracle','Supply-chain\x20suborder\x20commitment\x20in\x20the\x20guard\x20table\x20(pre-order\x20diligence)','point_type-conditional\x20pickup\x20topology\x20(staffed\x20leader\x20rail\x20vs\x20automated\x20locker)']},{'name':'general','display_name':'General','version':'v1','source':'builtin',...fetchTemplate('general'),'analyze':{'key_questions':['Which\x20trust\x20mechanisms\x20(arbitration,\x20compensation\x20fund,\x20WIP\x20evidence)\x20are\x20missing\x20here,\x20and\x20what\x20does\x20each\x20absence\x20cost\x20in\x20the\x20worst\x20case?','What\x20is\x20the\x20single\x20point\x20of\x20failure\x20—\x20who\x20can\x20unilaterally\x20take\x20funds\x20or\x20stall\x20the\x20workflow?']},'capabilities_used':['permission.index_create','machine.node_topology','treasury.owner_receive','allocation.distribute','service.publish','progress.advance'],'expected_benefits':[{'metric':'Flexibility','expected_value':'100%','evidence':'User\x20customizes\x20all\x20trust\x20mechanism\x20parameters'},{'metric':'Degraded\x20safety','expected_value':'usable','evidence':'Can\x20fall\x20back\x20to\x20general\x20at\x20any\x20time'}],'risk_appetite':'balanced','risk_constraints':{'require_arbitration':![],'require_compensation_fund':![],'require_wip_evidence':![]},'applicable_conditions':{'business_scale':'small','other_conditions':['Fallback\x20degraded\x20mode','Hybrid\x20scenarios\x20not\x20covered\x20by\x20other\x20industries']},'similar_industries':[],'novel_capabilities':[],'disabled_builtin_constraints':['require_arbitration','require_compensation_fund','require_wip_evidence']}];
|
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(the\x20reward\x20pool\x20aborts\x20with\x206,\x20'+'the\x20allocation\x20pool\x20with\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(on-chain\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.'},'allocation_empty':{'error_code':'allocation_empty','strategy':'stop','max_attempts':0x1,'automation':'semi','detail':'The\x20Allocation\x20distributed\x20zero\x20value:\x20its\x20pool\x20is\x20empty\x20(already\x20fully\x20distributed,\x20or\x20the\x20order\x20total\x20was\x20discounted/couponed\x20to\x20zero)\x20—\x20a\x20legitimate\x20outcome\x20for\x20zero-total\x20orders.\x201.\x20Do\x20NOT\x20retry\x20the\x20allocation;\x20it\x20cannot\x20change\x20this.\x202.\x20If\x20funds\x20WERE\x20expected:\x20check\x20whether\x20the\x20order\x27s\x20payments\x20actually\x20funded\x20this\x20Allocation\x20before\x20the\x20rail\x20ran\x20(upstream\x20funding\x20problem),\x20and\x20verify\x20the\x20Payment\x20record\x20—\x20on\x20a\x20RETRIED\x20submission\x20the\x20FIRST\x20attempt\x20may\x20have\x20already\x20landed\x20(a\x20zero\x20balance\x20is\x20exactly\x20what\x20a\x20completed\x20distribution\x20looks\x20like,\x20F-M10).\x203.\x20The\x20chain\x20checks\x20the\x20balance\x20BEFORE\x20guard\x20evaluation,\x20so\x20this\x20abort\x20is\x20NOT\x20evidence\x20about\x20a\x20guard\x27s\x20verdict\x20—\x20never\x20conclude\x20\x27guard\x20rejected\x27\x20from\x20it','user_prompt':'The\x20allocation\x20pool\x20holds\x20nothing\x20to\x20distribute\x20(zero\x20total\x20or\x20already\x20fully\x20paid\x20out).\x20Verify\x20the\x20Payment\x20record\x20before\x20re-running\x20anything;\x20if\x20a\x20payout\x20was\x20expected,\x20the\x20pool\x20needs\x20funding\x20first.'},'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.'},'submission_too_large':{'error_code':'submission_too_large','strategy':'adjust_params','max_attempts':0x1,'automation':'manual','detail':'The\x20guard\x20submission\x27s\x20BCS\x20size\x20exceeded\x20MAX_SUBMISSION_SIZE=4096\x20(the\x20guard\x20submission-size\x20ceiling,\x20abort\x203;\x20v139\x20raised\x20it\x20from\x20256\x20so\x20a\x20100-address\x20roster\x20witness\x20fits)\x20—\x20the\x20whole\x20submission\x20struct,\x20not\x20the\x20guard-table\x20candidate\x20vector.\x201.\x20Move\x20roster/candidate\x20lists\x20OUT\x20of\x20the\x20witness:\x20sum_where/count_where\x20\x27ids\x27\x20accept\x20a\x20guard-table\x20VecAddress\x20entry\x20(cap\x20100\x20ids).\x202.\x20Keep\x20only\x20per-call\x20attestation\x20inline\x20—\x20a\x20100-address\x20roster\x20(100×32B\x20=\x203200B)\x20already\x20consumes\x20most\x20of\x20the\x20budget\x20once\x20the\x20protocol\x20slots\x20254/255\x20ride\x20along.\x203.\x20Split\x20the\x20verification\x20into\x20multiple\x20guards\x20if\x20more\x20inline\x20evidence\x20is\x20unavoidable.\x204.\x20Resubmit\x20with\x20the\x20shrunken\x20submission.','user_prompt':'The\x20guard\x20submission\x20is\x20too\x20large\x20for\x20the\x20protocol\x27s\x204096-byte\x20witness\x20ceiling.\x20Roster-style\x20candidate\x20lists\x20(up\x20to\x20100)\x20belong\x20in\x20the\x20guard-table\x20id\x20vector;\x20the\x20inline\x20witness\x20should\x20carry\x20only\x20per-call\x20attestation.\x20Slim\x20the\x20submission\x20and\x20retry.'},'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.'},'guard_data_missing':{'error_code':'guard_data_missing','strategy':'adjust_params','max_attempts':0x1,'automation':'semi','detail':'A\x20guard\x20rule\x20read\x20DATA\x20that\x20does\x20not\x20exist\x20—\x20a\x20keyed\x20(id,key)\x20repository/oracle\x20row\x20or\x20a\x20field\x20of\x20an\x20object\x20the\x20guard\x20references\x20—\x20and\x20the\x20passport\x20guard\x20verifier\x20panicked\x20at\x20execution\x20time\x20with\x20NO\x20abort\x20code.\x20This\x20is\x20a\x20GUARD-DATA\x20problem,\x20NOT\x20an\x20environment\x20fault\x20(do\x20not\x20restart\x20the\x20server,\x20do\x20not\x20look\x20for\x20a\x20routing\x20cause).\x201.\x20Export\x20the\x20guard\x20(guard2file\x20/\x20analyze_guard_semantics)\x20and\x20list\x20every\x20row/field\x20it\x20reads,\x20including\x20OR\x20branches\x20(an\x20OR\x20does\x20not\x20short-circuit\x20—\x20every\x20branch\x27s\x20row\x20must\x20exist).\x202.\x20Seed\x20the\x20missing\x20(id,key)\x20row\x20with\x20repository\x20data_add\x20(data_add.name\x20must\x20match\x20a\x20policy\x20rule\x20name),\x20or\x20point\x20the\x20guard\x20at\x20a\x20row/object\x20that\x20already\x20exists\x20—\x20a\x20history-time\x20anchor\x20(query_progress_history_time\x20id\x201280,\x20next_node,\x20find=last)\x20must\x20name\x20a\x20node\x20present\x20on\x20this\x20order\x27s\x20path/period.\x203.\x20Retry\x20the\x20SAME\x20call\x20unchanged;\x20a\x20dry_run\x20that\x20turns\x20clean\x20confirms\x20the\x20diagnosis.','user_prompt':'A\x20guard\x20reads\x20repository\x20data\x20that\x20has\x20not\x20been\x20written\x20yet\x20(not\x20a\x20network\x20or\x20server\x20problem).\x20Identify\x20the\x20(id,key)\x20row\x20the\x20guard\x20expects,\x20write\x20it\x20with\x20repository\x20data_add\x20or\x20use\x20an\x20existing\x20row,\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.'},'unreachable_transition':{'error_code':'unreachable_transition','strategy':'query_and_retry','max_attempts':0x1,'automation':'full','detail':'The\x20requested\x20forward\x20name\x20does\x20not\x20exist\x20on\x20the\x20(prev_node,\x20node)\x20pair\x20at\x20the\x20order\x27s\x20current\x20node\x20(on-chain\x20E_FORWARD_NOT_AT_NODE)\x20—\x20the\x20transition\x20is\x20not\x20in\x20the\x20Machine\x20graph.\x20Deterministic:\x20no\x20account\x20switch,\x20retry\x20or\x20gas\x20change\x20can\x20create\x20a\x20missing\x20edge,\x20and\x20a\x20published\x20Machine\x20is\x20immutable\x20(IMMUT-001).\x201.\x20Read\x20the\x20order\x27s\x20current\x20progress\x20node\x20(order\x20progress\x20with\x20convert_witness=\x27OrderProgress\x27).\x202.\x20Query\x20the\x20Machine\x20node\x20table\x20(onchain_table_item_machine_node)\x20and\x20list\x20the\x20pair\x27s\x20ACTUAL\x20forwards.\x203.\x20Re-issue\x20the\x20operation\x20with\x20an\x20existing\x20forward\x20name\x20that\x20leads\x20toward\x20the\x20goal.\x204.\x20If\x20no\x20existing\x20edge\x20reaches\x20the\x20intended\x20state\x20on\x20a\x20published\x20Machine,\x20the\x20path\x20is\x20impossible\x20—\x20redesign\x20requires\x20a\x20NEW\x20Machine\x20version\x20(pre-publish:\x20fix\x20the\x20graph\x20and\x20republish).','user_prompt':'The\x20requested\x20machine\x20transition\x20does\x20not\x20exist\x20at\x20the\x20order\x27s\x20current\x20node\x20—\x20retrying\x20or\x20switching\x20accounts\x20cannot\x20help.\x20The\x20available\x20forwards\x20must\x20be\x20read\x20from\x20the\x20machine\x27s\x20node\x20table\x20and\x20an\x20existing\x20one\x20used\x20instead;\x20if\x20none\x20fits,\x20the\x20machine\x20graph\x20itself\x20must\x20be\x20changed\x20before\x20publish.'},'forward_not_at_node':{'error_code':'forward_not_at_node','strategy':'query_and_retry','max_attempts':0x1,'automation':'full','detail':'The\x20order\x27s\x20CURRENT\x20Progress\x20node\x20carries\x20no\x20forward\x20with\x20the\x20requested\x20name\x20(on-chain\x20E_INFO_NOT_FOUND\x20=\x2013)\x20—\x20the\x20forward\x20is\x20not\x20an\x20out-edge\x20of\x20the\x20node\x20the\x20order\x20stands\x20on.\x20Deterministic\x20topology\x20mismatch:\x20retrying\x20the\x20same\x20triple,\x20waiting\x20or\x20switching\x20accounts\x20cannot\x20create\x20the\x20edge.\x201.\x20Read\x20the\x20order\x27s\x20CURRENT\x20node\x20(order\x20progress\x20with\x20convert_witness=\x27OrderProgress\x27).\x202.\x20Query\x20the\x20Machine\x20node\x20table\x20(onchain_table_item_machine_node)\x20and\x20list\x20the\x20pair\x27s\x20ACTUAL\x20forwards\x20at\x20that\x20node.\x203.\x20Re-issue\x20with\x20one\x20of\x20those\x20forward\x20names,\x20or\x20first\x20advance\x20through\x20the\x20intermediate\x20node\x20that\x20carries\x20the\x20intended\x20edge.\x204.\x20Always\x20surface\x20current_node\x20+\x20available_forwards,\x20never\x20the\x20same\x20triple\x20again.\x20Distinct\x20from\x20unreachable_transition\x20(machine:25)\x20where\x20the\x20pair\x20exists\x20at\x20this\x20node\x20and\x20only\x20the\x20name\x20is\x20missing.','user_prompt':'The\x20order\x20is\x20standing\x20on\x20a\x20node\x20that\x20has\x20no\x20such\x20forward.\x20The\x20current\x20node\x20and\x20its\x20actual\x20forward\x20names\x20must\x20be\x20read\x20from\x20the\x20machine\x20node\x20table\x20and\x20an\x20edge\x20sourced\x20there\x20used\x20instead\x20(or\x20the\x20order\x20advanced\x20to\x20the\x20right\x20node\x20first).\x20Retrying\x20cannot\x20help.'},'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.'},'capability_unavailable':{'error_code':'capability_unavailable','strategy':'stop','max_attempts':0x1,'automation':'manual','detail':'The\x20connected\x20chain\x20package\x20does\x20not\x20carry\x20this\x20protocol\x20entry,\x20so\x20the\x20call\x20is\x20impossible\x20on\x20this\x20package\x20version.\x20Deterministic\x20—\x20retrying,\x20re-signing\x20or\x20editing\x20parameters\x20cannot\x20add\x20the\x20missing\x20entry.\x20Remedy\x20(no\x20retry\x20involved):\x201.\x20Apply\x20the\x20documented\x20downgrade\x20for\x20the\x20intent\x20(for\x20a\x20reward\x20evidence\x20pin:\x20drop\x20the\x20evidence\x20binding\x20and\x20keep\x20the\x20repository-floor\x20guard\x20leg,\x20disclosing\x20that\x20it\x20proves\x20only\x20\x27a\x20qualifying\x20repository\x20row\x20exists\x20for\x20this\x20order\x27\x20—\x20not\x20who\x20wrote\x20it)\x202.\x20Check\x20the\x20target\x20network\x27s\x20package\x20release\x20notes\x20for\x20the\x20version\x20that\x20ships\x20the\x20entry\x20before\x20re-enabling\x20it\x203.\x20Never\x20treat\x20the\x20missing\x20entry\x20name\x20as\x20a\x20fixable\x20parameter','user_prompt':'This\x20call\x20needs\x20a\x20chain\x20capability\x20the\x20connected\x20package\x20does\x20not\x20have\x20yet.\x20It\x20cannot\x20succeed\x20on\x20this\x20network\x20version\x20—\x20no\x20retry\x20or\x20parameter\x20change\x20will\x20help.\x20The\x20documented\x20downgrade\x20keeps\x20the\x20goal\x20achievable\x20with\x20a\x20weaker\x20guarantee\x20that\x20must\x20be\x20disclosed\x20(for\x20a\x20review\x20bounty:\x20the\x20repository-floor\x20leg\x20proves\x20a\x20qualifying\x20rating\x20row\x20exists\x20for\x20the\x20order,\x20not\x20that\x20the\x20buyer\x20wrote\x20a\x20real\x20review).'},'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.'},'transport_unavailable':{'error_code':'transport_unavailable','strategy':'retry','max_attempts':0x3,'automation':'full','detail':'A\x20transport-level\x20object\x20FETCH\x20failed\x20(\x27Fetch\x20<Type>\x20object\x200x...\x20failed\x27)\x20—\x20a\x20READ-path\x20availability\x20problem\x20(fullnode/gateway),\x20NOT\x20a\x20guard\x20rejection\x20and\x20NOT\x20an\x20on-chain\x20abort.\x201.\x20READ\x20calls\x20are\x20idempotent:\x20retry\x20after\x20a\x20brief\x20backoff,\x20or\x20against\x20a\x20healthy\x20endpoint.\x202.\x20If\x20this\x20error\x20surfaced\x20on\x20a\x20WRITE\x20call,\x20the\x20write\x27s\x20submission\x20state\x20is\x20UNKNOWN\x20—\x20do\x20NOT\x20blindly\x20resend;\x20first\x20query\x20the\x20expected\x20object\x20on-chain\x20and\x20adopt\x20or\x20resubmit\x20per\x20the\x20submission_unknown\x20discipline\x20(ghost-order\x20hazard).\x203.\x20Never\x20re-interpret\x20this\x20as\x20a\x20guard\x20failure:\x20no\x20guard\x20was\x20evaluated,\x20nothing\x20reached\x20Move.\x204.\x20Persistent\x20failures\x20across\x20endpoints\x20→\x20check\x20network/fullnode\x20health\x20before\x20touching\x20business\x20logic'},'peer_not_registered':{'error_code':'peer_not_registered','strategy':'stop','max_attempts':0x1,'automation':'manual','detail':'The\x20message\x20RECIPIENT\x20is\x20not\x20registered\x20on\x20the\x20messenger\x20server\x20for\x20this\x20network\x20—\x20the\x20relay\x20has\x20no\x20keybook\x20entry\x20for\x20their\x20address,\x20so\x20delivery\x20is\x20impossible\x20until\x20THEY\x20enable\x20messenger.\x20Deterministic\x20recipient-side\x20gap:\x20retrying,\x20re-signing\x20or\x20switching\x20the\x20sender\x27s\x20account\x20cannot\x20fix\x20it.\x201.\x20Verify\x20the\x20recipient\x20address\x20spelling\x20and\x20that\x20both\x20sides\x20are\x20on\x20the\x20SAME\x20network\x20(a\x20foreign-network\x20address\x20reads\x20as\x20unregistered).\x202.\x20Ask\x20the\x20recipient\x20to\x20enable\x20messenger\x20once\x20from\x20their\x20own\x20account\x20(account_operation\x20with\x20messenger\x20registration)\x20on\x20this\x20network.\x203.\x20Re-send\x20AFTER\x20their\x20registration\x20—\x20until\x20then\x20the\x20thread\x20stays\x20undeliverable,\x20not\x20lost\x20(history\x20survives\x20on\x20the\x20sender\x27s\x20side).','user_prompt':'The\x20recipient\x20has\x20not\x20enabled\x20the\x20messenger\x20yet,\x20so\x20the\x20message\x20cannot\x20be\x20delivered.\x20Ask\x20them\x20to\x20enable\x20messenger\x20on\x20this\x20network\x20first,\x20then\x20re-send.\x20Retrying\x20on\x20your\x20side\x20will\x20not\x20help.'},'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(the\x20reward\x20pool\x20aborts\x20with\x206,\x20'+'the\x20allocation\x20pool\x20with\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(on-chain\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.'},'allocation_empty':{'error_code':'allocation_empty','strategy':'stop','max_attempts':0x1,'automation':'semi','detail':'The\x20Allocation\x20distributed\x20zero\x20value:\x20its\x20pool\x20is\x20empty\x20(already\x20fully\x20distributed,\x20or\x20the\x20order\x20total\x20was\x20discounted/couponed\x20to\x20zero)\x20—\x20a\x20legitimate\x20outcome\x20for\x20zero-total\x20orders.\x201.\x20Do\x20NOT\x20retry\x20the\x20allocation;\x20it\x20cannot\x20change\x20this.\x202.\x20If\x20funds\x20WERE\x20expected:\x20check\x20whether\x20the\x20order\x27s\x20payments\x20actually\x20funded\x20this\x20Allocation\x20before\x20the\x20rail\x20ran\x20(upstream\x20funding\x20problem),\x20and\x20verify\x20the\x20Payment\x20record\x20—\x20on\x20a\x20RETRIED\x20submission\x20the\x20FIRST\x20attempt\x20may\x20have\x20already\x20landed\x20(a\x20zero\x20balance\x20is\x20exactly\x20what\x20a\x20completed\x20distribution\x20looks\x20like,\x20F-M10).\x203.\x20The\x20chain\x20checks\x20the\x20balance\x20BEFORE\x20guard\x20evaluation,\x20so\x20this\x20abort\x20is\x20NOT\x20evidence\x20about\x20a\x20guard\x27s\x20verdict\x20—\x20never\x20conclude\x20\x27guard\x20rejected\x27\x20from\x20it','user_prompt':'The\x20allocation\x20pool\x20holds\x20nothing\x20to\x20distribute\x20(zero\x20total\x20or\x20already\x20fully\x20paid\x20out).\x20Verify\x20the\x20Payment\x20record\x20before\x20re-running\x20anything;\x20if\x20a\x20payout\x20was\x20expected,\x20the\x20pool\x20needs\x20funding\x20first.'},'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.'},'submission_too_large':{'error_code':'submission_too_large','strategy':'adjust_params','max_attempts':0x1,'automation':'manual','detail':'The\x20guard\x20submission\x27s\x20BCS\x20size\x20exceeded\x20MAX_SUBMISSION_SIZE=4096\x20(the\x20guard\x20submission-size\x20ceiling,\x20abort\x203;\x20v140\x20raised\x20it\x20from\x20256\x20so\x20a\x20100-address\x20roster\x20witness\x20fits)\x20—\x20the\x20whole\x20submission\x20struct,\x20not\x20the\x20guard-table\x20candidate\x20vector.\x201.\x20Move\x20roster/candidate\x20lists\x20OUT\x20of\x20the\x20witness:\x20sum_where/count_where\x20\x27ids\x27\x20accept\x20a\x20guard-table\x20VecAddress\x20entry\x20(cap\x20100\x20ids).\x202.\x20Keep\x20only\x20per-call\x20attestation\x20inline\x20—\x20a\x20100-address\x20roster\x20(100×32B\x20=\x203200B)\x20already\x20consumes\x20most\x20of\x20the\x20budget\x20once\x20the\x20protocol\x20slots\x20254/255\x20ride\x20along.\x203.\x20Split\x20the\x20verification\x20into\x20multiple\x20guards\x20if\x20more\x20inline\x20evidence\x20is\x20unavoidable.\x204.\x20Resubmit\x20with\x20the\x20shrunken\x20submission.','user_prompt':'The\x20guard\x20submission\x20is\x20too\x20large\x20for\x20the\x20protocol\x27s\x204096-byte\x20witness\x20ceiling.\x20Roster-style\x20candidate\x20lists\x20(up\x20to\x20100)\x20belong\x20in\x20the\x20guard-table\x20id\x20vector;\x20the\x20inline\x20witness\x20should\x20carry\x20only\x20per-call\x20attestation.\x20Slim\x20the\x20submission\x20and\x20retry.'},'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.'},'guard_data_missing':{'error_code':'guard_data_missing','strategy':'adjust_params','max_attempts':0x1,'automation':'semi','detail':'A\x20guard\x20rule\x20read\x20DATA\x20that\x20does\x20not\x20exist\x20—\x20a\x20keyed\x20(id,key)\x20repository/oracle\x20row\x20or\x20a\x20field\x20of\x20an\x20object\x20the\x20guard\x20references\x20—\x20and\x20the\x20passport\x20guard\x20verifier\x20panicked\x20at\x20execution\x20time\x20with\x20NO\x20abort\x20code.\x20This\x20is\x20a\x20GUARD-DATA\x20problem,\x20NOT\x20an\x20environment\x20fault\x20(do\x20not\x20restart\x20the\x20server,\x20do\x20not\x20look\x20for\x20a\x20routing\x20cause).\x201.\x20Export\x20the\x20guard\x20(guard2file\x20/\x20analyze_guard_semantics)\x20and\x20list\x20every\x20row/field\x20it\x20reads,\x20including\x20OR\x20branches\x20(an\x20OR\x20does\x20not\x20short-circuit\x20—\x20every\x20branch\x27s\x20row\x20must\x20exist).\x202.\x20Seed\x20the\x20missing\x20(id,key)\x20row\x20with\x20repository\x20data_add\x20(data_add.name\x20must\x20match\x20a\x20policy\x20rule\x20name),\x20or\x20point\x20the\x20guard\x20at\x20a\x20row/object\x20that\x20already\x20exists\x20—\x20a\x20history-time\x20anchor\x20(query_progress_history_time\x20id\x201280,\x20next_node,\x20find=last)\x20must\x20name\x20a\x20node\x20present\x20on\x20this\x20order\x27s\x20path/period.\x203.\x20Retry\x20the\x20SAME\x20call\x20unchanged;\x20a\x20dry_run\x20that\x20turns\x20clean\x20confirms\x20the\x20diagnosis.','user_prompt':'A\x20guard\x20reads\x20repository\x20data\x20that\x20has\x20not\x20been\x20written\x20yet\x20(not\x20a\x20network\x20or\x20server\x20problem).\x20Identify\x20the\x20(id,key)\x20row\x20the\x20guard\x20expects,\x20write\x20it\x20with\x20repository\x20data_add\x20or\x20use\x20an\x20existing\x20row,\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.'},'unreachable_transition':{'error_code':'unreachable_transition','strategy':'query_and_retry','max_attempts':0x1,'automation':'full','detail':'The\x20requested\x20forward\x20name\x20does\x20not\x20exist\x20on\x20the\x20(prev_node,\x20node)\x20pair\x20at\x20the\x20order\x27s\x20current\x20node\x20(on-chain\x20E_FORWARD_NOT_AT_NODE)\x20—\x20the\x20transition\x20is\x20not\x20in\x20the\x20Machine\x20graph.\x20Deterministic:\x20no\x20account\x20switch,\x20retry\x20or\x20gas\x20change\x20can\x20create\x20a\x20missing\x20edge,\x20and\x20a\x20published\x20Machine\x20is\x20immutable\x20(IMMUT-001).\x201.\x20Read\x20the\x20order\x27s\x20current\x20progress\x20node\x20(order\x20progress\x20with\x20convert_witness=\x27OrderProgress\x27).\x202.\x20Query\x20the\x20Machine\x20node\x20table\x20(onchain_table_item_machine_node)\x20and\x20list\x20the\x20pair\x27s\x20ACTUAL\x20forwards.\x203.\x20Re-issue\x20the\x20operation\x20with\x20an\x20existing\x20forward\x20name\x20that\x20leads\x20toward\x20the\x20goal.\x204.\x20If\x20no\x20existing\x20edge\x20reaches\x20the\x20intended\x20state\x20on\x20a\x20published\x20Machine,\x20the\x20path\x20is\x20impossible\x20—\x20redesign\x20requires\x20a\x20NEW\x20Machine\x20version\x20(pre-publish:\x20fix\x20the\x20graph\x20and\x20republish).','user_prompt':'The\x20requested\x20machine\x20transition\x20does\x20not\x20exist\x20at\x20the\x20order\x27s\x20current\x20node\x20—\x20retrying\x20or\x20switching\x20accounts\x20cannot\x20help.\x20The\x20available\x20forwards\x20must\x20be\x20read\x20from\x20the\x20machine\x27s\x20node\x20table\x20and\x20an\x20existing\x20one\x20used\x20instead;\x20if\x20none\x20fits,\x20the\x20machine\x20graph\x20itself\x20must\x20be\x20changed\x20before\x20publish.'},'forward_not_at_node':{'error_code':'forward_not_at_node','strategy':'query_and_retry','max_attempts':0x1,'automation':'full','detail':'The\x20order\x27s\x20CURRENT\x20Progress\x20node\x20carries\x20no\x20forward\x20with\x20the\x20requested\x20name\x20(on-chain\x20E_INFO_NOT_FOUND\x20=\x2013)\x20—\x20the\x20forward\x20is\x20not\x20an\x20out-edge\x20of\x20the\x20node\x20the\x20order\x20stands\x20on.\x20Deterministic\x20topology\x20mismatch:\x20retrying\x20the\x20same\x20triple,\x20waiting\x20or\x20switching\x20accounts\x20cannot\x20create\x20the\x20edge.\x201.\x20Read\x20the\x20order\x27s\x20CURRENT\x20node\x20(order\x20progress\x20with\x20convert_witness=\x27OrderProgress\x27).\x202.\x20Query\x20the\x20Machine\x20node\x20table\x20(onchain_table_item_machine_node)\x20and\x20list\x20the\x20pair\x27s\x20ACTUAL\x20forwards\x20at\x20that\x20node.\x203.\x20Re-issue\x20with\x20one\x20of\x20those\x20forward\x20names,\x20or\x20first\x20advance\x20through\x20the\x20intermediate\x20node\x20that\x20carries\x20the\x20intended\x20edge.\x204.\x20Always\x20surface\x20current_node\x20+\x20available_forwards,\x20never\x20the\x20same\x20triple\x20again.\x20Distinct\x20from\x20unreachable_transition\x20(machine:25)\x20where\x20the\x20pair\x20exists\x20at\x20this\x20node\x20and\x20only\x20the\x20name\x20is\x20missing.','user_prompt':'The\x20order\x20is\x20standing\x20on\x20a\x20node\x20that\x20has\x20no\x20such\x20forward.\x20The\x20current\x20node\x20and\x20its\x20actual\x20forward\x20names\x20must\x20be\x20read\x20from\x20the\x20machine\x20node\x20table\x20and\x20an\x20edge\x20sourced\x20there\x20used\x20instead\x20(or\x20the\x20order\x20advanced\x20to\x20the\x20right\x20node\x20first).\x20Retrying\x20cannot\x20help.'},'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.'},'capability_unavailable':{'error_code':'capability_unavailable','strategy':'stop','max_attempts':0x1,'automation':'manual','detail':'The\x20connected\x20chain\x20package\x20does\x20not\x20carry\x20this\x20protocol\x20entry,\x20so\x20the\x20call\x20is\x20impossible\x20on\x20this\x20package\x20version.\x20Deterministic\x20—\x20retrying,\x20re-signing\x20or\x20editing\x20parameters\x20cannot\x20add\x20the\x20missing\x20entry.\x20Remedy\x20(no\x20retry\x20involved):\x201.\x20Apply\x20the\x20documented\x20downgrade\x20for\x20the\x20intent\x20(for\x20a\x20reward\x20evidence\x20pin:\x20drop\x20the\x20evidence\x20binding\x20and\x20keep\x20the\x20repository-floor\x20guard\x20leg,\x20disclosing\x20that\x20it\x20proves\x20only\x20\x27a\x20qualifying\x20repository\x20row\x20exists\x20for\x20this\x20order\x27\x20—\x20not\x20who\x20wrote\x20it)\x202.\x20Check\x20the\x20target\x20network\x27s\x20package\x20release\x20notes\x20for\x20the\x20version\x20that\x20ships\x20the\x20entry\x20before\x20re-enabling\x20it\x203.\x20Never\x20treat\x20the\x20missing\x20entry\x20name\x20as\x20a\x20fixable\x20parameter','user_prompt':'This\x20call\x20needs\x20a\x20chain\x20capability\x20the\x20connected\x20package\x20does\x20not\x20have\x20yet.\x20It\x20cannot\x20succeed\x20on\x20this\x20network\x20version\x20—\x20no\x20retry\x20or\x20parameter\x20change\x20will\x20help.\x20The\x20documented\x20downgrade\x20keeps\x20the\x20goal\x20achievable\x20with\x20a\x20weaker\x20guarantee\x20that\x20must\x20be\x20disclosed\x20(for\x20a\x20review\x20bounty:\x20the\x20repository-floor\x20leg\x20proves\x20a\x20qualifying\x20rating\x20row\x20exists\x20for\x20the\x20order,\x20not\x20that\x20the\x20buyer\x20wrote\x20a\x20real\x20review).'},'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.'},'transport_unavailable':{'error_code':'transport_unavailable','strategy':'retry','max_attempts':0x3,'automation':'full','detail':'A\x20transport-level\x20object\x20FETCH\x20failed\x20(\x27Fetch\x20<Type>\x20object\x200x...\x20failed\x27)\x20—\x20a\x20READ-path\x20availability\x20problem\x20(fullnode/gateway),\x20NOT\x20a\x20guard\x20rejection\x20and\x20NOT\x20an\x20on-chain\x20abort.\x201.\x20READ\x20calls\x20are\x20idempotent:\x20retry\x20after\x20a\x20brief\x20backoff,\x20or\x20against\x20a\x20healthy\x20endpoint.\x202.\x20If\x20this\x20error\x20surfaced\x20on\x20a\x20WRITE\x20call,\x20the\x20write\x27s\x20submission\x20state\x20is\x20UNKNOWN\x20—\x20do\x20NOT\x20blindly\x20resend;\x20first\x20query\x20the\x20expected\x20object\x20on-chain\x20and\x20adopt\x20or\x20resubmit\x20per\x20the\x20submission_unknown\x20discipline\x20(ghost-order\x20hazard).\x203.\x20Never\x20re-interpret\x20this\x20as\x20a\x20guard\x20failure:\x20no\x20guard\x20was\x20evaluated,\x20nothing\x20reached\x20Move.\x204.\x20Persistent\x20failures\x20across\x20endpoints\x20→\x20check\x20network/fullnode\x20health\x20before\x20touching\x20business\x20logic'},'peer_not_registered':{'error_code':'peer_not_registered','strategy':'stop','max_attempts':0x1,'automation':'manual','detail':'The\x20message\x20RECIPIENT\x20is\x20not\x20registered\x20on\x20the\x20messenger\x20server\x20for\x20this\x20network\x20—\x20the\x20relay\x20has\x20no\x20keybook\x20entry\x20for\x20their\x20address,\x20so\x20delivery\x20is\x20impossible\x20until\x20THEY\x20enable\x20messenger.\x20Deterministic\x20recipient-side\x20gap:\x20retrying,\x20re-signing\x20or\x20switching\x20the\x20sender\x27s\x20account\x20cannot\x20fix\x20it.\x201.\x20Verify\x20the\x20recipient\x20address\x20spelling\x20and\x20that\x20both\x20sides\x20are\x20on\x20the\x20SAME\x20network\x20(a\x20foreign-network\x20address\x20reads\x20as\x20unregistered).\x202.\x20Ask\x20the\x20recipient\x20to\x20enable\x20messenger\x20once\x20from\x20their\x20own\x20account\x20(account_operation\x20with\x20messenger\x20registration)\x20on\x20this\x20network.\x203.\x20Re-send\x20AFTER\x20their\x20registration\x20—\x20until\x20then\x20the\x20thread\x20stays\x20undeliverable,\x20not\x20lost\x20(history\x20survives\x20on\x20the\x20sender\x27s\x20side).','user_prompt':'The\x20recipient\x20has\x20not\x20enabled\x20the\x20messenger\x20yet,\x20so\x20the\x20message\x20cannot\x20be\x20delivered.\x20Ask\x20them\x20to\x20enable\x20messenger\x20on\x20this\x20network\x20first,\x20then\x20re-send.\x20Retrying\x20on\x20your\x20side\x20will\x20not\x20help.'},'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 +1 @@
|
|
|
1
|
-
export const ARBITRATION_ACTIVATION_NOTES=['ACTIVATION:\x20a\x20newly\x20created\x20Arbitration\x20is\x20born\x20PAUSED\x20(bPaused=true).\x20This\x20template\x20passes\x20pause:false\x20in\x20the\x20create\x20payload\x20to\x20unpause\x20in\x20the\x20SAME\x20transaction\x20(the\x20creator\x20is\x20an\x20admin\x20of\x20the\x20new\x20Permission,\x20so\x20the\x20356\x20check\x20passes).\x20If\x20the\x20unpause\x20is\x20skipped,\x20no\x20dispute\x20can\x20be\x20filed\x20(E_PAUSED)\x20until\x20a\x20separate\x20{operation_type:\x27arbitration\x27,\x20data:{object:\x27<arb>\x27,\x20pause:false}}\x20is\x20issued.','PERMISSIONS:\x20a\x20freshly\x20created\x20Arbitration\x27s\x20Permission\x20table\x20starts\x20EMPTY\x20—\x20its\x20CREATOR\x20is\x20seeded\x20as\x20the\x20sole\x20admin\x20and\x20always\x20passes\x20every\x20assert,\x20so\x20only\x20NON-admin\x20callers\x20abort\x20with\x20\x27Missing\x20permission\x27\x20(code\x205)\x20until\x20grants\x20are\x20issued\x20via\x20its\x20Permission\x20object:\x20356\x20(pause/unpause),\x20358\x20(vote),\x20359\x20(issue\x20ruling),\x20361\x20(arbitrator\x20material\x20confirm),\x20plus\x20357/362/363/364-368\x20(fee\x20/\x20deadline\x20/\x20reset\x20/\x20withdraw\x20/\x20receive).','OPEN\x20VOTE\x20IS\x20NOT\x20PERMISSIONLESS:\x20an\x20empty\x20voting_guard\x20means\x20EQUAL\x20WEIGHT\x20(1\x20person\x201\x20vote),\x20but\x20vote()\x20still\x20asserts\x20ARBITRATION_VOTE=358\x20—\x20\x27anyone\x20can\x20vote\x27\x20requires\x20granting\x20358\x20to\x20the\x20intended\x20voters\x20first.'];export const ARBITRATION_TEMPLATES=[{'id':'T-AB-01','name':'Single-arbiter\x20quick\x20ruling','description':'Simplest\x20Arbitration:\x20one\x20arbiter\x20makes\x20all\x20rulings.\x20voting_guard\x20empty\x20(open\x20vote,\x20but\x20only\x20arbiter\x20has\x20358\x20perm).\x20Suitable\x20for\x20small-scale\x20/\x20fast\x20dispute\x20resolution.','applicable_scenes':['arbitration_create','arbitration_ruling','arbitration_confirm'],'industry_tags':['retail','freelance','small_business'],'params':[{'name':'owner_address','type':'address','description':'Arbitration\x20owner\x20(also\x20admin)','required':!![]},{'name':'arbiter_address','type':'address','description':'Single\x20arbiter\x20address\x20(gets\x20ARBITRATION_VOTE=358\x20+\x20ARBITRATION_ARBITRATION=359)','required':!![]},{'name':'coin_type','type':'string','description':'Coin\x20type\x20for\x20arbitration\x20fee\x20(e.g.\x200x2::wow::WOW)','required':!![]},{'name':'description','type':'string','description':'Arbitration\x20description','required':!![]},{'name':'fee_amount','type':'number','description':'Dispute\x20application\x20fee\x20(u64,\x20in\x20Coin\x20base\x20units)','required':![],'default':0x0},{'name':'arbitration_name','type':'string','description':'Local\x20name\x20for\x20the\x20Arbitration\x20object','required':![]}],'body':a=>({'object':{'name':a['arbitration_name']??'single_arb_arbitration','type_parameter':a['coin_type'],'permission':{'name':(a['arbitration_name']??'single_arb')+'_permission'}},'description':a['description'],'fee':String(a['fee_amount']??0x0),'pause':![]}),'notes':['voting_guard\x20remains\x20empty\x20→\x20plain\x20votes\x20hard-require\x20the\x20vote\x20permission\x20(358):\x20by\x20default\x20ONLY\x20the\x20creator-admin\x20can\x20vote\x20(here\x20the\x20arbiter).\x20This\x20is\x20NOT\x20open\x20voting\x20—\x20a\x20dispute\x20dead-locks\x20when\x20that\x20admin\x20is\x20unresponsive\x20(crs9-F-36;\x20R-ARB-VOTE-LOCK\x20blocks\x20the\x20service\x20publish).\x20Weight\x20semantics\x20stay\x20one-voter-one-vote;\x20for\x20real\x20open\x20voting\x20bind\x20the\x20always-true\x20guard\x20(T-AB-03\x20/\x20tpl_voting_guard_open_vote)','Only\x20arbiter_address\x20should\x20be\x20granted\x20ARBITRATION_VOTE\x20(358)\x20+\x20ARBITRATION_ARBITRATION\x20(359)','Fast\x20ruling:\x20arbiter\x20confirms\x20materials\x20→\x20votes\x20→\x20makes\x20ruling\x20in\x20one\x20session','Not\x20suitable\x20for\x20high-value\x20disputes\x20(no\x20consensus\x20check)',...ARBITRATION_ACTIVATION_NOTES]},{'id':'T-AB-02','name':'Multi-arbiter\x20voting\x20(weighted)','description':'Multiple\x20arbiters\x20vote\x20with\x20weighted\x20voting_guard.\x20Each\x20arbiter\x27s\x20Guard\x20has\x20FixedValue\x20weight.\x20Ruling\x20requires\x20majority\x20weight.','applicable_scenes':['arbitration_create','arbitration_vote','arbitration_voting_guard_config'],'industry_tags':['governance','dao','committee'],'params':[{'name':'owner_address','type':'address','description':'Arbitration\x20owner','required':!![]},{'name':'arbiter_guards','type':'string[]','description':'Guard\x20addresses\x20for\x20each\x20arbiter\x20(will\x20be\x20added\x20to\x20voting_guard)','required':!![]},{'name':'vote_weights','type':'string[]','description':'FixedValue\x20weights\x20for\x20each\x20arbiter\x20(parallel\x20to\x20arbiter_guards)','required':!![]},{'name':'coin_type','type':'string','description':'Coin\x20type','required':!![]},{'name':'description','type':'string','description':'Arbitration\x20description','required':!![]},{'name':'fee_amount','type':'number','description':'Dispute\x20fee','required':![],'default':0x0}],'body':a=>{const b=a['arbiter_guards']['map']((c,d)=>({'guard':c,'vote_weight':{'FixedValue':Number(a['vote_weights'][d]??0x1)}}));return{'object':{'name':'weighted_arbitration','type_parameter':a['coin_type'],'permission':{'name':'weighted_arb_permission'}},'description':a['description'],'fee':String(a['fee_amount']??0x0),'pause':![],'voting_guard':{'op':'set','guards':b}};},'notes':['voting_guard\x20non-empty\x20→\x20votes\x20MUST\x20be\x20submitted\x20via\x20the\x20Passport-verified\x20voting\x20path','Each\x20arbiter\x27s\x20Guard\x20must\x20be\x20a\x20valid\x20Guard\x20object\x20they\x20can\x20submit\x20Passport\x20for','Consider:\x20max(arbiter_weights)\x20/\x20total_weights\x20<\x200.5\x20to\x20avoid\x20collusion\x20(see\x20R-AB-3-01)','Max\x2050\x20voting_guards\x20(MAX_VOTING_GUARD_COUNT)',...ARBITRATION_ACTIVATION_NOTES]},{'id':'T-AB-03','name':'Public\x20voting\x20arbitration','description':'voting_guard\x20allows\x20public\x20to\x20vote\x20(anyone\x20with\x20a\x20Guard\x20can\x20vote).\x20Suitable\x20for\x20community-driven\x20dispute\x20resolution.','applicable_scenes':['arbitration_create','arbitration_vote','arbitration_voting_guard_config'],'industry_tags':['community','public_goods','social'],'params':[{'name':'owner_address','type':'address','description':'Arbitration\x20owner','required':!![]},{'name':'public_guard','type':'address','description':'Guard\x20address\x20anyone\x20can\x20submit\x20Passport\x20for\x20(e.g.\x20based\x20on\x20account\x20existence)','required':!![]},{'name':'vote_weight','type':'number','description':'FixedValue\x20weight\x20per\x20public\x20voter\x20(e.g.\x201)','required':![],'default':0x1},{'name':'coin_type','type':'string','description':'Coin\x20type','required':!![]},{'name':'description','type':'string','description':'Arbitration\x20description','required':!![]}],'body':a=>({'object':{'name':'public_arbitration','type_parameter':a['coin_type'],'permission':{'name':'public_arb_permission'}},'description':a['description'],'fee':'0','pause':![],'voting_guard':{'op':'set','guards':[{'guard':a['public_guard'],'vote_weight':{'FixedValue':Number(a['vote_weight']??0x1)}}]}}),'notes':['Public\x20voting:\x20anyone\x20holding\x20the\x20public_guard\x20can\x20vote','This\x20shape\x20also\x20clears\x20R-ARB-VOTE-LOCK:\x20an\x20EMPTY\x20voting_guard\x20is\x20NOT\x20open\x20voting\x20(plain\x20votes\x20would\x20hard-require\x20the\x20vote\x20permission\x20358,\x20admin-only\x20by\x20default,\x20crs9-F-36)\x20—\x20the\x20always-true\x20guard\x20is\x20the\x20declared\x20voter\x20universe\x20(tpl_voting_guard_open_vote\x20is\x20the\x20guard-side\x20template)','Once\x20voting_guard\x20is\x20set,\x20every\x20vote\x20call\x20MUST\x20carry\x20voting_guard\x20in\x20the\x20payload\x20(a\x20plain\x20vote\x20aborts\x20on-chain\x20with\x20E_VOTING_GUARD_USED,\x20abort\x202)','Consider\x20using\x20GuardIdentifier\x20(dynamic\x20weight)\x20for\x20token-weighted\x20voting','Low/zero\x20fee\x20to\x20encourage\x20participation\x20—\x20but\x20watch\x20for\x20spam\x20disputes','Suitable\x20for\x20community\x20moderation,\x20content\x20disputes,\x20public\x20goods\x20arbitration',...ARBITRATION_ACTIVATION_NOTES]},{'id':'T-AB-04','name':'Scope-restricted\x20arbitration','description':'usage_guard\x20filters\x20which\x20disputes\x20can\x20be\x20filed.\x20Only\x20users\x20passing\x20the\x20Guard\x20can\x20file\x20disputes.\x20Suitable\x20for\x20verified-merchant\x20/\x20KYC\x20arbitration.','applicable_scenes':['arbitration_create','arbitration_usage_guard_config','arbitration_dispute'],'industry_tags':['kyc','verified_merchant','enterprise'],'params':[{'name':'owner_address','type':'address','description':'Arbitration\x20owner','required':!![]},{'name':'usage_guard_address','type':'address','description':'Guard\x20address\x20that\x20filters\x20who\x20can\x20file\x20disputes\x20(KYC/verification)','required':!![]},{'name':'coin_type','type':'string','description':'Coin\x20type','required':!![]},{'name':'description','type':'string','description':'Arbitration\x20description','required':!![]},{'name':'arbiter_address','type':'address','description':'Arbiter\x20address\x20(single\x20arbiter\x20for\x20simplicity)','required':!![]},{'name':'fee_amount','type':'number','description':'Dispute\x20fee\x20(higher\x20to\x20deter\x20spam)','required':![],'default':0x3b9aca00}],'body':a=>({'object':{'name':'restricted_arbitration','type_parameter':a['coin_type'],'permission':{'name':'restricted_arb_permission'}},'description':a['description'],'fee':String(a['fee_amount']??0x3b9aca00),'pause':![],'usage_guard':a['usage_guard_address']}),'notes':['usage_guard\x20set\x20→\x20disputes\x20MUST\x20be\x20filed\x20via\x20the\x20Passport-verified\x20dispute\x20variant','Guard\x20verifies:\x20KYC\x20/\x20membership\x20/\x20token-balance\x20/\x20etc.','Higher\x20fee\x20(default\x201\x20WOW)\x20to\x20deter\x20spam\x20from\x20verified\x20users','Arbiter\x20should\x20also\x20be\x20Guard-verified\x20for\x20consistency',...ARBITRATION_ACTIVATION_NOTES]},{'id':'T-AB-05','name':'Arbitration\x20committee','description':'Multi-arbiter\x20committee\x20with\x20weighted\x20voting\x20+\x20usage_guard.\x20Most\x20controlled\x20configuration\x20—\x20restricted\x20dispute\x20filing\x20+\x20weighted\x20voting\x20+\x20multi-arbiter\x20ruling.','applicable_scenes':['arbitration_create','arbitration_voting_guard_config','arbitration_usage_guard_config','arbitration_ruling'],'industry_tags':['enterprise','legal','high_value'],'params':[{'name':'owner_address','type':'address','description':'Committee\x20owner','required':!![]},{'name':'committee_guards','type':'string[]','description':'Guard\x20addresses\x20for\x20each\x20committee\x20member','required':!![]},{'name':'member_weights','type':'string[]','description':'Vote\x20weights\x20for\x20each\x20member\x20(parallel\x20to\x20committee_guards)','required':!![]},{'name':'membership_guard','type':'address','description':'usage_guard\x20for\x20dispute\x20filing\x20(membership\x20verification)','required':!![]},{'name':'coin_type','type':'string','description':'Coin\x20type','required':!![]},{'name':'description','type':'string','description':'Arbitration\x20description','required':!![]},{'name':'fee_amount','type':'number','description':'Dispute\x20fee\x20(high\x20for\x20high-value\x20disputes)','required':![],'default':0x2540be400}],'body':a=>{const b=a['committee_guards']['map']((c,d)=>({'guard':c,'vote_weight':{'FixedValue':Number(a['member_weights'][d]??0x1)}}));return{'object':{'name':'committee_arbitration','type_parameter':a['coin_type'],'permission':{'name':'committee_arb_permission'}},'description':a['description'],'fee':String(a['fee_amount']??0x2540be400),'pause':![],'voting_guard':{'op':'set','guards':b},'usage_guard':a['membership_guard']};},'notes':['Most\x20restrictive\x20config:\x20weighted\x20voting\x20+\x20restricted\x20filing','Suitable\x20for\x20high-value\x20B2B\x20disputes,\x20legal\x20arbitration,\x20enterprise\x20SLA\x20enforcement','Committee\x20members\x20should\x20have\x20clear\x20escalation\x20/\x20tiebreaker\x20rules','All\x20disputes\x20require\x20Passport\x20(both\x20filing\x20and\x20voting)',...ARBITRATION_ACTIVATION_NOTES]},{'id':'T-AB-06','name':'Fee-split\x20arbitration','description':'Pre-configured\x20fee-distribution\x20destination.\x20After\x20the\x20fee\x20withdrawal\x20(364),\x20fees\x20are\x20automatically\x20distributed\x20to\x20the\x20Allocation\x20(for\x20arbiter\x20compensation).','applicable_scenes':['arbitration_create','arbitration_arb_withdraw','arbitration_fees_alloc'],'industry_tags':['marketplace','service','platform'],'params':[{'name':'owner_address','type':'address','description':'Arbitration\x20owner','required':!![]},{'name':'allocation_address','type':'address','description':'Allocation\x20object\x20address\x20for\x20fee\x20distribution\x20to\x20arbiters','required':!![]},{'name':'coin_type','type':'string','description':'Coin\x20type','required':!![]},{'name':'description','type':'string','description':'Arbitration\x20description','required':!![]},{'name':'arbiter_address','type':'address','description':'Arbiter\x20(single\x20for\x20simplicity)','required':!![]},{'name':'fee_amount','type':'number','description':'Dispute\x20fee\x20(will\x20be\x20split\x20to\x20arbiters\x20via\x20Allocation)','required':![],'default':0x12a05f200}],'body':a=>({'object':{'name':'feesplit_arbitration','type_parameter':a['coin_type'],'permission':{'name':'feesplit_arb_permission'}},'description':a['description'],'fee':String(a['fee_amount']??0x12a05f200),'pause':![]}),'notes':['Fee-split\x20is\x20a\x202-step\x20process:\x20withdraw\x20fees\x20from\x20the\x20Arb\x20object\x20(364)\x20→\x20transfer\x20them\x20out\x20of\x20the\x20Arbitration\x20balance\x20(365/366)','Fee\x20withdrawal\x20(364)\x20moves\x20fees\x20from\x20the\x20Arb\x20object\x20into\x20the\x20Arbitration\x20balance','Fee\x20distribution\x20(365)\x20or\x20the\x20balance\x20transfer\x20(366)\x20moves\x20fees\x20to\x20the\x20Allocation/Treasury','Allocation\x20policy\x20determines\x20how\x20fees\x20are\x20split\x20among\x20arbiters','Payment\x20object\x20is\x20created\x20for\x20bookkeeping\x20(payment_remark\x20+\x20payment_index)',...ARBITRATION_ACTIVATION_NOTES]},{'id':'T-AB-07','name':'Appeal\x20arbitration\x20(reset\x20flow)','description':'Template\x20for\x20reset\x20operation\x20—\x20disputant\x20objects\x20to\x20ruling\x20and\x20resubmits\x20materials.\x20Restarts\x20Arb\x20lifecycle\x20from\x20Principal_confirming.','applicable_scenes':['arbitration_reset','arbitration_ruling'],'industry_tags':['legal','appeal','high_value'],'params':[{'name':'arbitration_object','type':'address','description':'Existing\x20Arbitration\x20object\x20address','required':!![]},{'name':'arb_address','type':'address','description':'Arb\x20object\x20address\x20to\x20reset\x20(must\x20be\x20in\x20Objectionable/Arbitrated\x20status)','required':!![]},{'name':'reset_feedback','type':'string','description':'Feedback\x20explaining\x20why\x20disputant\x20objects\x20to\x20the\x20ruling','required':!![]}],'body':a=>({'object':a['arbitration_object'],'reset':{'arb':a['arb_address'],'feedback':a['reset_feedback']}}),'notes':['Precondition:\x20Arb\x20must\x20be\x20in\x20Objectionable\x20(4)\x20or\x20Arbitrated\x20(3)\x20status','Post-condition:\x20Arb\x20status\x20→\x20Principal_confirming\x20(0),\x20lifecycle\x20restarts','Original\x20ruling\x20is\x20invalidated\x20—\x20new\x20voting\x20+\x20ruling\x20required','Consider\x20capping\x20reset\x20count\x20to\x20prevent\x20infinite\x20appeals','reset\x20feedback\x20is\x20permanent\x20—\x20recorded\x20on-chain\x20for\x20audit\x20trail']}];export const ARBITRATION_TEMPLATES_VERSION='1.0.0';export function getAllTemplates(){return[...ARBITRATION_TEMPLATES];}export function getTemplateById(a){return ARBITRATION_TEMPLATES['find'](b=>b['id']===a);}export function getTemplatesByScene(a){return ARBITRATION_TEMPLATES['filter'](b=>b['applicable_scenes']['includes'](a));}export function getTemplatesByIndustry(a){return ARBITRATION_TEMPLATES['filter'](b=>b['industry_tags']['includes'](a)||b['industry_tags']['includes']('universal'));}export function suggestTemplateForScene(a){const b=getTemplatesByScene(a);return b['length']>0x0?b[0x0]:undefined;}export function listTemplates(){return ARBITRATION_TEMPLATES['map'](a=>({'id':a['id'],'name':a['name'],'description':a['description'],'scenes':a['applicable_scenes']}));}export function fillTemplate(a,b){const c=getTemplateById(a);if(!c)return{'ok':![],'error':'Template\x20'+a+'\x20not\x20found'};for(const d of c['params']){if(d['required']&&!(d['name']in b))return{'ok':![],'error':'Missing\x20required\x20param:\x20'+d['name']};}return{'ok':!![],'body':c['body'](b)};}
|
|
1
|
+
export const ARBITRATION_ACTIVATION_NOTES=['ACTIVATION:\x20a\x20newly\x20created\x20Arbitration\x20is\x20born\x20PAUSED\x20(bPaused=true).\x20This\x20template\x20passes\x20pause:false\x20in\x20the\x20create\x20payload\x20to\x20unpause\x20in\x20the\x20SAME\x20transaction\x20(the\x20creator\x20is\x20an\x20admin\x20of\x20the\x20new\x20Permission,\x20so\x20the\x20356\x20check\x20passes).\x20If\x20the\x20unpause\x20is\x20skipped,\x20no\x20dispute\x20can\x20be\x20filed\x20(E_PAUSED)\x20until\x20a\x20separate\x20{operation_type:\x27arbitration\x27,\x20data:{object:\x27<arb>\x27,\x20pause:false}}\x20is\x20issued.','PERMISSIONS:\x20a\x20freshly\x20created\x20Arbitration\x27s\x20Permission\x20table\x20starts\x20EMPTY\x20—\x20its\x20CREATOR\x20is\x20seeded\x20as\x20the\x20sole\x20admin\x20and\x20always\x20passes\x20every\x20assert,\x20so\x20only\x20NON-admin\x20callers\x20abort\x20with\x20\x27Missing\x20permission\x27\x20(code\x205)\x20until\x20grants\x20are\x20issued\x20via\x20its\x20Permission\x20object:\x20356\x20(pause/unpause),\x20358\x20(vote),\x20359\x20(issue\x20ruling),\x20361\x20(arbitrator\x20material\x20confirm),\x20plus\x20357/362/363/364-368\x20(fee\x20/\x20deadline\x20/\x20reset\x20/\x20withdraw\x20/\x20receive).','OPEN\x20VOTE\x20IS\x20NOT\x20PERMISSIONLESS:\x20an\x20empty\x20voting_guard\x20means\x20EQUAL\x20WEIGHT\x20(1\x20person\x201\x20vote),\x20but\x20vote()\x20still\x20asserts\x20ARBITRATION_VOTE=358\x20—\x20\x27anyone\x20can\x20vote\x27\x20requires\x20granting\x20358\x20to\x20the\x20intended\x20voters\x20first.','VOTER\x20UNIVERSE\x20IS\x20DECLARED\x20BY\x20THE\x20voting_guard:\x20always-true\x20root\x20=\x20public\x20venue\x20(tpl_voting_guard_open_vote);\x20party-restricted\x20root\x20=\x20closed\x20venue\x20(tpl_voting_guard_party_only:\x20panel\x20vec_contains_address\x20∨\x20order.owner\x20with\x20the\x20arb.order==order\x20anti-spoof\x20leg).\x20Upw2-mn\x20pddk-b4:\x20a\x20closed\x20venue\x20shipping\x20a\x20constant-true\x20guard\x20let\x20an\x20outsider\x20vote\x20—\x20pick\x20the\x20twin\x20deliberately.'];export const ARBITRATION_TEMPLATES=[{'id':'T-AB-01','name':'Single-arbiter\x20quick\x20ruling','description':'Simplest\x20Arbitration:\x20one\x20arbiter\x20makes\x20all\x20rulings.\x20voting_guard\x20empty\x20(open\x20vote,\x20but\x20only\x20arbiter\x20has\x20358\x20perm).\x20Suitable\x20for\x20small-scale\x20/\x20fast\x20dispute\x20resolution.','applicable_scenes':['arbitration_create','arbitration_ruling','arbitration_confirm'],'industry_tags':['retail','freelance','small_business'],'params':[{'name':'owner_address','type':'address','description':'Arbitration\x20owner\x20(also\x20admin)','required':!![]},{'name':'arbiter_address','type':'address','description':'Single\x20arbiter\x20address\x20(gets\x20ARBITRATION_VOTE=358\x20+\x20ARBITRATION_ARBITRATION=359)','required':!![]},{'name':'coin_type','type':'string','description':'Coin\x20type\x20for\x20arbitration\x20fee\x20(e.g.\x200x2::wow::WOW)','required':!![]},{'name':'description','type':'string','description':'Arbitration\x20description','required':!![]},{'name':'fee_amount','type':'number','description':'Dispute\x20application\x20fee\x20(u64,\x20in\x20Coin\x20base\x20units)','required':![],'default':0x0},{'name':'arbitration_name','type':'string','description':'Local\x20name\x20for\x20the\x20Arbitration\x20object','required':![]}],'body':a=>({'object':{'name':a['arbitration_name']??'single_arb_arbitration','type_parameter':a['coin_type'],'permission':{'name':(a['arbitration_name']??'single_arb')+'_permission'}},'description':a['description'],'fee':String(a['fee_amount']??0x0),'pause':![]}),'notes':['voting_guard\x20remains\x20empty\x20→\x20plain\x20votes\x20hard-require\x20the\x20vote\x20permission\x20(358):\x20by\x20default\x20ONLY\x20the\x20creator-admin\x20can\x20vote\x20(here\x20the\x20arbiter).\x20This\x20is\x20NOT\x20open\x20voting\x20—\x20a\x20dispute\x20dead-locks\x20when\x20that\x20admin\x20is\x20unresponsive\x20(crs9-F-36;\x20R-ARB-VOTE-LOCK\x20blocks\x20the\x20service\x20publish).\x20Weight\x20semantics\x20stay\x20one-voter-one-vote;\x20for\x20real\x20open\x20voting\x20bind\x20the\x20always-true\x20guard\x20(T-AB-03\x20/\x20tpl_voting_guard_open_vote);\x20for\x20a\x20closed\x20venue\x20where\x20only\x20the\x20dispute\x20parties\x20+\x20venue\x20staff\x20may\x20vote,\x20bind\x20tpl_voting_guard_party_only\x20instead','Only\x20arbiter_address\x20should\x20be\x20granted\x20ARBITRATION_VOTE\x20(358)\x20+\x20ARBITRATION_ARBITRATION\x20(359)','Fast\x20ruling:\x20arbiter\x20confirms\x20materials\x20→\x20votes\x20→\x20makes\x20ruling\x20in\x20one\x20session','Not\x20suitable\x20for\x20high-value\x20disputes\x20(no\x20consensus\x20check)',...ARBITRATION_ACTIVATION_NOTES]},{'id':'T-AB-02','name':'Multi-arbiter\x20voting\x20(weighted)','description':'Multiple\x20arbiters\x20vote\x20with\x20weighted\x20voting_guard.\x20Each\x20arbiter\x27s\x20Guard\x20has\x20FixedValue\x20weight.\x20Ruling\x20requires\x20majority\x20weight.','applicable_scenes':['arbitration_create','arbitration_vote','arbitration_voting_guard_config'],'industry_tags':['governance','dao','committee'],'params':[{'name':'owner_address','type':'address','description':'Arbitration\x20owner','required':!![]},{'name':'arbiter_guards','type':'string[]','description':'Guard\x20addresses\x20for\x20each\x20arbiter\x20(will\x20be\x20added\x20to\x20voting_guard)','required':!![]},{'name':'vote_weights','type':'string[]','description':'FixedValue\x20weights\x20for\x20each\x20arbiter\x20(parallel\x20to\x20arbiter_guards)','required':!![]},{'name':'coin_type','type':'string','description':'Coin\x20type','required':!![]},{'name':'description','type':'string','description':'Arbitration\x20description','required':!![]},{'name':'fee_amount','type':'number','description':'Dispute\x20fee','required':![],'default':0x0}],'body':a=>{const b=a['arbiter_guards']['map']((c,d)=>({'guard':c,'vote_weight':{'FixedValue':Number(a['vote_weights'][d]??0x1)}}));return{'object':{'name':'weighted_arbitration','type_parameter':a['coin_type'],'permission':{'name':'weighted_arb_permission'}},'description':a['description'],'fee':String(a['fee_amount']??0x0),'pause':![],'voting_guard':{'op':'set','guards':b}};},'notes':['voting_guard\x20non-empty\x20→\x20votes\x20MUST\x20be\x20submitted\x20via\x20the\x20Passport-verified\x20voting\x20path','Each\x20arbiter\x27s\x20Guard\x20must\x20be\x20a\x20valid\x20Guard\x20object\x20they\x20can\x20submit\x20Passport\x20for','Consider:\x20max(arbiter_weights)\x20/\x20total_weights\x20<\x200.5\x20to\x20avoid\x20collusion\x20(see\x20R-AB-3-01)','Max\x2050\x20voting_guards\x20(MAX_VOTING_GUARD_COUNT)',...ARBITRATION_ACTIVATION_NOTES]},{'id':'T-AB-03','name':'Public\x20voting\x20arbitration','description':'voting_guard\x20allows\x20public\x20to\x20vote\x20(anyone\x20with\x20a\x20Guard\x20can\x20vote).\x20Suitable\x20for\x20community-driven\x20dispute\x20resolution.','applicable_scenes':['arbitration_create','arbitration_vote','arbitration_voting_guard_config'],'industry_tags':['community','public_goods','social'],'params':[{'name':'owner_address','type':'address','description':'Arbitration\x20owner','required':!![]},{'name':'public_guard','type':'address','description':'Guard\x20address\x20anyone\x20can\x20submit\x20Passport\x20for\x20(e.g.\x20based\x20on\x20account\x20existence)','required':!![]},{'name':'vote_weight','type':'number','description':'FixedValue\x20weight\x20per\x20public\x20voter\x20(e.g.\x201)','required':![],'default':0x1},{'name':'coin_type','type':'string','description':'Coin\x20type','required':!![]},{'name':'description','type':'string','description':'Arbitration\x20description','required':!![]}],'body':a=>({'object':{'name':'public_arbitration','type_parameter':a['coin_type'],'permission':{'name':'public_arb_permission'}},'description':a['description'],'fee':'0','pause':![],'voting_guard':{'op':'set','guards':[{'guard':a['public_guard'],'vote_weight':{'FixedValue':Number(a['vote_weight']??0x1)}}]}}),'notes':['Public\x20voting:\x20anyone\x20holding\x20the\x20public_guard\x20can\x20vote','This\x20shape\x20also\x20clears\x20R-ARB-VOTE-LOCK:\x20an\x20EMPTY\x20voting_guard\x20is\x20NOT\x20open\x20voting\x20(plain\x20votes\x20would\x20hard-require\x20the\x20vote\x20permission\x20358,\x20admin-only\x20by\x20default,\x20crs9-F-36)\x20—\x20the\x20always-true\x20guard\x20is\x20the\x20declared\x20voter\x20universe\x20(tpl_voting_guard_open_vote\x20is\x20the\x20guard-side\x20template).\x20Use\x20this\x20shape\x20ONLY\x20for\x20deliberately\x20public\x20venues:\x20a\x20closed\x20commercial\x20venue\x20must\x20restrict\x20its\x20voter\x20universe\x20(tpl_voting_guard_party_only\x20—\x20the\x20parties\x20+\x20venue\x20panel),\x20or\x20every\x20Passport\x20holder\x20can\x20vote\x20(upw2-mn\x20pddk-b4)','Once\x20voting_guard\x20is\x20set,\x20every\x20vote\x20call\x20MUST\x20carry\x20voting_guard\x20in\x20the\x20payload\x20(a\x20plain\x20vote\x20aborts\x20on-chain\x20with\x20E_VOTING_GUARD_USED,\x20abort\x202)','Consider\x20using\x20GuardIdentifier\x20(dynamic\x20weight)\x20for\x20token-weighted\x20voting','Low/zero\x20fee\x20to\x20encourage\x20participation\x20—\x20but\x20watch\x20for\x20spam\x20disputes','Suitable\x20for\x20community\x20moderation,\x20content\x20disputes,\x20public\x20goods\x20arbitration',...ARBITRATION_ACTIVATION_NOTES]},{'id':'T-AB-04','name':'Scope-restricted\x20arbitration','description':'usage_guard\x20filters\x20which\x20disputes\x20can\x20be\x20filed.\x20Only\x20users\x20passing\x20the\x20Guard\x20can\x20file\x20disputes.\x20Suitable\x20for\x20verified-merchant\x20/\x20KYC\x20arbitration.','applicable_scenes':['arbitration_create','arbitration_usage_guard_config','arbitration_dispute'],'industry_tags':['kyc','verified_merchant','enterprise'],'params':[{'name':'owner_address','type':'address','description':'Arbitration\x20owner','required':!![]},{'name':'usage_guard_address','type':'address','description':'Guard\x20address\x20that\x20filters\x20who\x20can\x20file\x20disputes\x20(KYC/verification)','required':!![]},{'name':'coin_type','type':'string','description':'Coin\x20type','required':!![]},{'name':'description','type':'string','description':'Arbitration\x20description','required':!![]},{'name':'arbiter_address','type':'address','description':'Arbiter\x20address\x20(single\x20arbiter\x20for\x20simplicity)','required':!![]},{'name':'fee_amount','type':'number','description':'Dispute\x20fee\x20(higher\x20to\x20deter\x20spam)','required':![],'default':0x3b9aca00}],'body':a=>({'object':{'name':'restricted_arbitration','type_parameter':a['coin_type'],'permission':{'name':'restricted_arb_permission'}},'description':a['description'],'fee':String(a['fee_amount']??0x3b9aca00),'pause':![],'usage_guard':a['usage_guard_address']}),'notes':['usage_guard\x20set\x20→\x20disputes\x20MUST\x20be\x20filed\x20via\x20the\x20Passport-verified\x20dispute\x20variant','Guard\x20verifies:\x20KYC\x20/\x20membership\x20/\x20token-balance\x20/\x20etc.','Higher\x20fee\x20(default\x201\x20WOW)\x20to\x20deter\x20spam\x20from\x20verified\x20users','Arbiter\x20should\x20also\x20be\x20Guard-verified\x20for\x20consistency',...ARBITRATION_ACTIVATION_NOTES]},{'id':'T-AB-05','name':'Arbitration\x20committee','description':'Multi-arbiter\x20committee\x20with\x20weighted\x20voting\x20+\x20usage_guard.\x20Most\x20controlled\x20configuration\x20—\x20restricted\x20dispute\x20filing\x20+\x20weighted\x20voting\x20+\x20multi-arbiter\x20ruling.','applicable_scenes':['arbitration_create','arbitration_voting_guard_config','arbitration_usage_guard_config','arbitration_ruling'],'industry_tags':['enterprise','legal','high_value'],'params':[{'name':'owner_address','type':'address','description':'Committee\x20owner','required':!![]},{'name':'committee_guards','type':'string[]','description':'Guard\x20addresses\x20for\x20each\x20committee\x20member','required':!![]},{'name':'member_weights','type':'string[]','description':'Vote\x20weights\x20for\x20each\x20member\x20(parallel\x20to\x20committee_guards)','required':!![]},{'name':'membership_guard','type':'address','description':'usage_guard\x20for\x20dispute\x20filing\x20(membership\x20verification)','required':!![]},{'name':'coin_type','type':'string','description':'Coin\x20type','required':!![]},{'name':'description','type':'string','description':'Arbitration\x20description','required':!![]},{'name':'fee_amount','type':'number','description':'Dispute\x20fee\x20(high\x20for\x20high-value\x20disputes)','required':![],'default':0x2540be400}],'body':a=>{const b=a['committee_guards']['map']((c,d)=>({'guard':c,'vote_weight':{'FixedValue':Number(a['member_weights'][d]??0x1)}}));return{'object':{'name':'committee_arbitration','type_parameter':a['coin_type'],'permission':{'name':'committee_arb_permission'}},'description':a['description'],'fee':String(a['fee_amount']??0x2540be400),'pause':![],'voting_guard':{'op':'set','guards':b},'usage_guard':a['membership_guard']};},'notes':['Most\x20restrictive\x20config:\x20weighted\x20voting\x20+\x20restricted\x20filing','Suitable\x20for\x20high-value\x20B2B\x20disputes,\x20legal\x20arbitration,\x20enterprise\x20SLA\x20enforcement','Committee\x20members\x20should\x20have\x20clear\x20escalation\x20/\x20tiebreaker\x20rules','All\x20disputes\x20require\x20Passport\x20(both\x20filing\x20and\x20voting)',...ARBITRATION_ACTIVATION_NOTES]},{'id':'T-AB-06','name':'Fee-split\x20arbitration','description':'Pre-configured\x20fee-distribution\x20destination.\x20After\x20the\x20fee\x20withdrawal\x20(364),\x20fees\x20are\x20automatically\x20distributed\x20to\x20the\x20Allocation\x20(for\x20arbiter\x20compensation).','applicable_scenes':['arbitration_create','arbitration_arb_withdraw','arbitration_fees_alloc'],'industry_tags':['marketplace','service','platform'],'params':[{'name':'owner_address','type':'address','description':'Arbitration\x20owner','required':!![]},{'name':'allocation_address','type':'address','description':'Allocation\x20object\x20address\x20for\x20fee\x20distribution\x20to\x20arbiters','required':!![]},{'name':'coin_type','type':'string','description':'Coin\x20type','required':!![]},{'name':'description','type':'string','description':'Arbitration\x20description','required':!![]},{'name':'arbiter_address','type':'address','description':'Arbiter\x20(single\x20for\x20simplicity)','required':!![]},{'name':'fee_amount','type':'number','description':'Dispute\x20fee\x20(will\x20be\x20split\x20to\x20arbiters\x20via\x20Allocation)','required':![],'default':0x12a05f200}],'body':a=>({'object':{'name':'feesplit_arbitration','type_parameter':a['coin_type'],'permission':{'name':'feesplit_arb_permission'}},'description':a['description'],'fee':String(a['fee_amount']??0x12a05f200),'pause':![]}),'notes':['Fee-split\x20is\x20a\x202-step\x20process:\x20withdraw\x20fees\x20from\x20the\x20Arb\x20object\x20(364)\x20→\x20transfer\x20them\x20out\x20of\x20the\x20Arbitration\x20balance\x20(365/366)','Fee\x20withdrawal\x20(364)\x20moves\x20fees\x20from\x20the\x20Arb\x20object\x20into\x20the\x20Arbitration\x20balance','Fee\x20distribution\x20(365)\x20or\x20the\x20balance\x20transfer\x20(366)\x20moves\x20fees\x20to\x20the\x20Allocation/Treasury','Allocation\x20policy\x20determines\x20how\x20fees\x20are\x20split\x20among\x20arbiters','Payment\x20object\x20is\x20created\x20for\x20bookkeeping\x20(payment_remark\x20+\x20payment_index)',...ARBITRATION_ACTIVATION_NOTES]},{'id':'T-AB-07','name':'Appeal\x20arbitration\x20(reset\x20flow)','description':'Template\x20for\x20reset\x20operation\x20—\x20disputant\x20objects\x20to\x20ruling\x20and\x20resubmits\x20materials.\x20Restarts\x20Arb\x20lifecycle\x20from\x20Principal_confirming.','applicable_scenes':['arbitration_reset','arbitration_ruling'],'industry_tags':['legal','appeal','high_value'],'params':[{'name':'arbitration_object','type':'address','description':'Existing\x20Arbitration\x20object\x20address','required':!![]},{'name':'arb_address','type':'address','description':'Arb\x20object\x20address\x20to\x20reset\x20(must\x20be\x20in\x20Objectionable/Arbitrated\x20status)','required':!![]},{'name':'reset_feedback','type':'string','description':'Feedback\x20explaining\x20why\x20disputant\x20objects\x20to\x20the\x20ruling','required':!![]}],'body':a=>({'object':a['arbitration_object'],'reset':{'arb':a['arb_address'],'feedback':a['reset_feedback']}}),'notes':['Precondition:\x20Arb\x20must\x20be\x20in\x20Objectionable\x20(4)\x20or\x20Arbitrated\x20(3)\x20status','Post-condition:\x20Arb\x20status\x20→\x20Principal_confirming\x20(0),\x20lifecycle\x20restarts','Original\x20ruling\x20is\x20invalidated\x20—\x20new\x20voting\x20+\x20ruling\x20required','Consider\x20capping\x20reset\x20count\x20to\x20prevent\x20infinite\x20appeals','reset\x20feedback\x20is\x20permanent\x20—\x20recorded\x20on-chain\x20for\x20audit\x20trail']}];export const ARBITRATION_TEMPLATES_VERSION='1.0.0';export function getAllTemplates(){return[...ARBITRATION_TEMPLATES];}export function getTemplateById(a){return ARBITRATION_TEMPLATES['find'](b=>b['id']===a);}export function getTemplatesByScene(a){return ARBITRATION_TEMPLATES['filter'](b=>b['applicable_scenes']['includes'](a));}export function getTemplatesByIndustry(a){return ARBITRATION_TEMPLATES['filter'](b=>b['industry_tags']['includes'](a)||b['industry_tags']['includes']('universal'));}export function suggestTemplateForScene(a){const b=getTemplatesByScene(a);return b['length']>0x0?b[0x0]:undefined;}export function listTemplates(){return ARBITRATION_TEMPLATES['map'](a=>({'id':a['id'],'name':a['name'],'description':a['description'],'scenes':a['applicable_scenes']}));}export function fillTemplate(a,b){const c=getTemplateById(a);if(!c)return{'ok':![],'error':'Template\x20'+a+'\x20not\x20found'};for(const d of c['params']){if(d['required']&&!(d['name']in b))return{'ok':![],'error':'Missing\x20required\x20param:\x20'+d['name']};}return{'ok':!![],'body':c['body'](b)};}
|
|
@@ -53,6 +53,7 @@ export declare function lintReviewLockedTerminals(nodes: unknown[], guardPins: M
|
|
|
53
53
|
warnings: string[];
|
|
54
54
|
};
|
|
55
55
|
export declare function arbitrationVotingLockDetail(votingGuard: unknown): string | null;
|
|
56
|
+
export declare function arbitrationVotingGuardNoIdentityDetail(root: unknown, table?: unknown): string | null;
|
|
56
57
|
export declare function guardTimeProfileDetail(g: {
|
|
57
58
|
ref: string;
|
|
58
59
|
description?: unknown;
|
|
@@ -107,4 +108,4 @@ export declare function hasBlockingErrors(findings: AuditFinding[]): boolean;
|
|
|
107
108
|
export declare function getErrors(findings: AuditFinding[]): AuditFinding[];
|
|
108
109
|
export declare function getWarnings(findings: AuditFinding[]): AuditFinding[];
|
|
109
110
|
export declare function summarizeFindings(findings: AuditFinding[]): string;
|
|
110
|
-
export declare const AUDIT_RULES_VERSION =
|
|
111
|
+
export declare const AUDIT_RULES_VERSION = 12;
|