@reefclaw/connect 0.1.10 → 0.1.12
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/assets/bridge/gateway/event-parser.d.ts +6 -1
- package/assets/bridge/gateway/event-parser.js +19 -2
- package/assets/bridge/gateway/heartbeat-cron.d.ts +27 -0
- package/assets/bridge/gateway/heartbeat-cron.js +85 -0
- package/assets/bridge/gateway/poller.d.ts +1 -0
- package/assets/bridge/gateway/poller.js +14 -2
- package/assets/bridge/providers/gateway.d.ts +24 -2
- package/assets/bridge/providers/gateway.js +124 -25
- package/assets/bridge/setup.js +6 -51
- package/assets/shared/signals/conditions/registry.js +11 -2
- package/assets/shared/signals/strategy-adapter.js +17 -7
- package/assets/skill/SKILL.md +2 -0
- package/dist/deps.js +2 -2
- package/dist/plugin.js +35 -7
- package/package.json +1 -1
- package/assets/plugin/audit/mode-transition-audit.d.ts +0 -11
- package/assets/plugin/audit/mode-transition-audit.js +0 -29
- package/assets/plugin/balance-utils.d.ts +0 -36
- package/assets/plugin/balance-utils.js +0 -98
- package/assets/plugin/ccxt/binance-ban-gate.d.ts +0 -47
- package/assets/plugin/ccxt/binance-ban-gate.js +0 -420
- package/assets/plugin/ccxt/binance-private.d.ts +0 -346
- package/assets/plugin/ccxt/binance-private.js +0 -1525
- package/assets/plugin/ccxt/binance-public.d.ts +0 -34
- package/assets/plugin/ccxt/binance-public.js +0 -180
- package/assets/plugin/ccxt/intel-public.d.ts +0 -25
- package/assets/plugin/ccxt/intel-public.js +0 -80
- package/assets/plugin/ccxt/public-market-data-api.d.ts +0 -12
- package/assets/plugin/ccxt/public-market-data-api.js +0 -9
- package/assets/plugin/config/agent-config-client.d.ts +0 -77
- package/assets/plugin/config/agent-config-client.js +0 -188
- package/assets/plugin/config/agent-config-poller.d.ts +0 -32
- package/assets/plugin/config/agent-config-poller.js +0 -101
- package/assets/plugin/config/brackets-config.d.ts +0 -22
- package/assets/plugin/config/brackets-config.js +0 -58
- package/assets/plugin/config/entitlement-gate.d.ts +0 -51
- package/assets/plugin/config/entitlement-gate.js +0 -137
- package/assets/plugin/config/gate-store.d.ts +0 -18
- package/assets/plugin/config/gate-store.js +0 -61
- package/assets/plugin/config/plugin-config-io.d.ts +0 -215
- package/assets/plugin/config/plugin-config-io.js +0 -111
- package/assets/plugin/config/position-review-config.d.ts +0 -35
- package/assets/plugin/config/position-review-config.js +0 -105
- package/assets/plugin/config/tool-gate.d.ts +0 -53
- package/assets/plugin/config/tool-gate.js +0 -128
- package/assets/plugin/config/user-data-stream-config.d.ts +0 -89
- package/assets/plugin/config/user-data-stream-config.js +0 -239
- package/assets/plugin/connector-supervisor.d.ts +0 -36
- package/assets/plugin/connector-supervisor.js +0 -149
- package/assets/plugin/exchange-adapter.d.ts +0 -65
- package/assets/plugin/exchange-adapter.js +0 -4
- package/assets/plugin/index.d.ts +0 -30
- package/assets/plugin/index.js +0 -2678
- package/assets/plugin/ingest/pending-entry-metadata.d.ts +0 -74
- package/assets/plugin/ingest/pending-entry-metadata.js +0 -236
- package/assets/plugin/ingest/position-auto-capture.d.ts +0 -103
- package/assets/plugin/ingest/position-auto-capture.js +0 -411
- package/assets/plugin/ingest/position-decisions-client.d.ts +0 -322
- package/assets/plugin/ingest/position-decisions-client.js +0 -296
- package/assets/plugin/ingest/readiness-reporter.d.ts +0 -42
- package/assets/plugin/ingest/readiness-reporter.js +0 -163
- package/assets/plugin/ingest/reconcile-db-vs-exchange.d.ts +0 -13
- package/assets/plugin/ingest/reconcile-db-vs-exchange.js +0 -114
- package/assets/plugin/ingest/reconciler-cleanup.d.ts +0 -37
- package/assets/plugin/ingest/reconciler-cleanup.js +0 -147
- package/assets/plugin/ingest/rest-gap-filler.d.ts +0 -191
- package/assets/plugin/ingest/rest-gap-filler.js +0 -565
- package/assets/plugin/ingest/touched-symbols-store.d.ts +0 -25
- package/assets/plugin/ingest/touched-symbols-store.js +0 -96
- package/assets/plugin/ingest/trade-store-client.d.ts +0 -40
- package/assets/plugin/ingest/trade-store-client.js +0 -125
- package/assets/plugin/ingest/ws-ingest.d.ts +0 -43
- package/assets/plugin/ingest/ws-ingest.js +0 -126
- package/assets/plugin/learning/setup-family.d.ts +0 -21
- package/assets/plugin/learning/setup-family.js +0 -103
- package/assets/plugin/lifecycle/install-signal-handlers.d.ts +0 -33
- package/assets/plugin/lifecycle/install-signal-handlers.js +0 -112
- package/assets/plugin/lifecycle/shutdown-coordinator.d.ts +0 -43
- package/assets/plugin/lifecycle/shutdown-coordinator.js +0 -131
- package/assets/plugin/lifecycle/trading-operation-lock.d.ts +0 -17
- package/assets/plugin/lifecycle/trading-operation-lock.js +0 -14
- package/assets/plugin/live/bracket-id.d.ts +0 -26
- package/assets/plugin/live/bracket-id.js +0 -112
- package/assets/plugin/live/bracket-ledger.d.ts +0 -54
- package/assets/plugin/live/bracket-ledger.js +0 -267
- package/assets/plugin/live/bracket-manager.d.ts +0 -82
- package/assets/plugin/live/bracket-manager.js +0 -478
- package/assets/plugin/live/bracket-params.d.ts +0 -22
- package/assets/plugin/live/bracket-params.js +0 -124
- package/assets/plugin/live/bracket-reconciler.d.ts +0 -95
- package/assets/plugin/live/bracket-reconciler.js +0 -573
- package/assets/plugin/live/bracket-types.d.ts +0 -102
- package/assets/plugin/live/bracket-types.js +0 -8
- package/assets/plugin/live/deposit-tracker.d.ts +0 -62
- package/assets/plugin/live/deposit-tracker.js +0 -97
- package/assets/plugin/live/emergency-controls.d.ts +0 -32
- package/assets/plugin/live/emergency-controls.js +0 -226
- package/assets/plugin/live/exchange-errors.d.ts +0 -12
- package/assets/plugin/live/exchange-errors.js +0 -130
- package/assets/plugin/live/exchange-info-cache.d.ts +0 -37
- package/assets/plugin/live/exchange-info-cache.js +0 -134
- package/assets/plugin/live/fact-subscriber.d.ts +0 -78
- package/assets/plugin/live/fact-subscriber.js +0 -182
- package/assets/plugin/live/intent-journal.d.ts +0 -42
- package/assets/plugin/live/intent-journal.js +0 -122
- package/assets/plugin/live/listen-key-manager.d.ts +0 -70
- package/assets/plugin/live/listen-key-manager.js +0 -169
- package/assets/plugin/live/live-adapter.d.ts +0 -287
- package/assets/plugin/live/live-adapter.js +0 -1777
- package/assets/plugin/live/live-balance-enricher.d.ts +0 -32
- package/assets/plugin/live/live-balance-enricher.js +0 -104
- package/assets/plugin/live/live-bracket-api.d.ts +0 -13
- package/assets/plugin/live/live-bracket-api.js +0 -20
- package/assets/plugin/live/live-state-store.d.ts +0 -194
- package/assets/plugin/live/live-state-store.js +0 -450
- package/assets/plugin/live/local-signal-service.d.ts +0 -57
- package/assets/plugin/live/local-signal-service.js +0 -151
- package/assets/plugin/live/local-strategy-evaluator.d.ts +0 -62
- package/assets/plugin/live/local-strategy-evaluator.js +0 -131
- package/assets/plugin/live/microstructure-assembler.d.ts +0 -54
- package/assets/plugin/live/microstructure-assembler.js +0 -148
- package/assets/plugin/live/order-poller.d.ts +0 -29
- package/assets/plugin/live/order-poller.js +0 -125
- package/assets/plugin/live/position-state-store.d.ts +0 -83
- package/assets/plugin/live/position-state-store.js +0 -237
- package/assets/plugin/live/proposal-decision-listener.d.ts +0 -70
- package/assets/plugin/live/proposal-decision-listener.js +0 -292
- package/assets/plugin/live/proposal-manager.d.ts +0 -76
- package/assets/plugin/live/proposal-manager.js +0 -140
- package/assets/plugin/live/rate-limiter.d.ts +0 -47
- package/assets/plugin/live/rate-limiter.js +0 -159
- package/assets/plugin/live/reconciler.d.ts +0 -39
- package/assets/plugin/live/reconciler.js +0 -175
- package/assets/plugin/live/setup-buckets.d.ts +0 -7
- package/assets/plugin/live/setup-buckets.js +0 -33
- package/assets/plugin/live/slippage-tracker.d.ts +0 -45
- package/assets/plugin/live/slippage-tracker.js +0 -78
- package/assets/plugin/live/stop-watcher.d.ts +0 -60
- package/assets/plugin/live/stop-watcher.js +0 -215
- package/assets/plugin/live/user-data-active-probe.d.ts +0 -54
- package/assets/plugin/live/user-data-active-probe.js +0 -180
- package/assets/plugin/live/user-data-stream-controller.d.ts +0 -200
- package/assets/plugin/live/user-data-stream-controller.js +0 -579
- package/assets/plugin/live/user-data-stream-ws.d.ts +0 -22
- package/assets/plugin/live/user-data-stream-ws.js +0 -63
- package/assets/plugin/live/user-data-stream.d.ts +0 -243
- package/assets/plugin/live/user-data-stream.js +0 -704
- package/assets/plugin/logger.d.ts +0 -2
- package/assets/plugin/logger.js +0 -2
- package/assets/plugin/mfe.d.ts +0 -21
- package/assets/plugin/mfe.js +0 -68
- package/assets/plugin/onboarding/mode-ladder.d.ts +0 -1
- package/assets/plugin/onboarding/mode-ladder.js +0 -3
- package/assets/plugin/onboarding/runtime.d.ts +0 -84
- package/assets/plugin/onboarding/runtime.js +0 -173
- package/assets/plugin/openclaw.plugin.json +0 -92
- package/assets/plugin/paper-adapter.d.ts +0 -24
- package/assets/plugin/paper-adapter.js +0 -91
- package/assets/plugin/persistence/state-manager.d.ts +0 -66
- package/assets/plugin/persistence/state-manager.js +0 -222
- package/assets/plugin/pinned-plan.d.ts +0 -9
- package/assets/plugin/pinned-plan.js +0 -23
- package/assets/plugin/portfolio/wave9-admission.d.ts +0 -67
- package/assets/plugin/portfolio/wave9-admission.js +0 -262
- package/assets/plugin/portfolio/wave9-policy.d.ts +0 -36
- package/assets/plugin/portfolio/wave9-policy.js +0 -183
- package/assets/plugin/risk/pre-trade-check.d.ts +0 -38
- package/assets/plugin/risk/pre-trade-check.js +0 -345
- package/assets/plugin/risk/pre-trade-types.d.ts +0 -60
- package/assets/plugin/risk/pre-trade-types.js +0 -3
- package/assets/plugin/shadow/shadow-tracker.d.ts +0 -36
- package/assets/plugin/shadow/shadow-tracker.js +0 -151
- package/assets/plugin/shadow/types.d.ts +0 -42
- package/assets/plugin/shadow/types.js +0 -20
- package/assets/plugin/shared/indicators-extended.d.ts +0 -52
- package/assets/plugin/shared/indicators-extended.js +0 -291
- package/assets/plugin/shared/indicators.d.ts +0 -15
- package/assets/plugin/shared/indicators.js +0 -114
- package/assets/plugin/signals/conditions/registry.d.ts +0 -16
- package/assets/plugin/signals/conditions/registry.js +0 -1324
- package/assets/plugin/signals/conditions/types.d.ts +0 -1
- package/assets/plugin/signals/conditions/types.js +0 -4
- package/assets/plugin/signals/direction-rules.d.ts +0 -3
- package/assets/plugin/signals/direction-rules.js +0 -24
- package/assets/plugin/signals/entry-rules.d.ts +0 -6
- package/assets/plugin/signals/entry-rules.js +0 -33
- package/assets/plugin/signals/serialize-context.d.ts +0 -4
- package/assets/plugin/signals/serialize-context.js +0 -39
- package/assets/plugin/signals/stop-rules.d.ts +0 -3
- package/assets/plugin/signals/stop-rules.js +0 -48
- package/assets/plugin/signals/strategy-adapter.d.ts +0 -47
- package/assets/plugin/signals/strategy-adapter.js +0 -199
- package/assets/plugin/signals/types.d.ts +0 -1
- package/assets/plugin/signals/types.js +0 -8
- package/assets/plugin/simulator/exchange-simulator.d.ts +0 -93
- package/assets/plugin/simulator/exchange-simulator.js +0 -689
- package/assets/plugin/simulator/fill-engine.d.ts +0 -53
- package/assets/plugin/simulator/fill-engine.js +0 -280
- package/assets/plugin/simulator/paper-market-feed.d.ts +0 -26
- package/assets/plugin/simulator/paper-market-feed.js +0 -104
- package/assets/plugin/simulator/realistic-fills.d.ts +0 -59
- package/assets/plugin/simulator/realistic-fills.js +0 -175
- package/assets/plugin/simulator/types.d.ts +0 -224
- package/assets/plugin/simulator/types.js +0 -43
- package/assets/plugin/strategy/builtin-strategies.d.ts +0 -2
- package/assets/plugin/strategy/builtin-strategies.js +0 -113
- package/assets/plugin/strategy/condition-registry.d.ts +0 -3
- package/assets/plugin/strategy/condition-registry.js +0 -153
- package/assets/plugin/strategy/evaluator.d.ts +0 -70
- package/assets/plugin/strategy/evaluator.js +0 -98
- package/assets/plugin/tools/assessment-validation.d.ts +0 -120
- package/assets/plugin/tools/assessment-validation.js +0 -415
- package/assets/plugin/tools/attach-brackets.d.ts +0 -39
- package/assets/plugin/tools/attach-brackets.js +0 -399
- package/assets/plugin/tools/audit-bracket-protection.d.ts +0 -49
- package/assets/plugin/tools/audit-bracket-protection.js +0 -527
- package/assets/plugin/tools/cancel-all-orders.d.ts +0 -9
- package/assets/plugin/tools/cancel-all-orders.js +0 -8
- package/assets/plugin/tools/cancel-order.d.ts +0 -14
- package/assets/plugin/tools/cancel-order.js +0 -60
- package/assets/plugin/tools/check-position-health.d.ts +0 -46
- package/assets/plugin/tools/check-position-health.js +0 -194
- package/assets/plugin/tools/clear-exchange-credentials.d.ts +0 -24
- package/assets/plugin/tools/clear-exchange-credentials.js +0 -70
- package/assets/plugin/tools/close-position.d.ts +0 -45
- package/assets/plugin/tools/close-position.js +0 -722
- package/assets/plugin/tools/create-order.d.ts +0 -82
- package/assets/plugin/tools/create-order.js +0 -1516
- package/assets/plugin/tools/exit-gate.d.ts +0 -58
- package/assets/plugin/tools/exit-gate.js +0 -162
- package/assets/plugin/tools/fetch-balance.d.ts +0 -5
- package/assets/plugin/tools/fetch-balance.js +0 -4
- package/assets/plugin/tools/fetch-ohlcv.d.ts +0 -11
- package/assets/plugin/tools/fetch-ohlcv.js +0 -8
- package/assets/plugin/tools/fetch-open-orders.d.ts +0 -7
- package/assets/plugin/tools/fetch-open-orders.js +0 -4
- package/assets/plugin/tools/fetch-positions.d.ts +0 -7
- package/assets/plugin/tools/fetch-positions.js +0 -4
- package/assets/plugin/tools/fetch-ticker.d.ts +0 -11
- package/assets/plugin/tools/fetch-ticker.js +0 -5
- package/assets/plugin/tools/get-agent-profile.d.ts +0 -4
- package/assets/plugin/tools/get-agent-profile.js +0 -6
- package/assets/plugin/tools/get-analytics.d.ts +0 -6
- package/assets/plugin/tools/get-analytics.js +0 -7
- package/assets/plugin/tools/get-backtest.d.ts +0 -12
- package/assets/plugin/tools/get-backtest.js +0 -91
- package/assets/plugin/tools/get-basis.d.ts +0 -7
- package/assets/plugin/tools/get-basis.js +0 -7
- package/assets/plugin/tools/get-bracket-config.d.ts +0 -11
- package/assets/plugin/tools/get-bracket-config.js +0 -24
- package/assets/plugin/tools/get-cascade-risk.d.ts +0 -7
- package/assets/plugin/tools/get-cascade-risk.js +0 -8
- package/assets/plugin/tools/get-crypto-metrics.d.ts +0 -18
- package/assets/plugin/tools/get-crypto-metrics.js +0 -62
- package/assets/plugin/tools/get-cvd.d.ts +0 -6
- package/assets/plugin/tools/get-cvd.js +0 -6
- package/assets/plugin/tools/get-divergences.d.ts +0 -6
- package/assets/plugin/tools/get-divergences.js +0 -6
- package/assets/plugin/tools/get-funding-context.d.ts +0 -6
- package/assets/plugin/tools/get-funding-context.js +0 -16
- package/assets/plugin/tools/get-liquidation-levels.d.ts +0 -7
- package/assets/plugin/tools/get-liquidation-levels.js +0 -7
- package/assets/plugin/tools/get-liquidation-pulse.d.ts +0 -9
- package/assets/plugin/tools/get-liquidation-pulse.js +0 -22
- package/assets/plugin/tools/get-market-breadth.d.ts +0 -6
- package/assets/plugin/tools/get-market-breadth.js +0 -8
- package/assets/plugin/tools/get-market-intel.d.ts +0 -19
- package/assets/plugin/tools/get-market-intel.js +0 -116
- package/assets/plugin/tools/get-market-structure.d.ts +0 -47
- package/assets/plugin/tools/get-market-structure.js +0 -198
- package/assets/plugin/tools/get-my-mined-patterns.d.ts +0 -20
- package/assets/plugin/tools/get-my-mined-patterns.js +0 -61
- package/assets/plugin/tools/get-my-proposed-learnings.d.ts +0 -20
- package/assets/plugin/tools/get-my-proposed-learnings.js +0 -55
- package/assets/plugin/tools/get-my-recent-reviews.d.ts +0 -22
- package/assets/plugin/tools/get-my-recent-reviews.js +0 -66
- package/assets/plugin/tools/get-orderbook.d.ts +0 -21
- package/assets/plugin/tools/get-orderbook.js +0 -32
- package/assets/plugin/tools/get-pattern-scan.d.ts +0 -7
- package/assets/plugin/tools/get-pattern-scan.js +0 -8
- package/assets/plugin/tools/get-regime.d.ts +0 -6
- package/assets/plugin/tools/get-regime.js +0 -7
- package/assets/plugin/tools/get-relevant-learnings.d.ts +0 -21
- package/assets/plugin/tools/get-relevant-learnings.js +0 -65
- package/assets/plugin/tools/get-resting-liquidity.d.ts +0 -6
- package/assets/plugin/tools/get-resting-liquidity.js +0 -11
- package/assets/plugin/tools/get-risk-scenario.d.ts +0 -29
- package/assets/plugin/tools/get-risk-scenario.js +0 -47
- package/assets/plugin/tools/get-risk-summary.d.ts +0 -51
- package/assets/plugin/tools/get-risk-summary.js +0 -118
- package/assets/plugin/tools/get-sentiment.d.ts +0 -4
- package/assets/plugin/tools/get-sentiment.js +0 -6
- package/assets/plugin/tools/get-session-review.d.ts +0 -7
- package/assets/plugin/tools/get-session-review.js +0 -8
- package/assets/plugin/tools/get-setup-detail.d.ts +0 -7
- package/assets/plugin/tools/get-setup-detail.js +0 -311
- package/assets/plugin/tools/get-signals.d.ts +0 -15
- package/assets/plugin/tools/get-signals.js +0 -54
- package/assets/plugin/tools/get-sizing.d.ts +0 -6
- package/assets/plugin/tools/get-sizing.js +0 -6
- package/assets/plugin/tools/get-trade-feedback.d.ts +0 -7
- package/assets/plugin/tools/get-trade-feedback.js +0 -8
- package/assets/plugin/tools/get-trade-flow.d.ts +0 -7
- package/assets/plugin/tools/get-trade-flow.js +0 -7
- package/assets/plugin/tools/get-volume-analysis.d.ts +0 -21
- package/assets/plugin/tools/get-volume-analysis.js +0 -74
- package/assets/plugin/tools/get-volume-profile.d.ts +0 -7
- package/assets/plugin/tools/get-volume-profile.js +0 -7
- package/assets/plugin/tools/get-wave9-status.d.ts +0 -127
- package/assets/plugin/tools/get-wave9-status.js +0 -796
- package/assets/plugin/tools/helpers.d.ts +0 -26
- package/assets/plugin/tools/helpers.js +0 -39
- package/assets/plugin/tools/intel-api.d.ts +0 -34
- package/assets/plugin/tools/intel-api.js +0 -119
- package/assets/plugin/tools/intel-cache.d.ts +0 -25
- package/assets/plugin/tools/intel-cache.js +0 -148
- package/assets/plugin/tools/list-strategies.d.ts +0 -17
- package/assets/plugin/tools/list-strategies.js +0 -23
- package/assets/plugin/tools/modify-stop.d.ts +0 -21
- package/assets/plugin/tools/modify-stop.js +0 -120
- package/assets/plugin/tools/modify-target.d.ts +0 -21
- package/assets/plugin/tools/modify-target.js +0 -110
- package/assets/plugin/tools/propose-learning.d.ts +0 -22
- package/assets/plugin/tools/propose-learning.js +0 -65
- package/assets/plugin/tools/query-review-outcomes.d.ts +0 -30
- package/assets/plugin/tools/query-review-outcomes.js +0 -64
- package/assets/plugin/tools/query-trades.d.ts +0 -21
- package/assets/plugin/tools/query-trades.js +0 -37
- package/assets/plugin/tools/record-position-reviews.d.ts +0 -38
- package/assets/plugin/tools/record-position-reviews.js +0 -147
- package/assets/plugin/tools/save-strategy.d.ts +0 -16
- package/assets/plugin/tools/save-strategy.js +0 -46
- package/assets/plugin/tools/scan-pairs.d.ts +0 -18
- package/assets/plugin/tools/scan-pairs.js +0 -231
- package/assets/plugin/tools/score-setup.d.ts +0 -31
- package/assets/plugin/tools/score-setup.js +0 -268
- package/assets/plugin/tools/set-bracket-requirement.d.ts +0 -18
- package/assets/plugin/tools/set-bracket-requirement.js +0 -81
- package/assets/plugin/tools/set-exchange-credentials.d.ts +0 -25
- package/assets/plugin/tools/set-exchange-credentials.js +0 -80
- package/assets/plugin/tools/set-trading-mode.d.ts +0 -26
- package/assets/plugin/tools/set-trading-mode.js +0 -135
- package/assets/plugin/tools/test-exchange-credentials.d.ts +0 -16
- package/assets/plugin/tools/test-exchange-credentials.js +0 -100
- package/assets/plugin/tools/toggle-strategy.d.ts +0 -8
- package/assets/plugin/tools/toggle-strategy.js +0 -15
- package/assets/plugin/trading-params-cache.d.ts +0 -26
- package/assets/plugin/trading-params-cache.js +0 -52
- package/assets/plugin/types.d.ts +0 -134
- package/assets/plugin/types.js +0 -7
- package/assets/plugin/util/plugin-paths.d.ts +0 -3
- package/assets/plugin/util/plugin-paths.js +0 -15
- package/assets/plugin/venues/hyperliquid/hl-balance.d.ts +0 -116
- package/assets/plugin/venues/hyperliquid/hl-balance.js +0 -145
- package/assets/plugin/venues/hyperliquid/hl-brackets.d.ts +0 -102
- package/assets/plugin/venues/hyperliquid/hl-brackets.js +0 -172
- package/assets/plugin/venues/hyperliquid/hl-cloid.d.ts +0 -22
- package/assets/plugin/venues/hyperliquid/hl-cloid.js +0 -82
- package/assets/plugin/venues/hyperliquid/hl-info-cache.d.ts +0 -46
- package/assets/plugin/venues/hyperliquid/hl-info-cache.js +0 -125
- package/assets/plugin/venues/hyperliquid/hl-live-adapter.d.ts +0 -88
- package/assets/plugin/venues/hyperliquid/hl-live-adapter.js +0 -353
- package/assets/plugin/venues/hyperliquid/hl-precision.d.ts +0 -61
- package/assets/plugin/venues/hyperliquid/hl-precision.js +0 -176
- package/assets/plugin/venues/hyperliquid/hl-private.d.ts +0 -88
- package/assets/plugin/venues/hyperliquid/hl-private.js +0 -357
- package/assets/plugin/venues/hyperliquid/hl-public.d.ts +0 -79
- package/assets/plugin/venues/hyperliquid/hl-public.js +0 -429
- package/assets/plugin/venues/hyperliquid/hl-rate-gate.d.ts +0 -57
- package/assets/plugin/venues/hyperliquid/hl-rate-gate.js +0 -220
- package/assets/plugin/venues/hyperliquid/hl-user-stream.d.ts +0 -90
- package/assets/plugin/venues/hyperliquid/hl-user-stream.js +0 -220
- package/assets/plugin/venues/registry.d.ts +0 -38
- package/assets/plugin/venues/registry.js +0 -46
- package/assets/plugin/venues/symbols.d.ts +0 -43
- package/assets/plugin/venues/symbols.js +0 -107
- package/assets/plugin/wave9/live-account-capture.d.ts +0 -67
- package/assets/plugin/wave9/live-account-capture.js +0 -435
- package/assets/plugin/wave9/live-autonomous-protection.d.ts +0 -39
- package/assets/plugin/wave9/live-autonomous-protection.js +0 -112
- package/assets/plugin/wave9/live-durable-reconciliation-scheduler.d.ts +0 -33
- package/assets/plugin/wave9/live-durable-reconciliation-scheduler.js +0 -115
- package/assets/plugin/wave9/live-execution-ledger.d.ts +0 -107
- package/assets/plugin/wave9/live-execution-ledger.js +0 -498
- package/assets/plugin/wave9/live-position-confirmation.d.ts +0 -18
- package/assets/plugin/wave9/live-position-confirmation.js +0 -111
- package/assets/plugin/wave9/live-residual-protection.d.ts +0 -18
- package/assets/plugin/wave9/live-residual-protection.js +0 -250
- package/assets/plugin/wave9/live-startup-reconciliation.d.ts +0 -38
- package/assets/plugin/wave9/live-startup-reconciliation.js +0 -454
- package/assets/plugin/wave9/live-symbol-ownership.d.ts +0 -20
- package/assets/plugin/wave9/live-symbol-ownership.js +0 -132
- package/assets/plugin/wave9/paper-admission-guard.d.ts +0 -199
- package/assets/plugin/wave9/paper-admission-guard.js +0 -650
- package/assets/plugin/wave9/usdm-evidence-provider.d.ts +0 -42
- package/assets/plugin/wave9/usdm-evidence-provider.js +0 -133
|
@@ -1,194 +0,0 @@
|
|
|
1
|
-
// Tool: check_position_health — Real-time position health monitor.
|
|
2
|
-
// Computes heat, stop proximity, time-in-trade, and risk flags for open positions.
|
|
3
|
-
// Pure local computation — no API calls needed.
|
|
4
|
-
export function checkPositionHealthTool(args) {
|
|
5
|
-
const { positions, account_balance } = args;
|
|
6
|
-
if (!positions || positions.length === 0) {
|
|
7
|
-
return {
|
|
8
|
-
positions: [],
|
|
9
|
-
portfolio: {
|
|
10
|
-
totalHeat: 0,
|
|
11
|
-
totalNotional: 0,
|
|
12
|
-
totalPnl: 0,
|
|
13
|
-
positionCount: 0,
|
|
14
|
-
heatStatus: 'LOW',
|
|
15
|
-
alerts: [],
|
|
16
|
-
},
|
|
17
|
-
};
|
|
18
|
-
}
|
|
19
|
-
if (account_balance <= 0) {
|
|
20
|
-
return {
|
|
21
|
-
positions: [],
|
|
22
|
-
portfolio: {
|
|
23
|
-
totalHeat: 0,
|
|
24
|
-
totalNotional: 0,
|
|
25
|
-
totalPnl: 0,
|
|
26
|
-
positionCount: 0,
|
|
27
|
-
heatStatus: 'CRITICAL',
|
|
28
|
-
alerts: ['Account balance is zero or negative'],
|
|
29
|
-
},
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
|
-
const now = Date.now();
|
|
33
|
-
const portfolioAlerts = [];
|
|
34
|
-
let totalHeat = 0;
|
|
35
|
-
let totalNotional = 0;
|
|
36
|
-
let totalPnl = 0;
|
|
37
|
-
const healthResults = positions.map((pos) => {
|
|
38
|
-
const alerts = [];
|
|
39
|
-
const dirMul = pos.side === 'LONG' ? 1 : -1;
|
|
40
|
-
// ── P&L ──
|
|
41
|
-
const pnl = (pos.current_price - pos.entry_price) * pos.quantity * dirMul;
|
|
42
|
-
const notional = pos.entry_price * pos.quantity;
|
|
43
|
-
const pnlPercent = notional > 0 ? (pnl / notional) * 100 : 0;
|
|
44
|
-
// Risk per unit = distance from entry to stop
|
|
45
|
-
const riskPerUnit = Math.abs(pos.entry_price - pos.stop_price);
|
|
46
|
-
const riskAmount = riskPerUnit * pos.quantity;
|
|
47
|
-
const pnlR = riskAmount > 0 ? pnl / riskAmount : 0;
|
|
48
|
-
// ── Stop tracking ──
|
|
49
|
-
const distToStop = pos.side === 'LONG'
|
|
50
|
-
? pos.current_price - pos.stop_price
|
|
51
|
-
: pos.stop_price - pos.current_price;
|
|
52
|
-
const distanceToStopPercent = pos.current_price > 0 ? (distToStop / pos.current_price) * 100 : 0;
|
|
53
|
-
const distanceToStopR = riskPerUnit > 0 ? distToStop / riskPerUnit : 0;
|
|
54
|
-
let stopStatus;
|
|
55
|
-
if (distToStop <= 0) {
|
|
56
|
-
stopStatus = 'BREACHED';
|
|
57
|
-
alerts.push(`STOP BREACHED — price has passed stop level ($${pos.stop_price})`);
|
|
58
|
-
}
|
|
59
|
-
else if (distanceToStopR < 0.3) {
|
|
60
|
-
stopStatus = 'CRITICAL';
|
|
61
|
-
alerts.push(`Stop critically close (${distanceToStopR.toFixed(2)}R away)`);
|
|
62
|
-
}
|
|
63
|
-
else if (distanceToStopR < 0.7) {
|
|
64
|
-
stopStatus = 'CLOSE';
|
|
65
|
-
alerts.push(`Stop approaching (${distanceToStopR.toFixed(2)}R away)`);
|
|
66
|
-
}
|
|
67
|
-
else {
|
|
68
|
-
stopStatus = 'SAFE';
|
|
69
|
-
}
|
|
70
|
-
// ── Target tracking ──
|
|
71
|
-
let distanceToTargetPercent = null;
|
|
72
|
-
let distanceToTargetR = null;
|
|
73
|
-
let targetReached = false;
|
|
74
|
-
if (pos.target_price != null) {
|
|
75
|
-
const distToTarget = pos.side === 'LONG'
|
|
76
|
-
? pos.target_price - pos.current_price
|
|
77
|
-
: pos.current_price - pos.target_price;
|
|
78
|
-
distanceToTargetPercent = pos.current_price > 0 ? (distToTarget / pos.current_price) * 100 : 0;
|
|
79
|
-
distanceToTargetR = riskPerUnit > 0 ? distToTarget / riskPerUnit : 0;
|
|
80
|
-
targetReached = distToTarget <= 0;
|
|
81
|
-
if (targetReached) {
|
|
82
|
-
alerts.push('TARGET REACHED — consider taking profit');
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
// If past target but still holding
|
|
86
|
-
if (pnlR >= 2 && !targetReached) {
|
|
87
|
-
alerts.push(`At ${pnlR.toFixed(1)}R profit — consider trailing stop or partial take-profit`);
|
|
88
|
-
}
|
|
89
|
-
// ── Heat (position risk as % of account) ──
|
|
90
|
-
const heatPercent = (riskAmount / account_balance) * 100;
|
|
91
|
-
const notionalPercent = (notional / account_balance) * 100;
|
|
92
|
-
if (heatPercent > 5) {
|
|
93
|
-
alerts.push(`High heat: ${heatPercent.toFixed(1)}% of account at risk in this position`);
|
|
94
|
-
}
|
|
95
|
-
else if (heatPercent > 3) {
|
|
96
|
-
alerts.push(`Elevated heat: ${heatPercent.toFixed(1)}% of account at risk`);
|
|
97
|
-
}
|
|
98
|
-
totalHeat += heatPercent;
|
|
99
|
-
totalNotional += notional;
|
|
100
|
-
totalPnl += pnl;
|
|
101
|
-
// ── Time in trade ──
|
|
102
|
-
const entryMs = new Date(pos.entry_time).getTime();
|
|
103
|
-
const elapsed = Math.max(0, now - entryMs);
|
|
104
|
-
const minutes = Math.floor(elapsed / 60_000);
|
|
105
|
-
const hours = Math.floor(minutes / 60);
|
|
106
|
-
let timeFormatted;
|
|
107
|
-
if (hours >= 24) {
|
|
108
|
-
const days = Math.floor(hours / 24);
|
|
109
|
-
timeFormatted = `${days}d ${hours % 24}h`;
|
|
110
|
-
}
|
|
111
|
-
else if (hours > 0) {
|
|
112
|
-
timeFormatted = `${hours}h ${minutes % 60}m`;
|
|
113
|
-
}
|
|
114
|
-
else {
|
|
115
|
-
timeFormatted = `${minutes}m`;
|
|
116
|
-
}
|
|
117
|
-
let timeStatus;
|
|
118
|
-
if (minutes < 15)
|
|
119
|
-
timeStatus = 'FRESH';
|
|
120
|
-
else if (minutes < 240)
|
|
121
|
-
timeStatus = 'NORMAL';
|
|
122
|
-
else if (minutes < 720) {
|
|
123
|
-
timeStatus = 'EXTENDED';
|
|
124
|
-
if (pnlR < 0)
|
|
125
|
-
alerts.push(`Held ${timeFormatted} underwater — review thesis`);
|
|
126
|
-
}
|
|
127
|
-
else {
|
|
128
|
-
timeStatus = 'STALE';
|
|
129
|
-
alerts.push(`Position held ${timeFormatted} — is original thesis still valid?`);
|
|
130
|
-
}
|
|
131
|
-
// Underwater for too long
|
|
132
|
-
if (pnlR < -0.5 && minutes > 60) {
|
|
133
|
-
alerts.push(`Underwater (${pnlR.toFixed(1)}R) for ${timeFormatted} — thesis may be invalid`);
|
|
134
|
-
}
|
|
135
|
-
return {
|
|
136
|
-
symbol: pos.symbol,
|
|
137
|
-
side: pos.side,
|
|
138
|
-
pnl: +pnl.toFixed(2),
|
|
139
|
-
pnlPercent: +pnlPercent.toFixed(2),
|
|
140
|
-
pnlR: +pnlR.toFixed(2),
|
|
141
|
-
distanceToStopPercent: +distanceToStopPercent.toFixed(2),
|
|
142
|
-
distanceToStopR: +distanceToStopR.toFixed(2),
|
|
143
|
-
stopStatus,
|
|
144
|
-
distanceToTargetPercent: distanceToTargetPercent != null ? +distanceToTargetPercent.toFixed(2) : null,
|
|
145
|
-
distanceToTargetR: distanceToTargetR != null ? +distanceToTargetR.toFixed(2) : null,
|
|
146
|
-
targetReached,
|
|
147
|
-
heatPercent: +heatPercent.toFixed(2),
|
|
148
|
-
notionalPercent: +notionalPercent.toFixed(2),
|
|
149
|
-
timeInTradeMinutes: minutes,
|
|
150
|
-
timeInTradeFormatted: timeFormatted,
|
|
151
|
-
timeStatus,
|
|
152
|
-
alerts,
|
|
153
|
-
};
|
|
154
|
-
});
|
|
155
|
-
// ── Portfolio-level assessment ──
|
|
156
|
-
let heatStatus;
|
|
157
|
-
if (totalHeat >= 15) {
|
|
158
|
-
heatStatus = 'CRITICAL';
|
|
159
|
-
portfolioAlerts.push(`CRITICAL portfolio heat: ${totalHeat.toFixed(1)}% — reduce exposure immediately`);
|
|
160
|
-
}
|
|
161
|
-
else if (totalHeat >= 10) {
|
|
162
|
-
heatStatus = 'HIGH';
|
|
163
|
-
portfolioAlerts.push(`High portfolio heat: ${totalHeat.toFixed(1)}% — no new positions`);
|
|
164
|
-
}
|
|
165
|
-
else if (totalHeat >= 6) {
|
|
166
|
-
heatStatus = 'ELEVATED';
|
|
167
|
-
portfolioAlerts.push(`Elevated portfolio heat: ${totalHeat.toFixed(1)}% — be cautious with new entries`);
|
|
168
|
-
}
|
|
169
|
-
else if (totalHeat >= 3) {
|
|
170
|
-
heatStatus = 'MODERATE';
|
|
171
|
-
}
|
|
172
|
-
else {
|
|
173
|
-
heatStatus = 'LOW';
|
|
174
|
-
}
|
|
175
|
-
const breachedCount = healthResults.filter(p => p.stopStatus === 'BREACHED').length;
|
|
176
|
-
if (breachedCount > 0) {
|
|
177
|
-
portfolioAlerts.push(`${breachedCount} position(s) past stop level — exit immediately`);
|
|
178
|
-
}
|
|
179
|
-
const criticalCount = healthResults.filter(p => p.stopStatus === 'CRITICAL').length;
|
|
180
|
-
if (criticalCount > 0) {
|
|
181
|
-
portfolioAlerts.push(`${criticalCount} position(s) critically close to stop`);
|
|
182
|
-
}
|
|
183
|
-
return {
|
|
184
|
-
positions: healthResults,
|
|
185
|
-
portfolio: {
|
|
186
|
-
totalHeat: +totalHeat.toFixed(2),
|
|
187
|
-
totalNotional: +totalNotional.toFixed(2),
|
|
188
|
-
totalPnl: +totalPnl.toFixed(2),
|
|
189
|
-
positionCount: positions.length,
|
|
190
|
-
heatStatus,
|
|
191
|
-
alerts: portfolioAlerts,
|
|
192
|
-
},
|
|
193
|
-
};
|
|
194
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import type { PluginRuntime } from '../onboarding/runtime.js';
|
|
2
|
-
import type { IExchangeAdapter } from '../exchange-adapter.js';
|
|
3
|
-
import type { TradingMode } from '../types.js';
|
|
4
|
-
export interface ClearExchangeCredentialsArgs {
|
|
5
|
-
/** Must be `true`. Required so the skill's tool-discovery probe (which
|
|
6
|
-
* passes empty args) never accidentally wipes credentials on startup. */
|
|
7
|
-
confirm?: boolean;
|
|
8
|
-
}
|
|
9
|
-
export interface ClearExchangeCredentialsResult {
|
|
10
|
-
ok: boolean;
|
|
11
|
-
message: string;
|
|
12
|
-
modeBefore: TradingMode;
|
|
13
|
-
mode: TradingMode;
|
|
14
|
-
rolledBackToPaper: boolean;
|
|
15
|
-
readiness: string;
|
|
16
|
-
}
|
|
17
|
-
export interface ClearExchangeCredentialsDeps {
|
|
18
|
-
runtime: PluginRuntime;
|
|
19
|
-
adapterDeps: {
|
|
20
|
-
adapter: IExchangeAdapter;
|
|
21
|
-
};
|
|
22
|
-
configPath?: string;
|
|
23
|
-
}
|
|
24
|
-
export declare function clearExchangeCredentialsTool(args: ClearExchangeCredentialsArgs, deps: ClearExchangeCredentialsDeps): Promise<ClearExchangeCredentialsResult>;
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
// clear_exchange_credentials — operator-only plugin tool.
|
|
2
|
-
//
|
|
3
|
-
// Removes the `exchange` section from ~/.reefclaw/plugin-config.json and,
|
|
4
|
-
// if the plugin is currently running in a mode that requires credentials
|
|
5
|
-
// (SHADOW, MICRO_LIVE, LIVE), de-escalates to PAPER via runtime.reconnect().
|
|
6
|
-
// This is the "pull the plug" button for when the operator wants to
|
|
7
|
-
// remove Binance keys from the machine entirely.
|
|
8
|
-
//
|
|
9
|
-
// Security:
|
|
10
|
-
// - Does NOT accept a new secret — pure delete.
|
|
11
|
-
// - Always de-escalates to PAPER on mode rollback; never stays in a
|
|
12
|
-
// live mode without credentials (would crash the adapter on first
|
|
13
|
-
// order anyway).
|
|
14
|
-
import { updatePluginConfig } from '../config/plugin-config-io.js';
|
|
15
|
-
import { logger } from '../logger.js';
|
|
16
|
-
const TAG = 'clear-exchange-credentials';
|
|
17
|
-
export async function clearExchangeCredentialsTool(args, deps) {
|
|
18
|
-
const modeBefore = deps.runtime.mode;
|
|
19
|
-
if (args?.confirm !== true) {
|
|
20
|
-
return {
|
|
21
|
-
ok: false,
|
|
22
|
-
message: 'clear_exchange_credentials requires confirm: true (prevents accidental probe wipes)',
|
|
23
|
-
modeBefore,
|
|
24
|
-
mode: modeBefore,
|
|
25
|
-
rolledBackToPaper: false,
|
|
26
|
-
readiness: deps.runtime.adapter.readiness,
|
|
27
|
-
};
|
|
28
|
-
}
|
|
29
|
-
try {
|
|
30
|
-
updatePluginConfig({ exchange: undefined }, deps.configPath);
|
|
31
|
-
}
|
|
32
|
-
catch (err) {
|
|
33
|
-
const msg = err instanceof Error ? err.message : String(err);
|
|
34
|
-
logger.error(TAG, `Failed to clear credentials: ${msg}`);
|
|
35
|
-
return {
|
|
36
|
-
ok: false,
|
|
37
|
-
message: `Failed to remove credentials from config: ${msg}`,
|
|
38
|
-
modeBefore,
|
|
39
|
-
mode: modeBefore,
|
|
40
|
-
rolledBackToPaper: false,
|
|
41
|
-
readiness: deps.runtime.adapter.readiness,
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
logger.info(TAG, 'Exchange credentials cleared from plugin-config.json');
|
|
45
|
-
// If we were in a live mode, fall back to PAPER — running SHADOW or
|
|
46
|
-
// MICRO_LIVE without credentials is a guaranteed broken state.
|
|
47
|
-
let rolledBackToPaper = false;
|
|
48
|
-
if (modeBefore !== 'PAPER') {
|
|
49
|
-
try {
|
|
50
|
-
// Also persist the mode downgrade so a subsequent restart doesn't
|
|
51
|
-
// try to bring up a live adapter with no credentials.
|
|
52
|
-
updatePluginConfig({ tradingMode: 'PAPER' }, deps.configPath);
|
|
53
|
-
}
|
|
54
|
-
catch (err) {
|
|
55
|
-
logger.warn(TAG, `Failed to persist PAPER fallback: ${err instanceof Error ? err.message : String(err)}`);
|
|
56
|
-
}
|
|
57
|
-
await deps.runtime.reconnect({ mode: 'PAPER', exchange: null }, { adapterDeps: deps.adapterDeps });
|
|
58
|
-
rolledBackToPaper = true;
|
|
59
|
-
}
|
|
60
|
-
return {
|
|
61
|
-
ok: true,
|
|
62
|
-
message: rolledBackToPaper
|
|
63
|
-
? `Credentials cleared and trading mode rolled back from ${modeBefore} to PAPER`
|
|
64
|
-
: 'Credentials cleared',
|
|
65
|
-
modeBefore,
|
|
66
|
-
mode: deps.runtime.mode,
|
|
67
|
-
rolledBackToPaper,
|
|
68
|
-
readiness: deps.runtime.adapter.readiness,
|
|
69
|
-
};
|
|
70
|
-
}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import type { PublicMarketDataApi } from '../ccxt/public-market-data-api.js';
|
|
2
|
-
import type { IExchangeAdapter } from '../exchange-adapter.js';
|
|
3
|
-
import type { CcxtOrder } from '../types.js';
|
|
4
|
-
import { type ClosePositionArgs } from './assessment-validation.js';
|
|
5
|
-
import { type AutoCaptureContext } from '../ingest/position-auto-capture.js';
|
|
6
|
-
import { type ExitGateMode } from '../config/position-review-config.js';
|
|
7
|
-
import type { TradingOperationLock } from '../lifecycle/trading-operation-lock.js';
|
|
8
|
-
import type { Wave9LiveExecutionLedger } from '../wave9/live-execution-ledger.js';
|
|
9
|
-
import type { Wave9LiveSymbolOwnershipCheck } from '../wave9/live-symbol-ownership.js';
|
|
10
|
-
import { type Wave9LiveResidualProtectionResult } from '../wave9/live-residual-protection.js';
|
|
11
|
-
import { type Wave9PaperAdmissionGuard } from '../wave9/paper-admission-guard.js';
|
|
12
|
-
export declare function closePositionTool(args: ClosePositionArgs, deps: {
|
|
13
|
-
binanceApi: PublicMarketDataApi;
|
|
14
|
-
adapter: IExchangeAdapter;
|
|
15
|
-
autoCapture?: AutoCaptureContext;
|
|
16
|
-
/** Override for tests — production reads from plugin-config.json on each
|
|
17
|
-
* call so the flag can be flipped without a restart. */
|
|
18
|
-
exitGateMode?: ExitGateMode;
|
|
19
|
-
wave9AdmissionGuard?: Wave9PaperAdmissionGuard;
|
|
20
|
-
refreshPaperState?: () => void;
|
|
21
|
-
wave9TradingModeCheck?: () => string;
|
|
22
|
-
wave9VenueCheck?: () => string;
|
|
23
|
-
captureWave9PositionFingerprint?: (symbol: string) => Promise<{
|
|
24
|
-
fingerprint: string;
|
|
25
|
-
position: {
|
|
26
|
-
candidateId?: string;
|
|
27
|
-
missionId?: string;
|
|
28
|
-
setupType?: string;
|
|
29
|
-
side: 'long' | 'short';
|
|
30
|
-
};
|
|
31
|
-
}>;
|
|
32
|
-
wave9LiveLedger?: Wave9LiveExecutionLedger;
|
|
33
|
-
checkWave9LiveSymbolOwnership?: Wave9LiveSymbolOwnershipCheck;
|
|
34
|
-
reprotectWave9LiveResidual?: (adapter: IExchangeAdapter, ledger: Wave9LiveExecutionLedger, candidateId: string, symbol: string) => Promise<Wave9LiveResidualProtectionResult>;
|
|
35
|
-
operationLock?: TradingOperationLock;
|
|
36
|
-
operationLockHeld?: boolean;
|
|
37
|
-
}): Promise<CcxtOrder | {
|
|
38
|
-
error: string;
|
|
39
|
-
}>;
|
|
40
|
-
/** Test seam — clears the circuit-breaker state between unit tests. */
|
|
41
|
-
export declare const __testing__: {
|
|
42
|
-
resetCircuitBreaker(): void;
|
|
43
|
-
/** Inspect current circuit-breaker state — for assertions. */
|
|
44
|
-
getCircuitBreakerCount(): number;
|
|
45
|
-
};
|