@wowok/agent-mcp 2.7.10 → 3.0.0

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.
Files changed (151) hide show
  1. package/dist/extensions/capability-manifest.d.ts +1 -82
  2. package/dist/extensions/capability-manifest.js +1 -1
  3. package/dist/extensions/constraint-registry.d.ts +6 -4
  4. package/dist/extensions/constraint-registry.js +1 -1
  5. package/dist/extensions/index.d.ts +4 -5
  6. package/dist/extensions/index.js +1 -1
  7. package/dist/extensions/industry-pack.js +1 -1
  8. package/dist/extensions/metric-registry.d.ts +6 -4
  9. package/dist/extensions/metric-registry.js +1 -1
  10. package/dist/extensions/mode-evaluator.d.ts +2 -3
  11. package/dist/extensions/mode-evaluator.js +1 -1
  12. package/dist/extensions/registry.d.ts +3 -25
  13. package/dist/extensions/registry.js +1 -1
  14. package/dist/extensions/types.d.ts +0 -68
  15. package/dist/goal/GoalEngine.d.ts +36 -1
  16. package/dist/goal/GoalEngine.js +1 -1
  17. package/dist/goal/types.d.ts +4 -0
  18. package/dist/knowledge/account-marks.d.ts +1 -0
  19. package/dist/knowledge/account-marks.js +1 -1
  20. package/dist/knowledge/fund-layer.d.ts +13 -9
  21. package/dist/knowledge/fund-layer.js +1 -1
  22. package/dist/knowledge/goal-completion.js +1 -1
  23. package/dist/knowledge/guard-bindings.d.ts +21 -0
  24. package/dist/knowledge/guard-bindings.js +1 -0
  25. package/dist/knowledge/index.d.ts +5 -3
  26. package/dist/knowledge/index.js +1 -1
  27. package/dist/knowledge/industry-registry.js +1 -1
  28. package/dist/knowledge/mcp-schema-audit-cli.js +1 -1
  29. package/dist/knowledge/mcp-schema-audit.js +1 -1
  30. package/dist/knowledge/reward-risk.d.ts +1 -1
  31. package/dist/knowledge/reward-risk.js +1 -1
  32. package/dist/knowledge/safety-rules.d.ts +2 -1
  33. package/dist/knowledge/safety-rules.js +1 -1
  34. package/dist/knowledge/scenario-topology.d.ts +43 -0
  35. package/dist/knowledge/scenario-topology.js +1 -0
  36. package/dist/knowledge/supply-chain.js +1 -1
  37. package/dist/knowledge/template-registry.js +1 -1
  38. package/dist/knowledge/workflow-guidance.d.ts +35 -0
  39. package/dist/knowledge/workflow-guidance.js +1 -1
  40. package/dist/knowledge/workspace-lists.d.ts +1 -0
  41. package/dist/knowledge/workspace-lists.js +1 -1
  42. package/dist/monitor/MonitorLoop.d.ts +2 -0
  43. package/dist/monitor/MonitorLoop.js +1 -1
  44. package/dist/monitor/ScopeResolver.js +1 -1
  45. package/dist/monitor/SuggestionBridge.d.ts +38 -0
  46. package/dist/monitor/SuggestionBridge.js +1 -0
  47. package/dist/participation/arbitrator-interest.d.ts +20 -0
  48. package/dist/participation/arbitrator-interest.js +1 -0
  49. package/dist/participation/demander-interest.d.ts +23 -0
  50. package/dist/participation/demander-interest.js +1 -0
  51. package/dist/playbooks/service-build/business-puzzle.js +1 -1
  52. package/dist/playbooks/service-build/context-assembly.js +1 -1
  53. package/dist/playbooks/service-build/machine-nodes.js +1 -1
  54. package/dist/playbooks/service-build/machine-panorama.js +1 -1
  55. package/dist/playbooks/service-build/merchant-guide.d.ts +20 -0
  56. package/dist/playbooks/service-build/merchant-guide.js +1 -1
  57. package/dist/playbooks/service-build/mode-actions.d.ts +30 -6
  58. package/dist/playbooks/service-build/mode-actions.js +1 -1
  59. package/dist/playbooks/service-build/object-panorama.js +1 -1
  60. package/dist/playbooks/service-build/participation-radar.js +1 -1
  61. package/dist/playbooks/service-build/relationship-profile.d.ts +2 -0
  62. package/dist/playbooks/service-build/relationship-profile.js +1 -0
  63. package/dist/playbooks/service-build/semantic-graph.d.ts +5 -1
  64. package/dist/playbooks/service-build/semantic-graph.js +1 -1
  65. package/dist/playbooks/service-build/service-panorama.js +1 -1
  66. package/dist/relationship/derivation.d.ts +88 -0
  67. package/dist/relationship/derivation.js +1 -0
  68. package/dist/relationship/incentive.d.ts +38 -0
  69. package/dist/relationship/incentive.js +1 -0
  70. package/dist/relationship/index.d.ts +4 -0
  71. package/dist/relationship/index.js +1 -0
  72. package/dist/relationship/registry.d.ts +13 -0
  73. package/dist/relationship/registry.js +1 -0
  74. package/dist/relationship/types.d.ts +45 -0
  75. package/dist/relationship/types.js +1 -0
  76. package/dist/review/progress.js +1 -1
  77. package/dist/safety/confirm-gate.js +1 -1
  78. package/dist/safety/preview.js +1 -1
  79. package/dist/schema/call/bridge.d.ts +25 -3
  80. package/dist/schema/call/bridge.js +1 -1
  81. package/dist/schema/call/semantic.js +1 -1
  82. package/dist/schema/common/index.js +1 -1
  83. package/dist/schema/goal/index.d.ts +40 -14
  84. package/dist/schema/goal/index.js +1 -1
  85. package/dist/schema/goal/planning.d.ts +6 -6
  86. package/dist/schema/industry-pack/index.d.ts +58 -0
  87. package/dist/schema/industry-pack/index.js +1 -1
  88. package/dist/schema/industry-pack/modes.d.ts +59 -1
  89. package/dist/schema/industry-pack/modes.js +1 -1
  90. package/dist/schema/intent-radar/index.d.ts +19 -19
  91. package/dist/schema/local/index.d.ts +11 -0
  92. package/dist/schema/local/index.js +1 -1
  93. package/dist/schema/operations.d.ts +58 -16
  94. package/dist/schema/persona/index.d.ts +1 -1
  95. package/dist/schema/query/bi.d.ts +145 -16
  96. package/dist/schema/query/bi.js +1 -1
  97. package/dist/schema/query/index.d.ts +2 -2
  98. package/dist/schema/schema-version.js +1 -1
  99. package/dist/schema-query-impl/index.js +1 -1
  100. package/dist/schemas/account_operation.output.json +29 -0
  101. package/dist/schemas/account_operation.schema.json +6 -2
  102. package/dist/schemas/bridge_operation.output.json +24 -1
  103. package/dist/schemas/bridge_operation.schema.json +73 -1
  104. package/dist/schemas/goal_operation.schema.json +76 -0
  105. package/dist/schemas/index.json +1 -1
  106. package/dist/schemas/industry_pack_operation.output.json +176 -1
  107. package/dist/schemas/industry_pack_operation.schema.json +19 -0
  108. package/dist/schemas/onchain_events.output.json +1 -1
  109. package/dist/schemas/onchain_operations.schema.json +41 -41
  110. package/dist/schemas/onchain_operations_allocation.schema.json +4 -4
  111. package/dist/schemas/onchain_operations_arbitration.schema.json +3 -3
  112. package/dist/schemas/onchain_operations_contact.schema.json +2 -2
  113. package/dist/schemas/onchain_operations_demand.schema.json +2 -2
  114. package/dist/schemas/onchain_operations_machine.schema.json +2 -2
  115. package/dist/schemas/onchain_operations_order.schema.json +2 -2
  116. package/dist/schemas/onchain_operations_payment.schema.json +1 -1
  117. package/dist/schemas/onchain_operations_permission.schema.json +2 -2
  118. package/dist/schemas/onchain_operations_progress.schema.json +2 -2
  119. package/dist/schemas/onchain_operations_repository.schema.json +2 -2
  120. package/dist/schemas/onchain_operations_reward.schema.json +6 -6
  121. package/dist/schemas/onchain_operations_service.schema.json +7 -7
  122. package/dist/schemas/onchain_operations_treasury.schema.json +6 -6
  123. package/dist/schemas/onchain_table_data.output.json +53 -0
  124. package/dist/schemas/query_toolkit.output.json +240 -7
  125. package/dist/schemas/query_toolkit.schema.json +53 -0
  126. package/dist/task/ProcessStore.d.ts +18 -1
  127. package/dist/task/ProcessStore.js +1 -1
  128. package/dist/task/types.d.ts +24 -0
  129. package/dist/tools/handlers/config.js +1 -1
  130. package/dist/tools/handlers/evaluation.js +1 -1
  131. package/dist/tools/handlers/goal.js +1 -1
  132. package/dist/tools/handlers/industry-pack.js +1 -1
  133. package/dist/tools/handlers/local.d.ts +4 -3
  134. package/dist/tools/handlers/local.js +1 -1
  135. package/dist/tools/handlers/onchain.js +1 -1
  136. package/dist/tools/handlers/permission.js +1 -1
  137. package/dist/tools/handlers/query.js +1 -1
  138. package/dist/tools/handlers/workflow.js +1 -1
  139. package/dist/tools/index.js +1 -1
  140. package/dist/tools/rules-hook.d.ts +1 -0
  141. package/dist/tools/rules-hook.js +1 -1
  142. package/dist/tools/shared.js +1 -1
  143. package/package.json +2 -2
  144. package/dist/mode-market/index.d.ts +0 -3
  145. package/dist/mode-market/index.js +0 -1
  146. package/dist/mode-market/registry.d.ts +0 -53
  147. package/dist/mode-market/registry.js +0 -1
  148. package/dist/mode-market/review.d.ts +0 -27
  149. package/dist/mode-market/review.js +0 -1
  150. package/dist/mode-market/submission.d.ts +0 -25
  151. package/dist/mode-market/submission.js +0 -1
@@ -0,0 +1 @@
1
+ import{RELATIONSHIP_KIND_REGISTRY,interestHintsFor}from'./registry.js';function eq(c,d){return c['toLowerCase']()===d['toLowerCase']();}function isAddressLike(a){return/^0x[0-9a-fA-F]{4,}$/i['test'](a);}function edge(a,b,c,d,e,f=[]){return{'anchor':a,'counterparty':b,'kind':c,'power':e,'interest':d,'value_flows':f,'tension':RELATIONSHIP_KIND_REGISTRY[c]['tension']};}function pushEdge(a,b){const c=b['counterparty']['toLowerCase']()+'|'+b['kind'],d=a['get'](c);if(d){d['power']['objects']['push'](...b['power']['objects']),d['value_flows']['push'](...b['value_flows']);b['power']['perm_indices']['length']>0x0&&(d['power']['perm_indices']=[...new Set([...d['power']['perm_indices'],...b['power']['perm_indices']])]);return;}a['set'](c,b);}export function deriveRelationshipProfile(a){const b=a['anchor'],c=new Map(),d=[],f=a['service_owners']??{};for(const i of a['permissions']??[]){const j=eq(i['owner'],b),k=i['admins']['some'](m=>eq(m,b)),l=i['entities']['find'](m=>eq(m['address'],b));if(j||k)for(const m of i['entities']){if(eq(m['address'],b))continue;const n='employment';pushEdge(c,edge(b,m['address'],n,interestHintsFor(n,!![]),{'role_bits':(j?0x1:0x0)|(k?0x2:0x0),'perm_indices':[],'objects':(i['managed_objects']??[])['map'](p=>({'object_type':p['object_type'],'address':p['address'],'capacity':'merchant-side\x20authority'})),'carrier':'permission'}));}else{if(l)for(const o of[i['owner'],...i['admins']]){if(!o||eq(o,b))continue;const p='employment';pushEdge(c,edge(b,o,p,interestHintsFor(p,![]),{'role_bits':0x4,'perm_indices':l['perm_indices'],'objects':(i['managed_objects']??[])['map'](q=>({'object_type':q['object_type'],'address':q['address'],'capacity':'entity\x20(perm\x20indices:\x20'+(l['perm_indices']['join'](',\x20')||'none')+')'})),'carrier':'permission'}));}}}for(const q of a['machines']??[]){for(const r of q['forwards']??[]){const t=r['named_operator'];if(!t||eq(t,b))continue;const u='process_operation';isAddressLike(t)?pushEdge(c,edge(b,t,u,interestHintsFor(u,!![]),{'role_bits':0x0,'perm_indices':[],'objects':[{'object_type':'Machine','address':q['address'],'capacity':r['node']+'\x20→\x20'+r['next_node']+'\x20('+r['forward_name']+')\x20named\x20operator'}],'carrier':'machine_forward'})):d['push']('Machine\x20'+q['address']+'\x20forward\x20\x27'+r['forward_name']+'\x27\x20('+r['node']+'\x20→\x20'+r['next_node']+')\x20has\x20named\x20operator\x20\x27'+t+'\x27\x20—\x20named\x20operators\x20resolve\x20per-order\x20via\x20the\x20Progress\x20namedOperator\x20table,\x20so\x20no\x20static\x20edge\x20is\x20derived.');}}for(const v of a['orders']??[]){const w=eq(v['owner'],b),x=v['agents']['some'](A=>eq(A,b)),y=v['service_owner']??f[v['service']],z='transaction';if((w||x)&&y){const A=[];v['amount']&&v['amount']!=='0'&&A['push']({'from':w?b:v['owner'],'to':y,'carrier_object':v['address'],'carrier_type':v['allocation']?'Order\x20→\x20Allocation':'Order\x20(escrow)','amount':v['amount'],'trigger':'workflow\x20reaches\x20a\x20completion\x20terminal\x20(guard-gated)'});const B=edge(b,y,z,interestHintsFor(z,!![]),{'role_bits':w?0x1:0x2,'perm_indices':[],'objects':[{'object_type':'Order','address':v['address'],'capacity':w?'buyer\x20(owner)':'buyer\x27s\x20agent'}],'carrier':'order'},A);v['dispute_arbitrations']?.['length']&&B['power']['objects']['push']({'object_type':'Arbitration','address':v['dispute_arbitrations']['join'](',\x20'),'capacity':'bound\x20dispute\x20paths'}),pushEdge(c,B);}else y&&eq(y,b)&&pushEdge(c,edge(b,v['owner'],z,interestHintsFor(z,![]),{'role_bits':0x4,'perm_indices':[],'objects':[{'object_type':'Order','address':v['address'],'capacity':'merchant\x20side\x20(service)'}],'carrier':'order'},v['amount']&&v['amount']!=='0'?[{'from':v['owner'],'to':b,'carrier_object':v['address'],'carrier_type':v['allocation']?'Order\x20→\x20Allocation':'Order\x20(escrow)','amount':v['amount'],'trigger':'workflow\x20reaches\x20a\x20completion\x20terminal\x20(guard-gated)'}]:[]));if(w)for(const C of v['agents']){if(eq(C,b))continue;const D='agency';pushEdge(c,edge(b,C,D,interestHintsFor(D,!![]),{'role_bits':0x1,'perm_indices':[],'objects':[{'object_type':'Order','address':v['address'],'capacity':'principal'}],'carrier':'order'}));}else{if(x){const E='agency';pushEdge(c,edge(b,v['owner'],E,interestHintsFor(E,![]),{'role_bits':0x2,'perm_indices':[],'objects':[{'object_type':'Order','address':v['address'],'capacity':'agent'}],'carrier':'order'}));}}}for(const F of a['demands']??[]){const G=eq(F['owner'],b);for(const H of F['presenters']??[]){if(eq(H['address'],b)&&G)continue;if(G&&!eq(H['address'],b)){const I='supply',J=edge(b,H['address'],I,interestHintsFor(I,!![]),{'role_bits':0x1,'perm_indices':[],'objects':[{'object_type':'Demand','address':F['address'],'capacity':'presenter\x20(service\x20'+(H['service']??'?')+',\x20score\x20'+(H['acceptance_score']??'n/a')+')'}],'carrier':'demand_presenter'});pushEdge(c,J);}else{if(!G&&eq(H['address'],b)){const K='supply';pushEdge(c,edge(b,F['owner'],K,interestHintsFor(K,![]),{'role_bits':0x4,'perm_indices':[],'objects':[{'object_type':'Demand','address':F['address'],'capacity':'I\x20presented\x20service\x20'+(H['service']??'?')+'\x20(score\x20'+(H['acceptance_score']??'n/a')+')'}],'carrier':'demand_presenter'}));}}}}for(const L of a['allocations']??[]){const M=!!L['owner']&&eq(L['owner'],b),N=(L['sharing']??[])['some'](O=>typeof O['who']==='object'&&'Entity'in O['who']&&eq(O['who']['Entity'],b));if(M)for(const O of L['sharing']??[]){if(typeof O['who']!=='object'||!('Entity'in O['who']))continue;const P=O['who']['Entity'];if(!P||eq(P,b))continue;const Q='value_distribution';pushEdge(c,edge(b,P,Q,interestHintsFor(Q,!![]),{'role_bits':0x1,'perm_indices':[],'objects':[{'object_type':'Allocation','address':L['address'],'capacity':'payer\x20/\x20allocation\x20owner'}],'carrier':'allocation_sharing'},[{'from':b,'to':P,'carrier_object':L['address'],'carrier_type':'Allocation\x20Sharing\x20('+O['mode']+(O['sharing']?'\x20'+O['sharing']:'')+')','trigger':O['guard']?'guard\x20'+O['guard']+'\x20passes':'allocator\x20guard\x20passes'}]));}else{if(N&&L['owner']&&!eq(L['owner'],b)){const R='value_distribution';pushEdge(c,edge(b,L['owner'],R,interestHintsFor(R,![]),{'role_bits':0x4,'perm_indices':[],'objects':[{'object_type':'Allocation','address':L['address'],'capacity':'declared\x20recipient'}],'carrier':'allocation_sharing'},[{'from':L['owner'],'to':b,'carrier_object':L['address'],'carrier_type':'Allocation\x20Sharing','trigger':'allocator\x20guard\x20passes'}]));}}for(const S of L['sharing']??[]){if(typeof S['who']==='object'&&'Signer'in S['who'])d['push']('Allocation\x20'+L['address']+'\x20has\x20a\x20Signer\x20recipient\x20('+S['mode']+')\x20—\x20value\x20flows\x20to\x20the\x20account\x20that\x20executes\x20the\x20guard-gated\x20alloc\x20call,\x20not\x20to\x20a\x20fixed\x20counterparty.');else typeof S['who']==='object'&&'GuardIdentifier'in S['who']&&d['push']('Allocation\x20'+L['address']+'\x20has\x20a\x20GuardIdentifier\x20recipient\x20('+S['mode']+')\x20—\x20the\x20recipient\x20address\x20is\x20resolved\x20from\x20a\x20guard\x20submission\x20at\x20alloc\x20time,\x20not\x20statically.');}}for(const T of a['arbitrations']??[]){for(const U of T['voters']??[]){if(eq(U['address'],b))continue;const V='arbitration_delegation';pushEdge(c,edge(b,U['address'],V,interestHintsFor(V,!![]),{'role_bits':0x1,'perm_indices':[],'objects':[{'object_type':'Arbitration','address':T['address'],'capacity':'bound\x20arbitration\x20(voter\x20weight\x20'+(U['weight']??'n/a')+')'}],'carrier':'arbitration_binding'}));}}for(const W of a['contacts']??[]){const X=eq(W['owner'],b);for(const Y of W['ims']){if(eq(Y,b))continue;const Z='contact_membership';pushEdge(c,edge(b,Y,Z,interestHintsFor(Z,X),{'role_bits':X?0x1:0x4,'perm_indices':[],'objects':[{'object_type':'Contact','address':W['address'],'capacity':X?'contact\x20owner':'IM\x20member'}],'carrier':'contact_im'}));}}const g=[...c['values']()],h={};for(const a0 of g){const a1=a0['counterparty']['toLowerCase']();(h[a1]??=[])['push'](a0['kind']);}for(const a2 of new Set(g['map'](a3=>a3['kind']))){const a3=RELATIONSHIP_KIND_REGISTRY[a2];a3?.['tension']&&d['push'](a2+':\x20anchor('+a3['anchor_role']+')\x20wants\x20\x22'+a3['tension']['anchor_goal']+'\x22;\x20counterparty('+a3['counterparty_role']+')\x20wants\x20\x22'+a3['tension']['counterparty_goal']+'\x22.\x20Divergence:\x20'+a3['tension']['divergence']);}return{'anchor':b,'edges':g,'by_counterparty':h,'notes':d};}
@@ -0,0 +1,38 @@
1
+ import type { LiabilityResolution, ReactionKpi } from "../participation/employee-kpi.js";
2
+ export interface AcceptanceEvidence {
3
+ node: string;
4
+ wip_hashes: string[];
5
+ submitted_at?: number;
6
+ }
7
+ export interface AcceptanceVerdict {
8
+ node: string;
9
+ passed: boolean;
10
+ criteria: string[];
11
+ gaps: string[];
12
+ }
13
+ export interface IncentiveInput {
14
+ employee: string;
15
+ kpis: ReactionKpi[];
16
+ acceptance: AcceptanceEvidence[];
17
+ liability?: LiabilityResolution;
18
+ available_rewards?: Array<{
19
+ address: string;
20
+ description?: string;
21
+ }>;
22
+ prior_compensation?: string;
23
+ }
24
+ export type SuggestionKind = "reward_grant" | "compensation_offset" | "correction_notice" | "none";
25
+ export interface RewardSuggestion {
26
+ employee: string;
27
+ kind: SuggestionKind;
28
+ rationale: string;
29
+ requires_confirmation: true;
30
+ reward_candidates: Array<{
31
+ address: string;
32
+ description?: string;
33
+ }>;
34
+ execution_hint: string;
35
+ kpi_rollup: string;
36
+ }
37
+ export declare function evaluateAcceptance(node: string, evidence?: AcceptanceEvidence): AcceptanceVerdict;
38
+ export declare function suggestIncentive(input: IncentiveInput): RewardSuggestion;
@@ -0,0 +1 @@
1
+ export function evaluateAcceptance(a,b){const c=[],d=[];if(!b)return{'node':a,'passed':![],'criteria':['WIP\x20evidence\x20submitted\x20for\x20the\x20node'],'gaps':['No\x20evidence\x20submitted\x20—\x20node\x20advanced\x20without\x20verifiable\x20WIP']};return c['push']('WIP\x20evidence\x20submitted\x20for\x20the\x20node'),b['wip_hashes']['length']===0x0?d['push']('Evidence\x20entry\x20exists\x20but\x20contains\x20no\x20WIP\x20hash'):c['push']('WIP\x20hashes\x20present\x20('+b['wip_hashes']['length']+')'),{'node':a,'passed':d['length']===0x0,'criteria':c,'gaps':d};}export function suggestIncentive(a){const b=a['kpis']['length']?a['kpis']['map'](h=>h['node']+':\x20'+h['status']+(h['reaction_ms']>=0x0?'\x20('+Math['round'](h['reaction_ms']/0x36ee80)+'h)':'\x20(pending)'))['join'](';\x20'):'No\x20node\x20KPIs\x20recorded',c=a['kpis']['filter'](h=>h['status']==='fail'),d=a['kpis']['filter'](h=>h['status']==='warn'),e=a['kpis']['filter'](h=>h['status']==='pass'),f=a['kpis']['filter'](h=>h['status']!=='warn')['map'](h=>evaluateAcceptance(h['node'],a['acceptance']['find'](i=>i['node']===h['node']))),g=f['filter'](h=>!h['passed']);if(a['liability']&&a['liability']['bears']==='employee')return{'employee':a['employee'],'kind':'compensation_offset','rationale':'Liability\x20resolution\x20assigns\x20the\x20loss\x20to\x20the\x20employee\x20('+a['liability']['note']+').\x20'+(a['liability']['must_compensate_before_resume']?'The\x20order\x20user\x20must\x20be\x20compensated\x20BEFORE\x20the\x20workflow\x20resumes.\x20':'')+'Suggest\x20offsetting\x20the\x20loss\x20against\x20the\x20employee\x27s\x20next\x20distribution\x20(Allocation\x20guard\x20or\x20reward\x20amount),\x20with\x20the\x20employee\x27s\x20visibility.','requires_confirmation':!![],'reward_candidates':[],'execution_hint':'After\x20merchant\x20confirmation:\x20adjust\x20the\x20employee\x27s\x20Allocation\x20Sharing\x20amount/guard\x20for\x20the\x20relevant\x20order,\x20or\x20deduct\x20from\x20the\x20next\x20reward\x20grant.\x20All\x20changes\x20are\x20on-chain\x20and\x20auditable.','kpi_rollup':b};if(g['length']>0x0||c['length']>0x0){const h=g['map'](i=>i['node']+':\x20'+i['gaps']['join'](';\x20'))['join']('\x20|\x20');return{'employee':a['employee'],'kind':'correction_notice','rationale':(c['length']>0x0?c['length']+'\x20KPI\x20failure(s).\x20':'')+(g['length']>0x0?'Acceptance\x20gaps:\x20'+h:'')+'\x20No\x20reward\x20suggested.\x20Surface\x20the\x20gaps\x20to\x20the\x20employee\x20via\x20Messenger\x20with\x20the\x20on-chain\x20evidence\x20links.','requires_confirmation':!![],'reward_candidates':[],'execution_hint':'After\x20merchant\x20confirmation:\x20send\x20a\x20Messenger\x20message\x20to\x20the\x20employee\x20with\x20the\x20KPI\x20rollup\x20and\x20WIP\x20evidence\x20gaps;\x20optionally\x20set\x20a\x20stricter\x20response_time_budget_ms\x20on\x20the\x20employee\x20profile.','kpi_rollup':b};}if(e['length']>0x0&&c['length']===0x0&&g['length']===0x0){const i=a['available_rewards']??[];return{'employee':a['employee'],'kind':i['length']>0x0?'reward_grant':'none','rationale':'All\x20'+e['length']+'\x20node\x20KPI(s)\x20passed\x20with\x20complete,\x20verifiable\x20WIP\x20evidence.\x20'+(i['length']>0x0?'Suggest\x20granting\x20one\x20of\x20the\x20available\x20rewards\x20—\x20aligns\x20employee\x20compensation\x20with\x20delivered\x20output\x20(principal-agent\x20alignment).':'No\x20reward\x20objects\x20configured\x20on\x20the\x20service\x20—\x20suggest\x20the\x20merchant\x20add\x20a\x20Reward\x20(guard-gated\x20claim)\x20to\x20make\x20future\x20incentive\x20alignment\x20executable\x20on-chain.'),'requires_confirmation':!![],'reward_candidates':i,'execution_hint':i['length']>0x0?'After\x20merchant\x20confirmation:\x20set\x20the\x20employee\x20as\x20the\x20RewardGuard\x20recipient\x20(guard-gated\x20claim\x20by\x20the\x20employee),\x20or\x20transfer\x20the\x20reward\x20directly\x20via\x20the\x20existing\x20reward/payment\x20ops.':'After\x20merchant\x20confirmation:\x20create\x20a\x20Reward\x20bound\x20to\x20a\x20guard\x20the\x20employee\x20satisfies\x20(reward.operation),\x20then\x20notify\x20the\x20employee\x20via\x20Messenger.','kpi_rollup':b};}return{'employee':a['employee'],'kind':'none','rationale':d['length']>0x0?d['length']+'\x20node(s)\x20still\x20pending\x20employee\x20action\x20—\x20no\x20verdict\x20possible\x20until\x20they\x20advance.':'No\x20KPI\x20data\x20to\x20evaluate.','requires_confirmation':!![],'reward_candidates':[],'execution_hint':'No\x20action.\x20Monitor\x20pending\x20nodes;\x20re-run\x20when\x20they\x20complete.','kpi_rollup':b};}
@@ -0,0 +1,4 @@
1
+ export * from "./types.js";
2
+ export * from "./registry.js";
3
+ export * from "./derivation.js";
4
+ export * from "./incentive.js";
@@ -0,0 +1 @@
1
+ export*from'./types.js';export*from'./registry.js';export*from'./derivation.js';export*from'./incentive.js';
@@ -0,0 +1,13 @@
1
+ import type { RelationshipKind, RelationshipTension } from "./types.js";
2
+ export interface RelationshipKindMeta {
3
+ kind: RelationshipKind;
4
+ semantics: string;
5
+ anchor_role: string;
6
+ counterparty_role: string;
7
+ tension?: RelationshipTension;
8
+ }
9
+ export declare const RELATIONSHIP_KIND_REGISTRY: Record<RelationshipKind, RelationshipKindMeta>;
10
+ export declare function interestHintsFor(kind: RelationshipKind, asAnchorRole: boolean): {
11
+ gains: string[];
12
+ exposures: string[];
13
+ };
@@ -0,0 +1 @@
1
+ const EMPLOYMENT={'kind':'employment','semantics':'Merchant\x27s\x20internal\x20staff\x20via\x20Permission\x20entity\x20membership\x20(no\x20node\x20operator\x20power\x20of\x20their\x20own)\x20—\x20principal-agent.','anchor_role':'merchant','counterparty_role':'employee','tension':{'anchor_goal':'Maximize\x20delivered\x20output\x20quality\x20at\x20fixed\x20labor\x20cost;\x20errors\x20are\x20attributed\x20to\x20the\x20merchant\x20outwardly.','counterparty_goal':'Maximize\x20compensation\x20while\x20minimizing\x20effort\x20and\x20personal\x20liability\x20exposure.','divergence':'Fixed\x20pay\x20decouples\x20effort\x20from\x20outcome:\x20the\x20employee\x20bears\x20only\x20bounded\x20liability\x20(resolveLiability)\x20while\x20the\x20merchant\x27s\x20reputation\x20and\x20compensation_fund\x20absorb\x20the\x20residue.','alignment_mechanisms':['Employee\x20KPI:\x20assessReactionKpi\x20measures\x20node\x20reaction\x20time\x20against\x20a\x20budget\x20(participation/employee-kpi.ts)','Acceptance\x20gate:\x20node\x20advancement\x20requires\x20the\x20merchant-side\x20permission\x20or\x20evidence\x20upload\x20(machine.move\x20forwards)','Compensation-before-resume:\x20an\x20employee-error\x20loss\x20must\x20compensate\x20the\x20order\x20user\x20before\x20the\x20workflow\x20resumes\x20(resolveLiability)','Incentive\x20bridge:\x20KPI\x20+\x20acceptance\x20→\x20Reward\x20suggestion,\x20executed\x20only\x20after\x20merchant\x20confirmation\x20(relationship/incentive.ts)']}},PROCESS_OPERATION={'kind':'process_operation','semantics':'Machine\x20node\x20operators\x20—\x20namedOperator\x20addresses,\x20permissionIndex\x20entities,\x20or\x20guard\x20proofs\x20(machine.move\x20Forward).','anchor_role':'machine/merchant\x20side','counterparty_role':'node\x20operator','tension':{'anchor_goal':'Workflow\x20advances\x20correctly\x20and\x20on\x20schedule;\x20WIP\x20evidence\x20is\x20complete.','counterparty_goal':'Complete\x20assigned\x20nodes\x20with\x20minimal\x20friction;\x20parallel\x20forwards\x20let\x20operators\x20pick\x20favorable\x20edges.','divergence':'Multi-path\x20forwards\x20(multiple\x20forwards\x20from\x20one\x20prev_node)\x20let\x20operators\x20choose\x20the\x20cheap\x20edge,\x20not\x20the\x20quality\x20edge.','alignment_mechanisms':['Forward\x20guard:\x20each\x20edge\x20can\x20require\x20a\x20guard\x20proof\x20(machine.move\x20Forward.guard)','Threshold\x20accumulation:\x20parallel\x20edges\x20need\x20accumulated\x20weights\x20to\x20migrate\x20the\x20node','WIP\x20evidence:\x20progress\x20records\x20who\x20advanced\x20what\x20and\x20when\x20(progress.move\x20Holder)']}},AGENCY={'kind':'agency','semantics':'Order\x20owner\x20(buyer)\x20delegates\x20purchasing\x20power\x20to\x20order\x20agents\x20(order.move\x20agent[]).','anchor_role':'buyer','counterparty_role':'agent','tension':{'anchor_goal':'Agent\x20acts\x20strictly\x20within\x20the\x20principal\x27s\x20interest\x20when\x20spending\x20escrowed\x20funds.','counterparty_goal':'Operational\x20latitude;\x20agents\x20may\x20face\x20incentives\x20from\x20the\x20merchant\x20side.','divergence':'The\x20agent\x20spends\x20the\x20principal\x27s\x20money:\x20classic\x20delegated-spending\x20moral\x20hazard.','alignment_mechanisms':['has_op_permission:\x20only\x20owner/agent\x20can\x20operate\x20the\x20order\x20(order.move)','Order\x20agent_set\x20is\x20revocable\x20at\x20any\x20time\x20by\x20the\x20owner','All\x20agent\x20operations\x20are\x20on-chain\x20auditable\x20events']}},TRANSACTION={'kind':'transaction','semantics':'Customer\x20(order\x20owner)\x20↔\x20merchant\x20(service\x20side)\x20—\x20the\x20core\x20adversarial-cooperative\x20exchange.','anchor_role':'customer','counterparty_role':'merchant','tension':{'anchor_goal':'Receive\x20the\x20agreed\x20deliverable;\x20keep\x20the\x20refund\x20path\x20available\x20until\x20acceptance.','counterparty_goal':'Get\x20escrowed\x20funds\x20released\x20as\x20early\x20as\x20possible;\x20minimize\x20dispute\x20surface.','divergence':'Fund\x20release\x20vs\x20acceptance\x20timing:\x20the\x20customer\x20wants\x20evidence\x20before\x20release,\x20the\x20merchant\x20wants\x20release\x20on\x20completion\x20terminal.','alignment_mechanisms':['Escrow:\x20order\x20amount\x20is\x20locked\x20until\x20the\x20workflow\x20reaches\x20a\x20terminal\x20(order.move)','buy_guard:\x20merchant\x20can\x20pre-screen\x20buyers\x20(service.move)','compensation_fund\x20+\x20bound\x20arbitrations:\x20breach\x20recourse\x20without\x20a\x20platform\x20(service.move\x20publish\x20rule)','Registrar\x20votes\x20(BIT_LIKE/BIT_DISLIKE/BIT_FAVOR):\x20post-transaction\x20reputation\x20accumulation','Demand\x20feedback\x20acceptance_score:\x20demander\x20rates\x20the\x20supplier\x20on-chain\x20(demand.move\x20feedback)']}},SUPPLY={'kind':'supply','semantics':'Demander\x20(demand\x20permission\x20owner)\x20×\x20presenter\x20(supplier\x20presenting\x20a\x20service\x20to\x20the\x20demand).','anchor_role':'demander','counterparty_role':'supplier/presenter','tension':{'anchor_goal':'Select\x20the\x20best-fitting\x20service;\x20personalized\x20support\x20before\x20committing.','counterparty_goal':'Win\x20the\x20selection;\x20the\x20present\x20call\x20is\x20cheap\x20so\x20over-presenting\x20is\x20rational.','divergence':'Presentation\x20is\x20free\x20for\x20the\x20supplier\x20but\x20selection\x20is\x20costly\x20for\x20the\x20demander\x20—\x20asymmetric\x20effort.','alignment_mechanisms':['Presenters\x20map\x20with\x20recommend\x20field\x20and\x20update_time\x20(demand.move\x20present)','On-chain\x20acceptance_score\x20feedback\x20loop\x20(demand.move\x20feedback)\x20—\x20bad\x20presentations\x20get\x20scored','Demand\x20guards:\x20present/claim\x20can\x20be\x20gated\x20(demand.move\x20guards)','Demand\x20rewards:\x20only\x20the\x20selected\x20winner\x27s\x20claim\x20guard\x20passes\x20(reward.move)']}},ARBITRATION_DELEGATION={'kind':'arbitration_delegation','semantics':'Service\x20owner\x20delegates\x20dispute\x20resolution\x20to\x20an\x20Arbitration\x27s\x20voting\x20guards\x20(service.move\x20arbitrations).','anchor_role':'service\x20owner\x20(merchant)','counterparty_role':'arbitrators\x20(voting\x20guard\x20members)','tension':{'anchor_goal':'Fair\x20verdicts\x20that\x20protect\x20the\x20merchant\x27s\x20reputation;\x20predictable\x20fee\x20costs.','counterparty_goal':'Earn\x20arbitration\x20fees;\x20vote\x20throughput\x20matters\x20more\x20than\x20deep\x20investigation.','divergence':'Vote\x20cost\x20asymmetry:\x20fast\x20votes\x20earn\x20the\x20same\x20fee\x20as\x20investigated\x20votes.','alignment_mechanisms':['Separation\x20of\x20powers:\x20arbitration\x20permission\x20must\x20differ\x20from\x20the\x20service\x20permission\x20(service.move\x20arbitration_add\x20rule)','vote_weight\x20per\x20voting\x20guard\x20member\x20—\x20weighted,\x20not\x20majority-count\x20(arbitration.move)','Arb\x20indemnity\x20is\x20paid\x20from\x20the\x20merchant\x27s\x20compensation_fund\x20—\x20verdicts\x20cost\x20the\x20merchant\x20real\x20money\x20(arb.move)','Registrar\x20reputation\x20for\x20the\x20arbitration\x20object\x20itself']}},DISPUTE_RESOLUTION={'kind':'dispute_resolution','semantics':'Arbitrator\x20↔\x20disputants\x20through\x20Arb\x20lifecycle\x20(order.move\x20dispute[]\x20/\x20claimed_by,\x20arb.move).','anchor_role':'arbitrator','counterparty_role':'disputants','tension':{'anchor_goal':'Resolve\x20with\x20a\x20defensible\x20proposition\x20before\x20the\x20voting\x20deadline.','counterparty_goal':'Maximize\x20own-side\x20indemnity\x20/\x20minimize\x20own-side\x20loss.','divergence':'Zero-sum\x20over\x20the\x20indemnity\x20amount\x20within\x20the\x20voting\x20deadline\x20window.','alignment_mechanisms':['voting_deadline\x20forces\x20resolution\x20(arb.move)','Voted\x20records\x20are\x20on-chain\x20and\x20auditable','compensation\x20claim\x20is\x20single-shot\x20(order\x20claimed_by\x20guard,\x20E_ORDER_ALREADY_CLAIMED)']}},VALUE_DISTRIBUTION={'kind':'value_distribution','semantics':'Declared\x20value\x20flow:\x20allocation\x20recipients\x20(Entity\x20/\x20Signer\x20/\x20GuardIdentifier)\x20sharing\x20escrowed\x20funds.','anchor_role':'payer\x20/\x20allocation\x20owner','counterparty_role':'recipient','tension':{'anchor_goal':'Control\x20outflow:\x20threshold,\x20max\x20cap,\x20guard-gated\x20release.','counterparty_goal':'Receive\x20distribution\x20as\x20early\x20and\x20as\x20fully\x20as\x20possible.','divergence':'Every\x20basis\x20point\x20of\x20Rate\x20sharing\x20is\x20contested;\x20Surplus\x20absorbs\x20the\x20remainder.','alignment_mechanisms':['Allocator\x20guard\x20must\x20pass\x20before\x20any\x20split\x20(allocation.move\x20alloc)','Rate\x20total\x20must\x20be\x20exactly\x2010000\x20without\x20Surplus\x20/\x20at\x20most\x2010000\x20with\x20one\x20(contract\x20invariants)','max\x20cap\x20for\x20Amount-mode\x20allocators\x20(allocation.move)','Payment\x20objects\x20record\x20the\x20per-recipient\x20breakdown\x20(payment.move\x20NewPaymentEvent)']}},CONTACT_MEMBERSHIP={'kind':'contact_membership','semantics':'Communication\x20channel\x20membership\x20(contact.move\x20ims[]).','anchor_role':'contact\x20owner','counterparty_role':'IM\x20member','tension':undefined};export const RELATIONSHIP_KIND_REGISTRY={'employment':EMPLOYMENT,'process_operation':PROCESS_OPERATION,'agency':AGENCY,'transaction':TRANSACTION,'supply':SUPPLY,'arbitration_delegation':ARBITRATION_DELEGATION,'dispute_resolution':DISPUTE_RESOLUTION,'value_distribution':VALUE_DISTRIBUTION,'contact_membership':CONTACT_MEMBERSHIP};export function interestHintsFor(a,b){const c=RELATIONSHIP_KIND_REGISTRY[a];if(!c?.['tension'])return{'gains':[],'exposures':[]};return b?{'gains':['Aligned\x20outcome\x20of:\x20'+c['tension']['anchor_goal']],'exposures':[c['tension']['divergence']]}:{'gains':['Aligned\x20outcome\x20of:\x20'+c['tension']['counterparty_goal']],'exposures':[c['tension']['divergence']]};}
@@ -0,0 +1,45 @@
1
+ export type PowerCarrier = "permission" | "machine_forward" | "order" | "demand_presenter" | "allocation_sharing" | "arbitration_binding" | "contact_im";
2
+ export type RelationshipKind = "employment" | "process_operation" | "agency" | "transaction" | "supply" | "arbitration_delegation" | "dispute_resolution" | "value_distribution" | "contact_membership";
3
+ export interface PowerDimension {
4
+ role_bits: number;
5
+ perm_indices: number[];
6
+ objects: Array<{
7
+ object_type: string;
8
+ address: string;
9
+ capacity: string;
10
+ }>;
11
+ carrier: PowerCarrier;
12
+ }
13
+ export interface InterestDimension {
14
+ gains: string[];
15
+ exposures: string[];
16
+ }
17
+ export interface ValueFlow {
18
+ from: string;
19
+ to: string;
20
+ carrier_object: string;
21
+ carrier_type: string;
22
+ amount?: string;
23
+ trigger: string;
24
+ }
25
+ export interface RelationshipEdge {
26
+ anchor: string;
27
+ counterparty: string;
28
+ kind: RelationshipKind;
29
+ power: PowerDimension;
30
+ interest: InterestDimension;
31
+ value_flows: ValueFlow[];
32
+ tension?: RelationshipTension;
33
+ }
34
+ export interface RelationshipTension {
35
+ anchor_goal: string;
36
+ counterparty_goal: string;
37
+ divergence: string;
38
+ alignment_mechanisms: string[];
39
+ }
40
+ export interface RelationshipProfile {
41
+ anchor: string;
42
+ edges: RelationshipEdge[];
43
+ by_counterparty: Record<string, RelationshipKind[]>;
44
+ notes: string[];
45
+ }
@@ -0,0 +1 @@
1
+ export{};
@@ -1 +1 @@
1
- import{groupRelated}from'./order.js';export function assembleProgressReview(a){const b=a['fields'],c=[{'label':'Machine','tip':'The\x20Machine\x20workflow\x20template\x20this\x20progress\x20runs\x20through\x20(progress.machine).','value':b['machine']?{'t':'addr','v':b['machine'],'obj_type':'Machine'}:null},{'label':'Current\x20node','tip':'The\x20workflow\x20node\x20this\x20progress\x20currently\x20sits\x20at\x20(progress.current).','value':b['current']?{'t':'text','v':b['current'],'tone':'strong'}:null},{'label':'Since','tip':'When\x20the\x20current\x20node\x20was\x20entered\x20(progress.current_time)\x20—\x20drives\x20the\x20elapsed\x20readout.','value':b['current_time']!=null?{'t':'time','v':b['current_time']}:null}],d={'kind':'fields','columns':0x2,'fields':[{'label':'Machine','tip':'The\x20Machine\x20workflow\x20template\x20this\x20progress\x20runs\x20through.','value':b['machine']?{'t':'addr','v':b['machine'],'obj_type':'Machine'}:null},{'label':'Current\x20node','tip':'The\x20workflow\x20node\x20this\x20progress\x20currently\x20sits\x20at.','value':b['current']?{'t':'text','v':b['current']}:null},{'label':'Task','tip':'The\x20Order\x20this\x20progress\x20is\x20working\x20on\x20(progress.task).','value':b['task']?{'t':'addr','v':b['task'],'obj_type':'Order'}:null},{'label':'History','tip':'Node-entry\x20records\x20kept\x20for\x20this\x20progress\x20(the\x20history\x20table\x27s\x20entry\x20count).','value':b['history_count']!=null?{'t':'text','v':String(b['history_count']),'tone':'strong'}:null},{'label':'Node\x20since','tip':'When\x20the\x20current\x20node\x20was\x20entered\x20(progress.current_time).','value':b['current_time']!=null?{'t':'time','v':b['current_time']}:null},{'label':'Context\x20repositories','tip':'Repositories\x20this\x20progress\x20may\x20consult\x20for\x20fulfillment\x20proofs\x20(machine\x20context\x20binding).','value':{'t':'count','n':a['context_repositories']['length'],'panel_title':'Context\x20repositories','addrs':a['context_repositories']}}]},e=a['session']?{'kind':'items','title':'Session\x20—\x20waiting\x20forwards\x20('+a['session']['forwards']['length']+')','empty':'No\x20live\x20session\x20—\x20this\x20progress\x20is\x20not\x20waiting\x20on\x20any\x20forward\x20approvals.','items':a['session']['forwards']['map']((j,k)=>({'name':'#'+(k+0x1)+'\x20'+j['forward'],...j['who']?{'ref':{'address':j['who'],'obj_type':'Account'}}:{},'meta':[...j['msg']?[{'label':'msg','value':j['msg'],'tip':'The\x20message\x20attached\x20to\x20this\x20forward.'}]:[]],'badge':j['accomplished']?{'v':'accomplished','tone':'green'}:{'v':'waiting','tone':'amber'}}))}:null,g={'kind':'items','title':'Operators\x20('+a['operators']['length']+')','empty':'No\x20named\x20operators\x20—\x20forwards\x20are\x20gated\x20by\x20the\x20machine\x27s\x20rules\x20only.','items':a['operators']['map']((j,k)=>({'name':'#'+(k+0x1)+'\x20'+j['name'],'meta':[...j['operators']['length']>0x0?[{'label':'accounts','value':String(j['operators']['length']),'tip':'Accounts\x20designated\x20under\x20this\x20operator\x20name\x20(machine.named_operator).'}]:[]]}))},h=a['related']?.['items']??[],i={'kind':'related','title':'Related\x20objects'+(a['related']?.['count']?'\x20('+a['related']['count']+')':''),'empty':'No\x20other\x20on-chain\x20objects\x20are\x20related\x20to\x20this\x20Progress\x20yet.','groups':groupRelated(h),'count':a['related']?.['count']??h['length']};return{'action':'review_pack','object_type':'Progress','head':{'address':a['object'],'network':a['network'],'name':a['head']['name'],'description':a['head']['description'],'tags':a['head']['tags'],'last_active_ms':b['current_time'],'badges':[],'info_rows':[c]},'sections':[d,...e?[e]:[],g,i],'data_gaps':a['data_gaps']};}
1
+ import{groupRelated}from'./order.js';export function assembleProgressReview(a){const b=a['fields'],c=[{'label':'Machine','tip':'The\x20Machine\x20workflow\x20template\x20this\x20progress\x20runs\x20through\x20(progress.machine).','value':b['machine']?{'t':'addr','v':b['machine'],'obj_type':'Machine'}:null},{'label':'Current\x20node','tip':'The\x20workflow\x20node\x20this\x20progress\x20currently\x20sits\x20at\x20(progress.current).','value':b['current']?{'t':'text','v':b['current'],'tone':'strong'}:null},{'label':'Since','tip':'When\x20the\x20current\x20node\x20was\x20entered\x20(progress.current_time)\x20—\x20drives\x20the\x20elapsed\x20readout.','value':b['current_time']!=null?{'t':'time','v':b['current_time']}:null}],d={'kind':'fields','columns':0x2,'fields':[{'label':'Machine','tip':'The\x20Machine\x20workflow\x20template\x20this\x20progress\x20runs\x20through.','value':b['machine']?{'t':'addr','v':b['machine'],'obj_type':'Machine'}:null},{'label':'Current\x20node','tip':'The\x20workflow\x20node\x20this\x20progress\x20currently\x20sits\x20at.','value':b['current']?{'t':'text','v':b['current']}:null},{'label':'Task','tip':'The\x20Order\x20this\x20progress\x20is\x20working\x20on\x20(progress.task).','value':b['task']?{'t':'addr','v':b['task'],'obj_type':'Order'}:null},{'label':'History','tip':'Node-entry\x20records\x20kept\x20for\x20this\x20progress\x20(the\x20history\x20table\x27s\x20entry\x20count).','value':b['history_count']!=null?{'t':'text','v':String(b['history_count']),'tone':'strong'}:null},{'label':'Node\x20since','tip':'When\x20the\x20current\x20node\x20was\x20entered\x20(progress.current_time).','value':b['current_time']!=null?{'t':'time','v':b['current_time']}:null},{'label':'Context\x20repositories','tip':'Repositories\x20this\x20progress\x20may\x20consult\x20for\x20fulfillment\x20proofs\x20(machine\x20context\x20binding).','value':{'t':'count','n':a['context_repositories']['length'],'panel_title':'Context\x20repositories','addrs':a['context_repositories']}}]},e=a['session']?{'kind':'items','title':'Session\x20—\x20waiting\x20forwards\x20('+a['session']['forwards']['length']+')','empty':'No\x20live\x20session\x20—\x20this\x20progress\x20is\x20not\x20waiting\x20on\x20any\x20forward\x20approvals.','items':a['session']['forwards']['map']((j,k)=>({'name':'#'+(k+0x1)+'\x20'+j['forward'],...j['who']?{'ref':{'address':j['who'],'obj_type':'Account'}}:{},'meta':[...j['msg']?[{'label':'msg','value':j['msg'],'tip':'The\x20message\x20attached\x20to\x20this\x20forward.'}]:[]],'badge':j['accomplished']?{'v':'accomplished','tone':'green'}:{'v':'waiting','tone':'amber'}}))}:null,g={'kind':'items','title':'Operators\x20('+a['operators']['length']+')','empty':'No\x20named\x20operators\x20—\x20forwards\x20are\x20gated\x20by\x20the\x20machine\x27s\x20rules\x20only.','items':a['operators']['map']((j,k)=>({'name':'#'+(k+0x1)+'\x20'+j['name'],'meta':[...j['operators']['length']>0x0?[{'label':'accounts','value':String(j['operators']['length']),'tip':'Accounts\x20designated\x20under\x20this\x20operator\x20name\x20(machine.named_operator).'}]:[]]}))},h=a['related']?.['items']??[],i={'kind':'related','title':'Related\x20objects'+(a['related']?.['count']?'\x20('+a['related']['count']+')':''),'empty':a['related']?.['key']?'No\x20other\x20on-chain\x20objects\x20are\x20related\x20to\x20this\x20Progress\x20yet.':'Related\x20objects\x20unavailable\x20—\x20the\x20machine\x20bound\x20to\x20this\x20Progress\x20is\x20unresolved,\x20so\x20sibling\x20progresses\x20cannot\x20be\x20listed.','groups':groupRelated(h),'count':a['related']?.['count']??h['length']};return{'action':'review_pack','object_type':'Progress','head':{'address':a['object'],'network':a['network'],'name':a['head']['name'],'description':a['head']['description'],'tags':a['head']['tags'],'last_active_ms':b['current_time'],'badges':[],'info_rows':[c]},'sections':[d,...e?[e]:[],g,i],'data_gaps':a['data_gaps']};}
@@ -1 +1 @@
1
- import{CONFIRMATION_RULES,resolveOverrideId}from'../knowledge/safety-rules.js';import{isEnabled as a318a}from'../config/index.js';import{isPlanPreapproved}from'../goal/plan-approval.js';export function isConfirmGateEnabled(){return a318a('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':!![]};if(getFailMode(g['level'])==='open'&&isPlanPreapproved(c))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']===!![];}
1
+ import{CONFIRMATION_RULES,resolveOverrideId}from'../knowledge/safety-rules.js';import{isEnabled as a325a}from'../config/index.js';import{isPlanPreapproved}from'../goal/plan-approval.js';export function isConfirmGateEnabled(){return a325a('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':!![]};if(getFailMode(g['level'])==='open'&&isPlanPreapproved(c))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']===!![];}
@@ -1 +1 @@
1
- import{formatShortAddress}from'../persona/address-format.js';const LEVEL_LABEL={'none':'none','standard':'Standard\x20confirmation','amount':'Amount\x20confirmation','publish':'Publish\x20confirmation\x20(irreversible\x20lock)','irreversible':'Irreversible\x20operation\x20confirmation'},CONFIRMATION_REQUIRED_OPERATIONS=['guard\x20(CREATE\x20—\x20immutable,\x20cannot\x20be\x20edited\x20or\x20deleted)','service\x20(publish=true\x20—\x20locks\x20machine/order_allocators)','machine\x20(publish=true\x20—\x20locks\x20nodes/pairs/forwards)','arbitration\x20(verdict\x20—\x20irreversible)','payment\x20(send\x20—\x20irreversible)','treasury\x20(withdraw/external_withdraw/external_deposit\x20—\x20irreversible)','reward\x20/\x20treasury\x20/\x20service.compensation_fund_add\x20(amount-sensitive)','gen_passport\x20(gas-consuming\x20test)'];export function renderPreview(a){const b=[];b['push']('⚠️\x20\x20Confirmation\x20required\x20—\x20'+LEVEL_LABEL[a['level']]),b['push']('\x20\x20Operation:\x20'+a['operation']);if(a['object'])b['push']('\x20\x20Object:\x20'+a['object']);if(a['network'])b['push']('\x20\x20Network:\x20'+a['network']);if(a['account']!==undefined)b['push']('\x20\x20Account:\x20'+(a['account']===''?'(default)':a['account']));a['amount']&&b['push']('\x20\x20Amount:\x20'+a['amount']['human_readable']+'\x20('+a['amount']['value']+'\x20smallest\x20unit)'+(a['amount']['recipient']?'\x20→\x20'+a['amount']['recipient']:''));a['immutable_after']&&a['immutable_after']['length']>0x0&&b['push']('\x20\x20Fields\x20becoming\x20immutable:\x20'+a['immutable_after']['join'](',\x20'));if(a['warnings']&&a['warnings']['length']>0x0){b['push']('\x20\x20Warnings:');for(const c of a['warnings'])b['push']('\x20\x20\x20\x20-\x20'+c);}a['irreversible']&&b['push']('\x20\x20⛔\x20This\x20operation\x20is\x20IRREVERSIBLE.\x20It\x20cannot\x20be\x20undone.');b['push'](''),b['push']('Confirm\x20by\x20re-calling\x20with\x20env.confirmed=true,\x20or\x20modify/cancel.'),b['push'](''),b['push']('Operations\x20that\x20require\x20env.confirmed=true:');for(const d of CONFIRMATION_REQUIRED_OPERATIONS){b['push']('\x20\x20-\x20'+d);}return b['push']('Example:\x20{\x22env\x22:\x20{\x22account\x22:\x20\x22...\x22,\x20\x22network\x22:\x20\x22testnet\x22,\x20\x22confirmed\x22:\x20true}}'),b['join']('\x0a');}const OPERATION_MEANINGS={'payment':'Send\x20a\x20payment\x20on-chain.\x20Funds\x20leave\x20your\x20account\x20and\x20are\x20credited\x20to\x20the\x20recipient.','service':'Publish\x20/\x20update\x20this\x20Service.\x20Publishing\x20locks\x20its\x20machine\x20and\x20order-allocator\x20configuration\x20—\x20further\x20changes\x20require\x20a\x20new\x20Service\x20version.','machine':'Publish\x20this\x20Machine\x20workflow.\x20Publishing\x20locks\x20its\x20nodes,\x20pairs\x20and\x20forwards\x20—\x20the\x20flow\x20cannot\x20be\x20redesigned\x20afterwards.','arbitration':'Issue\x20the\x20arbitration\x20verdict.\x20The\x20verdict\x20is\x20final\x20and\x20cannot\x20be\x20changed.','treasury':'Move\x20funds\x20in/out\x20of\x20a\x20Treasury.\x20Withdrawals\x20are\x20on-chain\x20transfers\x20and\x20cannot\x20be\x20undone.','reward':'Distribute\x20rewards\x20from\x20a\x20Service.\x20Funds\x20are\x20transferred\x20on-chain\x20immediately.','guard':'Create\x20a\x20Guard.\x20Guards\x20are\x20CREATE-only\x20and\x20immutable\x20—\x20they\x20can\x20never\x20be\x20edited\x20or\x20deleted;\x20changing\x20one\x20means\x20creating\x20a\x20new\x20Guard\x20and\x20rebinding.','progress':'Advance\x20an\x20order\x20(Progress\x20node).\x20Depending\x20on\x20the\x20node\x20this\x20may\x20release\x20funds\x20to\x20the\x20counterparty.','gen_passport':'Run\x20a\x20Guard\x20test\x20(generate\x20a\x20test\x20Passport).\x20This\x20consumes\x20gas\x20but\x20changes\x20nothing\x20permanent.'};function fallbackMeaning(a){return'Execute\x20the\x20\x22'+a+'\x22\x20operation\x20on-chain.';}function shortish(a){return/^(0x)?[0-9a-fA-F]{8,64}$/['test'](a)?formatShortAddress(a):a;}export function renderPreviewHuman(a){const b=[];b['push']('What\x20this\x20does'),b['push']('\x20\x20'+(OPERATION_MEANINGS[a['operation']]??fallbackMeaning(a['operation']))),b['push'](''),b['push']('How\x20it\x20will\x20run');if(a['object'])b['push']('\x20\x20Object:\x20\x20\x20'+shortish(a['object']));a['account']!==undefined&&b['push']('\x20\x20Account:\x20\x20'+(a['account']===''?'(current\x20account)':shortish(a['account'])));if(a['network'])b['push']('\x20\x20Network:\x20\x20'+a['network']);a['amount']&&b['push']('\x20\x20Amount:\x20\x20\x20'+a['amount']['human_readable']+(a['amount']['recipient']?'\x20\x20→\x20\x20to\x20'+shortish(a['amount']['recipient']):''));b['push'](''),b['push']('What\x20happens\x20after\x20you\x20confirm');a['immutable_after']&&a['immutable_after']['length']>0x0&&b['push']('\x20\x20-\x20These\x20become\x20PERMANENT:\x20'+a['immutable_after']['join'](',\x20'));a['irreversible']&&b['push']('\x20\x20-\x20The\x20operation\x20is\x20IRREVERSIBLE\x20—\x20it\x20cannot\x20be\x20undone\x20or\x20cancelled.');if(a['warnings']&&a['warnings']['length']>0x0){b['push']('\x20\x20Notes:');for(const c of a['warnings'])b['push']('\x20\x20\x20\x20-\x20'+c);}return!(a['immutable_after']&&a['immutable_after']['length']>0x0)&&!a['irreversible']&&!(a['warnings']&&a['warnings']['length']>0x0)&&b['push']('\x20\x20-\x20The\x20operation\x20is\x20submitted\x20to\x20the\x20network\x20immediately.'),b['join']('\x0a');}
1
+ import{formatShortAddress}from'../persona/address-format.js';const LEVEL_LABEL={'none':'none','standard':'Standard\x20confirmation','amount':'Amount\x20confirmation','publish':'Publish\x20confirmation\x20(irreversible\x20lock)','irreversible':'Irreversible\x20operation\x20confirmation'},CONFIRMATION_REQUIRED_OPERATIONS=['guard\x20(CREATE\x20—\x20immutable,\x20cannot\x20be\x20edited\x20or\x20deleted)','service\x20(publish=true\x20—\x20locks\x20machine/order_allocators)','machine\x20(publish=true\x20—\x20locks\x20nodes/pairs/forwards)','arbitration\x20(verdict\x20—\x20irreversible)','payment\x20(send/receive\x20—\x20irreversible)','treasury\x20(withdraw/external_withdraw/external_deposit\x20—\x20irreversible)','reward\x20coin_add\x20/\x20treasury\x20deposit\x20/\x20allocation\x20funding\x20/\x20arbitration\x20fee\x20/\x20service\x20compensation_fund_add\x20/\x20service\x20order_new\x20payment\x20(amount-sensitive)','progress\x20(node\x20advance\x20—\x20may\x20release\x20funds;\x20owner_receive\x20—\x20fund\x20claim)','gen_passport\x20(gas-consuming\x20test)'];export function renderPreview(a){const b=[];b['push']('⚠️\x20\x20Confirmation\x20required\x20—\x20'+LEVEL_LABEL[a['level']]),b['push']('\x20\x20Operation:\x20'+a['operation']);if(a['object'])b['push']('\x20\x20Object:\x20'+a['object']);if(a['network'])b['push']('\x20\x20Network:\x20'+a['network']);if(a['account']!==undefined)b['push']('\x20\x20Account:\x20'+(a['account']===''?'(default)':a['account']));a['amount']&&b['push']('\x20\x20Amount:\x20'+a['amount']['human_readable']+'\x20('+a['amount']['value']+'\x20smallest\x20unit)'+(a['amount']['recipient']?'\x20→\x20'+a['amount']['recipient']:''));a['immutable_after']&&a['immutable_after']['length']>0x0&&b['push']('\x20\x20Fields\x20becoming\x20immutable:\x20'+a['immutable_after']['join'](',\x20'));if(a['warnings']&&a['warnings']['length']>0x0){b['push']('\x20\x20Warnings:');for(const c of a['warnings'])b['push']('\x20\x20\x20\x20-\x20'+c);}a['irreversible']&&b['push']('\x20\x20⛔\x20This\x20operation\x20is\x20IRREVERSIBLE.\x20It\x20cannot\x20be\x20undone.');b['push'](''),b['push']('Confirm\x20by\x20re-calling\x20with\x20env.confirmed=true,\x20or\x20modify/cancel.'),b['push'](''),b['push']('Operations\x20that\x20require\x20env.confirmed=true:');for(const d of CONFIRMATION_REQUIRED_OPERATIONS){b['push']('\x20\x20-\x20'+d);}return b['push']('Example:\x20{\x22env\x22:\x20{\x22account\x22:\x20\x22...\x22,\x20\x22network\x22:\x20\x22testnet\x22,\x20\x22confirmed\x22:\x20true}}'),b['join']('\x0a');}const OPERATION_MEANINGS={'payment':'Send\x20a\x20payment\x20on-chain.\x20Funds\x20leave\x20your\x20account\x20and\x20are\x20credited\x20to\x20the\x20recipient.','service':'Publish\x20/\x20update\x20this\x20Service.\x20Publishing\x20locks\x20its\x20machine\x20and\x20order-allocator\x20configuration\x20—\x20further\x20changes\x20require\x20a\x20new\x20Service\x20version.','machine':'Publish\x20this\x20Machine\x20workflow.\x20Publishing\x20locks\x20its\x20nodes,\x20pairs\x20and\x20forwards\x20—\x20the\x20flow\x20cannot\x20be\x20redesigned\x20afterwards.','arbitration':'Issue\x20the\x20arbitration\x20verdict.\x20The\x20verdict\x20is\x20final\x20and\x20cannot\x20be\x20changed.','treasury':'Move\x20funds\x20in/out\x20of\x20a\x20Treasury.\x20Withdrawals\x20are\x20on-chain\x20transfers\x20and\x20cannot\x20be\x20undone.','reward':'Distribute\x20rewards\x20from\x20a\x20Service.\x20Funds\x20are\x20transferred\x20on-chain\x20immediately.','guard':'Create\x20a\x20Guard.\x20Guards\x20are\x20CREATE-only\x20and\x20immutable\x20—\x20they\x20can\x20never\x20be\x20edited\x20or\x20deleted;\x20changing\x20one\x20means\x20creating\x20a\x20new\x20Guard\x20and\x20rebinding.','progress':'Advance\x20an\x20order\x20(Progress\x20node).\x20Depending\x20on\x20the\x20node\x20this\x20may\x20release\x20funds\x20to\x20the\x20counterparty.','gen_passport':'Run\x20a\x20Guard\x20test\x20(generate\x20a\x20test\x20Passport).\x20This\x20consumes\x20gas\x20but\x20changes\x20nothing\x20permanent.'};function fallbackMeaning(a){return'Execute\x20the\x20\x22'+a+'\x22\x20operation\x20on-chain.';}function shortish(a){return/^(0x)?[0-9a-fA-F]{8,64}$/['test'](a)?formatShortAddress(a):a;}export function renderPreviewHuman(a){const b=[];b['push']('What\x20this\x20does'),b['push']('\x20\x20'+(OPERATION_MEANINGS[a['operation']]??fallbackMeaning(a['operation']))),b['push'](''),b['push']('How\x20it\x20will\x20run');if(a['object'])b['push']('\x20\x20Object:\x20\x20\x20'+shortish(a['object']));a['account']!==undefined&&b['push']('\x20\x20Account:\x20\x20'+(a['account']===''?'(current\x20account)':shortish(a['account'])));if(a['network'])b['push']('\x20\x20Network:\x20\x20'+a['network']);a['amount']&&b['push']('\x20\x20Amount:\x20\x20\x20'+a['amount']['human_readable']+(a['amount']['recipient']?'\x20\x20→\x20\x20to\x20'+shortish(a['amount']['recipient']):''));b['push'](''),b['push']('What\x20happens\x20after\x20you\x20confirm');a['immutable_after']&&a['immutable_after']['length']>0x0&&b['push']('\x20\x20-\x20These\x20become\x20PERMANENT:\x20'+a['immutable_after']['join'](',\x20'));a['irreversible']&&b['push']('\x20\x20-\x20The\x20operation\x20is\x20IRREVERSIBLE\x20—\x20it\x20cannot\x20be\x20undone\x20or\x20cancelled.');if(a['warnings']&&a['warnings']['length']>0x0){b['push']('\x20\x20Notes:');for(const c of a['warnings'])b['push']('\x20\x20\x20\x20-\x20'+c);}return!(a['immutable_after']&&a['immutable_after']['length']>0x0)&&!a['irreversible']&&!(a['warnings']&&a['warnings']['length']>0x0)&&b['push']('\x20\x20-\x20The\x20operation\x20is\x20submitted\x20to\x20the\x20network\x20immediately.'),b['join']('\x0a');}
@@ -13,17 +13,17 @@ export declare const EvmAddressSchema: z.ZodString;
13
13
  export declare const BridgeAmountSchema: z.ZodString;
14
14
  export declare const BridgeIdempotencyKeySchema: z.ZodString;
15
15
  export declare const BridgeOperationTypeSchema: z.ZodEnum<{
16
- withdraw: "withdraw";
17
16
  cross_chain_wow_to_evm: "cross_chain_wow_to_evm";
18
17
  cross_chain_evm_to_wow: "cross_chain_evm_to_wow";
18
+ claim_wow_to_evm: "claim_wow_to_evm";
19
+ resume_transfer: "resume_transfer";
20
+ withdraw: "withdraw";
19
21
  query_active_evm_account: "query_active_evm_account";
20
22
  query_supported_evm_chains: "query_supported_evm_chains";
21
23
  query_supported_tokens: "query_supported_tokens";
22
24
  query_transfer_list: "query_transfer_list";
23
25
  query_transfer_status: "query_transfer_status";
24
26
  manage_evm_rpc: "manage_evm_rpc";
25
- claim_wow_to_evm: "claim_wow_to_evm";
26
- resume_transfer: "resume_transfer";
27
27
  }>;
28
28
  export declare const BridgeWowToEvmDataSchema: z.ZodObject<{
29
29
  token: z.ZodEnum<{
@@ -268,6 +268,24 @@ export declare const BridgeOperationsSchema: z.ZodPreprocess<z.ZodDiscriminatedU
268
268
  mainnet: "mainnet";
269
269
  }>>;
270
270
  }, z.core.$strict>;
271
+ env: z.ZodOptional<z.ZodObject<{
272
+ account: z.ZodDefault<z.ZodOptional<z.ZodString>>;
273
+ permission_guard: z.ZodOptional<z.ZodArray<z.ZodString>>;
274
+ no_cache: z.ZodOptional<z.ZodBoolean>;
275
+ network: z.ZodOptional<z.ZodEnum<{
276
+ testnet: import("@wowok/wowok").ENTRYPOINT.Testnet;
277
+ localnet: import("@wowok/wowok").ENTRYPOINT.Localnet;
278
+ mainnet: import("@wowok/wowok").ENTRYPOINT.Mainnet;
279
+ }>>;
280
+ referrer: z.ZodOptional<z.ZodString>;
281
+ no_auto_register: z.ZodOptional<z.ZodBoolean>;
282
+ confirmed: z.ZodOptional<z.ZodBoolean>;
283
+ user_intent_phrases: z.ZodOptional<z.ZodArray<z.ZodString>>;
284
+ plan_approval: z.ZodOptional<z.ZodString>;
285
+ client_schema_version: z.ZodOptional<z.ZodString>;
286
+ schema_strict_mode: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
287
+ dry_run: z.ZodOptional<z.ZodBoolean>;
288
+ }, z.core.$strict>>;
271
289
  }, z.core.$strip>, z.ZodObject<{
272
290
  operation_type: z.ZodLiteral<"query_active_evm_account">;
273
291
  data: z.ZodOptional<z.ZodObject<{
@@ -1039,6 +1057,10 @@ export declare const BridgeCallOutputSchema: z.ZodObject<{
1039
1057
  }>>;
1040
1058
  retryable: z.ZodOptional<z.ZodBoolean>;
1041
1059
  recovery_hint: z.ZodOptional<z.ZodString>;
1060
+ }, z.core.$strip>, z.ZodObject<{
1061
+ type: z.ZodLiteral<"pending_confirmation">;
1062
+ preview: z.ZodUnknown;
1063
+ rule_id: z.ZodString;
1042
1064
  }, z.core.$strip>], "type">;
1043
1065
  semantic: z.ZodOptional<z.ZodObject<{
1044
1066
  intent: z.ZodString;
@@ -1 +1 @@
1
- import{z}from'zod';import{CallEnvSchema,SemanticSummarySchema}from'./base.js';import{WowAddressSchema}from'../common/index.js';export const BridgeTokenSchema=z['enum'](['ETH','WETH','WBTC','USDC','USDT'])['describe']('Cross-chain\x20token\x20identifier.\x20ETH=native\x20ETH;\x20WETH/WBTC/USDC/USDT=ERC20.\x20Decimals\x20are\x20handled\x20by\x20SDK\x20config.');export const EvmChainSchema=z['enum'](['mainnet'])['default']('mainnet')['describe']('EVM\x20chain\x20identifier.\x20Currently\x20only\x20\x27mainnet\x27\x20(Ethereum\x20mainnet,\x20chainId=1)\x20is\x20supported.\x20Extensible\x20to\x20BSC/Polygon/Arbitrum\x20in\x20the\x20future.');export const EvmAddressSchema=z['string']()['regex'](/^0x[0-9a-fA-F]{40}$/,'Invalid\x20EVM\x20address\x20(must\x20be\x200x\x20+\x2040\x20hex)')['describe']('EVM\x20address\x20(0x\x20+\x2040\x20hex)');export const BridgeAmountSchema=z['string']()['describe']('Cross-chain\x20amount\x20as\x20a\x20string\x20in\x20the\x20smallest\x20unit\x20(e.g.\x20wei\x20/\x20token\x20minimal\x20unit).\x20Example:\x201\x20ETH\x20=\x20\x271000000000000000000\x27');export const BridgeIdempotencyKeySchema=z['string']()['min'](0x1)['max'](0x80)['describe']('Idempotency\x20key\x20(1-128\x20chars).\x20Prevents\x20duplicate\x20transfers\x20on\x20retry.\x20If\x20a\x20successful\x20transfer\x20with\x20this\x20key\x20exists,\x20returns\x20it\x20immediately\x20(idempotentHit=true).');export const BridgeOperationTypeSchema=z['enum'](['cross_chain_wow_to_evm','cross_chain_evm_to_wow','claim_wow_to_evm','resume_transfer','withdraw','query_active_evm_account','query_supported_evm_chains','query_supported_tokens','query_transfer_list','query_transfer_status','manage_evm_rpc'])['describe']('Bridge\x20operation\x20type');export const BridgeWowToEvmDataSchema=z['object']({'token':BridgeTokenSchema['describe']('Cross-chain\x20token\x20type'),'amount':BridgeAmountSchema['describe']('Cross-chain\x20amount\x20(WOW-side\x20smallest\x20unit,\x20wowDecimals)'),'withdrawTo':EvmAddressSchema['optional']()['describe']('Final\x20withdrawal\x20EVM\x20address;\x20if\x20omitted,\x20assets\x20remain\x20in\x20activeEvmAccount.\x20When\x20provided,\x20the\x20SDK\x20uses\x20the\x20activeEvmAccount\x20key\x20to\x20transfer\x20to\x20this\x20address.'),'idempotencyKey':BridgeIdempotencyKeySchema['optional']()['describe']('Idempotency\x20key\x20to\x20prevent\x20duplicate\x20deposits\x20on\x20retry.\x20If\x20a\x20successful\x20transfer\x20with\x20this\x20key\x20exists,\x20returns\x20it\x20immediately\x20(idempotentHit=true).'),'idempotentByParams':z['boolean']()['optional']()['describe']('If\x20true,\x20auto-generates\x20an\x20idempotency\x20key\x20from\x20token+amount+withdrawTo.\x20Use\x20when\x20you\x20want\x20implicit\x20idempotency\x20without\x20managing\x20explicit\x20keys.')})['strict']()['describe']('WOW→EVM\x20cross-chain\x20(step\x201:\x20deposit\x20only).\x20'+'Returns\x20immediately\x20with\x20depositTxDigest\x20+\x20bridgeSeq\x20+\x20transferId.\x20'+'This\x20operation\x20only\x20locks\x20assets\x20on\x20WOW;\x20it\x20does\x20NOT\x20complete\x20the\x20cross-chain.\x20'+'After\x20deposit,\x20bridge\x20nodes\x20need\x20~1-5\x20minutes\x20to\x20sign.\x20'+'Use\x20query_transfer_status\x20to\x20monitor\x20progress;\x20when\x20latestState.step\x20shows\x20\x27signatures_ready\x27,\x20'+'call\x20claim_wow_to_evm\x20(step\x202)\x20to\x20claim\x20assets\x20on\x20EVM.\x20'+'[Gas\x20requirements]\x20Step\x201\x20needs\x20WOW\x20gas;\x20Step\x202\x20(claim_wow_to_evm)\x20needs\x20activeEvmAccount\x20to\x20have\x20target-chain\x20gas.');export const BridgeEvmToWowDataSchema=z['object']({'token':BridgeTokenSchema['describe']('Cross-chain\x20token\x20type\x20(ETH=native\x20ETH,\x20others\x20are\x20ERC20)'),'amount':BridgeAmountSchema['describe']('Cross-chain\x20amount\x20(EVM-side\x20smallest\x20unit,\x20evmDecimals)'),'recipientWowAddress':WowAddressSchema['optional']()['describe']('WOW\x20recipient\x20address\x20or\x20account\x20name;\x20defaults\x20to\x20env.account\x20if\x20omitted'),'idempotencyKey':BridgeIdempotencyKeySchema['optional']()['describe']('Idempotency\x20key\x20to\x20prevent\x20duplicate\x20deposits\x20on\x20retry.\x20If\x20a\x20successful\x20transfer\x20with\x20this\x20key\x20exists,\x20returns\x20it\x20immediately\x20(idempotentHit=true).'),'idempotentByParams':z['boolean']()['optional']()['describe']('If\x20true,\x20auto-generates\x20an\x20idempotency\x20key\x20from\x20token+amount+recipientWowAddress.\x20Use\x20when\x20you\x20want\x20implicit\x20idempotency\x20without\x20managing\x20explicit\x20keys.')})['strict']()['describe']('EVM→WOW\x20cross-chain\x20(single\x20step:\x20deposit).\x20'+'Returns\x20immediately\x20with\x20depositTxHash\x20+\x20transferId.\x20'+'Bridge\x20will\x20automatically\x20claim\x20on\x20WOW\x20(no\x20WOW\x20gas\x20needed,\x20no\x20user\x20action\x20required).\x20'+'[Time\x20estimate]\x20~10-20\x20minutes\x20total:\x20'+'(1)\x2064-block\x20confirmation\x20~12.8\x20min\x20on\x20ETH;\x20'+'(2)\x20bridge\x20node\x20auto-claim\x20~1-5\x20min\x20on\x20WOW.\x20'+'[Status\x20flow]\x20Use\x20query_transfer_status(refresh=true)\x20to\x20monitor:\x20'+'latestState.step:\x20source_tx_pending\x20→\x20source_tx_confirmed\x20→\x20signatures_ready\x20→\x20completed.\x20'+'When\x20latestState.confirmations\x20>=\x2064,\x20deposit\x20is\x20finalized\x20and\x20bridge\x20nodes\x20will\x20sign.\x20'+'[Gas\x20requirements]\x20Only\x20needs\x20activeEvmAccount\x20to\x20have\x20target-chain\x20gas\x20(for\x20deposit).\x20No\x20WOW\x20gas\x20needed.');export const BridgeClaimWowToEvmDataSchema=z['object']({'transferId':z['string']()['describe']('Transfer\x20ID\x20from\x20cross_chain_wow_to_evm\x20(br_<timestamp>_<counter>)')})['strict']()['describe']('WOW→EVM\x20claim\x20(step\x202):\x20claim\x20assets\x20on\x20EVM\x20after\x20bridge\x20nodes\x20have\x20signed.\x20'+'Prerequisite:\x20cross_chain_wow_to_evm\x20(step\x201)\x20must\x20be\x20completed,\x20and\x20query_transfer_status\x20'+'must\x20show\x20latestState.step\x20=\x20\x27signatures_ready\x27\x20or\x20\x27source_tx_confirmed\x27\x20(nodes\x20have\x20approved).\x20'+'Returns\x20claimTxHash\x20on\x20success.\x20'+'After\x20claim_wow_to_evm\x20returns,\x20the\x20claim\x20tx\x20has\x20been\x20submitted\x20and\x20confirmed\x20(1\x20block)\x20on\x20EVM.\x20'+'Use\x20query_transfer_status(refresh=true)\x20to\x20verify\x20latestState.step\x20=\x20\x27completed\x27.\x20'+'[Gas\x20requirements]\x20Requires\x20activeEvmAccount\x20to\x20have\x20target-chain\x20gas\x20(for\x20the\x20claim\x20transaction).');export const BridgeResumeTransferDataSchema=z['object']({'transferId':z['string']()['describe']('Transfer\x20ID\x20to\x20resume\x20(br_<timestamp>_<counter>)')})['strict']()['describe']('Resume\x20an\x20interrupted\x20transfer\x20from\x20its\x20current\x20step.\x20'+'Use\x20this\x20when\x20a\x20transfer\x20was\x20interrupted\x20(e.g.\x20MCP\x20restart,\x20network\x20error)\x20and\x20you\x20want\x20to\x20continue\x20from\x20where\x20it\x20left\x20off.\x20'+'The\x20SDK\x20determines\x20the\x20current\x20step\x20and\x20attempts\x20to\x20advance\x20it:\x20'+'-\x20If\x20deposit\x20step\x20failed:\x20retries\x20the\x20deposit\x20'+'-\x20If\x20deposit\x20is\x20pending/confirmed:\x20waits\x20for\x20bridge\x20signatures\x20and\x20proceeds\x20to\x20claim\x20'+'-\x20If\x20claim\x20step\x20is\x20ready:\x20executes\x20the\x20claim\x20'+'-\x20If\x20transfer\x20is\x20already\x20complete:\x20returns\x20the\x20existing\x20record\x20(idempotentHit=true)\x20'+'[Returns]\x20The\x20updated\x20transfer\x20record\x20after\x20attempting\x20to\x20advance\x20it.\x20'+'[Requires\x20env]\x20WOW\x20env\x20is\x20needed\x20for\x20WOW-side\x20operations;\x20EVM-side\x20operations\x20use\x20activeEvmAccount.');export const BridgeWithdrawDataSchema=z['object']({'to':EvmAddressSchema['describe']('Withdrawal\x20target\x20EVM\x20address'),'amount':BridgeAmountSchema['describe']('Withdrawal\x20amount\x20(smallest\x20unit)'),'token':BridgeTokenSchema['optional']()['describe']('ERC20\x20token\x20identifier;\x20if\x20omitted\x20or\x20ETH,\x20withdraws\x20native\x20ETH'),'tokenAddress':EvmAddressSchema['optional']()['describe']('ERC20\x20contract\x20address\x20(alternative\x20to\x20token;\x20allows\x20withdrawing\x20by\x20contract\x20address)'),'network':EvmChainSchema['describe']('Target\x20chain\x20(defaults\x20to\x20Ethereum\x20mainnet\x20when\x20omitted\x20—\x20EvmChainSchema\x20carries\x20.default(\x22mainnet\x22))')})['strict']()['describe']('Withdraw\x20from\x20activeEvmAccount\x20to\x20another\x20EVM\x20address');export const BridgeQueryActiveEvmAccountDataSchema=z['object']({'network':EvmChainSchema['optional']()['describe']('Specific\x20chain;\x20if\x20omitted,\x20queries\x20all\x20supported\x20chains'),'tokens':z['array'](EvmAddressSchema)['optional']()['describe']('Additional\x20ERC20\x20token\x20contract\x20addresses\x20to\x20query;\x20if\x20omitted,\x20only\x20native\x20ETH\x20balance\x20is\x20queried')})['strict']()['describe']('Query\x20activeEvmAccount\x20parameters');export const BridgeQuerySupportedTokensDataSchema=z['object']({'network':EvmChainSchema['optional']()['describe']('Specific\x20chain;\x20if\x20omitted,\x20returns\x20token\x20lists\x20for\x20all\x20supported\x20chains')})['strict']()['describe']('Query\x20supported\x20Bridge\x20tokens\x20per\x20chain\x20(WOW/EVM\x20addresses,\x20decimals,\x20description)');export const BridgeQueryTransferListDataSchema=z['object']({'onlyActive':z['boolean']()['optional']()['describe']('true\x20returns\x20only\x20in-progress\x20transfers;\x20false/omitted\x20returns\x20all'),'status':z['enum'](['pending','in_progress','success','failed'])['optional']()['describe']('Filter\x20by\x20transfer\x20status'),'direction':z['enum'](['wow_to_evm','evm_to_wow','withdraw'])['optional']()['describe']('Filter\x20by\x20transfer\x20direction'),'token':BridgeTokenSchema['optional']()['describe']('Filter\x20by\x20token\x20type\x20(ETH/WETH/WBTC/USDC/USDT)'),'limit':z['number']()['int']()['positive']()['max'](0x64)['optional']()['describe']('Maximum\x20number\x20of\x20results\x20(default:\x20all,\x20max:\x20100)')})['strict']()['describe']('Query\x20transfer\x20list\x20with\x20optional\x20filters\x20(status\x20/\x20direction\x20/\x20token\x20/\x20limit)');export const BridgeQueryTransferStatusDataSchema=z['object']({'transferId':z['string']()['describe']('Transfer\x20ID\x20(br_<timestamp>_<counter>)'),'refresh':z['boolean']()['optional']()['default'](!![])['describe']('Whether\x20to\x20refresh\x20from\x20on-chain\x20state\x20(default\x20true).\x20'+'true=queries\x20latest\x20on-chain\x20status\x20(takes\x205-15s,\x20timeout\x20at\x2015s\x20on\x20slow\x20RPC).\x20'+'false=instant\x20response\x20from\x20local\x20cache\x20(no\x20on-chain\x20query).\x20'+'Recommended:\x20use\x20refresh=true\x20every\x201-2\x20minutes\x20for\x20ongoing\x20transfers;\x20'+'use\x20refresh=false\x20for\x20quick\x20checks\x20between\x20refreshes.')})['strict']()['describe']('Query\x20single\x20transfer\x20parameters.\x20'+'[Wait\x20hint]\x20With\x20refresh=true\x20(default),\x20this\x20call\x20may\x20take\x205-15\x20seconds\x20to\x20query\x20on-chain\x20state.\x20'+'If\x20on-chain\x20RPC\x20is\x20slow,\x20it\x20will\x20timeout\x20at\x2015s\x20and\x20return\x20cached\x20state.\x20'+'Set\x20refresh=false\x20for\x20instant\x20response\x20from\x20local\x20cache.\x20'+'[Returned\x20fields]\x20The\x20result\x20includes:\x20'+'(1)\x20record.step/status\x20-\x20high-level\x20lifecycle\x20(deposit/claimed/success);\x20'+'(2)\x20record.latestState.step/status\x20-\x20fine-grained\x20on-chain\x20progress\x20'+'(source_tx_pending\x20→\x20source_tx_confirmed\x20→\x20signatures_ready\x20→\x20completed).\x20'+'Use\x20latestState.confirmations\x20to\x20estimate\x20remaining\x20time\x20(needs\x2064\x20for\x20ETH→WOW\x20finalization).');export const BridgeManageEvmRpcDataSchema=z['discriminatedUnion']('op',[z['object']({'op':z['literal']('list')['describe']('List\x20all\x20configured\x20RPC\x20endpoints\x20with\x20health\x20status'),'network':EvmChainSchema['describe']('Target\x20chain\x20(defaults\x20to\x20Ethereum\x20mainnet\x20when\x20omitted\x20—\x20EvmChainSchema\x20carries\x20.default(\x22mainnet\x22))')})['describe']('List\x20RPC\x20endpoints\x20(no\x20rpcUrl/rpcUrls\x20needed)'),z['object']({'op':z['literal']('add')['describe']('Append\x20one\x20or\x20more\x20RPC\x20endpoints'),'network':EvmChainSchema['describe']('Target\x20chain\x20(defaults\x20to\x20Ethereum\x20mainnet\x20when\x20omitted\x20—\x20EvmChainSchema\x20carries\x20.default(\x22mainnet\x22))'),'rpcUrls':z['array'](z['string']()['url']())['min'](0x1)['describe']('RPC\x20URL(s)\x20to\x20add')})['describe']('Add\x20RPC\x20endpoint(s)'),z['object']({'op':z['literal']('remove')['describe']('Remove\x20one\x20or\x20more\x20RPC\x20endpoints'),'network':EvmChainSchema['describe']('Target\x20chain\x20(defaults\x20to\x20Ethereum\x20mainnet\x20when\x20omitted\x20—\x20EvmChainSchema\x20carries\x20.default(\x22mainnet\x22))'),'rpcUrls':z['array'](z['string']()['url']())['min'](0x1)['describe']('RPC\x20URL(s)\x20to\x20remove')})['describe']('Remove\x20RPC\x20endpoint(s)'),z['object']({'op':z['literal']('set')['describe']('Full\x20replace\x20all\x20RPC\x20endpoints'),'network':EvmChainSchema['describe']('Target\x20chain\x20(defaults\x20to\x20Ethereum\x20mainnet\x20when\x20omitted\x20—\x20EvmChainSchema\x20carries\x20.default(\x22mainnet\x22))'),'rpcUrls':z['array'](z['string']()['url']())['min'](0x1)['describe']('Full\x20RPC\x20list\x20(replaces\x20all\x20existing\x20endpoints)')})['describe']('Full\x20replace\x20RPC\x20endpoints'),z['object']({'op':z['literal']('ping')['describe']('Health\x20check\x20one\x20or\x20more\x20RPC\x20endpoints'),'network':EvmChainSchema['describe']('Target\x20chain\x20(defaults\x20to\x20Ethereum\x20mainnet\x20when\x20omitted\x20—\x20EvmChainSchema\x20carries\x20.default(\x22mainnet\x22))'),'rpcUrls':z['array'](z['string']()['url']())['optional']()['describe']('Specific\x20RPC\x20URLs\x20to\x20ping;\x20if\x20omitted,\x20pings\x20all\x20configured\x20RPCs')})['describe']('Health\x20check\x20RPC\x20endpoints')])['describe']('EVM\x20RPC\x20endpoint\x20management\x20(discriminated\x20by\x20op)');export const BridgeOperationsSchema=z['preprocess'](a=>{if(typeof a==='object'&&a!==null){const b={...a};if(typeof b['description']==='string'&&!b['operation_type'])try{const c=JSON['parse'](b['description']);if(c&&typeof c==='object'&&c['operation_type'])return c;}catch{}if(typeof b['data']==='string')try{b['data']=JSON['parse'](b['data']);}catch{}if(typeof b['env']==='string')try{b['env']=JSON['parse'](b['env']);}catch{}return b;}return a;},z['discriminatedUnion']('operation_type',[z['object']({'operation_type':z['literal']('cross_chain_wow_to_evm'),'data':BridgeWowToEvmDataSchema,'env':CallEnvSchema['optional']()})['describe']('WOW→EVM\x20cross-chain\x20(simplified):\x20assets\x20auto-claim\x20to\x20activeEvmAccount;\x20if\x20withdrawTo\x20is\x20provided,\x20an\x20additional\x20transfer\x20is\x20made\x20to\x20that\x20address.\x20[Requires\x20WOW\x20mainnet\x20env]'),z['object']({'operation_type':z['literal']('cross_chain_evm_to_wow'),'data':BridgeEvmToWowDataSchema,'env':CallEnvSchema['optional']()})['describe']('EVM→WOW\x20cross-chain\x20(single\x20step):\x20deposit\x20from\x20activeEvmAccount,\x20bridge\x20auto-claims\x20on\x20WOW.\x20No\x20WOW\x20gas\x20needed.\x20[Requires\x20WOW\x20mainnet\x20env]'),z['object']({'operation_type':z['literal']('claim_wow_to_evm'),'data':BridgeClaimWowToEvmDataSchema,'env':CallEnvSchema['optional']()})['describe']('WOW→EVM\x20claim\x20(step\x202):\x20claim\x20assets\x20on\x20EVM\x20after\x20bridge\x20signed.\x20Requires\x20activeEvmAccount\x20to\x20have\x20EVM\x20gas.\x20[Requires\x20WOW\x20mainnet\x20env]'),z['object']({'operation_type':z['literal']('resume_transfer'),'data':BridgeResumeTransferDataSchema,'env':CallEnvSchema['optional']()})['describe']('Resume\x20an\x20interrupted\x20transfer\x20from\x20its\x20current\x20step.\x20Safe\x20to\x20retry.\x20[Requires\x20WOW\x20mainnet\x20env\x20for\x20WOW-side\x20operations]'),z['object']({'operation_type':z['literal']('withdraw'),'data':BridgeWithdrawDataSchema})['describe']('Withdraw\x20from\x20activeEvmAccount\x20to\x20another\x20EVM\x20address\x20(non-cross-chain).\x20[No\x20env\x20needed]'),z['object']({'operation_type':z['literal']('query_active_evm_account'),'data':BridgeQueryActiveEvmAccountDataSchema['optional']()})['describe']('Query\x20activeEvmAccount\x20address\x20+\x20balances\x20(per\x20chain\x20or\x20all\x20chains).\x20[No\x20env\x20needed]'),z['object']({'operation_type':z['literal']('query_supported_evm_chains')})['describe']('List\x20currently\x20supported\x20EVM\x20chains\x20(enum\x20value\x20/\x20description\x20/\x20chainId\x20/\x20RPC\x20health).\x20[No\x20env\x20needed,\x20no\x20data\x20required]'),z['object']({'operation_type':z['literal']('query_supported_tokens'),'data':BridgeQuerySupportedTokensDataSchema['optional']()})['describe']('List\x20supported\x20Bridge\x20tokens\x20per\x20chain\x20(WOW/EVM\x20contract\x20addresses,\x20decimals,\x20description).\x20[No\x20env\x20needed]'),z['object']({'operation_type':z['literal']('query_transfer_list'),'data':BridgeQueryTransferListDataSchema['optional']()})['describe']('Query\x20cross-chain\x20/\x20withdrawal\x20transfer\x20history\x20list\x20(optionally\x20only\x20in-progress).\x20[No\x20env\x20needed]'),z['object']({'operation_type':z['literal']('query_transfer_status'),'data':BridgeQueryTransferStatusDataSchema})['describe']('Query\x20a\x20single\x20transfer\x27s\x20detail\x20by\x20transferId'),z['object']({'operation_type':z['literal']('manage_evm_rpc'),'data':BridgeManageEvmRpcDataSchema})['describe']('Manage\x20EVM\x20RPC\x20endpoints\x20(list/add/remove/set/ping)\x20to\x20mitigate\x20public\x20RPC\x20429\x20rate\x20limits.\x20[No\x20env\x20needed]')]));export const BridgeLatestStateSchema=z['object']({'status':z['enum'](['not_started','pending','confirmed','signatures_ready','claiming','completed','failed'])['describe']('On-chain\x20status\x20(finer-grained\x20than\x20record.status):\x20'+'pending=source\x20tx\x20submitted\x20but\x20not\x20confirmed;\x20'+'confirmed=source\x20tx\x20confirmed,\x20waiting\x20for\x20bridge\x20node\x20signatures;\x20'+'signatures_ready=nodes\x20signed,\x20ready\x20to\x20claim;\x20'+'claiming=claim\x20tx\x20submitted,\x20waiting\x20for\x20confirmation;\x20'+'completed=fully\x20completed,\x20assets\x20arrived\x20on\x20target\x20chain;\x20'+'failed=on-chain\x20failure'),'step':z['enum'](['not_started','source_tx_pending','source_tx_confirmed','node_signing','signatures_ready','claim_tx_pending','completed','failed'])['describe']('Detailed\x20step\x20(more\x20granular\x20than\x20status).\x20'+'source_tx_pending=source\x20chain\x20tx\x20waiting\x20for\x20block\x20confirmation;\x20'+'source_tx_confirmed=source\x20confirmed,\x20waiting\x20for\x20bridge\x20nodes\x20to\x20approve;\x20'+'node_signing=nodes\x20collecting\x20signatures;\x20'+'signatures_ready=sufficient\x20signatures\x20collected,\x20ready\x20to\x20claim\x20on\x20target\x20chain;\x20'+'claim_tx_pending=claim\x20tx\x20submitted\x20on\x20target\x20chain,\x20waiting\x20for\x20confirmation;\x20'+'completed=assets\x20arrived\x20on\x20target\x20chain;\x20'+'failed=error\x20occurred'),'stepDescription':z['string']()['optional']()['describe']('Human-readable\x20step\x20description\x20(Chinese)'),'direction':z['enum'](['wow_to_evm','evm_to_wow'])['optional'](),'sourceTxHash':z['string']()['optional']()['describe']('Source\x20chain\x20tx\x20hash/digest'),'bridgeSeq':z['string']()['optional']()['describe']('Bridge\x20sequence\x20number'),'confirmations':z['number']()['optional']()['describe']('Source\x20chain\x20confirmation\x20count\x20(EVM→WOW\x20only;\x20needs\x2064\x20for\x20finalization)'),'claimTxDigest':z['string']()['optional']()['describe']('WOW\x20claim\x20tx\x20digest\x20(evm_to_wow,\x20when\x20completed)'),'claimReceipt':z['any']()['optional']()['describe']('EVM\x20claim\x20tx\x20receipt\x20(wow_to_evm,\x20when\x20available)'),'ethReceipt':z['any']()['optional']()['describe']('EVM\x20source\x20tx\x20receipt\x20(evm_to_wow)'),'wowReceipt':z['any']()['optional']()['describe']('WOW\x20source\x20tx\x20receipt\x20(wow_to_evm)'),'error':z['string']()['optional']()['describe']('Error\x20message\x20if\x20step=failed'),'hint':z['string']()['optional']()['describe']('Hint\x20message\x20for\x20next\x20action\x20(e.g.,\x20when\x20claim_wow_to_evm\x20not\x20yet\x20called)'),'updatedAt':z['number']()['optional']()['describe']('Last\x20on-chain\x20update\x20timestamp\x20(ms)')})['describe']('Latest\x20on-chain\x20state\x20(from\x20refresh=true\x20query)');export const BridgeTransferRecordSchema=z['object']({'transferId':z['string']()['describe']('Unique\x20ID\x20(br_<timestamp>_<counter>)'),'direction':z['enum'](['wow_to_evm','evm_to_wow','withdraw'])['describe']('Transfer\x20direction'),'token':BridgeTokenSchema['describe']('Token\x20identifier'),'amount':z['string']()['describe']('Amount\x20in\x20smallest\x20unit\x20(string\x20to\x20avoid\x20bigint\x20issues)'),'recipientEth':z['string']()['optional']()['describe']('ETH-side\x20recipient\x20address'),'recipientWow':z['string']()['optional']()['describe']('WOW-side\x20recipient\x20address'),'intermediateEthAccount':z['string']()['describe']('Intermediate\x20EVM\x20account\x20(activeEvmAccount)'),'idempotencyKey':z['string']()['optional']()['describe']('Idempotency\x20key\x20used\x20for\x20this\x20transfer\x20(if\x20any)'),'step':z['enum'](['init','deposit','claimed','withdraw','withdrawn'])['describe']('Current\x20step\x20in\x20the\x20transfer\x20lifecycle:\x20'+'init=just\x20created;\x20'+'deposit=source\x20chain\x20deposit\x20in\x20progress;\x20'+'claimed=claim\x20completed\x20on\x20target\x20chain\x20(success);\x20'+'withdraw=intermediate→final\x20withdraw\x20in\x20progress;\x20'+'withdrawn=withdraw\x20completed'),'status':z['enum'](['pending','in_progress','success','failed'])['describe']('Transfer\x20status:\x20pending/in_progress=ongoing;\x20success=fully\x20completed;\x20failed=error'),'depositTxHash':z['string']()['optional']()['describe']('EVM\x20deposit\x20tx\x20hash\x20(evm_to_wow)'),'depositTxDigest':z['string']()['optional']()['describe']('WOW\x20deposit\x20tx\x20digest\x20(wow_to_evm)'),'bridgeSeq':z['string']()['optional']()['describe']('Bridge\x20sequence\x20number'),'claimTxHash':z['string']()['optional']()['describe']('EVM\x20claim\x20tx\x20hash\x20(wow_to_evm)'),'claimTxDigest':z['string']()['optional']()['describe']('WOW\x20claim\x20tx\x20digest\x20(evm_to_wow)'),'withdrawTxHash':z['string']()['optional']()['describe']('EVM\x20withdraw\x20tx\x20hash\x20(withdraw\x20step)'),'error':z['string']()['optional']()['describe']('Error\x20message\x20if\x20status=failed'),'createdAt':z['number']()['describe']('Creation\x20timestamp\x20(ms)'),'updatedAt':z['number']()['describe']('Last\x20update\x20timestamp\x20(ms)'),'latestState':BridgeLatestStateSchema['optional']()['describe']('Latest\x20on-chain\x20state\x20(only\x20present\x20after\x20refresh=true\x20query).\x20'+'Provides\x20real-time\x20progress:\x20confirmations\x20count,\x20node\x20signing\x20status,\x20claim\x20tx\x20hash,\x20etc.\x20'+'Use\x20this\x20to\x20estimate\x20remaining\x20time\x20and\x20next\x20action.')})['strict']()['describe']('Bridge\x20transfer\x20record');export const BridgeWowToEvmResultSchema=z['object']({'depositTxDigest':z['string']()['describe']('WOW\x20deposit\x20tx\x20digest'),'bridgeSeq':z['string']()['describe']('Bridge\x20sequence\x20number'),'activeEvmAccount':z['string']()['describe']('activeEvmAccount\x20address\x20that\x20will\x20receive\x20the\x20assets'),'transferId':z['string']()['describe']('Transfer\x20ID\x20(br_<timestamp>_<counter>).\x20Save\x20this\x20for\x20claim_wow_to_evm\x20(step\x202)\x20and\x20query_transfer_status'),'idempotentHit':z['boolean']()['optional']()['describe']('true\x20if\x20this\x20result\x20was\x20returned\x20from\x20idempotency\x20cache\x20(no\x20new\x20deposit\x20executed)'),'idempotencyKey':z['string']()['optional']()['describe']('Idempotency\x20key\x20used\x20(if\x20any)')})['strict']()['describe']('WOW→EVM\x20cross-chain\x20step\x201\x20result\x20(deposit\x20only,\x20claim\x20pending)');export const BridgeEvmToWowResultSchema=z['object']({'depositTxHash':z['string']()['describe']('EVM\x20deposit\x20tx\x20hash'),'activeEvmAccount':z['string']()['describe']('activeEvmAccount\x20address\x20that\x20initiated\x20the\x20deposit'),'transferId':z['string']()['describe']('Transfer\x20ID\x20(br_<timestamp>_<counter>).\x20Save\x20this\x20for\x20query_transfer_status'),'idempotentHit':z['boolean']()['optional']()['describe']('true\x20if\x20this\x20result\x20was\x20returned\x20from\x20idempotency\x20cache\x20(no\x20new\x20deposit\x20executed)'),'idempotencyKey':z['string']()['optional']()['describe']('Idempotency\x20key\x20used\x20(if\x20any)')})['strict']()['describe']('EVM→WOW\x20cross-chain\x20result\x20(deposit\x20submitted,\x20auto-claim\x20in\x20progress)');export const BridgeClaimWowToEvmResultSchema=z['object']({'claimTxHash':z['string']()['describe']('EVM\x20claim\x20tx\x20hash'),'transferId':z['string']()['describe']('Transfer\x20ID')})['strict']()['describe']('WOW→EVM\x20claim\x20(step\x202)\x20result');export const BridgeWithdrawResultSchema=z['object']({'txHash':z['string']()['describe']('EVM\x20withdraw\x20tx\x20hash'),'transferId':z['string']()['describe']('Transfer\x20ID\x20(br_<timestamp>_<counter>)')})['strict']()['describe']('Withdraw\x20from\x20activeEvmAccount\x20result');export const BridgeQueryActiveEvmAccountResultSchema=z['object']({'address':z['string']()['describe']('activeEvmAccount\x20address\x20(0x\x20+\x2040\x20hex)'),'chains':z['array'](z['object']({'chainId':z['number']()['describe']('EVM\x20chain\x20ID'),'name':z['string']()['describe']('Chain\x20name'),'nativeBalance':z['string']()['describe']('Native\x20ETH\x20balance\x20(wei,\x20string)'),'tokens':z['array'](z['object']({'tokenAddress':z['string']()['describe']('ERC20\x20token\x20contract\x20address'),'balance':z['string']()['describe']('Token\x20balance\x20(smallest\x20unit,\x20string)')}))['optional']()['describe']('Additional\x20ERC20\x20token\x20balances\x20(if\x20requested)')}))['describe']('Per-chain\x20balance\x20information')})['strict']()['describe']('activeEvmAccount\x20query\x20result');export const BridgeQuerySupportedEvmChainsResultSchema=z['array'](z['object']({'chainId':z['number']()['describe']('EVM\x20chain\x20ID'),'name':z['string']()['describe']('Chain\x20name\x20(enum\x20value)'),'description':z['string']()['describe']('Human-readable\x20chain\x20description'),'bridgeChainId':z['number']()['describe']('Bridge\x20protocol\x20chain\x20ID'),'explorerUrl':z['string']()['describe']('Block\x20explorer\x20URL'),'rpcCount':z['number']()['describe']('Total\x20configured\x20RPC\x20endpoints'),'healthyRpcCount':z['number']()['describe']('Currently\x20healthy\x20RPC\x20endpoints')}))['describe']('List\x20of\x20supported\x20EVM\x20chains');export const BridgeQuerySupportedTokensResultSchema=z['array'](z['object']({'chainId':z['number']()['describe']('EVM\x20chain\x20ID'),'chainName':z['string']()['describe']('Chain\x20name'),'bridgeChainId':z['number']()['describe']('Bridge\x20protocol\x20chain\x20ID'),'tokens':z['array'](z['object']({'tokenId':z['number']()['describe']('On-chain\x20token\x20ID'),'symbol':z['string']()['describe']('Token\x20symbol\x20(ETH/WETH/WBTC/USDC/USDT)'),'evmAddress':z['string']()['describe']('EVM-side\x20contract\x20address\x20(0x000...000\x20for\x20native\x20ETH)'),'evmDecimals':z['number']()['describe']('EVM-side\x20decimals'),'wowTypeTag':z['string']()['describe']('WOW-side\x20type\x20tag'),'wowDecimals':z['number']()['describe']('WOW-side\x20decimals'),'description':z['string']()['describe']('Token\x20description')}))['describe']('Tokens\x20available\x20on\x20this\x20chain')}))['describe']('Supported\x20Bridge\x20tokens\x20per\x20chain');export const BridgeQueryTransferListResultSchema=z['array'](BridgeTransferRecordSchema)['describe']('Transfer\x20history\x20list');export const BridgeQueryTransferStatusResultSchema=BridgeTransferRecordSchema['nullable']()['describe']('Single\x20transfer\x20detail\x20(null\x20if\x20not\x20found)');export const BridgeManageEvmRpcResultSchema=z['object']({'op':z['string']()['describe']('Operation\x20performed\x20(list/add/remove/set/ping)'),'success':z['boolean']()['describe']('Whether\x20the\x20operation\x20succeeded'),'result':z['any']()['optional']()['describe']('Operation-specific\x20result\x20(list=array\x20of\x20RPC\x20status,\x20ping=health\x20results,\x20add/remove/set=void)')})['strict']()['describe']('EVM\x20RPC\x20management\x20result');export const BridgeOutputSchema=z['discriminatedUnion']('operation_type',[z['object']({'operation_type':z['literal']('cross_chain_wow_to_evm'),'result':BridgeWowToEvmResultSchema,'message':z['string']()['optional']()['describe']('Result\x20summary\x20or\x20hint\x20message')})['describe']('WOW→EVM\x20cross-chain\x20result'),z['object']({'operation_type':z['literal']('cross_chain_evm_to_wow'),'result':BridgeEvmToWowResultSchema,'message':z['string']()['optional']()['describe']('Result\x20summary\x20or\x20hint\x20message')})['describe']('EVM→WOW\x20cross-chain\x20result'),z['object']({'operation_type':z['literal']('claim_wow_to_evm'),'result':BridgeClaimWowToEvmResultSchema,'message':z['string']()['optional']()['describe']('Result\x20summary\x20or\x20hint\x20message')})['describe']('WOW→EVM\x20claim\x20(step\x202)\x20result'),z['object']({'operation_type':z['literal']('resume_transfer'),'result':BridgeTransferRecordSchema,'message':z['string']()['optional']()['describe']('Result\x20summary\x20or\x20hint\x20message')})['describe']('Resume\x20interrupted\x20transfer\x20result'),z['object']({'operation_type':z['literal']('withdraw'),'result':BridgeWithdrawResultSchema,'message':z['string']()['optional']()['describe']('Result\x20summary\x20or\x20hint\x20message')})['describe']('Withdraw\x20from\x20activeEvmAccount\x20result'),z['object']({'operation_type':z['literal']('query_active_evm_account'),'result':BridgeQueryActiveEvmAccountResultSchema,'message':z['string']()['optional']()['describe']('Result\x20summary\x20or\x20hint\x20message')})['describe']('activeEvmAccount\x20query\x20result'),z['object']({'operation_type':z['literal']('query_supported_evm_chains'),'result':BridgeQuerySupportedEvmChainsResultSchema,'message':z['string']()['optional']()['describe']('Result\x20summary\x20or\x20hint\x20message')})['describe']('Supported\x20EVM\x20chains\x20result'),z['object']({'operation_type':z['literal']('query_supported_tokens'),'result':BridgeQuerySupportedTokensResultSchema,'message':z['string']()['optional']()['describe']('Result\x20summary\x20or\x20hint\x20message')})['describe']('Supported\x20Bridge\x20tokens\x20per\x20chain\x20result'),z['object']({'operation_type':z['literal']('query_transfer_list'),'result':BridgeQueryTransferListResultSchema,'message':z['string']()['optional']()['describe']('Result\x20summary\x20or\x20hint\x20message')})['describe']('Transfer\x20history\x20list\x20result'),z['object']({'operation_type':z['literal']('query_transfer_status'),'result':BridgeQueryTransferStatusResultSchema,'message':z['string']()['optional']()['describe']('Result\x20summary\x20or\x20hint\x20message')})['describe']('Single\x20transfer\x20detail\x20result'),z['object']({'operation_type':z['literal']('manage_evm_rpc'),'result':BridgeManageEvmRpcResultSchema,'message':z['string']()['optional']()['describe']('Result\x20summary\x20or\x20hint\x20message')})['describe']('EVM\x20RPC\x20management\x20result')])['describe']('Bridge\x20operation\x20result\x20(discriminated\x20by\x20operation_type\x20with\x20per-operation\x20typed\x20result)');export const BridgeCallOutputSchema=z['object']({'message':z['string']()['optional']()['describe']('Result\x20summary\x20or\x20hint\x20message'),'result':z['discriminatedUnion']('type',[z['object']({'type':z['literal']('data'),'data':z['unknown']()['describe']('Operation\x20result\x20data\x20(structure\x20varies\x20by\x20operation_type)')})['describe']('Successful\x20result'),z['object']({'type':z['literal']('error'),'error':z['string']()['describe']('Error\x20message'),'error_code':z['enum'](['invalid_parameter','guard_rejected','state_conflict','insufficient_balance','object_not_found','permission_denied','immutable_violation','network_error','rate_limit','gas_exceeded','bcs_error','signature_error','config_error','wip_verification_failed','unknown'])['optional']()['describe']('Error\x20classification\x20for\x20programmatic\x20recovery'),'retryable':z['boolean']()['optional']()['describe']('Whether\x20the\x20operation\x20can\x20be\x20retried\x20as-is'),'recovery_hint':z['string']()['optional']()['describe']('Recovery\x20suggestion\x20for\x20AI\x20or\x20user')})['describe']('Error\x20result')])['describe']('Bridge\x20operation\x20result\x20(data\x20or\x20error)'),'semantic':SemanticSummarySchema['optional']()['describe']('Business\x20semantic\x20summary\x20for\x20bridge\x20operation')})['describe']('Bridge\x20operation\x20output\x20(matches\x20CallOutput\x20structure\x20returned\x20by\x20the\x20handler)');
1
+ import{z}from'zod';import{CallEnvSchema,SemanticSummarySchema}from'./base.js';import{WowAddressSchema}from'../common/index.js';export const BridgeTokenSchema=z['enum'](['ETH','WETH','WBTC','USDC','USDT'])['describe']('Cross-chain\x20token\x20identifier.\x20ETH=native\x20ETH;\x20WETH/WBTC/USDC/USDT=ERC20.\x20Decimals\x20are\x20handled\x20by\x20SDK\x20config.');export const EvmChainSchema=z['enum'](['mainnet'])['default']('mainnet')['describe']('EVM\x20chain\x20identifier.\x20Currently\x20only\x20\x27mainnet\x27\x20(Ethereum\x20mainnet,\x20chainId=1)\x20is\x20supported.\x20Extensible\x20to\x20BSC/Polygon/Arbitrum\x20in\x20the\x20future.');export const EvmAddressSchema=z['string']()['regex'](/^0x[0-9a-fA-F]{40}$/,'Invalid\x20EVM\x20address\x20(must\x20be\x200x\x20+\x2040\x20hex)')['describe']('EVM\x20address\x20(0x\x20+\x2040\x20hex)');export const BridgeAmountSchema=z['string']()['describe']('Cross-chain\x20amount\x20as\x20a\x20string\x20in\x20the\x20smallest\x20unit\x20(e.g.\x20wei\x20/\x20token\x20minimal\x20unit).\x20Example:\x201\x20ETH\x20=\x20\x271000000000000000000\x27');export const BridgeIdempotencyKeySchema=z['string']()['min'](0x1)['max'](0x80)['describe']('Idempotency\x20key\x20(1-128\x20chars).\x20Prevents\x20duplicate\x20transfers\x20on\x20retry.\x20If\x20a\x20successful\x20transfer\x20with\x20this\x20key\x20exists,\x20returns\x20it\x20immediately\x20(idempotentHit=true).');export const BridgeOperationTypeSchema=z['enum'](['cross_chain_wow_to_evm','cross_chain_evm_to_wow','claim_wow_to_evm','resume_transfer','withdraw','query_active_evm_account','query_supported_evm_chains','query_supported_tokens','query_transfer_list','query_transfer_status','manage_evm_rpc'])['describe']('Bridge\x20operation\x20type');export const BridgeWowToEvmDataSchema=z['object']({'token':BridgeTokenSchema['describe']('Cross-chain\x20token\x20type'),'amount':BridgeAmountSchema['describe']('Cross-chain\x20amount\x20(WOW-side\x20smallest\x20unit,\x20wowDecimals)'),'withdrawTo':EvmAddressSchema['optional']()['describe']('Final\x20withdrawal\x20EVM\x20address;\x20if\x20omitted,\x20assets\x20remain\x20in\x20activeEvmAccount.\x20When\x20provided,\x20the\x20SDK\x20uses\x20the\x20activeEvmAccount\x20key\x20to\x20transfer\x20to\x20this\x20address.'),'idempotencyKey':BridgeIdempotencyKeySchema['optional']()['describe']('Idempotency\x20key\x20to\x20prevent\x20duplicate\x20deposits\x20on\x20retry.\x20If\x20a\x20successful\x20transfer\x20with\x20this\x20key\x20exists,\x20returns\x20it\x20immediately\x20(idempotentHit=true).'),'idempotentByParams':z['boolean']()['optional']()['describe']('If\x20true,\x20auto-generates\x20an\x20idempotency\x20key\x20from\x20token+amount+withdrawTo.\x20Use\x20when\x20you\x20want\x20implicit\x20idempotency\x20without\x20managing\x20explicit\x20keys.')})['strict']()['describe']('WOW→EVM\x20cross-chain\x20(step\x201:\x20deposit\x20only).\x20'+'Returns\x20immediately\x20with\x20depositTxDigest\x20+\x20bridgeSeq\x20+\x20transferId.\x20'+'This\x20operation\x20only\x20locks\x20assets\x20on\x20WOW;\x20it\x20does\x20NOT\x20complete\x20the\x20cross-chain.\x20'+'After\x20deposit,\x20bridge\x20nodes\x20need\x20~1-5\x20minutes\x20to\x20sign.\x20'+'Use\x20query_transfer_status\x20to\x20monitor\x20progress;\x20when\x20latestState.step\x20shows\x20\x27signatures_ready\x27,\x20'+'call\x20claim_wow_to_evm\x20(step\x202)\x20to\x20claim\x20assets\x20on\x20EVM.\x20'+'[Gas\x20requirements]\x20Step\x201\x20needs\x20WOW\x20gas;\x20Step\x202\x20(claim_wow_to_evm)\x20needs\x20activeEvmAccount\x20to\x20have\x20target-chain\x20gas.');export const BridgeEvmToWowDataSchema=z['object']({'token':BridgeTokenSchema['describe']('Cross-chain\x20token\x20type\x20(ETH=native\x20ETH,\x20others\x20are\x20ERC20)'),'amount':BridgeAmountSchema['describe']('Cross-chain\x20amount\x20(EVM-side\x20smallest\x20unit,\x20evmDecimals)'),'recipientWowAddress':WowAddressSchema['optional']()['describe']('WOW\x20recipient\x20address\x20or\x20account\x20name;\x20defaults\x20to\x20env.account\x20if\x20omitted'),'idempotencyKey':BridgeIdempotencyKeySchema['optional']()['describe']('Idempotency\x20key\x20to\x20prevent\x20duplicate\x20deposits\x20on\x20retry.\x20If\x20a\x20successful\x20transfer\x20with\x20this\x20key\x20exists,\x20returns\x20it\x20immediately\x20(idempotentHit=true).'),'idempotentByParams':z['boolean']()['optional']()['describe']('If\x20true,\x20auto-generates\x20an\x20idempotency\x20key\x20from\x20token+amount+recipientWowAddress.\x20Use\x20when\x20you\x20want\x20implicit\x20idempotency\x20without\x20managing\x20explicit\x20keys.')})['strict']()['describe']('EVM→WOW\x20cross-chain\x20(single\x20step:\x20deposit).\x20'+'Returns\x20immediately\x20with\x20depositTxHash\x20+\x20transferId.\x20'+'Bridge\x20will\x20automatically\x20claim\x20on\x20WOW\x20(no\x20WOW\x20gas\x20needed,\x20no\x20user\x20action\x20required).\x20'+'[Time\x20estimate]\x20~10-20\x20minutes\x20total:\x20'+'(1)\x2064-block\x20confirmation\x20~12.8\x20min\x20on\x20ETH;\x20'+'(2)\x20bridge\x20node\x20auto-claim\x20~1-5\x20min\x20on\x20WOW.\x20'+'[Status\x20flow]\x20Use\x20query_transfer_status(refresh=true)\x20to\x20monitor:\x20'+'latestState.step:\x20source_tx_pending\x20→\x20source_tx_confirmed\x20→\x20signatures_ready\x20→\x20completed.\x20'+'When\x20latestState.confirmations\x20>=\x2064,\x20deposit\x20is\x20finalized\x20and\x20bridge\x20nodes\x20will\x20sign.\x20'+'[Gas\x20requirements]\x20Only\x20needs\x20activeEvmAccount\x20to\x20have\x20target-chain\x20gas\x20(for\x20deposit).\x20No\x20WOW\x20gas\x20needed.');export const BridgeClaimWowToEvmDataSchema=z['object']({'transferId':z['string']()['describe']('Transfer\x20ID\x20from\x20cross_chain_wow_to_evm\x20(br_<timestamp>_<counter>)')})['strict']()['describe']('WOW→EVM\x20claim\x20(step\x202):\x20claim\x20assets\x20on\x20EVM\x20after\x20bridge\x20nodes\x20have\x20signed.\x20'+'Prerequisite:\x20cross_chain_wow_to_evm\x20(step\x201)\x20must\x20be\x20completed,\x20and\x20query_transfer_status\x20'+'must\x20show\x20latestState.step\x20=\x20\x27signatures_ready\x27\x20or\x20\x27source_tx_confirmed\x27\x20(nodes\x20have\x20approved).\x20'+'Returns\x20claimTxHash\x20on\x20success.\x20'+'After\x20claim_wow_to_evm\x20returns,\x20the\x20claim\x20tx\x20has\x20been\x20submitted\x20and\x20confirmed\x20(1\x20block)\x20on\x20EVM.\x20'+'Use\x20query_transfer_status(refresh=true)\x20to\x20verify\x20latestState.step\x20=\x20\x27completed\x27.\x20'+'[Gas\x20requirements]\x20Requires\x20activeEvmAccount\x20to\x20have\x20target-chain\x20gas\x20(for\x20the\x20claim\x20transaction).');export const BridgeResumeTransferDataSchema=z['object']({'transferId':z['string']()['describe']('Transfer\x20ID\x20to\x20resume\x20(br_<timestamp>_<counter>)')})['strict']()['describe']('Resume\x20an\x20interrupted\x20transfer\x20from\x20its\x20current\x20step.\x20'+'Use\x20this\x20when\x20a\x20transfer\x20was\x20interrupted\x20(e.g.\x20MCP\x20restart,\x20network\x20error)\x20and\x20you\x20want\x20to\x20continue\x20from\x20where\x20it\x20left\x20off.\x20'+'The\x20SDK\x20determines\x20the\x20current\x20step\x20and\x20attempts\x20to\x20advance\x20it:\x20'+'-\x20If\x20deposit\x20step\x20failed:\x20retries\x20the\x20deposit\x20'+'-\x20If\x20deposit\x20is\x20pending/confirmed:\x20waits\x20for\x20bridge\x20signatures\x20and\x20proceeds\x20to\x20claim\x20'+'-\x20If\x20claim\x20step\x20is\x20ready:\x20executes\x20the\x20claim\x20'+'-\x20If\x20transfer\x20is\x20already\x20complete:\x20returns\x20the\x20existing\x20record\x20(idempotentHit=true)\x20'+'[Returns]\x20The\x20updated\x20transfer\x20record\x20after\x20attempting\x20to\x20advance\x20it.\x20'+'[Requires\x20env]\x20WOW\x20env\x20is\x20needed\x20for\x20WOW-side\x20operations;\x20EVM-side\x20operations\x20use\x20activeEvmAccount.');export const BridgeWithdrawDataSchema=z['object']({'to':EvmAddressSchema['describe']('Withdrawal\x20target\x20EVM\x20address'),'amount':BridgeAmountSchema['describe']('Withdrawal\x20amount\x20(smallest\x20unit)'),'token':BridgeTokenSchema['optional']()['describe']('ERC20\x20token\x20identifier;\x20if\x20omitted\x20or\x20ETH,\x20withdraws\x20native\x20ETH'),'tokenAddress':EvmAddressSchema['optional']()['describe']('ERC20\x20contract\x20address\x20(alternative\x20to\x20token;\x20allows\x20withdrawing\x20by\x20contract\x20address)'),'network':EvmChainSchema['describe']('Target\x20chain\x20(defaults\x20to\x20Ethereum\x20mainnet\x20when\x20omitted\x20—\x20EvmChainSchema\x20carries\x20.default(\x22mainnet\x22))')})['strict']()['describe']('Withdraw\x20from\x20activeEvmAccount\x20to\x20another\x20EVM\x20address');export const BridgeQueryActiveEvmAccountDataSchema=z['object']({'network':EvmChainSchema['optional']()['describe']('Specific\x20chain;\x20if\x20omitted,\x20queries\x20all\x20supported\x20chains'),'tokens':z['array'](EvmAddressSchema)['optional']()['describe']('Additional\x20ERC20\x20token\x20contract\x20addresses\x20to\x20query;\x20if\x20omitted,\x20only\x20native\x20ETH\x20balance\x20is\x20queried')})['strict']()['describe']('Query\x20activeEvmAccount\x20parameters');export const BridgeQuerySupportedTokensDataSchema=z['object']({'network':EvmChainSchema['optional']()['describe']('Specific\x20chain;\x20if\x20omitted,\x20returns\x20token\x20lists\x20for\x20all\x20supported\x20chains')})['strict']()['describe']('Query\x20supported\x20Bridge\x20tokens\x20per\x20chain\x20(WOW/EVM\x20addresses,\x20decimals,\x20description)');export const BridgeQueryTransferListDataSchema=z['object']({'onlyActive':z['boolean']()['optional']()['describe']('true\x20returns\x20only\x20in-progress\x20transfers;\x20false/omitted\x20returns\x20all'),'status':z['enum'](['pending','in_progress','success','failed'])['optional']()['describe']('Filter\x20by\x20transfer\x20status'),'direction':z['enum'](['wow_to_evm','evm_to_wow','withdraw'])['optional']()['describe']('Filter\x20by\x20transfer\x20direction'),'token':BridgeTokenSchema['optional']()['describe']('Filter\x20by\x20token\x20type\x20(ETH/WETH/WBTC/USDC/USDT)'),'limit':z['number']()['int']()['positive']()['max'](0x64)['optional']()['describe']('Maximum\x20number\x20of\x20results\x20(default:\x20all,\x20max:\x20100)')})['strict']()['describe']('Query\x20transfer\x20list\x20with\x20optional\x20filters\x20(status\x20/\x20direction\x20/\x20token\x20/\x20limit)');export const BridgeQueryTransferStatusDataSchema=z['object']({'transferId':z['string']()['describe']('Transfer\x20ID\x20(br_<timestamp>_<counter>)'),'refresh':z['boolean']()['optional']()['default'](!![])['describe']('Whether\x20to\x20refresh\x20from\x20on-chain\x20state\x20(default\x20true).\x20'+'true=queries\x20latest\x20on-chain\x20status\x20(takes\x205-15s,\x20timeout\x20at\x2015s\x20on\x20slow\x20RPC).\x20'+'false=instant\x20response\x20from\x20local\x20cache\x20(no\x20on-chain\x20query).\x20'+'Recommended:\x20use\x20refresh=true\x20every\x201-2\x20minutes\x20for\x20ongoing\x20transfers;\x20'+'use\x20refresh=false\x20for\x20quick\x20checks\x20between\x20refreshes.')})['strict']()['describe']('Query\x20single\x20transfer\x20parameters.\x20'+'[Wait\x20hint]\x20With\x20refresh=true\x20(default),\x20this\x20call\x20may\x20take\x205-15\x20seconds\x20to\x20query\x20on-chain\x20state.\x20'+'If\x20on-chain\x20RPC\x20is\x20slow,\x20it\x20will\x20timeout\x20at\x2015s\x20and\x20return\x20cached\x20state.\x20'+'Set\x20refresh=false\x20for\x20instant\x20response\x20from\x20local\x20cache.\x20'+'[Returned\x20fields]\x20The\x20result\x20includes:\x20'+'(1)\x20record.step/status\x20-\x20high-level\x20lifecycle\x20(deposit/claimed/success);\x20'+'(2)\x20record.latestState.step/status\x20-\x20fine-grained\x20on-chain\x20progress\x20'+'(source_tx_pending\x20→\x20source_tx_confirmed\x20→\x20signatures_ready\x20→\x20completed).\x20'+'Use\x20latestState.confirmations\x20to\x20estimate\x20remaining\x20time\x20(needs\x2064\x20for\x20ETH→WOW\x20finalization).');export const BridgeManageEvmRpcDataSchema=z['discriminatedUnion']('op',[z['object']({'op':z['literal']('list')['describe']('List\x20all\x20configured\x20RPC\x20endpoints\x20with\x20health\x20status'),'network':EvmChainSchema['describe']('Target\x20chain\x20(defaults\x20to\x20Ethereum\x20mainnet\x20when\x20omitted\x20—\x20EvmChainSchema\x20carries\x20.default(\x22mainnet\x22))')})['describe']('List\x20RPC\x20endpoints\x20(no\x20rpcUrl/rpcUrls\x20needed)'),z['object']({'op':z['literal']('add')['describe']('Append\x20one\x20or\x20more\x20RPC\x20endpoints'),'network':EvmChainSchema['describe']('Target\x20chain\x20(defaults\x20to\x20Ethereum\x20mainnet\x20when\x20omitted\x20—\x20EvmChainSchema\x20carries\x20.default(\x22mainnet\x22))'),'rpcUrls':z['array'](z['string']()['url']())['min'](0x1)['describe']('RPC\x20URL(s)\x20to\x20add')})['describe']('Add\x20RPC\x20endpoint(s)'),z['object']({'op':z['literal']('remove')['describe']('Remove\x20one\x20or\x20more\x20RPC\x20endpoints'),'network':EvmChainSchema['describe']('Target\x20chain\x20(defaults\x20to\x20Ethereum\x20mainnet\x20when\x20omitted\x20—\x20EvmChainSchema\x20carries\x20.default(\x22mainnet\x22))'),'rpcUrls':z['array'](z['string']()['url']())['min'](0x1)['describe']('RPC\x20URL(s)\x20to\x20remove')})['describe']('Remove\x20RPC\x20endpoint(s)'),z['object']({'op':z['literal']('set')['describe']('Full\x20replace\x20all\x20RPC\x20endpoints'),'network':EvmChainSchema['describe']('Target\x20chain\x20(defaults\x20to\x20Ethereum\x20mainnet\x20when\x20omitted\x20—\x20EvmChainSchema\x20carries\x20.default(\x22mainnet\x22))'),'rpcUrls':z['array'](z['string']()['url']())['min'](0x1)['describe']('Full\x20RPC\x20list\x20(replaces\x20all\x20existing\x20endpoints)')})['describe']('Full\x20replace\x20RPC\x20endpoints'),z['object']({'op':z['literal']('ping')['describe']('Health\x20check\x20one\x20or\x20more\x20RPC\x20endpoints'),'network':EvmChainSchema['describe']('Target\x20chain\x20(defaults\x20to\x20Ethereum\x20mainnet\x20when\x20omitted\x20—\x20EvmChainSchema\x20carries\x20.default(\x22mainnet\x22))'),'rpcUrls':z['array'](z['string']()['url']())['optional']()['describe']('Specific\x20RPC\x20URLs\x20to\x20ping;\x20if\x20omitted,\x20pings\x20all\x20configured\x20RPCs')})['describe']('Health\x20check\x20RPC\x20endpoints')])['describe']('EVM\x20RPC\x20endpoint\x20management\x20(discriminated\x20by\x20op)');export const BridgeOperationsSchema=z['preprocess'](a=>{if(typeof a==='object'&&a!==null){const b={...a};if(typeof b['description']==='string'&&!b['operation_type'])try{const c=JSON['parse'](b['description']);if(c&&typeof c==='object'&&c['operation_type'])return c;}catch{}if(typeof b['data']==='string')try{b['data']=JSON['parse'](b['data']);}catch{}if(typeof b['env']==='string')try{b['env']=JSON['parse'](b['env']);}catch{}return b;}return a;},z['discriminatedUnion']('operation_type',[z['object']({'operation_type':z['literal']('cross_chain_wow_to_evm'),'data':BridgeWowToEvmDataSchema,'env':CallEnvSchema['optional']()})['describe']('WOW→EVM\x20cross-chain\x20(simplified):\x20assets\x20auto-claim\x20to\x20activeEvmAccount;\x20if\x20withdrawTo\x20is\x20provided,\x20an\x20additional\x20transfer\x20is\x20made\x20to\x20that\x20address.\x20[Requires\x20WOW\x20mainnet\x20env]'),z['object']({'operation_type':z['literal']('cross_chain_evm_to_wow'),'data':BridgeEvmToWowDataSchema,'env':CallEnvSchema['optional']()})['describe']('EVM→WOW\x20cross-chain\x20(single\x20step):\x20deposit\x20from\x20activeEvmAccount,\x20bridge\x20auto-claims\x20on\x20WOW.\x20No\x20WOW\x20gas\x20needed.\x20[Requires\x20WOW\x20mainnet\x20env]'),z['object']({'operation_type':z['literal']('claim_wow_to_evm'),'data':BridgeClaimWowToEvmDataSchema,'env':CallEnvSchema['optional']()})['describe']('WOW→EVM\x20claim\x20(step\x202):\x20claim\x20assets\x20on\x20EVM\x20after\x20bridge\x20signed.\x20Requires\x20activeEvmAccount\x20to\x20have\x20EVM\x20gas.\x20[Requires\x20WOW\x20mainnet\x20env]'),z['object']({'operation_type':z['literal']('resume_transfer'),'data':BridgeResumeTransferDataSchema,'env':CallEnvSchema['optional']()})['describe']('Resume\x20an\x20interrupted\x20transfer\x20from\x20its\x20current\x20step.\x20Safe\x20to\x20retry.\x20[Requires\x20WOW\x20mainnet\x20env\x20for\x20WOW-side\x20operations]'),z['object']({'operation_type':z['literal']('withdraw'),'data':BridgeWithdrawDataSchema,'env':CallEnvSchema['optional']()['describe']('Optional\x20env\x20—\x20needed\x20to\x20pass\x20confirmed=true\x20after\x20a\x20pending_confirmation\x20block\x20(funds\x20leave\x20activeEvmAccount).')})['describe']('Withdraw\x20from\x20activeEvmAccount\x20to\x20another\x20EVM\x20address\x20(non-cross-chain).\x20[env\x20optional:\x20only\x20needed\x20for\x20env.confirmed\x20after\x20a\x20confirmation\x20block]'),z['object']({'operation_type':z['literal']('query_active_evm_account'),'data':BridgeQueryActiveEvmAccountDataSchema['optional']()})['describe']('Query\x20activeEvmAccount\x20address\x20+\x20balances\x20(per\x20chain\x20or\x20all\x20chains).\x20[No\x20env\x20needed]'),z['object']({'operation_type':z['literal']('query_supported_evm_chains')})['describe']('List\x20currently\x20supported\x20EVM\x20chains\x20(enum\x20value\x20/\x20description\x20/\x20chainId\x20/\x20RPC\x20health).\x20[No\x20env\x20needed,\x20no\x20data\x20required]'),z['object']({'operation_type':z['literal']('query_supported_tokens'),'data':BridgeQuerySupportedTokensDataSchema['optional']()})['describe']('List\x20supported\x20Bridge\x20tokens\x20per\x20chain\x20(WOW/EVM\x20contract\x20addresses,\x20decimals,\x20description).\x20[No\x20env\x20needed]'),z['object']({'operation_type':z['literal']('query_transfer_list'),'data':BridgeQueryTransferListDataSchema['optional']()})['describe']('Query\x20cross-chain\x20/\x20withdrawal\x20transfer\x20history\x20list\x20(optionally\x20only\x20in-progress).\x20[No\x20env\x20needed]'),z['object']({'operation_type':z['literal']('query_transfer_status'),'data':BridgeQueryTransferStatusDataSchema})['describe']('Query\x20a\x20single\x20transfer\x27s\x20detail\x20by\x20transferId'),z['object']({'operation_type':z['literal']('manage_evm_rpc'),'data':BridgeManageEvmRpcDataSchema})['describe']('Manage\x20EVM\x20RPC\x20endpoints\x20(list/add/remove/set/ping)\x20to\x20mitigate\x20public\x20RPC\x20429\x20rate\x20limits.\x20[No\x20env\x20needed]')]));export const BridgeLatestStateSchema=z['object']({'status':z['enum'](['not_started','pending','confirmed','signatures_ready','claiming','completed','failed'])['describe']('On-chain\x20status\x20(finer-grained\x20than\x20record.status):\x20'+'pending=source\x20tx\x20submitted\x20but\x20not\x20confirmed;\x20'+'confirmed=source\x20tx\x20confirmed,\x20waiting\x20for\x20bridge\x20node\x20signatures;\x20'+'signatures_ready=nodes\x20signed,\x20ready\x20to\x20claim;\x20'+'claiming=claim\x20tx\x20submitted,\x20waiting\x20for\x20confirmation;\x20'+'completed=fully\x20completed,\x20assets\x20arrived\x20on\x20target\x20chain;\x20'+'failed=on-chain\x20failure'),'step':z['enum'](['not_started','source_tx_pending','source_tx_confirmed','node_signing','signatures_ready','claim_tx_pending','completed','failed'])['describe']('Detailed\x20step\x20(more\x20granular\x20than\x20status).\x20'+'source_tx_pending=source\x20chain\x20tx\x20waiting\x20for\x20block\x20confirmation;\x20'+'source_tx_confirmed=source\x20confirmed,\x20waiting\x20for\x20bridge\x20nodes\x20to\x20approve;\x20'+'node_signing=nodes\x20collecting\x20signatures;\x20'+'signatures_ready=sufficient\x20signatures\x20collected,\x20ready\x20to\x20claim\x20on\x20target\x20chain;\x20'+'claim_tx_pending=claim\x20tx\x20submitted\x20on\x20target\x20chain,\x20waiting\x20for\x20confirmation;\x20'+'completed=assets\x20arrived\x20on\x20target\x20chain;\x20'+'failed=error\x20occurred'),'stepDescription':z['string']()['optional']()['describe']('Human-readable\x20step\x20description\x20(Chinese)'),'direction':z['enum'](['wow_to_evm','evm_to_wow'])['optional'](),'sourceTxHash':z['string']()['optional']()['describe']('Source\x20chain\x20tx\x20hash/digest'),'bridgeSeq':z['string']()['optional']()['describe']('Bridge\x20sequence\x20number'),'confirmations':z['number']()['optional']()['describe']('Source\x20chain\x20confirmation\x20count\x20(EVM→WOW\x20only;\x20needs\x2064\x20for\x20finalization)'),'claimTxDigest':z['string']()['optional']()['describe']('WOW\x20claim\x20tx\x20digest\x20(evm_to_wow,\x20when\x20completed)'),'claimReceipt':z['any']()['optional']()['describe']('EVM\x20claim\x20tx\x20receipt\x20(wow_to_evm,\x20when\x20available)'),'ethReceipt':z['any']()['optional']()['describe']('EVM\x20source\x20tx\x20receipt\x20(evm_to_wow)'),'wowReceipt':z['any']()['optional']()['describe']('WOW\x20source\x20tx\x20receipt\x20(wow_to_evm)'),'error':z['string']()['optional']()['describe']('Error\x20message\x20if\x20step=failed'),'hint':z['string']()['optional']()['describe']('Hint\x20message\x20for\x20next\x20action\x20(e.g.,\x20when\x20claim_wow_to_evm\x20not\x20yet\x20called)'),'updatedAt':z['number']()['optional']()['describe']('Last\x20on-chain\x20update\x20timestamp\x20(ms)')})['describe']('Latest\x20on-chain\x20state\x20(from\x20refresh=true\x20query)');export const BridgeTransferRecordSchema=z['object']({'transferId':z['string']()['describe']('Unique\x20ID\x20(br_<timestamp>_<counter>)'),'direction':z['enum'](['wow_to_evm','evm_to_wow','withdraw'])['describe']('Transfer\x20direction'),'token':BridgeTokenSchema['describe']('Token\x20identifier'),'amount':z['string']()['describe']('Amount\x20in\x20smallest\x20unit\x20(string\x20to\x20avoid\x20bigint\x20issues)'),'recipientEth':z['string']()['optional']()['describe']('ETH-side\x20recipient\x20address'),'recipientWow':z['string']()['optional']()['describe']('WOW-side\x20recipient\x20address'),'intermediateEthAccount':z['string']()['describe']('Intermediate\x20EVM\x20account\x20(activeEvmAccount)'),'idempotencyKey':z['string']()['optional']()['describe']('Idempotency\x20key\x20used\x20for\x20this\x20transfer\x20(if\x20any)'),'step':z['enum'](['init','deposit','claimed','withdraw','withdrawn'])['describe']('Current\x20step\x20in\x20the\x20transfer\x20lifecycle:\x20'+'init=just\x20created;\x20'+'deposit=source\x20chain\x20deposit\x20in\x20progress;\x20'+'claimed=claim\x20completed\x20on\x20target\x20chain\x20(success);\x20'+'withdraw=intermediate→final\x20withdraw\x20in\x20progress;\x20'+'withdrawn=withdraw\x20completed'),'status':z['enum'](['pending','in_progress','success','failed'])['describe']('Transfer\x20status:\x20pending/in_progress=ongoing;\x20success=fully\x20completed;\x20failed=error'),'depositTxHash':z['string']()['optional']()['describe']('EVM\x20deposit\x20tx\x20hash\x20(evm_to_wow)'),'depositTxDigest':z['string']()['optional']()['describe']('WOW\x20deposit\x20tx\x20digest\x20(wow_to_evm)'),'bridgeSeq':z['string']()['optional']()['describe']('Bridge\x20sequence\x20number'),'claimTxHash':z['string']()['optional']()['describe']('EVM\x20claim\x20tx\x20hash\x20(wow_to_evm)'),'claimTxDigest':z['string']()['optional']()['describe']('WOW\x20claim\x20tx\x20digest\x20(evm_to_wow)'),'withdrawTxHash':z['string']()['optional']()['describe']('EVM\x20withdraw\x20tx\x20hash\x20(withdraw\x20step)'),'error':z['string']()['optional']()['describe']('Error\x20message\x20if\x20status=failed'),'createdAt':z['number']()['describe']('Creation\x20timestamp\x20(ms)'),'updatedAt':z['number']()['describe']('Last\x20update\x20timestamp\x20(ms)'),'latestState':BridgeLatestStateSchema['optional']()['describe']('Latest\x20on-chain\x20state\x20(only\x20present\x20after\x20refresh=true\x20query).\x20'+'Provides\x20real-time\x20progress:\x20confirmations\x20count,\x20node\x20signing\x20status,\x20claim\x20tx\x20hash,\x20etc.\x20'+'Use\x20this\x20to\x20estimate\x20remaining\x20time\x20and\x20next\x20action.')})['strict']()['describe']('Bridge\x20transfer\x20record');export const BridgeWowToEvmResultSchema=z['object']({'depositTxDigest':z['string']()['describe']('WOW\x20deposit\x20tx\x20digest'),'bridgeSeq':z['string']()['describe']('Bridge\x20sequence\x20number'),'activeEvmAccount':z['string']()['describe']('activeEvmAccount\x20address\x20that\x20will\x20receive\x20the\x20assets'),'transferId':z['string']()['describe']('Transfer\x20ID\x20(br_<timestamp>_<counter>).\x20Save\x20this\x20for\x20claim_wow_to_evm\x20(step\x202)\x20and\x20query_transfer_status'),'idempotentHit':z['boolean']()['optional']()['describe']('true\x20if\x20this\x20result\x20was\x20returned\x20from\x20idempotency\x20cache\x20(no\x20new\x20deposit\x20executed)'),'idempotencyKey':z['string']()['optional']()['describe']('Idempotency\x20key\x20used\x20(if\x20any)')})['strict']()['describe']('WOW→EVM\x20cross-chain\x20step\x201\x20result\x20(deposit\x20only,\x20claim\x20pending)');export const BridgeEvmToWowResultSchema=z['object']({'depositTxHash':z['string']()['describe']('EVM\x20deposit\x20tx\x20hash'),'activeEvmAccount':z['string']()['describe']('activeEvmAccount\x20address\x20that\x20initiated\x20the\x20deposit'),'transferId':z['string']()['describe']('Transfer\x20ID\x20(br_<timestamp>_<counter>).\x20Save\x20this\x20for\x20query_transfer_status'),'idempotentHit':z['boolean']()['optional']()['describe']('true\x20if\x20this\x20result\x20was\x20returned\x20from\x20idempotency\x20cache\x20(no\x20new\x20deposit\x20executed)'),'idempotencyKey':z['string']()['optional']()['describe']('Idempotency\x20key\x20used\x20(if\x20any)')})['strict']()['describe']('EVM→WOW\x20cross-chain\x20result\x20(deposit\x20submitted,\x20auto-claim\x20in\x20progress)');export const BridgeClaimWowToEvmResultSchema=z['object']({'claimTxHash':z['string']()['describe']('EVM\x20claim\x20tx\x20hash'),'transferId':z['string']()['describe']('Transfer\x20ID')})['strict']()['describe']('WOW→EVM\x20claim\x20(step\x202)\x20result');export const BridgeWithdrawResultSchema=z['object']({'txHash':z['string']()['describe']('EVM\x20withdraw\x20tx\x20hash'),'transferId':z['string']()['describe']('Transfer\x20ID\x20(br_<timestamp>_<counter>)')})['strict']()['describe']('Withdraw\x20from\x20activeEvmAccount\x20result');export const BridgeQueryActiveEvmAccountResultSchema=z['object']({'address':z['string']()['describe']('activeEvmAccount\x20address\x20(0x\x20+\x2040\x20hex)'),'chains':z['array'](z['object']({'chainId':z['number']()['describe']('EVM\x20chain\x20ID'),'name':z['string']()['describe']('Chain\x20name'),'nativeBalance':z['string']()['describe']('Native\x20ETH\x20balance\x20(wei,\x20string)'),'tokens':z['array'](z['object']({'tokenAddress':z['string']()['describe']('ERC20\x20token\x20contract\x20address'),'balance':z['string']()['describe']('Token\x20balance\x20(smallest\x20unit,\x20string)')}))['optional']()['describe']('Additional\x20ERC20\x20token\x20balances\x20(if\x20requested)')}))['describe']('Per-chain\x20balance\x20information')})['strict']()['describe']('activeEvmAccount\x20query\x20result');export const BridgeQuerySupportedEvmChainsResultSchema=z['array'](z['object']({'chainId':z['number']()['describe']('EVM\x20chain\x20ID'),'name':z['string']()['describe']('Chain\x20name\x20(enum\x20value)'),'description':z['string']()['describe']('Human-readable\x20chain\x20description'),'bridgeChainId':z['number']()['describe']('Bridge\x20protocol\x20chain\x20ID'),'explorerUrl':z['string']()['describe']('Block\x20explorer\x20URL'),'rpcCount':z['number']()['describe']('Total\x20configured\x20RPC\x20endpoints'),'healthyRpcCount':z['number']()['describe']('Currently\x20healthy\x20RPC\x20endpoints')}))['describe']('List\x20of\x20supported\x20EVM\x20chains');export const BridgeQuerySupportedTokensResultSchema=z['array'](z['object']({'chainId':z['number']()['describe']('EVM\x20chain\x20ID'),'chainName':z['string']()['describe']('Chain\x20name'),'bridgeChainId':z['number']()['describe']('Bridge\x20protocol\x20chain\x20ID'),'tokens':z['array'](z['object']({'tokenId':z['number']()['describe']('On-chain\x20token\x20ID'),'symbol':z['string']()['describe']('Token\x20symbol\x20(ETH/WETH/WBTC/USDC/USDT)'),'evmAddress':z['string']()['describe']('EVM-side\x20contract\x20address\x20(0x000...000\x20for\x20native\x20ETH)'),'evmDecimals':z['number']()['describe']('EVM-side\x20decimals'),'wowTypeTag':z['string']()['describe']('WOW-side\x20type\x20tag'),'wowDecimals':z['number']()['describe']('WOW-side\x20decimals'),'description':z['string']()['describe']('Token\x20description')}))['describe']('Tokens\x20available\x20on\x20this\x20chain')}))['describe']('Supported\x20Bridge\x20tokens\x20per\x20chain');export const BridgeQueryTransferListResultSchema=z['array'](BridgeTransferRecordSchema)['describe']('Transfer\x20history\x20list');export const BridgeQueryTransferStatusResultSchema=BridgeTransferRecordSchema['nullable']()['describe']('Single\x20transfer\x20detail\x20(null\x20if\x20not\x20found)');export const BridgeManageEvmRpcResultSchema=z['object']({'op':z['string']()['describe']('Operation\x20performed\x20(list/add/remove/set/ping)'),'success':z['boolean']()['describe']('Whether\x20the\x20operation\x20succeeded'),'result':z['any']()['optional']()['describe']('Operation-specific\x20result\x20(list=array\x20of\x20RPC\x20status,\x20ping=health\x20results,\x20add/remove/set=void)')})['strict']()['describe']('EVM\x20RPC\x20management\x20result');export const BridgeOutputSchema=z['discriminatedUnion']('operation_type',[z['object']({'operation_type':z['literal']('cross_chain_wow_to_evm'),'result':BridgeWowToEvmResultSchema,'message':z['string']()['optional']()['describe']('Result\x20summary\x20or\x20hint\x20message')})['describe']('WOW→EVM\x20cross-chain\x20result'),z['object']({'operation_type':z['literal']('cross_chain_evm_to_wow'),'result':BridgeEvmToWowResultSchema,'message':z['string']()['optional']()['describe']('Result\x20summary\x20or\x20hint\x20message')})['describe']('EVM→WOW\x20cross-chain\x20result'),z['object']({'operation_type':z['literal']('claim_wow_to_evm'),'result':BridgeClaimWowToEvmResultSchema,'message':z['string']()['optional']()['describe']('Result\x20summary\x20or\x20hint\x20message')})['describe']('WOW→EVM\x20claim\x20(step\x202)\x20result'),z['object']({'operation_type':z['literal']('resume_transfer'),'result':BridgeTransferRecordSchema,'message':z['string']()['optional']()['describe']('Result\x20summary\x20or\x20hint\x20message')})['describe']('Resume\x20interrupted\x20transfer\x20result'),z['object']({'operation_type':z['literal']('withdraw'),'result':BridgeWithdrawResultSchema,'message':z['string']()['optional']()['describe']('Result\x20summary\x20or\x20hint\x20message')})['describe']('Withdraw\x20from\x20activeEvmAccount\x20result'),z['object']({'operation_type':z['literal']('query_active_evm_account'),'result':BridgeQueryActiveEvmAccountResultSchema,'message':z['string']()['optional']()['describe']('Result\x20summary\x20or\x20hint\x20message')})['describe']('activeEvmAccount\x20query\x20result'),z['object']({'operation_type':z['literal']('query_supported_evm_chains'),'result':BridgeQuerySupportedEvmChainsResultSchema,'message':z['string']()['optional']()['describe']('Result\x20summary\x20or\x20hint\x20message')})['describe']('Supported\x20EVM\x20chains\x20result'),z['object']({'operation_type':z['literal']('query_supported_tokens'),'result':BridgeQuerySupportedTokensResultSchema,'message':z['string']()['optional']()['describe']('Result\x20summary\x20or\x20hint\x20message')})['describe']('Supported\x20Bridge\x20tokens\x20per\x20chain\x20result'),z['object']({'operation_type':z['literal']('query_transfer_list'),'result':BridgeQueryTransferListResultSchema,'message':z['string']()['optional']()['describe']('Result\x20summary\x20or\x20hint\x20message')})['describe']('Transfer\x20history\x20list\x20result'),z['object']({'operation_type':z['literal']('query_transfer_status'),'result':BridgeQueryTransferStatusResultSchema,'message':z['string']()['optional']()['describe']('Result\x20summary\x20or\x20hint\x20message')})['describe']('Single\x20transfer\x20detail\x20result'),z['object']({'operation_type':z['literal']('manage_evm_rpc'),'result':BridgeManageEvmRpcResultSchema,'message':z['string']()['optional']()['describe']('Result\x20summary\x20or\x20hint\x20message')})['describe']('EVM\x20RPC\x20management\x20result')])['describe']('Bridge\x20operation\x20result\x20(discriminated\x20by\x20operation_type\x20with\x20per-operation\x20typed\x20result)');export const BridgeCallOutputSchema=z['object']({'message':z['string']()['optional']()['describe']('Result\x20summary\x20or\x20hint\x20message'),'result':z['discriminatedUnion']('type',[z['object']({'type':z['literal']('data'),'data':z['unknown']()['describe']('Operation\x20result\x20data\x20(structure\x20varies\x20by\x20operation_type)')})['describe']('Successful\x20result'),z['object']({'type':z['literal']('error'),'error':z['string']()['describe']('Error\x20message'),'error_code':z['enum'](['invalid_parameter','guard_rejected','state_conflict','insufficient_balance','object_not_found','permission_denied','immutable_violation','network_error','rate_limit','gas_exceeded','bcs_error','signature_error','config_error','wip_verification_failed','unknown'])['optional']()['describe']('Error\x20classification\x20for\x20programmatic\x20recovery'),'retryable':z['boolean']()['optional']()['describe']('Whether\x20the\x20operation\x20can\x20be\x20retried\x20as-is'),'recovery_hint':z['string']()['optional']()['describe']('Recovery\x20suggestion\x20for\x20AI\x20or\x20user')})['describe']('Error\x20result'),z['object']({'type':z['literal']('pending_confirmation'),'preview':z['unknown']()['describe']('ConfirmGate\x20preview\x20(level,\x20operation,\x20amount,\x20warnings)'),'rule_id':z['string']()['describe']('Id\x20of\x20the\x20confirmation\x20rule\x20that\x20matched')})['describe']('Pending\x20confirmation.\x20The\x20ConfirmGate\x20blocked\x20this\x20fund-moving\x20operation.\x20Read\x20preview\x20first;\x20if\x20user\x20consents,\x20re-invoke\x20the\x20SAME\x20call\x20with\x20env.confirmed=true.')])['describe']('Bridge\x20operation\x20result\x20(data,\x20error,\x20or\x20pending_confirmation)'),'semantic':SemanticSummarySchema['optional']()['describe']('Business\x20semantic\x20summary\x20for\x20bridge\x20operation')})['describe']('Bridge\x20operation\x20output\x20(matches\x20CallOutput\x20structure\x20returned\x20by\x20the\x20handler)');