@wowok/agent-mcp 2.7.6 → 2.7.8
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/customer/index.d.ts +3 -4
- package/dist/customer/index.js +1 -1
- package/dist/customer/info-puzzle.js +1 -1
- package/dist/customer/order-monitor.d.ts +0 -9
- package/dist/customer/order-monitor.js +1 -1
- package/dist/customer/order-strategy.d.ts +0 -19
- package/dist/customer/order-strategy.js +1 -1
- package/dist/customer/reminder-system.d.ts +0 -5
- package/dist/customer/reminder-system.js +1 -1
- package/dist/evaluation/game-strategy.js +1 -1
- package/dist/evaluation/injection.d.ts +6 -0
- package/dist/evaluation/injection.js +1 -0
- package/dist/evaluation/node-game.js +1 -1
- package/dist/examples/machine-multisig-threshold.json +1 -0
- package/dist/harness/recover.js +1 -1
- package/dist/harness/types.d.ts +1 -1
- package/dist/harness/verify.js +1 -1
- package/dist/intent/enrich.js +1 -1
- package/dist/intent/matcher.js +1 -1
- package/dist/intent/types.d.ts +1 -1
- package/dist/intent/types.js +1 -1
- package/dist/knowledge/arbitration-ledger.js +1 -1
- package/dist/knowledge/contract-invariants.d.ts +53 -0
- package/dist/knowledge/contract-invariants.js +1 -0
- package/dist/knowledge/deployment-scanner.js +1 -1
- package/dist/knowledge/dynamic-pricing.d.ts +0 -2
- package/dist/knowledge/dynamic-pricing.js +1 -1
- package/dist/knowledge/event-semantics.d.ts +20 -0
- package/dist/knowledge/event-semantics.js +1 -0
- package/dist/knowledge/examples-scanner-cli.js +1 -1
- package/dist/knowledge/examples-scanner.js +1 -1
- package/dist/knowledge/glossary.js +1 -1
- package/dist/knowledge/guard-submission-prompt.js +1 -1
- package/dist/knowledge/immutability.d.ts +11 -0
- package/dist/knowledge/immutability.js +1 -0
- package/dist/knowledge/index.d.ts +12 -6
- package/dist/knowledge/index.js +1 -1
- package/dist/knowledge/industry-registry.js +1 -1
- package/dist/knowledge/intent-metrics.d.ts +1 -1
- package/dist/knowledge/jsonrpc-enum.d.ts +37 -0
- package/dist/knowledge/jsonrpc-enum.js +1 -0
- package/dist/knowledge/machine-confirm.js +1 -1
- package/dist/knowledge/machine-risk.js +1 -1
- package/dist/knowledge/machine-topology.d.ts +11 -0
- package/dist/knowledge/machine-topology.js +1 -1
- package/dist/knowledge/machine-translation.js +1 -1
- package/dist/knowledge/market-metrics.d.ts +11 -0
- package/dist/knowledge/market-metrics.js +1 -1
- package/dist/knowledge/mcp-schema-audit-cli.js +1 -1
- package/dist/knowledge/mcp-schema-audit.d.ts +1 -0
- package/dist/knowledge/mcp-schema-audit.js +1 -1
- package/dist/knowledge/messenger-guard-guidance.d.ts +17 -0
- package/dist/knowledge/messenger-guard-guidance.js +1 -0
- package/dist/knowledge/operation-dictionary.d.ts +18 -0
- package/dist/knowledge/operation-dictionary.js +1 -0
- package/dist/knowledge/service-ledger.js +1 -1
- package/dist/knowledge/service-risk.js +1 -1
- package/dist/knowledge/service-translation.js +1 -1
- package/dist/knowledge/supply-chain.d.ts +24 -0
- package/dist/knowledge/supply-chain.js +1 -0
- package/dist/knowledge/template-registry.js +1 -1
- package/dist/knowledge/tools-reference.js +1 -1
- package/dist/knowledge/trust-metrics.d.ts +27 -2
- package/dist/knowledge/trust-metrics.js +1 -1
- package/dist/knowledge/workflow-guidance.d.ts +22 -1
- package/dist/knowledge/workflow-guidance.js +1 -1
- package/dist/monitor/EventStore.d.ts +78 -0
- package/dist/monitor/EventStore.js +1 -0
- package/dist/participation/radar-core.d.ts +0 -1
- package/dist/participation/radar-core.js +1 -1
- package/dist/persona/address-format.d.ts +6 -0
- package/dist/persona/address-format.js +1 -0
- package/dist/persona/analyzer.js +1 -1
- package/dist/persona/index.d.ts +3 -0
- package/dist/persona/index.js +1 -1
- package/dist/persona/types.d.ts +1 -1
- package/dist/persona/types.js +1 -1
- package/dist/project/business-puzzle.js +1 -1
- package/dist/project/edit-planner.js +1 -1
- package/dist/project/evaluation-fix.spec.d.ts +1 -0
- package/dist/project/evaluation-fix.spec.js +1 -0
- package/dist/project/evaluation.js +1 -1
- package/dist/project/graph-builder.js +1 -1
- package/dist/project/handlers.d.ts +2 -18
- package/dist/project/handlers.js +1 -1
- package/dist/project/index.js +1 -1
- package/dist/project/machine-nodes.d.ts +23 -0
- package/dist/project/machine-nodes.js +1 -1
- package/dist/project/machine-panorama.d.ts +41 -0
- package/dist/project/machine-panorama.js +1 -0
- package/dist/project/object-panorama.d.ts +179 -0
- package/dist/project/object-panorama.js +1 -0
- package/dist/project/object-type.d.ts +1 -0
- package/dist/project/object-type.js +1 -0
- package/dist/project/participation-radar.js +1 -1
- package/dist/project/semantic-assembler.js +1 -1
- package/dist/project/service-panorama.d.ts +180 -0
- package/dist/project/service-panorama.js +1 -0
- package/dist/project/stage-gate.d.ts +0 -1
- package/dist/project/stage-gate.js +1 -1
- package/dist/project/task-tracker.d.ts +4 -0
- package/dist/project/task-tracker.js +1 -1
- package/dist/role/derivation.d.ts +19 -2
- package/dist/role/derivation.js +1 -1
- package/dist/role/index.d.ts +2 -2
- package/dist/role/index.js +1 -1
- package/dist/role/model.js +1 -1
- package/dist/role/resolution.d.ts +16 -0
- package/dist/role/resolution.js +1 -1
- package/dist/role/types.d.ts +1 -1
- package/dist/role/types.js +1 -1
- package/dist/safety/confirm-gate.js +1 -1
- package/dist/schema/call/allocation.d.ts +10 -0
- package/dist/schema/call/arbitration.d.ts +14 -3
- package/dist/schema/call/arbitration.js +1 -1
- package/dist/schema/call/base.d.ts +16 -0
- package/dist/schema/call/base.js +1 -1
- package/dist/schema/call/bridge.d.ts +7 -0
- package/dist/schema/call/contact.d.ts +11 -0
- package/dist/schema/call/demand.d.ts +11 -0
- package/dist/schema/call/guard.d.ts +3 -0
- package/dist/schema/call/handler.js +1 -1
- package/dist/schema/call/machine.d.ts +12 -0
- package/dist/schema/call/machine.js +1 -1
- package/dist/schema/call/order.d.ts +11 -0
- package/dist/schema/call/payment.d.ts +4 -3
- package/dist/schema/call/payment.js +1 -1
- package/dist/schema/call/permission.d.ts +11 -0
- package/dist/schema/call/personal.d.ts +38 -0
- package/dist/schema/call/personal.js +1 -1
- package/dist/schema/call/progress.d.ts +11 -0
- package/dist/schema/call/proof.d.ts +2 -0
- package/dist/schema/call/repository.d.ts +15 -4
- package/dist/schema/call/reward.d.ts +17 -12
- package/dist/schema/call/reward.js +1 -1
- package/dist/schema/call/semantic.d.ts +3 -2
- package/dist/schema/call/semantic.js +1 -1
- package/dist/schema/call/service.d.ts +17 -0
- package/dist/schema/call/service.js +1 -1
- package/dist/schema/call/treasury.d.ts +17 -0
- package/dist/schema/common/index.d.ts +21 -0
- package/dist/schema/common/index.js +1 -1
- package/dist/schema/evaluation/index.d.ts +146 -0
- package/dist/schema/evaluation/index.js +1 -1
- package/dist/schema/index.d.ts +1 -0
- package/dist/schema/index.js +1 -1
- package/dist/schema/intent-radar/index.d.ts +30 -3
- package/dist/schema/intent-radar/index.js +1 -1
- package/dist/schema/local/index.d.ts +9 -0
- package/dist/schema/local/index.js +1 -1
- package/dist/schema/messenger/index.d.ts +54 -0
- package/dist/schema/messenger/index.js +1 -1
- package/dist/schema/operations.d.ts +932 -9
- package/dist/schema/operations.js +1 -1
- package/dist/schema/permission/index.d.ts +17 -0
- package/dist/schema/permission/index.js +1 -1
- package/dist/schema/project/index.d.ts +6 -0
- package/dist/schema/project/index.js +1 -1
- package/dist/schema/query/index.d.ts +663 -56
- package/dist/schema/query/index.js +1 -1
- package/dist/schema/schema-version.js +1 -1
- package/dist/schema/trust/index.d.ts +17 -0
- package/dist/schema/trust/index.js +1 -1
- package/dist/schema/watch/index.d.ts +204 -0
- package/dist/schema/watch/index.js +1 -0
- package/dist/schema/workflow/index.d.ts +301 -0
- package/dist/schema/workflow/index.js +1 -1
- package/dist/schema-query-impl/index.js +1 -1
- package/dist/schemas/account_operation.output.json +5 -2
- package/dist/schemas/bridge_operation.output.json +5 -2
- package/dist/schemas/bridge_operation.schema.json +25 -9
- package/dist/schemas/evaluation_operation.output.json +276 -1
- package/dist/schemas/evaluation_operation.schema.json +307 -0
- package/dist/schemas/guard2file.schema.json +6 -2
- package/dist/schemas/index.json +13 -1
- package/dist/schemas/intent_radar.output.json +20 -2
- package/dist/schemas/intent_radar.schema.json +10 -1
- package/dist/schemas/local_info_operation.output.json +5 -2
- package/dist/schemas/local_mark_operation.output.json +5 -2
- package/dist/schemas/machineNode2file.schema.json +6 -2
- package/dist/schemas/messenger_operation.output.json +105 -2
- package/dist/schemas/messenger_operation.schema.json +98 -0
- package/dist/schemas/monitor_events.output.json +1360 -0
- package/dist/schemas/monitor_events.schema.json +62 -0
- package/dist/schemas/onchain_events.output.json +237 -14
- package/dist/schemas/onchain_events.schema.json +20 -0
- package/dist/schemas/onchain_operations.output.json +10 -5
- package/dist/schemas/onchain_operations.schema.json +768 -409
- package/dist/schemas/onchain_operations_allocation.schema.json +23 -7
- package/dist/schemas/onchain_operations_arbitration.schema.json +34 -9
- package/dist/schemas/onchain_operations_contact.schema.json +29 -5
- package/dist/schemas/onchain_operations_demand.schema.json +29 -5
- package/dist/schemas/onchain_operations_gen_passport.schema.json +6 -2
- package/dist/schemas/onchain_operations_gen_proof.schema.json +6 -2
- package/dist/schemas/onchain_operations_guard.schema.json +6 -2
- package/dist/schemas/onchain_operations_machine.schema.json +34 -10
- package/dist/schemas/onchain_operations_order.schema.json +29 -5
- package/dist/schemas/onchain_operations_payment.schema.json +13 -10
- package/dist/schemas/onchain_operations_permission.schema.json +29 -5
- package/dist/schemas/onchain_operations_personal.schema.json +44 -2
- package/dist/schemas/onchain_operations_progress.schema.json +29 -5
- package/dist/schemas/onchain_operations_proof.schema.json +6 -2
- package/dist/schemas/onchain_operations_repository.schema.json +310 -305
- package/dist/schemas/onchain_operations_reward.schema.json +46 -10
- package/dist/schemas/onchain_operations_service.schema.json +49 -13
- package/dist/schemas/onchain_operations_treasury.schema.json +46 -10
- package/dist/schemas/onchain_table_data.output.json +3750 -208
- package/dist/schemas/onchain_table_data.schema.json +311 -0
- package/dist/schemas/permission_operation.output.json +32 -0
- package/dist/schemas/project_operation.schema.json +14 -8
- package/dist/schemas/query_toolkit.output.json +425 -320
- package/dist/schemas/query_toolkit.schema.json +139 -1
- package/dist/schemas/trust_score.output.json +38 -0
- package/dist/schemas/trust_score.schema.json +32 -0
- package/dist/schemas/watch_operation.output.json +827 -0
- package/dist/schemas/watch_operation.schema.json +145 -0
- package/dist/schemas/workflow_operation.output.json +263 -5
- package/dist/schemas/workflow_operation.schema.json +597 -2
- package/dist/tools/handlers/config.js +1 -1
- package/dist/tools/handlers/evaluation.js +1 -1
- package/dist/tools/handlers/intent-radar.js +1 -1
- package/dist/tools/handlers/messenger.js +1 -1
- package/dist/tools/handlers/monitor.d.ts +2 -0
- package/dist/tools/handlers/monitor.js +1 -0
- package/dist/tools/handlers/onchain.js +1 -1
- package/dist/tools/handlers/permission.js +1 -1
- package/dist/tools/handlers/project.js +1 -1
- package/dist/tools/handlers/query.js +1 -1
- package/dist/tools/handlers/trust.d.ts +14 -0
- package/dist/tools/handlers/trust.js +1 -1
- package/dist/tools/handlers/watch.d.ts +2 -0
- package/dist/tools/handlers/watch.js +1 -0
- package/dist/tools/handlers/workflow.js +1 -1
- package/dist/tools/index.d.ts +2 -0
- package/dist/tools/index.js +1 -1
- package/dist/tools/shared.js +1 -1
- package/package.json +2 -2
- package/dist/customer/post-purchase.d.ts +0 -44
- package/dist/customer/post-purchase.js +0 -1
- package/dist/project/migration.d.ts +0 -22
- package/dist/project/migration.js +0 -1
- package/dist/project/rollback-policy.d.ts +0 -45
- package/dist/project/rollback-policy.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{loadStageState,projectExists}from'./project-store.js';export const STAGE5_RISK_SCORE_BLOCK=0x32;export const STAGE5_RISK_SCORE_WARN=0x50;function buildStage5ScoreCheck(a){if(a['evaluation_score']!==undefined&&a['evaluation_score']!==null){const c=a['evaluation_score'];if(c<STAGE5_RISK_SCORE_BLOCK)return{'dimension':'risk','status':'FAIL','message':'Stage\x203\x20evaluation\x20score\x20'+c+'\x20<\x20'+STAGE5_RISK_SCORE_BLOCK+'\x20(block\x20threshold).\x20'+'GLM6\x20handoff\x20validation:\x20deployment\x20blocked\x20—\x20too\x20many\x20CRITICAL\x20risks\x20unresolved.\x20'+'Fix\x20risks\x20in\x20Stage\x203\x20(aggregate_risks)\x20before\x20deploying.'};if(c<STAGE5_RISK_SCORE_WARN)return{'dimension':'risk','status':'WARN','message':'Stage\x203\x20evaluation\x20score\x20'+c+'\x20<\x20'+STAGE5_RISK_SCORE_WARN+'\x20(warn\x20threshold).\x20'+'GLM6\x20handoff\x20validation:\x20non-blocking\x20—\x20proceed\x20at\x20your\x20own\x20risk.\x20'+'Recommend\x20improving\x20risk\x20posture\x20before\x20deploying\x20to\x20mainnet.'};return{'dimension':'risk','status':'PASS','message':'Stage\x203\x20evaluation\x20score\x20'+c+'\x20>=\x20'+STAGE5_RISK_SCORE_WARN+'\x20—\x20safe\x20to\x20deploy'};}const b=a['risk_status']==='RISK_PASSED';return{'dimension':'risk','status':b?'PASS':'WARN','message':b?'Risk\x20status\x20is\x20RISK_PASSED':'Risk\x20status\x20is\x20'+(a['risk_status']??'unknown')+'\x20—\x20recommend\x20resolving\x20before\x20deployment'};}function buildStage5DocCheck(a){if(a['deployment_doc_generated']!==!![])return{'dimension':'semantic','status':'FAIL','message':'GLM6\x20handoff\x20validation:\x20Stage\x204\x20deployment\x20doc\x20not\x20generated.\x20'+'Call\x20generate_deployment_doc\x20(Stage\x204)\x20before\x20executing\x20deployment\x20(Stage\x205).'};const b=a['doc_error_count']??0x0;if(b>0x0)return{'dimension':'semantic','status':'FAIL','message':'GLM6\x20handoff\x20validation:\x20Stage\x204\x20deployment\x20doc\x20has\x20'+b+'\x20D-error(s).\x20'+'Fix\x20all\x20D-errors\x20before\x20executing\x20deployment.'};return{'dimension':'semantic','status':'PASS','message':'Stage\x204\x20deployment\x20doc\x20generated\x20with\x200\x20D-errors'};}function buildGasBudgetCheck(a){const b=a['gas_budget'];if(!b)return{'dimension':'gas_budget','status':'PASS','message':'Gas\x20budget\x20not\x20provided\x20(N/A\x20for\x20this\x20stage\x20or\x20caller\x20omitted)'};if(b['network']==='testnet')return{'dimension':'gas_budget','status':'PASS','message':'testnet:\x20no\x20gas\x20limit\x20(faucet\x20is\x20free);\x20rollback\x20is\x20costless'};const c=b['already_spent_gas']+b['estimated_rerun_gas'],d=b['warning']??'mainnet:\x20estimated\x20total\x20gas\x20'+c+'\x20MIST\x20(already_spent='+b['already_spent_gas']+'\x20+\x20rerun='+b['estimated_rerun_gas']+').\x20Rollback\x20will\x20incur\x20real\x20cost.';return{'dimension':'gas_budget','status':'WARN','message':d};}function validateStage1Gate(a){const b=[],c=a['naming']?.['prefix_valid']&&a['naming']?.['version_valid'];return b['push']({'dimension':'semantic','status':c?'PASS':'FAIL','message':c?'Project\x20namespace\x20is\x20valid\x20(prefix\x20+\x20version)':'Project\x20naming\x20is\x20invalid\x20—\x20prefix\x20must\x20match\x20^[a-z][a-z0-9_]{2,63}$\x20and\x20version\x20must\x20match\x20^v\x5cd+$'}),b['push']({'dimension':'tools','status':'PASS','message':'Stage\x201\x20requires\x20no\x20on-chain\x20tools\x20(namespace\x20is\x20local-only)'}),b['push']({'dimension':'reversibility','status':'PASS','message':'Stage\x201\x20is\x20fully\x20reversible\x20(no\x20on-chain\x20state\x20changes)'}),b['push']({'dimension':'risk','status':'PASS','message':'No\x20risks\x20at\x20namespace\x20stage'}),b['push']({'dimension':'isolation','status':'PASS','message':'Stage\x201\x20has\x20no\x20objects\x20(isolation\x20N/A)'}),b['push'](buildGasBudgetCheck(a)),b;}function validateStage2Gate(a){const b=[],c=a['puzzles']&&Object['keys'](a['puzzles'])['length']>0x0,d=a['puzzles_completeness']??'empty';b['push']({'dimension':'semantic','status':c?d==='complete'?'PASS':d==='partial'?'WARN':'FAIL':'FAIL','message':c?'Puzzles\x20present\x20with\x20completeness:\x20'+d:'No\x20puzzles\x20found\x20—\x20call\x20analyze_intent\x20first'});if(c){const e=Object['keys'](a['puzzles']);b['push']({'dimension':'tools','status':'PASS','message':e['length']+'\x20object\x20type(s)\x20defined:\x20'+e['join'](',\x20')});}else b['push']({'dimension':'tools','status':'FAIL','message':'Cannot\x20verify\x20tools\x20—\x20no\x20puzzles\x20available'});b['push']({'dimension':'reversibility','status':'PASS','message':'Stage\x202\x20is\x20in-memory\x20only\x20(no\x20on-chain\x20state\x20changes)'}),b['push']({'dimension':'risk','status':'PASS','message':'Risk\x20assessment\x20happens\x20in\x20stage\x203\x20(aggregate_risks)'});if(a['objects']&&a['objects']['length']>0x0){const f=a['objects']['filter'](g=>g['reused_from']&&g['reused_from']['includes'](':')&&!g['reused_from']['startsWith']('0x'));b['push']({'dimension':'isolation','status':f['length']===0x0?'PASS':'FAIL','message':f['length']===0x0?'No\x20cross-project\x20object\x20references\x20detected':f['length']+'\x20object(s)\x20reference\x20external\x20projects\x20(§3.0\x20violation):\x20'+f['map'](g=>g['entry_id'])['join'](',\x20')});}else b['push']({'dimension':'isolation','status':'PASS','message':'No\x20objects\x20to\x20check\x20for\x20isolation\x20(stage\x202)'});return b['push'](buildGasBudgetCheck(a)),b;}function validateStage3Gate(a){const b=[],c=a['risk_status']!==undefined&&a['risk_status']!=='';b['push']({'dimension':'semantic','status':c?'PASS':'FAIL','message':c?'Risk\x20status:\x20'+a['risk_status']:'No\x20risk\x20assessment\x20found\x20—\x20call\x20aggregate_risks\x20first'}),b['push']({'dimension':'tools','status':'PASS','message':'Risk\x20assessment\x20uses\x20puzzles\x20from\x20stage\x202\x20(no\x20additional\x20tools)'}),b['push']({'dimension':'reversibility','status':'PASS','message':'Stage\x203\x20is\x20reversible\x20(re-run\x20aggregate_risks\x20to\x20update)'});const d=a['risk_can_proceed']===!![];return b['push']({'dimension':'risk','status':d?'PASS':'FAIL','message':d?'All\x20CRITICAL\x20risks\x20resolved\x20—\x20may\x20proceed':'CRITICAL\x20risks\x20remain\x20—\x20fix\x20before\x20proceeding\x20(non-blocking\x20principle:\x20only\x20CRITICAL\x20blocks)'}),b['push']({'dimension':'isolation','status':'PASS','message':'Isolation\x20verified\x20in\x20stage\x202'}),b['push'](buildGasBudgetCheck(a)),b;}function validateStage4Gate(a){const b=[],c=a['doc_error_count']??-0x1;b['push']({'dimension':'semantic','status':c===0x0?'PASS':c>0x0?'FAIL':'WARN','message':c===0x0?'Deployment\x20doc\x20generated\x20with\x200\x20D-errors':c>0x0?c+'\x20D-error(s)\x20remain\x20—\x20fix\x20before\x20proceeding':'Doc\x20error\x20count\x20unknown\x20—\x20call\x20generate_deployment_doc\x20first'});if(a['objects']&&a['edges']){const e=new Set(a['objects']['map'](g=>g['entry_id'])),f=a['edges']['filter'](g=>!e['has'](g['from'])||!e['has'](g['to']));b['push']({'dimension':'tools','status':f['length']===0x0?'PASS':'FAIL','message':f['length']===0x0?'All\x20'+a['edges']['length']+'\x20edge(s)\x20reference\x20defined\x20objects':f['length']+'\x20edge(s)\x20reference\x20undefined\x20objects'});}else b['push']({'dimension':'tools','status':'WARN','message':'Objects/edges\x20not\x20provided\x20—\x20cannot\x20verify\x20tool\x20availability'});b['push']({'dimension':'reversibility','status':'PASS','message':'Stage\x204\x20is\x20reversible\x20(regenerate\x20deployment\x20doc)'});const d=a['risk_status']==='RISK_PASSED';b['push']({'dimension':'risk','status':d?'PASS':'WARN','message':d?'Risk\x20status\x20is\x20RISK_PASSED':'Risk\x20status\x20is\x20'+(a['risk_status']??'unknown')+'\x20—\x20recommend\x20resolving\x20before\x20deployment'});if(a['objects']&&a['objects']['length']>0x0){const g=a['objects']['filter'](h=>h['reused_from']&&!h['reused_from']['startsWith']('0x')&&h['reused_from']['includes'](':'));b['push']({'dimension':'isolation','status':g['length']===0x0?'PASS':'FAIL','message':g['length']===0x0?'No\x20cross-project\x20references\x20in\x20deployment\x20objects':g['length']+'\x20object(s)\x20have\x20cross-project\x20reused_from\x20(§3.0\x20violation)'});}else b['push']({'dimension':'isolation','status':'PASS','message':'No\x20objects\x20to\x20check\x20for\x20isolation\x20(stage\x204)'});return b['push'](buildGasBudgetCheck(a)),b;}function validateStage5Gate(a){const b=[];b['push'](buildStage5DocCheck(a));const c=a['trace_coherent']===!![];b['push']({'dimension':'semantic','status':c?'PASS':'FAIL','message':c?'Substeps\x20are\x20coherent\x20(no\x20dangling/circular/missing)':'Substeps\x20are\x20not\x20coherent\x20—\x20call\x20trace_substeps\x20and\x20fix\x20issues'}),b['push']({'dimension':'tools','status':c?'PASS':'FAIL','message':c?'All\x20substep\x20dependencies\x20resolve':'Substep\x20dependencies\x20have\x20issues\x20(see\x20trace_substeps\x20output)'});const d=a['has_published_object']===!![];return b['push']({'dimension':'reversibility','status':d?'WARN':'PASS','message':d?'Objects\x20have\x20been\x20published\x20on-chain\x20—\x20rollback\x20requires\x20fork\x20(§3.3).\x20'+'Ensure\x20all\x20substeps\x20are\x20correct\x20before\x20executing\x20on\x20mainnet.':'No\x20objects\x20published\x20yet\x20—\x20stage\x205\x20is\x20still\x20reversible'}),b['push'](buildStage5ScoreCheck(a)),b['push']({'dimension':'isolation','status':'PASS','message':'Isolation\x20verified\x20in\x20stages\x202\x20and\x204'}),b['push'](buildGasBudgetCheck(a)),b;}const STAGE_VALIDATORS={0x1:validateStage1Gate,0x2:validateStage2Gate,0x3:validateStage3Gate,0x4:validateStage4Gate,0x5:validateStage5Gate};export function validateStageGate(a){const b=STAGE_VALIDATORS[a['stage']],c=b(a),d=c['filter'](f=>f['status']==='FAIL')['map'](f=>'['+f['dimension']+']\x20'+f['message']),e=c['filter'](f=>f['status']==='WARN')['map'](f=>'['+f['dimension']+']\x20'+f['message']);return{'stage':a['stage'],'passed':d['length']===0x0,'checks':c,'blocking_issues':d,'warnings':e,'can_proceed':d['length']===0x0};}export function validateStageGateFromDisk(a,b,c,d){if(!projectExists(a,b))return{'stage':c??0x1,'passed':![],'checks':[{'dimension':'semantic','status':'FAIL','message':'Project\x20not\x20found\x20locally:\x20'+a+'_'+b}],'blocking_issues':['Project\x20not\x20found\x20locally:\x20'+a+'_'+b],'warnings':[],'can_proceed':![]};const e=loadStageState(a,b),f=c??e?.['stage']??0x1,g=e?.['has_published_object']??![];return validateStageGate({'stage':f,'prefix':a,'version':b,'has_published_object':g,...d});}
|
|
1
|
+
export const STAGE5_RISK_SCORE_BLOCK=0x32;export const STAGE5_RISK_SCORE_WARN=0x50;function buildStage5ScoreCheck(a){if(a['evaluation_score']!==undefined&&a['evaluation_score']!==null){const c=a['evaluation_score'];if(c<STAGE5_RISK_SCORE_BLOCK)return{'dimension':'risk','status':'FAIL','message':'Stage\x203\x20evaluation\x20score\x20'+c+'\x20<\x20'+STAGE5_RISK_SCORE_BLOCK+'\x20(block\x20threshold).\x20'+'GLM6\x20handoff\x20validation:\x20deployment\x20blocked\x20—\x20too\x20many\x20CRITICAL\x20risks\x20unresolved.\x20'+'Fix\x20risks\x20in\x20Stage\x203\x20(aggregate_risks)\x20before\x20deploying.'};if(c<STAGE5_RISK_SCORE_WARN)return{'dimension':'risk','status':'WARN','message':'Stage\x203\x20evaluation\x20score\x20'+c+'\x20<\x20'+STAGE5_RISK_SCORE_WARN+'\x20(warn\x20threshold).\x20'+'GLM6\x20handoff\x20validation:\x20non-blocking\x20—\x20proceed\x20at\x20your\x20own\x20risk.\x20'+'Recommend\x20improving\x20risk\x20posture\x20before\x20deploying\x20to\x20mainnet.'};return{'dimension':'risk','status':'PASS','message':'Stage\x203\x20evaluation\x20score\x20'+c+'\x20>=\x20'+STAGE5_RISK_SCORE_WARN+'\x20—\x20safe\x20to\x20deploy'};}const b=a['risk_status']==='RISK_PASSED';return{'dimension':'risk','status':b?'PASS':'WARN','message':b?'Risk\x20status\x20is\x20RISK_PASSED':'Risk\x20status\x20is\x20'+(a['risk_status']??'unknown')+'\x20—\x20recommend\x20resolving\x20before\x20deployment'};}function buildStage5DocCheck(a){if(a['deployment_doc_generated']!==!![])return{'dimension':'semantic','status':'FAIL','message':'GLM6\x20handoff\x20validation:\x20Stage\x204\x20deployment\x20doc\x20not\x20generated.\x20'+'Call\x20generate_deployment_doc\x20(Stage\x204)\x20before\x20executing\x20deployment\x20(Stage\x205).'};const b=a['doc_error_count']??0x0;if(b>0x0)return{'dimension':'semantic','status':'FAIL','message':'GLM6\x20handoff\x20validation:\x20Stage\x204\x20deployment\x20doc\x20has\x20'+b+'\x20D-error(s).\x20'+'Fix\x20all\x20D-errors\x20before\x20executing\x20deployment.'};return{'dimension':'semantic','status':'PASS','message':'Stage\x204\x20deployment\x20doc\x20generated\x20with\x200\x20D-errors'};}function buildGasBudgetCheck(a){const b=a['gas_budget'];if(!b)return{'dimension':'gas_budget','status':'PASS','message':'Gas\x20budget\x20not\x20provided\x20(N/A\x20for\x20this\x20stage\x20or\x20caller\x20omitted)'};if(b['network']==='testnet')return{'dimension':'gas_budget','status':'PASS','message':'testnet:\x20no\x20gas\x20limit\x20(faucet\x20is\x20free);\x20rollback\x20is\x20costless'};const c=b['already_spent_gas']+b['estimated_rerun_gas'],d=b['warning']??'mainnet:\x20estimated\x20total\x20gas\x20'+c+'\x20MIST\x20(already_spent='+b['already_spent_gas']+'\x20+\x20rerun='+b['estimated_rerun_gas']+').\x20Rollback\x20will\x20incur\x20real\x20cost.';return{'dimension':'gas_budget','status':'WARN','message':d};}function validateStage1Gate(a){const b=[],c=a['naming']?.['prefix_valid']&&a['naming']?.['version_valid'];return b['push']({'dimension':'semantic','status':c?'PASS':'FAIL','message':c?'Project\x20namespace\x20is\x20valid\x20(prefix\x20+\x20version)':'Project\x20naming\x20is\x20invalid\x20—\x20prefix\x20must\x20match\x20^[a-z][a-z0-9_]{2,63}$\x20and\x20version\x20must\x20match\x20^v\x5cd+$'}),b['push']({'dimension':'tools','status':'PASS','message':'Stage\x201\x20requires\x20no\x20on-chain\x20tools\x20(namespace\x20is\x20local-only)'}),b['push']({'dimension':'reversibility','status':'PASS','message':'Stage\x201\x20is\x20fully\x20reversible\x20(no\x20on-chain\x20state\x20changes)'}),b['push']({'dimension':'risk','status':'PASS','message':'No\x20risks\x20at\x20namespace\x20stage'}),b['push']({'dimension':'isolation','status':'PASS','message':'Stage\x201\x20has\x20no\x20objects\x20(isolation\x20N/A)'}),b['push'](buildGasBudgetCheck(a)),b;}function validateStage2Gate(a){const b=[],c=a['puzzles']&&Object['keys'](a['puzzles'])['length']>0x0,d=a['puzzles_completeness']??'empty';b['push']({'dimension':'semantic','status':c?d==='complete'?'PASS':d==='partial'?'WARN':'FAIL':'FAIL','message':c?'Puzzles\x20present\x20with\x20completeness:\x20'+d:'No\x20puzzles\x20found\x20—\x20call\x20analyze_intent\x20first'});if(c){const e=Object['keys'](a['puzzles']);b['push']({'dimension':'tools','status':'PASS','message':e['length']+'\x20object\x20type(s)\x20defined:\x20'+e['join'](',\x20')});}else b['push']({'dimension':'tools','status':'FAIL','message':'Cannot\x20verify\x20tools\x20—\x20no\x20puzzles\x20available'});b['push']({'dimension':'reversibility','status':'PASS','message':'Stage\x202\x20is\x20in-memory\x20only\x20(no\x20on-chain\x20state\x20changes)'}),b['push']({'dimension':'risk','status':'PASS','message':'Risk\x20assessment\x20happens\x20in\x20stage\x203\x20(aggregate_risks)'});if(a['objects']&&a['objects']['length']>0x0){const f=a['objects']['filter'](g=>g['reused_from']&&g['reused_from']['includes'](':')&&!g['reused_from']['startsWith']('0x'));b['push']({'dimension':'isolation','status':f['length']===0x0?'PASS':'FAIL','message':f['length']===0x0?'No\x20cross-project\x20object\x20references\x20detected':f['length']+'\x20object(s)\x20reference\x20external\x20projects\x20(§3.0\x20violation):\x20'+f['map'](g=>g['entry_id'])['join'](',\x20')});}else b['push']({'dimension':'isolation','status':'PASS','message':'No\x20objects\x20to\x20check\x20for\x20isolation\x20(stage\x202)'});return b['push'](buildGasBudgetCheck(a)),b;}function validateStage3Gate(a){const b=[],c=a['risk_status']!==undefined&&a['risk_status']!=='';b['push']({'dimension':'semantic','status':c?'PASS':'FAIL','message':c?'Risk\x20status:\x20'+a['risk_status']:'No\x20risk\x20assessment\x20found\x20—\x20call\x20aggregate_risks\x20first'}),b['push']({'dimension':'tools','status':'PASS','message':'Risk\x20assessment\x20uses\x20puzzles\x20from\x20stage\x202\x20(no\x20additional\x20tools)'}),b['push']({'dimension':'reversibility','status':'PASS','message':'Stage\x203\x20is\x20reversible\x20(re-run\x20aggregate_risks\x20to\x20update)'});const d=a['risk_can_proceed']===!![];return b['push']({'dimension':'risk','status':d?'PASS':'FAIL','message':d?'All\x20CRITICAL\x20risks\x20resolved\x20—\x20may\x20proceed':'CRITICAL\x20risks\x20remain\x20—\x20fix\x20before\x20proceeding\x20(non-blocking\x20principle:\x20only\x20CRITICAL\x20blocks)'}),b['push']({'dimension':'isolation','status':'PASS','message':'Isolation\x20verified\x20in\x20stage\x202'}),b['push'](buildGasBudgetCheck(a)),b;}function validateStage4Gate(a){const b=[],c=a['doc_error_count']??-0x1;b['push']({'dimension':'semantic','status':c===0x0?'PASS':c>0x0?'FAIL':'WARN','message':c===0x0?'Deployment\x20doc\x20generated\x20with\x200\x20D-errors':c>0x0?c+'\x20D-error(s)\x20remain\x20—\x20fix\x20before\x20proceeding':'Doc\x20error\x20count\x20unknown\x20—\x20call\x20generate_deployment_doc\x20first'});if(a['objects']&&a['edges']){const e=new Set(a['objects']['map'](g=>g['entry_id'])),f=a['edges']['filter'](g=>!e['has'](g['from'])||!e['has'](g['to']));b['push']({'dimension':'tools','status':f['length']===0x0?'PASS':'FAIL','message':f['length']===0x0?'All\x20'+a['edges']['length']+'\x20edge(s)\x20reference\x20defined\x20objects':f['length']+'\x20edge(s)\x20reference\x20undefined\x20objects'});}else b['push']({'dimension':'tools','status':'WARN','message':'Objects/edges\x20not\x20provided\x20—\x20cannot\x20verify\x20tool\x20availability'});b['push']({'dimension':'reversibility','status':'PASS','message':'Stage\x204\x20is\x20reversible\x20(regenerate\x20deployment\x20doc)'});const d=a['risk_status']==='RISK_PASSED';b['push']({'dimension':'risk','status':d?'PASS':'WARN','message':d?'Risk\x20status\x20is\x20RISK_PASSED':'Risk\x20status\x20is\x20'+(a['risk_status']??'unknown')+'\x20—\x20recommend\x20resolving\x20before\x20deployment'});if(a['objects']&&a['objects']['length']>0x0){const g=a['objects']['filter'](h=>h['reused_from']&&!h['reused_from']['startsWith']('0x')&&h['reused_from']['includes'](':'));b['push']({'dimension':'isolation','status':g['length']===0x0?'PASS':'FAIL','message':g['length']===0x0?'No\x20cross-project\x20references\x20in\x20deployment\x20objects':g['length']+'\x20object(s)\x20have\x20cross-project\x20reused_from\x20(§3.0\x20violation)'});}else b['push']({'dimension':'isolation','status':'PASS','message':'No\x20objects\x20to\x20check\x20for\x20isolation\x20(stage\x204)'});return b['push'](buildGasBudgetCheck(a)),b;}function validateStage5Gate(a){const b=[];b['push'](buildStage5DocCheck(a));const c=a['trace_coherent']===!![];b['push']({'dimension':'semantic','status':c?'PASS':'FAIL','message':c?'Substeps\x20are\x20coherent\x20(no\x20dangling/circular/missing)':'Substeps\x20are\x20not\x20coherent\x20—\x20call\x20trace_substeps\x20and\x20fix\x20issues'}),b['push']({'dimension':'tools','status':c?'PASS':'FAIL','message':c?'All\x20substep\x20dependencies\x20resolve':'Substep\x20dependencies\x20have\x20issues\x20(see\x20trace_substeps\x20output)'});const d=a['has_published_object']===!![];return b['push']({'dimension':'reversibility','status':d?'WARN':'PASS','message':d?'Objects\x20have\x20been\x20published\x20on-chain\x20—\x20rollback\x20requires\x20fork\x20(§3.3).\x20'+'Ensure\x20all\x20substeps\x20are\x20correct\x20before\x20executing\x20on\x20mainnet.':'No\x20objects\x20published\x20yet\x20—\x20stage\x205\x20is\x20still\x20reversible'}),b['push'](buildStage5ScoreCheck(a)),b['push']({'dimension':'isolation','status':'PASS','message':'Isolation\x20verified\x20in\x20stages\x202\x20and\x204'}),b['push'](buildGasBudgetCheck(a)),b;}const STAGE_VALIDATORS={0x1:validateStage1Gate,0x2:validateStage2Gate,0x3:validateStage3Gate,0x4:validateStage4Gate,0x5:validateStage5Gate};export function validateStageGate(a){const b=STAGE_VALIDATORS[a['stage']],c=b(a),d=c['filter'](f=>f['status']==='FAIL')['map'](f=>'['+f['dimension']+']\x20'+f['message']),e=c['filter'](f=>f['status']==='WARN')['map'](f=>'['+f['dimension']+']\x20'+f['message']);return{'stage':a['stage'],'passed':d['length']===0x0,'checks':c,'blocking_issues':d,'warnings':e,'can_proceed':d['length']===0x0};}
|
|
@@ -20,7 +20,11 @@ declare class TaskTrackerImpl {
|
|
|
20
20
|
fail(task_id: string, error: string): void;
|
|
21
21
|
get(task_id: string): TaskState | undefined;
|
|
22
22
|
list(projectId?: string): TaskState[];
|
|
23
|
+
private persist;
|
|
24
|
+
private loadFromDisk;
|
|
25
|
+
private listFromDisk;
|
|
23
26
|
private evictExpired;
|
|
27
|
+
private deleteFromDisk;
|
|
24
28
|
}
|
|
25
29
|
export declare const TaskTracker: TaskTrackerImpl;
|
|
26
30
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const RETENTION_MS=0x5*0x3c*0x3e8,MAX_TASKS=0xc8;class TaskTrackerImpl{['tasks']=new Map();['counter']=0x0;['create'](a,b){this['evictExpired'](),this['counter']++;const c='task_'+Date['now']()+'_'+this['counter'],d={'task_id':c,'operation':a,'status':'pending','progress':0x0,'message':'Task\x20created','result':null,'error':null,'started_at':Date['now'](),'completed_at':null,'project_id':b??null};return this['tasks']['set'](c,d),c;}['update'](a,b,c){const d=this['tasks']['get'](a);if(!d)return;d['progress']=Math['max'](0x0,Math['min'](0x64,b));if(c)d['message']=c;if(d['status']==='pending')d['status']='running';}['complete'](a,b){const c=this['tasks']['get'](a);if(!c)return;c['status']='completed',c['progress']=0x64,c['result']=b,c['completed_at']=Date['now']();}['fail'](a,b){const c=this['tasks']['get'](a);if(!c)return;c['status']='failed',c['error']=b,c['completed_at']=Date['now']();}['get'](a){
|
|
1
|
+
import{existsSync,mkdirSync,readFileSync,writeFileSync,readdirSync,unlinkSync}from'fs';import{join}from'path';import{getWowMcpDir}from'@wowok/wowok';const RETENTION_MS=0x5*0x3c*0x3e8,MAX_TASKS=0xc8,TASKS_ROOT=join(getWowMcpDir(),'tasks');function taskPath(a){return join(TASKS_ROOT,a+'.json');}function safeStringify(a){try{return JSON['stringify'](a);}catch{return JSON['stringify']({'__unserializable':!![]});}}class TaskTrackerImpl{['tasks']=new Map();['counter']=0x0;['create'](a,b){this['evictExpired'](),this['counter']++;const c='task_'+Date['now']()+'_'+this['counter'],d={'task_id':c,'operation':a,'status':'pending','progress':0x0,'message':'Task\x20created','result':null,'error':null,'started_at':Date['now'](),'completed_at':null,'project_id':b??null};return this['tasks']['set'](c,d),this['persist'](d),c;}['update'](a,b,c){const d=this['tasks']['get'](a);if(!d)return;d['progress']=Math['max'](0x0,Math['min'](0x64,b));if(c)d['message']=c;if(d['status']==='pending')d['status']='running';this['persist'](d);}['complete'](a,b){const c=this['tasks']['get'](a);if(!c)return;c['status']='completed',c['progress']=0x64,c['result']=b,c['completed_at']=Date['now'](),this['persist'](c);}['fail'](a,b){const c=this['tasks']['get'](a);if(!c)return;c['status']='failed',c['error']=b,c['completed_at']=Date['now'](),this['persist'](c);}['get'](a){const b=this['tasks']['get'](a);if(b)return b;return this['loadFromDisk'](a);}['list'](a){const b=new Map();for(const e of this['listFromDisk']())b['set'](e['task_id'],e);for(const f of this['tasks']['values']())b['set'](f['task_id'],f);const c=Array['from'](b['values']());if(a)return c['filter'](g=>g['project_id']===a);return c;}['persist'](a){try{if(!existsSync(TASKS_ROOT))mkdirSync(TASKS_ROOT,{'recursive':!![]});writeFileSync(taskPath(a['task_id']),safeStringify(a),'utf8');}catch{}}['loadFromDisk'](a){try{const b=taskPath(a);if(!existsSync(b))return undefined;return JSON['parse'](readFileSync(b,'utf8'));}catch{return undefined;}}['listFromDisk'](){try{if(!existsSync(TASKS_ROOT))return[];const a=[];for(const b of readdirSync(TASKS_ROOT)){if(!b['endsWith']('.json'))continue;try{const c=JSON['parse'](readFileSync(join(TASKS_ROOT,b),'utf8'));if(c?.['task_id'])a['push'](c);}catch{}}return a;}catch{return[];}}['evictExpired'](){const a=Date['now']();for(const [b,c]of this['tasks']){c['completed_at']&&a-c['completed_at']>RETENTION_MS&&(this['tasks']['delete'](b),this['deleteFromDisk'](b));}if(this['tasks']['size']>MAX_TASKS){const e=Array['from'](this['tasks']['values']())['filter'](g=>g['status']==='completed'||g['status']==='failed')['sort']((g,h)=>(g['completed_at']??0x0)-(h['completed_at']??0x0)),f=e['slice'](0x0,this['tasks']['size']-MAX_TASKS);for(const g of f){this['tasks']['delete'](g['task_id']),this['deleteFromDisk'](g['task_id']);}}for(const h of this['listFromDisk']()){h['completed_at']&&a-h['completed_at']>RETENTION_MS&&!this['tasks']['has'](h['task_id'])&&this['deleteFromDisk'](h['task_id']);}}['deleteFromDisk'](a){try{const b=taskPath(a);if(existsSync(b))unlinkSync(b);}catch{}}}export const TaskTracker=new TaskTrackerImpl();
|
|
@@ -1,11 +1,28 @@
|
|
|
1
1
|
import type { CommercialRole } from "./types.js";
|
|
2
|
+
export declare const PERMISSION_RANGES: {
|
|
3
|
+
readonly service: {
|
|
4
|
+
readonly min: 300;
|
|
5
|
+
readonly max: 320;
|
|
6
|
+
};
|
|
7
|
+
readonly arbitration: {
|
|
8
|
+
readonly min: 350;
|
|
9
|
+
readonly max: 368;
|
|
10
|
+
};
|
|
11
|
+
readonly demand: {
|
|
12
|
+
readonly min: 400;
|
|
13
|
+
readonly max: 408;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
export declare const CORE_PERMISSION_INDEX: {
|
|
17
|
+
readonly service: 300;
|
|
18
|
+
readonly arbitration: 350;
|
|
19
|
+
readonly demand: 400;
|
|
20
|
+
};
|
|
2
21
|
export interface RoleDerivationInput {
|
|
3
22
|
account: string;
|
|
4
23
|
order_holder?: string;
|
|
5
24
|
held_permission_indexes?: number[];
|
|
6
25
|
named_operator_names?: string[];
|
|
7
|
-
service_builder?: string;
|
|
8
|
-
arbitration_owner?: string;
|
|
9
26
|
demand_presenters?: string[];
|
|
10
27
|
has_active_order?: boolean;
|
|
11
28
|
}
|
package/dist/role/derivation.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export function deriveCommercialRole(a){const b=a['account'];if(a['order_holder']&&a['order_holder']===b)return{'role':'customer','derivation':'account\x20is\x20the\x20order\x20holder\x20(Order.
|
|
1
|
+
export const PERMISSION_RANGES={'service':{'min':0x12c,'max':0x140},'arbitration':{'min':0x15e,'max':0x170},'demand':{'min':0x190,'max':0x198}};export const CORE_PERMISSION_INDEX={'service':0x12c,'arbitration':0x15e,'demand':0x190};function inRange(a,b){return a>=b['min']&&a<=b['max'];}export function deriveCommercialRole(a){const b=a['account'],c=a['held_permission_indexes']??[];if(a['order_holder']&&a['order_holder']===b)return{'role':'customer','derivation':'account\x20is\x20the\x20order\x20holder\x20(Order.owner)'};if(c['some'](d=>inRange(d,PERMISSION_RANGES['demand'])))return{'role':'demander','derivation':'account\x20holds\x20a\x20Demand\x20operation\x20permission\x20(400-408)'};if(c['some'](d=>inRange(d,PERMISSION_RANGES['service'])))return{'role':'merchant','derivation':'account\x20holds\x20a\x20Service\x20operation\x20permission\x20(300-312)'};if(a['demand_presenters']&&a['demand_presenters']['includes'](b))return{'role':'supplier','derivation':'account\x20presented\x20the\x20main\x20service\x20to\x20the\x20demand\x20(sub-order\x20provider)'};if(c['some'](d=>inRange(d,PERMISSION_RANGES['arbitration'])))return{'role':'arbitrator','derivation':'account\x20holds\x20an\x20Arbitration\x20operation\x20permission\x20(350-368)'};if(c['length']>0x0)return{'role':'collaborator','collaborator_kind':'permission_entity','derivation':'account\x20holds\x20permission\x20index(es):\x20'+c['join'](',\x20')};if(a['named_operator_names']&&a['named_operator_names']['length']>0x0)return{'role':'collaborator','collaborator_kind':'named_operator','derivation':'account\x20resolves\x20named\x20operator(s):\x20'+a['named_operator_names']['join'](',\x20')};return{'role':'neutral','derivation':a['has_active_order']?'no\x20operative\x20role\x20on\x20this\x20order\x20(observer\x20of\x20an\x20in-flight\x20order)':'no\x20on-chain\x20relationship\x20to\x20the\x20focus\x20object\x20(neutral\x20observer)'};}export function deriveAllRoles(a){const b=[],c=a['account'],d=a['held_permission_indexes']??[];return a['order_holder']&&a['order_holder']===c&&b['push']({'role':'customer','derivation':'order\x20holder'}),d['some'](e=>inRange(e,PERMISSION_RANGES['demand']))&&b['push']({'role':'demander','derivation':'Demand\x20operation\x20permission\x20(400-408)'}),d['some'](e=>inRange(e,PERMISSION_RANGES['service']))&&b['push']({'role':'merchant','derivation':'Service\x20operation\x20permission\x20(300-312)'}),d['some'](e=>inRange(e,PERMISSION_RANGES['arbitration']))&&b['push']({'role':'arbitrator','derivation':'Arbitration\x20operation\x20permission\x20(350-368)'}),a['demand_presenters']&&a['demand_presenters']['includes'](c)&&b['push']({'role':'supplier','derivation':'demand\x20presenter'}),d['length']>0x0&&!d['some'](e=>isCoreRange(e))&&b['push']({'role':'collaborator','collaborator_kind':'permission_entity','derivation':'permission\x20index(es):\x20'+d['join'](',\x20')}),a['named_operator_names']&&a['named_operator_names']['length']>0x0&&b['push']({'role':'collaborator','collaborator_kind':'named_operator','derivation':'named\x20operator(s):\x20'+a['named_operator_names']['join'](',\x20')}),b['length']===0x0&&b['push']({'role':'neutral','derivation':a['has_active_order']?'observer\x20of\x20in-flight\x20order':'neutral\x20observer'}),b;}function isCoreRange(a){return inRange(a,PERMISSION_RANGES['service'])||inRange(a,PERMISSION_RANGES['arbitration'])||inRange(a,PERMISSION_RANGES['demand']);}
|
package/dist/role/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export type { CommercialRole, GamePower, ValuePerspective, RoleModel, } from "./types.js";
|
|
2
2
|
export { COMMERCIAL_ROLES } from "./types.js";
|
|
3
3
|
export { ROLE_MODELS, gamePowerOf, valuePerspectiveOf, isWeakerParty, isStrongerParty, interestAnalyzerOf, gameStrategyOf, } from "./model.js";
|
|
4
|
-
export { deriveCommercialRole, deriveAllRoles, type RoleDerivationInput, type DerivedRole, } from "./derivation.js";
|
|
5
|
-
export { mergeRolePerspective, isOnchainRoleAuthoritative, type RoleMergeResult, } from "./resolution.js";
|
|
4
|
+
export { deriveCommercialRole, deriveAllRoles, PERMISSION_RANGES, CORE_PERMISSION_INDEX, type RoleDerivationInput, type DerivedRole, } from "./derivation.js";
|
|
5
|
+
export { mergeRolePerspective, isOnchainRoleAuthoritative, resolveWatchRole, type RoleMergeResult, type WatchRoleInput, type WatchRole, } from "./resolution.js";
|
package/dist/role/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{COMMERCIAL_ROLES}from'./types.js';export{ROLE_MODELS,gamePowerOf,valuePerspectiveOf,isWeakerParty,isStrongerParty,interestAnalyzerOf,gameStrategyOf}from'./model.js';export{deriveCommercialRole,deriveAllRoles}from'./derivation.js';export{mergeRolePerspective,isOnchainRoleAuthoritative}from'./resolution.js';
|
|
1
|
+
export{COMMERCIAL_ROLES}from'./types.js';export{ROLE_MODELS,gamePowerOf,valuePerspectiveOf,isWeakerParty,isStrongerParty,interestAnalyzerOf,gameStrategyOf}from'./model.js';export{deriveCommercialRole,deriveAllRoles,PERMISSION_RANGES,CORE_PERMISSION_INDEX}from'./derivation.js';export{mergeRolePerspective,isOnchainRoleAuthoritative,resolveWatchRole}from'./resolution.js';
|
package/dist/role/model.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const ROLE_MODELS={'merchant':{'role':'merchant','power':'strong','interest_analyzer':'merchant-interest','game_strategy':'merchant','value_perspective':'producer'},'customer':{'role':'customer','power':'weak','interest_analyzer':'customer-interest','game_strategy':'customer','value_perspective':'consumer'},'prospect':{'role':'prospect','power':'weak','interest_analyzer':'preorder','game_strategy':'customer','value_perspective':'consumer'},'supplier':{'role':'supplier','power':'peer','interest_analyzer':'supplier-interest','game_strategy':'supplier','value_perspective':'producer'},'collaborator':{'role':'collaborator','power':'peer','interest_analyzer':'collaborator-interest','game_strategy':'collaborator','value_perspective':'neutral'},'arbitrator':{'role':'arbitrator','power':'neutral','interest_analyzer':'arb_game','game_strategy':'arbitrator','value_perspective':'neutral'},'system':{'role':'system','power':'neutral','interest_analyzer':'system','game_strategy':'system','value_perspective':'neutral'}};export function gamePowerOf(a){return ROLE_MODELS[a]['power'];}export function valuePerspectiveOf(a){return ROLE_MODELS[a]['value_perspective'];}export function isWeakerParty(a){return ROLE_MODELS[a]['power']==='weak';}export function isStrongerParty(a){return ROLE_MODELS[a]['power']==='strong';}export function interestAnalyzerOf(a){return ROLE_MODELS[a]['interest_analyzer'];}export function gameStrategyOf(a){return ROLE_MODELS[a]['game_strategy'];}
|
|
1
|
+
export const ROLE_MODELS={'merchant':{'role':'merchant','power':'strong','interest_analyzer':'merchant-interest','game_strategy':'merchant','value_perspective':'producer'},'customer':{'role':'customer','power':'weak','interest_analyzer':'customer-interest','game_strategy':'customer','value_perspective':'consumer'},'demander':{'role':'demander','power':'weak','interest_analyzer':'demander-interest','game_strategy':'demander','value_perspective':'consumer'},'prospect':{'role':'prospect','power':'weak','interest_analyzer':'preorder','game_strategy':'customer','value_perspective':'consumer'},'supplier':{'role':'supplier','power':'peer','interest_analyzer':'supplier-interest','game_strategy':'supplier','value_perspective':'producer'},'collaborator':{'role':'collaborator','power':'peer','interest_analyzer':'collaborator-interest','game_strategy':'collaborator','value_perspective':'neutral'},'arbitrator':{'role':'arbitrator','power':'neutral','interest_analyzer':'arb_game','game_strategy':'arbitrator','value_perspective':'neutral'},'neutral':{'role':'neutral','power':'neutral','interest_analyzer':'system','game_strategy':'system','value_perspective':'neutral'},'system':{'role':'system','power':'neutral','interest_analyzer':'system','game_strategy':'system','value_perspective':'neutral'}};export function gamePowerOf(a){return ROLE_MODELS[a]['power'];}export function valuePerspectiveOf(a){return ROLE_MODELS[a]['value_perspective'];}export function isWeakerParty(a){return ROLE_MODELS[a]['power']==='weak';}export function isStrongerParty(a){return ROLE_MODELS[a]['power']==='strong';}export function interestAnalyzerOf(a){return ROLE_MODELS[a]['interest_analyzer'];}export function gameStrategyOf(a){return ROLE_MODELS[a]['game_strategy'];}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { CommercialRole } from "./types.js";
|
|
2
|
+
import { type RoleDerivationInput } from "./derivation.js";
|
|
2
3
|
export interface RoleMergeResult {
|
|
3
4
|
onchain_role: CommercialRole;
|
|
4
5
|
persona_role: CommercialRole | undefined;
|
|
@@ -9,3 +10,18 @@ export interface RoleMergeResult {
|
|
|
9
10
|
}
|
|
10
11
|
export declare function mergeRolePerspective(personaRole: CommercialRole | undefined, onchainRole: CommercialRole): RoleMergeResult;
|
|
11
12
|
export declare function isOnchainRoleAuthoritative(onchainRole: CommercialRole | undefined): boolean;
|
|
13
|
+
export interface WatchRoleInput {
|
|
14
|
+
derivation: RoleDerivationInput;
|
|
15
|
+
latent_role?: CommercialRole;
|
|
16
|
+
}
|
|
17
|
+
export interface WatchRole {
|
|
18
|
+
manifest_role: CommercialRole;
|
|
19
|
+
latent_role: CommercialRole | undefined;
|
|
20
|
+
participation_role: CommercialRole;
|
|
21
|
+
evaluation_role: CommercialRole;
|
|
22
|
+
conflicting: boolean;
|
|
23
|
+
reason_direction: "objective" | "game";
|
|
24
|
+
derivation: string;
|
|
25
|
+
note: string;
|
|
26
|
+
}
|
|
27
|
+
export declare function resolveWatchRole(input: WatchRoleInput): WatchRole;
|
package/dist/role/resolution.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export function mergeRolePerspective(a,b){const c=a!==undefined&&a!=='system'?a:undefined,d=c!==undefined&&c!==b,e=c===undefined?'No\x20explicit\x20persona\x20role\x20set\x20—\x20on-chain\x20role\x20\x27'+b+'\x27\x20is\x20authoritative\x20for\x20both\x20participation\x20and\x20evaluation.':d?'persona\x20role\x20\x27'+c+'\x27\x20disagrees\x20with\x20on-chain\x20role\x20\x27'+b+'\x27.\x20'+'On-chain\x20derivation\x20is\x20ground\x20truth\x20for\x20participation;\x20the\x20persona\x20role\x20is\x20an\x20identity\x20preference\x20'+'that\x20only\x20feeds\x20evaluation\x20injection\x20(preferences/requirements/risk_appetite).':'persona\x20role\x20and\x20on-chain\x20role\x20agree\x20(\x27'+b+'\x27).';return{'onchain_role':b,'persona_role':c,'conflicting':d,'participation_role':b,'evaluation_role':c??b,'note':e};}export function isOnchainRoleAuthoritative(a){return a!==undefined&&a!=='system';}
|
|
1
|
+
import{deriveCommercialRole}from'./derivation.js';export function mergeRolePerspective(a,b){const c=a!==undefined&&a!=='system'?a:undefined,d=c!==undefined&&c!==b,e=c===undefined?'No\x20explicit\x20persona\x20role\x20set\x20—\x20on-chain\x20role\x20\x27'+b+'\x27\x20is\x20authoritative\x20for\x20both\x20participation\x20and\x20evaluation.':d?'persona\x20role\x20\x27'+c+'\x27\x20disagrees\x20with\x20on-chain\x20role\x20\x27'+b+'\x27.\x20'+'On-chain\x20derivation\x20is\x20ground\x20truth\x20for\x20participation;\x20the\x20persona\x20role\x20is\x20an\x20identity\x20preference\x20'+'that\x20only\x20feeds\x20evaluation\x20injection\x20(preferences/requirements/risk_appetite).':'persona\x20role\x20and\x20on-chain\x20role\x20agree\x20(\x27'+b+'\x27).';return{'onchain_role':b,'persona_role':c,'conflicting':d,'participation_role':b,'evaluation_role':c??b,'note':e};}export function isOnchainRoleAuthoritative(a){return a!==undefined&&a!=='system'&&a!=='neutral';}export function resolveWatchRole(a){const b=deriveCommercialRole(a['derivation']),c=mergeRolePerspective(a['latent_role'],b['role']),d=c['participation_role']==='neutral'||c['participation_role']==='system'?'objective':'game';return{'manifest_role':b['role'],'latent_role':c['persona_role'],'participation_role':c['participation_role'],'evaluation_role':c['evaluation_role'],'conflicting':c['conflicting'],'reason_direction':d,'derivation':b['derivation'],'note':c['note']};}
|
package/dist/role/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type CommercialRole = "merchant" | "customer" | "prospect" | "supplier" | "collaborator" | "arbitrator" | "system";
|
|
1
|
+
export type CommercialRole = "merchant" | "customer" | "demander" | "prospect" | "supplier" | "collaborator" | "arbitrator" | "neutral" | "system";
|
|
2
2
|
export type GamePower = "strong" | "weak" | "peer" | "neutral";
|
|
3
3
|
export type ValuePerspective = "producer" | "consumer" | "neutral";
|
|
4
4
|
export interface RoleModel {
|
package/dist/role/types.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const COMMERCIAL_ROLES=['merchant','customer','prospect','supplier','collaborator','arbitrator','system'];
|
|
1
|
+
export const COMMERCIAL_ROLES=['merchant','customer','demander','prospect','supplier','collaborator','arbitrator','neutral','system'];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{CONFIRMATION_RULES,resolveOverrideId}from'../knowledge/safety-rules.js';import{isEnabled as
|
|
1
|
+
import{CONFIRMATION_RULES,resolveOverrideId}from'../knowledge/safety-rules.js';import{isEnabled as a306a}from'../config/index.js';export function isConfirmGateEnabled(){return a306a('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='+(b instanceof Error?b['message']:String(b)));}export function getFailMode(a){switch(a){case'irreversible':case'publish':case'amount':return'closed';case'standard':case'none':default:return'open';}}function buildInternalErrorResult(){return{'pass':![],'level':'irreversible','preview':{'level':'irreversible','operation':'unknown','irreversible':!![]},'rule_id':'internal_error'};}export function confirmGate(a,b,c,d,f){if(!isConfirmGateEnabled())return{'pass':!![]};if(c?.['confirmed']===!![])return{'pass':!![]};let g,h=null;try{g=CONFIRMATION_RULES['find'](l=>{try{return l['when'](a,b,c);}catch(m){logInternalError('rule_when:'+l['id'],m);if(getFailMode(l['level'])==='closed')throw m;return![];}});}catch(l){h=l;}if(h)return logInternalError('rule_search',h),buildInternalErrorResult();if(!g)return{'pass':!![]};const i=resolveOverrideId(g['id'],a),j=i?f?.[i]:undefined;if(j==='auto')return{'pass':!![]};if(j!=='block'&&g['bypass_on_explicit_intent']&&d&&d['length']>0x0){const m=d['map'](o=>o['toLowerCase']()),n=g['bypass_on_explicit_intent']['some'](o=>m['some'](q=>q['includes'](o['toLowerCase']())));if(n)return{'pass':!![]};}let k;try{k=g['preview'](a,b,c);}catch(o){logInternalError('rule_preview:'+g['id'],o);if(getFailMode(g['level'])==='closed')return buildInternalErrorResult();return{'pass':!![]};}return{'pass':![],'level':g['level'],'preview':k,'rule_id':g['id']};}export function isExplicitlyConfirmed(a){return a?.['confirmed']===!![];}
|
|
@@ -55,6 +55,9 @@ export declare const CallAllocation_OperateSchema: z.ZodObject<{
|
|
|
55
55
|
id: z.ZodString;
|
|
56
56
|
balance: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
|
|
57
57
|
payment: z.ZodString;
|
|
58
|
+
type: z.ZodOptional<z.ZodString>;
|
|
59
|
+
version: z.ZodOptional<z.ZodString>;
|
|
60
|
+
digest: z.ZodOptional<z.ZodString>;
|
|
58
61
|
}, z.core.$strict>>;
|
|
59
62
|
}, z.core.$strict>, z.ZodLiteral<"recently">]>>;
|
|
60
63
|
alloc_by_guard: z.ZodOptional<z.ZodString>;
|
|
@@ -114,6 +117,9 @@ export declare const CallAllocation_DataSchema: z.ZodUnion<readonly [z.ZodObject
|
|
|
114
117
|
id: z.ZodString;
|
|
115
118
|
balance: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
|
|
116
119
|
payment: z.ZodString;
|
|
120
|
+
type: z.ZodOptional<z.ZodString>;
|
|
121
|
+
version: z.ZodOptional<z.ZodString>;
|
|
122
|
+
digest: z.ZodOptional<z.ZodString>;
|
|
117
123
|
}, z.core.$strict>>;
|
|
118
124
|
}, z.core.$strict>, z.ZodLiteral<"recently">]>>;
|
|
119
125
|
alloc_by_guard: z.ZodOptional<z.ZodString>;
|
|
@@ -174,6 +180,9 @@ export declare const CallAllocation_InputSchema: z.ZodObject<{
|
|
|
174
180
|
id: z.ZodString;
|
|
175
181
|
balance: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
|
|
176
182
|
payment: z.ZodString;
|
|
183
|
+
type: z.ZodOptional<z.ZodString>;
|
|
184
|
+
version: z.ZodOptional<z.ZodString>;
|
|
185
|
+
digest: z.ZodOptional<z.ZodString>;
|
|
177
186
|
}, z.core.$strict>>;
|
|
178
187
|
}, z.core.$strict>, z.ZodLiteral<"recently">]>>;
|
|
179
188
|
alloc_by_guard: z.ZodOptional<z.ZodString>;
|
|
@@ -188,6 +197,7 @@ export declare const CallAllocation_InputSchema: z.ZodObject<{
|
|
|
188
197
|
mainnet: import("@wowok/wowok").ENTRYPOINT.Mainnet;
|
|
189
198
|
}>>;
|
|
190
199
|
referrer: z.ZodOptional<z.ZodString>;
|
|
200
|
+
no_auto_register: z.ZodOptional<z.ZodBoolean>;
|
|
191
201
|
confirmed: z.ZodOptional<z.ZodBoolean>;
|
|
192
202
|
user_intent_phrases: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
193
203
|
project: z.ZodOptional<z.ZodString>;
|
|
@@ -17,7 +17,7 @@ export declare const DisputeSchema: z.ZodObject<{
|
|
|
17
17
|
}, z.core.$strict>;
|
|
18
18
|
export declare const ConfirmSchema: z.ZodObject<{
|
|
19
19
|
arb: z.ZodString;
|
|
20
|
-
voting_deadline: z.ZodUnion<readonly [z.ZodNumber, z.ZodNull]
|
|
20
|
+
voting_deadline: z.ZodDefault<z.ZodUnion<readonly [z.ZodNumber, z.ZodNull]>>;
|
|
21
21
|
}, z.core.$strict>;
|
|
22
22
|
export declare const VotingDeadlineChangeSchema: z.ZodObject<{
|
|
23
23
|
arb: z.ZodString;
|
|
@@ -120,7 +120,7 @@ export declare const CallArbitration_DataSchema: z.ZodObject<{
|
|
|
120
120
|
pause: z.ZodOptional<z.ZodBoolean>;
|
|
121
121
|
confirm: z.ZodOptional<z.ZodObject<{
|
|
122
122
|
arb: z.ZodString;
|
|
123
|
-
voting_deadline: z.ZodUnion<readonly [z.ZodNumber, z.ZodNull]
|
|
123
|
+
voting_deadline: z.ZodDefault<z.ZodUnion<readonly [z.ZodNumber, z.ZodNull]>>;
|
|
124
124
|
}, z.core.$strict>>;
|
|
125
125
|
voting_deadline_change: z.ZodOptional<z.ZodObject<{
|
|
126
126
|
arb: z.ZodString;
|
|
@@ -186,6 +186,8 @@ export declare const CallArbitration_DataSchema: z.ZodObject<{
|
|
|
186
186
|
id: z.ZodString;
|
|
187
187
|
type: z.ZodString;
|
|
188
188
|
content_raw: z.ZodOptional<z.ZodAny>;
|
|
189
|
+
version: z.ZodOptional<z.ZodString>;
|
|
190
|
+
digest: z.ZodOptional<z.ZodString>;
|
|
189
191
|
}, z.core.$strict>>, z.ZodObject<{
|
|
190
192
|
balance: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
|
|
191
193
|
token_type: z.ZodString;
|
|
@@ -193,6 +195,9 @@ export declare const CallArbitration_DataSchema: z.ZodObject<{
|
|
|
193
195
|
id: z.ZodString;
|
|
194
196
|
balance: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
|
|
195
197
|
payment: z.ZodString;
|
|
198
|
+
type: z.ZodOptional<z.ZodString>;
|
|
199
|
+
version: z.ZodOptional<z.ZodString>;
|
|
200
|
+
digest: z.ZodOptional<z.ZodString>;
|
|
196
201
|
}, z.core.$strict>>;
|
|
197
202
|
}, z.core.$strict>, z.ZodLiteral<"recently">]>>;
|
|
198
203
|
um: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
|
|
@@ -235,7 +240,7 @@ export declare const CallArbitration_InputSchema: z.ZodObject<{
|
|
|
235
240
|
pause: z.ZodOptional<z.ZodBoolean>;
|
|
236
241
|
confirm: z.ZodOptional<z.ZodObject<{
|
|
237
242
|
arb: z.ZodString;
|
|
238
|
-
voting_deadline: z.ZodUnion<readonly [z.ZodNumber, z.ZodNull]
|
|
243
|
+
voting_deadline: z.ZodDefault<z.ZodUnion<readonly [z.ZodNumber, z.ZodNull]>>;
|
|
239
244
|
}, z.core.$strict>>;
|
|
240
245
|
voting_deadline_change: z.ZodOptional<z.ZodObject<{
|
|
241
246
|
arb: z.ZodString;
|
|
@@ -301,6 +306,8 @@ export declare const CallArbitration_InputSchema: z.ZodObject<{
|
|
|
301
306
|
id: z.ZodString;
|
|
302
307
|
type: z.ZodString;
|
|
303
308
|
content_raw: z.ZodOptional<z.ZodAny>;
|
|
309
|
+
version: z.ZodOptional<z.ZodString>;
|
|
310
|
+
digest: z.ZodOptional<z.ZodString>;
|
|
304
311
|
}, z.core.$strict>>, z.ZodObject<{
|
|
305
312
|
balance: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
|
|
306
313
|
token_type: z.ZodString;
|
|
@@ -308,6 +315,9 @@ export declare const CallArbitration_InputSchema: z.ZodObject<{
|
|
|
308
315
|
id: z.ZodString;
|
|
309
316
|
balance: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
|
|
310
317
|
payment: z.ZodString;
|
|
318
|
+
type: z.ZodOptional<z.ZodString>;
|
|
319
|
+
version: z.ZodOptional<z.ZodString>;
|
|
320
|
+
digest: z.ZodOptional<z.ZodString>;
|
|
311
321
|
}, z.core.$strict>>;
|
|
312
322
|
}, z.core.$strict>, z.ZodLiteral<"recently">]>>;
|
|
313
323
|
um: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
|
|
@@ -322,6 +332,7 @@ export declare const CallArbitration_InputSchema: z.ZodObject<{
|
|
|
322
332
|
mainnet: import("@wowok/wowok").ENTRYPOINT.Mainnet;
|
|
323
333
|
}>>;
|
|
324
334
|
referrer: z.ZodOptional<z.ZodString>;
|
|
335
|
+
no_auto_register: z.ZodOptional<z.ZodBoolean>;
|
|
325
336
|
confirmed: z.ZodOptional<z.ZodBoolean>;
|
|
326
337
|
user_intent_phrases: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
327
338
|
project: z.ZodOptional<z.ZodString>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{z}from'zod';import{TypedPermissionObjectSchema,CoinParamSchema,NamedObjectSchema,CallEnvSchema,SubmissionCallSchema}from'./base.js';import{VotingGuardSchema}from'../query/index.js';import{BalanceTypeSchema,DescriptionSchema,LongNameSchema,NameOrAddressSchema,NameSchema,ReceivedObjectsOrRecentlySchema,RECEIVE_FORMAT_BLOCK_OBJECTS}from'../common/index.js';export const DisputeSchema=z['object']({'order':NameOrAddressSchema['describe']('Order\x20ID\x20or\x20name.'),'description':DescriptionSchema['optional']()['describe']('Dispute\x20description.'),'proposition':z['array'](LongNameSchema)['describe']('List\x20of\x20dispute\x20propositions.'),'fee':CoinParamSchema['describe']('Dispute\x20processing\x20fee.\x20FORMAT:\x20{balance:\x20<amount_in_smallest_unit>}\x20—\x20field\x20name\x20is\x20\x27balance\x27\x20(NOT\x20\x27amount\x27).\x20'+'The\x20token\x20type\x20and\x20precision\x20are\x20determined\x20by\x20the\x20Arbitration\x20object\x27s\x20type_parameter\x20(the\x20generic\x20type\x20set\x20when\x20the\x20Arbitration\x20was\x20created).\x20'+'For\x20WOW\x20(9\x20decimals):\x20{balance:\x2050000000}\x20=\x200.05\x20WOW.\x20For\x20SUI\x20(9\x20decimals):\x20{balance:\x2050000000}\x20=\x200.05\x20SUI.\x20'+'For\x20tokens\x20with\x20different\x20decimals,\x20adjust\x20accordingly\x20(e.g.\x20USDC\x20has\x206\x20decimals,\x20so\x20{balance:\x2050000}\x20=\x200.05\x20USDC).'),'namedArb':NamedObjectSchema['optional']()['describe']('RECOMMENDED:\x20Set\x20a\x20local\x20name\x20for\x20the\x20newly\x20created\x20Arb\x20(arbitration\x20case)\x20object.\x20'+'Without\x20this,\x20the\x20Arb\x20is\x20only\x20referenceable\x20by\x20its\x20on-chain\x20address.\x20'+'Example:\x20{name:\x20\x27my_dispute_v1\x27}\x20allows\x20subsequent\x20vote/feedback\x20operations\x20to\x20use\x20\x27my_dispute_v1\x27.')})['strict']();export const ConfirmSchema=z['object']({'arb':NameOrAddressSchema,'voting_deadline':z['union']([z['number']()['int']()['min'](0x0),z['null']()])['describe']('Voting\x20deadline\x20as\x20Unix\x20timestamp\x20in\x20MILLISECONDS\x20(ms).\x20SEMANTICS\x20OF\x20SPECIAL\x20VALUES:\x20'+'0\x20=\x20deadline\x20already\x20passed\x20→\x20voting\x20is\x20IMPOSSIBLE\x20and\x20the\x20arbitrator\x20may\x20deliver\x20the\x20verdict\x20immediately\x20(direct-verdict\x20flow);\x20'+'null\x20=\x20open-ended\x20voting\x20with\x20no\x20deadline\x20(verdict\x20allowed\x20anytime);\x20'+'a\x20future\x20timestamp\x20=\x20normal\x20voting\x20window\x20(recommended:\x20now\x20+\x20at\x20least\x2086400000\x20ms\x20=\x2024\x20hours).\x20'+'COMMON\x20MISTAKE:\x20using\x20seconds\x20instead\x20of\x20milliseconds\x20(multiply\x20by\x201000).\x20'+'Example:\x20Date.now()\x20+\x20259200000\x20for\x203\x20days\x20from\x20now.')})['strict']();export const VotingDeadlineChangeSchema=z['object']({'arb':NameOrAddressSchema,'voting_deadline':z['union']([z['number'](),z['null']()])['describe']('New\x20voting\x20deadline\x20as\x20Unix\x20timestamp\x20in\x20MILLISECONDS\x20(ms).\x20SEMANTICS\x20OF\x20SPECIAL\x20VALUES:\x20'+'0\x20=\x20deadline\x20already\x20passed\x20→\x20voting\x20is\x20IMPOSSIBLE\x20and\x20the\x20arbitrator\x20may\x20deliver\x20the\x20verdict\x20immediately;\x20'+'null\x20=\x20open-ended\x20voting\x20with\x20no\x20deadline\x20(verdict\x20allowed\x20anytime);\x20'+'a\x20future\x20timestamp\x20=\x20normal\x20voting\x20window\x20(recommended:\x20now\x20+\x20at\x20least\x2086400000\x20ms\x20=\x2024\x20hours).\x20'+'COMMON\x20MISTAKE:\x20using\x20seconds\x20instead\x20of\x20milliseconds\x20(multiply\x20by\x201000).\x20'+'Example:\x20Date.now()\x20+\x20259200000\x20for\x203\x20days\x20from\x20now.')})['strict']();export const VoteSchema=z['object']({'arb':NameOrAddressSchema,'votes':z['array'](z['number']()['int']()['min'](0x0)['max'](0xff))['describe']('Proposition\x20INDICES\x20(0-based,\x20u8)\x20the\x20voter\x20agrees\x20with\x20—\x20e.g.\x20[0]\x20votes\x20for\x20the\x20first\x20proposition.\x20'+'Re-voting\x20REPLACES\x20the\x20voter\x27s\x20previous\x20vote\x20(old\x20weight\x20removed,\x20new\x20applied).\x20'+'Out-of-range\x20index\x20aborts\x20with\x20E_PROPOSITION_NOT_FOUND.'),'voting_guard':NameOrAddressSchema['optional']()['describe']('Optional\x20Voting\x20Guard\x20for\x20weighted\x20voting.\x20THREE\x20PATHS\x20are\x20supported\x20by\x20the\x20SDK\x20and\x20Move\x20contract:\x20'+'(1)\x20voting_guard\x20PROVIDED\x20→\x20vote_with_voting_guard\x20(Guard\x20verifies\x20voter\x20+\x20determines\x20vote\x20weight\x20via\x20VoteWeight\x20config);\x20'+'(2)\x20voting_guard\x20OMITTED\x20but\x20other\x20guards\x20trigger\x20passport\x20creation\x20(e.g.\x20env.permission_guard\x20or\x20usage_guard)\x20→\x20vote_with_passport\x20(permission-only\x20via\x20passport);\x20'+'(3)\x20voting_guard\x20OMITTED\x20and\x20no\x20passport\x20context\x20→\x20vote\x20(plain\x20permission-only\x20vote,\x20no\x20Guard).\x20'+'The\x20Guard\x20(when\x20provided)\x20must\x20be\x20in\x20the\x20Arbitration\x27s\x20voting_guard\x20list.')})['strict']();export const FeedbackSchema=z['object']({'arb':NameOrAddressSchema,'feedback':DescriptionSchema['describe']('Arbitration\x20feedback.')})['strict']();export const ArbitrationActionSchema=z['object']({'arb':NameOrAddressSchema,'feedback':DescriptionSchema['describe']('Arbitration\x20feedback.'),'indemnity':z['number']()['int']()['min'](0x0)})['strict']();export const ResetSchema=z['object']({'arb':NameOrAddressSchema,'feedback':DescriptionSchema['describe']('Arbitration\x20feedback.')})['strict']();export const ArbWithdrawSchema=z['object']({'arb':NameOrAddressSchema})['strict']();export const FeesTransferToSchema=z['union']([z['object']({'allocation':NameOrAddressSchema['describe']('Allocation\x20object\x20ID\x20or\x20name.')})['strict'](),z['object']({'treasury':NameOrAddressSchema['describe']('Treasury\x20object\x20ID\x20or\x20name.')})['strict']()]);export const FeesTransferSchema=z['object']({'to':FeesTransferToSchema['describe']('Transfer\x20arbitration\x20fees\x20to\x20the\x20specified\x20Allocation\x20object\x20or\x20Treasury\x20object.'),'payment_remark':NameSchema['describe']('Payment\x20remark.'),'payment_index':z['number']()['int']()['min'](0x0)['describe']('Payment\x20index.'),'newPayment':NamedObjectSchema['optional']()['describe']('Name\x20for\x20the\x20newly\x20created\x20payment\x20object.')})['strict']();export const VotingGuardActionSchema=z['discriminatedUnion']('op',[z['object']({'op':z['enum'](['add','set']),'guards':z['array'](VotingGuardSchema)})['strict'](),z['object']({'op':z['literal']('remove'),'guards':z['array'](NameOrAddressSchema)})['strict'](),z['object']({'op':z['literal']('clear')})['strict']()]);export const CallArbitration_DataSchema=z['object']({'object':TypedPermissionObjectSchema,'dispute':DisputeSchema['optional']()['describe']('Create\x20a\x20new\x20Arb\x20object\x20for\x20the\x20order.'),'description':DescriptionSchema['optional']()['describe']('Introduction\x20of\x20the\x20Arbitration\x20object.'),'location':LongNameSchema['optional']()['describe']('Arbitration\x20location.'),'fee':BalanceTypeSchema['optional']()['describe']('Arbitration\x20fee.'),'pause':z['boolean']()['optional']()['describe']('Whether\x20to\x20pause\x20arbitration.'),'confirm':ConfirmSchema['optional']()['describe']('Confirm\x20the\x20materials\x20submitted\x20by\x20the\x20user\x20for\x20arbitration.'),'voting_deadline_change':VotingDeadlineChangeSchema['optional']()['describe']('Change\x20the\x20voting\x20deadline.'),'vote':VoteSchema['optional']()['describe']('Vote\x20on\x20user\x20propositions.'),'feedback':FeedbackSchema['optional']()['describe']('Arbitration\x20feedback\x20for\x20the\x20Arb\x20object.'),'arbitration':ArbitrationActionSchema['optional']()['describe']('Provide\x20a\x20definitive\x20arbitration\x20result.'),'reset':ResetSchema['optional']()['describe']('User\x20applies\x20to\x20resubmit\x20materials\x20and\x20restart\x20arbitration.'),'arb_withdraw':ArbWithdrawSchema['optional']()['describe']('Withdraw\x20arbitration\x20fees\x20from\x20the\x20Arb\x20object.'),'fees_transfer':FeesTransferSchema['optional']()['describe']('Distribute\x20the\x20withdrawn\x20arbitration\x20fees.'),'usage_guard':z['union']([NameOrAddressSchema,z['null']()])['optional']()['describe']('Set\x20Guard\x20for\x20verification\x20when\x20users\x20apply\x20for\x20arbitration;\x20if\x20Guard\x20verification\x20fails,\x20users\x20will\x20not\x20be\x20able\x20to\x20apply\x20for\x20arbitration.'),'voting_guard':VotingGuardActionSchema['optional']()['describe']('Set\x20Guard\x20for\x20verification\x20during\x20arbitration\x20voting;\x20if\x20Guard\x20verification\x20fails,\x20arbitration\x20voting\x20will\x20fail.'),'owner_receive':ReceivedObjectsOrRecentlySchema['optional']()['describe']('Unwrap\x20CoinWrapper\x20objects\x20and\x20other\x20objects\x20received\x20by\x20this\x20Arbitration\x20object\x20and\x20send\x20them\x20to\x20the\x20owner\x20of\x20its\x20Permission\x20object.'+RECEIVE_FORMAT_BLOCK_OBJECTS),'um':z['union']([NameOrAddressSchema,z['null']()])['optional']()['describe']('Contact\x20object\x20ID\x20or\x20name.')})['strict']()['describe']('On-chain\x20Arbitration\x20operations.\x20USAGE:\x20(1)\x20CREATE\x20NEW:\x20Set\x20\x27object\x27\x20field\x20with\x20OBJECT\x20format\x20{name,\x20type_parameter,\x20permission,\x20...}\x20to\x20create\x20an\x20Arbitration.\x20NOTE:\x27name\x27\x20goes\x20INSIDE\x20\x27object\x27,\x20NOT\x20at\x20the\x20data\x20root\x20level.\x20\x27permission\x27\x20can\x20be\x20a\x20new\x20Permission\x20object\x20or\x20reference\x20an\x20existing\x20one\x20-\x20check\x20\x27object\x27\x20field\x20description\x20for\x20details.\x20⚠️\x20PERMISSION\x20RULE\x20(contract-enforced,\x20service.move\x20arbitration_add_imp):\x20the\x20Arbitration\x27s\x20permission\x20MUST\x20be\x20DIFFERENT\x20from\x20the\x20permission\x20of\x20any\x20Service\x20it\x20will\x20be\x20bound\x20to\x20—\x20binding\x20an\x20Arbitration\x20that\x20SHARES\x20the\x20Service\x27s\x20Permission\x20aborts\x20with\x20E_ARBITRATION_PERMISSION_CONFLICT\x20(error\x2033).\x20Always\x20create\x20a\x20DEDICATED\x20Permission\x20object\x20for\x20each\x20Arbitration.\x20(2)\x20OPERATE\x20EXISTING:\x20Set\x20\x27object\x27\x20field\x20with\x20STRING\x20format\x20(object\x20ID\x20or\x20name).\x20The\x20\x27object\x27\x20field\x20is\x20CRITICAL\x20and\x20REQUIRED\x20in\x20both\x20cases.\x20STRING\x20for\x20existing,\x20OBJECT\x20for\x20new\x20creation.');export const CallArbitration_InputSchema=z['object']({'data':CallArbitration_DataSchema,'env':CallEnvSchema['optional'](),'submission':SubmissionCallSchema['optional']()})['strict']();
|
|
1
|
+
import{z}from'zod';import{TypedPermissionObjectSchema,CoinParamSchema,NamedObjectSchema,CallEnvSchema,SubmissionCallSchema}from'./base.js';import{VotingGuardSchema}from'../query/index.js';import{BalanceTypeSchema,DescriptionSchema,LongNameSchema,NameOrAddressSchema,NameSchema,ReceivedObjectsOrRecentlySchema,RECEIVE_FORMAT_BLOCK_OBJECTS}from'../common/index.js';export const DisputeSchema=z['object']({'order':NameOrAddressSchema['describe']('Order\x20ID\x20or\x20name.'),'description':DescriptionSchema['optional']()['describe']('Dispute\x20description.'),'proposition':z['array'](LongNameSchema)['describe']('List\x20of\x20dispute\x20propositions.'),'fee':CoinParamSchema['describe']('Dispute\x20processing\x20fee.\x20FORMAT:\x20{balance:\x20<amount_in_smallest_unit>}\x20—\x20field\x20name\x20is\x20\x27balance\x27\x20(NOT\x20\x27amount\x27).\x20'+'The\x20token\x20type\x20and\x20precision\x20are\x20determined\x20by\x20the\x20Arbitration\x20object\x27s\x20type_parameter\x20(the\x20generic\x20type\x20set\x20when\x20the\x20Arbitration\x20was\x20created).\x20'+'For\x20WOW\x20(9\x20decimals):\x20{balance:\x2050000000}\x20=\x200.05\x20WOW.\x20'+'For\x20tokens\x20with\x20different\x20decimals,\x20adjust\x20accordingly\x20(e.g.\x20USDC\x20has\x206\x20decimals,\x20so\x20{balance:\x2050000}\x20=\x200.05\x20USDC).'),'namedArb':NamedObjectSchema['optional']()['describe']('RECOMMENDED:\x20Set\x20a\x20local\x20name\x20for\x20the\x20newly\x20created\x20Arb\x20(arbitration\x20case)\x20object.\x20'+'Without\x20this,\x20the\x20Arb\x20is\x20only\x20referenceable\x20by\x20its\x20on-chain\x20address.\x20'+'Example:\x20{name:\x20\x27my_dispute_v1\x27}\x20allows\x20subsequent\x20vote/feedback\x20operations\x20to\x20use\x20\x27my_dispute_v1\x27.')})['strict']();export const ConfirmSchema=z['object']({'arb':NameOrAddressSchema,'voting_deadline':z['union']([z['number']()['int']()['min'](0x0),z['null']()])['default'](0x0)['describe']('Voting\x20deadline\x20as\x20Unix\x20timestamp\x20in\x20MILLISECONDS\x20(ms).\x20SEMANTICS\x20OF\x20SPECIAL\x20VALUES:\x20'+'0\x20(DEFAULT\x20when\x20omitted)\x20=\x20deadline\x20already\x20passed\x20→\x20voting\x20is\x20IMPOSSIBLE\x20and\x20the\x20arbitrator\x20may\x20deliver\x20the\x20verdict\x20immediately\x20(direct-verdict\x20flow);\x20'+'null\x20=\x20open-ended\x20voting\x20with\x20no\x20deadline\x20(verdict\x20allowed\x20anytime);\x20'+'a\x20future\x20timestamp\x20=\x20normal\x20voting\x20window\x20(recommended:\x20now\x20+\x20at\x20least\x2086400000\x20ms\x20=\x2024\x20hours).\x20'+'COMMON\x20MISTAKE:\x20using\x20seconds\x20instead\x20of\x20milliseconds\x20(multiply\x20by\x201000).\x20'+'Example:\x20Date.now()\x20+\x20259200000\x20for\x203\x20days\x20from\x20now.')})['strict']();export const VotingDeadlineChangeSchema=z['object']({'arb':NameOrAddressSchema,'voting_deadline':z['union']([z['number'](),z['null']()])['describe']('New\x20voting\x20deadline\x20as\x20Unix\x20timestamp\x20in\x20MILLISECONDS\x20(ms).\x20SEMANTICS\x20OF\x20SPECIAL\x20VALUES:\x20'+'0\x20=\x20deadline\x20already\x20passed\x20→\x20voting\x20is\x20IMPOSSIBLE\x20and\x20the\x20arbitrator\x20may\x20deliver\x20the\x20verdict\x20immediately;\x20'+'null\x20=\x20open-ended\x20voting\x20with\x20no\x20deadline\x20(verdict\x20allowed\x20anytime);\x20'+'a\x20future\x20timestamp\x20=\x20normal\x20voting\x20window\x20(recommended:\x20now\x20+\x20at\x20least\x2086400000\x20ms\x20=\x2024\x20hours).\x20'+'COMMON\x20MISTAKE:\x20using\x20seconds\x20instead\x20of\x20milliseconds\x20(multiply\x20by\x201000).\x20'+'Example:\x20Date.now()\x20+\x20259200000\x20for\x203\x20days\x20from\x20now.')})['strict']();export const VoteSchema=z['object']({'arb':NameOrAddressSchema,'votes':z['array'](z['number']()['int']()['min'](0x0)['max'](0xff))['describe']('Proposition\x20INDICES\x20(0-based,\x20u8)\x20the\x20voter\x20agrees\x20with\x20—\x20e.g.\x20[0]\x20votes\x20for\x20the\x20first\x20proposition.\x20'+'Re-voting\x20REPLACES\x20the\x20voter\x27s\x20previous\x20vote\x20(old\x20weight\x20removed,\x20new\x20applied).\x20'+'Out-of-range\x20index\x20aborts\x20with\x20E_PROPOSITION_NOT_FOUND.'),'voting_guard':NameOrAddressSchema['optional']()['describe']('Optional\x20Voting\x20Guard\x20for\x20weighted\x20voting.\x20THREE\x20PATHS\x20are\x20supported\x20by\x20the\x20SDK\x20and\x20Move\x20contract:\x20'+'(1)\x20voting_guard\x20PROVIDED\x20→\x20vote_with_voting_guard\x20(Guard\x20verifies\x20voter\x20+\x20determines\x20vote\x20weight\x20via\x20VoteWeight\x20config);\x20'+'(2)\x20voting_guard\x20OMITTED\x20but\x20other\x20guards\x20trigger\x20passport\x20creation\x20(e.g.\x20env.permission_guard\x20or\x20usage_guard)\x20→\x20vote_with_passport\x20(permission-only\x20via\x20passport);\x20'+'(3)\x20voting_guard\x20OMITTED\x20and\x20no\x20passport\x20context\x20→\x20vote\x20(plain\x20permission-only\x20vote,\x20no\x20Guard).\x20'+'The\x20Guard\x20(when\x20provided)\x20must\x20be\x20in\x20the\x20Arbitration\x27s\x20voting_guard\x20list.')})['strict']();export const FeedbackSchema=z['object']({'arb':NameOrAddressSchema,'feedback':DescriptionSchema['describe']('Arbitration\x20feedback.')})['strict']();export const ArbitrationActionSchema=z['object']({'arb':NameOrAddressSchema,'feedback':DescriptionSchema['describe']('Arbitration\x20feedback.'),'indemnity':z['number']()['int']()['min'](0x0)})['strict']();export const ResetSchema=z['object']({'arb':NameOrAddressSchema,'feedback':DescriptionSchema['describe']('Arbitration\x20feedback.')})['strict']();export const ArbWithdrawSchema=z['object']({'arb':NameOrAddressSchema})['strict']();export const FeesTransferToSchema=z['union']([z['object']({'allocation':NameOrAddressSchema['describe']('Allocation\x20object\x20ID\x20or\x20name.')})['strict'](),z['object']({'treasury':NameOrAddressSchema['describe']('Treasury\x20object\x20ID\x20or\x20name.')})['strict']()]);export const FeesTransferSchema=z['object']({'to':FeesTransferToSchema['describe']('Transfer\x20arbitration\x20fees\x20to\x20the\x20specified\x20Allocation\x20object\x20or\x20Treasury\x20object.'),'payment_remark':NameSchema['describe']('Payment\x20remark.'),'payment_index':z['number']()['int']()['min'](0x0)['describe']('Payment\x20index.'),'newPayment':NamedObjectSchema['optional']()['describe']('Name\x20for\x20the\x20newly\x20created\x20payment\x20object.')})['strict']();export const VotingGuardActionSchema=z['discriminatedUnion']('op',[z['object']({'op':z['enum'](['add','set']),'guards':z['array'](VotingGuardSchema)})['strict'](),z['object']({'op':z['literal']('remove'),'guards':z['array'](NameOrAddressSchema)})['strict'](),z['object']({'op':z['literal']('clear')})['strict']()]);export const CallArbitration_DataSchema=z['object']({'object':TypedPermissionObjectSchema,'dispute':DisputeSchema['optional']()['describe']('Create\x20a\x20new\x20Arb\x20object\x20for\x20the\x20order.'),'description':DescriptionSchema['optional']()['describe']('Introduction\x20of\x20the\x20Arbitration\x20object.'),'location':LongNameSchema['optional']()['describe']('Arbitration\x20location.'),'fee':BalanceTypeSchema['optional']()['describe']('Arbitration\x20fee.'),'pause':z['boolean']()['optional']()['describe']('Whether\x20to\x20pause\x20arbitration.'),'confirm':ConfirmSchema['optional']()['describe']('Confirm\x20the\x20materials\x20submitted\x20by\x20the\x20user\x20for\x20arbitration.'),'voting_deadline_change':VotingDeadlineChangeSchema['optional']()['describe']('Change\x20the\x20voting\x20deadline.'),'vote':VoteSchema['optional']()['describe']('Vote\x20on\x20user\x20propositions.'),'feedback':FeedbackSchema['optional']()['describe']('Arbitration\x20feedback\x20for\x20the\x20Arb\x20object.'),'arbitration':ArbitrationActionSchema['optional']()['describe']('Provide\x20a\x20definitive\x20arbitration\x20result.'),'reset':ResetSchema['optional']()['describe']('User\x20applies\x20to\x20resubmit\x20materials\x20and\x20restart\x20arbitration.'),'arb_withdraw':ArbWithdrawSchema['optional']()['describe']('Withdraw\x20arbitration\x20fees\x20from\x20the\x20Arb\x20object.'),'fees_transfer':FeesTransferSchema['optional']()['describe']('Distribute\x20the\x20withdrawn\x20arbitration\x20fees.'),'usage_guard':z['union']([NameOrAddressSchema,z['null']()])['optional']()['describe']('Set\x20Guard\x20for\x20verification\x20when\x20users\x20apply\x20for\x20arbitration;\x20if\x20Guard\x20verification\x20fails,\x20users\x20will\x20not\x20be\x20able\x20to\x20apply\x20for\x20arbitration.'),'voting_guard':VotingGuardActionSchema['optional']()['describe']('Set\x20Guard\x20for\x20verification\x20during\x20arbitration\x20voting;\x20if\x20Guard\x20verification\x20fails,\x20arbitration\x20voting\x20will\x20fail.'),'owner_receive':ReceivedObjectsOrRecentlySchema['optional']()['describe']('Unwrap\x20CoinWrapper\x20objects\x20and\x20other\x20objects\x20received\x20by\x20this\x20Arbitration\x20object\x20and\x20send\x20them\x20to\x20the\x20owner\x20of\x20its\x20Permission\x20object.'+RECEIVE_FORMAT_BLOCK_OBJECTS),'um':z['union']([NameOrAddressSchema,z['null']()])['optional']()['describe']('Contact\x20object\x20ID\x20or\x20name.')})['strict']()['describe']('On-chain\x20Arbitration\x20operations.\x20USAGE:\x20(1)\x20CREATE\x20NEW:\x20Set\x20\x27object\x27\x20field\x20with\x20OBJECT\x20format\x20{name,\x20type_parameter,\x20permission,\x20...}\x20to\x20create\x20an\x20Arbitration.\x20NOTE:\x27name\x27\x20goes\x20INSIDE\x20\x27object\x27,\x20NOT\x20at\x20the\x20data\x20root\x20level.\x20\x27permission\x27\x20can\x20be\x20a\x20new\x20Permission\x20object\x20or\x20reference\x20an\x20existing\x20one\x20-\x20check\x20\x27object\x27\x20field\x20description\x20for\x20details.\x20⚠️\x20PERMISSION\x20RULE\x20(contract-enforced,\x20service.move\x20arbitration_add_imp):\x20the\x20Arbitration\x27s\x20permission\x20MUST\x20be\x20DIFFERENT\x20from\x20the\x20permission\x20of\x20any\x20Service\x20it\x20will\x20be\x20bound\x20to\x20—\x20binding\x20an\x20Arbitration\x20that\x20SHARES\x20the\x20Service\x27s\x20Permission\x20aborts\x20with\x20E_ARBITRATION_PERMISSION_CONFLICT\x20(error\x2033).\x20Always\x20create\x20a\x20DEDICATED\x20Permission\x20object\x20for\x20each\x20Arbitration.\x20(2)\x20OPERATE\x20EXISTING:\x20Set\x20\x27object\x27\x20field\x20with\x20STRING\x20format\x20(object\x20ID\x20or\x20name).\x20The\x20\x27object\x27\x20field\x20is\x20CRITICAL\x20and\x20REQUIRED\x20in\x20both\x20cases.\x20STRING\x20for\x20existing,\x20OBJECT\x20for\x20new\x20creation.');export const CallArbitration_InputSchema=z['object']({'data':CallArbitration_DataSchema,'env':CallEnvSchema['optional'](),'submission':SubmissionCallSchema['optional']()})['strict']();
|
|
@@ -76,6 +76,7 @@ export declare const CallEnvSchema: z.ZodObject<{
|
|
|
76
76
|
mainnet: ENTRYPOINT.Mainnet;
|
|
77
77
|
}>>;
|
|
78
78
|
referrer: z.ZodOptional<z.ZodString>;
|
|
79
|
+
no_auto_register: z.ZodOptional<z.ZodBoolean>;
|
|
79
80
|
confirmed: z.ZodOptional<z.ZodBoolean>;
|
|
80
81
|
user_intent_phrases: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
81
82
|
project: z.ZodOptional<z.ZodString>;
|
|
@@ -228,6 +229,8 @@ export declare const EventSemanticSchema: z.ZodObject<{
|
|
|
228
229
|
lifecycle: "lifecycle";
|
|
229
230
|
state_change: "state_change";
|
|
230
231
|
fund_flow: "fund_flow";
|
|
232
|
+
market_opportunity: "market_opportunity";
|
|
233
|
+
reputation: "reputation";
|
|
231
234
|
permission: "permission";
|
|
232
235
|
guard: "guard";
|
|
233
236
|
}>;
|
|
@@ -321,6 +324,7 @@ export declare const EvolutionContextSchema: z.ZodObject<{
|
|
|
321
324
|
role: z.ZodOptional<z.ZodEnum<{
|
|
322
325
|
merchant: "merchant";
|
|
323
326
|
customer: "customer";
|
|
327
|
+
demander: "demander";
|
|
324
328
|
prospect: "prospect";
|
|
325
329
|
supplier: "supplier";
|
|
326
330
|
collaborator: "collaborator";
|
|
@@ -666,6 +670,8 @@ export declare const SemanticSummarySchema: z.ZodObject<{
|
|
|
666
670
|
lifecycle: "lifecycle";
|
|
667
671
|
state_change: "state_change";
|
|
668
672
|
fund_flow: "fund_flow";
|
|
673
|
+
market_opportunity: "market_opportunity";
|
|
674
|
+
reputation: "reputation";
|
|
669
675
|
permission: "permission";
|
|
670
676
|
guard: "guard";
|
|
671
677
|
}>;
|
|
@@ -747,6 +753,7 @@ export declare const SemanticSummarySchema: z.ZodObject<{
|
|
|
747
753
|
role: z.ZodOptional<z.ZodEnum<{
|
|
748
754
|
merchant: "merchant";
|
|
749
755
|
customer: "customer";
|
|
756
|
+
demander: "demander";
|
|
750
757
|
prospect: "prospect";
|
|
751
758
|
supplier: "supplier";
|
|
752
759
|
collaborator: "collaborator";
|
|
@@ -929,6 +936,7 @@ export declare const CallResponseErrorSchema: z.ZodObject<{
|
|
|
929
936
|
signature_error: "signature_error";
|
|
930
937
|
config_error: "config_error";
|
|
931
938
|
wip_verification_failed: "wip_verification_failed";
|
|
939
|
+
time_lock_not_elapsed: "time_lock_not_elapsed";
|
|
932
940
|
}>>;
|
|
933
941
|
retryable: z.ZodOptional<z.ZodBoolean>;
|
|
934
942
|
recovery_hint: z.ZodOptional<z.ZodString>;
|
|
@@ -1495,6 +1503,7 @@ export declare const CallResultSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1495
1503
|
signature_error: "signature_error";
|
|
1496
1504
|
config_error: "config_error";
|
|
1497
1505
|
wip_verification_failed: "wip_verification_failed";
|
|
1506
|
+
time_lock_not_elapsed: "time_lock_not_elapsed";
|
|
1498
1507
|
}>>;
|
|
1499
1508
|
retryable: z.ZodOptional<z.ZodBoolean>;
|
|
1500
1509
|
recovery_hint: z.ZodOptional<z.ZodString>;
|
|
@@ -1654,6 +1663,7 @@ export declare const RecoveryActionSchema: z.ZodObject<{
|
|
|
1654
1663
|
adjust_params: "adjust_params";
|
|
1655
1664
|
escalate_human: "escalate_human";
|
|
1656
1665
|
stop: "stop";
|
|
1666
|
+
wait_and_retry: "wait_and_retry";
|
|
1657
1667
|
}>;
|
|
1658
1668
|
should_retry: z.ZodBoolean;
|
|
1659
1669
|
adjusted_params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
@@ -1700,6 +1710,7 @@ export declare const HarnessReportSchema: z.ZodObject<{
|
|
|
1700
1710
|
adjust_params: "adjust_params";
|
|
1701
1711
|
escalate_human: "escalate_human";
|
|
1702
1712
|
stop: "stop";
|
|
1713
|
+
wait_and_retry: "wait_and_retry";
|
|
1703
1714
|
}>;
|
|
1704
1715
|
should_retry: z.ZodBoolean;
|
|
1705
1716
|
adjusted_params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
@@ -2085,6 +2096,7 @@ export declare const CallOutputSchema: z.ZodObject<{
|
|
|
2085
2096
|
signature_error: "signature_error";
|
|
2086
2097
|
config_error: "config_error";
|
|
2087
2098
|
wip_verification_failed: "wip_verification_failed";
|
|
2099
|
+
time_lock_not_elapsed: "time_lock_not_elapsed";
|
|
2088
2100
|
}>>;
|
|
2089
2101
|
retryable: z.ZodOptional<z.ZodBoolean>;
|
|
2090
2102
|
recovery_hint: z.ZodOptional<z.ZodString>;
|
|
@@ -2298,6 +2310,8 @@ export declare const CallOutputSchema: z.ZodObject<{
|
|
|
2298
2310
|
lifecycle: "lifecycle";
|
|
2299
2311
|
state_change: "state_change";
|
|
2300
2312
|
fund_flow: "fund_flow";
|
|
2313
|
+
market_opportunity: "market_opportunity";
|
|
2314
|
+
reputation: "reputation";
|
|
2301
2315
|
permission: "permission";
|
|
2302
2316
|
guard: "guard";
|
|
2303
2317
|
}>;
|
|
@@ -2379,6 +2393,7 @@ export declare const CallOutputSchema: z.ZodObject<{
|
|
|
2379
2393
|
role: z.ZodOptional<z.ZodEnum<{
|
|
2380
2394
|
merchant: "merchant";
|
|
2381
2395
|
customer: "customer";
|
|
2396
|
+
demander: "demander";
|
|
2382
2397
|
prospect: "prospect";
|
|
2383
2398
|
supplier: "supplier";
|
|
2384
2399
|
collaborator: "collaborator";
|
|
@@ -2580,6 +2595,7 @@ export declare const CallOutputSchema: z.ZodObject<{
|
|
|
2580
2595
|
adjust_params: "adjust_params";
|
|
2581
2596
|
escalate_human: "escalate_human";
|
|
2582
2597
|
stop: "stop";
|
|
2598
|
+
wait_and_retry: "wait_and_retry";
|
|
2583
2599
|
}>;
|
|
2584
2600
|
should_retry: z.ZodBoolean;
|
|
2585
2601
|
adjusted_params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|