@wowok/agent-mcp 3.4.1 → 3.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.build-stamp.json +5 -0
- package/dist/chain-semantics/composition-truth.js +1 -1
- package/dist/chain-semantics/eval-order.js +1 -1
- package/dist/chain-semantics/field-capability.js +1 -1
- package/dist/chain-semantics/freeze-map.js +1 -1
- package/dist/chain-semantics/fund-flow.js +1 -1
- package/dist/chain-semantics/guard-verbs.js +1 -1
- package/dist/chain-semantics/object-graph.js +1 -1
- package/dist/composition/audit.js +1 -1
- package/dist/composition/compile.d.ts +10 -3
- package/dist/composition/compile.js +1 -1
- package/dist/composition/emit-phases.d.ts +30 -2
- package/dist/composition/emit-phases.js +1 -1
- package/dist/composition/guard-fill.d.ts +8 -0
- package/dist/composition/guard-fill.js +1 -1
- package/dist/composition/inflight.js +1 -1
- package/dist/composition/input-normalize.js +1 -1
- package/dist/composition/materialize.d.ts +2 -0
- package/dist/composition/materialize.js +1 -1
- package/dist/composition/mode-gates.js +1 -1
- package/dist/composition/param-disclosure.js +1 -1
- package/dist/composition/plan-retry-ledger.d.ts +16 -0
- package/dist/composition/plan-retry-ledger.js +1 -1
- package/dist/composition/plan.d.ts +15 -1
- package/dist/composition/plan.js +1 -1
- package/dist/config/config-audit.spec.js +1 -1
- package/dist/config/judgment.d.ts +5 -0
- package/dist/config/judgment.js +1 -1
- package/dist/evaluation/builtins/arbitration-score.d.ts +1 -0
- package/dist/evaluation/builtins/arbitration-score.js +1 -1
- package/dist/evaluation/builtins/demand-match.js +1 -1
- package/dist/evaluation/builtins/graph-service.d.ts +8 -0
- package/dist/evaluation/builtins/graph-service.js +1 -1
- package/dist/evaluation/capability.d.ts +9 -0
- package/dist/evaluation/engine.js +1 -1
- package/dist/evaluation/extract.d.ts +9 -1
- package/dist/evaluation/extract.js +1 -1
- package/dist/evaluation/match-operation.js +1 -1
- package/dist/evaluation/match-policy.d.ts +5 -3
- package/dist/evaluation/match-policy.js +1 -1
- package/dist/evaluation/standards.d.ts +1 -0
- package/dist/evaluation/standards.js +1 -1
- package/dist/evaluation/structured-lines.js +1 -1
- package/dist/evaluation/types.d.ts +1 -0
- 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/index.js +1 -1
- package/dist/intent/types.d.ts +1 -1
- package/dist/intent/types.js +1 -1
- package/dist/knowledge/allocation-ledger.js +1 -1
- package/dist/knowledge/allocator-rail-verifier.d.ts +17 -1
- package/dist/knowledge/allocator-rail-verifier.js +1 -1
- package/dist/knowledge/arb-fund-facts.d.ts +7 -0
- package/dist/knowledge/arb-fund-facts.js +1 -1
- package/dist/knowledge/arbitration-rail-verifier.d.ts +35 -0
- package/dist/knowledge/arbitration-rail-verifier.js +1 -0
- package/dist/knowledge/arbitration-templates.js +1 -1
- package/dist/knowledge/audit-rules.d.ts +13 -1
- package/dist/knowledge/audit-rules.js +1 -1
- package/dist/knowledge/baselines/judgment-baselines.json +1 -0
- package/dist/knowledge/baselines/rules/guard.json +7 -6
- package/dist/knowledge/baselines/rules/progress.json +4 -4
- package/dist/knowledge/baselines/rules/reward.json +118 -3
- package/dist/knowledge/builtin-templates.d.ts +19 -2
- package/dist/knowledge/builtin-templates.js +1 -1
- package/dist/knowledge/chain-query-registry.d.ts +14 -0
- package/dist/knowledge/chain-query-registry.js +1 -0
- package/dist/knowledge/event-semantics.js +1 -1
- package/dist/knowledge/fee-param-bindings.d.ts +2 -0
- package/dist/knowledge/fee-param-bindings.js +1 -1
- package/dist/knowledge/getting-started.js +1 -1
- package/dist/knowledge/guard-binding-table.js +1 -1
- package/dist/knowledge/guard-binding-verifier.d.ts +7 -0
- package/dist/knowledge/guard-binding-verifier.js +1 -1
- package/dist/knowledge/guard-bindings.js +1 -1
- package/dist/knowledge/guard-design-patterns.d.ts +1 -1
- package/dist/knowledge/guard-design-patterns.js +1 -1
- package/dist/knowledge/guard-field-cognition.js +1 -1
- package/dist/knowledge/guard-host-context.js +1 -1
- package/dist/knowledge/guard-lint.js +1 -1
- package/dist/knowledge/guard-node-gates.d.ts +3 -1
- package/dist/knowledge/guard-node-gates.js +1 -1
- package/dist/knowledge/guard-puzzle.js +1 -1
- package/dist/knowledge/guard-render.js +1 -1
- package/dist/knowledge/guard-risk.js +1 -1
- package/dist/knowledge/guard-templates.d.ts +2 -1
- package/dist/knowledge/guard-templates.js +1 -1
- package/dist/knowledge/guard-translation.js +1 -1
- package/dist/knowledge/index.d.ts +2 -0
- package/dist/knowledge/index.js +1 -1
- package/dist/knowledge/industry-registry.js +1 -1
- package/dist/knowledge/jsonrpc-enum.js +1 -1
- package/dist/knowledge/knob-docs.js +1 -1
- package/dist/knowledge/param-schema.d.ts +1 -1
- package/dist/knowledge/param-schema.js +1 -1
- package/dist/knowledge/param-tiers.d.ts +2 -0
- package/dist/knowledge/param-tiers.js +1 -1
- package/dist/knowledge/path-oracle/products/food-delivery.js +1 -1
- package/dist/knowledge/pattern-resolutions.d.ts +2 -0
- package/dist/knowledge/pattern-resolutions.js +1 -1
- package/dist/knowledge/product-detail-source.d.ts +37 -0
- package/dist/knowledge/product-detail-source.js +1 -0
- package/dist/knowledge/product-doc-b5.d.ts +16 -0
- package/dist/knowledge/product-doc-b5.js +1 -0
- package/dist/knowledge/progress-ledger.js +1 -1
- package/dist/knowledge/projection.spec.js +1 -1
- package/dist/knowledge/publish-gate.d.ts +20 -0
- package/dist/knowledge/publish-gate.js +1 -0
- package/dist/knowledge/publish-readiness.d.ts +25 -0
- package/dist/knowledge/publish-readiness.js +1 -0
- package/dist/knowledge/publish-surface-contract.d.ts +16 -0
- package/dist/knowledge/publish-surface-contract.js +1 -0
- package/dist/knowledge/rail-exit-satisfiability.d.ts +25 -0
- package/dist/knowledge/rail-exit-satisfiability.js +1 -0
- package/dist/knowledge/reward-ledger.d.ts +1 -1
- package/dist/knowledge/reward-ledger.js +1 -1
- package/dist/knowledge/reward-risk.d.ts +1 -1
- package/dist/knowledge/reward-risk.js +1 -1
- package/dist/knowledge/scenario-modes.js +1 -1
- package/dist/knowledge/service-ledger.d.ts +3 -1
- package/dist/knowledge/service-ledger.js +1 -1
- package/dist/knowledge/template-loader.d.ts +41 -2
- package/dist/knowledge/template-loader.js +1 -1
- package/dist/knowledge/template-registry.js +1 -1
- package/dist/knowledge/template-scanner.d.ts +17 -0
- package/dist/knowledge/template-scanner.js +1 -1
- package/dist/knowledge/template-test-profiles.js +1 -1
- package/dist/knowledge/workflow-guidance.d.ts +4 -0
- package/dist/knowledge/workflow-guidance.js +1 -1
- package/dist/monitor/MonitorLoop.js +1 -1
- package/dist/monitor/normalize.d.ts +1 -1
- package/dist/monitor/normalize.js +1 -1
- package/dist/monitor/types.js +1 -1
- package/dist/participation/customer-interest.d.ts +4 -0
- package/dist/participation/customer-interest.js +1 -1
- package/dist/participation/game-context.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/radar-core.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/business-puzzle.js +1 -1
- package/dist/playbooks/service-build/machine-panorama.js +1 -1
- package/dist/playbooks/service-build/merchant-guide.d.ts +28 -3
- package/dist/playbooks/service-build/merchant-guide.js +1 -1
- package/dist/playbooks/service-build/object-panorama.d.ts +4 -0
- package/dist/playbooks/service-build/object-panorama.js +1 -1
- package/dist/playbooks/service-build/participation-radar.js +1 -1
- package/dist/playbooks/service-build/relationship-profile.js +1 -1
- package/dist/playbooks/service-build/service-panorama.js +1 -1
- package/dist/playbooks/service-build/service-quote.js +1 -1
- package/dist/review/index.js +1 -1
- package/dist/review/order.js +1 -1
- package/dist/safety/confirm-gate.js +1 -1
- package/dist/schema/benchmark-migration/index.d.ts +24 -0
- package/dist/schema/benchmark-migration/index.js +1 -1
- package/dist/schema/call/allocation.d.ts +11 -7
- package/dist/schema/call/allocation.js +1 -1
- package/dist/schema/call/arbitration.d.ts +4 -0
- package/dist/schema/call/arbitration.js +1 -1
- package/dist/schema/call/base.d.ts +28 -0
- package/dist/schema/call/base.js +1 -1
- package/dist/schema/call/bridge.d.ts +21 -0
- package/dist/schema/call/contact.d.ts +4 -0
- package/dist/schema/call/demand.d.ts +4 -0
- package/dist/schema/call/guard.d.ts +12 -0
- package/dist/schema/call/handler.d.ts +1 -0
- package/dist/schema/call/handler.js +1 -1
- package/dist/schema/call/machine.d.ts +16 -8
- package/dist/schema/call/normalize-error.d.ts +1 -0
- package/dist/schema/call/normalize-error.js +1 -0
- package/dist/schema/call/order.d.ts +7 -3
- package/dist/schema/call/order.js +1 -1
- package/dist/schema/call/payment.d.ts +7 -3
- package/dist/schema/call/permission.d.ts +4 -0
- package/dist/schema/call/personal.d.ts +4 -0
- package/dist/schema/call/progress.d.ts +4 -0
- package/dist/schema/call/progress.js +1 -1
- package/dist/schema/call/proof.d.ts +8 -0
- package/dist/schema/call/proof.js +1 -1
- package/dist/schema/call/receipt.js +1 -1
- package/dist/schema/call/repository.d.ts +4 -0
- package/dist/schema/call/reward.d.ts +6 -2
- package/dist/schema/call/reward.js +1 -1
- package/dist/schema/call/semantic.d.ts +2 -2
- package/dist/schema/call/semantic.js +1 -1
- package/dist/schema/call/service.d.ts +21 -7
- package/dist/schema/call/service.js +1 -1
- package/dist/schema/call/treasury.d.ts +10 -6
- package/dist/schema/common/index.js +1 -1
- package/dist/schema/envelope-unify.d.ts +1 -0
- package/dist/schema/envelope-unify.js +1 -1
- package/dist/schema/evaluation/index.d.ts +43 -0
- package/dist/schema/evaluation/index.js +1 -1
- package/dist/schema/goal/index.d.ts +14 -2
- package/dist/schema/goal/planning.d.ts +18 -0
- package/dist/schema/goal/planning.js +1 -1
- package/dist/schema/intent-radar/index.d.ts +12 -0
- package/dist/schema/intent-radar/index.js +1 -1
- package/dist/schema/keeper/index.d.ts +1 -0
- package/dist/schema/local/index.d.ts +10 -0
- package/dist/schema/local/index.js +1 -1
- package/dist/schema/local/wip.js +1 -1
- package/dist/schema/messenger/index.d.ts +1 -0
- package/dist/schema/messenger/index.js +1 -1
- package/dist/schema/operations.d.ts +98 -13
- package/dist/schema/operations.js +1 -1
- package/dist/schema/persona/index.d.ts +22 -0
- package/dist/schema/query/bi.d.ts +28 -2
- package/dist/schema/query/bi.js +1 -1
- package/dist/schema/query/index.d.ts +67 -61
- package/dist/schema/query/index.js +1 -1
- package/dist/schema/schema-version.js +1 -1
- package/dist/schema/workflow/index.js +1 -1
- package/dist/schema-query-impl/index.d.ts +1 -0
- package/dist/schema-query-impl/index.js +1 -1
- package/dist/schemas/account_operation.output.json +2 -1
- package/dist/schemas/benchmark_migration_operation.output.json +74 -0
- package/dist/schemas/benchmark_migration_operation.schema.json +33 -1
- package/dist/schemas/bridge_operation.output.json +2 -1
- package/dist/schemas/bridge_operation.schema.json +40 -0
- package/dist/schemas/evaluation_operation.output.json +96 -0
- package/dist/schemas/evaluation_operation.schema.json +39 -0
- package/dist/schemas/goal_operation.schema.json +32 -0
- package/dist/schemas/guard2file.schema.json +8 -0
- package/dist/schemas/index.json +1 -1
- package/dist/schemas/intent_radar.output.json +10 -2
- package/dist/schemas/intent_radar.schema.json +5 -1
- package/dist/schemas/keeper_operation.output.json +2 -1
- package/dist/schemas/local_cache_operation.output.json +2 -1
- package/dist/schemas/local_history_operation.output.json +2 -1
- package/dist/schemas/local_info_operation.output.json +2 -1
- package/dist/schemas/local_mark_operation.output.json +2 -1
- package/dist/schemas/local_mark_operation.schema.json +10 -1
- package/dist/schemas/machineNode2file.schema.json +8 -0
- package/dist/schemas/messenger_operation.output.json +2 -1
- package/dist/schemas/messenger_operation.schema.json +2 -1
- package/dist/schemas/monitor_events.output.json +2 -1
- package/dist/schemas/monitor_subscription.output.json +2 -1
- package/dist/schemas/onchain_events.output.json +206 -13
- package/dist/schemas/onchain_events.schema.json +16 -0
- package/dist/schemas/onchain_operations.output.json +22 -3
- package/dist/schemas/onchain_operations.schema.json +982 -327
- package/dist/schemas/onchain_operations_allocation.schema.json +20 -13
- package/dist/schemas/onchain_operations_arbitration.schema.json +9 -1
- package/dist/schemas/onchain_operations_contact.schema.json +8 -0
- package/dist/schemas/onchain_operations_demand.schema.json +8 -0
- package/dist/schemas/onchain_operations_gen_passport.schema.json +8 -0
- package/dist/schemas/onchain_operations_gen_proof.schema.json +8 -0
- package/dist/schemas/onchain_operations_guard.schema.json +655 -115
- package/dist/schemas/onchain_operations_machine.schema.json +11 -3
- package/dist/schemas/onchain_operations_order.schema.json +14 -11
- package/dist/schemas/onchain_operations_payment.schema.json +12 -9
- package/dist/schemas/onchain_operations_permission.schema.json +8 -0
- package/dist/schemas/onchain_operations_personal.schema.json +8 -0
- package/dist/schemas/onchain_operations_progress.schema.json +9 -1
- package/dist/schemas/onchain_operations_proof.schema.json +9 -1
- package/dist/schemas/onchain_operations_repository.schema.json +8 -0
- package/dist/schemas/onchain_operations_reward.schema.json +14 -11
- package/dist/schemas/onchain_operations_service.schema.json +25 -12
- package/dist/schemas/onchain_operations_treasury.schema.json +17 -19
- package/dist/schemas/onchain_table_data.output.json +52 -10
- package/dist/schemas/persona_operation.output.json +57 -0
- package/dist/schemas/persona_operation.schema.json +9 -0
- package/dist/schemas/query_toolkit.output.json +326 -23
- package/dist/schemas/query_toolkit.schema.json +18 -5
- package/dist/schemas/wip_file.output.json +2 -2
- package/dist/schemas/wip_file.schema.json +2 -2
- package/dist/schemas/workflow_operation.schema.json +1 -1
- package/dist/tools/error-catalog.d.ts +17 -0
- package/dist/tools/error-catalog.js +1 -0
- package/dist/tools/handlers/benchmark-migration.d.ts +29 -8
- package/dist/tools/handlers/benchmark-migration.js +1 -1
- package/dist/tools/handlers/config.js +1 -1
- package/dist/tools/handlers/entry-edge-recipe.d.ts +101 -0
- package/dist/tools/handlers/entry-edge-recipe.js +1 -0
- package/dist/tools/handlers/escrow-deficit.d.ts +10 -0
- package/dist/tools/handlers/escrow-deficit.js +1 -0
- package/dist/tools/handlers/evaluation.js +1 -1
- package/dist/tools/handlers/fund-rail-recipe.d.ts +10 -0
- package/dist/tools/handlers/fund-rail-recipe.js +1 -0
- package/dist/tools/handlers/intent-radar.js +1 -1
- package/dist/tools/handlers/local.js +1 -1
- package/dist/tools/handlers/mark-namespace.d.ts +30 -0
- package/dist/tools/handlers/mark-namespace.js +1 -0
- package/dist/tools/handlers/messenger.js +1 -1
- package/dist/tools/handlers/onchain-name-registration.d.ts +1 -0
- package/dist/tools/handlers/onchain-name-registration.js +1 -1
- package/dist/tools/handlers/onchain-name-registration.spec.js +1 -1
- package/dist/tools/handlers/onchain.d.ts +40 -1
- package/dist/tools/handlers/onchain.js +1 -1
- package/dist/tools/handlers/publish-binding-echo.d.ts +22 -0
- package/dist/tools/handlers/publish-binding-echo.js +1 -0
- package/dist/tools/handlers/query.d.ts +1 -1
- package/dist/tools/handlers/query.js +1 -1
- package/dist/tools/handlers/review-chain.d.ts +1 -0
- package/dist/tools/handlers/review-chain.js +1 -1
- package/dist/tools/handlers/schema-query.js +1 -1
- package/dist/tools/handlers/stale-build-check.d.ts +9 -0
- package/dist/tools/handlers/stale-build-check.js +1 -0
- package/dist/tools/handlers/submission-assembly.d.ts +55 -0
- package/dist/tools/handlers/submission-assembly.js +1 -0
- package/dist/tools/handlers/wip.js +1 -1
- package/dist/tools/index.d.ts +1 -0
- package/dist/tools/index.js +1 -1
- package/dist/tools/move-fn-index.gen.js +1 -1
- package/dist/tools/publish-gate-state.d.ts +5 -0
- package/dist/tools/publish-gate-state.js +1 -0
- package/dist/tools/registry/business.js +1 -1
- package/dist/tools/registry/onchain.js +1 -1
- package/dist/tools/registry/query.js +1 -1
- package/dist/tools/retry.js +1 -1
- package/dist/tools/runtime-health.js +1 -1
- package/dist/tools/shared.js +1 -1
- package/dist/tools/upgrade-check.d.ts +1 -0
- package/dist/tools/upgrade-check.js +1 -1
- package/dist/tools/wip-verify-ledger.d.ts +2 -0
- package/dist/tools/wip-verify-ledger.js +1 -1
- package/dist/tools/wrap.d.ts +15 -1
- package/dist/tools/wrap.js +1 -1
- package/package.json +5 -3
package/dist/review/order.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export function groupRelated(a){const b=new Map();for(const c of a){const d=c['object_type']||'Unknown',e=b['get'](d);if(e)e['push']({'address':c['address'],'time':c['time']});else b['set'](d,[{'address':c['address'],'time':c['time']}]);}return[...b['entries']()]['map'](([f,g])=>({'label':f,'items':g}))['sort']((f,g)=>(g['items'][0x0]?.['time']??0x0)-(f['items'][0x0]?.['time']??0x0));}export function assembleOrderReview(a){const b=a['fields'],c=b['amount_display']||null,d=[{'label':'Required\x20info','tip':'Buyer-submitted\x20private\x20info\x20(order.required_info,\x20buyer-updatable):\x20the\x20buyer\x27s\x20messenger\x20Contact\x20object\x20or\x20a\x20WTS\x20proof\x20id,\x20shared\x20with\x20the\x20merchant\x20to\x20satisfy\x20the\x20Service\x27s\x20customer\x20requirements.','value':b['required_info']?{'t':'addr','v':b['required_info']}:null},{'label':'Owner','tip':'The\x20account\x20that\x20created\x20(bought)\x20this\x20order\x20(order.owner)','value':b['owner']?{'t':'addr','v':b['owner']}:null},{'label':'Created\x20at','tip':'When\x20the\x20buyer\x20created\x20this\x20order\x20(order.time).\x20The\x20top-right\x20stamp\x20is\x20the\x20UPDATED\x20time\x20(last\x20on-chain\x20tx)\x20—\x20two\x20distinct\x20clocks.','value':b['time']!=null?{'t':'time','v':b['time']}:null}],e=[{'label':'Progress','value':{'t':'progress','v':b['progress']??'','node':a['progress_next'],'since':a['progress_since'],'machine':b['machine']??null}},{'label':'Disputes','tip':'Arbitration\x20objects\x20that\x20opened\x20a\x20dispute\x20on\x20this\x20order\x20(order.dispute,\x20max\x2010)','value':{'t':'count','n':a['disputes']['length'],'panel_title':'Disputes','addrs':a['disputes']}},...b['claimed_by']?[{'label':'Claimed\x20by','tip':'Compensation\x20claimant\x20—\x20the\x20Arbitration\x20object\x20that\x20claimed\x20the\x20order\x27s\x20compensation\x20(order.compensate).\x20Once\x20set,\x20the\x20order\x20can\x20no\x20longer\x20be\x20claimed\x20or\x20disputed.','value':{'t':'addr','v':b['claimed_by']}}]:[]],g={'kind':'items','title':'Bought\x20('+a['items']['length']+')','empty':'No\x20purchased\x20items\x20on\x20this\x20order\x20yet.','items':a['items']['map'](k=>({'name':k['name']??'--','meta':[{'label':'price','value':k['price_display']||k['price']||'--'},{'label':'qty','value':k['quantity']??'--'}],'hash':k['wip_hash']??null}))},h={'kind':'fields','columns':0x2,'fields':[{'label':'Service','tip':'The\x20Service\x20this\x20order\x20was\x20placed\x20against.','value':b['service']?{'t':'addr','v':b['service'],'obj_type':'Service'}:null},{'label':'Machine','tip':'The\x20Machine\x20workflow\x20template\x20this\x20order\x20runs\x20through.\x20Empty\x20for\x20machine-less\x20orders.','value':b['machine']?{'t':'addr','v':b['machine'],'obj_type':'Machine'}:null},{'label':'Discount','tip':'The\x20Discount\x20object\x20applied\x20to\x20this\x20order\x20at\x20purchase\x20time.','value':b['discount']?{'t':'addr','v':b['discount'],'obj_type':'Discount'}:null},{'label':'Agents','tip':'Operator\x20accounts\x20besides\x20the\x20owner\x20that\x20can\x20act\x20on\x20this\x20order.','value':{'t':'count','n':a['agents']['length'],'panel_title':'Agents','addrs':a['agents']}},{'label':'Allocation','tip':'The\x20fund-splitting\x20object\x20bound\x20to\x20this\x20order\x20(order.allocation).\x20Green\x20\x27allocated\x27\x20=\x20balance\x20==\x200
|
|
1
|
+
export function groupRelated(a){const b=new Map();for(const c of a){const d=c['object_type']||'Unknown',e=b['get'](d);if(e)e['push']({'address':c['address'],'time':c['time']});else b['set'](d,[{'address':c['address'],'time':c['time']}]);}return[...b['entries']()]['map'](([f,g])=>({'label':f,'items':g}))['sort']((f,g)=>(g['items'][0x0]?.['time']??0x0)-(f['items'][0x0]?.['time']??0x0));}export function assembleOrderReview(a){const b=a['fields'],c=b['amount_display']||null,d=[{'label':'Required\x20info','tip':'Buyer-submitted\x20private\x20info\x20(order.required_info,\x20buyer-updatable):\x20the\x20buyer\x27s\x20messenger\x20Contact\x20object\x20or\x20a\x20WTS\x20proof\x20id,\x20shared\x20with\x20the\x20merchant\x20to\x20satisfy\x20the\x20Service\x27s\x20customer\x20requirements.','value':b['required_info']?{'t':'addr','v':b['required_info']}:null},{'label':'Owner','tip':'The\x20account\x20that\x20created\x20(bought)\x20this\x20order\x20(order.owner)','value':b['owner']?{'t':'addr','v':b['owner']}:null},{'label':'Created\x20at','tip':'When\x20the\x20buyer\x20created\x20this\x20order\x20(order.time).\x20The\x20top-right\x20stamp\x20is\x20the\x20UPDATED\x20time\x20(last\x20on-chain\x20tx)\x20—\x20two\x20distinct\x20clocks.','value':b['time']!=null?{'t':'time','v':b['time']}:null}],e=[{'label':'Progress','value':{'t':'progress','v':b['progress']??'','node':a['progress_current']??a['progress_next'],'since':a['progress_since'],'machine':b['machine']??null}},{'label':'Disputes','tip':'Arbitration\x20objects\x20that\x20opened\x20a\x20dispute\x20on\x20this\x20order\x20(order.dispute,\x20max\x2010)','value':{'t':'count','n':a['disputes']['length'],'panel_title':'Disputes','addrs':a['disputes']}},...b['claimed_by']?[{'label':'Claimed\x20by','tip':'Compensation\x20claimant\x20—\x20the\x20Arbitration\x20object\x20that\x20claimed\x20the\x20order\x27s\x20compensation\x20(order.compensate).\x20Once\x20set,\x20the\x20order\x20can\x20no\x20longer\x20be\x20claimed\x20or\x20disputed.','value':{'t':'addr','v':b['claimed_by']}}]:[]],g={'kind':'items','title':'Bought\x20('+a['items']['length']+')','empty':'No\x20purchased\x20items\x20on\x20this\x20order\x20yet.','items':a['items']['map'](k=>({'name':k['name']??'--','meta':[{'label':'price','value':k['price_display']||k['price']||'--'},{'label':'qty','value':k['quantity']??'--'}],'hash':k['wip_hash']??null}))},h={'kind':'fields','columns':0x2,'fields':[{'label':'Service','tip':'The\x20Service\x20this\x20order\x20was\x20placed\x20against.','value':b['service']?{'t':'addr','v':b['service'],'obj_type':'Service'}:null},{'label':'Machine','tip':'The\x20Machine\x20workflow\x20template\x20this\x20order\x20runs\x20through.\x20Empty\x20for\x20machine-less\x20orders.','value':b['machine']?{'t':'addr','v':b['machine'],'obj_type':'Machine'}:null},{'label':'Discount','tip':'The\x20Discount\x20object\x20applied\x20to\x20this\x20order\x20at\x20purchase\x20time.','value':b['discount']?{'t':'addr','v':b['discount'],'obj_type':'Discount'}:null},{'label':'Agents','tip':'Operator\x20accounts\x20besides\x20the\x20owner\x20that\x20can\x20act\x20on\x20this\x20order.','value':{'t':'count','n':a['agents']['length'],'panel_title':'Agents','addrs':a['agents']}},{'label':'Allocation','tip':'The\x20fund-splitting\x20object\x20bound\x20to\x20this\x20order\x20(order.allocation).\x20Green\x20\x27allocated\x27\x20=\x20balance\x20==\x200\x20—\x20the\x20pool\x20is\x20ALREADY\x20DRAINED:\x20fully\x20split\x20to\x20recipients\x20(allocation.alloc),\x20the\x20money\x20has\x20left\x20the\x20pool\x20(it\x20is\x20not\x20sitting\x20there).\x20Amber\x20\x27pending\x27\x20=\x20balance\x20>\x200\x20(still\x20funding\x20the\x20split).','value':b['allocation']?{'t':'addr','v':b['allocation'],'obj_type':'Allocation','badge':a['allocation_state']==='allocated'?{'v':'allocated','tone':'green'}:a['allocation_state']==='pending'?{'v':'pending','tone':'amber'}:undefined}:null},{'label':'Progress','tip':'The\x20Progress\x20object\x20tracking\x20this\x20order\x20through\x20the\x20machine\x20workflow\x20(order.progress);\x20its\x20latest\x20node\x20and\x20elapsed\x20time\x20show\x20on\x20the\x20header\x20card.','value':b['progress']?{'t':'addr','v':b['progress'],'obj_type':'Progress'}:null}]},i=a['related']?.['items']??[],j={'kind':'related','title':'Related\x20objects'+(a['related']?.['count']?'\x20('+a['related']['count']+')':''),'empty':'No\x20other\x20on-chain\x20objects\x20reference\x20or\x20use\x20this\x20Order\x20yet.','groups':groupRelated(i),'count':a['related']?.['count']??i['length']};return{'action':'review_pack','object_type':'Order','head':{'address':a['object'],'network':a['network'],'name':a['head']['name'],'description':a['head']['description'],'tags':a['head']['tags'],'last_active_ms':a['updated_ms'],'badges':[],...c?{'amount':{'text':c,'tip':b['amount_tip']||'Order\x20total\x20in\x20the\x20shop\x27s\x20payment\x20token\x20(Service<T>\x20generic).'}}:{},'info_rows':[d,e]},'sections':[g,h,j],'data_gaps':a['data_gaps']};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{CONFIRMATION_RULES,resolveOverrideId}from'../knowledge/safety-rules.js';import{isEnabled as
|
|
1
|
+
import{normalizeErrorMessage}from'../schema/call/normalize-error.js';import{CONFIRMATION_RULES,resolveOverrideId}from'../knowledge/safety-rules.js';import{isEnabled as a470a}from'../config/index.js';import{isPlanPreapproved}from'../goal/plan-approval.js';export function isConfirmGateEnabled(){return a470a('confirm_gate');}const internalErrorCounts={};function logInternalError(a,b){const c=a;internalErrorCounts[c]=(internalErrorCounts[c]??0x0)+0x1;const d=internalErrorCounts[c];console['warn']('[ConfirmGate]\x20internal_error\x20context=\x22'+a+'\x22\x20count='+d+'\x20error='+normalizeErrorMessage(b));}export function getFailMode(a){switch(a){case'irreversible':case'publish':case'amount':return'closed';case'standard':case'none':default:return'open';}}function buildInternalErrorResult(a,b,c){const d=b!==undefined?normalizeErrorMessage(b):undefined;return{'pass':![],'level':'irreversible','preview':{'level':'irreversible','operation':a,'irreversible':!![],'warnings':[...c?['ConfirmGate\x20rule\x20\x27'+c+'\x27\x20matched\x20but\x20its\x20preview\x20could\x20not\x20be\x20generated.']:['An\x20error\x20occurred\x20while\x20matching\x20confirmation\x20rules.'],...d!==undefined?['Reason:\x20'+d]:[],'The\x20operation\x20was\x20NOT\x20executed.\x20Review\x20the\x20parameters\x20for\x20malformed\x20values\x20(e.g.\x20decimal\x20amounts\x20instead\x20of\x20smallest-unit\x20integers)\x20before\x20confirming.']},'rule_id':'internal_error'};}function emitGuardQuietNotice(a,b,c,d,f){try{const g=f['preview'](a,b,c),h=['[ConfirmGate]\x20guard\x20CREATE\x20proceeded\x20WITHOUT\x20interactive\x20confirmation\x20(confirm_mode:\x20'+d+').','\x20\x20Object:\x20'+String(g['object']??'(unnamed)')+'\x20\x20Network:\x20'+String(g['network']??'?'),...(g['warnings']??[])['map'](i=>'\x20\x20-\x20'+i),'\x20\x20Immutable\x20after\x20creation\x20—\x20changes\x20require\x20a\x20NEW\x20guard\x20+\x20rebind.\x20Verify\x20with\x20analyze_guard_semantics\x20after\x20creation.'];console['warn'](h['join']('\x0a'));}catch(i){console['warn']('[ConfirmGate]\x20guard\x20CREATE\x20proceeded\x20in\x20'+d+'\x20mode\x20(manifest\x20unavailable:\x20'+(i instanceof Error?i['message']:String(i))+')');}}export function confirmGate(a,b,c,d,f,g){if(!isConfirmGateEnabled())return{'pass':!![]};if(c?.['confirmed']===!![])return{'pass':!![]};if(c?.['dry_run']===!![])return{'pass':!![]};let h,i=null;try{h=CONFIRMATION_RULES['find'](n=>{try{return n['when'](a,b,c);}catch(o){logInternalError('rule_when:'+n['id'],o);if(getFailMode(n['level'])==='closed')throw o;return![];}});}catch(n){i=n;}if(i)return logInternalError('rule_search',i),buildInternalErrorResult(a,i);if(!h)return{'pass':!![]};if(getFailMode(h['level'])==='open'&&isPlanPreapproved(c))return{'pass':!![]};const j=resolveOverrideId(h['id'],a),k=j?f?.[j]:undefined;if(k==='auto')return{'pass':!![]};const l=c?.['confirm_mode']==='quiet'||c?.['confirm_mode']==='streamlined'?c['confirm_mode']:'full';if(l!=='full'&&k!=='block'&&getFailMode(h['level'])==='open')return{'pass':!![]};if(h['id']==='guard_create_immutable'&&l!=='full'&&k!=='block')return emitGuardQuietNotice(a,b,c,l,h),{'pass':!![]};if(k!=='block'&&g?.['intent_bypass']!==![]&&h['bypass_on_explicit_intent']&&d&&d['length']>0x0){const o=d['map'](q=>q['toLowerCase']()),p=h['bypass_on_explicit_intent']['some'](q=>o['some'](r=>r['includes'](q['toLowerCase']())));if(p)return{'pass':!![]};}let m;try{m=h['preview'](a,b,c);}catch(q){logInternalError('rule_preview:'+h['id'],q);if(getFailMode(h['level'])==='closed')return buildInternalErrorResult(a,q,h['id']);return{'pass':!![]};}return{'pass':![],'level':h['level'],'preview':m,'rule_id':h['id']};}export function isExplicitlyConfirmed(a){return a?.['confirmed']===!![];}
|
|
@@ -85,6 +85,12 @@ export declare const BenchmarkMigrationSchema: z.ZodObject<{
|
|
|
85
85
|
}>>;
|
|
86
86
|
reward_funding: z.ZodOptional<z.ZodString>;
|
|
87
87
|
reward_claim_amount: z.ZodOptional<z.ZodString>;
|
|
88
|
+
experience_compensation_mode: z.ZodOptional<z.ZodEnum<{
|
|
89
|
+
reward: "reward";
|
|
90
|
+
none: "none";
|
|
91
|
+
}>>;
|
|
92
|
+
experience_pool_funding: z.ZodOptional<z.ZodString>;
|
|
93
|
+
compensation_fund: z.ZodOptional<z.ZodString>;
|
|
88
94
|
after_sales_mode: z.ZodOptional<z.ZodEnum<{
|
|
89
95
|
none: "none";
|
|
90
96
|
return: "return";
|
|
@@ -127,6 +133,7 @@ export declare const BenchmarkMigrationSchema: z.ZodObject<{
|
|
|
127
133
|
claim_window: z.ZodString;
|
|
128
134
|
}, z.core.$strict>>;
|
|
129
135
|
}, z.core.$loose>>>;
|
|
136
|
+
allow_unpinned_wip: z.ZodOptional<z.ZodBoolean>;
|
|
130
137
|
log: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
131
138
|
network: z.ZodOptional<z.ZodEnum<{
|
|
132
139
|
testnet: "testnet";
|
|
@@ -141,6 +148,11 @@ export declare const BenchmarkMigrationSchema: z.ZodObject<{
|
|
|
141
148
|
step_id: z.ZodString;
|
|
142
149
|
note: z.ZodString;
|
|
143
150
|
}, z.core.$strip>>;
|
|
151
|
+
override_stale_build: z.ZodOptional<z.ZodBoolean>;
|
|
152
|
+
arbitration_vote_policy: z.ZodOptional<z.ZodEnum<{
|
|
153
|
+
open: "open";
|
|
154
|
+
party_panel: "party_panel";
|
|
155
|
+
}>>;
|
|
144
156
|
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
145
157
|
accounts: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
146
158
|
timeout_ms: z.ZodOptional<z.ZodNumber>;
|
|
@@ -525,6 +537,18 @@ export declare const BenchmarkMigrationOutputSchema: z.ZodObject<{
|
|
|
525
537
|
step_id: z.ZodString;
|
|
526
538
|
note: z.ZodString;
|
|
527
539
|
}, z.core.$strip>>;
|
|
540
|
+
digest_check: z.ZodOptional<z.ZodObject<{
|
|
541
|
+
plan_catalog_version: z.ZodNullable<z.ZodNumber>;
|
|
542
|
+
current_catalog_version: z.ZodNumber;
|
|
543
|
+
plan_template_digest: z.ZodNullable<z.ZodString>;
|
|
544
|
+
current_template_digest: z.ZodNullable<z.ZodString>;
|
|
545
|
+
template_digest_match: z.ZodOptional<z.ZodBoolean>;
|
|
546
|
+
}, z.core.$strip>>;
|
|
547
|
+
verdict_override: z.ZodOptional<z.ZodObject<{
|
|
548
|
+
parameter: z.ZodString;
|
|
549
|
+
reason: z.ZodString;
|
|
550
|
+
stale_build: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
551
|
+
}, z.core.$strip>>;
|
|
528
552
|
next_action: z.ZodString;
|
|
529
553
|
}, z.core.$strip>], "action">;
|
|
530
554
|
}, z.core.$strict>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{z}from'zod';import{GuardResolutionInputSchema}from'../goal/planning.js';import{SemanticIRInputSchema}from'../../knowledge/semantic-ir.js';import{CATALOG_INDUSTRIES}from'../../knowledge/catalog-facts.js';const TemplateSummarySchema=z['object']({'id':z['string']()['describe']('Template\x20id\x20\x27<industry>/<variant>\x27,\x20e.g.\x20\x27retail/scale-marketplace\x27.'),'industry':z['string']()['describe']('Industry\x20vertical.'),'variant':z['string']()['describe']('Business-model\x20variant\x20slug.'),'product_ref':z['string']()['optional']()['describe']('Benchmark\x20product\x20slug\x20this\x20archetype\x20models\x20(e.g.\x20\x27amazon\x27).\x20The\x20only\x20sanctioned\x20company\x20name;\x20users\x20can\x20pick\x20a\x20template\x20by\x20naming\x20the\x20incumbent\x20product.'),'archetype':z['enum'](['leader','challenger']),'key_risk':z['string']()['describe']('Primary\x20risk\x20this\x20template\x20mitigates.'),'node_count':z['number']()['describe']('Machine\x20node\x20count.'),'guard_count':z['number']()['describe']('Guard\x20template\x20count.'),'recommended_role':z['enum'](['merchant','supplier','both']),'tags':z['array'](z['string']())['describe']('Canonical\x20discovery\x20tags\x20this\x20template\x20answers\x20to\x20(curated\x20business-model\x20tags\x20+\x20its\x20variant\x20slug).\x20These\x20are\x20the\x20tokens\x20a\x20Semantic\x20IR\x20`discovery.tags`\x20entry\x20may\x20use.')})['describe']('Compact\x20template\x20listing\x20row.'),TemplateScanFindingSchema=z['object']({'rule_id':z['string']()['optional']()['describe']('Rule\x20id\x20when\x20known\x20(e.g.\x20\x27R-M3-01\x27,\x20\x27R1\x27).'),'severity':z['enum'](['low','medium','high','critical']),'title':z['string'](),'detail':z['string'](),'suggestion':z['string']()})['describe']('One\x20pre-deploy\x20risk\x20finding.'),StaleBuildDisclosureSchema=z['object']({'stale':z['boolean']()['describe']('4R-01\x20residual:\x20true\x20only\x20when\x20the\x20shared\x20src-vs-dist\x20mtime\x20detector\x20RESOLVED\x20and\x20found\x20the\x20running\x20dist\x20OLDER\x20than\x20the\x20workspace\x20src\x20—\x20the\x20scan/plan\x20verdicts\x20may\x20describe\x20superseded\x20template\x20knowledge.'),'known':z['boolean']()['describe']('False\x20when\x20the\x20detector\x20could\x20not\x20resolve\x20(installed\x20dist-only\x20package,\x20build\x20in\x20progress,\x20stat\x20error).\x20stale\x20is\x20then\x20NOT\x20evidence\x20of\x20freshness\x20—\x20treat\x20verdicts\x20as\x20unconfirmed.\x20Fail-open:\x20never\x20an\x20error.'),'actionable':z['boolean']()['describe']('rq-tn-261030-8693be\x20B11:\x20the\x20scan/plan\x20verdicts\x20under\x20this\x20face\x20are\x20fit\x20to\x20act\x20on\x20ONLY\x20when\x20true\x20(fresh\x20AND\x20known).\x20actionable=false\x20VOIDS\x20the\x20conclusions\x20in\x20the\x20same\x20response\x20—\x20rebuild\x20(pnpm\x20build)\x20and\x20re-run\x20before\x20acting\x20on\x20any\x20of\x20them.'),'lag_minutes':z['number']()['nullable']()['describe']('Whole\x20minutes\x20the\x20newest\x20compiled\x20artifact\x20lags\x20the\x20newest\x20source\x20file\x20(null\x20when\x20unknown).'),'detail':z['string']()['describe']('Human-readable\x20freshness\x20statement\x20(source/build\x20mtime\x20lag)\x20with\x20the\x20rebuild\x20remediation\x20when\x20stale.')})['describe']('Always-present\x20stale-build\x20disclosure\x20on\x20template_scan\x20/\x20template_generate\x20(reuses\x20computeSrcDistStaleness;\x20no\x20parallel\x20detector).'),MigrationEntrySchema=z['object']({'source_element':z['string']()['describe']('Competitor-side\x20element.'),'target_object':z['string']()['optional']()['describe']('WoWok\x20object/mechanism\x20it\x20maps\x20to.'),'mapping_note':z['string']()['describe']('One-line\x20mapping\x20explanation.'),'reason':z['string']()['optional']()['describe']('Why\x20it\x20cannot\x20be\x20migrated,\x20or\x20why\x20it\x20needs\x20a\x20decision.')})['describe']('One\x20competitor\x20element\x20and\x20its\x20WoWok\x20mapping\x20outcome.'),MigrationLogSchema=z['object']({'source':z['object']({'url':z['string']()['optional'](),'description':z['string'](),'detected_industry':z['string'](),'matched_template':z['string']()['describe']('Matched\x20template\x20id\x20\x27<industry>/<variant>\x27.')})['describe']('Migration\x20source\x20provenance.'),'template_match':z['object']({'source':z['enum'](['explicit','product_ref','discovery_product_ref','discovery_tags','keywords','ir_industry_fallback','industry_leader'])['describe']('Which\x20deterministic\x20pass\x20chose\x20the\x20template:\x20\x27explicit\x27\x20=\x20caller\x27s\x20template_id;\x20'+'\x27product_ref\x27\x20=\x20a\x20benchmark\x20product\x20named\x20in\x20the\x20text;\x20\x27discovery_product_ref\x27\x20=\x20the\x20'+'Semantic\x20IR\x20resolved\x20the\x20benchmark\x20product;\x20\x27discovery_tags\x27\x20=\x20the\x20IR\x27s\x20canonical\x20tags\x20'+'scored\x20the\x20variant;\x20\x27keywords\x27\x20=\x20English\x20keyword\x20scoring;\x20\x27ir_industry_fallback\x27\x20=\x20the\x20'+'IR\x20proved\x20the\x20industry\x20only;\x20\x27industry_leader\x27\x20=\x20an\x20explicit\x20industry\x20hint\x20with\x20no\x20match.'),'confidence':z['number']()['describe']('Match\x20confidence\x200-1\x20(only\x20an\x20exact\x20benchmark-product\x20hit\x20is\x201.0).'),'matched_tags':z['array'](z['string']())['optional']()['describe']('IR\x20tags\x20that\x20hit\x20this\x20template\x20(discovery_tags\x20only).')})['describe']('Template-match\x20provenance\x20—\x20why\x20this\x20template,\x20without\x20re-running\x20the\x20matcher.'),'mapped':z['array'](MigrationEntrySchema)['describe']('Elements\x20that\x20map\x20cleanly\x20to\x20WoWok\x20objects.'),'unmapped':z['array'](MigrationEntrySchema)['describe']('Elements\x20that\x20cannot\x20be\x20migrated,\x20with\x20reasons.'),'manual_review':z['array'](MigrationEntrySchema)['describe']('Elements\x20requiring\x20an\x20explicit\x20user\x20decision.'),'wowok_advantages':z['array'](z['string']())['describe']('WoWok\x20platform\x20advantages\x20surfaced\x20during\x20migration.'),'customizable_modules':z['array'](z['string']())['describe']('Business-module\x20ids\x20the\x20user\x20can\x20customize.'),'role_assessment':z['object']({'recommended':z['string'](),'rationale':z['string'](),'alternatives':z['array'](z['string']())})['describe']('Merchant\x20vs\x20supplier\x20role\x20assessment.'),'risk_check':z['object']({'passed':z['boolean'](),'findings':z['array'](z['string']())})['describe']('Dry-run\x20risk\x20check\x20against\x20the\x20matched\x20template.'),'requirement_coverage':z['array'](z['object']({'family':z['enum'](['fulfillment','after_sales','review_incentive','discount','privacy_channel']),'label':z['string'](),'status':z['enum'](['mapped','unmapped','blocker']),'evidence':z['string']()['describe']('The\x20matched\x20phrase\x20from\x20the\x20description\x20—\x20every\x20coverage\x20verdict\x20carries\x20its\x20evidence.'),'target':z['string']()['optional']()['describe']('The\x20WoWok\x20carrier\x20when\x20status=mapped.'),'note':z['string']()})['strict']())['optional']()['describe']('W5-07\x20(ks7\x20F-04/F-02):\x20explicit-promise\x20coverage\x20matrix.\x20Every\x20promise\x20family\x20the\x20description\x20hit\x20lands\x20in\x20exactly\x20ONE\x20of\x20'+'mapped/unmapped/blocker\x20—\x20a\x20stated\x20promise\x20can\x20never\x20silently\x20disappear.\x20status=\x27blocker\x27\x20=\x20the\x20matched\x20template\x20cannot\x20carry\x20the\x20'+'promise\x20as-is;\x20the\x20note\x20names\x20the\x20exact\x20build\x20decision\x20(declare\x20the\x20mode\x20/\x20compose\x20the\x20registered\x20fulfillment\x20combination)\x20required\x20before\x20migration_apply.\x20'+'Surface\x20every\x20blocker\x20to\x20the\x20user\x20at\x20migration_review.\x20Optional\x20only\x20so\x20logs\x20produced\x20before\x20W5-07\x20still\x20parse\x20—\x20fresh\x20migration_import\x20logs\x20ALWAYS\x20carry\x20it.'),'network':z['enum'](['testnet','mainnet','localnet'])['describe']('Target\x20network\x20(default\x20testnet).\x20\x27localnet\x27\x20labels\x20plans\x20validated\x20against\x20a\x20local\x20net\x20—\x20the\x20migration\x20pipeline\x20is\x20network-agnostic,\x20this\x20is\x20provenance\x20metadata,\x20not\x20an\x20execution\x20target.')})['describe']('Structured\x20competitor-migration\x20log.'),SaleItemIncentiveSchema=z['object']({'amount':z['string']()['describe']('Incentive\x20amount\x20as\x20a\x20buyer-readable\x20string\x20(e.g.\x20\x225\x20USDC\x22\x20or\x20\x221000000000\x20WOW\x20smallest\x20units\x22).\x20Quote-time\x20disclosure\x20only\x20—\x20fund\x20the\x20actual\x20rail\x20separately\x20(e.g.\x20the\x20template\x27s\x20review_reward_pool).'),'conditions':z['string']()['describe']('What\x20the\x20buyer\x20must\x20do\x20to\x20earn\x20it\x20(e.g.\x20\x22leave\x20a\x20written\x20+\x20rated\x20review\x20of\x20the\x20delivered\x20work\x22).\x20Must\x20be\x20perceptible\x20BEFORE\x20the\x20order\x20is\x20placed.'),'basis':z['string']()['describe']('Accrual\x20scope:\x20\x22per-order\x22\x20/\x20\x22once-per-buyer\x22\x20/\x20\x22once-per-buyer-per-order\x22.\x20Matches\x20the\x20claim\x20guard\x27s\x20replay\x20semantics\x20—\x20a\x20recipient-only\x20gate\x20is\x20once-per-buyer-for-life,\x20an\x20order-scoped\x20stamp\x20is\x20per-order\x20(SV-2).'),'claim_window':z['string']()['describe']('How\x20long\x20the\x20buyer\x20has\x20to\x20claim\x20(e.g.\x20\x2214\x20days\x20from\x20the\x20review\x22).\x20Mirror\x20the\x20reward\x20claim\x20guard\x27s\x20window\x20fee_param\x20so\x20the\x20quote\x20never\x20promises\x20more\x20than\x20the\x20rail\x20pays.')})['strict']()['describe']('Optional\x20structured\x20incentive\x20for\x20one\x20sale\x20item\x20(G-07):\x20buyer-perceivable\x20reward\x20terms\x20carried\x20to\x20the\x20compiled\x20plan\x20for\x20quote-time\x20disclosure.\x20DECLARATION\x20ONLY\x20—\x20the\x20chain\x20SaleItem\x20has\x20no\x20such\x20field;\x20the\x20actual\x20payout\x20rail\x20is\x20configured\x20separately.'),SaleItemPlanSchema=z['object']({'incentive':SaleItemIncentiveSchema['optional']()})['passthrough']()['describe']('One\x20sellable\x20SKU\x20in\x20the\x20plan\x20catalog:\x20the\x20chain\x20SaleItem\x20fields\x20plus\x20the\x20optional\x20structured\x20`incentive`\x20declaration\x20(G-07).\x20Unknown\x20keys\x20pass\x20through\x20so\x20chain-side\x20fields\x20can\x20evolve\x20without\x20schema\x20changes.');export const BenchmarkMigrationSchema=z['object']({'action':z['enum'](['template_list','template_get','template_generate','template_scan','migration_import','migration_review','migration_apply','plan_execute'])['describe']('Action:\x20\x27template_list\x27\x20=\x20list\x20the\x20loaded\x20MD\x20industry\x20templates\x20(optional\x20industry\x20filter);\x20'+'\x27template_get\x27\x20=\x20fetch\x20one\x20template\x20by\x20id\x20(template_id\x20required);\x20'+'\x27template_generate\x27\x20=\x20generate\x20a\x20creation\x20plan\x20from\x20a\x20template\x20via\x20the\x20merchant-guide\x20'+'pipeline\x20(template_id\x20required;\x20scan-first\x20—\x20CRITICAL\x20findings\x20block;\x20never\x20executes\x20on-chain);\x20'+'\x27template_scan\x27\x20=\x20pre-deploy\x20risk\x20scan\x20of\x20one\x20template\x20(template_id\x20required;\x20returns\x20'+'risk_level/findings/red_flags\x20plus\x20a\x20drift\x20face\x20—\x20disk-vs-catalog\x20provenance\x20of\x20the\x20'+'scanned\x20body;\x20CRITICAL\x20blocks\x20generation/apply);\x20'+'\x27migration_import\x27\x20=\x20competitor\x20URL/description\x20→\x20migration\x20plan\x20+\x20MigrationLog\x20'+'(description\x20required);\x20'+'\x27migration_review\x27\x20=\x20surface\x20the\x20MigrationLog\x20for\x20user\x20confirmation\x20(log\x20required);\x20'+'\x27migration_apply\x27\x20=\x20run\x20the\x20approved\x20template\x20through\x20the\x20merchant-guide\x20pipeline\x20'+'(template_id\x20required;\x20scan-first\x20—\x20CRITICAL\x20findings\x20block;\x20default\x20network\x20testnet);\x20'+'\x27plan_execute\x27\x20=\x20ONE-CLICK\x20DEPLOYMENT\x20(AR-5,\x20bsn7\x20T-06/R-01):\x20materialize\x20the\x20plan\x20returned\x20by\x20'+'template_generate\x20on-chain\x20—\x20preflight\x20freeze\x20gate,\x20topological\x20create/publish/configure,\x20readback.\x20'+'Resumable:\x20on\x20a\x20mid-run\x20failure,\x20re-send\x20with\x20completed_steps\x20+\x20previous_outputs\x20from\x20the\x20failed\x20'+'response\x20instead\x20of\x20re-running\x20from\x20scratch\x20(duplicate\x20objects).'),'template_id':z['string']()['optional']()['describe']('Template\x20id\x20\x27<industry>/<variant>\x27\x20(required\x20for\x20template_get\x20/\x20template_generate\x20/\x20template_scan\x20/\x20migration_apply),\x20e.g.\x20\x27retail/scale-marketplace\x27.'),'industry':z['string']()['optional']()['describe']('Industry\x20filter\x20for\x20template_list;\x20industry\x20hint\x20for\x20migration_import.\x20'+('Any\x20registered\x20industry\x20is\x20accepted\x20(builtin:\x20'+CATALOG_INDUSTRIES['join'](',\x20')+';\x20')+'plus\x20custom\x20industries\x20registered\x20via\x20industry\x20packs).\x20'+'Aliases\x20are\x20resolved\x20(e.g.\x20\x27ecommerce\x27\x20→\x20\x27retail\x27).'),'description':z['string']()['optional']()['describe']('Natural-language\x20business/competitor\x20description\x20(required\x20for\x20migration_import;\x20used\x20by\x20template_generate\x20as\x20the\x20intent\x20text).'),'semantic_ir':SemanticIRInputSchema['optional']()['describe']('Canonical\x20Semantic\x20IR\x20produced\x20by\x20the\x20CALLING\x20agent\x20for\x20a\x20NON-ENGLISH\x20(or\x20lexicon-outside)\x20description\x20—\x20this\x20server\x20runs\x20no\x20LLM.\x20'+'The\x20server\x20validates\x20it,\x20then\x20reuses\x20it\x20on\x20the\x20same\x20deterministic\x20surfaces\x20as\x20recommend_industry:\x20'+'(a)\x20migration_import\x20narrows\x20template\x20matching\x20to\x20the\x20IR-resolved\x20industry\x20and,\x20when\x20discovery.tags\x20are\x20supplied,\x20'+'selects\x20the\x20business-model\x20VARIANT\x20by\x20canonical\x20tag\x20coverage\x20(an\x20explicit\x20product_ref\x20or\x20\x27industry\x27\x20hint\x20still\x20wins);\x20'+'(b)\x20template_generate\x20/\x20migration_apply\x20read\x20the\x20numeric\x20claim\x20\x27reward_pool_amount\x27\x20as\x20the\x20review-reward\x20pool\x20prefill\x20—\x20'+'explicit\x20fee_overrides\x20>\x20IR\x20claim\x20>\x20the\x20English\x20regex\x20fallback.\x20'+'Shape:\x20{schema_version:\x202\x20(1\x20still\x20accepted),\x20locale:\x20\x27<BCP-47>\x27,\x20traits?,\x20domains?,\x20claims?:\x20[{key,\x20value,\x20confidence?}],\x20'+'discovery?:\x20{industry?,\x20tags?:\x20string[],\x20product_ref?,\x20english_summary?,\x20confidence?},\x20provenance:\x20{source:\x20\x27caller_llm\x27}}.\x20'+'discovery.tags\x20use\x20the\x20CLOSED\x20language-neutral\x20vocabulary\x20returned\x20by\x20template_list.discovery_vocabulary\x20'+'(canonical\x20English\x20business-model\x20tokens;\x20never\x20locale\x20words\x20—\x20translate\x20in\x20the\x20caller).\x20'+'discovery.product_ref\x20is\x20a\x20benchmark-product\x20slug,\x20discovery.industry\x20a\x20registered\x20industry,\x20and\x20discovery.english_summary\x20'+'is\x20a\x20canonical\x20English\x20restatement\x20used\x20only\x20for\x20keyword\x20fallback.\x20'+'Unknown\x20traits/domains/claims/tags/industries/product_refs\x20are\x20dropped\x20and\x20reported\x20in\x20semantic_ir_issues;\x20spans\x20and\x20quotes\x20'+'must\x20be\x20copied\x20verbatim\x20from\x20the\x20description\x20(unlocatable\x20evidence\x20is\x20dropped).'),'url':z['string']()['optional']()['describe']('Competitor\x20store/profile\x20URL\x20for\x20migration_import\x20(recorded\x20as\x20provenance\x20only).'),'fee_overrides':z['record'](z['string'](),z['union']([z['number'](),z['string']()]))['optional']()['describe']('Template\x20fee-parameter\x20overrides\x20for\x20template_generate\x20(e.g.\x20commission_rate_bps).'),'guard_resolutions':z['record'](z['string'](),GuardResolutionInputSchema)['optional']()['describe']('Judgment-layer\x20resolutions\x20for\x20pending\x20guard\x20designs\x20(C6-DEEP),\x20keyed\x20by\x20plan.pending_guard_designs[].key.\x20'+'A\x20blocked\x20migration_apply/template_generate\x20lists\x20every\x20unresolved\x20design\x20—\x20resolve\x20each\x20here\x20'+'(kind\x20\x27inline\x27\x20with\x20the\x20Guard\x20table+root,\x20or\x20kind\x20\x27template\x27\x20with\x20a\x20tpl_*\x20id)\x20and\x20re-run\x20the\x20action.\x20'+'Advisory\x20designs\x20that\x20do\x20not\x20apply\x20to\x20this\x20shop\x20may\x20be\x20resolved\x20with\x20{kind:\x27omit\x27}\x20instead\x20'+'(run75747\x20F-38:\x20honored\x20only\x20for\x20designs\x20with\x20no\x20inbound\x20binding;\x20an\x20omit\x20of\x20a\x20bound\x20design\x20'+'is\x20refused\x20with\x20GUARD_OMIT_UNSUPPORTED).\x20'+'The\x20audit\x20freeze\x20gate\x20still\x20decides:\x20resolutions\x20only\x20unblock\x20a\x20plan\x20whose\x20closed\x20audit\x20is\x20clean.'),'review_mode':z['enum'](['review','review_reward','none'])['optional']()['describe']('Per-build\x20review-rail\x20mode\x20(v53\x20templates).\x20Absent\x20=\x20the\x20template\x27s\x20declared\x20review_mode\x20applies.'),'reward_funding':z['string']()['optional']()['describe']('Review\x20reward\x20pool\x20funding,\x20smallest-unit\x20string.\x20HARD-REQUIRED\x20when\x20the\x20effective\x20review\x20mode\x20is\x20review_reward\x20(INV-4):\x20template_generate\x20refuses\x20the\x20build\x20up-front\x20with\x20error_code\x20\x27reward_funding_required\x27\x20rather\x20than\x20promising\x20an\x20unfunded\x20incentive\x20—\x20pass\x20this,\x20or\x20drop\x20the\x20mode\x20explicitly\x20(review_mode\x20\x27review\x27\x20keeps\x20the\x20rail\x20without\x20the\x20bounty;\x20\x27none\x27\x20removes\x20the\x20rail).\x20The\x20compile\x20kernel\x20also\x20blocks\x20with\x20REVIEW_REWARD_UNFUNDED\x20—\x20this\x20input\x20gate\x20just\x20fails\x20before\x20the\x20pipeline\x20runs.'),'reward_claim_amount':z['string']()['optional']()['describe']('Per-claim\x20reward\x20bounty\x20mounted\x20on\x20the\x20claim\x20guard_add,\x20smallest-unit\x20string.\x20Schema-required\x20on\x20the\x20mount\x20(BK15-F09):\x20compile\x20blocks\x20with\x20REVIEW_REWARD_AMOUNT_MISSING\x20when\x20absent\x20—\x20the\x20kernel\x20never\x20fabricates\x20a\x20real-money\x20parameter.'),'after_sales_mode':z['enum'](['return','exchange','warranty','none'])['optional']()['describe']('Per-build\x20after-sales\x20mode\x20(D12\x20refactor\x204).\x20Absent\x20=\x20the\x20template\x27s\x20declared\x20after_sales_mode\x20applies.\x20Declaring\x20a\x20mode\x20with\x20no\x20backing\x20rail\x20in\x20machine_shape\x20is\x20a\x20compile\x20blocker\x20(AFTER_SALES_RAIL_MISSING).'),'acceptance_mode':z['enum'](['milestone','contest','bounty','agent','none'])['optional']()['describe']('Per-build\x20acceptance/judging\x20mode\x20(D12\x20refactor\x202).\x20Absent\x20=\x20the\x20template\x27s\x20declared\x20acceptance_mode\x20applies.\x20A\x20judge-decided\x20mode\x20(contest/bounty/agent)\x20without\x20arbitration_mode\x20\x27third_party\x27\x20is\x20a\x20compile\x20blocker\x20(ACCEPTANCE_JUDGE_NOT_INDEPENDENT);\x20a\x20finite\x20revision_rounds_max\x20with\x20no\x20counter\x20Repository\x20guard\x20is\x20a\x20compile\x20blocker\x20(ACCEPTANCE_REVISION_UNBOUNDED).'),'installment_mode':z['enum'](['deposit_balance','milestone_n','none'])['optional']()['describe']('Per-build\x20installment/deposit\x20mode\x20(D12\x20refactor\x203).\x20Absent\x20=\x20the\x20template\x27s\x20declared\x20installment_mode\x20applies.\x20A\x20capture\x20forward\x20with\x20no\x20fund-gate\x20Guard\x20is\x20a\x20compile\x20blocker\x20(INSTALLMENT_FUNDING_UNGATED);\x20a\x20deposit-held\x20state\x20with\x20no\x20exit\x20rail\x20is\x20a\x20compile\x20blocker\x20(INSTALLMENT_DEPOSIT_STRANDED).'),'affiliate_mode':z['enum'](['commission','none'])['optional']()['describe']('Per-build\x20affiliate\x20commission\x20overlay\x20(D12\x20batch\x205).\x20Absent\x20=\x20the\x20template\x27s\x20declared\x20affiliate_mode\x20applies.\x20A\x20declared\x20commission\x20overlay\x20with\x20no\x20commission\x20rail\x20is\x20a\x20compile\x20blocker\x20(AFFILIATE_RAIL_MISSING);\x20a\x20commission\x20with\x20no\x20post-lock\x20no-clawback\x20disclosure\x20build_note\x20is\x20a\x20compile\x20blocker\x20(AFFILIATE_CLAWBACK_UNDISCLOSED).'),'crowdfunding_mode':z['enum'](['threshold','flexible','none'])['optional']()['describe']('Per-build\x20crowdfunding\x20campaign\x20overlay\x20(D12\x20batch\x207).\x20Absent\x20=\x20the\x20template\x27s\x20declared\x20crowdfunding_mode\x20applies.\x20A\x20declared\x20threshold/flexible\x20overlay\x20with\x20no\x20two-leg\x20escrow-exit\x20gate\x20(release\x20XOR\x20refund,\x20D-BUG-2)\x20is\x20a\x20compile\x20blocker\x20(CROWDFUNDING_THRESHOLD_GATE_MISSING);\x20a\x20threshold\x20gate\x20whose\x20aggregate\x20is\x20NOT\x20a\x20writer-bound\x20sum-where\x20(id_from\x20signer)\x20is\x20a\x20compile\x20blocker\x20(CROWDFUNDING_AGGREGATE_UNBOUND);\x20a\x20missing\x20L-04/L-01/L-05\x20disclosure\x20build_note\x20is\x20a\x20compile\x20blocker\x20(CROWDFUNDING_DISCLOSURE_MISSING).'),'logistics_mode':z['enum'](['none','carrier','merchant_managed','courier','pickup_point'])['optional']()['describe']('Per-build\x20fulfillment\x20topology\x20(K3\x20batch\x20C,\x20K-2).\x20Absent\x20=\x20the\x20template\x27s\x20declared\x20logistics_mode\x20applies.\x20A\x20declared\x20topology\x20the\x20machine_shape\x20cannot\x20honor\x20is\x20a\x20compile\x20blocker:\x20courier\x20with\x20no\x20named_operator\x20handover\x20rail\x20(LOGISTICS_COURIER_RAIL_MISSING)\x20or\x20a\x20pooled\x20delivery\x20fee\x20(LOGISTICS_COURIER_FEE_POOLED);\x20pickup_point\x20without\x20the\x20absolute\x20batch\x20cutoff\x20or\x20the\x20unclaimed-goods\x20exit\x20window\x20(LOGISTICS_PICKUP_CUTOFF_MISSING);\x20carrier\x20without\x20tracking\x20evidence\x20(LOGISTICS_CARRIER_EVIDENCE_MISSING);\x20any\x20physical\x20mode\x20without\x20a\x20transit-loss\x20story\x20(LOGISTICS_TRANSIT_LOSS_UNCOVERED);\x20courier/pickup_point\x20without\x20the\x20two\x20dispatch\x20disclosures\x20(LOGISTICS_DISPATCH_UNDISCLOSED).'),'sales':z['array'](SaleItemPlanSchema)['optional']()['describe']('The\x20sellable\x20SKU\x20catalog\x20(upwc-cat-261017\x20CAT-A1\x20/\x20PLAN-SALES-01).\x20REQUIRED\x20for\x20template_generate\x20(A-2,\x20amz9-ln-261023):\x20an\x20empty/absent\x20catalog\x20is\x20refused\x20up-front\x20with\x20error_code\x20\x27sales_required\x27\x20—\x20the\x20published\x20Service\x20would\x20freeze\x20with\x20sales:\x20[]\x20and\x20every\x20order_new\x20aborts;\x20PLAN-SALES-01\x20is\x20now\x20an\x20INPUT\x20error\x20on\x20this\x20action,\x20not\x20a\x20post-hoc\x20audit\x20finding.\x20migration_apply\x20keeps\x20the\x20audit-finding\x20posture\x20(it\x20confirms\x20an\x20already-reviewed\x20import).\x20Item\x20shape\x20follows\x20the\x20chain\x27s\x20SaleItem:\x20{\x20name,\x20price,\x20quantity?,\x20wip_hash?\x20}\x20with\x20price\x20in\x20smallest\x20units.\x20OPTIONAL\x20per\x20item:\x20a\x20structured\x20`incentive`\x20object\x20(G-07:\x20{\x20amount,\x20conditions,\x20basis,\x20claim_window\x20},\x20all\x20strings)\x20declaring\x20the\x20buyer-perceivable\x20reward\x20terms\x20—\x20carried\x20verbatim\x20into\x20the\x20compiled\x20plan\x27s\x20service_sales\x20step\x20for\x20quote-time\x20disclosure;\x20it\x20is\x20plan\x20metadata\x20only\x20and\x20never\x20an\x20on-chain\x20SaleItem\x20field.'),'log':z['record'](z['string'](),z['unknown']())['optional']()['describe']('A\x20prior\x20MigrationLog\x20(required\x20for\x20migration_review).'),'network':z['enum'](['testnet','mainnet','localnet'])['optional']()['describe']('Target\x20network\x20for\x20migration_import\x20/\x20migration_apply\x20(default\x20testnet;\x20mainnet\x20requires\x20explicit\x20user\x20confirmation;\x20\x27localnet\x27\x20is\x20a\x20provenance\x20label\x20for\x20locally\x20validated\x20plans\x20—\x20the\x20pipeline\x20never\x20executes\x20on-chain).'),'plan':z['record'](z['string'](),z['unknown']())['optional']()['describe']('The\x20creation\x20plan\x20to\x20execute\x20(required\x20for\x20plan_execute):\x20pass\x20the\x20object\x20returned\x20under\x20\x27plan\x27\x20by\x20template_generate\x20VERBATIM\x20—\x20mutating\x20steps\x20by\x20hand\x20is\x20what\x20the\x2032-manual-write\x20era\x20did.\x20Executing\x20requires\x20verdict.buildable=true;\x20a\x20blocked\x20plan\x20is\x20refused\x20at\x20the\x20freeze\x20gate.'),'completed_steps':z['array'](z['string']())['optional']()['describe']('plan_execute\x20resume\x20(AR-5):\x20step\x20ids\x20already\x20EXECUTED\x20in\x20a\x20prior\x20run.\x20Those\x20steps\x20are\x20adopted,\x20not\x20re-executed.\x20A\x20run\x20that\x20did\x20not\x20complete\x20returns\x20a\x20ready-to-pass\x20`resume`\x20payload\x20(completed_steps/previous_outputs)\x20—\x20pass\x20it\x20back\x20verbatim\x20instead\x20of\x20deriving\x20the\x20lists\x20by\x20hand.'),'previous_outputs':z['record'](z['string'](),z['string']())['optional']()['describe']('plan_execute\x20resume\x20(AR-5):\x20step\x20id\x20->\x20created\x20on-chain\x20address\x20map\x20from\x20the\x20prior\x20run\x27s\x20outputs\x20field,\x20so\x20$ref\x20bindings\x20resolve\x20against\x20the\x20objects\x20that\x20ALREADY\x20exist.'),'resume_from_step':z['string']()['optional']()['describe']('plan_execute\x20resume\x20(W5-08):\x20the\x20FIRST\x20step\x20to\x20(re-)execute\x20—\x20every\x20step\x20BEFORE\x20it\x20in\x20plan\x20order\x20is\x20adopted\x20from\x20previous_outputs.\x20Lighter\x20than\x20enumerating\x20completed_steps:\x20pass\x20the\x20first\x20step\x20whose\x20status\x20is\x20NOT\x20\x27executed\x27\x20in\x20the\x20failed\x20response,\x20plus\x20previous_outputs.\x20Unknown\x20ids\x20are\x20refused\x20—\x20the\x20resume\x20channel\x20binds\x20to\x20the\x20COMPLETE\x20plan,\x20never\x20to\x20one\x20slice\x27s\x20step\x20list.'),'retry_override':z['object']({'step_id':z['string']()['min'](0x1)['describe']('The\x20step\x20named\x20in\x20the\x20RETRY_LOCKED\x20refusal\x20(the\x20repeated-failure\x20guard\x27s\x20lock).'),'note':z['string']()['min'](0x1)['describe']('Why\x20one\x20more\x20round\x20is\x20justified\x20—\x20mandatory,\x20echoed\x20into\x20the\x20response\x20as\x20retry_override_applied\x20for\x20audit.')})['optional']()['describe']('plan_execute\x20(W5-08):\x20authorizes\x20ONE\x20more\x20round\x20for\x20a\x20step\x20that\x20failed\x20with\x20the\x20IDENTICAL\x20error\x20in\x202+\x20consecutive\x20rounds\x20(a\x20further\x20unchanged\x20re-run\x20is\x20refused\x20pre-execution).\x20The\x20note\x20is\x20mandatory\x20and\x20audit-trailed.'),'env':z['record'](z['string'](),z['unknown']())['optional']()['describe']('Environment\x20for\x20on-chain\x20execution\x20(plan_execute):\x20forwarded\x20to\x20the\x20executor\x20(e.g.\x20{\x20network:\x20\x27testnet\x27\x20}).'),'accounts':z['record'](z['string'](),z['unknown']())['optional']()['describe']('Per-step\x20signing\x20accounts\x20(BSW-F04):\x20named\x20envs\x20for\x20steps\x20that\x20declare\x20an\x20`account`\x20(currently\x20\x27arb_controller\x27\x20—\x20the\x20independent\x20third-party\x20Arbitration\x20controller,\x20E_ARBITRATION_PERMISSION_CONFLICT=33).\x20e.g.\x20{\x20arb_controller:\x20{\x20network:\x20\x27testnet\x27\x20}\x20}.\x20A\x20step\x20declaring\x20an\x20account\x20missing\x20from\x20this\x20map\x20FAILS\x20—\x20the\x20default\x20signer\x20is\x20never\x20silently\x20reused\x20for\x20an\x20account-bound\x20step.'),'timeout_ms':z['number']()['int']()['positive']()['optional']()['describe']('plan_execute\x20wall-clock\x20budget\x20for\x20the\x20WHOLE\x20run\x20(ktt4\x20RT-08):\x20set\x20it\x20BELOW\x20your\x20transport\x20timeout\x20when\x20the\x20plan\x20is\x20too\x20big\x20for\x20one\x20window\x20(~50\x20steps\x20x\x20~6s\x20each).\x20'+'The\x20budget\x20is\x20checked\x20BEFORE\x20each\x20step\x20—\x20a\x20step\x20is\x20never\x20interrupted\x20mid-flight\x20—\x20and\x20an\x20exhausted\x20budget\x20stops\x20the\x20run\x20CLEANLY,\x20returning\x20the\x20partial\x20steps/outputs\x20that\x20resume\x20directly\x20'+'(re-send\x20with\x20completed_steps\x20=\x20every\x20stepId\x20whose\x20status\x20is\x20\x27executed\x27,\x20previous_outputs\x20=\x20outputs).\x20Omit\x20to\x20run\x20to\x20completion\x20(subject\x20to\x20your\x20transport\x20timeout).')})['strict']();const ScanSummarySchema=z['object']({'risk_level':z['enum'](['low','medium','high','critical']),'passed':z['boolean'](),'finding_count':z['number'](),'findings_by_severity':z['record'](z['string'](),z['number']())['describe']('Finding\x20count\x20keyed\x20by\x20severity.'),'findings':z['array'](TemplateScanFindingSchema)['describe']('Every\x20finding\x20with\x20its\x20rule\x20id,\x20detail\x20and\x20suggestion.'),'red_flags':z['array'](z['string']())})['describe']('Pre-deploy\x20scan\x20summary\x20(generation/apply\x20only\x20runs\x20when\x20passed).'),SemanticIrEcho={'semantic_ir_digest':z['string']()['optional']()['describe']('sha256\x20of\x20the\x20frozen\x20Semantic\x20IR\x20artifact\x20(present\x20only\x20when\x20semantic_ir\x20was\x20supplied).'),'semantic_ir_issues':z['array'](z['string']())['optional']()['describe']('IR\x20claims\x20dropped/clamped/conflicting\x20during\x20validation\x20(unknown\x20vocabulary,\x20inverted\x20span,\x20sub-threshold\x20confidence).')};export const BenchmarkMigrationOutputSchema=z['object']({'result':z['discriminatedUnion']('action',[z['object']({'action':z['literal']('template_list'),'count':z['number']()['describe']('Number\x20of\x20templates\x20returned.'),'templates':z['array'](TemplateSummarySchema)['describe']('Template\x20listing\x20rows.'),'discovery_vocabulary':z['object']({'industries':z['array'](z['string']())['describe']('Registered\x20industry\x20names\x20a\x20Semantic\x20IR\x20discovery.industry\x20may\x20use.'),'tags':z['array'](z['string']())['describe']('The\x20CLOSED\x20canonical\x20discovery-tag\x20vocabulary\x20a\x20Semantic\x20IR\x20discovery.tags\x20entry\x20may\x20use.'),'product_refs':z['array'](z['string']())['describe']('Benchmark-product\x20slugs\x20a\x20Semantic\x20IR\x20discovery.product_ref\x20may\x20use.')})['describe']('The\x20closed,\x20language-neutral\x20vocabulary\x20for\x20Semantic\x20IR\x20discovery\x20evidence\x20—\x20callers\x20translate\x20into\x20these\x20tokens;\x20the\x20server\x20drops\x20anything\x20else\x20and\x20reports\x20it.'),'load_errors':z['array'](z['string']())['describe']('Template\x20files\x20that\x20failed\x20to\x20load/validate\x20(never\x20silently\x20dropped).')}),z['object']({'action':z['literal']('template_get'),'template':z['record'](z['string'](),z['unknown']())['describe']('Full\x20template\x20object\x20(machine_shape/guards/allocator/fee_params/body/...).')}),z['object']({'action':z['literal']('template_generate'),'template_id':z['string'](),...SemanticIrEcho,'scan':ScanSummarySchema,'plan':z['record'](z['string'](),z['unknown']())['describe']('Creation\x20plan\x20from\x20the\x20merchant-guide\x20pipeline\x20(never\x20executed\x20on-chain).'),'stale_build':StaleBuildDisclosureSchema,'verdict':z['object']({'buildable':z['boolean'](),'blockers':z['array'](z['string']()),'status':z['enum'](['READY','BLOCKED','UNVERIFIED'])['describe']('AZT-04\x20single\x20release\x20authority.\x20UNVERIFIED\x20(ks7\x20F-18\x20/\x20h1w9\x20F-17,\x20kp1\x20P1-5\x20residual):\x20the\x20stale_build\x20face\x20was\x20not\x20actionable,\x20so\x20the\x20verdict\x20is\x20void\x20AS\x20A\x20WHOLE\x20—\x20buildable\x20is\x20false\x20because\x20VERIFICATION\x20failed,\x20NOT\x20because\x20the\x20plan\x20is\x20defective\x20(read\x20blockers[0]\x20and\x20stale_build,\x20rebuild,\x20re-run).')})['describe']('Single\x20aggregate\x20ruling\x20over\x20the\x20three\x20signal\x20faces\x20(scan.passed\x20/\x20plan.graph_validation.valid\x20/\x20plan.audit.blocking)\x20—\x20the\x20authoritative\x20go/no-go\x20(bkmn-261012\x20F-M62);\x20the\x20individual\x20faces\x20stay\x20advisory.'),'next_action':z['string']()['describe']('Top-level\x20forwarding\x20of\x20the\x20materialization\x20contract\x20(C6):\x20the\x20guide\x27s\x20\x27Plan\x20ready.\x20Materialize:\x20...\x27\x20text\x20verbatim\x20when\x20the\x20audit\x20is\x20clean\x20and\x20the\x20build\x20is\x20fresh;\x20a\x20BLOCKED\x20reroute,\x20or\x20a\x20DO-NOT-EXECUTE\x20rebuild-first\x20reroute\x20when\x20stale_build.actionable\x20is\x20false,\x20otherwise.')}),z['object']({'action':z['literal']('template_scan'),'scan':z['object']({'template_id':z['string'](),'risk_level':z['enum'](['low','medium','high','critical']),'passed':z['boolean'](),'findings':z['array'](TemplateScanFindingSchema),'red_flags':z['array'](z['string']()),'drift':z['record'](z['string'](),z['unknown']())['describe']('Disk-vs-catalog\x20drift\x20face\x20for\x20the\x20scanned\x20body\x20(S14-E2).'),'compile_dry_run':z['object']({'status':z['enum'](['ready','blocked','unavailable','unverified']),'buildable':z['boolean']()['optional'](),'blockers':z['array'](z['string']())['optional'](),'note':z['string']()})['describe']('Compile-kernel\x20probe\x20verdict\x20—\x20the\x20same\x20authority\x20template_generate\x20enforces\x20(S14-E2/GF-29).\x20\x27unverified\x27\x20(ks7\x20F-18\x20/\x20h1w9\x20F-17):\x20the\x20stale_build\x20face\x20was\x20not\x20actionable,\x20so\x20the\x20probe\x27s\x20verdict\x20is\x20void\x20—\x20rebuild\x20and\x20re-run.')})['describe']('Full\x20pre-deploy\x20scan\x20result.'),'stale_build':StaleBuildDisclosureSchema,'buildable':z['boolean']()['describe']('TOP-level\x20build\x20verdict\x20(S14-E2):\x20the\x20ONE\x20authority\x20buildVerdict\x20shares\x20with\x20template_generate\x20—\x20the\x20static\x20passed/risk_level\x20stay\x20advisory.'),'build_blockers':z['array'](z['string']())['describe']('Why\x20the\x20compile\x20kernel\x20refuses\x20(absent/empty\x20when\x20not\x20definitively\x20blocked).'),'next_action':z['string']()['describe']('Verdict-obedient\x20routing\x20(ZR-41):\x20BLOCKED\x20refusal,\x20proceed-to-generate,\x20or\x20the\x20UNVERIFIED\x20rebuild-first\x20reroute\x20when\x20stale_build.actionable\x20is\x20false.')}),z['object']({'action':z['literal']('migration_import'),'log':MigrationLogSchema['describe']('The\x20structured\x20migration\x20log.'),'buildable':z['boolean']()['optional']()['describe']('Compile-kernel\x20build\x20verdict\x20on\x20probe\x20inputs\x20(S14-E2;\x20absent\x20when\x20the\x20probe\x20could\x20not\x20run)\x20—\x20the\x20matched\x20template\x27s\x20buildability,\x20surfaced\x20at\x20the\x20earliest\x20migration\x20face.'),'build_blockers':z['array'](z['string']())['optional']()['describe']('Why\x20the\x20compile\x20kernel\x20refuses\x20(present\x20only\x20when\x20the\x20probe\x20ruled).'),'compile_dry_run':z['object']({'status':z['enum'](['ready','blocked','unavailable','unverified']),'note':z['string']()})['optional']()['describe']('Probe\x20verdict\x20face\x20(S14-E2).'),'inference_source':z['enum'](['keywords','semantic_ir','semantic_ir+keywords'])['optional']()['describe']('Which\x20layer\x20resolved\x20the\x20industry:\x20\x27keywords\x27\x20=\x20English\x20lexical\x20match\x20only;\x20\x27semantic_ir\x27\x20=\x20'+'the\x20caller\x27s\x20IR\x20decided;\x20\x27semantic_ir+keywords\x27\x20=\x20both\x20contributed.\x20Present\x20only\x20when\x20semantic_ir\x20was\x20supplied.'),...SemanticIrEcho,'next_action':z['string']()['describe']('Next\x20chain\x20step:\x20run\x20migration_review\x20with\x20this\x20log\x20(C6\x20—\x20the\x20chain\x20is\x20self-describing,\x20no\x20agent\x20re-exploration);\x20carries\x20a\x20BLOCKED\x20warning\x20tail\x20when\x20the\x20probe\x20refused\x20(S14-E2).')}),z['object']({'action':z['literal']('migration_review'),'log':MigrationLogSchema['describe']('The\x20migration\x20log\x20under\x20review.'),'review_summary':z['object']({'mapped_count':z['number'](),'unmapped_count':z['number'](),'manual_review_count':z['number'](),'risk_passed':z['boolean'](),'buildable':z['boolean']()['optional']()['describe']('Compile-kernel\x20build\x20verdict\x20on\x20probe\x20inputs\x20(S14-E2;\x20absent\x20when\x20the\x20probe\x20could\x20not\x20run)\x20—\x20a\x20DEFINITIVE\x20false\x20verdict\x20un-cleans\x20the\x20route.'),'build_blockers':z['array'](z['string']())['optional']()['describe']('Why\x20the\x20compile\x20kernel\x20refuses\x20(present\x20only\x20when\x20the\x20probe\x20ruled).'),'compile_dry_run':z['object']({'status':z['enum'](['ready','blocked','unavailable','unverified']),'note':z['string']()})['optional']()['describe']('Probe\x20verdict\x20face\x20(S14-E2).')})['describe']('Counts\x20+\x20risk\x20status\x20+\x20build\x20verdict\x20(S14-E2)\x20for\x20the\x20confirmation\x20screen.'),'next_action':z['string']()['describe']('Next\x20chain\x20step:\x20migration_apply\x20with\x20the\x20matched\x20template\x20when\x20the\x20review\x20is\x20clean;\x20surface\x20the\x20unmapped/manual_review\x20items\x20for\x20a\x20user\x20decision\x20otherwise.')}),z['object']({'action':z['literal']('migration_apply'),'template_id':z['string'](),'network':z['enum'](['testnet','mainnet','localnet']),...SemanticIrEcho,'scan':ScanSummarySchema,'plan':z['record'](z['string'](),z['unknown']())['describe']('Creation\x20plan\x20from\x20the\x20merchant-guide\x20pipeline\x20(never\x20executed\x20on-chain).'),'verdict':z['object']({'buildable':z['boolean'](),'blockers':z['array'](z['string']()),'status':z['enum'](['READY','BLOCKED','UNVERIFIED'])['describe']('AZT-04\x20single\x20release\x20authority.\x20UNVERIFIED\x20(ks7\x20F-18\x20/\x20h1w9\x20F-17,\x20kp1\x20P1-5\x20residual):\x20the\x20stale_build\x20face\x20was\x20not\x20actionable,\x20so\x20the\x20verdict\x20is\x20void\x20AS\x20A\x20WHOLE\x20—\x20buildable\x20is\x20false\x20because\x20VERIFICATION\x20failed,\x20NOT\x20because\x20the\x20plan\x20is\x20defective\x20(read\x20blockers[0]\x20and\x20stale_build,\x20rebuild,\x20re-run).')})['describe']('Single\x20aggregate\x20ruling\x20over\x20the\x20three\x20signal\x20faces\x20(scan.passed\x20/\x20plan.graph_validation.valid\x20/\x20plan.audit.blocking)\x20—\x20the\x20authoritative\x20go/no-go\x20(bkmn-261012\x20F-M62);\x20the\x20individual\x20faces\x20stay\x20advisory.'),'next_action':z['string']()['describe']('Top-level\x20forwarding\x20of\x20the\x20materialization\x20contract\x20(C6):\x20the\x20guide\x27s\x20\x27Plan\x20ready.\x20Materialize:\x20...\x27\x20text\x20verbatim\x20when\x20the\x20audit\x20is\x20clean\x20and\x20the\x20build\x20is\x20fresh;\x20a\x20BLOCKED\x20reroute,\x20or\x20a\x20DO-NOT-EXECUTE\x20rebuild-first\x20reroute\x20when\x20stale_build.actionable\x20is\x20false,\x20otherwise.')}),z['object']({'action':z['literal']('plan_execute'),'completed':z['boolean']()['describe']('True\x20when\x20EVERY\x20step\x20executed\x20(store\x20fully\x20deployed).'),'steps':z['array'](z['record'](z['string'](),z['unknown']()))['describe']('Per-step\x20results:\x20{\x20stepId,\x20status:\x20executed|failed|blocked,\x20digest?,\x20address?,\x20error?\x20}.'),'outputs':z['record'](z['string'](),z['string']())['describe']('step\x20id\x20->\x20created\x20on-chain\x20address\x20(create\x20steps).\x20Feed\x20back\x20as\x20previous_outputs\x20when\x20resuming.'),'preflight':z['record'](z['string'](),z['unknown']())['describe']('Freeze-gate\x20audit\x20the\x20run\x20was\x20gated\x20on\x20(issues\x20+\x20findings).'),'readback':z['record'](z['string'](),z['unknown']())['describe']('Post-execution\x20conservation/readback\x20checks.'),'resume':z['object']({'completed_steps':z['array'](z['string']())['describe']('Every\x20stepId\x20whose\x20status\x20is\x20\x27executed\x27\x20in\x20this\x20response\x20(fresh\x20OR\x20adopted)\x20—\x20the\x20completed_steps\x20of\x20the\x20next\x20round.'),'previous_outputs':z['record'](z['string'](),z['string']())['describe']('This\x20response\x27s\x20outputs\x20—\x20the\x20previous_outputs\x20of\x20the\x20next\x20round.')})['optional']()['describe']('W5-08\x20①:\x20the\x20READY-TO-PASS\x20resume\x20payload,\x20present\x20whenever\x20the\x20run\x20did\x20NOT\x20complete.\x20Pass\x20both\x20fields\x20back\x20verbatim\x20on\x20the\x20next\x20plan_execute\x20call\x20(or\x20use\x20resume_from_step\x20+\x20previous_outputs).'),'repeated_failures':z['array'](z['object']({'step_id':z['string'](),'consecutive_rounds':z['number'](),'error':z['string']()}))['optional']()['describe']('W5-08\x20③:\x20steps\x20that\x20failed\x20with\x20the\x20IDENTICAL\x20error\x20in\x202+\x20consecutive\x20rounds\x20—\x20the\x20run\x20withholds\x20the\x20generic\x20RESUME\x20recipe\x20for\x20these;\x20fix\x20the\x20cause\x20before\x20resuming.'),'retry_prohibited':z['boolean']()['optional']()['describe']('W5-08\x20③:\x20true\x20alongside\x20repeated_failures\x20—\x20a\x20further\x20unchanged\x20re-run\x20is\x20REFUSED\x20pre-execution\x20(retry_override\x20is\x20the\x20audited\x20escape\x20hatch).'),'retry_override_applied':z['object']({'step_id':z['string'](),'note':z['string']()})['optional']()['describe']('W5-08\x20③\x20audit\x20trail:\x20the\x20retry_override\x20accepted\x20this\x20round\x20(step\x20cleared\x20from\x20the\x20repeated-failure\x20ledger).'),'next_action':z['string']()['describe']('One-click\x20forwarding:\x20deploy-complete\x20guidance,\x20the\x20resume\x20recipe\x20(completed_steps\x20+\x20previous_outputs)\x20after\x20a\x20mid-run\x20failure,\x20or\x20the\x20STOP-retrying\x20ruling\x20when\x20the\x20same\x20error\x20recurred.')})])})['strict']();
|
|
1
|
+
import{z}from'zod';import{GuardResolutionInputSchema}from'../goal/planning.js';import{SemanticIRInputSchema}from'../../knowledge/semantic-ir.js';import{CATALOG_INDUSTRIES}from'../../knowledge/catalog-facts.js';const TemplateSummarySchema=z['object']({'id':z['string']()['describe']('Template\x20id\x20\x27<industry>/<variant>\x27,\x20e.g.\x20\x27retail/scale-marketplace\x27.'),'industry':z['string']()['describe']('Industry\x20vertical.'),'variant':z['string']()['describe']('Business-model\x20variant\x20slug.'),'product_ref':z['string']()['optional']()['describe']('Benchmark\x20product\x20slug\x20this\x20archetype\x20models\x20(e.g.\x20\x27amazon\x27).\x20The\x20only\x20sanctioned\x20company\x20name;\x20users\x20can\x20pick\x20a\x20template\x20by\x20naming\x20the\x20incumbent\x20product.'),'archetype':z['enum'](['leader','challenger']),'key_risk':z['string']()['describe']('Primary\x20risk\x20this\x20template\x20mitigates.'),'node_count':z['number']()['describe']('Machine\x20node\x20count.'),'guard_count':z['number']()['describe']('Guard\x20template\x20count.'),'recommended_role':z['enum'](['merchant','supplier','both']),'tags':z['array'](z['string']())['describe']('Canonical\x20discovery\x20tags\x20this\x20template\x20answers\x20to\x20(curated\x20business-model\x20tags\x20+\x20its\x20variant\x20slug).\x20These\x20are\x20the\x20tokens\x20a\x20Semantic\x20IR\x20`discovery.tags`\x20entry\x20may\x20use.')})['describe']('Compact\x20template\x20listing\x20row.'),TemplateScanFindingSchema=z['object']({'rule_id':z['string']()['optional']()['describe']('Rule\x20id\x20when\x20known\x20(e.g.\x20\x27R-M3-01\x27,\x20\x27R1\x27).'),'severity':z['enum'](['low','medium','high','critical']),'title':z['string'](),'detail':z['string'](),'suggestion':z['string']()})['describe']('One\x20pre-deploy\x20risk\x20finding.'),StaleBuildDisclosureSchema=z['object']({'stale':z['boolean']()['describe']('4R-01\x20residual:\x20true\x20only\x20when\x20the\x20shared\x20src-vs-dist\x20mtime\x20detector\x20RESOLVED\x20and\x20found\x20the\x20running\x20dist\x20OLDER\x20than\x20the\x20workspace\x20src\x20—\x20the\x20scan/plan\x20verdicts\x20may\x20describe\x20superseded\x20template\x20knowledge.'),'known':z['boolean']()['describe']('False\x20when\x20the\x20detector\x20could\x20not\x20resolve\x20(installed\x20dist-only\x20package,\x20build\x20in\x20progress,\x20stat\x20error).\x20stale\x20is\x20then\x20NOT\x20evidence\x20of\x20freshness\x20—\x20treat\x20verdicts\x20as\x20unconfirmed.\x20Fail-open:\x20never\x20an\x20error.'),'actionable':z['boolean']()['describe']('rq-tn-261030-8693be\x20B11:\x20the\x20scan/plan\x20verdicts\x20under\x20this\x20face\x20are\x20fit\x20to\x20act\x20on\x20ONLY\x20when\x20true\x20(fresh\x20AND\x20known).\x20actionable=false\x20VOIDS\x20the\x20conclusions\x20in\x20the\x20same\x20response\x20—\x20rebuild\x20(pnpm\x20build)\x20and\x20re-run\x20before\x20acting\x20on\x20any\x20of\x20them.'),'lag_minutes':z['number']()['nullable']()['describe']('Whole\x20minutes\x20the\x20newest\x20compiled\x20artifact\x20lags\x20the\x20newest\x20source\x20file\x20(null\x20when\x20unknown).'),'detail':z['string']()['describe']('Human-readable\x20freshness\x20statement\x20(source/build\x20mtime\x20lag)\x20with\x20the\x20rebuild\x20remediation\x20when\x20stale.')})['describe']('Always-present\x20stale-build\x20disclosure\x20on\x20template_scan\x20/\x20template_generate\x20(reuses\x20computeSrcDistStaleness;\x20no\x20parallel\x20detector).'),MigrationEntrySchema=z['object']({'source_element':z['string']()['describe']('Competitor-side\x20element.'),'target_object':z['string']()['optional']()['describe']('WoWok\x20object/mechanism\x20it\x20maps\x20to.'),'mapping_note':z['string']()['describe']('One-line\x20mapping\x20explanation.'),'reason':z['string']()['optional']()['describe']('Why\x20it\x20cannot\x20be\x20migrated,\x20or\x20why\x20it\x20needs\x20a\x20decision.')})['describe']('One\x20competitor\x20element\x20and\x20its\x20WoWok\x20mapping\x20outcome.'),MigrationLogSchema=z['object']({'source':z['object']({'url':z['string']()['optional'](),'description':z['string'](),'detected_industry':z['string'](),'matched_template':z['string']()['describe']('Matched\x20template\x20id\x20\x27<industry>/<variant>\x27.')})['describe']('Migration\x20source\x20provenance.'),'template_match':z['object']({'source':z['enum'](['explicit','product_ref','discovery_product_ref','discovery_tags','keywords','ir_industry_fallback','industry_leader'])['describe']('Which\x20deterministic\x20pass\x20chose\x20the\x20template:\x20\x27explicit\x27\x20=\x20caller\x27s\x20template_id;\x20'+'\x27product_ref\x27\x20=\x20a\x20benchmark\x20product\x20named\x20in\x20the\x20text;\x20\x27discovery_product_ref\x27\x20=\x20the\x20'+'Semantic\x20IR\x20resolved\x20the\x20benchmark\x20product;\x20\x27discovery_tags\x27\x20=\x20the\x20IR\x27s\x20canonical\x20tags\x20'+'scored\x20the\x20variant;\x20\x27keywords\x27\x20=\x20English\x20keyword\x20scoring;\x20\x27ir_industry_fallback\x27\x20=\x20the\x20'+'IR\x20proved\x20the\x20industry\x20only;\x20\x27industry_leader\x27\x20=\x20an\x20explicit\x20industry\x20hint\x20with\x20no\x20match.'),'confidence':z['number']()['describe']('Match\x20confidence\x200-1\x20(only\x20an\x20exact\x20benchmark-product\x20hit\x20is\x201.0).'),'matched_tags':z['array'](z['string']())['optional']()['describe']('IR\x20tags\x20that\x20hit\x20this\x20template\x20(discovery_tags\x20only).')})['describe']('Template-match\x20provenance\x20—\x20why\x20this\x20template,\x20without\x20re-running\x20the\x20matcher.'),'mapped':z['array'](MigrationEntrySchema)['describe']('Elements\x20that\x20map\x20cleanly\x20to\x20WoWok\x20objects.'),'unmapped':z['array'](MigrationEntrySchema)['describe']('Elements\x20that\x20cannot\x20be\x20migrated,\x20with\x20reasons.'),'manual_review':z['array'](MigrationEntrySchema)['describe']('Elements\x20requiring\x20an\x20explicit\x20user\x20decision.'),'wowok_advantages':z['array'](z['string']())['describe']('WoWok\x20platform\x20advantages\x20surfaced\x20during\x20migration.'),'customizable_modules':z['array'](z['string']())['describe']('Business-module\x20ids\x20the\x20user\x20can\x20customize.'),'role_assessment':z['object']({'recommended':z['string'](),'rationale':z['string'](),'alternatives':z['array'](z['string']())})['describe']('Merchant\x20vs\x20supplier\x20role\x20assessment.'),'risk_check':z['object']({'passed':z['boolean'](),'findings':z['array'](z['string']())})['describe']('Dry-run\x20risk\x20check\x20against\x20the\x20matched\x20template.'),'requirement_coverage':z['array'](z['object']({'family':z['enum'](['fulfillment','after_sales','review_incentive','discount','privacy_channel']),'label':z['string'](),'status':z['enum'](['mapped','unmapped','blocker']),'evidence':z['string']()['describe']('The\x20matched\x20phrase\x20from\x20the\x20description\x20—\x20every\x20coverage\x20verdict\x20carries\x20its\x20evidence.'),'target':z['string']()['optional']()['describe']('The\x20WoWok\x20carrier\x20when\x20status=mapped.'),'note':z['string']()})['strict']())['optional']()['describe']('W5-07\x20(ks7\x20F-04/F-02):\x20explicit-promise\x20coverage\x20matrix.\x20Every\x20promise\x20family\x20the\x20description\x20hit\x20lands\x20in\x20exactly\x20ONE\x20of\x20'+'mapped/unmapped/blocker\x20—\x20a\x20stated\x20promise\x20can\x20never\x20silently\x20disappear.\x20status=\x27blocker\x27\x20=\x20the\x20matched\x20template\x20cannot\x20carry\x20the\x20'+'promise\x20as-is;\x20the\x20note\x20names\x20the\x20exact\x20build\x20decision\x20(declare\x20the\x20mode\x20/\x20compose\x20the\x20registered\x20fulfillment\x20combination)\x20required\x20before\x20migration_apply.\x20'+'Surface\x20every\x20blocker\x20to\x20the\x20user\x20at\x20migration_review.\x20Optional\x20only\x20so\x20logs\x20produced\x20before\x20W5-07\x20still\x20parse\x20—\x20fresh\x20migration_import\x20logs\x20ALWAYS\x20carry\x20it.'),'network':z['enum'](['testnet','mainnet','localnet'])['describe']('Target\x20network\x20(default\x20testnet).\x20\x27localnet\x27\x20labels\x20plans\x20validated\x20against\x20a\x20local\x20net\x20—\x20the\x20migration\x20pipeline\x20is\x20network-agnostic,\x20this\x20is\x20provenance\x20metadata,\x20not\x20an\x20execution\x20target.')})['describe']('Structured\x20competitor-migration\x20log.'),SaleItemIncentiveSchema=z['object']({'amount':z['string']()['describe']('Incentive\x20amount\x20as\x20a\x20buyer-readable\x20string\x20(e.g.\x20\x225\x20USDC\x22\x20or\x20\x221000000000\x20WOW\x20smallest\x20units\x22).\x20Quote-time\x20disclosure\x20only\x20—\x20fund\x20the\x20actual\x20rail\x20separately\x20(e.g.\x20the\x20template\x27s\x20review_reward_pool).'),'conditions':z['string']()['describe']('What\x20the\x20buyer\x20must\x20do\x20to\x20earn\x20it\x20(e.g.\x20\x22leave\x20a\x20written\x20+\x20rated\x20review\x20of\x20the\x20delivered\x20work\x22).\x20Must\x20be\x20perceptible\x20BEFORE\x20the\x20order\x20is\x20placed.'),'basis':z['string']()['describe']('Accrual\x20scope:\x20\x22per-order\x22\x20/\x20\x22once-per-buyer\x22\x20/\x20\x22once-per-buyer-per-order\x22.\x20Matches\x20the\x20claim\x20guard\x27s\x20replay\x20semantics\x20—\x20a\x20recipient-only\x20gate\x20is\x20once-per-buyer-for-life,\x20an\x20order-scoped\x20stamp\x20is\x20per-order\x20(SV-2).'),'claim_window':z['string']()['describe']('How\x20long\x20the\x20buyer\x20has\x20to\x20claim\x20(e.g.\x20\x2214\x20days\x20from\x20the\x20review\x22).\x20Mirror\x20the\x20reward\x20claim\x20guard\x27s\x20window\x20fee_param\x20so\x20the\x20quote\x20never\x20promises\x20more\x20than\x20the\x20rail\x20pays.')})['strict']()['describe']('Optional\x20structured\x20incentive\x20for\x20one\x20sale\x20item\x20(G-07):\x20buyer-perceivable\x20reward\x20terms\x20carried\x20to\x20the\x20compiled\x20plan\x20for\x20quote-time\x20disclosure.\x20DECLARATION\x20ONLY\x20—\x20the\x20chain\x20SaleItem\x20has\x20no\x20such\x20field;\x20the\x20actual\x20payout\x20rail\x20is\x20configured\x20separately.'),SaleItemPlanSchema=z['object']({'incentive':SaleItemIncentiveSchema['optional']()})['passthrough']()['describe']('One\x20sellable\x20SKU\x20in\x20the\x20plan\x20catalog:\x20the\x20chain\x20SaleItem\x20fields\x20plus\x20the\x20optional\x20structured\x20`incentive`\x20declaration\x20(G-07).\x20Unknown\x20keys\x20pass\x20through\x20so\x20chain-side\x20fields\x20can\x20evolve\x20without\x20schema\x20changes.');export const BenchmarkMigrationSchema=z['object']({'action':z['enum'](['template_list','template_get','template_generate','template_scan','migration_import','migration_review','migration_apply','plan_execute'])['describe']('Action:\x20\x27template_list\x27\x20=\x20list\x20the\x20loaded\x20MD\x20industry\x20templates\x20(optional\x20industry\x20filter);\x20'+'\x27template_get\x27\x20=\x20fetch\x20one\x20template\x20by\x20id\x20(template_id\x20required);\x20'+'\x27template_generate\x27\x20=\x20generate\x20a\x20creation\x20plan\x20from\x20a\x20template\x20via\x20the\x20merchant-guide\x20'+'pipeline\x20(template_id\x20required;\x20scan-first\x20—\x20CRITICAL\x20findings\x20block;\x20never\x20executes\x20on-chain);\x20'+'\x27template_scan\x27\x20=\x20pre-deploy\x20risk\x20scan\x20of\x20one\x20template\x20(template_id\x20required;\x20returns\x20'+'risk_level/findings/red_flags\x20plus\x20a\x20drift\x20face\x20—\x20disk-vs-catalog\x20provenance\x20of\x20the\x20'+'scanned\x20body;\x20CRITICAL\x20blocks\x20generation/apply);\x20'+'\x27migration_import\x27\x20=\x20competitor\x20URL/description\x20→\x20migration\x20plan\x20+\x20MigrationLog\x20'+'(description\x20required);\x20'+'\x27migration_review\x27\x20=\x20surface\x20the\x20MigrationLog\x20for\x20user\x20confirmation\x20(log\x20required);\x20'+'\x27migration_apply\x27\x20=\x20run\x20the\x20approved\x20template\x20through\x20the\x20merchant-guide\x20pipeline\x20'+'(template_id\x20required;\x20scan-first\x20—\x20CRITICAL\x20findings\x20block;\x20default\x20network\x20testnet);\x20'+'\x27plan_execute\x27\x20=\x20ONE-CLICK\x20DEPLOYMENT\x20(AR-5,\x20bsn7\x20T-06/R-01):\x20materialize\x20the\x20plan\x20returned\x20by\x20'+'template_generate\x20on-chain\x20—\x20preflight\x20freeze\x20gate,\x20topological\x20create/publish/configure,\x20readback.\x20'+'Resumable:\x20on\x20a\x20mid-run\x20failure,\x20re-send\x20with\x20completed_steps\x20+\x20previous_outputs\x20from\x20the\x20failed\x20'+'response\x20instead\x20of\x20re-running\x20from\x20scratch\x20(duplicate\x20objects).'),'template_id':z['string']()['optional']()['describe']('Template\x20id\x20\x27<industry>/<variant>\x27\x20(required\x20for\x20template_get\x20/\x20template_generate\x20/\x20template_scan\x20/\x20migration_apply),\x20e.g.\x20\x27retail/scale-marketplace\x27.'),'industry':z['string']()['optional']()['describe']('Industry\x20filter\x20for\x20template_list;\x20industry\x20hint\x20for\x20migration_import.\x20'+('Any\x20registered\x20industry\x20is\x20accepted\x20(builtin:\x20'+CATALOG_INDUSTRIES['join'](',\x20')+';\x20')+'plus\x20custom\x20industries\x20registered\x20via\x20industry\x20packs).\x20'+'Aliases\x20are\x20resolved\x20(e.g.\x20\x27ecommerce\x27\x20→\x20\x27retail\x27).'),'description':z['string']()['optional']()['describe']('Natural-language\x20business/competitor\x20description\x20(required\x20for\x20migration_import;\x20used\x20by\x20template_generate\x20as\x20the\x20intent\x20text).'),'semantic_ir':SemanticIRInputSchema['optional']()['describe']('Canonical\x20Semantic\x20IR\x20produced\x20by\x20the\x20CALLING\x20agent\x20for\x20a\x20NON-ENGLISH\x20(or\x20lexicon-outside)\x20description\x20—\x20this\x20server\x20runs\x20no\x20LLM.\x20'+'The\x20server\x20validates\x20it,\x20then\x20reuses\x20it\x20on\x20the\x20same\x20deterministic\x20surfaces\x20as\x20recommend_industry:\x20'+'(a)\x20migration_import\x20narrows\x20template\x20matching\x20to\x20the\x20IR-resolved\x20industry\x20and,\x20when\x20discovery.tags\x20are\x20supplied,\x20'+'selects\x20the\x20business-model\x20VARIANT\x20by\x20canonical\x20tag\x20coverage\x20(an\x20explicit\x20product_ref\x20or\x20\x27industry\x27\x20hint\x20still\x20wins);\x20'+'(b)\x20template_generate\x20/\x20migration_apply\x20read\x20the\x20numeric\x20claim\x20\x27reward_pool_amount\x27\x20as\x20the\x20review-reward\x20pool\x20prefill\x20—\x20'+'explicit\x20fee_overrides\x20>\x20IR\x20claim\x20>\x20the\x20English\x20regex\x20fallback.\x20'+'Shape:\x20{schema_version:\x202\x20(1\x20still\x20accepted),\x20locale:\x20\x27<BCP-47>\x27,\x20traits?,\x20domains?,\x20claims?:\x20[{key,\x20value,\x20confidence?}],\x20'+'discovery?:\x20{industry?,\x20tags?:\x20string[],\x20product_ref?,\x20english_summary?,\x20confidence?},\x20provenance:\x20{source:\x20\x27caller_llm\x27}}.\x20'+'discovery.tags\x20use\x20the\x20CLOSED\x20language-neutral\x20vocabulary\x20returned\x20by\x20template_list.discovery_vocabulary\x20'+'(canonical\x20English\x20business-model\x20tokens;\x20never\x20locale\x20words\x20—\x20translate\x20in\x20the\x20caller).\x20'+'discovery.product_ref\x20is\x20a\x20benchmark-product\x20slug,\x20discovery.industry\x20a\x20registered\x20industry,\x20and\x20discovery.english_summary\x20'+'is\x20a\x20canonical\x20English\x20restatement\x20used\x20only\x20for\x20keyword\x20fallback.\x20'+'Unknown\x20traits/domains/claims/tags/industries/product_refs\x20are\x20dropped\x20and\x20reported\x20in\x20semantic_ir_issues;\x20spans\x20and\x20quotes\x20'+'must\x20be\x20copied\x20verbatim\x20from\x20the\x20description\x20(unlocatable\x20evidence\x20is\x20dropped).'),'url':z['string']()['optional']()['describe']('Competitor\x20store/profile\x20URL\x20for\x20migration_import\x20(recorded\x20as\x20provenance\x20only).'),'fee_overrides':z['record'](z['string'](),z['union']([z['number'](),z['string']()]))['optional']()['describe']('Template\x20fee-parameter\x20overrides\x20for\x20template_generate\x20(e.g.\x20commission_rate_bps).'),'guard_resolutions':z['record'](z['string'](),GuardResolutionInputSchema)['optional']()['describe']('Judgment-layer\x20resolutions\x20for\x20pending\x20guard\x20designs\x20(C6-DEEP),\x20keyed\x20by\x20plan.pending_guard_designs[].key.\x20'+'A\x20blocked\x20migration_apply/template_generate\x20lists\x20every\x20unresolved\x20design\x20—\x20resolve\x20each\x20here\x20'+'(kind\x20\x27inline\x27\x20with\x20the\x20Guard\x20table+root,\x20or\x20kind\x20\x27template\x27\x20with\x20a\x20tpl_*\x20id)\x20and\x20re-run\x20the\x20action.\x20'+'Advisory\x20designs\x20that\x20do\x20not\x20apply\x20to\x20this\x20shop\x20may\x20be\x20resolved\x20with\x20{kind:\x27omit\x27}\x20instead\x20'+'(run75747\x20F-38:\x20honored\x20only\x20for\x20designs\x20with\x20no\x20inbound\x20binding;\x20an\x20omit\x20of\x20a\x20bound\x20design\x20'+'is\x20refused\x20with\x20GUARD_OMIT_UNSUPPORTED).\x20'+'The\x20audit\x20freeze\x20gate\x20still\x20decides:\x20resolutions\x20only\x20unblock\x20a\x20plan\x20whose\x20closed\x20audit\x20is\x20clean.'),'review_mode':z['enum'](['review','review_reward','none'])['optional']()['describe']('Per-build\x20review-rail\x20mode\x20(v53\x20templates).\x20Absent\x20=\x20the\x20template\x27s\x20declared\x20review_mode\x20applies.'),'reward_funding':z['string']()['optional']()['describe']('Review\x20reward\x20pool\x20funding,\x20smallest-unit\x20string.\x20HARD-REQUIRED\x20when\x20the\x20effective\x20review\x20mode\x20is\x20review_reward\x20(INV-4):\x20template_generate\x20refuses\x20the\x20build\x20up-front\x20with\x20error_code\x20\x27reward_funding_required\x27\x20rather\x20than\x20promising\x20an\x20unfunded\x20incentive\x20—\x20pass\x20this,\x20or\x20drop\x20the\x20mode\x20explicitly\x20(review_mode\x20\x27review\x27\x20keeps\x20the\x20rail\x20without\x20the\x20bounty;\x20\x27none\x27\x20removes\x20the\x20rail).\x20The\x20compile\x20kernel\x20also\x20blocks\x20with\x20REVIEW_REWARD_UNFUNDED\x20—\x20this\x20input\x20gate\x20just\x20fails\x20before\x20the\x20pipeline\x20runs.'),'reward_claim_amount':z['string']()['optional']()['describe']('Per-claim\x20reward\x20bounty\x20mounted\x20on\x20the\x20claim\x20guard_add,\x20smallest-unit\x20string.\x20Schema-required\x20on\x20the\x20mount\x20(BK15-F09):\x20compile\x20blocks\x20with\x20REVIEW_REWARD_AMOUNT_MISSING\x20when\x20absent\x20—\x20the\x20kernel\x20never\x20fabricates\x20a\x20real-money\x20parameter.'),'experience_compensation_mode':z['enum'](['reward','none'])['optional']()['describe']('Per-build\x20goodwill\x20(experience-compensation)\x20track\x20mode\x20(K3\x20C-11).\x20Absent\x20=\x20the\x20template\x27s\x20declared\x20experience_compensation_mode\x20applies\x20—\x20delivery/on-demand-errand\x20and\x20delivery/restaurant-marketplace\x20ship\x20\x27reward\x27\x20as\x20the\x20catalog\x20default.\x20\x27reward\x27\x20arms\x20an\x20independent\x20PRE-FUNDED\x20Reward\x20pool\x20buyers\x20claim\x20proactively\x20for\x20late/SLA-miss\x20failures\x20(nothing\x20is\x20ever\x20deducted\x20from\x20the\x20merchant\x20—\x20the\x20chain\x20has\x20no\x20debit\x20primitive);\x20\x27none\x27\x20drops\x20the\x20track.'),'experience_pool_funding':z['string']()['optional']()['describe']('Experience-compensation\x20pool\x20funding,\x20smallest-unit\x20string.\x20HARD-REQUIRED\x20when\x20the\x20effective\x20experience_compensation_mode\x20is\x20\x27reward\x27\x20(K3\x20C-11,\x20INV-4\x20family):\x20template_generate\x20refuses\x20the\x20build\x20up-front\x20rather\x20than\x20promising\x20an\x20unfunded\x20goodwill\x20pool\x20—\x20plan\x20it\x20as\x20~expected\x20failures\x20x\x20fee_param\x20experience_claim_amount.\x20The\x20compile\x20kernel\x20also\x20blocks\x20with\x20EXPERIENCE_COMPENSATION_UNFUNDED\x20—\x20this\x20input\x20gate\x20just\x20fails\x20before\x20the\x20pipeline\x20runs.\x20(N2,\x20K4R-261103\x20/\x20ssd\x20F-01:\x20this\x20key\x20is\x20a\x20COMPILE\x20INPUT,\x20never\x20a\x20fee_param\x20—\x20a\x20value\x20mis-passed\x20via\x20fee_overrides\x20is\x20auto-rescued\x20to\x20this\x20channel\x20and\x20echoed.)'),'compensation_fund':z['string']()['optional']()['describe']('Arbitration\x20compensation-pool\x20funding,\x20smallest-unit\x20string\x20(N1,\x20K4R-261103\x20/\x20ddmq\x20F-22).\x20HARD-REQUIRED\x20on\x20any\x20build\x20that\x20mounts\x20an\x20arb-ruling-won\x20edge\x20(tpl_forward_arb_ruling_won):\x20its\x20claimed_by\x20sequencing\x20seal\x20makes\x20the\x20award\x20claim\x20the\x20enforcement\x20step,\x20and\x20an\x20unfunded\x20claim\x20aborts\x20code\x2027\x20—\x20compile\x20blocks\x20with\x20COMPENSATION_FUND_REQUIRED.\x20Plan\x20it\x20at\x20>=\x203x\x20a\x20typical\x20order\x20(the\x20chain\x27s\x20award\x20ceiling\x20is\x20MAX_INDEMNITY_MULTIPLE\x20=\x203x\x20the\x20order\x20value\x20basis).\x20Compile\x20INPUT,\x20never\x20a\x20fee_param;\x20the\x20fee_overrides\x20spelling\x20also\x20lands\x20here\x20via\x20the\x20inputs\x20spread.'),'after_sales_mode':z['enum'](['return','exchange','warranty','none'])['optional']()['describe']('Per-build\x20after-sales\x20mode\x20(D12\x20refactor\x204).\x20Absent\x20=\x20the\x20template\x27s\x20declared\x20after_sales_mode\x20applies.\x20Declaring\x20a\x20mode\x20with\x20no\x20backing\x20rail\x20in\x20machine_shape\x20is\x20a\x20compile\x20blocker\x20(AFTER_SALES_RAIL_MISSING).'),'acceptance_mode':z['enum'](['milestone','contest','bounty','agent','none'])['optional']()['describe']('Per-build\x20acceptance/judging\x20mode\x20(D12\x20refactor\x202).\x20Absent\x20=\x20the\x20template\x27s\x20declared\x20acceptance_mode\x20applies.\x20A\x20judge-decided\x20mode\x20(contest/bounty/agent)\x20without\x20arbitration_mode\x20\x27third_party\x27\x20is\x20a\x20compile\x20blocker\x20(ACCEPTANCE_JUDGE_NOT_INDEPENDENT);\x20a\x20finite\x20revision_rounds_max\x20with\x20no\x20counter\x20Repository\x20guard\x20is\x20a\x20compile\x20blocker\x20(ACCEPTANCE_REVISION_UNBOUNDED).'),'installment_mode':z['enum'](['deposit_balance','milestone_n','none'])['optional']()['describe']('Per-build\x20installment/deposit\x20mode\x20(D12\x20refactor\x203).\x20Absent\x20=\x20the\x20template\x27s\x20declared\x20installment_mode\x20applies.\x20A\x20capture\x20forward\x20with\x20no\x20fund-gate\x20Guard\x20is\x20a\x20compile\x20blocker\x20(INSTALLMENT_FUNDING_UNGATED);\x20a\x20deposit-held\x20state\x20with\x20no\x20exit\x20rail\x20is\x20a\x20compile\x20blocker\x20(INSTALLMENT_DEPOSIT_STRANDED).'),'affiliate_mode':z['enum'](['commission','none'])['optional']()['describe']('Per-build\x20affiliate\x20commission\x20overlay\x20(D12\x20batch\x205).\x20Absent\x20=\x20the\x20template\x27s\x20declared\x20affiliate_mode\x20applies.\x20A\x20declared\x20commission\x20overlay\x20with\x20no\x20commission\x20rail\x20is\x20a\x20compile\x20blocker\x20(AFFILIATE_RAIL_MISSING);\x20a\x20commission\x20with\x20no\x20post-lock\x20no-clawback\x20disclosure\x20build_note\x20is\x20a\x20compile\x20blocker\x20(AFFILIATE_CLAWBACK_UNDISCLOSED).'),'crowdfunding_mode':z['enum'](['threshold','flexible','none'])['optional']()['describe']('Per-build\x20crowdfunding\x20campaign\x20overlay\x20(D12\x20batch\x207).\x20Absent\x20=\x20the\x20template\x27s\x20declared\x20crowdfunding_mode\x20applies.\x20A\x20declared\x20threshold/flexible\x20overlay\x20with\x20no\x20two-leg\x20escrow-exit\x20gate\x20(release\x20XOR\x20refund,\x20D-BUG-2)\x20is\x20a\x20compile\x20blocker\x20(CROWDFUNDING_THRESHOLD_GATE_MISSING);\x20a\x20threshold\x20gate\x20whose\x20aggregate\x20is\x20NOT\x20a\x20writer-bound\x20sum-where\x20(id_from\x20signer)\x20is\x20a\x20compile\x20blocker\x20(CROWDFUNDING_AGGREGATE_UNBOUND);\x20a\x20missing\x20L-04/L-01/L-05\x20disclosure\x20build_note\x20is\x20a\x20compile\x20blocker\x20(CROWDFUNDING_DISCLOSURE_MISSING).'),'logistics_mode':z['enum'](['none','carrier','merchant_managed','courier','pickup_point'])['optional']()['describe']('Per-build\x20fulfillment\x20topology\x20(K3\x20batch\x20C,\x20K-2).\x20Absent\x20=\x20the\x20template\x27s\x20declared\x20logistics_mode\x20applies.\x20A\x20declared\x20topology\x20the\x20machine_shape\x20cannot\x20honor\x20is\x20a\x20compile\x20blocker:\x20courier\x20with\x20no\x20named_operator\x20handover\x20rail\x20(LOGISTICS_COURIER_RAIL_MISSING)\x20or\x20a\x20pooled\x20delivery\x20fee\x20(LOGISTICS_COURIER_FEE_POOLED);\x20pickup_point\x20without\x20the\x20absolute\x20batch\x20cutoff\x20or\x20the\x20unclaimed-goods\x20exit\x20window\x20(LOGISTICS_PICKUP_CUTOFF_MISSING);\x20carrier\x20without\x20tracking\x20evidence\x20(LOGISTICS_CARRIER_EVIDENCE_MISSING);\x20any\x20physical\x20mode\x20without\x20a\x20transit-loss\x20story\x20(LOGISTICS_TRANSIT_LOSS_UNCOVERED);\x20courier/pickup_point\x20without\x20the\x20two\x20dispatch\x20disclosures\x20(LOGISTICS_DISPATCH_UNDISCLOSED).'),'sales':z['array'](SaleItemPlanSchema)['optional']()['describe']('The\x20sellable\x20SKU\x20catalog\x20(upwc-cat-261017\x20CAT-A1\x20/\x20PLAN-SALES-01).\x20REQUIRED\x20for\x20template_generate\x20(A-2,\x20amz9-ln-261023):\x20an\x20empty/absent\x20catalog\x20is\x20refused\x20up-front\x20with\x20error_code\x20\x27sales_required\x27\x20—\x20the\x20published\x20Service\x20would\x20freeze\x20with\x20sales:\x20[]\x20and\x20every\x20order_new\x20aborts;\x20PLAN-SALES-01\x20is\x20now\x20an\x20INPUT\x20error\x20on\x20this\x20action,\x20not\x20a\x20post-hoc\x20audit\x20finding.\x20migration_apply\x20keeps\x20the\x20audit-finding\x20posture\x20(it\x20confirms\x20an\x20already-reviewed\x20import).\x20Item\x20shape\x20follows\x20the\x20chain\x27s\x20SaleItem:\x20{\x20name,\x20price,\x20quantity?,\x20wip_hash?\x20}\x20with\x20price\x20in\x20smallest\x20units.\x20OPTIONAL\x20per\x20item:\x20a\x20structured\x20`incentive`\x20object\x20(G-07:\x20{\x20amount,\x20conditions,\x20basis,\x20claim_window\x20},\x20all\x20strings)\x20declaring\x20the\x20buyer-perceivable\x20reward\x20terms\x20—\x20carried\x20verbatim\x20into\x20the\x20compiled\x20plan\x27s\x20service_sales\x20step\x20for\x20quote-time\x20disclosure;\x20it\x20is\x20plan\x20metadata\x20only\x20and\x20never\x20an\x20on-chain\x20SaleItem\x20field.'),'allow_unpinned_wip':z['boolean']()['optional']()['describe']('Explicit\x20risk\x20acceptance\x20(F-07,\x202026-11-04):\x20ship\x20SKUs\x20whose\x20.wip\x20detail\x20file\x20carries\x20NO\x20hash\x20pin.\x20'+'template_generate\x20REFUSES\x20an\x20unpinned\x20catalog\x20by\x20default\x20(CRITICAL\x20input\x20gap\x20—\x20the\x20SDK\x20aborts\x20a\x20sale\x20configure\x20whose\x20wip\x20is\x20empty,\x20and\x20an\x20unpinned\x20SKU\x20gives\x20buyers\x20no\x20delivery-integrity\x20guarantee).\x20'+'Preferred\x20cures:\x20pass\x20per-SKU\x20wip_hash\x20(from\x20the\x20wip_file\x20generate/upload/verify\x20flow\x20—\x20the\x20session\x20ledger\x20backfills\x20it\x20automatically\x20when\x20THIS\x20process\x20uploaded\x20or\x20verified\x20the\x20file),\x20or\x20declare\x20product_detail_source\x20so\x20the\x20kernel\x20resolves\x20the\x20sources.\x20'+'Set\x20true\x20ONLY\x20after\x20the\x20user\x20explicitly\x20accepts\x20an\x20unpinned\x20catalog;\x20the\x20wip_anchor\x20face\x20in\x20the\x20response\x20is\x20then\x20marked\x20acknowledged:true\x20instead\x20of\x20blocking.'),'log':z['record'](z['string'](),z['unknown']())['optional']()['describe']('A\x20prior\x20MigrationLog\x20(required\x20for\x20migration_review).'),'network':z['enum'](['testnet','mainnet','localnet'])['optional']()['describe']('Target\x20network\x20for\x20migration_import\x20/\x20migration_apply\x20(default\x20testnet;\x20mainnet\x20requires\x20explicit\x20user\x20confirmation;\x20\x27localnet\x27\x20is\x20a\x20provenance\x20label\x20for\x20locally\x20validated\x20plans\x20—\x20the\x20pipeline\x20never\x20executes\x20on-chain).'),'plan':z['record'](z['string'](),z['unknown']())['optional']()['describe']('The\x20creation\x20plan\x20to\x20execute\x20(required\x20for\x20plan_execute):\x20pass\x20the\x20object\x20returned\x20under\x20\x27plan\x27\x20by\x20template_generate\x20VERBATIM\x20—\x20mutating\x20steps\x20by\x20hand\x20is\x20what\x20the\x2032-manual-write\x20era\x20did.\x20Alternatively\x20pass\x20{root:\x27file\x27,\x20path:\x27<plan.json>\x27}\x20to\x20read\x20the\x20plan\x20from\x20disk\x20(HAR-P1-14:\x20avoids\x20echoing\x20a\x2038-40-step\x20plan\x20through\x20the\x20tool-call\x20arguments;\x20the\x20file\x20must\x20contain\x20the\x20plan\x20envelope\x20or\x20the\x20bare\x20plan\x20as\x20JSON).\x20Executing\x20requires\x20verdict.buildable=true;\x20a\x20blocked\x20plan\x20is\x20refused\x20at\x20the\x20freeze\x20gate.'),'completed_steps':z['array'](z['string']())['optional']()['describe']('plan_execute\x20resume\x20(AR-5):\x20step\x20ids\x20already\x20EXECUTED\x20in\x20a\x20prior\x20run.\x20Those\x20steps\x20are\x20adopted,\x20not\x20re-executed.\x20A\x20run\x20that\x20did\x20not\x20complete\x20returns\x20a\x20ready-to-pass\x20`resume`\x20payload\x20(completed_steps/previous_outputs)\x20—\x20pass\x20it\x20back\x20verbatim\x20instead\x20of\x20deriving\x20the\x20lists\x20by\x20hand.'),'previous_outputs':z['record'](z['string'](),z['string']())['optional']()['describe']('plan_execute\x20resume\x20(AR-5):\x20step\x20id\x20->\x20created\x20on-chain\x20address\x20map\x20from\x20the\x20prior\x20run\x27s\x20outputs\x20field,\x20so\x20$ref\x20bindings\x20resolve\x20against\x20the\x20objects\x20that\x20ALREADY\x20exist.'),'resume_from_step':z['string']()['optional']()['describe']('plan_execute\x20resume\x20(W5-08):\x20the\x20FIRST\x20step\x20to\x20(re-)execute\x20—\x20every\x20step\x20BEFORE\x20it\x20in\x20plan\x20order\x20is\x20adopted\x20from\x20previous_outputs.\x20Lighter\x20than\x20enumerating\x20completed_steps:\x20pass\x20the\x20first\x20step\x20whose\x20status\x20is\x20NOT\x20\x27executed\x27\x20in\x20the\x20failed\x20response,\x20plus\x20previous_outputs.\x20Unknown\x20ids\x20are\x20refused\x20—\x20the\x20resume\x20channel\x20binds\x20to\x20the\x20COMPLETE\x20plan,\x20never\x20to\x20one\x20slice\x27s\x20step\x20list.'),'retry_override':z['object']({'step_id':z['string']()['min'](0x1)['describe']('The\x20step\x20named\x20in\x20the\x20RETRY_LOCKED\x20refusal\x20(the\x20repeated-failure\x20guard\x27s\x20lock).'),'note':z['string']()['min'](0x1)['describe']('Why\x20one\x20more\x20round\x20is\x20justified\x20—\x20mandatory,\x20echoed\x20into\x20the\x20response\x20as\x20retry_override_applied\x20for\x20audit.')})['optional']()['describe']('plan_execute\x20(W5-08):\x20authorizes\x20ONE\x20more\x20round\x20for\x20a\x20step\x20that\x20failed\x20with\x20the\x20IDENTICAL\x20error\x20in\x202+\x20consecutive\x20rounds\x20(a\x20further\x20unchanged\x20re-run\x20is\x20refused\x20pre-execution).\x20The\x20note\x20is\x20mandatory\x20and\x20audit-trailed.'),'override_stale_build':z['boolean']()['optional']()['describe']('plan_execute\x20(O-F49):\x20the\x20ONLY\x20bypass\x20for\x20the\x20verdict\x20hard\x20gate.\x20The\x20gate\x20refuses\x20execution\x20when\x20the\x20plan\x20carries\x20verdict.buildable:false\x20or\x20the\x20running\x20build\x20state\x20is\x20UNVERIFIED\x20(stale_build\x20—\x20the\x20dist\x20lags\x20the\x20workspace\x20src).\x20Pass\x20true\x20ONLY\x20to\x20consciously\x20accept\x20that\x20risk;\x20the\x20override\x20is\x20audited\x20into\x20the\x20response\x20as\x20verdict_override.\x20Prefer\x20rebuilding\x20(pnpm\x20build\x20in\x20the\x20mcp\x20workspace)\x20and\x20re-running\x20template_generate.'),'arbitration_vote_policy':z['enum'](['open','party_panel'])['optional']()['describe']('Compile-time\x20voting-surface\x20choice\x20(O-F26):\x20\x27open\x27\x20(default)\x20keeps\x20the\x20kernel\x27s\x20constant\x20Bool-true\x20open-vote\x20injection\x20for\x20third_party\x20venues\x20(any\x20Passport\x20holder\x20may\x20vote);\x20\x27party_panel\x27\x20SKIPS\x20the\x20injection\x20so\x20the\x20R-ARB-VOTE-LOCK\x20publish\x20gate\x20demands\x20an\x20explicitly\x20configured\x20roster/threshold\x20voting\x20guard\x20(tpl_voting_guard_party_only\x20/\x20tpl_voting_guard_numeric_weight).\x20The\x20constant-true\x20face\x20is\x20scanner-red-flagged\x20either\x20way.'),'env':z['record'](z['string'](),z['unknown']())['optional']()['describe']('Environment\x20for\x20on-chain\x20execution\x20(plan_execute):\x20forwarded\x20to\x20the\x20executor\x20(e.g.\x20{\x20network:\x20\x27testnet\x27\x20}).'),'accounts':z['record'](z['string'](),z['unknown']())['optional']()['describe']('Per-step\x20signing\x20accounts\x20(BSW-F04):\x20named\x20envs\x20for\x20steps\x20that\x20declare\x20an\x20`account`\x20(currently\x20\x27arb_controller\x27\x20—\x20the\x20independent\x20third-party\x20Arbitration\x20controller,\x20E_ARBITRATION_PERMISSION_CONFLICT=33).\x20e.g.\x20{\x20arb_controller:\x20{\x20network:\x20\x27testnet\x27\x20}\x20}.\x20A\x20step\x20declaring\x20an\x20account\x20missing\x20from\x20this\x20map\x20FAILS\x20—\x20the\x20default\x20signer\x20is\x20never\x20silently\x20reused\x20for\x20an\x20account-bound\x20step.'),'timeout_ms':z['number']()['int']()['positive']()['optional']()['describe']('plan_execute\x20wall-clock\x20budget\x20for\x20the\x20WHOLE\x20run\x20(ktt4\x20RT-08):\x20set\x20it\x20BELOW\x20your\x20transport\x20timeout\x20when\x20the\x20plan\x20is\x20too\x20big\x20for\x20one\x20window\x20(~50\x20steps\x20x\x20~6s\x20each).\x20'+'The\x20budget\x20is\x20checked\x20BEFORE\x20each\x20step\x20—\x20a\x20step\x20is\x20never\x20interrupted\x20mid-flight\x20—\x20and\x20an\x20exhausted\x20budget\x20stops\x20the\x20run\x20CLEANLY,\x20returning\x20the\x20partial\x20steps/outputs\x20that\x20resume\x20directly\x20'+'(re-send\x20with\x20completed_steps\x20=\x20every\x20stepId\x20whose\x20status\x20is\x20\x27executed\x27,\x20previous_outputs\x20=\x20outputs).\x20Omit\x20to\x20run\x20to\x20completion\x20(subject\x20to\x20your\x20transport\x20timeout).')})['strict']();const ScanSummarySchema=z['object']({'risk_level':z['enum'](['low','medium','high','critical']),'passed':z['boolean'](),'finding_count':z['number'](),'findings_by_severity':z['record'](z['string'](),z['number']())['describe']('Finding\x20count\x20keyed\x20by\x20severity.'),'findings':z['array'](TemplateScanFindingSchema)['describe']('Every\x20finding\x20with\x20its\x20rule\x20id,\x20detail\x20and\x20suggestion.'),'red_flags':z['array'](z['string']())})['describe']('Pre-deploy\x20scan\x20summary\x20(generation/apply\x20only\x20runs\x20when\x20passed).'),SemanticIrEcho={'semantic_ir_digest':z['string']()['optional']()['describe']('sha256\x20of\x20the\x20frozen\x20Semantic\x20IR\x20artifact\x20(present\x20only\x20when\x20semantic_ir\x20was\x20supplied).'),'semantic_ir_issues':z['array'](z['string']())['optional']()['describe']('IR\x20claims\x20dropped/clamped/conflicting\x20during\x20validation\x20(unknown\x20vocabulary,\x20inverted\x20span,\x20sub-threshold\x20confidence).')};export const BenchmarkMigrationOutputSchema=z['object']({'result':z['discriminatedUnion']('action',[z['object']({'action':z['literal']('template_list'),'count':z['number']()['describe']('Number\x20of\x20templates\x20returned.'),'templates':z['array'](TemplateSummarySchema)['describe']('Template\x20listing\x20rows.'),'discovery_vocabulary':z['object']({'industries':z['array'](z['string']())['describe']('Registered\x20industry\x20names\x20a\x20Semantic\x20IR\x20discovery.industry\x20may\x20use.'),'tags':z['array'](z['string']())['describe']('The\x20CLOSED\x20canonical\x20discovery-tag\x20vocabulary\x20a\x20Semantic\x20IR\x20discovery.tags\x20entry\x20may\x20use.'),'product_refs':z['array'](z['string']())['describe']('Benchmark-product\x20slugs\x20a\x20Semantic\x20IR\x20discovery.product_ref\x20may\x20use.')})['describe']('The\x20closed,\x20language-neutral\x20vocabulary\x20for\x20Semantic\x20IR\x20discovery\x20evidence\x20—\x20callers\x20translate\x20into\x20these\x20tokens;\x20the\x20server\x20drops\x20anything\x20else\x20and\x20reports\x20it.'),'load_errors':z['array'](z['string']())['describe']('Template\x20files\x20that\x20failed\x20to\x20load/validate\x20(never\x20silently\x20dropped).')}),z['object']({'action':z['literal']('template_get'),'template':z['record'](z['string'](),z['unknown']())['describe']('Full\x20template\x20object\x20(machine_shape/guards/allocator/fee_params/body/...).')}),z['object']({'action':z['literal']('template_generate'),'template_id':z['string'](),...SemanticIrEcho,'scan':ScanSummarySchema,'plan':z['record'](z['string'](),z['unknown']())['describe']('Creation\x20plan\x20from\x20the\x20merchant-guide\x20pipeline\x20(never\x20executed\x20on-chain).'),'stale_build':StaleBuildDisclosureSchema,'verdict':z['object']({'buildable':z['boolean'](),'blockers':z['array'](z['string']()),'status':z['enum'](['READY','BLOCKED','UNVERIFIED'])['describe']('AZT-04\x20single\x20release\x20authority.\x20UNVERIFIED\x20(ks7\x20F-18\x20/\x20h1w9\x20F-17,\x20kp1\x20P1-5\x20residual):\x20the\x20stale_build\x20face\x20was\x20not\x20actionable,\x20so\x20the\x20verdict\x20is\x20void\x20AS\x20A\x20WHOLE\x20—\x20buildable\x20is\x20false\x20because\x20VERIFICATION\x20failed,\x20NOT\x20because\x20the\x20plan\x20is\x20defective\x20(read\x20blockers[0]\x20and\x20stale_build,\x20rebuild,\x20re-run).')})['describe']('Single\x20aggregate\x20ruling\x20over\x20the\x20three\x20signal\x20faces\x20(scan.passed\x20/\x20plan.graph_validation.valid\x20/\x20plan.audit.blocking)\x20—\x20the\x20authoritative\x20go/no-go\x20(bkmn-261012\x20F-M62);\x20the\x20individual\x20faces\x20stay\x20advisory.'),'next_action':z['string']()['describe']('Top-level\x20forwarding\x20of\x20the\x20materialization\x20contract\x20(C6):\x20the\x20guide\x27s\x20\x27Plan\x20ready.\x20Materialize:\x20...\x27\x20text\x20verbatim\x20when\x20the\x20audit\x20is\x20clean\x20and\x20the\x20build\x20is\x20fresh;\x20a\x20BLOCKED\x20reroute,\x20or\x20a\x20DO-NOT-EXECUTE\x20rebuild-first\x20reroute\x20when\x20stale_build.actionable\x20is\x20false,\x20otherwise.')}),z['object']({'action':z['literal']('template_scan'),'scan':z['object']({'template_id':z['string'](),'risk_level':z['enum'](['low','medium','high','critical']),'passed':z['boolean'](),'findings':z['array'](TemplateScanFindingSchema),'red_flags':z['array'](z['string']()),'drift':z['record'](z['string'](),z['unknown']())['describe']('Disk-vs-catalog\x20drift\x20face\x20for\x20the\x20scanned\x20body\x20(S14-E2).'),'compile_dry_run':z['object']({'status':z['enum'](['ready','blocked','unavailable','unverified']),'buildable':z['boolean']()['optional'](),'blockers':z['array'](z['string']())['optional'](),'note':z['string']()})['describe']('Compile-kernel\x20probe\x20verdict\x20—\x20the\x20same\x20authority\x20template_generate\x20enforces\x20(S14-E2/GF-29).\x20\x27unverified\x27\x20(ks7\x20F-18\x20/\x20h1w9\x20F-17):\x20the\x20stale_build\x20face\x20was\x20not\x20actionable,\x20so\x20the\x20probe\x27s\x20verdict\x20is\x20void\x20—\x20rebuild\x20and\x20re-run.')})['describe']('Full\x20pre-deploy\x20scan\x20result.'),'stale_build':StaleBuildDisclosureSchema,'buildable':z['boolean']()['describe']('TOP-level\x20build\x20verdict\x20(S14-E2):\x20the\x20ONE\x20authority\x20buildVerdict\x20shares\x20with\x20template_generate\x20—\x20the\x20static\x20passed/risk_level\x20stay\x20advisory.'),'build_blockers':z['array'](z['string']())['describe']('Why\x20the\x20compile\x20kernel\x20refuses\x20(absent/empty\x20when\x20not\x20definitively\x20blocked).'),'next_action':z['string']()['describe']('Verdict-obedient\x20routing\x20(ZR-41):\x20BLOCKED\x20refusal,\x20proceed-to-generate,\x20or\x20the\x20UNVERIFIED\x20rebuild-first\x20reroute\x20when\x20stale_build.actionable\x20is\x20false.')}),z['object']({'action':z['literal']('migration_import'),'log':MigrationLogSchema['describe']('The\x20structured\x20migration\x20log.'),'buildable':z['boolean']()['optional']()['describe']('Compile-kernel\x20build\x20verdict\x20on\x20probe\x20inputs\x20(S14-E2;\x20absent\x20when\x20the\x20probe\x20could\x20not\x20run)\x20—\x20the\x20matched\x20template\x27s\x20buildability,\x20surfaced\x20at\x20the\x20earliest\x20migration\x20face.'),'build_blockers':z['array'](z['string']())['optional']()['describe']('Why\x20the\x20compile\x20kernel\x20refuses\x20(present\x20only\x20when\x20the\x20probe\x20ruled).'),'compile_dry_run':z['object']({'status':z['enum'](['ready','blocked','unavailable','unverified']),'note':z['string']()})['optional']()['describe']('Probe\x20verdict\x20face\x20(S14-E2).'),'inference_source':z['enum'](['keywords','semantic_ir','semantic_ir+keywords'])['optional']()['describe']('Which\x20layer\x20resolved\x20the\x20industry:\x20\x27keywords\x27\x20=\x20English\x20lexical\x20match\x20only;\x20\x27semantic_ir\x27\x20=\x20'+'the\x20caller\x27s\x20IR\x20decided;\x20\x27semantic_ir+keywords\x27\x20=\x20both\x20contributed.\x20Present\x20only\x20when\x20semantic_ir\x20was\x20supplied.'),...SemanticIrEcho,'next_action':z['string']()['describe']('Next\x20chain\x20step:\x20run\x20migration_review\x20with\x20this\x20log\x20(C6\x20—\x20the\x20chain\x20is\x20self-describing,\x20no\x20agent\x20re-exploration);\x20carries\x20a\x20BLOCKED\x20warning\x20tail\x20when\x20the\x20probe\x20refused\x20(S14-E2).')}),z['object']({'action':z['literal']('migration_review'),'log':MigrationLogSchema['describe']('The\x20migration\x20log\x20under\x20review.'),'review_summary':z['object']({'mapped_count':z['number'](),'unmapped_count':z['number'](),'manual_review_count':z['number'](),'risk_passed':z['boolean'](),'buildable':z['boolean']()['optional']()['describe']('Compile-kernel\x20build\x20verdict\x20on\x20probe\x20inputs\x20(S14-E2;\x20absent\x20when\x20the\x20probe\x20could\x20not\x20run)\x20—\x20a\x20DEFINITIVE\x20false\x20verdict\x20un-cleans\x20the\x20route.'),'build_blockers':z['array'](z['string']())['optional']()['describe']('Why\x20the\x20compile\x20kernel\x20refuses\x20(present\x20only\x20when\x20the\x20probe\x20ruled).'),'compile_dry_run':z['object']({'status':z['enum'](['ready','blocked','unavailable','unverified']),'note':z['string']()})['optional']()['describe']('Probe\x20verdict\x20face\x20(S14-E2).')})['describe']('Counts\x20+\x20risk\x20status\x20+\x20build\x20verdict\x20(S14-E2)\x20for\x20the\x20confirmation\x20screen.'),'next_action':z['string']()['describe']('Next\x20chain\x20step:\x20migration_apply\x20with\x20the\x20matched\x20template\x20when\x20the\x20review\x20is\x20clean;\x20surface\x20the\x20unmapped/manual_review\x20items\x20for\x20a\x20user\x20decision\x20otherwise.')}),z['object']({'action':z['literal']('migration_apply'),'template_id':z['string'](),'network':z['enum'](['testnet','mainnet','localnet']),...SemanticIrEcho,'scan':ScanSummarySchema,'plan':z['record'](z['string'](),z['unknown']())['describe']('Creation\x20plan\x20from\x20the\x20merchant-guide\x20pipeline\x20(never\x20executed\x20on-chain).'),'verdict':z['object']({'buildable':z['boolean'](),'blockers':z['array'](z['string']()),'status':z['enum'](['READY','BLOCKED','UNVERIFIED'])['describe']('AZT-04\x20single\x20release\x20authority.\x20UNVERIFIED\x20(ks7\x20F-18\x20/\x20h1w9\x20F-17,\x20kp1\x20P1-5\x20residual):\x20the\x20stale_build\x20face\x20was\x20not\x20actionable,\x20so\x20the\x20verdict\x20is\x20void\x20AS\x20A\x20WHOLE\x20—\x20buildable\x20is\x20false\x20because\x20VERIFICATION\x20failed,\x20NOT\x20because\x20the\x20plan\x20is\x20defective\x20(read\x20blockers[0]\x20and\x20stale_build,\x20rebuild,\x20re-run).')})['describe']('Single\x20aggregate\x20ruling\x20over\x20the\x20three\x20signal\x20faces\x20(scan.passed\x20/\x20plan.graph_validation.valid\x20/\x20plan.audit.blocking)\x20—\x20the\x20authoritative\x20go/no-go\x20(bkmn-261012\x20F-M62);\x20the\x20individual\x20faces\x20stay\x20advisory.'),'next_action':z['string']()['describe']('Top-level\x20forwarding\x20of\x20the\x20materialization\x20contract\x20(C6):\x20the\x20guide\x27s\x20\x27Plan\x20ready.\x20Materialize:\x20...\x27\x20text\x20verbatim\x20when\x20the\x20audit\x20is\x20clean\x20and\x20the\x20build\x20is\x20fresh;\x20a\x20BLOCKED\x20reroute,\x20or\x20a\x20DO-NOT-EXECUTE\x20rebuild-first\x20reroute\x20when\x20stale_build.actionable\x20is\x20false,\x20otherwise.')}),z['object']({'action':z['literal']('plan_execute'),'completed':z['boolean']()['describe']('True\x20when\x20EVERY\x20step\x20executed\x20(store\x20fully\x20deployed).'),'steps':z['array'](z['record'](z['string'](),z['unknown']()))['describe']('Per-step\x20results:\x20{\x20stepId,\x20status:\x20executed|failed|blocked,\x20digest?,\x20address?,\x20error?\x20}.'),'outputs':z['record'](z['string'](),z['string']())['describe']('step\x20id\x20->\x20created\x20on-chain\x20address\x20(create\x20steps).\x20Feed\x20back\x20as\x20previous_outputs\x20when\x20resuming.'),'preflight':z['record'](z['string'](),z['unknown']())['describe']('Freeze-gate\x20audit\x20the\x20run\x20was\x20gated\x20on\x20(issues\x20+\x20findings).'),'readback':z['record'](z['string'](),z['unknown']())['describe']('Post-execution\x20conservation/readback\x20checks.'),'resume':z['object']({'completed_steps':z['array'](z['string']())['describe']('Every\x20stepId\x20whose\x20status\x20is\x20\x27executed\x27\x20in\x20this\x20response\x20(fresh\x20OR\x20adopted)\x20—\x20the\x20completed_steps\x20of\x20the\x20next\x20round.'),'previous_outputs':z['record'](z['string'](),z['string']())['describe']('This\x20response\x27s\x20outputs\x20—\x20the\x20previous_outputs\x20of\x20the\x20next\x20round.')})['optional']()['describe']('W5-08\x20①:\x20the\x20READY-TO-PASS\x20resume\x20payload,\x20present\x20whenever\x20the\x20run\x20did\x20NOT\x20complete.\x20Pass\x20both\x20fields\x20back\x20verbatim\x20on\x20the\x20next\x20plan_execute\x20call\x20(or\x20use\x20resume_from_step\x20+\x20previous_outputs).'),'repeated_failures':z['array'](z['object']({'step_id':z['string'](),'consecutive_rounds':z['number'](),'error':z['string']()}))['optional']()['describe']('W5-08\x20③:\x20steps\x20that\x20failed\x20with\x20the\x20IDENTICAL\x20error\x20in\x202+\x20consecutive\x20rounds\x20—\x20the\x20run\x20withholds\x20the\x20generic\x20RESUME\x20recipe\x20for\x20these;\x20fix\x20the\x20cause\x20before\x20resuming.'),'retry_prohibited':z['boolean']()['optional']()['describe']('W5-08\x20③:\x20true\x20alongside\x20repeated_failures\x20—\x20a\x20further\x20unchanged\x20re-run\x20is\x20REFUSED\x20pre-execution\x20(retry_override\x20is\x20the\x20audited\x20escape\x20hatch).'),'retry_override_applied':z['object']({'step_id':z['string'](),'note':z['string']()})['optional']()['describe']('W5-08\x20③\x20audit\x20trail:\x20the\x20retry_override\x20accepted\x20this\x20round\x20(step\x20cleared\x20from\x20the\x20repeated-failure\x20ledger).'),'digest_check':z['object']({'plan_catalog_version':z['number']()['nullable'](),'current_catalog_version':z['number'](),'plan_template_digest':z['string']()['nullable'](),'current_template_digest':z['string']()['nullable'](),'template_digest_match':z['boolean']()['optional']()})['optional']()['describe']('O-F49:\x20the\x20plan-generation-time\x20template_digest\x20vs\x20the\x20CURRENT\x20catalog\x27s\x20digest\x20for\x20the\x20plan\x27s\x20template\x20—\x20present\x20when\x20the\x20plan\x20names\x20a\x20tracked\x20template.\x20A\x20false\x20template_digest_match\x20(or\x20version\x20mismatch)\x20is\x20what\x20the\x20pre-execution\x20stale-plan\x20gate\x20refuses\x20on.'),'verdict_override':z['object']({'parameter':z['string'](),'reason':z['string'](),'stale_build':z['record'](z['string'](),z['unknown']())})['optional']()['describe']('O-F49\x20audit\x20trail:\x20the\x20override_stale_build:true\x20accepted\x20this\x20round\x20—\x20the\x20refused\x20verdict/build\x20face\x20the\x20caller\x20consciously\x20overrode.\x20Absent\x20on\x20a\x20normally\x20gated\x20run.'),'next_action':z['string']()['describe']('One-click\x20forwarding:\x20deploy-complete\x20guidance,\x20the\x20resume\x20recipe\x20(completed_steps\x20+\x20previous_outputs)\x20after\x20a\x20mid-run\x20failure,\x20or\x20the\x20STOP-retrying\x20ruling\x20when\x20the\x20same\x20error\x20recurred.')})])})['strict']();
|
|
@@ -48,14 +48,14 @@ export declare const CallAllocation_CreateSchema: z.ZodObject<{
|
|
|
48
48
|
for_object: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
|
|
49
49
|
for_guard: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
|
|
50
50
|
remark: z.ZodString;
|
|
51
|
-
index: z.
|
|
51
|
+
index: z.ZodNumber;
|
|
52
52
|
}, z.core.$strip>;
|
|
53
53
|
allow_unanchored: z.ZodOptional<z.ZodBoolean>;
|
|
54
54
|
}, z.core.$strict>;
|
|
55
55
|
export declare const FormulaSpecSchema: z.ZodObject<{
|
|
56
56
|
repo: z.ZodString;
|
|
57
57
|
key: z.ZodString;
|
|
58
|
-
selector: z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<1>]>;
|
|
58
|
+
selector: z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<1>, z.ZodLiteral<2>]>;
|
|
59
59
|
predicate: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
60
60
|
ids: z.ZodArray<z.ZodString>;
|
|
61
61
|
}, z.core.$strict>;
|
|
@@ -82,7 +82,7 @@ export declare const CallAllocation_OperateSchema: z.ZodObject<{
|
|
|
82
82
|
spec: z.ZodObject<{
|
|
83
83
|
repo: z.ZodString;
|
|
84
84
|
key: z.ZodString;
|
|
85
|
-
selector: z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<1>]>;
|
|
85
|
+
selector: z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<1>, z.ZodLiteral<2>]>;
|
|
86
86
|
predicate: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
87
87
|
ids: z.ZodArray<z.ZodString>;
|
|
88
88
|
}, z.core.$strict>;
|
|
@@ -137,7 +137,7 @@ export declare const CallAllocation_DataSchema: z.ZodUnion<readonly [z.ZodObject
|
|
|
137
137
|
for_object: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
|
|
138
138
|
for_guard: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
|
|
139
139
|
remark: z.ZodString;
|
|
140
|
-
index: z.
|
|
140
|
+
index: z.ZodNumber;
|
|
141
141
|
}, z.core.$strip>;
|
|
142
142
|
allow_unanchored: z.ZodOptional<z.ZodBoolean>;
|
|
143
143
|
}, z.core.$strict>, z.ZodObject<{
|
|
@@ -163,7 +163,7 @@ export declare const CallAllocation_DataSchema: z.ZodUnion<readonly [z.ZodObject
|
|
|
163
163
|
spec: z.ZodObject<{
|
|
164
164
|
repo: z.ZodString;
|
|
165
165
|
key: z.ZodString;
|
|
166
|
-
selector: z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<1>]>;
|
|
166
|
+
selector: z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<1>, z.ZodLiteral<2>]>;
|
|
167
167
|
predicate: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
168
168
|
ids: z.ZodArray<z.ZodString>;
|
|
169
169
|
}, z.core.$strict>;
|
|
@@ -219,7 +219,7 @@ export declare const CallAllocation_InputSchema: z.ZodObject<{
|
|
|
219
219
|
for_object: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
|
|
220
220
|
for_guard: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
|
|
221
221
|
remark: z.ZodString;
|
|
222
|
-
index: z.
|
|
222
|
+
index: z.ZodNumber;
|
|
223
223
|
}, z.core.$strip>;
|
|
224
224
|
allow_unanchored: z.ZodOptional<z.ZodBoolean>;
|
|
225
225
|
}, z.core.$strict>, z.ZodObject<{
|
|
@@ -245,7 +245,7 @@ export declare const CallAllocation_InputSchema: z.ZodObject<{
|
|
|
245
245
|
spec: z.ZodObject<{
|
|
246
246
|
repo: z.ZodString;
|
|
247
247
|
key: z.ZodString;
|
|
248
|
-
selector: z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<1>]>;
|
|
248
|
+
selector: z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<1>, z.ZodLiteral<2>]>;
|
|
249
249
|
predicate: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
250
250
|
ids: z.ZodArray<z.ZodString>;
|
|
251
251
|
}, z.core.$strict>;
|
|
@@ -268,6 +268,10 @@ export declare const CallAllocation_InputSchema: z.ZodObject<{
|
|
|
268
268
|
client_schema_version: z.ZodOptional<z.ZodString>;
|
|
269
269
|
schema_strict_mode: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
270
270
|
dry_run: z.ZodOptional<z.ZodBoolean>;
|
|
271
|
+
window_profile: z.ZodOptional<z.ZodEnum<{
|
|
272
|
+
production: "production";
|
|
273
|
+
test: "test";
|
|
274
|
+
}>>;
|
|
271
275
|
response_level: z.ZodOptional<z.ZodEnum<{
|
|
272
276
|
full: "full";
|
|
273
277
|
compact: "compact";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{z}from'zod';import{CoinParamSchema,CallEnvSchema,SubmissionCallSchema,TypeNamedObjectSchema}from'./base.js';import{AllocatorsSchema,PaymentInfoSchema,RepositoryDataWhereSchema}from'../query/index.js';import{NameOrAddressSchema,ReceivedBalanceOrRecentlySchema,RECEIVE_FORMAT_BLOCK_BALANCE}from'../common/index.js';export const CallAllocation_CreateSchema=z['object']({'object':TypeNamedObjectSchema['describe']('REQUIRED\x20for\x20creating\x20new\x20object.\x20Provide\x20{name:\x20\x27yourName\x27,\x20type:\x20\x27Allocation\x27}\x20to\x20create\x20and\x20name\x20the\x20new\x20Allocation\x20object.'),'allocators':AllocatorsSchema,'coin':CoinParamSchema,'payment_info':PaymentInfoSchema,'allow_unanchored':z['boolean']()['optional']()['describe']('docs#11\x20escape\x20hatch:\x20explicitly\x20allow\x20creating\x20an\x20Allocation\x20whose\x20payment_info\x20has\x20NO\x20for_object\x20anchor\x20while\x20any\x20sharing\x20row\x20uses\x20a\x20GuardIdentifier\x20recipient.\x20'+'Unanchored\x20+\x20GuardIdentifier\x20lets\x20any\x20guard-passing\x20caller\x20redirect\x20the\x20submitted\x20payout\x20address\x20to\x20an\x20arbitrary\x20address\x20—\x20'+'anchor\x20it\x20with\x20payment_info.for_object\x20instead.\x20Set\x20true\x20ONLY\x20after\x20the\x20user\x20explicitly\x20accepts\x20that\x20risk.\x20Default:\x20blocked.')})['strict']()['describe']('Create\x20a\x20new\x20Allocation\x20object.\x20Set\x20\x27object\x27\x20field\x20with\x20{name:\x20\x27yourName\x27,\x20type:\x20\x27Allocation\x27}\x20to\x20name\x20the\x20new\x20object.\x20Notice:\x27name\x27\x20goes\x20INSIDE\x20\x27object\x27,\x20NOT\x20at\x20the\x20data\x20root\x20level.');export const FormulaSpecSchema=z['object']({'repo':NameOrAddressSchema['describe']('Repository\x20object\x20(ID\x20or\x20LocalMark\x20name)\x20whose\x20policy-key\x20data\x20table\x20is\x20scanned\x20at\x20alloc()\x20time\x20to\x20produce\x20the\x20scalar.\x20'+'Resolved\x20to\x20an\x20address\x20before\x20the\x20call.'),'key':z['string']()['describe']('Policy\x20key\x20(String)\x20inside\x20that\x20Repository\x20whose\x20data\x20rows\x20are\x20the\x20candidate\x20set.\x20Max\x2064\x20bytes.'),'selector':z['union']([z['literal'](0x0),z['literal'](0x1)])['describe']('Which\x20aggregate\x20produces\x20the\x20scalar:\x200\x20=\x20RECORD\x20COUNT\x20(u64\x20—\x20how\x20many\x20candidate\x20rows\x20match\x20the\x20predicate),\x20'+'1\x20=\x20VALUE\x20SUM\x20(u256\x20—\x20sum\x20of\x20the\x20matching\x20rows\x27\x20numeric\x20payloads,\x20overflow-safe).\x20Any\x20other\x20value\x20is\x20refused\x20on-chain\x20(EFORMULA_SPEC_INVALID=24).'),'predicate':RepositoryDataWhereSchema['describe']('Predicate\x20filter\x20applied\x20to\x20each\x20candidate\x27s\x20stored\x20value\x20—\x20SAME\x20wire\x20format\x20as\x20the\x20repository\x20count/sum-where\x20guard\x20queries\x20(1173/1174).\x20'+'kind\x20must\x20match\x20the\x20policy\x20value\x20type;\x20mismatching\x20entries\x20are\x20skipped\x20honestly\x20(never\x20an\x20error).'),'ids':z['array'](z['string']())['describe']('EXPLICIT\x20candidate\x20object\x20IDs\x20(vector<address>)\x20to\x20scan.\x20Duplicates\x20are\x20deduped;\x20max\x20100\x20candidates;\x20'+'an\x20EMPTY\x20list\x20matches\x20no\x20records\x20(scalar\x200)\x20—\x20there\x20is\x20no\x20\x27all\x20objects\x27\x20wildcard.\x20'+'S12-③\x20witness\x20boundary\x20(v139):\x20the\x20100-cap\x20applies\x20to\x20THIS\x20guard-table\x20vector;\x20the\x20guard\x27s\x20inline\x20WITNESS\x20is\x20'+'separately\x20capped\x20at\x204096\x20BCS\x20bytes\x20total\x20(passport\x20MAX_SUBMISSION_SIZE\x20—\x20a\x20100-address\x20roster\x20fits),\x20so\x20keep\x20'+'roster-style\x20attestation\x20here\x20in\x20the\x20vector\x20and\x20reserve\x20the\x20witness\x20for\x20per-call\x20attestation.')})['strict']()['describe']('Runtime\x20pricing\x20spec\x20for\x20one\x20Formula\x20sharing\x20slot\x20(FormulaSpec).\x20Payout\x20for\x20that\x20leg\x20=\x20clamp(sharing_coefficient_bps\x20×\x20scalar\x20/\x2010000,\x200,\x20headroom),\x20'+'where\x20scalar\x20=\x20the\x20selected\x20aggregate\x20over\x20the\x20Repository\x20rows.\x20Binding\x20REPLACES\x20any\x20previous\x20spec\x20for\x20the\x20slot;\x20the\x20plan\x20shape\x20itself\x20'+'(which\x20slots\x20are\x20Formula,\x20coefficients)\x20is\x20immutable\x20and\x20was\x20fixed\x20when\x20the\x20allocator\x20was\x20declared.');export const CallAllocation_OperateSchema=z['object']({'object':NameOrAddressSchema['describe']('REQUIRED\x20for\x20operating\x20existing\x20object.\x20Provide\x20the\x20Allocation\x20object\x20ID\x20or\x20existing\x20name\x20to\x20reference\x20the\x20target\x20object.'),'received_coins':ReceivedBalanceOrRecentlySchema['optional']()['describe']('Unwrap\x20the\x20CoinWrapper\x20objects\x20received\x20by\x20the\x20Allocation\x20object\x20and\x20deposit\x20them\x20into\x20the\x20pending\x20allocation\x20balance.'+RECEIVE_FORMAT_BLOCK_BALANCE),'alloc_by_guard':NameOrAddressSchema['optional']()['describe']('Verify\x20the\x20specified\x20Guard\x20and\x20execute\x20the\x20corresponding\x20fund\x20distribution.\x20'+'GENERIC\x20SEMANTICS:\x20an\x20Allocation\x20distributes\x20whatever\x20balance\x20it\x20holds\x20—\x20order\x20funds,\x20payroll,\x20dividends,\x20bounties.\x20'+'It\x20defines\x20no\x20scenario-specific\x20rule:\x20eligibility\x20(including\x20issuer\x20identity\x20for\x20standalone\x20use,\x20e.g.\x20an\x20org\x20admin)\x20'+'and\x20differentiation\x20inputs\x20are\x20expressed\x20as\x20Guard\x20constraints,\x20all\x20public\x20and\x20auditable.\x20'+'RECIPIENT\x20RESOLUTION\x20(Recipient\x20enum):\x20'+'Entity\x20→\x20fixed\x20address;\x20Signer\x20→\x20transaction\x20sender;\x20GuardIdentifier\x20n\x20→\x20the\x20address\x20submitted\x20for\x20identifier\x20n\x20(resolved\x20from\x20the\x20passport\x27s\x20submission\x20record).\x20'+'ORDER\x20PATTERN\x20(canonical):\x20the\x20Guard\x20table\x20needs\x20ONE\x20submitted\x20Order,\x20constrained\x20by\x20the\x20Guard\x20(e.g.\x20order.service\x20==\x20host\x20service,\x20'+'progress\x20at\x20a\x20qualifying\x20node,\x20signer\x20==\x20order.owner);\x20that\x20order\x20submission\x20IS\x20the\x20recipient\x20slot.\x20Whoever\x20triggers\x20the\x20distribution,\x20funds\x20necessarily\x20'+'land\x20at\x20an\x20Order\x20OBJECT;\x20delivered\x20CoinWrappers\x20are\x20owned\x20by\x20the\x20order\x20and\x20can\x20be\x20extracted\x20only\x20by\x20the\x20Order\x20object\x20itself\x20'+'(Wow\x20ownership)\x20—\x20the\x20coins\x20then\x20go\x20to\x20the\x20order\x27s\x20current\x20owner.\x20Object\x20receipt\x20=\x20owner\x20receipt.\x20'+'POST-DISTRIBUTION\x20CLAIM\x20(required\x20step):\x20each\x20recipient\x20gets\x20a\x20CoinWrapper\x20(not\x20spendable\x20coins)\x20—\x20EOA\x20wallet\x20→\x20operation_type=\x27payment\x27\x20RECEIVE\x20mode\x20'+'{object:\x27<coinwrapper_id>\x27,\x20receive:true};\x20Order\x20object\x20→\x20operation_type=\x27order\x27\x20{object:\x27<order_id>\x27,\x20receive:\x27recently\x27};\x20Treasury\x20object\x20→\x20treasury\x20receive.\x20'+'Find\x20pending\x20CoinWrappers\x20via\x20query_toolkit\x20query_type=\x27onchain_received\x27;\x20verify\x20via\x20the\x20immutable\x20Payment\x20object\x20(allocation.payment\x20array).\x20'+'RISK:\x20safety\x20follows\x20from\x20the\x20sufficiency\x20of\x20the\x20Guard\x20constraints,\x20not\x20the\x20recipient\x20form\x20—\x20analyze\x20the\x20recipient\x20constraint\x20audit\x20before\x20publish;\x20'+'structural\x20residuals\x20(unavoidable):\x20permissionless\x20alloc\x20allows\x20forced\x20settlement\x20timing,\x20the\x20submitted\x20order\x20is\x20not\x20bound\x20to\x20the\x20settled\x20allocation,\x20'+'and\x20allocators/guards\x20are\x20immutable\x20after\x20publish.'),'alloc_batch':NameOrAddressSchema['array']()['min'](0x1)['optional']()['describe']('Q8-F01\x20AGGREGATE\x20RELEASE\x20—\x20sweep\x20SEVERAL\x20pools\x20in\x20ONE\x20transaction\x20(allocation::alloc_batch).\x20'+'Provide\x20the\x20COMPLETE\x20pool\x20list\x20INCLUDING\x20\x27object\x27:\x20the\x20anchor\x20Allocation\x20addressed\x20by\x20this\x20operation\x20must\x20'+'appear\x20in\x20the\x20list,\x20and\x20the\x20SDK\x20refuses\x20a\x20list\x20that\x20omits\x20it.\x20REQUIRES\x20alloc_by_guard\x20—\x20that\x20one\x20Guard\x20'+'defines\x20the\x20release\x20and\x20is\x20applied\x20to\x20every\x20pool.\x20'+'WHY\x20THIS\x20EXISTS:\x20a\x20crowdfunding\x20settlement\x20holds\x20each\x20backer\x27s\x20escrow\x20in\x20its\x20own\x20Allocation\x20under\x20the\x20SAME\x20'+'release/refund\x20Guard;\x20with\x20single-pool\x20calls\x20a\x20keeper\x20needs\x20N\x20ordered\x20transactions,\x20and\x20any\x20keeper\x20that\x20stops\x20'+'at\x20the\x20first\x20failure\x20strands\x20the\x20remaining\x20pools\x20while\x20the\x20release\x20reports\x20done.\x20'+'ALL-OR-NOTHING:\x20one\x20pool\x20aborting\x20reverts\x20the\x20whole\x20batch.\x20'+'PRE-FILTER\x20drained\x20pools\x20before\x20building\x20the\x20call\x20—\x20a\x20zero-balance\x20pool\x20aborts\x20the\x20ENTIRE\x20batch\x20with\x20'+'EZERO_DISTRIBUTION\x20(14)\x20and\x20nothing\x20is\x20released;\x20an\x20empty\x20candidate\x20set\x20means\x20there\x20is\x20genuinely\x20nothing\x20to\x20'+'release\x20(an\x20empty\x20list\x20is\x20refused\x20with\x20EEMPTY_POOL_BATCH\x2026\x20instead\x20of\x20a\x20fake\x20success).\x20'+'EVERY\x20pool\x20must\x20carry\x20an\x20allocator\x20BOUND\x20to\x20alloc_by_guard:\x20an\x20unbound\x20pool\x20completes\x20the\x20sweep\x20having\x20'+'distributed\x20NOTHING,\x20so\x20the\x20SDK\x20verifies\x20membership\x20pool-by-pool\x20and\x20REFUSES\x20the\x20call\x20before\x20any\x20gas\x20is\x20spent.\x20'+'Each\x20recipient\x20still\x20receives\x20a\x20CoinWrapper\x20and\x20claims\x20it\x20through\x20the\x20normal\x20POST-DISTRIBUTION\x20CLAIM\x20step\x20—\x20'+'batching\x20changes\x20the\x20release\x20atomicity,\x20not\x20the\x20claim\x20path.'),'acknowledge_dual_payout':z['boolean']()['optional']()['describe']('A-1\x20(amz9-ln-261023;\x20keeper\x20posture\x20拍板⑧\x20dm-mtw-261027)\x20explicit\x20opt-in\x20for\x20a\x20KNOWN\x20double\x20payout:\x20when\x20a\x20submitted\x20order\x20already\x20received\x20'+'arbitration\x20compensation\x20(order.claimed_by\x20set)\x20and\x20this\x20call\x20would\x20ALSO\x20release\x20its\x20escrow\x20(refund\x20track),\x20'+'the\x20call\x20is\x20REFUSED\x20unless\x20this\x20flag\x20is\x20true.\x20The\x20two\x20payout\x20tracks\x20are\x20independent\x20by\x20design\x20—\x20the\x20chain\x20'+'will\x20not\x20net\x20or\x20stop\x20the\x20second\x20payout\x20(the\x20escrow\x20receive\x20path\x20has\x20no\x20claimed_by\x20gate),\x20BUT\x20a\x20rail\x20paired\x20'+'on\x20order.claimed_by\x20(refund\x20none\x20/\x20recover\x20some)\x20may\x20guard-reject\x20the\x20second\x20payout\x20on-chain;\x20that\x20rejection\x20'+'is\x20the\x20designed\x20mutual\x20exclusion,\x20and\x20the\x20escrow\x20exits\x20via\x20the\x20paired\x20rail.\x20Buyer\x20NET\x20view:\x20total\x20received\x20=\x20'+'compensation\x20+\x20escrow\x20refund.\x20Leave\x20unset\x20for\x20normal\x20refunds\x20of\x20un-awarded\x20orders.\x20AUTOMATION\x20RULE:\x20this\x20flag\x20'+'is\x20the\x20HUMAN\x20operator\x27s\x20netting\x20decision\x20—\x20an\x20automated\x20keeper\x20that\x20receives\x20dual_payout_unconfirmed\x20must\x20STOP\x20'+'retrying\x20and\x20escalate\x20(never\x20set\x20the\x20flag\x20itself);\x20a\x20retry\x20loop\x20wastes\x20gas\x20and\x20a\x20silent\x20stop\x20strands\x20the\x20payout.\x20D-1\x20(ksr\x205R-08):\x20the\x20flag\x20is\x20additionally\x20honored\x20ONLY\x20when\x20the\x20'+'executing\x20store\x20carries\x20a\x20human-recorded\x20preauthorization\x20(config_operation\x20store_dual_payout_set\x20{account,\x20'+'confirm:true},\x20then\x20store_dual_payout_get\x20shows\x20preauthorized=true);\x20without\x20it\x20the\x20gate\x20answers\x20'+'dual_payout_preauthorization_required\x20—\x20record\x20the\x20standing\x20decision\x20first,\x20then\x20re-send.'),'formula_spec_set':z['object']({'allocator_index':z['number']()['int']()['min'](0x0)['describe']('Index\x20of\x20the\x20allocator\x20within\x20allocators.allocators\x20(0-based).\x20Must\x20address\x20an\x20EXISTING\x20allocator,\x20else\x20refused\x20on-chain\x20(EFORMULA_SPEC_INVALID=24).'),'slot_index':z['number']()['int']()['min'](0x0)['describe']('Index\x20of\x20the\x20sharing\x20row\x20within\x20that\x20allocator\x27s\x20sharing[]\x20(0-based).\x20Must\x20address\x20a\x20slot\x20whose\x20mode\x20is\x20Formula,\x20else\x20refused\x20on-chain\x20(EFORMULA_SPEC_INVALID=24).'),'spec':FormulaSpecSchema})['strict']()['optional']()['describe']('Bind\x20(or\x20replace)\x20the\x20runtime\x20pricing\x20spec\x20of\x20ONE\x20Formula\x20sharing\x20slot\x20of\x20this\x20Allocation\x20—\x20no\x20re-declaration\x20of\x20the\x20allocator\x20plan,\x20'+'no\x20fund\x20movement.\x20Only\x20the\x20DATA\x20SOURCE\x20(which\x20repository\x20aggregate\x20prices\x20the\x20slot)\x20is\x20set\x20here;\x20the\x20slot\x20itself\x20must\x20already\x20be\x20declared\x20as\x20a\x20'+'Formula\x20leg\x20(mode\x204).\x20An\x20unbound\x20Formula\x20slot\x20prices\x20its\x20scalar\x20as\x200.')})['strict']()['describe']('Operate\x20on\x20an\x20existing\x20Allocation\x20object.\x20Set\x20\x27object\x27\x20field\x20with\x20the\x20object\x20ID\x20or\x20existing\x20name\x20to\x20specify\x20the\x20target.');export const CallAllocation_DataSchema=z['union']([CallAllocation_CreateSchema,CallAllocation_OperateSchema])['describe']('On-chain\x20Allocation\x20operations.\x20USAGE:\x20(1)\x20CREATE\x20NEW:\x20Use\x20CallAllocation_CreateSchema\x20by\x20setting\x20\x27object\x27\x20with\x20OBJECT\x20format\x20{name,\x20type_parameter,\x20...}.\x20(2)\x20OPERATE\x20EXISTING:\x20Use\x20CallAllocation_OperateSchema\x20by\x20setting\x20\x27object\x27\x20with\x20STRING\x20format\x20(object\x20ID\x20or\x20name).\x20The\x20\x27object\x27\x20field\x20is\x20CRITICAL\x20and\x20REQUIRED\x20in\x20both\x20cases.\x20');export const CallAllocation_InputSchema=z['object']({'data':CallAllocation_DataSchema,'env':CallEnvSchema['optional'](),'submission':SubmissionCallSchema['optional']()})['strict']();
|
|
1
|
+
import{z}from'zod';import{CoinParamSchema,CallEnvSchema,SubmissionCallSchema,TypeNamedObjectSchema}from'./base.js';import{AllocatorsSchema,PaymentInfoSchema,RepositoryDataWhereSchema}from'../query/index.js';import{NameOrAddressSchema,ReceivedBalanceOrRecentlySchema,RECEIVE_FORMAT_BLOCK_BALANCE}from'../common/index.js';export const CallAllocation_CreateSchema=z['object']({'object':TypeNamedObjectSchema['describe']('REQUIRED\x20for\x20creating\x20new\x20object.\x20Provide\x20{name:\x20\x27yourName\x27,\x20type:\x20\x27Allocation\x27}\x20to\x20create\x20and\x20name\x20the\x20new\x20Allocation\x20object.'),'allocators':AllocatorsSchema,'coin':CoinParamSchema,'payment_info':PaymentInfoSchema,'allow_unanchored':z['boolean']()['optional']()['describe']('docs#11\x20escape\x20hatch:\x20explicitly\x20allow\x20creating\x20an\x20Allocation\x20whose\x20payment_info\x20has\x20NO\x20for_object\x20anchor\x20while\x20any\x20sharing\x20row\x20uses\x20a\x20GuardIdentifier\x20recipient.\x20'+'Unanchored\x20+\x20GuardIdentifier\x20lets\x20any\x20guard-passing\x20caller\x20redirect\x20the\x20submitted\x20payout\x20address\x20to\x20an\x20arbitrary\x20address\x20—\x20'+'anchor\x20it\x20with\x20payment_info.for_object\x20instead.\x20Set\x20true\x20ONLY\x20after\x20the\x20user\x20explicitly\x20accepts\x20that\x20risk.\x20Default:\x20blocked.')})['strict']()['describe']('Create\x20a\x20new\x20Allocation\x20object.\x20Set\x20\x27object\x27\x20field\x20with\x20{name:\x20\x27yourName\x27,\x20type:\x20\x27Allocation\x27}\x20to\x20name\x20the\x20new\x20object.\x20Notice:\x27name\x27\x20goes\x20INSIDE\x20\x27object\x27,\x20NOT\x20at\x20the\x20data\x20root\x20level.');export const FormulaSpecSchema=z['object']({'repo':NameOrAddressSchema['describe']('Repository\x20object\x20(ID\x20or\x20LocalMark\x20name)\x20whose\x20policy-key\x20data\x20table\x20is\x20scanned\x20at\x20alloc()\x20time\x20to\x20produce\x20the\x20scalar.\x20'+'Resolved\x20to\x20an\x20address\x20before\x20the\x20call.'),'key':z['string']()['describe']('Policy\x20key\x20(String)\x20inside\x20that\x20Repository\x20whose\x20data\x20rows\x20are\x20the\x20candidate\x20set.\x20Max\x2064\x20bytes.'),'selector':z['union']([z['literal'](0x0),z['literal'](0x1),z['literal'](0x2)])['describe']('Which\x20aggregate\x20produces\x20the\x20scalar:\x200\x20=\x20RECORD\x20COUNT\x20(u64\x20—\x20how\x20many\x20candidate\x20rows\x20match\x20the\x20predicate),\x20'+'1\x20=\x20VALUE\x20SUM\x20(u256\x20—\x20sum\x20of\x20the\x20matching\x20rows\x27\x20numeric\x20payloads,\x20overflow-safe),\x20'+'2\x20=\x20ESCROW-BOUND\x20VALUE\x20SUM\x20(u256\x20—\x20like\x201,\x20but\x20every\x20row\x20is\x20first\x20clamped\x20to\x20the\x20escrow\x20it\x20points\x20to:\x20'+'min(row_value,\x20Order.amount\x20of\x20the\x20Order\x20that\x20row\x27s\x20id\x20names);\x20a\x20row\x20whose\x20id\x20is\x20not\x20a\x20real\x20framework\x20Order\x20contributes\x200,\x20fail-closed).\x20'+'PREFER\x202\x20whenever\x20anyone\x20other\x20than\x20the\x20payer\x20can\x20write\x20the\x20candidate\x20rows:\x20an\x20unbound\x20SUM\x20(1)\x20lets\x20a\x20writer\x20inflate\x20the\x20scalar\x20simply\x20by\x20'+'writing\x20a\x20large\x20row,\x20while\x202\x20caps\x20each\x20row\x20at\x20the\x20real\x20order\x20amount\x20behind\x20it\x20(ksc-tn-261024\x20F-01\x20root\x20cure).\x20'+'Any\x20other\x20value\x20is\x20refused\x20on-chain\x20(EFORMULA_SPEC_INVALID=24).'),'predicate':RepositoryDataWhereSchema['describe']('Predicate\x20filter\x20applied\x20to\x20each\x20candidate\x27s\x20stored\x20value\x20—\x20SAME\x20wire\x20format\x20as\x20the\x20repository\x20count/sum-where\x20guard\x20queries\x20(1173/1174).\x20'+'kind\x20must\x20match\x20the\x20policy\x20value\x20type;\x20mismatching\x20entries\x20are\x20skipped\x20honestly\x20(never\x20an\x20error).'),'ids':z['array'](z['string']())['describe']('EXPLICIT\x20candidate\x20object\x20IDs\x20(vector<address>)\x20to\x20scan.\x20Duplicates\x20are\x20deduped;\x20max\x20100\x20candidates;\x20'+'an\x20EMPTY\x20list\x20matches\x20no\x20records\x20(scalar\x200)\x20—\x20there\x20is\x20no\x20\x27all\x20objects\x27\x20wildcard.\x20'+'S12-③\x20witness\x20boundary\x20(v140):\x20the\x20100-cap\x20applies\x20to\x20THIS\x20guard-table\x20vector;\x20the\x20guard\x27s\x20inline\x20WITNESS\x20is\x20'+'separately\x20capped\x20at\x204096\x20BCS\x20bytes\x20total\x20(passport\x20MAX_SUBMISSION_SIZE\x20—\x20a\x20100-address\x20roster\x20fits),\x20so\x20keep\x20'+'roster-style\x20attestation\x20here\x20in\x20the\x20vector\x20and\x20reserve\x20the\x20witness\x20for\x20per-call\x20attestation.')})['strict']()['describe']('Runtime\x20pricing\x20spec\x20for\x20one\x20Formula\x20sharing\x20slot\x20(FormulaSpec).\x20Payout\x20for\x20that\x20leg\x20=\x20clamp(sharing_coefficient_bps\x20×\x20scalar\x20/\x2010000,\x200,\x20headroom),\x20'+'where\x20scalar\x20=\x20the\x20selected\x20aggregate\x20over\x20the\x20Repository\x20rows.\x20Binding\x20REPLACES\x20any\x20previous\x20spec\x20for\x20the\x20slot;\x20the\x20plan\x20shape\x20itself\x20'+'(which\x20slots\x20are\x20Formula,\x20coefficients)\x20is\x20immutable\x20and\x20was\x20fixed\x20when\x20the\x20allocator\x20was\x20declared.');export const CallAllocation_OperateSchema=z['object']({'object':NameOrAddressSchema['describe']('REQUIRED\x20for\x20operating\x20existing\x20object.\x20Provide\x20the\x20Allocation\x20object\x20ID\x20or\x20existing\x20name\x20to\x20reference\x20the\x20target\x20object.'),'received_coins':ReceivedBalanceOrRecentlySchema['optional']()['describe']('Unwrap\x20the\x20CoinWrapper\x20objects\x20received\x20by\x20the\x20Allocation\x20object\x20and\x20deposit\x20them\x20into\x20the\x20pending\x20allocation\x20balance.'+RECEIVE_FORMAT_BLOCK_BALANCE),'alloc_by_guard':NameOrAddressSchema['optional']()['describe']('Verify\x20the\x20specified\x20Guard\x20and\x20execute\x20the\x20corresponding\x20fund\x20distribution.\x20'+'GENERIC\x20SEMANTICS:\x20an\x20Allocation\x20distributes\x20whatever\x20balance\x20it\x20holds\x20—\x20order\x20funds,\x20payroll,\x20dividends,\x20bounties.\x20'+'It\x20defines\x20no\x20scenario-specific\x20rule:\x20eligibility\x20(including\x20issuer\x20identity\x20for\x20standalone\x20use,\x20e.g.\x20an\x20org\x20admin)\x20'+'and\x20differentiation\x20inputs\x20are\x20expressed\x20as\x20Guard\x20constraints,\x20all\x20public\x20and\x20auditable.\x20'+'RECIPIENT\x20RESOLUTION\x20(Recipient\x20enum):\x20'+'Entity\x20→\x20fixed\x20address;\x20Signer\x20→\x20transaction\x20sender;\x20GuardIdentifier\x20n\x20→\x20the\x20address\x20submitted\x20for\x20identifier\x20n\x20(resolved\x20from\x20the\x20passport\x27s\x20submission\x20record).\x20'+'ORDER\x20PATTERN\x20(canonical):\x20the\x20Guard\x20table\x20needs\x20ONE\x20submitted\x20Order,\x20constrained\x20by\x20the\x20Guard\x20(e.g.\x20order.service\x20==\x20host\x20service,\x20'+'progress\x20at\x20a\x20qualifying\x20node,\x20signer\x20==\x20order.owner);\x20that\x20order\x20submission\x20IS\x20the\x20recipient\x20slot.\x20Whoever\x20triggers\x20the\x20distribution,\x20funds\x20necessarily\x20'+'land\x20at\x20an\x20Order\x20OBJECT;\x20delivered\x20CoinWrappers\x20are\x20owned\x20by\x20the\x20order\x20and\x20can\x20be\x20extracted\x20only\x20by\x20the\x20Order\x20object\x20itself\x20'+'(Wow\x20ownership)\x20—\x20the\x20coins\x20then\x20go\x20to\x20the\x20order\x27s\x20current\x20owner.\x20Object\x20receipt\x20=\x20owner\x20receipt.\x20'+'POST-DISTRIBUTION\x20CLAIM\x20(required\x20step):\x20each\x20recipient\x20gets\x20a\x20CoinWrapper\x20(not\x20spendable\x20coins)\x20—\x20EOA\x20wallet\x20→\x20operation_type=\x27payment\x27\x20RECEIVE\x20mode\x20'+'{object:\x27<coinwrapper_id>\x27,\x20receive:true};\x20Order\x20object\x20→\x20operation_type=\x27order\x27\x20{object:\x27<order_id>\x27,\x20receive:\x27recently\x27};\x20Treasury\x20object\x20→\x20treasury\x20receive.\x20'+'Find\x20pending\x20CoinWrappers\x20via\x20query_toolkit\x20query_type=\x27onchain_received\x27;\x20verify\x20via\x20the\x20immutable\x20Payment\x20object\x20(allocation.payment\x20array).\x20'+'RISK:\x20safety\x20follows\x20from\x20the\x20sufficiency\x20of\x20the\x20Guard\x20constraints,\x20not\x20the\x20recipient\x20form\x20—\x20analyze\x20the\x20recipient\x20constraint\x20audit\x20before\x20publish;\x20'+'structural\x20residuals\x20(unavoidable):\x20permissionless\x20alloc\x20allows\x20forced\x20settlement\x20timing,\x20the\x20submitted\x20order\x20is\x20not\x20bound\x20to\x20the\x20settled\x20allocation,\x20'+'and\x20allocators/guards\x20are\x20immutable\x20after\x20publish.'),'alloc_batch':NameOrAddressSchema['array']()['min'](0x1)['optional']()['describe']('Q8-F01\x20AGGREGATE\x20RELEASE\x20—\x20sweep\x20SEVERAL\x20pools\x20in\x20ONE\x20transaction\x20(a\x20single\x20on-chain\x20batch\x20release).\x20'+'Provide\x20the\x20COMPLETE\x20pool\x20list\x20INCLUDING\x20\x27object\x27:\x20the\x20anchor\x20Allocation\x20addressed\x20by\x20this\x20operation\x20must\x20'+'appear\x20in\x20the\x20list,\x20and\x20the\x20SDK\x20refuses\x20a\x20list\x20that\x20omits\x20it.\x20REQUIRES\x20alloc_by_guard\x20—\x20that\x20one\x20Guard\x20'+'defines\x20the\x20release\x20and\x20is\x20applied\x20to\x20every\x20pool.\x20'+'WHY\x20THIS\x20EXISTS:\x20a\x20crowdfunding\x20settlement\x20holds\x20each\x20backer\x27s\x20escrow\x20in\x20its\x20own\x20Allocation\x20under\x20the\x20SAME\x20'+'release/refund\x20Guard;\x20with\x20single-pool\x20calls\x20a\x20keeper\x20needs\x20N\x20ordered\x20transactions,\x20and\x20any\x20keeper\x20that\x20stops\x20'+'at\x20the\x20first\x20failure\x20strands\x20the\x20remaining\x20pools\x20while\x20the\x20release\x20reports\x20done.\x20'+'ALL-OR-NOTHING:\x20one\x20pool\x20aborting\x20reverts\x20the\x20whole\x20batch.\x20'+'PRE-FILTER\x20drained\x20pools\x20before\x20building\x20the\x20call\x20—\x20a\x20zero-balance\x20pool\x20aborts\x20the\x20ENTIRE\x20batch\x20with\x20'+'EZERO_DISTRIBUTION\x20(14)\x20and\x20nothing\x20is\x20released;\x20an\x20empty\x20candidate\x20set\x20means\x20there\x20is\x20genuinely\x20nothing\x20to\x20'+'release\x20(an\x20empty\x20list\x20is\x20refused\x20with\x20EEMPTY_POOL_BATCH\x2026\x20instead\x20of\x20a\x20fake\x20success).\x20'+'EVERY\x20pool\x20must\x20carry\x20an\x20allocator\x20BOUND\x20to\x20alloc_by_guard:\x20an\x20unbound\x20pool\x20completes\x20the\x20sweep\x20having\x20'+'distributed\x20NOTHING,\x20so\x20the\x20SDK\x20verifies\x20membership\x20pool-by-pool\x20and\x20REFUSES\x20the\x20call\x20before\x20any\x20gas\x20is\x20spent.\x20'+'Each\x20recipient\x20still\x20receives\x20a\x20CoinWrapper\x20and\x20claims\x20it\x20through\x20the\x20normal\x20POST-DISTRIBUTION\x20CLAIM\x20step\x20—\x20'+'batching\x20changes\x20the\x20release\x20atomicity,\x20not\x20the\x20claim\x20path.'),'acknowledge_dual_payout':z['boolean']()['optional']()['describe']('A-1\x20(amz9-ln-261023;\x20keeper\x20posture\x20拍板⑧\x20dm-mtw-261027)\x20explicit\x20opt-in\x20for\x20a\x20KNOWN\x20double\x20payout:\x20when\x20a\x20submitted\x20order\x20already\x20received\x20'+'arbitration\x20compensation\x20(order.claimed_by\x20set)\x20and\x20this\x20call\x20would\x20ALSO\x20release\x20its\x20escrow\x20(refund\x20track),\x20'+'the\x20call\x20is\x20REFUSED\x20unless\x20this\x20flag\x20is\x20true.\x20The\x20two\x20payout\x20tracks\x20are\x20independent\x20by\x20design\x20—\x20the\x20chain\x20'+'will\x20not\x20net\x20or\x20stop\x20the\x20second\x20payout\x20(the\x20escrow\x20receive\x20path\x20has\x20no\x20claimed_by\x20gate),\x20BUT\x20a\x20rail\x20paired\x20'+'on\x20order.claimed_by\x20(refund\x20none\x20/\x20recover\x20some)\x20may\x20guard-reject\x20the\x20second\x20payout\x20on-chain;\x20that\x20rejection\x20'+'is\x20the\x20designed\x20mutual\x20exclusion,\x20and\x20the\x20escrow\x20exits\x20via\x20the\x20paired\x20rail.\x20Buyer\x20NET\x20view:\x20total\x20received\x20=\x20'+'compensation\x20+\x20escrow\x20refund.\x20Leave\x20unset\x20for\x20normal\x20refunds\x20of\x20un-awarded\x20orders.\x20AUTOMATION\x20RULE:\x20this\x20flag\x20'+'is\x20the\x20HUMAN\x20operator\x27s\x20netting\x20decision\x20—\x20an\x20automated\x20keeper\x20that\x20receives\x20dual_payout_unconfirmed\x20must\x20STOP\x20'+'retrying\x20and\x20escalate\x20(never\x20set\x20the\x20flag\x20itself);\x20a\x20retry\x20loop\x20wastes\x20gas\x20and\x20a\x20silent\x20stop\x20strands\x20the\x20payout.\x20D-1\x20(ksr\x205R-08):\x20the\x20flag\x20is\x20additionally\x20honored\x20ONLY\x20when\x20the\x20'+'executing\x20store\x20carries\x20a\x20human-recorded\x20preauthorization\x20(config_operation\x20store_dual_payout_set\x20{account,\x20'+'confirm:true},\x20then\x20store_dual_payout_get\x20shows\x20preauthorized=true);\x20without\x20it\x20the\x20gate\x20answers\x20'+'dual_payout_preauthorization_required\x20—\x20record\x20the\x20standing\x20decision\x20first,\x20then\x20re-send.'),'formula_spec_set':z['object']({'allocator_index':z['number']()['int']()['min'](0x0)['describe']('Index\x20of\x20the\x20allocator\x20within\x20allocators.allocators\x20(0-based).\x20Must\x20address\x20an\x20EXISTING\x20allocator,\x20else\x20refused\x20on-chain\x20(EFORMULA_SPEC_INVALID=24).'),'slot_index':z['number']()['int']()['min'](0x0)['describe']('Index\x20of\x20the\x20sharing\x20row\x20within\x20that\x20allocator\x27s\x20sharing[]\x20(0-based).\x20Must\x20address\x20a\x20slot\x20whose\x20mode\x20is\x20Formula,\x20else\x20refused\x20on-chain\x20(EFORMULA_SPEC_INVALID=24).'),'spec':FormulaSpecSchema})['strict']()['optional']()['describe']('Bind\x20(or\x20replace)\x20the\x20runtime\x20pricing\x20spec\x20of\x20ONE\x20Formula\x20sharing\x20slot\x20of\x20this\x20Allocation\x20—\x20no\x20re-declaration\x20of\x20the\x20allocator\x20plan,\x20'+'no\x20fund\x20movement.\x20Only\x20the\x20DATA\x20SOURCE\x20(which\x20repository\x20aggregate\x20prices\x20the\x20slot)\x20is\x20set\x20here;\x20the\x20slot\x20itself\x20must\x20already\x20be\x20declared\x20as\x20a\x20'+'Formula\x20leg\x20(mode\x204).\x20An\x20unbound\x20Formula\x20slot\x20prices\x20its\x20scalar\x20as\x200.')})['strict']()['describe']('Operate\x20on\x20an\x20existing\x20Allocation\x20object.\x20Set\x20\x27object\x27\x20field\x20with\x20the\x20object\x20ID\x20or\x20existing\x20name\x20to\x20specify\x20the\x20target.');export const CallAllocation_DataSchema=z['union']([CallAllocation_CreateSchema,CallAllocation_OperateSchema])['describe']('On-chain\x20Allocation\x20operations.\x20USAGE:\x20(1)\x20CREATE\x20NEW:\x20Use\x20CallAllocation_CreateSchema\x20by\x20setting\x20\x27object\x27\x20with\x20OBJECT\x20format\x20{name,\x20type_parameter,\x20...}.\x20(2)\x20OPERATE\x20EXISTING:\x20Use\x20CallAllocation_OperateSchema\x20by\x20setting\x20\x27object\x27\x20with\x20STRING\x20format\x20(object\x20ID\x20or\x20name).\x20The\x20\x27object\x27\x20field\x20is\x20CRITICAL\x20and\x20REQUIRED\x20in\x20both\x20cases.\x20');export const CallAllocation_InputSchema=z['object']({'data':CallAllocation_DataSchema,'env':CallEnvSchema['optional'](),'submission':SubmissionCallSchema['optional']()})['strict']();
|
|
@@ -339,6 +339,10 @@ export declare const CallArbitration_InputSchema: z.ZodObject<{
|
|
|
339
339
|
client_schema_version: z.ZodOptional<z.ZodString>;
|
|
340
340
|
schema_strict_mode: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
341
341
|
dry_run: z.ZodOptional<z.ZodBoolean>;
|
|
342
|
+
window_profile: z.ZodOptional<z.ZodEnum<{
|
|
343
|
+
production: "production";
|
|
344
|
+
test: "test";
|
|
345
|
+
}>>;
|
|
342
346
|
response_level: z.ZodOptional<z.ZodEnum<{
|
|
343
347
|
full: "full";
|
|
344
348
|
compact: "compact";
|