@wowok/agent-mcp 2.7.1 → 2.7.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/config/index.js +1 -1
- package/dist/config/runtime.js +1 -238
- package/dist/customer/account-events.d.ts +32 -0
- package/dist/customer/account-events.js +1 -0
- package/dist/customer/customer-advice.d.ts +1 -0
- package/dist/customer/customer-advice.js +1 -130
- package/dist/customer/index.js +1 -11
- package/dist/customer/industry-risks.js +1 -438
- package/dist/customer/info-puzzle.js +1 -681
- package/dist/customer/order-monitor.js +1 -328
- package/dist/customer/order-strategy.d.ts +1 -1
- package/dist/customer/order-strategy.js +1 -373
- package/dist/customer/post-purchase.js +1 -351
- package/dist/customer/preorder-compare.js +1 -34
- package/dist/customer/reminder-system.d.ts +2 -0
- package/dist/customer/reminder-system.js +1 -316
- package/dist/customer/risk-assessment.d.ts +1 -0
- package/dist/customer/risk-assessment.js +1 -397
- package/dist/customer/types.d.ts +2 -0
- package/dist/customer/types.js +1 -13
- package/dist/customer/user-preferences.js +1 -460
- package/dist/evaluation/arbitration-game.d.ts +9 -2
- package/dist/evaluation/arbitration-game.js +1 -48
- package/dist/evaluation/builtins/arbitration-score.d.ts +41 -0
- package/dist/evaluation/builtins/arbitration-score.js +1 -0
- package/dist/evaluation/builtins/demand-match.js +1 -153
- package/dist/evaluation/builtins/index.d.ts +1 -0
- package/dist/evaluation/builtins/index.js +1 -10
- package/dist/evaluation/builtins/service-risk.js +1 -55
- package/dist/evaluation/capability.js +1 -13
- package/dist/evaluation/category-match-rules.d.ts +30 -0
- package/dist/evaluation/category-match-rules.js +1 -0
- package/dist/evaluation/composer.js +1 -40
- package/dist/evaluation/engine.js +1 -175
- package/dist/evaluation/extract.js +1 -115
- package/dist/evaluation/game-strategy.d.ts +27 -0
- package/dist/evaluation/game-strategy.js +1 -0
- package/dist/evaluation/gap.js +1 -100
- package/dist/evaluation/index.d.ts +2 -0
- package/dist/evaluation/index.js +1 -11
- package/dist/evaluation/location-match.d.ts +42 -0
- package/dist/evaluation/location-match.js +1 -0
- package/dist/evaluation/node-game.d.ts +31 -3
- package/dist/evaluation/node-game.js +1 -57
- package/dist/evaluation/path-reasoning.d.ts +35 -0
- package/dist/evaluation/path-reasoning.js +1 -0
- package/dist/evaluation/region.d.ts +6 -0
- package/dist/evaluation/region.js +1 -36
- package/dist/evaluation/types.d.ts +18 -0
- package/dist/evaluation/types.js +1 -1
- package/dist/evaluation/user-injection.js +1 -27
- package/dist/experience/experience-reuse.js +1 -103
- package/dist/experience/index.js +1 -5
- package/dist/experience/intent-distill.js +1 -83
- package/dist/experience/realtime-feedback.js +1 -94
- package/dist/experience/types.js +1 -1
- package/dist/experience/user-profile.d.ts +1 -1
- package/dist/experience/user-profile.js +1 -171
- package/dist/extensions/business-modules.js +1 -287
- package/dist/extensions/capability-manifest.js +1 -781
- package/dist/extensions/constraint-registry.js +1 -198
- package/dist/extensions/index.d.ts +6 -0
- package/dist/extensions/index.js +1 -6
- package/dist/extensions/industry-layers.d.ts +75 -0
- package/dist/extensions/industry-layers.js +1 -0
- package/dist/extensions/industry-pack.d.ts +105 -0
- package/dist/extensions/industry-pack.js +1 -0
- package/dist/extensions/metric-registry.js +1 -257
- package/dist/extensions/mode-evaluator.d.ts +1 -1
- package/dist/extensions/mode-evaluator.js +1 -170
- package/dist/extensions/modes.js +1 -499
- package/dist/extensions/registry.d.ts +1 -0
- package/dist/extensions/registry.js +1 -717
- package/dist/extensions/types.js +1 -1
- package/dist/graph/base.d.ts +8 -0
- package/dist/graph/base.js +1 -0
- package/dist/harness/auto-escalation.js +1 -68
- package/dist/harness/checkpoint.js +1 -129
- package/dist/harness/index.d.ts +1 -0
- package/dist/harness/index.js +1 -78
- package/dist/harness/plan.d.ts +2 -0
- package/dist/harness/plan.js +1 -315
- package/dist/harness/recover.d.ts +1 -1
- package/dist/harness/recover.js +1 -139
- package/dist/harness/types.d.ts +2 -3
- package/dist/harness/types.js +1 -1
- package/dist/harness/verify.js +1 -237
- package/dist/index.js +1 -273
- package/dist/intent/enrich.js +1 -67
- package/dist/intent/index.js +1 -60
- package/dist/intent/matcher.js +1 -81
- package/dist/intent/store.js +1 -55
- package/dist/intent/types.js +1 -10
- package/dist/knowledge/acquisition-flywheel.js +1 -192
- package/dist/knowledge/allocation-confirm.js +1 -534
- package/dist/knowledge/allocation-context.js +1 -249
- package/dist/knowledge/allocation-ledger.js +1 -463
- package/dist/knowledge/allocation-puzzle.js +1 -298
- package/dist/knowledge/allocation-risk.js +1 -568
- package/dist/knowledge/allocation-templates.js +1 -970
- package/dist/knowledge/allocation-translation.js +1 -585
- package/dist/knowledge/anti-cheat.d.ts +37 -0
- package/dist/knowledge/anti-cheat.js +1 -0
- package/dist/knowledge/arb-confirm.d.ts +28 -0
- package/dist/knowledge/arb-confirm.js +1 -0
- package/dist/knowledge/arb-risk.js +1 -210
- package/dist/knowledge/arb-translation.d.ts +48 -0
- package/dist/knowledge/arb-translation.js +1 -0
- package/dist/knowledge/arbitration-confirm.js +1 -559
- package/dist/knowledge/arbitration-context.js +1 -505
- package/dist/knowledge/arbitration-ledger.js +1 -521
- package/dist/knowledge/arbitration-puzzle.js +1 -304
- package/dist/knowledge/arbitration-risk.js +1 -423
- package/dist/knowledge/arbitration-templates.js +1 -276
- package/dist/knowledge/arbitration-translation.js +1 -487
- package/dist/knowledge/audit-rules.js +1 -141
- package/dist/knowledge/bridge-confirm.d.ts +26 -0
- package/dist/knowledge/bridge-confirm.js +1 -0
- package/dist/knowledge/bridge-risk.js +1 -263
- package/dist/knowledge/bridge-translation.d.ts +37 -0
- package/dist/knowledge/bridge-translation.js +1 -0
- package/dist/knowledge/contact-confirm.d.ts +27 -0
- package/dist/knowledge/contact-confirm.js +1 -0
- package/dist/knowledge/contact-risk.js +1 -200
- package/dist/knowledge/contact-templates.js +1 -60
- package/dist/knowledge/contact-translation.d.ts +39 -0
- package/dist/knowledge/contact-translation.js +1 -0
- package/dist/knowledge/demand-confirm.js +1 -206
- package/dist/knowledge/demand-context.d.ts +17 -0
- package/dist/knowledge/demand-context.js +1 -0
- package/dist/knowledge/demand-ledger.d.ts +26 -0
- package/dist/knowledge/demand-ledger.js +1 -0
- package/dist/knowledge/demand-matching.js +1 -132
- package/dist/knowledge/demand-puzzle.d.ts +29 -0
- package/dist/knowledge/demand-puzzle.js +1 -0
- package/dist/knowledge/demand-risk.js +1 -240
- package/dist/knowledge/demand-templates.d.ts +12 -0
- package/dist/knowledge/demand-templates.js +1 -0
- package/dist/knowledge/demand-translation.js +1 -354
- package/dist/knowledge/deployment-scanner.js +1 -823
- package/dist/knowledge/dynamic-pricing.js +1 -87
- package/dist/knowledge/evidence-review.d.ts +12 -0
- package/dist/knowledge/evidence-review.js +1 -0
- package/dist/knowledge/examples-scanner-cli.js +1 -26
- package/dist/knowledge/examples-scanner.js +1 -843
- package/dist/knowledge/flywheel-loop.d.ts +0 -1
- package/dist/knowledge/flywheel-loop.js +1 -404
- package/dist/knowledge/fund-layer.js +1 -973
- package/dist/knowledge/glossary.js +1 -211
- package/dist/knowledge/guard-confirm.js +1 -406
- package/dist/knowledge/guard-context.js +1 -287
- package/dist/knowledge/guard-design-patterns.js +1 -360
- package/dist/knowledge/guard-ledger.js +1 -260
- package/dist/knowledge/guard-lint.js +1 -670
- package/dist/knowledge/guard-migration.d.ts +1 -1
- package/dist/knowledge/guard-migration.js +1 -228
- package/dist/knowledge/guard-puzzle.js +1 -805
- package/dist/knowledge/guard-render.js +1 -700
- package/dist/knowledge/guard-risk.js +1 -1879
- package/dist/knowledge/guard-submission-prompt.js +1 -171
- package/dist/knowledge/guard-templates.js +1 -1105
- package/dist/knowledge/guard-translation.js +1 -1119
- package/dist/knowledge/index.d.ts +71 -3
- package/dist/knowledge/index.js +1 -436
- package/dist/knowledge/industry-evolution.js +1 -323
- package/dist/knowledge/industry-generalizer.js +1 -381
- package/dist/knowledge/industry-registry.js +1 -174
- package/dist/knowledge/intent-metrics.d.ts +4 -3
- package/dist/knowledge/intent-metrics.js +1 -566
- package/dist/knowledge/machine-confirm.js +1 -559
- package/dist/knowledge/machine-context.js +1 -833
- package/dist/knowledge/machine-ledger.js +1 -338
- package/dist/knowledge/machine-puzzle.js +1 -494
- package/dist/knowledge/machine-render.js +1 -565
- package/dist/knowledge/machine-risk.js +1 -669
- package/dist/knowledge/machine-templates.js +1 -1597
- package/dist/knowledge/machine-topology.js +1 -234
- package/dist/knowledge/machine-translation.js +1 -513
- package/dist/knowledge/market-metrics.d.ts +12 -0
- package/dist/knowledge/market-metrics.js +1 -0
- package/dist/knowledge/market-operations.d.ts +46 -0
- package/dist/knowledge/market-operations.js +1 -0
- package/dist/knowledge/mcp-schema-audit-cli.js +1 -45
- package/dist/knowledge/mcp-schema-audit.d.ts +22 -22
- package/dist/knowledge/mcp-schema-audit.js +1 -777
- package/dist/knowledge/onchain-constants.js +1 -35
- package/dist/knowledge/order-confirm.js +1 -573
- package/dist/knowledge/order-context.js +1 -390
- package/dist/knowledge/order-ledger.js +1 -341
- package/dist/knowledge/order-puzzle.js +1 -255
- package/dist/knowledge/order-risk.js +1 -653
- package/dist/knowledge/order-templates.js +1 -368
- package/dist/knowledge/order-translation.js +1 -550
- package/dist/knowledge/overrides-loader.js +1 -65
- package/dist/knowledge/passport-confirm.js +1 -531
- package/dist/knowledge/passport-context.js +1 -306
- package/dist/knowledge/passport-ledger.js +1 -282
- package/dist/knowledge/passport-puzzle.js +1 -333
- package/dist/knowledge/passport-risk.js +1 -450
- package/dist/knowledge/passport-templates.js +1 -568
- package/dist/knowledge/passport-translation.js +1 -516
- package/dist/knowledge/payment-confirm.d.ts +26 -0
- package/dist/knowledge/payment-confirm.js +1 -0
- package/dist/knowledge/payment-risk.js +1 -249
- package/dist/knowledge/payment-translation.d.ts +37 -0
- package/dist/knowledge/payment-translation.js +1 -0
- package/dist/knowledge/permission-confirm.js +1 -426
- package/dist/knowledge/permission-context.js +1 -224
- package/dist/knowledge/permission-ledger.d.ts +11 -0
- package/dist/knowledge/permission-ledger.js +1 -403
- package/dist/knowledge/permission-puzzle.js +1 -173
- package/dist/knowledge/permission-risk.js +1 -411
- package/dist/knowledge/permission-templates.js +1 -234
- package/dist/knowledge/permission-translation.js +1 -350
- package/dist/knowledge/personal-confirm.d.ts +29 -0
- package/dist/knowledge/personal-confirm.js +1 -0
- package/dist/knowledge/personal-risk.js +1 -212
- package/dist/knowledge/personal-translation.d.ts +37 -0
- package/dist/knowledge/personal-translation.js +1 -0
- package/dist/knowledge/process-model.d.ts +1 -11
- package/dist/knowledge/process-model.js +1 -160
- package/dist/knowledge/progress-confirm.js +1 -456
- package/dist/knowledge/progress-context.js +1 -452
- package/dist/knowledge/progress-ledger.js +1 -330
- package/dist/knowledge/progress-puzzle.js +1 -219
- package/dist/knowledge/progress-risk.js +1 -461
- package/dist/knowledge/progress-templates.js +1 -228
- package/dist/knowledge/progress-translation.js +1 -405
- package/dist/knowledge/proof-confirm.js +1 -187
- package/dist/knowledge/proof-context.d.ts +17 -0
- package/dist/knowledge/proof-context.js +1 -0
- package/dist/knowledge/proof-ledger.d.ts +34 -0
- package/dist/knowledge/proof-ledger.js +1 -0
- package/dist/knowledge/proof-puzzle.d.ts +35 -0
- package/dist/knowledge/proof-puzzle.js +1 -0
- package/dist/knowledge/proof-risk.js +1 -207
- package/dist/knowledge/proof-templates.d.ts +22 -0
- package/dist/knowledge/proof-templates.js +1 -0
- package/dist/knowledge/proof-translation.js +1 -283
- package/dist/knowledge/registrar-confirm.d.ts +26 -0
- package/dist/knowledge/registrar-confirm.js +1 -0
- package/dist/knowledge/registrar-risk.js +1 -217
- package/dist/knowledge/registrar-translation.d.ts +37 -0
- package/dist/knowledge/registrar-translation.js +1 -0
- package/dist/knowledge/repository-confirm.js +1 -286
- package/dist/knowledge/repository-context.d.ts +12 -0
- package/dist/knowledge/repository-context.js +1 -0
- package/dist/knowledge/repository-ledger.d.ts +25 -0
- package/dist/knowledge/repository-ledger.js +1 -0
- package/dist/knowledge/repository-puzzle.d.ts +30 -0
- package/dist/knowledge/repository-puzzle.js +1 -0
- package/dist/knowledge/repository-risk.js +1 -373
- package/dist/knowledge/repository-templates.d.ts +14 -0
- package/dist/knowledge/repository-templates.js +1 -0
- package/dist/knowledge/repository-translation.js +1 -445
- package/dist/knowledge/reputation-rules.js +1 -99
- package/dist/knowledge/resource-confirm.d.ts +25 -0
- package/dist/knowledge/resource-confirm.js +1 -0
- package/dist/knowledge/resource-risk.js +1 -157
- package/dist/knowledge/resource-translation.d.ts +37 -0
- package/dist/knowledge/resource-translation.js +1 -0
- package/dist/knowledge/reward-confirm.js +1 -526
- package/dist/knowledge/reward-context.d.ts +2 -2
- package/dist/knowledge/reward-context.js +1 -504
- package/dist/knowledge/reward-ledger.js +1 -502
- package/dist/knowledge/reward-puzzle.js +1 -300
- package/dist/knowledge/reward-risk.js +1 -627
- package/dist/knowledge/reward-templates.js +1 -197
- package/dist/knowledge/reward-translation.js +1 -501
- package/dist/knowledge/safety-rules.d.ts +1 -0
- package/dist/knowledge/safety-rules.js +1 -404
- package/dist/knowledge/scenario-modes.js +1 -321
- package/dist/knowledge/service-confirm.js +1 -807
- package/dist/knowledge/service-context.js +1 -403
- package/dist/knowledge/service-ledger.js +1 -609
- package/dist/knowledge/service-puzzle.js +1 -236
- package/dist/knowledge/service-risk.d.ts +1 -1
- package/dist/knowledge/service-risk.js +1 -651
- package/dist/knowledge/service-templates.js +1 -456
- package/dist/knowledge/service-translation.js +1 -622
- package/dist/knowledge/template-registry.js +1 -353
- package/dist/knowledge/tool-constraints.js +1 -195
- package/dist/knowledge/tools-reference.js +1 -178
- package/dist/knowledge/treasury-confirm.js +1 -512
- package/dist/knowledge/treasury-context.js +1 -363
- package/dist/knowledge/treasury-ledger.js +1 -300
- package/dist/knowledge/treasury-puzzle.js +1 -216
- package/dist/knowledge/treasury-risk.js +1 -440
- package/dist/knowledge/treasury-templates.js +1 -358
- package/dist/knowledge/treasury-translation.js +1 -498
- package/dist/knowledge/trust-metrics.js +1 -198
- package/dist/knowledge/universal-template.d.ts +22 -0
- package/dist/knowledge/universal-template.js +1 -0
- package/dist/knowledge/util-confirm.d.ts +24 -0
- package/dist/knowledge/util-confirm.js +1 -0
- package/dist/knowledge/util-risk.js +1 -135
- package/dist/knowledge/util-translation.d.ts +38 -0
- package/dist/knowledge/util-translation.js +1 -0
- package/dist/knowledge/workflow-guidance.d.ts +116 -0
- package/dist/knowledge/workflow-guidance.js +1 -0
- package/dist/loop-engineering/aggregate.js +1 -132
- package/dist/loop-engineering/context-collect.js +1 -83
- package/dist/loop-engineering/diagnose.js +1 -273
- package/dist/loop-engineering/improve.js +1 -405
- package/dist/loop-engineering/index.js +1 -4
- package/dist/loop-engineering/pipeline.js +1 -56
- package/dist/mode-market/index.js +1 -3
- package/dist/mode-market/registry.js +1 -124
- package/dist/mode-market/review.js +1 -214
- package/dist/mode-market/submission.js +1 -85
- package/dist/participation/collaborator-interest.d.ts +23 -0
- package/dist/participation/collaborator-interest.js +1 -0
- package/dist/participation/customer-interest.d.ts +25 -0
- package/dist/participation/customer-interest.js +1 -0
- package/dist/participation/employee-kpi.d.ts +25 -0
- package/dist/participation/employee-kpi.js +1 -0
- package/dist/participation/employee-store.d.ts +16 -0
- package/dist/participation/employee-store.js +1 -0
- package/dist/participation/index.d.ts +2 -0
- package/dist/participation/index.js +1 -0
- package/dist/participation/merchant-interest.js +1 -100
- package/dist/participation/radar-core.d.ts +13 -3
- package/dist/participation/radar-core.js +1 -269
- package/dist/participation/supplier-interest.d.ts +25 -0
- package/dist/participation/supplier-interest.js +1 -0
- package/dist/persona/analyzer.js +1 -66
- package/dist/persona/bridge.js +1 -86
- package/dist/persona/defaults.js +1 -195
- package/dist/persona/experience-bridge.js +1 -23
- package/dist/persona/index.d.ts +9 -2
- package/dist/persona/index.js +1 -71
- package/dist/persona/local-region.d.ts +20 -0
- package/dist/persona/local-region.js +1 -0
- package/dist/persona/model.js +1 -111
- package/dist/persona/overrides.d.ts +10 -0
- package/dist/persona/overrides.js +1 -0
- package/dist/persona/pack-personae.d.ts +11 -0
- package/dist/persona/pack-personae.js +1 -0
- package/dist/persona/store.js +1 -62
- package/dist/persona/strategy-intent.d.ts +20 -0
- package/dist/persona/strategy-intent.js +1 -0
- package/dist/persona/types.d.ts +6 -2
- package/dist/persona/types.js +1 -5
- package/dist/project/business-puzzle.d.ts +1 -1
- package/dist/project/business-puzzle.js +1 -383
- package/dist/project/context-assembly.js +1 -254
- package/dist/project/deployment-bridge.js +1 -120
- package/dist/project/deployment-doc.js +1 -1126
- package/dist/project/edit-planner.js +1 -1342
- package/dist/project/evaluation.d.ts +37 -1
- package/dist/project/evaluation.js +1 -2011
- package/dist/project/game-theory.js +1 -177
- package/dist/project/graph-builder.js +1 -656
- package/dist/project/graph.d.ts +3 -6
- package/dist/project/graph.js +1 -340
- package/dist/project/handlers.d.ts +33 -2
- package/dist/project/handlers.js +1 -1784
- package/dist/project/index.d.ts +2 -0
- package/dist/project/index.js +1 -301
- package/dist/project/intent-analyzer.js +1 -149
- package/dist/project/machine-nodes.js +1 -36
- package/dist/project/merchant-guide.d.ts +19 -0
- package/dist/project/merchant-guide.js +1 -264
- package/dist/project/migration.js +1 -125
- package/dist/project/mode-actions.js +1 -309
- package/dist/project/namespace.js +1 -206
- package/dist/project/participation-radar.js +1 -428
- package/dist/project/pipeline-actions.js +1 -109
- package/dist/project/project-store.js +1 -422
- package/dist/project/query.js +1 -153
- package/dist/project/reverse-mapping.d.ts +34 -0
- package/dist/project/reverse-mapping.js +1 -0
- package/dist/project/risk-aggregator.js +1 -295
- package/dist/project/rollback-policy.js +1 -290
- package/dist/project/semantic-assembler.js +1 -345
- package/dist/project/semantic-graph.d.ts +3 -5
- package/dist/project/semantic-graph.js +1 -292
- package/dist/project/stage-gate.js +1 -369
- package/dist/project/substep-trace.js +1 -332
- package/dist/project/task-tracker.js +1 -78
- package/dist/project/workflow-design-assessment.d.ts +24 -0
- package/dist/project/workflow-design-assessment.js +1 -0
- package/dist/role/derivation.d.ts +18 -0
- package/dist/role/derivation.js +1 -0
- package/dist/role/index.d.ts +5 -0
- package/dist/role/index.js +1 -0
- package/dist/role/model.d.ts +8 -0
- package/dist/role/model.js +1 -0
- package/dist/role/resolution.d.ts +11 -0
- package/dist/role/resolution.js +1 -0
- package/dist/role/types.d.ts +11 -0
- package/dist/role/types.js +1 -0
- package/dist/rules.js +1 -52
- package/dist/safety/confirm-gate.d.ts +1 -1
- package/dist/safety/confirm-gate.js +1 -88
- package/dist/safety/index.js +1 -3
- package/dist/safety/preview.js +1 -52
- package/dist/schema/call/allocation.d.ts +186 -1385
- package/dist/schema/call/allocation.js +1 -34
- package/dist/schema/call/arbitration.d.ts +272 -1871
- package/dist/schema/call/arbitration.js +1 -113
- package/dist/schema/call/base.d.ts +1831 -9076
- package/dist/schema/call/base.js +1 -370
- package/dist/schema/call/bridge.d.ts +911 -3171
- package/dist/schema/call/bridge.js +1 -458
- package/dist/schema/call/contact.d.ts +135 -931
- package/dist/schema/call/contact.js +1 -37
- package/dist/schema/call/demand.d.ts +164 -1194
- package/dist/schema/call/demand.js +1 -47
- package/dist/schema/call/guard.d.ts +298 -1140
- package/dist/schema/call/guard.js +1 -161
- package/dist/schema/call/handler.js +1 -322
- package/dist/schema/call/index.js +1 -20
- package/dist/schema/call/machine.d.ts +459 -5403
- package/dist/schema/call/machine.js +1 -193
- package/dist/schema/call/order.d.ts +137 -844
- package/dist/schema/call/order.js +1 -35
- package/dist/schema/call/payment.d.ts +74 -561
- package/dist/schema/call/payment.js +1 -37
- package/dist/schema/call/permission-handler.js +1 -54
- package/dist/schema/call/permission.d.ts +335 -2791
- package/dist/schema/call/permission.js +1 -105
- package/dist/schema/call/personal.d.ts +227 -1814
- package/dist/schema/call/personal.js +1 -78
- package/dist/schema/call/progress.d.ts +140 -843
- package/dist/schema/call/progress.js +1 -47
- package/dist/schema/call/proof.d.ts +42 -258
- package/dist/schema/call/proof.js +1 -33
- package/dist/schema/call/repository.d.ts +324 -2222
- package/dist/schema/call/repository.js +1 -77
- package/dist/schema/call/reward.d.ts +153 -1183
- package/dist/schema/call/reward.js +1 -30
- package/dist/schema/call/semantic.js +1 -1679
- package/dist/schema/call/service.d.ts +376 -3431
- package/dist/schema/call/service.js +1 -184
- package/dist/schema/call/treasury.d.ts +252 -2158
- package/dist/schema/call/treasury.js +1 -71
- package/dist/schema/common/index.d.ts +222 -697
- package/dist/schema/common/index.js +1 -407
- package/dist/schema/config/index.d.ts +18 -161
- package/dist/schema/config/index.js +1 -68
- package/dist/schema/employee/index.d.ts +99 -0
- package/dist/schema/employee/index.js +1 -0
- package/dist/schema/evaluation/index.d.ts +1062 -3748
- package/dist/schema/evaluation/index.js +1 -356
- package/dist/schema/index.d.ts +3 -0
- package/dist/schema/index.js +1 -17
- package/dist/schema/industry-pack/index.d.ts +132 -0
- package/dist/schema/industry-pack/index.js +1 -0
- package/dist/schema/intent-radar/index.d.ts +92 -245
- package/dist/schema/intent-radar/index.js +1 -89
- package/dist/schema/local/index.d.ts +2045 -18080
- package/dist/schema/local/index.js +1 -927
- package/dist/schema/local/wip.d.ts +61 -651
- package/dist/schema/local/wip.js +1 -187
- package/dist/schema/messenger/index.d.ts +949 -5557
- package/dist/schema/messenger/index.js +1 -475
- package/dist/schema/operations.d.ts +2969 -26518
- package/dist/schema/operations.js +1 -520
- package/dist/schema/persona/index.d.ts +469 -1820
- package/dist/schema/persona/index.js +1 -148
- package/dist/schema/project/index.d.ts +1027 -8408
- package/dist/schema/project/index.js +1 -2057
- package/dist/schema/query/index.d.ts +12041 -75261
- package/dist/schema/query/index.js +1 -1646
- package/dist/schema/schema-query/index.d.ts +35 -98
- package/dist/schema/schema-query/index.js +1 -104
- package/dist/schema/schema-version.js +1 -76
- package/dist/schema/task-status.d.ts +26 -132
- package/dist/schema/task-status.js +1 -36
- package/dist/schema/trust/index.d.ts +194 -1290
- package/dist/schema/trust/index.js +1 -314
- package/dist/schema/utils/guard-parser.js +1 -419
- package/dist/schema/utils/guard-query-utils.js +1 -46
- package/dist/schema/utils/node-parser.js +1 -369
- package/dist/schema/utils/object-type-utils.js +1 -35
- package/dist/schema/utils/permission-index-utils.js +1 -7
- package/dist/schema/utils/permission-machine-check.js +1 -121
- package/dist/schema/utils/skills-recommendation.d.ts +1 -0
- package/dist/schema/utils/skills-recommendation.js +1 -77
- package/dist/schema/workspace/index.d.ts +69 -0
- package/dist/schema/workspace/index.js +1 -0
- package/dist/schema-query-impl/index.js +1 -0
- package/dist/schemas/account_operation.output.json +3147 -1652
- package/dist/schemas/account_operation.schema.json +225 -218
- package/dist/schemas/bridge_operation.output.json +1168 -650
- package/dist/schemas/bridge_operation.schema.json +736 -504
- package/dist/schemas/config_operation.output.json +185 -179
- package/dist/schemas/config_operation.schema.json +21 -26
- package/dist/schemas/employee_operation.output.json +207 -0
- package/dist/schemas/employee_operation.schema.json +176 -0
- package/dist/schemas/evaluation_operation.output.json +2329 -557
- package/dist/schemas/evaluation_operation.schema.json +2939 -720
- package/dist/schemas/guard2file.output.json +58 -64
- package/dist/schemas/guard2file.schema.json +79 -81
- package/dist/schemas/index.json +29 -11
- package/dist/schemas/industry_pack_operation.output.json +594 -0
- package/dist/schemas/industry_pack_operation.schema.json +55 -0
- package/dist/schemas/intent_radar.output.json +275 -200
- package/dist/schemas/intent_radar.schema.json +124 -123
- package/dist/schemas/local_info_operation.output.json +1174 -657
- package/dist/schemas/local_info_operation.schema.json +119 -125
- package/dist/schemas/local_mark_operation.output.json +1239 -689
- package/dist/schemas/local_mark_operation.schema.json +91 -96
- package/dist/schemas/machineNode2file.output.json +63 -69
- package/dist/schemas/machineNode2file.schema.json +79 -81
- package/dist/schemas/messenger_operation.output.json +2722 -1528
- package/dist/schemas/messenger_operation.schema.json +1482 -1264
- package/dist/schemas/onchain_events.output.json +2590 -975
- package/dist/schemas/onchain_events.schema.json +117 -99
- package/dist/schemas/onchain_operations.output.json +3957 -2309
- package/dist/schemas/onchain_operations.schema.json +20799 -9285
- package/dist/schemas/onchain_operations_allocation.schema.json +172 -108
- package/dist/schemas/onchain_operations_arbitration.schema.json +233 -146
- package/dist/schemas/onchain_operations_contact.schema.json +129 -90
- package/dist/schemas/onchain_operations_demand.schema.json +170 -112
- package/dist/schemas/onchain_operations_gen_passport.schema.json +61 -646
- package/dist/schemas/onchain_operations_gen_proof.schema.json +40 -172
- package/dist/schemas/onchain_operations_guard.schema.json +3765 -294
- package/dist/schemas/onchain_operations_machine.schema.json +537 -164
- package/dist/schemas/onchain_operations_order.schema.json +126 -96
- package/dist/schemas/onchain_operations_payment.schema.json +82 -67
- package/dist/schemas/onchain_operations_permission.schema.json +331 -93
- package/dist/schemas/onchain_operations_personal.schema.json +636 -96
- package/dist/schemas/onchain_operations_progress.schema.json +125 -92
- package/dist/schemas/onchain_operations_proof.schema.json +76 -69
- package/dist/schemas/onchain_operations_repository.schema.json +636 -249
- package/dist/schemas/onchain_operations_reward.schema.json +218 -108
- package/dist/schemas/onchain_operations_service.schema.json +679 -221
- package/dist/schemas/onchain_operations_treasury.schema.json +401 -135
- package/dist/schemas/onchain_table_data.output.json +6018 -2430
- package/dist/schemas/onchain_table_data.schema.json +544 -430
- package/dist/schemas/persona_operation.output.json +1568 -265
- package/dist/schemas/persona_operation.schema.json +346 -202
- package/dist/schemas/project_operation.output.json +6957 -5147
- package/dist/schemas/project_operation.schema.json +1050 -1020
- package/dist/schemas/query_task_status.output.json +195 -99
- package/dist/schemas/query_task_status.schema.json +12 -18
- package/dist/schemas/query_toolkit.output.json +18870 -14566
- package/dist/schemas/query_toolkit.schema.json +614 -522
- package/dist/schemas/schema_query.output.json +127 -129
- package/dist/schemas/schema_query.schema.json +64 -69
- package/dist/schemas/trust_score.output.json +678 -587
- package/dist/schemas/trust_score.schema.json +289 -277
- package/dist/schemas/wip_file.output.json +116 -124
- package/dist/schemas/wip_file.schema.json +142 -143
- package/dist/schemas/workspace_operation.output.json +277 -0
- package/dist/schemas/workspace_operation.schema.json +45 -0
- package/dist/schemas/wowok_buildin_info.output.json +1693 -723
- package/dist/schemas/wowok_buildin_info.schema.json +576 -512
- package/dist/telemetry/index.js +1 -112
- package/dist/telemetry/redact.js +1 -23
- package/dist/telemetry/storage.js +1 -80
- package/dist/tools/handlers/bridge.d.ts +8 -1
- package/dist/tools/handlers/bridge.js +1 -1
- package/dist/tools/handlers/config.js +1 -74
- package/dist/tools/handlers/employee.d.ts +2 -0
- package/dist/tools/handlers/employee.js +1 -0
- package/dist/tools/handlers/evaluation.js +1 -123
- package/dist/tools/handlers/file-export.js +1 -90
- package/dist/tools/handlers/industry-pack.d.ts +2 -0
- package/dist/tools/handlers/industry-pack.js +1 -0
- package/dist/tools/handlers/intent-radar.js +1 -76
- package/dist/tools/handlers/local.js +1 -53
- package/dist/tools/handlers/messenger.js +1 -188
- package/dist/tools/handlers/onchain.js +1 -1180
- package/dist/tools/handlers/persona.js +1 -89
- package/dist/tools/handlers/project.js +1 -211
- package/dist/tools/handlers/query.js +1 -434
- package/dist/tools/handlers/schema-query.js +1 -176
- package/dist/tools/handlers/task-status.js +1 -26
- package/dist/tools/handlers/trust.js +1 -380
- package/dist/tools/handlers/wip.js +1 -90
- package/dist/tools/handlers/workspace.d.ts +2 -0
- package/dist/tools/handlers/workspace.js +1 -0
- package/dist/tools/index.d.ts +2 -1
- package/dist/tools/index.js +1 -1382
- package/dist/tools/retry.js +1 -85
- package/dist/tools/rules-hook.d.ts +1 -1
- package/dist/tools/rules-hook.js +1 -23
- package/dist/tools/shared.d.ts +1 -1
- package/dist/tools/shared.js +1 -130
- package/dist/tools/types.d.ts +2 -1
- package/dist/tools/types.js +1 -1
- package/dist/tools/upgrade-check.d.ts +19 -0
- package/dist/tools/upgrade-check.js +1 -0
- package/dist/tools/wip-deploy-assist.js +1 -306
- package/dist/tools/wrap.js +1 -500
- package/package.json +7 -6
- package/dist/knowledge/arbitration-trust.d.ts +0 -24
- package/dist/knowledge/arbitration-trust.js +0 -117
- package/dist/schema/call/bridge-handler.d.ts +0 -8
- package/dist/schema/call/bridge-handler.js +0 -265
- package/dist/schema/sync-layer4.d.ts +0 -21
- package/dist/schema/sync-layer4.js +0 -286
- package/dist/schema-query/index.js +0 -810
- /package/dist/{schema-query → schema-query-impl}/index.d.ts +0 -0
|
@@ -1,458 +1 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
import { CallEnvSchema, SemanticSummarySchema } from "./base.js";
|
|
3
|
-
import { WowAddressSchema } from "../common/index.js";
|
|
4
|
-
export const BridgeTokenSchema = z.enum(["ETH", "WETH", "WBTC", "USDC", "USDT"])
|
|
5
|
-
.describe("Cross-chain token identifier. ETH=native ETH; WETH/WBTC/USDC/USDT=ERC20. Decimals are handled by SDK config.");
|
|
6
|
-
export const EvmChainSchema = z.enum(["mainnet"])
|
|
7
|
-
.default("mainnet")
|
|
8
|
-
.describe("EVM chain identifier. Currently only 'mainnet' (Ethereum mainnet, chainId=1) is supported. Extensible to BSC/Polygon/Arbitrum in the future.");
|
|
9
|
-
export const EvmAddressSchema = z.string()
|
|
10
|
-
.regex(/^0x[0-9a-fA-F]{40}$/, "Invalid EVM address (must be 0x + 40 hex)")
|
|
11
|
-
.describe("EVM address (0x + 40 hex)");
|
|
12
|
-
export const BridgeAmountSchema = z.string()
|
|
13
|
-
.describe("Cross-chain amount as a string in the smallest unit (e.g. wei / token minimal unit). Example: 1 ETH = '1000000000000000000'");
|
|
14
|
-
export const BridgeIdempotencyKeySchema = z.string().min(1).max(128)
|
|
15
|
-
.describe("Idempotency key (1-128 chars). Prevents duplicate transfers on retry. If a successful transfer with this key exists, returns it immediately (idempotentHit=true).");
|
|
16
|
-
export const BridgeOperationTypeSchema = z.enum([
|
|
17
|
-
"cross_chain_wow_to_evm",
|
|
18
|
-
"cross_chain_evm_to_wow",
|
|
19
|
-
"claim_wow_to_evm",
|
|
20
|
-
"resume_transfer",
|
|
21
|
-
"withdraw",
|
|
22
|
-
"query_active_evm_account",
|
|
23
|
-
"query_supported_evm_chains",
|
|
24
|
-
"query_supported_tokens",
|
|
25
|
-
"query_transfer_list",
|
|
26
|
-
"query_transfer_status",
|
|
27
|
-
"manage_evm_rpc",
|
|
28
|
-
]).describe("Bridge operation type");
|
|
29
|
-
export const BridgeWowToEvmDataSchema = z.object({
|
|
30
|
-
token: BridgeTokenSchema.describe("Cross-chain token type"),
|
|
31
|
-
amount: BridgeAmountSchema.describe("Cross-chain amount (WOW-side smallest unit, wowDecimals)"),
|
|
32
|
-
withdrawTo: EvmAddressSchema.optional()
|
|
33
|
-
.describe("Final withdrawal EVM address; if omitted, assets remain in activeEvmAccount. When provided, the SDK uses the activeEvmAccount key to transfer to this address."),
|
|
34
|
-
idempotencyKey: BridgeIdempotencyKeySchema.optional()
|
|
35
|
-
.describe("Idempotency key to prevent duplicate deposits on retry. If a successful transfer with this key exists, returns it immediately (idempotentHit=true)."),
|
|
36
|
-
idempotentByParams: z.boolean().optional()
|
|
37
|
-
.describe("If true, auto-generates an idempotency key from token+amount+withdrawTo. Use when you want implicit idempotency without managing explicit keys."),
|
|
38
|
-
}).strict().describe("WOW→EVM cross-chain (step 1: deposit only). " +
|
|
39
|
-
"Returns immediately with depositTxDigest + bridgeSeq + transferId. " +
|
|
40
|
-
"This operation only locks assets on WOW; it does NOT complete the cross-chain. " +
|
|
41
|
-
"After deposit, bridge nodes need ~1-5 minutes to sign. " +
|
|
42
|
-
"Use query_transfer_status to monitor progress; when latestState.step shows 'signatures_ready', " +
|
|
43
|
-
"call claim_wow_to_evm (step 2) to claim assets on EVM. " +
|
|
44
|
-
"[Gas requirements] Step 1 needs WOW gas; Step 2 (claim_wow_to_evm) needs activeEvmAccount to have target-chain gas.");
|
|
45
|
-
export const BridgeEvmToWowDataSchema = z.object({
|
|
46
|
-
token: BridgeTokenSchema.describe("Cross-chain token type (ETH=native ETH, others are ERC20)"),
|
|
47
|
-
amount: BridgeAmountSchema.describe("Cross-chain amount (EVM-side smallest unit, evmDecimals)"),
|
|
48
|
-
recipientWowAddress: WowAddressSchema.optional()
|
|
49
|
-
.describe("WOW recipient address or account name; defaults to env.account if omitted"),
|
|
50
|
-
idempotencyKey: BridgeIdempotencyKeySchema.optional()
|
|
51
|
-
.describe("Idempotency key to prevent duplicate deposits on retry. If a successful transfer with this key exists, returns it immediately (idempotentHit=true)."),
|
|
52
|
-
idempotentByParams: z.boolean().optional()
|
|
53
|
-
.describe("If true, auto-generates an idempotency key from token+amount+recipientWowAddress. Use when you want implicit idempotency without managing explicit keys."),
|
|
54
|
-
}).strict().describe("EVM→WOW cross-chain (single step: deposit). " +
|
|
55
|
-
"Returns immediately with depositTxHash + transferId. " +
|
|
56
|
-
"Bridge will automatically claim on WOW (no WOW gas needed, no user action required). " +
|
|
57
|
-
"[Time estimate] ~10-20 minutes total: " +
|
|
58
|
-
"(1) 64-block confirmation ~12.8 min on ETH; " +
|
|
59
|
-
"(2) bridge node auto-claim ~1-5 min on WOW. " +
|
|
60
|
-
"[Status flow] Use query_transfer_status(refresh=true) to monitor: " +
|
|
61
|
-
"latestState.step: source_tx_pending → source_tx_confirmed → signatures_ready → completed. " +
|
|
62
|
-
"When latestState.confirmations >= 64, deposit is finalized and bridge nodes will sign. " +
|
|
63
|
-
"[Gas requirements] Only needs activeEvmAccount to have target-chain gas (for deposit). No WOW gas needed.");
|
|
64
|
-
export const BridgeClaimWowToEvmDataSchema = z.object({
|
|
65
|
-
transferId: z.string().describe("Transfer ID from cross_chain_wow_to_evm (br_<timestamp>_<counter>)"),
|
|
66
|
-
}).strict().describe("WOW→EVM claim (step 2): claim assets on EVM after bridge nodes have signed. " +
|
|
67
|
-
"Prerequisite: cross_chain_wow_to_evm (step 1) must be completed, and query_transfer_status " +
|
|
68
|
-
"must show latestState.step = 'signatures_ready' or 'source_tx_confirmed' (nodes have approved). " +
|
|
69
|
-
"Returns claimTxHash on success. " +
|
|
70
|
-
"After claim_wow_to_evm returns, the claim tx has been submitted and confirmed (1 block) on EVM. " +
|
|
71
|
-
"Use query_transfer_status(refresh=true) to verify latestState.step = 'completed'. " +
|
|
72
|
-
"[Gas requirements] Requires activeEvmAccount to have target-chain gas (for the claim transaction).");
|
|
73
|
-
export const BridgeResumeTransferDataSchema = z.object({
|
|
74
|
-
transferId: z.string().describe("Transfer ID to resume (br_<timestamp>_<counter>)"),
|
|
75
|
-
}).strict().describe("Resume an interrupted transfer from its current step. " +
|
|
76
|
-
"Use this when a transfer was interrupted (e.g. MCP restart, network error) and you want to continue from where it left off. " +
|
|
77
|
-
"The SDK determines the current step and attempts to advance it: " +
|
|
78
|
-
"- If deposit step failed: retries the deposit " +
|
|
79
|
-
"- If deposit is pending/confirmed: waits for bridge signatures and proceeds to claim " +
|
|
80
|
-
"- If claim step is ready: executes the claim " +
|
|
81
|
-
"- If transfer is already complete: returns the existing record (idempotentHit=true) " +
|
|
82
|
-
"[Returns] The updated transfer record after attempting to advance it. " +
|
|
83
|
-
"[Requires env] WOW env is needed for WOW-side operations; EVM-side operations use activeEvmAccount.");
|
|
84
|
-
export const BridgeWithdrawDataSchema = z.object({
|
|
85
|
-
to: EvmAddressSchema.describe("Withdrawal target EVM address"),
|
|
86
|
-
amount: BridgeAmountSchema.describe("Withdrawal amount (smallest unit)"),
|
|
87
|
-
token: BridgeTokenSchema.optional()
|
|
88
|
-
.describe("ERC20 token identifier; if omitted or ETH, withdraws native ETH"),
|
|
89
|
-
tokenAddress: EvmAddressSchema.optional()
|
|
90
|
-
.describe("ERC20 contract address (alternative to token; allows withdrawing by contract address)"),
|
|
91
|
-
network: EvmChainSchema
|
|
92
|
-
.describe("Target chain (defaults to Ethereum mainnet when omitted — EvmChainSchema carries .default(\"mainnet\"))"),
|
|
93
|
-
}).strict().describe("Withdraw from activeEvmAccount to another EVM address");
|
|
94
|
-
export const BridgeQueryActiveEvmAccountDataSchema = z.object({
|
|
95
|
-
network: EvmChainSchema.optional()
|
|
96
|
-
.describe("Specific chain; if omitted, queries all supported chains"),
|
|
97
|
-
tokens: z.array(EvmAddressSchema).optional()
|
|
98
|
-
.describe("Additional ERC20 token contract addresses to query; if omitted, only native ETH balance is queried"),
|
|
99
|
-
}).strict().describe("Query activeEvmAccount parameters");
|
|
100
|
-
export const BridgeQuerySupportedTokensDataSchema = z.object({
|
|
101
|
-
network: EvmChainSchema.optional()
|
|
102
|
-
.describe("Specific chain; if omitted, returns token lists for all supported chains"),
|
|
103
|
-
}).strict().describe("Query supported Bridge tokens per chain (WOW/EVM addresses, decimals, description)");
|
|
104
|
-
export const BridgeQueryTransferListDataSchema = z.object({
|
|
105
|
-
onlyActive: z.boolean().optional()
|
|
106
|
-
.describe("true returns only in-progress transfers; false/omitted returns all"),
|
|
107
|
-
status: z.enum(["pending", "in_progress", "success", "failed"]).optional()
|
|
108
|
-
.describe("Filter by transfer status"),
|
|
109
|
-
direction: z.enum(["wow_to_evm", "evm_to_wow", "withdraw"]).optional()
|
|
110
|
-
.describe("Filter by transfer direction"),
|
|
111
|
-
token: BridgeTokenSchema.optional()
|
|
112
|
-
.describe("Filter by token type (ETH/WETH/WBTC/USDC/USDT)"),
|
|
113
|
-
limit: z.number().int().positive().max(100).optional()
|
|
114
|
-
.describe("Maximum number of results (default: all, max: 100)"),
|
|
115
|
-
}).strict().describe("Query transfer list with optional filters (status / direction / token / limit)");
|
|
116
|
-
export const BridgeQueryTransferStatusDataSchema = z.object({
|
|
117
|
-
transferId: z.string().describe("Transfer ID (br_<timestamp>_<counter>)"),
|
|
118
|
-
refresh: z.boolean().optional().default(true)
|
|
119
|
-
.describe("Whether to refresh from on-chain state (default true). " +
|
|
120
|
-
"true=queries latest on-chain status (takes 5-15s, timeout at 15s on slow RPC). " +
|
|
121
|
-
"false=instant response from local cache (no on-chain query). " +
|
|
122
|
-
"Recommended: use refresh=true every 1-2 minutes for ongoing transfers; " +
|
|
123
|
-
"use refresh=false for quick checks between refreshes."),
|
|
124
|
-
}).strict().describe("Query single transfer parameters. " +
|
|
125
|
-
"[Wait hint] With refresh=true (default), this call may take 5-15 seconds to query on-chain state. " +
|
|
126
|
-
"If on-chain RPC is slow, it will timeout at 15s and return cached state. " +
|
|
127
|
-
"Set refresh=false for instant response from local cache. " +
|
|
128
|
-
"[Returned fields] The result includes: " +
|
|
129
|
-
"(1) record.step/status - high-level lifecycle (deposit/claimed/success); " +
|
|
130
|
-
"(2) record.latestState.step/status - fine-grained on-chain progress " +
|
|
131
|
-
"(source_tx_pending → source_tx_confirmed → signatures_ready → completed). " +
|
|
132
|
-
"Use latestState.confirmations to estimate remaining time (needs 64 for ETH→WOW finalization).");
|
|
133
|
-
export const BridgeManageEvmRpcDataSchema = z.discriminatedUnion("op", [
|
|
134
|
-
z.object({
|
|
135
|
-
op: z.literal("list").describe("List all configured RPC endpoints with health status"),
|
|
136
|
-
network: EvmChainSchema
|
|
137
|
-
.describe("Target chain (defaults to Ethereum mainnet when omitted — EvmChainSchema carries .default(\"mainnet\"))"),
|
|
138
|
-
}).describe("List RPC endpoints (no rpcUrl/rpcUrls needed)"),
|
|
139
|
-
z.object({
|
|
140
|
-
op: z.literal("add").describe("Append one or more RPC endpoints"),
|
|
141
|
-
network: EvmChainSchema
|
|
142
|
-
.describe("Target chain (defaults to Ethereum mainnet when omitted — EvmChainSchema carries .default(\"mainnet\"))"),
|
|
143
|
-
rpcUrls: z.array(z.string().url()).min(1)
|
|
144
|
-
.describe("RPC URL(s) to add"),
|
|
145
|
-
}).describe("Add RPC endpoint(s)"),
|
|
146
|
-
z.object({
|
|
147
|
-
op: z.literal("remove").describe("Remove one or more RPC endpoints"),
|
|
148
|
-
network: EvmChainSchema
|
|
149
|
-
.describe("Target chain (defaults to Ethereum mainnet when omitted — EvmChainSchema carries .default(\"mainnet\"))"),
|
|
150
|
-
rpcUrls: z.array(z.string().url()).min(1)
|
|
151
|
-
.describe("RPC URL(s) to remove"),
|
|
152
|
-
}).describe("Remove RPC endpoint(s)"),
|
|
153
|
-
z.object({
|
|
154
|
-
op: z.literal("set").describe("Full replace all RPC endpoints"),
|
|
155
|
-
network: EvmChainSchema
|
|
156
|
-
.describe("Target chain (defaults to Ethereum mainnet when omitted — EvmChainSchema carries .default(\"mainnet\"))"),
|
|
157
|
-
rpcUrls: z.array(z.string().url()).min(1)
|
|
158
|
-
.describe("Full RPC list (replaces all existing endpoints)"),
|
|
159
|
-
}).describe("Full replace RPC endpoints"),
|
|
160
|
-
z.object({
|
|
161
|
-
op: z.literal("ping").describe("Health check one or more RPC endpoints"),
|
|
162
|
-
network: EvmChainSchema
|
|
163
|
-
.describe("Target chain (defaults to Ethereum mainnet when omitted — EvmChainSchema carries .default(\"mainnet\"))"),
|
|
164
|
-
rpcUrls: z.array(z.string().url()).optional()
|
|
165
|
-
.describe("Specific RPC URLs to ping; if omitted, pings all configured RPCs"),
|
|
166
|
-
}).describe("Health check RPC endpoints"),
|
|
167
|
-
]).describe("EVM RPC endpoint management (discriminated by op)");
|
|
168
|
-
export const BridgeOperationsSchema = z.preprocess((input) => {
|
|
169
|
-
if (typeof input === "object" && input !== null) {
|
|
170
|
-
const obj = { ...input };
|
|
171
|
-
if (typeof obj.description === "string" && !obj.operation_type) {
|
|
172
|
-
try {
|
|
173
|
-
const parsed = JSON.parse(obj.description);
|
|
174
|
-
if (parsed && typeof parsed === "object" && parsed.operation_type) {
|
|
175
|
-
return parsed;
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
catch { }
|
|
179
|
-
}
|
|
180
|
-
if (typeof obj.data === "string") {
|
|
181
|
-
try {
|
|
182
|
-
obj.data = JSON.parse(obj.data);
|
|
183
|
-
}
|
|
184
|
-
catch { }
|
|
185
|
-
}
|
|
186
|
-
if (typeof obj.env === "string") {
|
|
187
|
-
try {
|
|
188
|
-
obj.env = JSON.parse(obj.env);
|
|
189
|
-
}
|
|
190
|
-
catch { }
|
|
191
|
-
}
|
|
192
|
-
return obj;
|
|
193
|
-
}
|
|
194
|
-
return input;
|
|
195
|
-
}, z.discriminatedUnion("operation_type", [
|
|
196
|
-
z.object({
|
|
197
|
-
operation_type: z.literal("cross_chain_wow_to_evm"),
|
|
198
|
-
data: BridgeWowToEvmDataSchema,
|
|
199
|
-
env: CallEnvSchema.optional(),
|
|
200
|
-
}).describe("WOW→EVM cross-chain (simplified): assets auto-claim to activeEvmAccount; if withdrawTo is provided, an additional transfer is made to that address. [Requires WOW mainnet env]"),
|
|
201
|
-
z.object({
|
|
202
|
-
operation_type: z.literal("cross_chain_evm_to_wow"),
|
|
203
|
-
data: BridgeEvmToWowDataSchema,
|
|
204
|
-
env: CallEnvSchema.optional(),
|
|
205
|
-
}).describe("EVM→WOW cross-chain (single step): deposit from activeEvmAccount, bridge auto-claims on WOW. No WOW gas needed. [Requires WOW mainnet env]"),
|
|
206
|
-
z.object({
|
|
207
|
-
operation_type: z.literal("claim_wow_to_evm"),
|
|
208
|
-
data: BridgeClaimWowToEvmDataSchema,
|
|
209
|
-
env: CallEnvSchema.optional(),
|
|
210
|
-
}).describe("WOW→EVM claim (step 2): claim assets on EVM after bridge signed. Requires activeEvmAccount to have EVM gas. [Requires WOW mainnet env]"),
|
|
211
|
-
z.object({
|
|
212
|
-
operation_type: z.literal("resume_transfer"),
|
|
213
|
-
data: BridgeResumeTransferDataSchema,
|
|
214
|
-
env: CallEnvSchema.optional(),
|
|
215
|
-
}).describe("Resume an interrupted transfer from its current step. Safe to retry. [Requires WOW mainnet env for WOW-side operations]"),
|
|
216
|
-
z.object({
|
|
217
|
-
operation_type: z.literal("withdraw"),
|
|
218
|
-
data: BridgeWithdrawDataSchema,
|
|
219
|
-
}).describe("Withdraw from activeEvmAccount to another EVM address (non-cross-chain). [No env needed]"),
|
|
220
|
-
z.object({
|
|
221
|
-
operation_type: z.literal("query_active_evm_account"),
|
|
222
|
-
data: BridgeQueryActiveEvmAccountDataSchema.optional(),
|
|
223
|
-
}).describe("Query activeEvmAccount address + balances (per chain or all chains). [No env needed]"),
|
|
224
|
-
z.object({
|
|
225
|
-
operation_type: z.literal("query_supported_evm_chains"),
|
|
226
|
-
}).describe("List currently supported EVM chains (enum value / description / chainId / RPC health). [No env needed, no data required]"),
|
|
227
|
-
z.object({
|
|
228
|
-
operation_type: z.literal("query_supported_tokens"),
|
|
229
|
-
data: BridgeQuerySupportedTokensDataSchema.optional(),
|
|
230
|
-
}).describe("List supported Bridge tokens per chain (WOW/EVM contract addresses, decimals, description). [No env needed]"),
|
|
231
|
-
z.object({
|
|
232
|
-
operation_type: z.literal("query_transfer_list"),
|
|
233
|
-
data: BridgeQueryTransferListDataSchema.optional(),
|
|
234
|
-
}).describe("Query cross-chain / withdrawal transfer history list (optionally only in-progress). [No env needed]"),
|
|
235
|
-
z.object({
|
|
236
|
-
operation_type: z.literal("query_transfer_status"),
|
|
237
|
-
data: BridgeQueryTransferStatusDataSchema,
|
|
238
|
-
}).describe("Query a single transfer's detail by transferId"),
|
|
239
|
-
z.object({
|
|
240
|
-
operation_type: z.literal("manage_evm_rpc"),
|
|
241
|
-
data: BridgeManageEvmRpcDataSchema,
|
|
242
|
-
}).describe("Manage EVM RPC endpoints (list/add/remove/set/ping) to mitigate public RPC 429 rate limits. [No env needed]"),
|
|
243
|
-
]));
|
|
244
|
-
export const BridgeLatestStateSchema = z.object({
|
|
245
|
-
status: z.enum([
|
|
246
|
-
"not_started", "pending", "confirmed", "signatures_ready",
|
|
247
|
-
"claiming", "completed", "failed",
|
|
248
|
-
]).describe("On-chain status (finer-grained than record.status): " +
|
|
249
|
-
"pending=source tx submitted but not confirmed; " +
|
|
250
|
-
"confirmed=source tx confirmed, waiting for bridge node signatures; " +
|
|
251
|
-
"signatures_ready=nodes signed, ready to claim; " +
|
|
252
|
-
"claiming=claim tx submitted, waiting for confirmation; " +
|
|
253
|
-
"completed=fully completed, assets arrived on target chain; " +
|
|
254
|
-
"failed=on-chain failure"),
|
|
255
|
-
step: z.enum([
|
|
256
|
-
"not_started", "source_tx_pending", "source_tx_confirmed",
|
|
257
|
-
"node_signing", "signatures_ready", "claim_tx_pending",
|
|
258
|
-
"completed", "failed",
|
|
259
|
-
]).describe("Detailed step (more granular than status). " +
|
|
260
|
-
"source_tx_pending=source chain tx waiting for block confirmation; " +
|
|
261
|
-
"source_tx_confirmed=source confirmed, waiting for bridge nodes to approve; " +
|
|
262
|
-
"node_signing=nodes collecting signatures; " +
|
|
263
|
-
"signatures_ready=sufficient signatures collected, ready to claim on target chain; " +
|
|
264
|
-
"claim_tx_pending=claim tx submitted on target chain, waiting for confirmation; " +
|
|
265
|
-
"completed=assets arrived on target chain; " +
|
|
266
|
-
"failed=error occurred"),
|
|
267
|
-
stepDescription: z.string().optional().describe("Human-readable step description (Chinese)"),
|
|
268
|
-
direction: z.enum(["wow_to_evm", "evm_to_wow"]).optional(),
|
|
269
|
-
sourceTxHash: z.string().optional().describe("Source chain tx hash/digest"),
|
|
270
|
-
bridgeSeq: z.string().optional().describe("Bridge sequence number"),
|
|
271
|
-
confirmations: z.number().optional().describe("Source chain confirmation count (EVM→WOW only; needs 64 for finalization)"),
|
|
272
|
-
claimTxDigest: z.string().optional().describe("WOW claim tx digest (evm_to_wow, when completed)"),
|
|
273
|
-
claimReceipt: z.any().optional().describe("EVM claim tx receipt (wow_to_evm, when available)"),
|
|
274
|
-
ethReceipt: z.any().optional().describe("EVM source tx receipt (evm_to_wow)"),
|
|
275
|
-
wowReceipt: z.any().optional().describe("WOW source tx receipt (wow_to_evm)"),
|
|
276
|
-
error: z.string().optional().describe("Error message if step=failed"),
|
|
277
|
-
hint: z.string().optional().describe("Hint message for next action (e.g., when claim_wow_to_evm not yet called)"),
|
|
278
|
-
updatedAt: z.number().optional().describe("Last on-chain update timestamp (ms)"),
|
|
279
|
-
}).describe("Latest on-chain state (from refresh=true query)");
|
|
280
|
-
export const BridgeTransferRecordSchema = z.object({
|
|
281
|
-
transferId: z.string().describe("Unique ID (br_<timestamp>_<counter>)"),
|
|
282
|
-
direction: z.enum(["wow_to_evm", "evm_to_wow", "withdraw"]).describe("Transfer direction"),
|
|
283
|
-
token: BridgeTokenSchema.describe("Token identifier"),
|
|
284
|
-
amount: z.string().describe("Amount in smallest unit (string to avoid bigint issues)"),
|
|
285
|
-
recipientEth: z.string().optional().describe("ETH-side recipient address"),
|
|
286
|
-
recipientWow: z.string().optional().describe("WOW-side recipient address"),
|
|
287
|
-
intermediateEthAccount: z.string().describe("Intermediate EVM account (activeEvmAccount)"),
|
|
288
|
-
idempotencyKey: z.string().optional().describe("Idempotency key used for this transfer (if any)"),
|
|
289
|
-
step: z.enum(["init", "deposit", "claimed", "withdraw", "withdrawn"]).describe("Current step in the transfer lifecycle: " +
|
|
290
|
-
"init=just created; " +
|
|
291
|
-
"deposit=source chain deposit in progress; " +
|
|
292
|
-
"claimed=claim completed on target chain (success); " +
|
|
293
|
-
"withdraw=intermediate→final withdraw in progress; " +
|
|
294
|
-
"withdrawn=withdraw completed"),
|
|
295
|
-
status: z.enum(["pending", "in_progress", "success", "failed"]).describe("Transfer status: pending/in_progress=ongoing; success=fully completed; failed=error"),
|
|
296
|
-
depositTxHash: z.string().optional().describe("EVM deposit tx hash (evm_to_wow)"),
|
|
297
|
-
depositTxDigest: z.string().optional().describe("WOW deposit tx digest (wow_to_evm)"),
|
|
298
|
-
bridgeSeq: z.string().optional().describe("Bridge sequence number"),
|
|
299
|
-
claimTxHash: z.string().optional().describe("EVM claim tx hash (wow_to_evm)"),
|
|
300
|
-
claimTxDigest: z.string().optional().describe("WOW claim tx digest (evm_to_wow)"),
|
|
301
|
-
withdrawTxHash: z.string().optional().describe("EVM withdraw tx hash (withdraw step)"),
|
|
302
|
-
error: z.string().optional().describe("Error message if status=failed"),
|
|
303
|
-
createdAt: z.number().describe("Creation timestamp (ms)"),
|
|
304
|
-
updatedAt: z.number().describe("Last update timestamp (ms)"),
|
|
305
|
-
latestState: BridgeLatestStateSchema.optional().describe("Latest on-chain state (only present after refresh=true query). " +
|
|
306
|
-
"Provides real-time progress: confirmations count, node signing status, claim tx hash, etc. " +
|
|
307
|
-
"Use this to estimate remaining time and next action."),
|
|
308
|
-
}).strict().describe("Bridge transfer record");
|
|
309
|
-
export const BridgeWowToEvmResultSchema = z.object({
|
|
310
|
-
depositTxDigest: z.string().describe("WOW deposit tx digest"),
|
|
311
|
-
bridgeSeq: z.string().describe("Bridge sequence number"),
|
|
312
|
-
activeEvmAccount: z.string().describe("activeEvmAccount address that will receive the assets"),
|
|
313
|
-
transferId: z.string().describe("Transfer ID (br_<timestamp>_<counter>). Save this for claim_wow_to_evm (step 2) and query_transfer_status"),
|
|
314
|
-
idempotentHit: z.boolean().optional().describe("true if this result was returned from idempotency cache (no new deposit executed)"),
|
|
315
|
-
idempotencyKey: z.string().optional().describe("Idempotency key used (if any)"),
|
|
316
|
-
}).strict().describe("WOW→EVM cross-chain step 1 result (deposit only, claim pending)");
|
|
317
|
-
export const BridgeEvmToWowResultSchema = z.object({
|
|
318
|
-
depositTxHash: z.string().describe("EVM deposit tx hash"),
|
|
319
|
-
activeEvmAccount: z.string().describe("activeEvmAccount address that initiated the deposit"),
|
|
320
|
-
transferId: z.string().describe("Transfer ID (br_<timestamp>_<counter>). Save this for query_transfer_status"),
|
|
321
|
-
idempotentHit: z.boolean().optional().describe("true if this result was returned from idempotency cache (no new deposit executed)"),
|
|
322
|
-
idempotencyKey: z.string().optional().describe("Idempotency key used (if any)"),
|
|
323
|
-
}).strict().describe("EVM→WOW cross-chain result (deposit submitted, auto-claim in progress)");
|
|
324
|
-
export const BridgeClaimWowToEvmResultSchema = z.object({
|
|
325
|
-
claimTxHash: z.string().describe("EVM claim tx hash"),
|
|
326
|
-
transferId: z.string().describe("Transfer ID"),
|
|
327
|
-
}).strict().describe("WOW→EVM claim (step 2) result");
|
|
328
|
-
export const BridgeWithdrawResultSchema = z.object({
|
|
329
|
-
txHash: z.string().describe("EVM withdraw tx hash"),
|
|
330
|
-
transferId: z.string().describe("Transfer ID (br_<timestamp>_<counter>)"),
|
|
331
|
-
}).strict().describe("Withdraw from activeEvmAccount result");
|
|
332
|
-
export const BridgeQueryActiveEvmAccountResultSchema = z.object({
|
|
333
|
-
address: z.string().describe("activeEvmAccount address (0x + 40 hex)"),
|
|
334
|
-
chains: z.array(z.object({
|
|
335
|
-
chainId: z.number().describe("EVM chain ID"),
|
|
336
|
-
name: z.string().describe("Chain name"),
|
|
337
|
-
nativeBalance: z.string().describe("Native ETH balance (wei, string)"),
|
|
338
|
-
tokens: z.array(z.object({
|
|
339
|
-
tokenAddress: z.string().describe("ERC20 token contract address"),
|
|
340
|
-
balance: z.string().describe("Token balance (smallest unit, string)"),
|
|
341
|
-
})).optional().describe("Additional ERC20 token balances (if requested)"),
|
|
342
|
-
})).describe("Per-chain balance information"),
|
|
343
|
-
}).strict().describe("activeEvmAccount query result");
|
|
344
|
-
export const BridgeQuerySupportedEvmChainsResultSchema = z.array(z.object({
|
|
345
|
-
chainId: z.number().describe("EVM chain ID"),
|
|
346
|
-
name: z.string().describe("Chain name (enum value)"),
|
|
347
|
-
description: z.string().describe("Human-readable chain description"),
|
|
348
|
-
bridgeChainId: z.number().describe("Bridge protocol chain ID"),
|
|
349
|
-
explorerUrl: z.string().describe("Block explorer URL"),
|
|
350
|
-
rpcCount: z.number().describe("Total configured RPC endpoints"),
|
|
351
|
-
healthyRpcCount: z.number().describe("Currently healthy RPC endpoints"),
|
|
352
|
-
})).describe("List of supported EVM chains");
|
|
353
|
-
export const BridgeQuerySupportedTokensResultSchema = z.array(z.object({
|
|
354
|
-
chainId: z.number().describe("EVM chain ID"),
|
|
355
|
-
chainName: z.string().describe("Chain name"),
|
|
356
|
-
bridgeChainId: z.number().describe("Bridge protocol chain ID"),
|
|
357
|
-
tokens: z.array(z.object({
|
|
358
|
-
tokenId: z.number().describe("On-chain token ID"),
|
|
359
|
-
symbol: z.string().describe("Token symbol (ETH/WETH/WBTC/USDC/USDT)"),
|
|
360
|
-
evmAddress: z.string().describe("EVM-side contract address (0x000...000 for native ETH)"),
|
|
361
|
-
evmDecimals: z.number().describe("EVM-side decimals"),
|
|
362
|
-
wowTypeTag: z.string().describe("WOW-side type tag"),
|
|
363
|
-
wowDecimals: z.number().describe("WOW-side decimals"),
|
|
364
|
-
description: z.string().describe("Token description"),
|
|
365
|
-
})).describe("Tokens available on this chain"),
|
|
366
|
-
})).describe("Supported Bridge tokens per chain");
|
|
367
|
-
export const BridgeQueryTransferListResultSchema = z.array(BridgeTransferRecordSchema)
|
|
368
|
-
.describe("Transfer history list");
|
|
369
|
-
export const BridgeQueryTransferStatusResultSchema = BridgeTransferRecordSchema.nullable()
|
|
370
|
-
.describe("Single transfer detail (null if not found)");
|
|
371
|
-
export const BridgeManageEvmRpcResultSchema = z.object({
|
|
372
|
-
op: z.string().describe("Operation performed (list/add/remove/set/ping)"),
|
|
373
|
-
success: z.boolean().describe("Whether the operation succeeded"),
|
|
374
|
-
result: z.any().optional().describe("Operation-specific result (list=array of RPC status, ping=health results, add/remove/set=void)"),
|
|
375
|
-
}).strict().describe("EVM RPC management result");
|
|
376
|
-
export const BridgeOutputSchema = z.discriminatedUnion("operation_type", [
|
|
377
|
-
z.object({
|
|
378
|
-
operation_type: z.literal("cross_chain_wow_to_evm"),
|
|
379
|
-
result: BridgeWowToEvmResultSchema,
|
|
380
|
-
message: z.string().optional().describe("Result summary or hint message"),
|
|
381
|
-
}).describe("WOW→EVM cross-chain result"),
|
|
382
|
-
z.object({
|
|
383
|
-
operation_type: z.literal("cross_chain_evm_to_wow"),
|
|
384
|
-
result: BridgeEvmToWowResultSchema,
|
|
385
|
-
message: z.string().optional().describe("Result summary or hint message"),
|
|
386
|
-
}).describe("EVM→WOW cross-chain result"),
|
|
387
|
-
z.object({
|
|
388
|
-
operation_type: z.literal("claim_wow_to_evm"),
|
|
389
|
-
result: BridgeClaimWowToEvmResultSchema,
|
|
390
|
-
message: z.string().optional().describe("Result summary or hint message"),
|
|
391
|
-
}).describe("WOW→EVM claim (step 2) result"),
|
|
392
|
-
z.object({
|
|
393
|
-
operation_type: z.literal("resume_transfer"),
|
|
394
|
-
result: BridgeTransferRecordSchema,
|
|
395
|
-
message: z.string().optional().describe("Result summary or hint message"),
|
|
396
|
-
}).describe("Resume interrupted transfer result"),
|
|
397
|
-
z.object({
|
|
398
|
-
operation_type: z.literal("withdraw"),
|
|
399
|
-
result: BridgeWithdrawResultSchema,
|
|
400
|
-
message: z.string().optional().describe("Result summary or hint message"),
|
|
401
|
-
}).describe("Withdraw from activeEvmAccount result"),
|
|
402
|
-
z.object({
|
|
403
|
-
operation_type: z.literal("query_active_evm_account"),
|
|
404
|
-
result: BridgeQueryActiveEvmAccountResultSchema,
|
|
405
|
-
message: z.string().optional().describe("Result summary or hint message"),
|
|
406
|
-
}).describe("activeEvmAccount query result"),
|
|
407
|
-
z.object({
|
|
408
|
-
operation_type: z.literal("query_supported_evm_chains"),
|
|
409
|
-
result: BridgeQuerySupportedEvmChainsResultSchema,
|
|
410
|
-
message: z.string().optional().describe("Result summary or hint message"),
|
|
411
|
-
}).describe("Supported EVM chains result"),
|
|
412
|
-
z.object({
|
|
413
|
-
operation_type: z.literal("query_supported_tokens"),
|
|
414
|
-
result: BridgeQuerySupportedTokensResultSchema,
|
|
415
|
-
message: z.string().optional().describe("Result summary or hint message"),
|
|
416
|
-
}).describe("Supported Bridge tokens per chain result"),
|
|
417
|
-
z.object({
|
|
418
|
-
operation_type: z.literal("query_transfer_list"),
|
|
419
|
-
result: BridgeQueryTransferListResultSchema,
|
|
420
|
-
message: z.string().optional().describe("Result summary or hint message"),
|
|
421
|
-
}).describe("Transfer history list result"),
|
|
422
|
-
z.object({
|
|
423
|
-
operation_type: z.literal("query_transfer_status"),
|
|
424
|
-
result: BridgeQueryTransferStatusResultSchema,
|
|
425
|
-
message: z.string().optional().describe("Result summary or hint message"),
|
|
426
|
-
}).describe("Single transfer detail result"),
|
|
427
|
-
z.object({
|
|
428
|
-
operation_type: z.literal("manage_evm_rpc"),
|
|
429
|
-
result: BridgeManageEvmRpcResultSchema,
|
|
430
|
-
message: z.string().optional().describe("Result summary or hint message"),
|
|
431
|
-
}).describe("EVM RPC management result"),
|
|
432
|
-
]).describe("Bridge operation result (discriminated by operation_type with per-operation typed result)");
|
|
433
|
-
export const BridgeCallOutputSchema = z.object({
|
|
434
|
-
message: z.string().optional().describe("Result summary or hint message"),
|
|
435
|
-
result: z.discriminatedUnion("type", [
|
|
436
|
-
z.object({
|
|
437
|
-
type: z.literal("data"),
|
|
438
|
-
data: z.unknown().describe("Operation result data (structure varies by operation_type)"),
|
|
439
|
-
}).describe("Successful result"),
|
|
440
|
-
z.object({
|
|
441
|
-
type: z.literal("error"),
|
|
442
|
-
error: z.string().describe("Error message"),
|
|
443
|
-
error_code: z
|
|
444
|
-
.enum([
|
|
445
|
-
"invalid_parameter", "guard_rejected", "state_conflict",
|
|
446
|
-
"insufficient_balance", "object_not_found", "permission_denied",
|
|
447
|
-
"immutable_violation", "network_error", "rate_limit",
|
|
448
|
-
"gas_exceeded", "bcs_error", "signature_error",
|
|
449
|
-
"config_error", "wip_verification_failed", "unknown",
|
|
450
|
-
])
|
|
451
|
-
.optional()
|
|
452
|
-
.describe("Error classification for programmatic recovery"),
|
|
453
|
-
retryable: z.boolean().optional().describe("Whether the operation can be retried as-is"),
|
|
454
|
-
recovery_hint: z.string().optional().describe("Recovery suggestion for AI or user"),
|
|
455
|
-
}).describe("Error result"),
|
|
456
|
-
]).describe("Bridge operation result (data or error)"),
|
|
457
|
-
semantic: SemanticSummarySchema.optional().describe("Business semantic summary for bridge operation"),
|
|
458
|
-
}).describe("Bridge operation output (matches CallOutput structure returned by the handler)");
|
|
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)');
|