@wowok/agent-mcp 2.7.10 → 3.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/communication/evidence.d.ts +6 -0
- package/dist/communication/evidence.js +1 -0
- package/dist/evaluation/acceptance.d.ts +24 -0
- package/dist/evaluation/acceptance.js +1 -0
- package/dist/evaluation/builtins/demand-match.d.ts +3 -2
- package/dist/evaluation/builtins/demand-match.js +1 -1
- package/dist/evaluation/builtins/service-risk.d.ts +2 -1
- package/dist/evaluation/builtins/service-risk.js +1 -1
- package/dist/evaluation/index.d.ts +1 -0
- package/dist/evaluation/index.js +1 -1
- package/dist/evaluation/match-operation.d.ts +14 -0
- package/dist/evaluation/match-operation.js +1 -0
- package/dist/experience/realtime-feedback.js +1 -1
- package/dist/extensions/capability-manifest.d.ts +1 -82
- package/dist/extensions/capability-manifest.js +1 -1
- package/dist/extensions/constraint-registry.d.ts +6 -4
- package/dist/extensions/constraint-registry.js +1 -1
- package/dist/extensions/index.d.ts +4 -5
- package/dist/extensions/index.js +1 -1
- package/dist/extensions/industry-pack.js +1 -1
- package/dist/extensions/metric-registry.d.ts +6 -4
- package/dist/extensions/metric-registry.js +1 -1
- package/dist/extensions/mode-evaluator.d.ts +2 -3
- package/dist/extensions/mode-evaluator.js +1 -1
- package/dist/extensions/modes.js +1 -1
- package/dist/extensions/registry.d.ts +3 -25
- package/dist/extensions/registry.js +1 -1
- package/dist/extensions/types.d.ts +0 -68
- package/dist/goal/GoalClassifier.js +1 -1
- package/dist/goal/GoalEngine.d.ts +44 -1
- package/dist/goal/GoalEngine.js +1 -1
- package/dist/goal/types.d.ts +5 -1
- package/dist/harness/auto-escalation.d.ts +0 -12
- package/dist/harness/auto-escalation.js +1 -1
- package/dist/harness/index.d.ts +1 -14
- package/dist/harness/index.js +1 -1
- package/dist/harness/types.d.ts +0 -38
- package/dist/keeper/KeeperScan.d.ts +39 -0
- package/dist/keeper/KeeperScan.js +1 -0
- package/dist/keeper/KeeperStore.d.ts +43 -0
- package/dist/keeper/KeeperStore.js +1 -0
- package/dist/keeper/detectors.d.ts +23 -0
- package/dist/keeper/detectors.js +1 -0
- package/dist/keeper/keeper.spec.d.ts +1 -0
- package/dist/keeper/keeper.spec.js +1 -0
- package/dist/keeper/types.d.ts +65 -0
- package/dist/keeper/types.js +1 -0
- package/dist/knowledge/account-marks.d.ts +1 -0
- package/dist/knowledge/account-marks.js +1 -1
- package/dist/knowledge/demand-risk.js +1 -1
- package/dist/knowledge/event-semantics.d.ts +3 -0
- package/dist/knowledge/event-semantics.js +1 -1
- package/dist/knowledge/event-semantics.spec.d.ts +1 -0
- package/dist/knowledge/event-semantics.spec.js +1 -0
- package/dist/knowledge/evidence-review.d.ts +23 -0
- package/dist/knowledge/evidence-review.js +1 -1
- package/dist/knowledge/examples-scanner-cli.js +1 -1
- package/dist/knowledge/examples-scanner.js +1 -1
- package/dist/knowledge/fund-layer.d.ts +13 -9
- package/dist/knowledge/fund-layer.js +1 -1
- package/dist/knowledge/goal-completion.js +1 -1
- package/dist/knowledge/guard-bindings.d.ts +21 -0
- package/dist/knowledge/guard-bindings.js +1 -0
- package/dist/knowledge/guard-bytecode-spec.d.ts +82 -0
- package/dist/knowledge/guard-bytecode-spec.js +1 -0
- package/dist/knowledge/guard-design-patterns.d.ts +1 -1
- package/dist/knowledge/guard-design-patterns.js +1 -1
- package/dist/knowledge/index.d.ts +13 -7
- package/dist/knowledge/index.js +1 -1
- package/dist/knowledge/industry-registry.js +1 -1
- package/dist/knowledge/mcp-schema-audit-cli.js +1 -1
- package/dist/knowledge/mcp-schema-audit.js +1 -1
- package/dist/knowledge/reward-risk.d.ts +1 -1
- package/dist/knowledge/reward-risk.js +1 -1
- package/dist/knowledge/safety-rules.d.ts +2 -1
- package/dist/knowledge/safety-rules.js +1 -1
- package/dist/knowledge/scenario-modes.d.ts +1 -1
- package/dist/knowledge/scenario-modes.js +1 -1
- package/dist/knowledge/scenario-topology.d.ts +43 -0
- package/dist/knowledge/scenario-topology.js +1 -0
- package/dist/knowledge/supply-chain.js +1 -1
- package/dist/knowledge/template-registry.js +1 -1
- package/dist/knowledge/tools-reference.js +1 -1
- package/dist/knowledge/workflow-guidance.d.ts +55 -0
- package/dist/knowledge/workflow-guidance.js +1 -1
- package/dist/knowledge/workspace-lists.d.ts +1 -0
- package/dist/knowledge/workspace-lists.js +1 -1
- package/dist/monitor/MonitorLoop.d.ts +3 -0
- package/dist/monitor/MonitorLoop.js +1 -1
- package/dist/monitor/ScopeResolver.js +1 -1
- package/dist/monitor/SuggestionBridge.d.ts +38 -0
- package/dist/monitor/SuggestionBridge.js +1 -0
- package/dist/monitor/SuggestionBridge.spec.d.ts +1 -0
- package/dist/monitor/SuggestionBridge.spec.js +1 -0
- package/dist/monitor/types.d.ts +0 -1
- package/dist/monitor/types.js +1 -1
- package/dist/participation/arbitrator-interest.d.ts +20 -0
- package/dist/participation/arbitrator-interest.js +1 -0
- package/dist/participation/demander-interest.d.ts +23 -0
- package/dist/participation/demander-interest.js +1 -0
- package/dist/participation/employee-kpi.d.ts +12 -0
- package/dist/participation/employee-kpi.js +1 -1
- package/dist/participation/employee-kpi.spec.d.ts +1 -0
- package/dist/participation/employee-kpi.spec.js +1 -0
- package/dist/playbooks/service-build/business-puzzle.js +1 -1
- package/dist/playbooks/service-build/context-assembly.js +1 -1
- package/dist/playbooks/service-build/machine-nodes.js +1 -1
- package/dist/playbooks/service-build/machine-panorama.js +1 -1
- package/dist/playbooks/service-build/merchant-guide.d.ts +20 -0
- package/dist/playbooks/service-build/merchant-guide.js +1 -1
- package/dist/playbooks/service-build/mode-actions.d.ts +30 -12
- package/dist/playbooks/service-build/mode-actions.js +1 -1
- package/dist/playbooks/service-build/object-panorama.js +1 -1
- package/dist/playbooks/service-build/participation-radar.js +1 -1
- package/dist/playbooks/service-build/relationship-profile.d.ts +2 -0
- package/dist/playbooks/service-build/relationship-profile.js +1 -0
- package/dist/playbooks/service-build/semantic-graph.d.ts +5 -1
- package/dist/playbooks/service-build/semantic-graph.js +1 -1
- package/dist/playbooks/service-build/service-panorama.js +1 -1
- package/dist/relationship/derivation.d.ts +94 -0
- package/dist/relationship/derivation.js +1 -0
- package/dist/relationship/derivation.spec.d.ts +1 -0
- package/dist/relationship/derivation.spec.js +1 -0
- package/dist/relationship/incentive.d.ts +38 -0
- package/dist/relationship/incentive.js +1 -0
- package/dist/relationship/index.d.ts +4 -0
- package/dist/relationship/index.js +1 -0
- package/dist/relationship/registry.d.ts +13 -0
- package/dist/relationship/registry.js +1 -0
- package/dist/relationship/types.d.ts +45 -0
- package/dist/relationship/types.js +1 -0
- package/dist/review/progress.js +1 -1
- package/dist/role/index.d.ts +2 -2
- package/dist/role/index.js +1 -1
- package/dist/role/model.d.ts +2 -1
- package/dist/role/model.js +1 -1
- package/dist/role/types.d.ts +5 -0
- package/dist/rules.d.ts +1 -1
- package/dist/safety/confirm-gate.js +1 -1
- package/dist/safety/preview.js +1 -1
- package/dist/schema/call/bridge.d.ts +25 -3
- package/dist/schema/call/bridge.js +1 -1
- package/dist/schema/call/semantic.js +1 -1
- package/dist/schema/common/index.js +1 -1
- package/dist/schema/employee/index.d.ts +61 -1
- package/dist/schema/employee/index.js +1 -1
- package/dist/schema/evaluation/index.d.ts +70 -5
- package/dist/schema/evaluation/index.js +1 -1
- package/dist/schema/goal/index.d.ts +40 -14
- package/dist/schema/goal/index.js +1 -1
- package/dist/schema/goal/planning.d.ts +6 -6
- package/dist/schema/index.d.ts +1 -0
- package/dist/schema/index.js +1 -1
- package/dist/schema/industry-pack/index.d.ts +59 -7
- package/dist/schema/industry-pack/index.js +1 -1
- package/dist/schema/industry-pack/modes.d.ts +59 -7
- package/dist/schema/industry-pack/modes.js +1 -1
- package/dist/schema/intent-radar/index.d.ts +19 -19
- package/dist/schema/keeper/index.d.ts +475 -0
- package/dist/schema/keeper/index.js +1 -0
- package/dist/schema/local/index.d.ts +11 -0
- package/dist/schema/local/index.js +1 -1
- package/dist/schema/messenger/index.d.ts +2 -0
- package/dist/schema/messenger/index.js +1 -1
- package/dist/schema/operations.d.ts +64 -16
- package/dist/schema/persona/index.d.ts +1 -1
- package/dist/schema/query/bi.d.ts +244 -16
- package/dist/schema/query/bi.js +1 -1
- package/dist/schema/query/index.d.ts +2 -2
- package/dist/schema/schema-query/index.d.ts +2 -11
- package/dist/schema/schema-query/index.js +1 -1
- package/dist/schema/schema-version.js +1 -1
- package/dist/schema/utils/skills-recommendation.js +1 -1
- package/dist/schema/watch/index.d.ts +4 -0
- package/dist/schema/watch/index.js +1 -1
- package/dist/schema-query-impl/index.d.ts +33 -14
- package/dist/schema-query-impl/index.js +1 -1
- package/dist/schemas/account_operation.output.json +29 -0
- package/dist/schemas/account_operation.schema.json +6 -2
- package/dist/schemas/bridge_operation.output.json +24 -1
- package/dist/schemas/bridge_operation.schema.json +73 -1
- package/dist/schemas/employee_operation.output.json +100 -0
- package/dist/schemas/employee_operation.schema.json +148 -5
- package/dist/schemas/evaluation_operation.output.json +135 -9
- package/dist/schemas/evaluation_operation.schema.json +176 -7
- package/dist/schemas/goal_operation.schema.json +76 -0
- package/dist/schemas/index.json +7 -1
- package/dist/schemas/industry_pack_operation.output.json +172 -27
- package/dist/schemas/industry_pack_operation.schema.json +19 -0
- package/dist/schemas/keeper_operation.output.json +1274 -0
- package/dist/schemas/keeper_operation.schema.json +359 -0
- package/dist/schemas/messenger_operation.schema.json +8 -0
- package/dist/schemas/onchain_events.output.json +1 -1
- package/dist/schemas/onchain_operations.schema.json +41 -41
- package/dist/schemas/onchain_operations_allocation.schema.json +4 -4
- package/dist/schemas/onchain_operations_arbitration.schema.json +3 -3
- package/dist/schemas/onchain_operations_contact.schema.json +2 -2
- package/dist/schemas/onchain_operations_demand.schema.json +2 -2
- package/dist/schemas/onchain_operations_machine.schema.json +2 -2
- package/dist/schemas/onchain_operations_order.schema.json +2 -2
- package/dist/schemas/onchain_operations_payment.schema.json +1 -1
- package/dist/schemas/onchain_operations_permission.schema.json +2 -2
- package/dist/schemas/onchain_operations_progress.schema.json +2 -2
- package/dist/schemas/onchain_operations_repository.schema.json +2 -2
- package/dist/schemas/onchain_operations_reward.schema.json +6 -6
- package/dist/schemas/onchain_operations_service.schema.json +7 -7
- package/dist/schemas/onchain_operations_treasury.schema.json +6 -6
- package/dist/schemas/onchain_table_data.output.json +71 -0
- package/dist/schemas/query_toolkit.output.json +485 -7
- package/dist/schemas/query_toolkit.schema.json +71 -0
- package/dist/schemas/schema_query.output.json +1 -64
- package/dist/schemas/schema_query.schema.json +18 -3
- package/dist/schemas/watch_operation.output.json +21 -1
- package/dist/task/ProcessStore.d.ts +18 -1
- package/dist/task/ProcessStore.js +1 -1
- package/dist/task/playbook.js +1 -1
- package/dist/task/types.d.ts +24 -0
- package/dist/tools/handlers/bridge.js +1 -1
- package/dist/tools/handlers/config.js +1 -1
- package/dist/tools/handlers/employee.d.ts +6 -0
- package/dist/tools/handlers/employee.js +1 -1
- package/dist/tools/handlers/employee.spec.d.ts +1 -0
- package/dist/tools/handlers/employee.spec.js +1 -0
- package/dist/tools/handlers/evaluation.js +1 -1
- package/dist/tools/handlers/evaluation.spec.d.ts +1 -0
- package/dist/tools/handlers/evaluation.spec.js +1 -0
- package/dist/tools/handlers/goal.js +1 -1
- package/dist/tools/handlers/industry-pack.js +1 -1
- package/dist/tools/handlers/keeper.d.ts +12 -0
- package/dist/tools/handlers/keeper.js +1 -0
- package/dist/tools/handlers/local.d.ts +4 -3
- package/dist/tools/handlers/local.js +1 -1
- package/dist/tools/handlers/messenger.js +1 -1
- package/dist/tools/handlers/onchain.js +1 -1
- package/dist/tools/handlers/permission.js +1 -1
- package/dist/tools/handlers/query.js +1 -1
- package/dist/tools/handlers/schema-query.js +1 -1
- package/dist/tools/handlers/watch.js +1 -1
- package/dist/tools/handlers/workflow.js +1 -1
- package/dist/tools/index.js +1 -1
- package/dist/tools/registry/agent.d.ts +2 -0
- package/dist/tools/registry/agent.js +1 -0
- package/dist/tools/registry/bridge.d.ts +2 -0
- package/dist/tools/registry/bridge.js +1 -0
- package/dist/tools/registry/business.d.ts +2 -0
- package/dist/tools/registry/business.js +1 -0
- package/dist/tools/registry/config.d.ts +2 -0
- package/dist/tools/registry/config.js +1 -0
- package/dist/tools/registry/files.d.ts +2 -0
- package/dist/tools/registry/files.js +1 -0
- package/dist/tools/registry/identity.d.ts +2 -0
- package/dist/tools/registry/identity.js +1 -0
- package/dist/tools/registry/local.d.ts +2 -0
- package/dist/tools/registry/local.js +1 -0
- package/dist/tools/registry/messenger.d.ts +2 -0
- package/dist/tools/registry/messenger.js +1 -0
- package/dist/tools/registry/monitor.d.ts +2 -0
- package/dist/tools/registry/monitor.js +1 -0
- package/dist/tools/registry/onchain.d.ts +2 -0
- package/dist/tools/registry/onchain.js +1 -0
- package/dist/tools/registry/query.d.ts +2 -0
- package/dist/tools/registry/query.js +1 -0
- package/dist/tools/registry/trust.d.ts +2 -0
- package/dist/tools/registry/trust.js +1 -0
- package/dist/tools/rules-hook.d.ts +1 -0
- package/dist/tools/rules-hook.js +1 -1
- package/dist/tools/shared.js +1 -1
- package/dist/tools/wrap.js +1 -1
- package/package.json +2 -2
- package/dist/examples/arbitration-dispute-create.json +0 -41
- package/dist/examples/arbitration-vote-weighted.json +0 -35
- package/dist/examples/arbitration-voting-guard-add.json +0 -38
- package/dist/examples/demand-present-service.json +0 -33
- package/dist/examples/education-contact-create.json +0 -40
- package/dist/examples/freelance-contact-create.json +0 -40
- package/dist/examples/gen-passport-verify-guard.json +0 -48
- package/dist/examples/guard-template-balance-check.json +0 -59
- package/dist/examples/guard-template-time-lock.json +0 -60
- package/dist/examples/insurance-guard-claim-timelock.json +0 -75
- package/dist/examples/insurance-guard-withdraw-allocation.json +0 -96
- package/dist/examples/insurance-machine-create.json +0 -75
- package/dist/examples/insurance-service-allocators.json +0 -55
- package/dist/examples/machine-multisig-threshold.json +0 -87
- package/dist/examples/machine-publish.json +0 -30
- package/dist/examples/machine-template-7node-rental.json +0 -119
- package/dist/examples/payment-scenario-bound.json +0 -45
- package/dist/examples/rental-ziroom-machine-create.json +0 -148
- package/dist/examples/rental-ziroom-permission-create.json +0 -41
- package/dist/examples/rental-ziroom-service-create.json +0 -36
- package/dist/examples/retail-adv-guard-customer-win-create.json +0 -80
- package/dist/examples/retail-adv-guard-messenger-proof-create.json +0 -65
- package/dist/examples/retail-adv-guard-reward-timeout-create.json +0 -92
- package/dist/examples/retail-adv-reward-guard-add.json +0 -51
- package/dist/examples/retail-myshop-allocation-activate.json +0 -55
- package/dist/examples/retail-myshop-arbitration-create.json +0 -40
- package/dist/examples/retail-myshop-contact-create.json +0 -43
- package/dist/examples/retail-myshop-order-create.json +0 -56
- package/dist/examples/retail-myshop-progress-operate.json +0 -38
- package/dist/examples/retail-myshop-reward-create.json +0 -35
- package/dist/examples/retail-myshop-service-create.json +0 -38
- package/dist/examples/retail-myshop-service-customer-required.json +0 -31
- package/dist/examples/service-discount-issue.json +0 -46
- package/dist/examples/subscription-contact-create.json +0 -40
- package/dist/examples/threebody-guard-create.json +0 -56
- package/dist/examples/threebody-machine-create.json +0 -71
- package/dist/examples/threebody-permission-create.json +0 -38
- package/dist/examples/threebody-service-allocators.json +0 -48
- package/dist/examples/travel-guard-time-lock.json +0 -69
- package/dist/examples/travel-guard-weather-oracle.json +0 -70
- package/dist/examples/travel-machine-create.json +0 -135
- package/dist/examples/travel-repository-create.json +0 -47
- package/dist/examples/travel-service-create.json +0 -34
- package/dist/examples/travel-treasury-create.json +0 -34
- package/dist/examples/treasury-deposit.json +0 -37
- package/dist/examples/treasury-withdraw.json +0 -38
- package/dist/harness/plan.d.ts +0 -33
- package/dist/harness/plan.js +0 -1
- package/dist/knowledge/demand-matching.d.ts +0 -29
- package/dist/knowledge/demand-matching.js +0 -1
- package/dist/knowledge/guard-context.d.ts +0 -56
- package/dist/knowledge/guard-context.js +0 -1
- package/dist/knowledge/guard-migration.d.ts +0 -48
- package/dist/knowledge/guard-migration.js +0 -1
- package/dist/mode-market/index.d.ts +0 -3
- package/dist/mode-market/index.js +0 -1
- package/dist/mode-market/registry.d.ts +0 -53
- package/dist/mode-market/registry.js +0 -1
- package/dist/mode-market/review.d.ts +0 -27
- package/dist/mode-market/review.js +0 -1
- package/dist/mode-market/submission.d.ts +0 -25
- package/dist/mode-market/submission.js +0 -1
- package/dist/schemas/guard-node-schema.json +0 -1000
- package/dist/task/stage-gate.d.ts +0 -22
- package/dist/task/stage-gate.js +0 -1
|
@@ -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{};
|
package/dist/review/progress.js
CHANGED
|
@@ -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']};}
|
package/dist/role/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export type { CommercialRole, GamePower, ValuePerspective, RoleModel, } from "./types.js";
|
|
1
|
+
export type { CommercialRole, GamePower, ValuePerspective, ValueProposition, RoleModel, } from "./types.js";
|
|
2
2
|
export { COMMERCIAL_ROLES } from "./types.js";
|
|
3
|
-
export { ROLE_MODELS, gamePowerOf, valuePerspectiveOf, isWeakerParty, isStrongerParty, interestAnalyzerOf, gameStrategyOf, } from "./model.js";
|
|
3
|
+
export { ROLE_MODELS, gamePowerOf, valuePerspectiveOf, isWeakerParty, isStrongerParty, interestAnalyzerOf, gameStrategyOf, valuePropositionOf, } from "./model.js";
|
|
4
4
|
export { deriveCommercialRole, deriveAllRoles, PERMISSION_RANGES, CORE_PERMISSION_INDEX, type RoleDerivationInput, type DerivedRole, } from "./derivation.js";
|
|
5
5
|
export { mergeRolePerspective, isOnchainRoleAuthoritative, resolveWatchRole, type RoleMergeResult, type WatchRoleInput, type WatchRole, } from "./resolution.js";
|
package/dist/role/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{COMMERCIAL_ROLES}from'./types.js';export{ROLE_MODELS,gamePowerOf,valuePerspectiveOf,isWeakerParty,isStrongerParty,interestAnalyzerOf,gameStrategyOf}from'./model.js';export{deriveCommercialRole,deriveAllRoles,PERMISSION_RANGES,CORE_PERMISSION_INDEX}from'./derivation.js';export{mergeRolePerspective,isOnchainRoleAuthoritative,resolveWatchRole}from'./resolution.js';
|
|
1
|
+
export{COMMERCIAL_ROLES}from'./types.js';export{ROLE_MODELS,gamePowerOf,valuePerspectiveOf,isWeakerParty,isStrongerParty,interestAnalyzerOf,gameStrategyOf,valuePropositionOf}from'./model.js';export{deriveCommercialRole,deriveAllRoles,PERMISSION_RANGES,CORE_PERMISSION_INDEX}from'./derivation.js';export{mergeRolePerspective,isOnchainRoleAuthoritative,resolveWatchRole}from'./resolution.js';
|
package/dist/role/model.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CommercialRole, GamePower, RoleModel, ValuePerspective } from "./types.js";
|
|
1
|
+
import type { CommercialRole, GamePower, RoleModel, ValuePerspective, ValueProposition } from "./types.js";
|
|
2
2
|
export declare const ROLE_MODELS: Record<CommercialRole, RoleModel>;
|
|
3
3
|
export declare function gamePowerOf(role: CommercialRole): GamePower;
|
|
4
4
|
export declare function valuePerspectiveOf(role: CommercialRole): ValuePerspective;
|
|
@@ -6,3 +6,4 @@ export declare function isWeakerParty(role: CommercialRole): boolean;
|
|
|
6
6
|
export declare function isStrongerParty(role: CommercialRole): boolean;
|
|
7
7
|
export declare function interestAnalyzerOf(role: CommercialRole): string;
|
|
8
8
|
export declare function gameStrategyOf(role: CommercialRole): string;
|
|
9
|
+
export declare function valuePropositionOf(role: CommercialRole): ValueProposition;
|
package/dist/role/model.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const ROLE_MODELS={'merchant':{'role':'merchant','power':'strong','interest_analyzer':'merchant-interest','game_strategy':'merchant','value_perspective':'producer'},'customer':{'role':'customer','power':'weak','interest_analyzer':'customer-interest','game_strategy':'customer','value_perspective':'consumer'},'demander':{'role':'demander','power':'weak','interest_analyzer':'demander-interest','game_strategy':'demander','value_perspective':'consumer'},'prospect':{'role':'prospect','power':'weak','interest_analyzer':'preorder','game_strategy':'customer','value_perspective':'consumer'},'supplier':{'role':'supplier','power':'peer','interest_analyzer':'supplier-interest','game_strategy':'supplier','value_perspective':'producer'},'collaborator':{'role':'collaborator','power':'peer','interest_analyzer':'collaborator-interest','game_strategy':'collaborator','value_perspective':'neutral'},'arbitrator':{'role':'arbitrator','power':'neutral','interest_analyzer':'arb_game','game_strategy':'arbitrator','value_perspective':'neutral'},'neutral':{'role':'neutral','power':'neutral','interest_analyzer':'system','game_strategy':'system','value_perspective':'neutral'},'system':{'role':'system','power':'neutral','interest_analyzer':'system','game_strategy':'system','value_perspective':'neutral'}};export function gamePowerOf(a){return ROLE_MODELS[a]['power'];}export function valuePerspectiveOf(a){return ROLE_MODELS[a]['value_perspective'];}export function isWeakerParty(a){return ROLE_MODELS[a]['power']==='weak';}export function isStrongerParty(a){return ROLE_MODELS[a]['power']==='strong';}export function interestAnalyzerOf(a){return ROLE_MODELS[a]['interest_analyzer'];}export function gameStrategyOf(a){return ROLE_MODELS[a]['game_strategy'];}
|
|
1
|
+
export const ROLE_MODELS={'merchant':{'role':'merchant','power':'strong','interest_analyzer':'merchant-interest','game_strategy':'merchant','value_perspective':'producer','value_proposition':{'offers':'a\x20Service\x20(product\x20+\x20Machine\x20workflow)\x20for\x20delivery','seeks':'settlement\x20for\x20the\x20delivered\x20service'}},'customer':{'role':'customer','power':'weak','interest_analyzer':'customer-interest','game_strategy':'customer','value_perspective':'consumer','value_proposition':{'offers':'escrowed\x20payment\x20for\x20the\x20order','seeks':'verified\x20delivery\x20of\x20the\x20purchased\x20service'}},'demander':{'role':'demander','power':'weak','interest_analyzer':'demander-interest','game_strategy':'demander','value_perspective':'consumer','value_proposition':{'offers':'a\x20Demand\x20(opportunity\x20+\x20selection-based\x20award)','seeks':'qualified\x20suppliers\x20to\x20present\x20and\x20fulfill\x20it'}},'prospect':{'role':'prospect','power':'weak','interest_analyzer':'preorder','game_strategy':'customer','value_perspective':'consumer','value_proposition':{'offers':'due-diligence\x20attention\x20and\x20a\x20potential\x20order','seeks':'a\x20trustworthy\x20service\x20worth\x20buying'}},'supplier':{'role':'supplier','power':'peer','interest_analyzer':'supplier-interest','game_strategy':'supplier','value_perspective':'producer','value_proposition':{'offers':'sub-order\x20fulfillment\x20as\x20a\x20peer\x20provider','seeks':'settlement\x20and\x20continued\x20workflow\x20participation'}},'collaborator':{'role':'collaborator','power':'peer','interest_analyzer':'collaborator-interest','game_strategy':'collaborator','value_perspective':'neutral','value_proposition':{'offers':'authorized\x20process\x20operations\x20(advance\x20nodes)','seeks':'participation\x20within\x20their\x20permission\x20scope'}},'arbitrator':{'role':'arbitrator','power':'neutral','interest_analyzer':'arb_game','game_strategy':'arbitrator','value_perspective':'neutral','value_proposition':{'offers':'neutral\x20dispute\x20resolution','seeks':'resolution\x20fees\x20and\x20clean\x20cases'}},'neutral':{'role':'neutral','power':'neutral','interest_analyzer':'system','game_strategy':'system','value_perspective':'neutral','value_proposition':{'offers':'no\x20operative\x20stake','seeks':'objective\x20observation'}},'system':{'role':'system','power':'neutral','interest_analyzer':'system','game_strategy':'system','value_perspective':'neutral','value_proposition':{'offers':'non-human\x20automation\x20(keepers\x20/\x20time\x20guards)','seeks':'deterministic\x20lifecycle\x20advancement'}}};export function gamePowerOf(a){return ROLE_MODELS[a]['power'];}export function valuePerspectiveOf(a){return ROLE_MODELS[a]['value_perspective'];}export function isWeakerParty(a){return ROLE_MODELS[a]['power']==='weak';}export function isStrongerParty(a){return ROLE_MODELS[a]['power']==='strong';}export function interestAnalyzerOf(a){return ROLE_MODELS[a]['interest_analyzer'];}export function gameStrategyOf(a){return ROLE_MODELS[a]['game_strategy'];}export function valuePropositionOf(a){return ROLE_MODELS[a]['value_proposition'];}
|
package/dist/role/types.d.ts
CHANGED
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
export type CommercialRole = "merchant" | "customer" | "demander" | "prospect" | "supplier" | "collaborator" | "arbitrator" | "neutral" | "system";
|
|
2
2
|
export type GamePower = "strong" | "weak" | "peer" | "neutral";
|
|
3
3
|
export type ValuePerspective = "producer" | "consumer" | "neutral";
|
|
4
|
+
export interface ValueProposition {
|
|
5
|
+
offers: string;
|
|
6
|
+
seeks: string;
|
|
7
|
+
}
|
|
4
8
|
export interface RoleModel {
|
|
5
9
|
role: CommercialRole;
|
|
6
10
|
power: GamePower;
|
|
7
11
|
interest_analyzer: string;
|
|
8
12
|
game_strategy: string;
|
|
9
13
|
value_perspective: ValuePerspective;
|
|
14
|
+
value_proposition: ValueProposition;
|
|
10
15
|
}
|
|
11
16
|
export declare const COMMERCIAL_ROLES: CommercialRole[];
|
package/dist/rules.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ export { CONFIRMATION_RULES, SAFETY_RULES_VERSION, DEFAULT_AMOUNT_THRESHOLD, get
|
|
|
7
7
|
export { distillIntent, extractSignals } from "./experience/intent-distill.js";
|
|
8
8
|
export type { DistilledIntent } from "./experience/types.js";
|
|
9
9
|
export { Harness, getHarness, setHarness } from "./harness/index.js";
|
|
10
|
-
export type {
|
|
10
|
+
export type { ExpectedResult, VerifyReport, RecoveryAction, } from "./harness/types.js";
|
|
11
11
|
export { getDefaultPreferences, inferPreferences, matchServiceToPreferences, mergePreferences, validatePreferences, SUPPORTED_INDUSTRIES, type IndustryTemplate, type Industry, type PreferenceInference, type ServiceForMatching, type PreferenceMatchResult, } from "./customer/user-preferences.js";
|
|
12
12
|
export type { UserPreferences } from "./customer/types.js";
|
|
13
13
|
export declare function buildSoftRulesPrompt(): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{CONFIRMATION_RULES,resolveOverrideId}from'../knowledge/safety-rules.js';import{isEnabled as
|
|
1
|
+
import{CONFIRMATION_RULES,resolveOverrideId}from'../knowledge/safety-rules.js';import{isEnabled as a334a}from'../config/index.js';import{isPlanPreapproved}from'../goal/plan-approval.js';export function isConfirmGateEnabled(){return a334a('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']===!![];}
|
package/dist/safety/preview.js
CHANGED
|
@@ -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
|
|
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)');
|