@wowok/agent-mcp 3.1.4 → 3.1.6
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/evaluation/arbitration-game.js +1 -1
- package/dist/evaluation/builtins/graph-service.js +1 -1
- package/dist/graph/onchain/analyze.js +1 -1
- package/dist/graph/onchain/analyze.spec.js +1 -1
- package/dist/graph/onchain/extract.js +1 -1
- package/dist/graph/onchain/facts.d.ts +1 -0
- package/dist/graph/onchain/facts.js +1 -1
- package/dist/graph/onchain/fixtures.js +1 -1
- package/dist/graph/onchain/onchain.spec.js +1 -1
- package/dist/graph/onchain/strategy.js +1 -1
- package/dist/graph/onchain/strategy.spec.js +1 -1
- package/dist/harness/recover.js +1 -1
- package/dist/knowledge/alloc-audit-policy.spec.js +1 -1
- package/dist/knowledge/allocation-risk.js +1 -1
- package/dist/knowledge/arbitration-ledger.js +1 -1
- package/dist/knowledge/audit-rules.d.ts +1 -0
- package/dist/knowledge/audit-rules.js +1 -1
- package/dist/knowledge/baselines/rules/alloc_audit.json +20 -0
- package/dist/knowledge/baselines/rules/allocation.json +1 -19
- package/dist/knowledge/baselines/rules/arb.json +1 -1
- package/dist/knowledge/baselines/rules/guard.json +8 -8
- package/dist/knowledge/fund-layer.js +1 -1
- package/dist/knowledge/guard-design-patterns.d.ts +2 -1
- package/dist/knowledge/guard-design-patterns.js +1 -1
- package/dist/knowledge/guard-design-patterns.spec.d.ts +1 -0
- package/dist/knowledge/guard-design-patterns.spec.js +1 -0
- package/dist/knowledge/guard-lint.d.ts +1 -1
- package/dist/knowledge/guard-lint.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-translation.js +1 -1
- 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/permission-ledger.js +1 -1
- package/dist/knowledge/recipient-constraint.js +1 -1
- package/dist/knowledge/safety-rules.extract-amount.spec.d.ts +1 -0
- package/dist/knowledge/safety-rules.extract-amount.spec.js +1 -0
- package/dist/knowledge/safety-rules.js +1 -1
- package/dist/knowledge/service-ledger.js +1 -1
- package/dist/knowledge/template-registry.js +1 -1
- package/dist/knowledge/template-scanner.js +1 -1
- package/dist/knowledge/tool-constraints.js +1 -1
- package/dist/knowledge/tools-reference.js +1 -1
- package/dist/knowledge/workflow-guidance.js +1 -1
- package/dist/monitor/MonitorLoop.js +1 -1
- package/dist/playbooks/service-build/business-puzzle.js +1 -1
- package/dist/playbooks/service-build/pipeline-actions.d.ts +1 -1
- package/dist/playbooks/service-build/pipeline-actions.js +1 -1
- package/dist/playbooks/service-build/risk-aggregator.js +1 -1
- package/dist/role/derivation.d.ts +1 -1
- package/dist/role/derivation.js +1 -1
- package/dist/safety/confirm-gate.js +1 -1
- package/dist/schema/call/allocation.d.ts +7 -0
- 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 +48 -0
- package/dist/schema/call/base.js +1 -1
- package/dist/schema/call/bridge.d.ts +26 -0
- package/dist/schema/call/contact.d.ts +4 -0
- package/dist/schema/call/demand.d.ts +4 -0
- package/dist/schema/call/error-codes.d.ts +1 -1
- package/dist/schema/call/error-codes.js +1 -1
- package/dist/schema/call/guard.d.ts +12 -0
- package/dist/schema/call/handler.js +1 -1
- package/dist/schema/call/machine.d.ts +8 -0
- package/dist/schema/call/order.d.ts +4 -0
- package/dist/schema/call/order.js +1 -1
- package/dist/schema/call/payment.d.ts +4 -0
- 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/proof.d.ts +8 -0
- package/dist/schema/call/repository.d.ts +4 -0
- package/dist/schema/call/repository.js +1 -1
- package/dist/schema/call/reward.d.ts +4 -0
- package/dist/schema/call/semantic-customer-advice.spec.js +1 -1
- package/dist/schema/call/semantic.d.ts +11 -0
- package/dist/schema/call/semantic.js +1 -1
- package/dist/schema/call/service.d.ts +14 -0
- package/dist/schema/call/service.js +1 -1
- package/dist/schema/call/treasury.d.ts +4 -0
- package/dist/schema/common/index.js +1 -1
- package/dist/schema/keeper/index.d.ts +5 -0
- package/dist/schema/local/index.d.ts +28 -0
- package/dist/schema/local/index.js +1 -1
- package/dist/schema/messenger/index.d.ts +5 -0
- package/dist/schema/messenger/index.js +1 -1
- package/dist/schema/operations.d.ts +83 -0
- package/dist/schema/query/bi.js +1 -1
- package/dist/schema/query/index.d.ts +16 -0
- package/dist/schema/query/index.js +1 -1
- package/dist/schema/schema-version.js +1 -1
- package/dist/schema/workflow/index.d.ts +2 -0
- package/dist/schema/workflow/index.js +1 -1
- package/dist/schema/workspace/index.d.ts +53 -0
- package/dist/schema/workspace/index.js +1 -1
- package/dist/schema-query-impl/index.js +1 -1
- package/dist/schemas/account_operation.output.json +25 -1
- package/dist/schemas/bridge_operation.output.json +25 -1
- package/dist/schemas/bridge_operation.schema.json +40 -0
- package/dist/schemas/guard2file.schema.json +8 -0
- package/dist/schemas/index.json +1 -1
- package/dist/schemas/keeper_operation.output.json +24 -1
- package/dist/schemas/local_history_operation.output.json +25 -1
- package/dist/schemas/local_info_operation.output.json +25 -1
- package/dist/schemas/local_mark_operation.output.json +25 -1
- package/dist/schemas/machineNode2file.schema.json +8 -0
- package/dist/schemas/messenger_operation.output.json +24 -1
- package/dist/schemas/messenger_operation.schema.json +2 -2
- package/dist/schemas/monitor_events.output.json +24 -1
- package/dist/schemas/monitor_subscription.output.json +24 -1
- package/dist/schemas/onchain_events.output.json +24 -1
- package/dist/schemas/onchain_operations.output.json +73 -3
- package/dist/schemas/onchain_operations.schema.json +3286 -821
- package/dist/schemas/onchain_operations_allocation.schema.json +12 -0
- package/dist/schemas/onchain_operations_arbitration.schema.json +18 -10
- 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 +2896 -596
- package/dist/schemas/onchain_operations_machine.schema.json +8 -0
- package/dist/schemas/onchain_operations_order.schema.json +10 -2
- package/dist/schemas/onchain_operations_payment.schema.json +8 -0
- 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 +8 -0
- package/dist/schemas/onchain_operations_proof.schema.json +8 -0
- package/dist/schemas/onchain_operations_repository.schema.json +14 -6
- package/dist/schemas/onchain_operations_reward.schema.json +8 -0
- package/dist/schemas/onchain_operations_service.schema.json +43 -10
- package/dist/schemas/onchain_operations_treasury.schema.json +8 -0
- package/dist/schemas/onchain_table_data.output.json +35 -12
- package/dist/schemas/query_toolkit.output.json +1179 -10
- package/dist/schemas/query_toolkit.schema.json +11 -11
- package/dist/schemas/workflow_operation.schema.json +8 -0
- package/dist/schemas/workspace_operation.output.json +181 -1
- package/dist/schemas/workspace_operation.schema.json +61 -2
- package/dist/tools/handlers/config.js +1 -1
- package/dist/tools/handlers/dispatch-expectations.js +1 -1
- package/dist/tools/handlers/dispatch-expectations.spec.d.ts +1 -0
- package/dist/tools/handlers/dispatch-expectations.spec.js +1 -0
- package/dist/tools/handlers/onchain.js +1 -1
- package/dist/tools/handlers/workflow.js +1 -1
- package/dist/tools/handlers/workspace.js +1 -1
- package/dist/tools/index.js +1 -1
- package/dist/tools/move-fn-index.gen.js +1 -1
- package/dist/tools/registry/business.js +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
import{analyzeBusinessIntent}from'./business-puzzle.js';import{Config}from'@wowok/wowok/w/local';import{aggregateProjectRisks}from'./risk-aggregator.js';import{traceSubsteps}from'../../task/substep-trace.js';import{updateStageCache}from'./index.js';import{checkObjectReuseRules,checkImmutabilityRules}from'../../knowledge/safety-rules.js';export function handleAnalyzeIntent(a){const b=(a['intent']??a['project_description']??a['project_name']??'')['trim']();if(!b)throw new Error('analyze_intent\x20requires\x20\x27intent\x27\x20(business\x20description\x20text).\x20'+'Example:\x20intent=\x27I\x20want\x20to\x20open\x20an\x20online\x20toy\x20store\x20with\x20escrow\x20and\x20dispute\x20resolution\x27.');const c=analyzeBusinessIntent({'user_intent':b,'project_name':a['project_name'],'target_objects':a['target_objects'],'industry':a['project_industry']}),d=(a['project']??'')['trim']();return d&&updateStageCache(d,(a['version']??'v1')['trim'](),{'stage':'puzzle','puzzles':c['puzzles'],'business_intent':b,'industry':c['intent_parsed']['industry']}),{'action':'analyze_intent',...c};}export async function handleAggregateRisks(a){const b=(a['project']??'')['trim']();if(!b)throw new Error('aggregate_risks\x20requires\x20\x27project\x27\x20(project\x20prefix,\x20e.g.\x20\x27myshop\x27).\x20'+'Use\x20one\x20stable\x20prefix\x20per\x20build\x20so\x20findings\x20map\x20to\x20the\x20service-build\x20stage\x20cache\x20namespace.');const c=(a['version']??'v1')['trim']();let d,e;if(a['puzzles'])d=Object['fromEntries'](Object['entries'](a['puzzles'])['map'](([h,i])=>[h,{'puzzle':i['puzzle'],'completeness':i['completeness'],'missing_dimensions':i['missing_dimensions']}]));else{const h=(a['intent']??a['project_description']??a['project_name']??'')['trim']();if(!h)throw new Error('aggregate_risks\x20requires\x20\x27puzzles\x27\x20(from\x20a\x20prior\x20analyze_intent\x20result)\x20'+'OR\x20\x27intent\x27\x20(business\x20description\x20—\x20analyze_intent\x20runs\x20automatically\x20first).');const i=analyzeBusinessIntent({'user_intent':h,'project_name':a['project_name'],'industry':a['project_industry']});d=i['puzzles'],e={'primary_object':i['intent_parsed']['primary_object'],'industry':i['intent_parsed']['industry'],'overall_completeness':i['overall_completeness']};}const f=await aggregateProjectRisks({'project_prefix':b,'version':c,'industry':a['project_industry'],'puzzles':d,'severity_threshold':a['severity_threshold'],'user_confirmed_high_risks':a['user_confirmed_high_risks']}),g=[...a['planned_objects']?checkObjectReuseRules(a['planned_objects']):[],...a['planned_operations']?checkImmutabilityRules(a['planned_operations']):[]];return updateStageCache(b,c,{'stage':'risk','risk_status':f['status'],'risk_can_proceed':f['status']==='RISK_PASSED'}),{'action':'aggregate_risks',...f,...g['length']>0x0?{'safety_findings':g}:{},...e?{'intent_echo':e}:{}};}export async function handleTraceSubsteps(a){const b=(a['project']??'')['trim']();if(!b)throw new Error('trace_substeps\x20requires\x20\x27project\x27\x20(project\x20prefix,\x20e.g.\x20\x27myshop\x27).');if(!a['substeps']||a['substeps']['length']===0x0)throw new Error('trace_substeps\x20requires\x20\x27substeps\x27\x20(non-empty\x20array\x20of\x20substep\x20execution\x20records,\x20'+'63-spec\x20§2.1).\x20Construct\x20them\x20from\x20your\x20deployment\x20execution\x20trace:\x20each\x20onchain_operations\x20'+'call\x20=\x20one\x20substep\x20with\x20step_id\x20\x27T<step>.<substep>\x27,\x20input_refs\x20pointing\x20at\x20upstream\x20substeps.');const c=traceSubsteps({'project_prefix':b,'version':(a['version']??'v1')['trim'](),'network':a['network']??await Config['Instance']()['network_get'](),'substeps':a['substeps'],'edges':a['substep_edges']});return updateStageCache(b,(a['version']??'v1')['trim'](),{'stage':'substeps','trace_coherent':c['coherent'],'trace_can_proceed':c['coherent']}),{'action':'trace_substeps',...c};}
|
|
1
|
+
import{analyzeBusinessIntent}from'./business-puzzle.js';import{Config}from'@wowok/wowok/w/local';import{aggregateProjectRisks}from'./risk-aggregator.js';import{traceSubsteps}from'../../task/substep-trace.js';import{updateStageCache}from'./index.js';import{checkObjectReuseRules,checkImmutabilityRules}from'../../knowledge/safety-rules.js';export function handleAnalyzeIntent(a){const b=(a['intent']??a['project_description']??a['project_name']??'')['trim']();if(!b)throw new Error('analyze_intent\x20requires\x20\x27intent\x27\x20(business\x20description\x20text).\x20'+'Example:\x20intent=\x27I\x20want\x20to\x20open\x20an\x20online\x20toy\x20store\x20with\x20escrow\x20and\x20dispute\x20resolution\x27.');const c=analyzeBusinessIntent({'user_intent':b,'project_name':a['project_name'],'target_objects':a['target_objects'],'industry':a['project_industry']}),d=(a['project']??'')['trim']();return d&&updateStageCache(d,(a['version']??'v1')['trim'](),{'stage':'puzzle','puzzles':c['puzzles'],'business_intent':b,'industry':c['intent_parsed']['industry']}),{'action':'analyze_intent',...c};}export async function handleAggregateRisks(a){const b=(a['project']??'')['trim']();if(!b)throw new Error('aggregate_risks\x20requires\x20\x27project\x27\x20(project\x20prefix,\x20e.g.\x20\x27myshop\x27).\x20'+'Use\x20one\x20stable\x20prefix\x20per\x20build\x20so\x20findings\x20map\x20to\x20the\x20service-build\x20stage\x20cache\x20namespace.');const c=(a['version']??'v1')['trim']();let d,e;if(a['puzzles'])d=Object['fromEntries'](Object['entries'](a['puzzles'])['map'](([h,i])=>[h,{'puzzle':i['puzzle'],'completeness':i['completeness'],'missing_dimensions':i['missing_dimensions']}]));else{const h=(a['intent']??a['project_description']??a['project_name']??'')['trim']();if(!h)throw new Error('aggregate_risks\x20requires\x20\x27puzzles\x27\x20(from\x20a\x20prior\x20analyze_intent\x20result)\x20'+'OR\x20\x27intent\x27\x20(business\x20description\x20—\x20analyze_intent\x20runs\x20automatically\x20first).');const i=analyzeBusinessIntent({'user_intent':h,'project_name':a['project_name'],'industry':a['project_industry']});d=i['puzzles'],e={'primary_object':i['intent_parsed']['primary_object'],'industry':i['intent_parsed']['industry'],'overall_completeness':i['overall_completeness']};}const f=await aggregateProjectRisks({'project_prefix':b,'version':c,'industry':a['project_industry'],'puzzles':d,'severity_threshold':a['severity_threshold'],'user_confirmed_high_risks':a['user_confirmed_high_risks']}),g=[...a['planned_objects']?checkObjectReuseRules(a['planned_objects']):[],...a['planned_operations']?checkImmutabilityRules(a['planned_operations']):[]];return updateStageCache(b,c,{'stage':'risk','risk_status':f['status'],'risk_can_proceed':f['status']==='RISK_PASSED'}),{'action':'aggregate_risks',...f,'warnings':[...f['warnings'],'No\x20on-chain\x20objects\x20were\x20inspected\x20by\x20this\x20risk\x20aggregation\x20—\x20findings\x20derive\x20from\x20puzzle\x20snapshots\x20and\x20planned\x20objects/operations\x20only.\x20For\x20object-grounded\x20checks,\x20run\x20onchain_topology\x20(query_toolkit)\x20or\x20watch\x20the\x20deployed\x20objects.'],...g['length']>0x0?{'safety_findings':g}:{},...e?{'intent_echo':e}:{}};}export async function handleTraceSubsteps(a){const b=(a['project']??'')['trim']();if(!b)throw new Error('trace_substeps\x20requires\x20\x27project\x27\x20(project\x20prefix,\x20e.g.\x20\x27myshop\x27).');if(!a['substeps']||a['substeps']['length']===0x0)throw new Error('trace_substeps\x20requires\x20\x27substeps\x27\x20(non-empty\x20array\x20of\x20substep\x20execution\x20records,\x20'+'63-spec\x20§2.1).\x20Construct\x20them\x20from\x20your\x20deployment\x20execution\x20trace:\x20each\x20onchain_operations\x20'+'call\x20=\x20one\x20substep\x20with\x20step_id\x20\x27T<step>.<substep>\x27,\x20input_refs\x20pointing\x20at\x20upstream\x20substeps.');const c=traceSubsteps({'project_prefix':b,'version':(a['version']??'v1')['trim'](),'network':a['network']??await Config['Instance']()['network_get'](),'substeps':a['substeps'],'edges':a['substep_edges']});return updateStageCache(b,(a['version']??'v1')['trim'](),{'stage':'substeps','trace_coherent':c['coherent'],'trace_can_proceed':c['coherent']}),{'action':'trace_substeps',...c};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ENTRYPOINT}from'@wowok/wowok';import{buildProposalGraph,buildViewport,runNodeAnalyzers}from'../../graph/onchain/index.js';import{RULE_NODE_ANALYZERS}from'../../knowledge/rule-node-analyzers.js';import{normalizeSeverity}from'../../config/severity.js';const SEVERITY_ORDER={'critical':0x0,'high':0x1,'medium':0x2,'low':0x3,'info':0x4},ALL_SEVERITIES=['critical','high','medium','low','info'];function findingToAggregatedRisk(a,b,c){const d=a['ruleId']??'?',e='\x20('+d+')',g=a['title']['endsWith'](e)?a['title']['slice'](0x0,a['title']['length']-e['length']):a['title'];return{'risk_rule_id':d,'object_type':b,'entry_id':c,'severity':normalizeSeverity(a['severity']),'message':g,'fix_suggestion':a['suggestion']??'','details':{...a['evidence']?{'field_path':a['evidence']}:{},'rule_source':a['id']['slice'](0x0,a['id']['indexOf'](':')),'proposal_node':a['path'][0x0]}};}export async function aggregateProjectRisks(a){const b=[];(!a||!a['project_prefix'])&&b['push']('input.project_prefix\x20is\x20empty');const c=a?.['puzzles']??{},d=await buildProposalGraph(c,{'network':ENTRYPOINT['Testnet']});for(const o of d['nodes']['values']()){o['proposal']&&!o['objectType']&&b['push']('No\x20analyzer\x20vocabulary\x20for\x20puzzle\x20key\x20\x27'+o['proposal']['sourceKey']+'\x27\x20—\x20key\x20skipped');}const e=buildViewport(d,d['seed'],'neutral'),g=runNodeAnalyzers(e,RULE_NODE_ANALYZERS),h=[];for(const p of g){if(p['ruleId']==null)continue;const q=p['path'][0x0]??'',r=d['nodes']['get'](q),s=r?.['proposal']?.['sourceKey']??q['replace'](/^proposal::/,'');h['push'](findingToAggregatedRisk(p,s,(a['project_prefix']??'project')+'_'+s));}sortFindings(h);const i=countBySeverity(h),j=a['severity_threshold']??'high',k=determineStatus(i,j,a['user_confirmed_high_risks']??[],h);let l;k==='RISK_PENDING_CONFIRM'&&(l=h['filter'](t=>t['severity']==='high')['filter'](t=>!(a['user_confirmed_high_risks']??[])['includes'](t['risk_rule_id']))['map'](t=>({'risk_rule_id':t['risk_rule_id'],'description':t['message'],'fix_suggestion':t['fix_suggestion'],'object_type':t['object_type'],'entry_id':t['entry_id']})));const m={};for(const t of h){const u=t['object_type'];!m[u]&&(m[u]=[]),m[u]['push']({'risk_rule_id':t['risk_rule_id'],'severity':t['severity'],'message':t['message'],'fix_suggestion':t['fix_suggestion'],'entry_id':t['entry_id']});}return{'namespace':{'prefix':a['project_prefix']??'','version':a['version']??'','industry':a['industry']??'general'},'findings':h,'severity_summary':i,'status':k,'pending_confirmations':l,'calibrated_at':Date['now'](),'fix_suggestions_grouped':m,'warnings':b};}export function sortFindings(a){return a['sort']((c,d)=>{const e=SEVERITY_ORDER[c['severity']]-SEVERITY_ORDER[d['severity']];if(e!==0x0)return e;if(c['object_type']!==d['object_type'])return c['object_type']['localeCompare'](d['object_type']);return c['risk_rule_id']['localeCompare'](d['risk_rule_id']);});}export function countBySeverity(a){const b={'critical':0x0,'high':0x0,'medium':0x0,'low':0x0,'info':0x0};for(const c of a){b[c['severity']]++;}return b;}export function determineStatus(a,b,c,d){if(a['critical']>0x0)return'RISK_BLOCKED';const e=SEVERITY_ORDER[b];if(a['high']>0x0&&
|
|
1
|
+
import{ENTRYPOINT}from'@wowok/wowok';import{buildProposalGraph,buildViewport,runNodeAnalyzers}from'../../graph/onchain/index.js';import{RULE_NODE_ANALYZERS}from'../../knowledge/rule-node-analyzers.js';import{normalizeSeverity}from'../../config/severity.js';const SEVERITY_ORDER={'critical':0x0,'high':0x1,'medium':0x2,'low':0x3,'info':0x4},ALL_SEVERITIES=['critical','high','medium','low','info'];function findingToAggregatedRisk(a,b,c){const d=a['ruleId']??'?',e='\x20('+d+')',g=a['title']['endsWith'](e)?a['title']['slice'](0x0,a['title']['length']-e['length']):a['title'];return{'risk_rule_id':d,'object_type':b,'entry_id':c,'severity':normalizeSeverity(a['severity']),'message':g,'fix_suggestion':a['suggestion']??'','details':{...a['evidence']?{'field_path':a['evidence']}:{},'rule_source':a['id']['slice'](0x0,a['id']['indexOf'](':')),'proposal_node':a['path'][0x0]}};}export async function aggregateProjectRisks(a){const b=[];(!a||!a['project_prefix'])&&b['push']('input.project_prefix\x20is\x20empty');const c=a?.['puzzles']??{},d=await buildProposalGraph(c,{'network':ENTRYPOINT['Testnet']});for(const o of d['nodes']['values']()){o['proposal']&&!o['objectType']&&b['push']('No\x20analyzer\x20vocabulary\x20for\x20puzzle\x20key\x20\x27'+o['proposal']['sourceKey']+'\x27\x20—\x20key\x20skipped');}const e=buildViewport(d,d['seed'],'neutral'),g=runNodeAnalyzers(e,RULE_NODE_ANALYZERS),h=[];for(const p of g){if(p['ruleId']==null)continue;const q=p['path'][0x0]??'',r=d['nodes']['get'](q),s=r?.['proposal']?.['sourceKey']??q['replace'](/^proposal::/,'');h['push'](findingToAggregatedRisk(p,s,(a['project_prefix']??'project')+'_'+s));}sortFindings(h);const i=countBySeverity(h),j=a['severity_threshold']??'high',k=determineStatus(i,j,a['user_confirmed_high_risks']??[],h);let l;k==='RISK_PENDING_CONFIRM'&&(l=h['filter'](t=>t['severity']==='high')['filter'](t=>!(a['user_confirmed_high_risks']??[])['includes'](t['risk_rule_id']))['map'](t=>({'risk_rule_id':t['risk_rule_id'],'description':t['message'],'fix_suggestion':t['fix_suggestion'],'object_type':t['object_type'],'entry_id':t['entry_id']})));const m={};for(const t of h){const u=t['object_type'];!m[u]&&(m[u]=[]),m[u]['push']({'risk_rule_id':t['risk_rule_id'],'severity':t['severity'],'message':t['message'],'fix_suggestion':t['fix_suggestion'],'entry_id':t['entry_id']});}return{'namespace':{'prefix':a['project_prefix']??'','version':a['version']??'','industry':a['industry']??'general'},'findings':h,'severity_summary':i,'status':k,'pending_confirmations':l,'calibrated_at':Date['now'](),'fix_suggestions_grouped':m,'warnings':b};}export function sortFindings(a){return a['sort']((c,d)=>{const e=SEVERITY_ORDER[c['severity']]-SEVERITY_ORDER[d['severity']];if(e!==0x0)return e;if(c['object_type']!==d['object_type'])return c['object_type']['localeCompare'](d['object_type']);return c['risk_rule_id']['localeCompare'](d['risk_rule_id']);});}export function countBySeverity(a){const b={'critical':0x0,'high':0x0,'medium':0x0,'low':0x0,'info':0x0};for(const c of a){b[c['severity']]++;}return b;}export function determineStatus(a,b,c,d){if(a['critical']>0x0)return'RISK_BLOCKED';const e=SEVERITY_ORDER[b],f=g=>SEVERITY_ORDER[g]<=e;if(a['high']>0x0&&f('high')){const g=d['filter'](h=>h['severity']==='high'&&!c['includes'](h['risk_rule_id']));if(g['length']>0x0)return'RISK_PENDING_CONFIRM';}if(a['medium']>0x0&&f('medium'))return'RISK_BLOCKED';if(a['low']>0x0&&f('low'))return'RISK_BLOCKED';return'RISK_PASSED';}export function getCriticalRisks(a){if(!a?.['findings'])return[];return a['findings']['filter'](b=>b['severity']==='critical');}export function summarizeRiskReport(a){if(!a)return'(no\x20result)';const b=[];b['push']('#\x20Risk\x20Aggregation\x20Report'),b['push'](''),b['push']('-\x20Project:\x20'+a['namespace']['prefix']+'_'+a['namespace']['version']),b['push']('-\x20Status:\x20'+a['status']),b['push']('-\x20Calibrated\x20at:\x20'+new Date(a['calibrated_at'])['toISOString']()),b['push'](''),b['push']('##\x20Severity\x20Summary'),b['push'](''),b['push']('|\x20Severity\x20|\x20Count\x20|'),b['push']('|----------|-------|');for(const c of ALL_SEVERITIES){b['push']('|\x20'+c+'\x20|\x20'+(a['severity_summary'][c]??0x0)+'\x20|');}b['push']('');if(a['findings']['length']===0x0)return b['push']('No\x20risks\x20found.'),b['join']('\x0a');b['push']('##\x20Findings\x20(sorted\x20by\x20severity)'),b['push']('');for(const d of a['findings']){b['push']('-\x20**['+d['severity']+']\x20'+d['risk_rule_id']+'**\x20('+d['object_type']+'\x20/\x20'+d['entry_id']+')'),b['push']('\x20\x20-\x20'+d['message']),d['fix_suggestion']&&b['push']('\x20\x20-\x20Fix:\x20'+d['fix_suggestion']),d['details']?.['proposal_node']&&b['push']('\x20\x20-\x20Evaluated\x20on\x20'+d['details']['proposal_node']+'\x20via\x20'+(d['details']['rule_source']??'unknown\x20analyzer'));}if(a['warnings']['length']>0x0){b['push'](''),b['push']('##\x20Warnings');for(const e of a['warnings'])b['push']('-\x20'+e);}return b['join']('\x0a');}
|
package/dist/role/derivation.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const PERMISSION_RANGES={'service':{'min':0x12c,'max':
|
|
1
|
+
export const PERMISSION_RANGES={'service':{'min':0x12c,'max':0x141},'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']);}
|
|
@@ -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 a346a}from'../config/index.js';import{isPlanPreapproved}from'../goal/plan-approval.js';export function isConfirmGateEnabled(){return a346a('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(a,b,c){const d=b instanceof Error?b['message']:b!==undefined?String(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'};}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(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']===!![];}
|
|
@@ -45,6 +45,7 @@ export declare const CallAllocation_CreateSchema: z.ZodObject<{
|
|
|
45
45
|
remark: z.ZodString;
|
|
46
46
|
index: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
|
|
47
47
|
}, z.core.$strip>;
|
|
48
|
+
allow_unanchored: z.ZodOptional<z.ZodBoolean>;
|
|
48
49
|
}, z.core.$strict>;
|
|
49
50
|
export declare const CallAllocation_OperateSchema: z.ZodObject<{
|
|
50
51
|
object: z.ZodString;
|
|
@@ -108,6 +109,7 @@ export declare const CallAllocation_DataSchema: z.ZodUnion<readonly [z.ZodObject
|
|
|
108
109
|
remark: z.ZodString;
|
|
109
110
|
index: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
|
|
110
111
|
}, z.core.$strip>;
|
|
112
|
+
allow_unanchored: z.ZodOptional<z.ZodBoolean>;
|
|
111
113
|
}, z.core.$strict>, z.ZodObject<{
|
|
112
114
|
object: z.ZodString;
|
|
113
115
|
received_coins: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
@@ -171,6 +173,7 @@ export declare const CallAllocation_InputSchema: z.ZodObject<{
|
|
|
171
173
|
remark: z.ZodString;
|
|
172
174
|
index: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
|
|
173
175
|
}, z.core.$strip>;
|
|
176
|
+
allow_unanchored: z.ZodOptional<z.ZodBoolean>;
|
|
174
177
|
}, z.core.$strict>, z.ZodObject<{
|
|
175
178
|
object: z.ZodString;
|
|
176
179
|
received_coins: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
@@ -204,6 +207,10 @@ export declare const CallAllocation_InputSchema: z.ZodObject<{
|
|
|
204
207
|
client_schema_version: z.ZodOptional<z.ZodString>;
|
|
205
208
|
schema_strict_mode: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
206
209
|
dry_run: z.ZodOptional<z.ZodBoolean>;
|
|
210
|
+
response_level: z.ZodOptional<z.ZodEnum<{
|
|
211
|
+
compact: "compact";
|
|
212
|
+
full: "full";
|
|
213
|
+
}>>;
|
|
207
214
|
confirm_mode: z.ZodOptional<z.ZodEnum<{
|
|
208
215
|
full: "full";
|
|
209
216
|
streamlined: "streamlined";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{z}from'zod';import{CoinParamSchema,CallEnvSchema,SubmissionCallSchema,TypeNamedObjectSchema}from'./base.js';import{AllocatorsSchema,PaymentInfoSchema}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})['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 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.')})['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}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 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.')})['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
|
+
response_level: z.ZodOptional<z.ZodEnum<{
|
|
343
|
+
compact: "compact";
|
|
344
|
+
full: "full";
|
|
345
|
+
}>>;
|
|
342
346
|
confirm_mode: z.ZodOptional<z.ZodEnum<{
|
|
343
347
|
full: "full";
|
|
344
348
|
streamlined: "streamlined";
|
|
@@ -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.\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→\x20Guard-weighted\x20vote\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→\x20permission-only\x20vote\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):\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).\x20'+'docs#45:\x20the\x20fee\x20does\x20NOT\x20return\x20to\x20the\x20filer\x20on\x20a\x20win\x20—\x20it\x20stays\x20in\x20the\x20Arbitration\x20object\x20and\x20is\x20withdrawable\x20by\x20the\x20arbitrator.'),'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→\x20Guard-weighted\x20vote\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→\x20permission-only\x20vote\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.\x20NOTE:\x20the\x20transferred\x20funds\x20arrive\x20as\x20a\x20CoinWrapper\x20owned\x20by\x20the\x20Treasury\x20and\x20only\x20count\x20'+'after\x20the\x20Treasury\x20intakes\x20them\x20—\x20call\x20treasury\x20receive:\x20\x22recently\x22\x20(requires\x20permission\x20253\x20TREASURY_RECEIVE\x20on\x20the\x20Treasury).')})['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;\x20the\x20case\x20lands\x20directly\x20in\x20state\x201\x20(Arbitrator_confirming)\x20—\x20the\x20customer\x20does\x20not\x20confirm\x20at\x20filing\x20time.'),'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']('ARBITRATOR-side\x20material\x20confirmation\x20(from\x20state\x201):\x20moves\x20the\x20case\x20to\x20state\x202\x20(Voting).\x20'+'Customers\x20cannot\x20call\x20this\x20—\x20the\x20customer-side\x20step\x20is\x20order.arb_confirm\x20(state\x200\x20to\x201).'),'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']('ARBITRATOR-side\x20reset\x20(arbitration\x20permission\x20holder;\x20valid\x20from\x20state\x204\x20Objectionable\x20or\x20state\x201):\x20voids\x20the\x20ruling,\x20'+'clears\x20the\x20indemnity\x20and\x20returns\x20the\x20case\x20to\x20state\x200\x20(Principal_confirming).\x20After\x20a\x20reset\x20ONLY\x20the\x20customer\x20can\x20advance\x20the\x20case\x20'+'again\x20via\x20order.arb_confirm\x20—\x20state\x200\x20has\x20no\x20timeout\x20and\x20the\x20fee\x20stays\x20locked\x20until\x20the\x20customer\x20re-confirms.'),'arb_withdraw':ArbWithdrawSchema['optional']()['describe']('Withdraw\x20arbitration\x20fees\x20from\x20the\x20Arb\x20object\x20(arbitrator).\x20Immediately\x20from\x20state\x205\x20(Finished);\x20from\x20state\x203\x20only\x20after\x2030\x20days\x20'+'from\x20the\x20ruling\x20time\x20(no\x20objection\x20filed\x20—\x20silence\x20=\x20acceptance);\x20rejected\x20in\x20states\x200/1/2.\x20'+'State\x204\x20(Objectionable)\x20can\x20NEVER\x20withdraw\x20(protocol\x20141):\x20a\x20contested\x20case\x20keeps\x20its\x20fee\x20escrowed\x20until\x20the\x20customer\x20'+'closes\x20the\x20objection\x20cycle\x20—\x20reset\x20→\x20order.arb_confirm\x20→\x20new\x20ruling\x20→\x20unchallenged\x20(or\x20accepted\x20via\x20finish).'),'fees_transfer':FeesTransferSchema['optional']()['describe']('Distribute\x20the\x20withdrawn\x20arbitration\x20fees.\x20Moves\x20the\x20Arbitration\x27s\x20ENTIRE\x20balance\x20in\x20ONE\x20call\x20—\x20there\x20is\x20NO\x20amount\x20parameter.\x20'+'The\x20balance\x20leaves\x20as\x20a\x20CoinWrapper\x20owned\x20by\x20the\x20target\x20(allocation\x20or\x20treasury);\x20for\x20a\x20treasury\x20target,\x20intake\x20it\x20with\x20'+'treasury\x20receive:\x20\x22recently\x22\x20(permission\x20253)\x20—\x20see\x20the\x20\x27to\x27\x20field\x20description.'),'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):\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']();
|
|
@@ -83,6 +83,10 @@ export declare const CallEnvSchema: z.ZodObject<{
|
|
|
83
83
|
client_schema_version: z.ZodOptional<z.ZodString>;
|
|
84
84
|
schema_strict_mode: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
85
85
|
dry_run: z.ZodOptional<z.ZodBoolean>;
|
|
86
|
+
response_level: z.ZodOptional<z.ZodEnum<{
|
|
87
|
+
compact: "compact";
|
|
88
|
+
full: "full";
|
|
89
|
+
}>>;
|
|
86
90
|
confirm_mode: z.ZodOptional<z.ZodEnum<{
|
|
87
91
|
full: "full";
|
|
88
92
|
streamlined: "streamlined";
|
|
@@ -394,6 +398,11 @@ export declare const GuardAdviceSchema: z.ZodObject<{
|
|
|
394
398
|
}>;
|
|
395
399
|
failure_node: z.ZodOptional<z.ZodString>;
|
|
396
400
|
passport_id: z.ZodOptional<z.ZodString>;
|
|
401
|
+
guard_results: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
402
|
+
guard: z.ZodString;
|
|
403
|
+
result: z.ZodBoolean;
|
|
404
|
+
impack: z.ZodOptional<z.ZodBoolean>;
|
|
405
|
+
}, z.core.$strip>>>;
|
|
397
406
|
}, z.core.$strip>>;
|
|
398
407
|
risk_assessment: z.ZodOptional<z.ZodObject<{
|
|
399
408
|
overall_risk: z.ZodEnum<{
|
|
@@ -808,6 +817,11 @@ export declare const SemanticSummarySchema: z.ZodObject<{
|
|
|
808
817
|
}>;
|
|
809
818
|
failure_node: z.ZodOptional<z.ZodString>;
|
|
810
819
|
passport_id: z.ZodOptional<z.ZodString>;
|
|
820
|
+
guard_results: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
821
|
+
guard: z.ZodString;
|
|
822
|
+
result: z.ZodBoolean;
|
|
823
|
+
impack: z.ZodOptional<z.ZodBoolean>;
|
|
824
|
+
}, z.core.$strip>>>;
|
|
811
825
|
}, z.core.$strip>>;
|
|
812
826
|
risk_assessment: z.ZodOptional<z.ZodObject<{
|
|
813
827
|
overall_risk: z.ZodEnum<{
|
|
@@ -931,6 +945,7 @@ export declare const CallResponseErrorSchema: z.ZodObject<{
|
|
|
931
945
|
guard_rejected: "guard_rejected";
|
|
932
946
|
state_conflict: "state_conflict";
|
|
933
947
|
insufficient_balance: "insufficient_balance";
|
|
948
|
+
transaction_expired: "transaction_expired";
|
|
934
949
|
stock_exhausted: "stock_exhausted";
|
|
935
950
|
sale_suspended: "sale_suspended";
|
|
936
951
|
discount_invalid: "discount_invalid";
|
|
@@ -1858,6 +1873,7 @@ export declare const CallResultSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1858
1873
|
guard_rejected: "guard_rejected";
|
|
1859
1874
|
state_conflict: "state_conflict";
|
|
1860
1875
|
insufficient_balance: "insufficient_balance";
|
|
1876
|
+
transaction_expired: "transaction_expired";
|
|
1861
1877
|
stock_exhausted: "stock_exhausted";
|
|
1862
1878
|
sale_suspended: "sale_suspended";
|
|
1863
1879
|
discount_invalid: "discount_invalid";
|
|
@@ -2656,6 +2672,11 @@ export declare const CallOutputExecutedSchema: z.ZodObject<{
|
|
|
2656
2672
|
}>;
|
|
2657
2673
|
failure_node: z.ZodOptional<z.ZodString>;
|
|
2658
2674
|
passport_id: z.ZodOptional<z.ZodString>;
|
|
2675
|
+
guard_results: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2676
|
+
guard: z.ZodString;
|
|
2677
|
+
result: z.ZodBoolean;
|
|
2678
|
+
impack: z.ZodOptional<z.ZodBoolean>;
|
|
2679
|
+
}, z.core.$strip>>>;
|
|
2659
2680
|
}, z.core.$strip>>;
|
|
2660
2681
|
risk_assessment: z.ZodOptional<z.ZodObject<{
|
|
2661
2682
|
overall_risk: z.ZodEnum<{
|
|
@@ -3117,6 +3138,11 @@ export declare const CallOutputPendingInputSchema: z.ZodObject<{
|
|
|
3117
3138
|
}>;
|
|
3118
3139
|
failure_node: z.ZodOptional<z.ZodString>;
|
|
3119
3140
|
passport_id: z.ZodOptional<z.ZodString>;
|
|
3141
|
+
guard_results: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
3142
|
+
guard: z.ZodString;
|
|
3143
|
+
result: z.ZodBoolean;
|
|
3144
|
+
impack: z.ZodOptional<z.ZodBoolean>;
|
|
3145
|
+
}, z.core.$strip>>>;
|
|
3120
3146
|
}, z.core.$strip>>;
|
|
3121
3147
|
risk_assessment: z.ZodOptional<z.ZodObject<{
|
|
3122
3148
|
overall_risk: z.ZodEnum<{
|
|
@@ -3252,6 +3278,7 @@ export declare const CallOutputFailedSchema: z.ZodObject<{
|
|
|
3252
3278
|
guard_rejected: "guard_rejected";
|
|
3253
3279
|
state_conflict: "state_conflict";
|
|
3254
3280
|
insufficient_balance: "insufficient_balance";
|
|
3281
|
+
transaction_expired: "transaction_expired";
|
|
3255
3282
|
stock_exhausted: "stock_exhausted";
|
|
3256
3283
|
sale_suspended: "sale_suspended";
|
|
3257
3284
|
discount_invalid: "discount_invalid";
|
|
@@ -3521,6 +3548,11 @@ export declare const CallOutputFailedSchema: z.ZodObject<{
|
|
|
3521
3548
|
}>;
|
|
3522
3549
|
failure_node: z.ZodOptional<z.ZodString>;
|
|
3523
3550
|
passport_id: z.ZodOptional<z.ZodString>;
|
|
3551
|
+
guard_results: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
3552
|
+
guard: z.ZodString;
|
|
3553
|
+
result: z.ZodBoolean;
|
|
3554
|
+
impack: z.ZodOptional<z.ZodBoolean>;
|
|
3555
|
+
}, z.core.$strip>>>;
|
|
3524
3556
|
}, z.core.$strip>>;
|
|
3525
3557
|
risk_assessment: z.ZodOptional<z.ZodObject<{
|
|
3526
3558
|
overall_risk: z.ZodEnum<{
|
|
@@ -4298,6 +4330,11 @@ export declare const CallOutputSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
4298
4330
|
}>;
|
|
4299
4331
|
failure_node: z.ZodOptional<z.ZodString>;
|
|
4300
4332
|
passport_id: z.ZodOptional<z.ZodString>;
|
|
4333
|
+
guard_results: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
4334
|
+
guard: z.ZodString;
|
|
4335
|
+
result: z.ZodBoolean;
|
|
4336
|
+
impack: z.ZodOptional<z.ZodBoolean>;
|
|
4337
|
+
}, z.core.$strip>>>;
|
|
4301
4338
|
}, z.core.$strip>>;
|
|
4302
4339
|
risk_assessment: z.ZodOptional<z.ZodObject<{
|
|
4303
4340
|
overall_risk: z.ZodEnum<{
|
|
@@ -4758,6 +4795,11 @@ export declare const CallOutputSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
4758
4795
|
}>;
|
|
4759
4796
|
failure_node: z.ZodOptional<z.ZodString>;
|
|
4760
4797
|
passport_id: z.ZodOptional<z.ZodString>;
|
|
4798
|
+
guard_results: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
4799
|
+
guard: z.ZodString;
|
|
4800
|
+
result: z.ZodBoolean;
|
|
4801
|
+
impack: z.ZodOptional<z.ZodBoolean>;
|
|
4802
|
+
}, z.core.$strip>>>;
|
|
4761
4803
|
}, z.core.$strip>>;
|
|
4762
4804
|
risk_assessment: z.ZodOptional<z.ZodObject<{
|
|
4763
4805
|
overall_risk: z.ZodEnum<{
|
|
@@ -4892,6 +4934,7 @@ export declare const CallOutputSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
4892
4934
|
guard_rejected: "guard_rejected";
|
|
4893
4935
|
state_conflict: "state_conflict";
|
|
4894
4936
|
insufficient_balance: "insufficient_balance";
|
|
4937
|
+
transaction_expired: "transaction_expired";
|
|
4895
4938
|
stock_exhausted: "stock_exhausted";
|
|
4896
4939
|
sale_suspended: "sale_suspended";
|
|
4897
4940
|
discount_invalid: "discount_invalid";
|
|
@@ -5161,6 +5204,11 @@ export declare const CallOutputSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
5161
5204
|
}>;
|
|
5162
5205
|
failure_node: z.ZodOptional<z.ZodString>;
|
|
5163
5206
|
passport_id: z.ZodOptional<z.ZodString>;
|
|
5207
|
+
guard_results: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
5208
|
+
guard: z.ZodString;
|
|
5209
|
+
result: z.ZodBoolean;
|
|
5210
|
+
impack: z.ZodOptional<z.ZodBoolean>;
|
|
5211
|
+
}, z.core.$strip>>>;
|
|
5164
5212
|
}, z.core.$strip>>;
|
|
5165
5213
|
risk_assessment: z.ZodOptional<z.ZodObject<{
|
|
5166
5214
|
overall_risk: z.ZodEnum<{
|