dexterm-cli 0.1.6 → 0.1.7
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/packages/agents/src/schema.js +22 -1
- package/dist/packages/agents/src/story.js +11 -2
- package/dist/packages/agents/src/tiers.js +27 -2
- package/dist/packages/agents/src/tools.js +30 -2
- package/dist/packages/autotrade/assets/exit-profile.schema.json +492 -0
- package/dist/packages/autotrade/assets/profiles/moonbag.json +46 -0
- package/dist/packages/autotrade/assets/profiles/runner.json +88 -0
- package/dist/packages/autotrade/assets/profiles/scalp.json +88 -0
- package/dist/packages/autotrade/assets/profiles/swing.json +88 -0
- package/dist/packages/autotrade/assets/strategies/moonbag.json +101 -0
- package/dist/packages/autotrade/assets/strategies/runner.json +101 -0
- package/dist/packages/autotrade/assets/strategies/sample-dip-ladder.json +188 -0
- package/dist/packages/autotrade/assets/strategies/scalp.json +98 -0
- package/dist/packages/autotrade/assets/strategies/swing.json +97 -0
- package/dist/packages/autotrade/assets/strategies/yolo.json +157 -0
- package/dist/packages/autotrade/assets/tapes/yolo-rehearsal.json +1 -0
- package/dist/packages/autotrade/src/account.js +74 -0
- package/dist/packages/autotrade/src/backtest.js +357 -0
- package/dist/packages/autotrade/src/basis-text.js +32 -0
- package/dist/packages/autotrade/src/chat/approvals.js +484 -0
- package/dist/packages/autotrade/src/chat/audit.js +140 -0
- package/dist/packages/autotrade/src/chat/config.js +93 -0
- package/dist/packages/autotrade/src/chat/connector.js +24 -0
- package/dist/packages/autotrade/src/chat/control.js +103 -0
- package/dist/packages/autotrade/src/chat/fake.js +100 -0
- package/dist/packages/autotrade/src/chat/format.js +71 -0
- package/dist/packages/autotrade/src/chat/hub.js +187 -0
- package/dist/packages/autotrade/src/chat/index.js +18 -0
- package/dist/packages/autotrade/src/chat/notify.js +292 -0
- package/dist/packages/autotrade/src/chat/pairing.js +46 -0
- package/dist/packages/autotrade/src/chat/redact.js +48 -0
- package/dist/packages/autotrade/src/chat/secrets.js +99 -0
- package/dist/packages/autotrade/src/chat/service.js +248 -0
- package/dist/packages/autotrade/src/chat/telegram.js +290 -0
- package/dist/packages/autotrade/src/desk-executor.js +188 -0
- package/dist/packages/autotrade/src/engine.js +387 -0
- package/dist/packages/autotrade/src/execution-port.js +97 -0
- package/dist/packages/autotrade/src/fleet-config.js +169 -0
- package/dist/packages/autotrade/src/fleet-control.js +276 -0
- package/dist/packages/autotrade/src/fleet.js +639 -0
- package/dist/packages/autotrade/src/index.js +53 -0
- package/dist/packages/autotrade/src/ledger.js +108 -0
- package/dist/packages/autotrade/src/live-source.js +182 -0
- package/dist/packages/autotrade/src/monitor-daemon.js +715 -0
- package/dist/packages/autotrade/src/monitor.js +190 -0
- package/dist/packages/autotrade/src/ollama-sessions.js +137 -0
- package/dist/packages/autotrade/src/paper-accounts.js +72 -0
- package/dist/packages/autotrade/src/replay.js +198 -0
- package/dist/packages/autotrade/src/runner-config.js +99 -0
- package/dist/packages/autotrade/src/runner.js +872 -0
- package/dist/packages/autotrade/src/safety.js +243 -0
- package/dist/packages/autotrade/src/session.js +269 -0
- package/dist/packages/autotrade/src/sessions.js +503 -0
- package/dist/packages/autotrade/src/store.js +250 -0
- package/dist/packages/autotrade/src/strategy.js +256 -0
- package/dist/packages/autotrade/src/trade-ledger.js +241 -0
- package/dist/packages/autotrade/src/yolo.js +140 -0
- package/dist/packages/cli/assets/claude/analyst-system.md +4 -4
- package/dist/packages/cli/assets/claude/plugin/skills/token-dossier/SKILL.md +1 -1
- package/dist/packages/cli/src/ai-cmd.js +412 -0
- package/dist/packages/cli/src/analyst/backend.js +82 -15
- package/dist/packages/cli/src/analyst/codex.js +14 -9
- package/dist/packages/cli/src/analyst/ollama.js +263 -0
- package/dist/packages/cli/src/analyst/session.js +5 -2
- package/dist/packages/cli/src/app-help-gen.js +44 -8
- package/dist/packages/cli/src/autotrade-cmd/audit.js +57 -0
- package/dist/packages/cli/src/autotrade-cmd/backtest.js +199 -0
- package/dist/packages/cli/src/autotrade-cmd/flatten.js +64 -0
- package/dist/packages/cli/src/autotrade-cmd/fleet.js +397 -0
- package/dist/packages/cli/src/autotrade-cmd/requests.js +79 -0
- package/dist/packages/cli/src/autotrade-cmd/run.js +413 -0
- package/dist/packages/cli/src/autotrade-cmd/stop.js +76 -0
- package/dist/packages/cli/src/autotrade-cmd/strategies.js +198 -0
- package/dist/packages/cli/src/autotrade-cmd/strategy-control.js +174 -0
- package/dist/packages/cli/src/autotrade-cmd/telegram-host.js +101 -0
- package/dist/packages/cli/src/autotrade-cmd.js +168 -0
- package/dist/packages/cli/src/display.js +156 -17
- package/dist/packages/cli/src/doctor.js +62 -3
- package/dist/packages/cli/src/export.js +10 -2
- package/dist/packages/cli/src/index.js +1 -1
- package/dist/packages/cli/src/ledger-cmd.js +288 -0
- package/dist/packages/cli/src/live/chart-fills.js +46 -0
- package/dist/packages/cli/src/live/index.js +23 -89
- package/dist/packages/cli/src/live/screens/token-live.js +9 -6
- package/dist/packages/cli/src/live/trade.js +12 -457
- package/dist/packages/cli/src/live/watchlist.js +1 -1
- package/dist/packages/cli/src/main.js +147 -190
- package/dist/packages/cli/src/mcp-cmd.js +7 -1
- package/dist/packages/cli/src/plan-cmd.js +1 -1
- package/dist/packages/cli/src/pnl-app.js +31 -21
- package/dist/packages/cli/src/pnl-card.js +158 -21
- package/dist/packages/cli/src/popup.js +22 -6
- package/dist/packages/cli/src/record-cmd.js +141 -20
- package/dist/packages/cli/src/screens/agent-hud.js +34 -2
- package/dist/packages/cli/src/screens/analyst-session.js +7 -4
- package/dist/packages/cli/src/screens/analyst.js +3 -2
- package/dist/packages/cli/src/screens/autotrade-keys.js +169 -0
- package/dist/packages/cli/src/screens/autotrade-proposals.js +123 -0
- package/dist/packages/cli/src/screens/autotrade-screen.js +725 -0
- package/dist/packages/cli/src/screens/autotrade-ui.js +640 -0
- package/dist/packages/cli/src/screens/autotrade-worker.js +89 -0
- package/dist/packages/cli/src/screens/brain.js +37 -11
- package/dist/packages/cli/src/screens/overlay.js +5 -2
- package/dist/packages/cli/src/screens/plans.js +5 -17
- package/dist/packages/cli/src/screens/pnl-chip.js +9 -8
- package/dist/packages/cli/src/screens/positions.js +6 -28
- package/dist/packages/cli/src/screens/ticket.js +38 -205
- package/dist/packages/cli/src/screens/token.js +3 -3
- package/dist/packages/cli/src/state.js +25 -19
- package/dist/packages/cli/src/telegram-cmd.js +451 -0
- package/dist/packages/cli/src/trade.js +3 -128
- package/dist/packages/cli/src/version.js +1 -1
- package/dist/packages/cli/src/wallet-cmd.js +39 -340
- package/dist/packages/cli/src/wallet-command.js +8 -11
- package/dist/packages/cli/src/widgets.js +0 -12
- package/dist/packages/custom/src/config.js +20 -2
- package/dist/packages/custom/src/schema.js +35 -10
- package/dist/packages/custom/src/workspace.js +3 -3
- package/dist/packages/data/src/basis.js +191 -0
- package/dist/packages/data/src/detail.js +53 -2
- package/dist/packages/data/src/index.js +0 -14
- package/dist/packages/data/src/store.js +14 -5
- package/dist/packages/data/src/trade/agent/paper-desk.js +228 -16
- package/dist/packages/data/src/trade/agent/rendezvous.js +3 -2
- package/dist/packages/data/src/trade/bridge.js +4 -102
- package/dist/packages/data/src/trade/ledger/export.js +101 -0
- package/dist/packages/data/src/trade/ledger/file.js +135 -0
- package/dist/packages/data/src/trade/ledger/fold.js +191 -0
- package/dist/packages/data/src/trade/ledger/index.js +9 -0
- package/dist/packages/data/src/trade/ledger/schema.js +83 -0
- package/dist/packages/data/src/trade/ledger/sources.js +307 -0
- package/dist/packages/data/src/trade/ledger/stats.js +123 -0
- package/dist/packages/data/src/trade/ledger/tags.js +116 -0
- package/dist/packages/data/src/trade/ledger/view.js +51 -0
- package/dist/packages/data/src/trade/plans/index.js +0 -1
- package/dist/packages/data/src/trade/plans/service.js +3 -27
- package/dist/packages/mcp/assets/kb/app-help/autotrade-chat.md +48 -0
- package/dist/packages/mcp/assets/kb/app-help/autotrade-parallel.md +42 -0
- package/dist/packages/mcp/assets/kb/app-help/autotrade-runner.md +35 -0
- package/dist/packages/mcp/assets/kb/app-help/autotrade-stop.md +37 -0
- package/dist/packages/mcp/assets/kb/app-help/autotrade-strategies.md +35 -0
- package/dist/packages/mcp/assets/kb/app-help/autotrade-telegram.md +40 -0
- package/dist/packages/mcp/assets/kb/app-help/chart-trade-markers.md +42 -0
- package/dist/packages/mcp/assets/kb/app-help/link-a-wallet.md +4 -10
- package/dist/packages/mcp/assets/kb/app-help/live-trading.md +38 -0
- package/dist/packages/mcp/assets/kb/app-help/live-yolo.md +34 -0
- package/dist/packages/mcp/assets/kb/app-help/order-plans.md +1 -1
- package/dist/packages/mcp/assets/kb/app-help/price-or-marketcap.md +5 -2
- package/dist/packages/mcp/assets/kb/app-help/screen-analyst.md +3 -0
- package/dist/packages/mcp/assets/kb/app-help/screen-autotrade.md +217 -0
- package/dist/packages/mcp/assets/kb/app-help/screen-kol.md +3 -0
- package/dist/packages/mcp/assets/kb/app-help/screen-newpairs.md +3 -0
- package/dist/packages/mcp/assets/kb/app-help/screen-positions.md +3 -0
- package/dist/packages/mcp/assets/kb/app-help/screen-screener.md +3 -0
- package/dist/packages/mcp/assets/kb/app-help/screen-token.md +3 -0
- package/dist/packages/mcp/assets/kb/app-help/screen-trending.md +3 -0
- package/dist/packages/mcp/assets/kb/app-help/screen-watchlist.md +3 -0
- package/dist/packages/mcp/assets/kb/app-help/standing-mandates.md +1 -1
- package/dist/packages/mcp/assets/kb/app-help/trade-ledger.md +54 -0
- package/dist/packages/mcp/assets/kb/app-help/use-local-model.md +38 -0
- package/dist/packages/mcp/assets/kb/docs/docs-agents-agent-paper-trading.md +4 -1
- package/dist/packages/mcp/assets/kb/docs/docs-agents-reading-your-trade-ledger.md +31 -0
- package/dist/packages/mcp/assets/kb/docs/docs-agents-untrusted-by-default.md +1 -1
- package/dist/packages/mcp/assets/kb/docs/docs-analyst-if-claude-is-missing.md +1 -1
- package/dist/packages/mcp/assets/kb/docs/docs-analyst-use-a-local-model-instead.md +27 -0
- package/dist/packages/mcp/assets/kb/docs/docs-analyst-what-it-sees.md +2 -0
- package/dist/packages/mcp/assets/kb/docs/docs-autotrade-backtests-and-their-limits.md +56 -0
- package/dist/packages/mcp/assets/kb/docs/docs-autotrade-change-a-strategy-by-chat.md +49 -0
- package/dist/packages/mcp/assets/kb/docs/docs-autotrade-checking-the-record-of-a-run.md +28 -0
- package/dist/packages/mcp/assets/kb/docs/docs-autotrade-comparing-them.md +41 -0
- package/dist/packages/mcp/assets/kb/docs/docs-autotrade-exits-and-wakes.md +76 -0
- package/dist/packages/mcp/assets/kb/docs/docs-autotrade-how-a-stop-reaches-the-runner.md +32 -0
- package/dist/packages/mcp/assets/kb/docs/docs-autotrade-on-the-q-screen.md +37 -0
- package/dist/packages/mcp/assets/kb/docs/docs-autotrade-one-strategy-or-all-of-them.md +35 -0
- package/dist/packages/mcp/assets/kb/docs/docs-autotrade-paper-accounts.md +50 -0
- package/dist/packages/mcp/assets/kb/docs/docs-autotrade-presets.md +37 -0
- package/dist/packages/mcp/assets/kb/docs/docs-autotrade-running-it-all-day.md +31 -0
- package/dist/packages/mcp/assets/kb/docs/docs-autotrade-sessions-and-their-limits.md +31 -0
- package/dist/packages/mcp/assets/kb/docs/docs-autotrade-several-strategies-at-once.md +33 -0
- package/dist/packages/mcp/assets/kb/docs/docs-autotrade-stopping-it.md +35 -0
- package/dist/packages/mcp/assets/kb/docs/docs-autotrade-strategies-and-presets.md +34 -0
- package/dist/packages/mcp/assets/kb/docs/docs-autotrade-the-autotrade-json-file.md +48 -0
- package/dist/packages/mcp/assets/kb/docs/docs-autotrade-the-heartbeat.md +27 -0
- package/dist/packages/mcp/assets/kb/docs/docs-autotrade-the-run-file-and-the-heartbeat.md +34 -0
- package/dist/packages/mcp/assets/kb/docs/docs-autotrade-the-runner-and-candidate-sessions.md +45 -0
- package/dist/packages/mcp/assets/kb/docs/docs-autotrade-what-each-session-shows-first.md +31 -0
- package/dist/packages/mcp/assets/kb/docs/docs-autotrade-what-it-costs-claude-usage-per-session.md +58 -0
- package/dist/packages/mcp/assets/kb/docs/docs-autotrade-what-it-is-paper-self-directed.md +43 -0
- package/dist/packages/mcp/assets/kb/docs/docs-autotrade-what-it-will-not-do.md +31 -0
- package/dist/packages/mcp/assets/kb/docs/docs-autotrade-which-account-day-caps-and-the-usage-guard.md +44 -0
- package/dist/packages/mcp/assets/kb/docs/docs-autotrade-your-strategies.md +37 -0
- package/dist/packages/mcp/assets/kb/docs/docs-autotrade.md +22 -0
- package/dist/packages/mcp/assets/kb/docs/docs-beginners-before-any-experimental-trading.md +2 -2
- package/dist/packages/mcp/assets/kb/docs/docs-beginners.md +1 -1
- package/dist/packages/mcp/assets/kb/docs/docs-configuration-chart-markers.md +30 -0
- package/dist/packages/mcp/assets/kb/docs/docs-configuration-chart-y-axis.md +1 -1
- package/dist/packages/mcp/assets/kb/docs/docs-configuration-environment-variables.md +4 -1
- package/dist/packages/mcp/assets/kb/docs/docs-configuration-files-on-disk.md +1 -0
- package/dist/packages/mcp/assets/kb/docs/docs-configuration-headless-recorder-dexterm-record.md +3 -1
- package/dist/packages/mcp/assets/kb/docs/docs-configuration-price-display-mode.md +8 -6
- package/dist/packages/mcp/assets/kb/docs/docs-copy-trading-stage-2-the-one-key-mirror-ticket-a-proposal.md +1 -1
- package/dist/packages/mcp/assets/kb/docs/docs-copy-trading-stage-3-capped-auto-mirror-default-off-less.md +1 -1
- package/dist/packages/mcp/assets/kb/docs/docs-copy-trading-what-is-proven-what-is-not.md +1 -1
- package/dist/packages/mcp/assets/kb/docs/docs-copy-trading.md +1 -1
- package/dist/packages/mcp/assets/kb/docs/docs-data-sources-recorded-history-and-retention.md +36 -0
- package/dist/packages/mcp/assets/kb/docs/docs-data-sources-sources.md +1 -0
- package/dist/packages/mcp/assets/kb/docs/docs-getting-started-first-run.md +1 -1
- package/dist/packages/mcp/assets/kb/docs/docs-getting-started-install.md +3 -3
- package/dist/packages/mcp/assets/kb/docs/docs-getting-started-requirements.md +1 -1
- package/dist/packages/mcp/assets/kb/docs/docs-getting-started.md +1 -1
- package/dist/packages/mcp/assets/kb/docs/docs-live-trading-changed-in-0-1-7.md +26 -0
- package/dist/packages/mcp/assets/kb/docs/docs-live-trading-stopping.md +28 -0
- package/dist/packages/mcp/assets/kb/docs/docs-live-trading-the-short-version.md +34 -0
- package/dist/packages/mcp/assets/kb/docs/docs-live-trading-using-a-trading-bot-with-dexterm.md +33 -0
- package/dist/packages/mcp/assets/kb/docs/docs-live-trading-what-dexterm-does-not-do.md +30 -0
- package/dist/packages/mcp/assets/kb/docs/docs-live-trading-what-dexterm-does.md +29 -0
- package/dist/packages/mcp/assets/kb/docs/docs-live-trading.md +23 -0
- package/dist/packages/mcp/assets/kb/docs/docs-ollama-another-machine.md +28 -0
- package/dist/packages/mcp/assets/kb/docs/docs-ollama-autotrade-on-a-local-model.md +29 -0
- package/dist/packages/mcp/assets/kb/docs/docs-ollama-check-your-model-dexterm-ai-probe.md +38 -0
- package/dist/packages/mcp/assets/kb/docs/docs-ollama-how-we-checked.md +27 -0
- package/dist/packages/mcp/assets/kb/docs/docs-ollama-models-without-tool-calling.md +32 -0
- package/dist/packages/mcp/assets/kb/docs/docs-ollama-pick-the-engine-globally-or-per-surface.md +43 -0
- package/dist/packages/mcp/assets/kb/docs/docs-ollama-restriction-profiles.md +35 -0
- package/dist/packages/mcp/assets/kb/docs/docs-ollama-set-it-up-in-two-minutes.md +39 -0
- package/dist/packages/mcp/assets/kb/docs/docs-ollama-troubleshooting.md +35 -0
- package/dist/packages/mcp/assets/kb/docs/docs-ollama-what-runs-on-a-local-model.md +39 -0
- package/dist/packages/mcp/assets/kb/docs/docs-ollama-what-stays-outside-the-model.md +36 -0
- package/dist/packages/mcp/assets/kb/docs/docs-ollama-which-model.md +38 -0
- package/dist/packages/mcp/assets/kb/docs/docs-ollama-your-own-agent-on-the-local-model.md +28 -0
- package/dist/packages/mcp/assets/kb/docs/docs-ollama.md +28 -0
- package/dist/packages/mcp/assets/kb/docs/docs-paper-trading-letting-an-agent-paper-trade-experimental.md +3 -4
- package/dist/packages/mcp/assets/kb/docs/docs-paper-trading-link-a-wallet-read-only.md +30 -0
- package/dist/packages/mcp/assets/kb/docs/docs-paper-trading-order-plans-and-standing-mandates.md +3 -4
- package/dist/packages/mcp/assets/kb/docs/docs-paper-trading-panic.md +4 -7
- package/dist/packages/mcp/assets/kb/docs/docs-paper-trading-paper-only-mandates.md +6 -7
- package/dist/packages/mcp/assets/kb/docs/docs-paper-trading-pnl-cards.md +7 -7
- package/dist/packages/mcp/assets/kb/docs/docs-paper-trading-the-safety-model.md +34 -0
- package/dist/packages/mcp/assets/kb/docs/docs-paper-trading-the-ticket.md +3 -4
- package/dist/packages/mcp/assets/kb/docs/docs-paper-trading-the-trade-ledger.md +42 -0
- package/dist/packages/mcp/assets/kb/docs/docs-paper-trading-the-wallet.md +4 -5
- package/dist/packages/mcp/assets/kb/docs/docs-paper-trading-trade-moments.md +4 -5
- package/dist/packages/mcp/assets/kb/docs/docs-paper-trading.md +4 -5
- package/dist/packages/mcp/assets/kb/docs/docs-popup-chart-buy-and-sell-markers.md +37 -0
- package/dist/packages/mcp/assets/kb/docs/docs-popup-chart-what-it-shows.md +2 -1
- package/dist/packages/mcp/assets/kb/docs/docs-screens-autotrade-paper.md +26 -0
- package/dist/packages/mcp/assets/kb/docs/docs-screens-order-plans.md +1 -1
- package/dist/packages/mcp/assets/kb/docs/docs-screens-token-screen.md +2 -0
- package/dist/packages/mcp/assets/kb/docs/docs-spectator-the-brain-view-and-the-pnl-chip.md +1 -1
- package/dist/packages/mcp/assets/kb/docs/docs-telegram-approve-one-tap-entries.md +50 -0
- package/dist/packages/mcp/assets/kb/docs/docs-telegram-control-the-commands.md +43 -0
- package/dist/packages/mcp/assets/kb/docs/docs-telegram-if-something-goes-wrong.md +30 -0
- package/dist/packages/mcp/assets/kb/docs/docs-telegram-notify-what-reaches-your-phone.md +41 -0
- package/dist/packages/mcp/assets/kb/docs/docs-telegram-set-it-up.md +47 -0
- package/dist/packages/mcp/assets/kb/docs/docs-telegram-the-record.md +26 -0
- package/dist/packages/mcp/assets/kb/docs/docs-telegram-what-it-is.md +33 -0
- package/dist/packages/mcp/assets/kb/docs/docs-telegram-what-it-will-not-do.md +31 -0
- package/dist/packages/mcp/assets/kb/docs/docs-telegram.md +23 -0
- package/dist/packages/mcp/assets/kb/docs/docs-troubleshooting-common-questions.md +1 -1
- package/dist/packages/mcp/assets/kb/docs/docs-troubleshooting-doctor-lines.md +4 -0
- package/dist/packages/mcp/assets/kb/docs/docs-voice-linux-and-windows.md +1 -1
- package/dist/packages/mcp/assets/kb/docs/docs-voice.md +1 -1
- package/dist/packages/mcp/assets/kb/docs/docs-yolo-1-replay-it-on-your-own-history.md +42 -0
- package/dist/packages/mcp/assets/kb/docs/docs-yolo-2-run-it-on-paper.md +34 -0
- package/dist/packages/mcp/assets/kb/docs/docs-yolo-3-watch-it-and-stop-it.md +32 -0
- package/dist/packages/mcp/assets/kb/docs/docs-yolo-the-rules.md +37 -0
- package/dist/packages/mcp/assets/kb/docs/docs-yolo-what-it-is.md +34 -0
- package/dist/packages/mcp/assets/kb/docs/docs-yolo-what-it-will-not-do.md +31 -0
- package/dist/packages/mcp/assets/kb/docs/docs-yolo.md +26 -0
- package/dist/packages/mcp/assets/kb/entries/autotrade.md +38 -0
- package/dist/packages/mcp/src/app-help.js +1 -1
- package/dist/packages/mcp/src/autotrade-tools.js +944 -0
- package/dist/packages/mcp/src/backtest-requests.js +71 -0
- package/dist/packages/mcp/src/engine/config.js +159 -0
- package/dist/packages/mcp/src/engine/index.js +10 -0
- package/dist/packages/mcp/src/engine/loop.js +101 -0
- package/dist/packages/mcp/src/engine/mcp-client.js +123 -0
- package/dist/packages/mcp/src/engine/ollama.js +258 -0
- package/dist/packages/mcp/src/engine/probe.js +110 -0
- package/dist/packages/mcp/src/engine/reason.js +35 -0
- package/dist/packages/mcp/src/engine/restrictions.js +111 -0
- package/dist/packages/mcp/src/index.js +7 -1
- package/dist/packages/mcp/src/ledger-tools.js +346 -0
- package/dist/packages/mcp/src/paper-agent.js +2 -0
- package/dist/packages/mcp/src/server.js +127 -19
- package/dist/packages/packs/src/backtest.js +3 -1
- package/dist/packages/popup/src/pages/chart-lib.js +134 -21
- package/dist/packages/popup/src/pages/chart.css +9 -0
- package/dist/packages/popup/src/pages/chart.html +3 -1
- package/dist/packages/popup/src/pages/chart.js +104 -7
- package/dist/packages/popup/src/protocol.js +2 -0
- package/dist/packages/popup/src/server.js +4 -0
- package/dist/packages/recorder/src/index.js +2 -0
- package/dist/packages/recorder/src/recorder.js +63 -6
- package/dist/packages/recorder/src/retention.js +100 -0
- package/dist/packages/recorder/src/schema.js +34 -1
- package/dist/packages/recorder/src/ticks.js +237 -0
- package/dist/packages/tui/src/index.js +1 -0
- package/dist/packages/tui/src/keymap.js +21 -1
- package/dist/packages/tui/src/markers.js +219 -0
- package/dist/packages/tui/src/widgets.js +149 -2
- package/package.json +2 -1
- package/dist/packages/data/src/trade/caps.js +0 -323
- package/dist/packages/data/src/trade/executor.js +0 -933
- package/dist/packages/data/src/trade/plans/executor-live.js +0 -220
- package/dist/packages/data/src/trade/rpc-exec.js +0 -229
- package/dist/packages/data/src/trade/signer/client.js +0 -197
- package/dist/packages/data/src/trade/signer/fast-wallet.js +0 -154
- package/dist/packages/data/src/trade/signer/host.js +0 -97
- package/dist/packages/data/src/trade/signer/main.js +0 -121
- package/dist/packages/data/src/trade/signer/probe-builder.js +0 -85
- package/dist/packages/data/src/trade/signer/protocol.js +0 -92
- package/dist/packages/data/src/trade/signer/service.js +0 -400
- package/dist/packages/data/src/trade/signer/sol-usd-feed.js +0 -98
- package/dist/packages/data/src/trade/sol-usd.js +0 -86
- package/dist/packages/data/src/trade/swap-build.js +0 -108
- package/dist/packages/data/src/trade/token-delta.js +0 -201
- package/dist/packages/data/vendor/solana-web3/LICENSE +0 -20
- package/dist/packages/data/vendor/solana-web3/NOTICE.md +0 -13
- package/dist/packages/data/vendor/solana-web3/index.iife.min.js +0 -20
- package/dist/packages/mcp/assets/kb/docs/docs-paper-trading-a-live-ticket.md +0 -42
- package/dist/packages/mcp/assets/kb/docs/docs-paper-trading-before-you-press-size-vs-caps.md +0 -34
- package/dist/packages/mcp/assets/kb/docs/docs-paper-trading-devnet-signer-mainnet-token.md +0 -35
- package/dist/packages/mcp/assets/kb/docs/docs-paper-trading-jupiter-rate-limits.md +0 -33
- package/dist/packages/mcp/assets/kb/docs/docs-paper-trading-link-a-wallet.md +0 -32
- package/dist/packages/mcp/assets/kb/docs/docs-paper-trading-live-trading-devnet-first.md +0 -30
- package/dist/packages/mcp/assets/kb/docs/docs-paper-trading-mainnet.md +0 -31
- package/dist/packages/mcp/assets/kb/docs/docs-paper-trading-the-live-fire-path-devnet-the-fast-wallet.md +0 -41
- package/dist/packages/mcp/assets/kb/docs/docs-paper-trading-the-signer-process.md +0 -34
- package/dist/packages/mcp/assets/kb/docs/docs-paper-trading-what-the-live-path-keeps.md +0 -37
- package/dist/packages/mcp/assets/kb/docs/docs-paper-trading-your-first-live-trade.md +0 -41
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
id: docs-paper-trading-a-live-ticket
|
|
3
|
-
title: Paper trading, live trading and the safety model › Live trading (devnet first) › A LIVE ticket
|
|
4
|
-
kind: docs
|
|
5
|
-
page: paper-trading
|
|
6
|
-
page_title: Paper trading, live trading and the safety model
|
|
7
|
-
heading: A LIVE ticket
|
|
8
|
-
anchor: a-live-ticket
|
|
9
|
-
url: https://dexterm.xyz/docs/paper-trading#a-live-ticket
|
|
10
|
-
tags:
|
|
11
|
-
- docs
|
|
12
|
-
- paper-trading
|
|
13
|
-
- live
|
|
14
|
-
- ticket
|
|
15
|
-
- trading
|
|
16
|
-
- devnet
|
|
17
|
-
- first
|
|
18
|
-
- paper
|
|
19
|
-
- safety
|
|
20
|
-
- model
|
|
21
|
-
confidence: high
|
|
22
|
-
owner: maintainers
|
|
23
|
-
origin: docs-generated
|
|
24
|
-
reviewed_by: generated@2026-10-16
|
|
25
|
-
generated_from: dexterm/site content/docs (task-1420)
|
|
26
|
-
sources:
|
|
27
|
-
- site/content/docs/paper-trading.md
|
|
28
|
-
date: 2026-10-16
|
|
29
|
-
---
|
|
30
|
-
|
|
31
|
-
`L` on a ticket flips it LIVE when a wallet is linked and the signer is alive (otherwise the ticket says why and stays PAPER). The header shows `◉ LIVE · DEVNET`, or `⚠ LIVE · MAINNET — REAL FUNDS` in red with the caps. `⏎` asks the signer for a **PLAN**:
|
|
32
|
-
|
|
33
|
-
1. **Quote** from Jupiter, bound to your order: the input and output mints, the mode and the exact input amount must match or the plan is refused (`quote-mismatch`).
|
|
34
|
-
2. **Build** the unsigned transaction; **decode** it with dexterm's own wire decoder (legacy and v0, lookup tables included).
|
|
35
|
-
3. **Policy**: every top-level instruction must fit the shape of a Jupiter swap: exactly one route-family instruction (by Anchor discriminator), token operations limited to SyncNative, InitializeAccount for your wallet and CloseAccount back to your wallet, a System transfer only into your own wrapped-SOL account that is synced and closed in the same transaction, associated-token creation only for your wallet. Transfers, burns, approvals, authority changes, direct DEX calls and unknown programs are refused by name.
|
|
36
|
-
4. **Binding**: the route's `in_amount`, `quoted_out_amount` and `slippage_bps` must equal the quote; the platform fee must be zero with the "none" sentinel account (dexterm takes no fee); the transfer authority must be your wallet; the source and destination must be your own associated token accounts for the two mints.
|
|
37
|
-
5. **Simulation** against the RPC, with your wallet **and your token accounts** in the requested post-state: the SOL leaving your wallet must not exceed the plan plus a fee allowance nor the SOL cap; a buy may not decrease any of your token balances; a sell may spend only the order mint's account and only up to the order amount (an address a lookup table loads counts as part of the transaction). If the balances cannot be read, the plan is refused rather than guessed.
|
|
38
|
-
6. **Price**: the SOL leg times the signer's own SOL/USD, never Jupiter's `swapUsdValue`; on mainnet an unknown or $0 price refuses.
|
|
39
|
-
|
|
40
|
-
The PLAN screen lists what will be signed instruction by instruction, what you pay and receive, the minimum received, the impact as a percent, the fee including any priority fee, the route, the simulation result, the SOL/USD price and its sources, the policy verdict and the caps verdict ("will be refused: …" when it would be).
|
|
41
|
-
|
|
42
|
-
`Y` (or `⏎`) is the keypress gate. The signer re-checks the caps, **reserves** the USD against the daily ledger (atomically, so two trades cannot both pass), opens the sign page, and hands the bytes to Phantom. What comes back must be the **same message** with a valid Ed25519 signature by the linked wallet; the only tolerated difference is a Lighthouse assertion tail appended by Phantom. The signed bytes are decoded, policy-checked and bound again, **re-simulated** with fresh token balances, and only then submitted. A transport error after the send keeps the charge and shows the signature with "do not resend"; a definite rejection before broadcast refunds. Plans are single-use and expire after 90 s.
|
package/dist/packages/mcp/assets/kb/docs/docs-paper-trading-before-you-press-size-vs-caps.md
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
id: docs-paper-trading-before-you-press-size-vs-caps
|
|
3
|
-
title: Paper trading, live trading and the safety model › Live trading (devnet first) › Before you press ⏎: size vs caps
|
|
4
|
-
kind: docs
|
|
5
|
-
page: paper-trading
|
|
6
|
-
page_title: Paper trading, live trading and the safety model
|
|
7
|
-
heading: Before you press ⏎: size vs caps
|
|
8
|
-
anchor: before-you-press-size-vs-caps
|
|
9
|
-
url: https://dexterm.xyz/docs/paper-trading#before-you-press-size-vs-caps
|
|
10
|
-
tags:
|
|
11
|
-
- docs
|
|
12
|
-
- paper-trading
|
|
13
|
-
- before
|
|
14
|
-
- press
|
|
15
|
-
- size
|
|
16
|
-
- caps
|
|
17
|
-
- live
|
|
18
|
-
- trading
|
|
19
|
-
- devnet
|
|
20
|
-
- first
|
|
21
|
-
- paper
|
|
22
|
-
- safety
|
|
23
|
-
- model
|
|
24
|
-
confidence: high
|
|
25
|
-
owner: maintainers
|
|
26
|
-
origin: docs-generated
|
|
27
|
-
reviewed_by: generated@2026-10-16
|
|
28
|
-
generated_from: dexterm/site content/docs (task-1420)
|
|
29
|
-
sources:
|
|
30
|
-
- site/content/docs/paper-trading.md
|
|
31
|
-
date: 2026-10-16
|
|
32
|
-
---
|
|
33
|
-
|
|
34
|
-
Since 2026-10-12 (`task-1368`) a LIVE buy ticket prices your size **at the signer's own SOL/USD** (the price its caps are enforced with) while you type, and shows it against the per-trade cap and what is left of the daily cap: `0.04 SOL ≈ $4.32 at SOL $108 · cap $5/trade · $20 left of $20 today`. When the size is over, the line turns red before you build anything: `0.05 SOL = $5.40 > $5 cap: use ≤ 0.043 SOL (f fits it; fees + token-account rent counted)`. `f` sets that size. The fit is the cap divided by the price minus 0.0025 SOL, rounded down to three decimals: the signer prices the *larger* of your planned SOL leg and the SOL the simulation actually moves out of the wallet, and a first buy of a token adds a token-account rent (0.00204 SOL) plus the fees on top of the size, so a size that is exactly the cap in USD would be refused at precheck. The daily remainder binds when it is smaller than the per-trade cap; with no SOL/USD from the signer the line says `$?` and the signer will refuse an unpriced trade on mainnet. The ticket's verdict is a preview; the signer still decides at precheck and again at confirm.
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
id: docs-paper-trading-devnet-signer-mainnet-token
|
|
3
|
-
title: Paper trading, live trading and the safety model › Live trading (devnet first) › Devnet signer, mainnet token
|
|
4
|
-
kind: docs
|
|
5
|
-
page: paper-trading
|
|
6
|
-
page_title: Paper trading, live trading and the safety model
|
|
7
|
-
heading: Devnet signer, mainnet token
|
|
8
|
-
anchor: devnet-signer-mainnet-token
|
|
9
|
-
url: https://dexterm.xyz/docs/paper-trading#devnet-signer-mainnet-token
|
|
10
|
-
tags:
|
|
11
|
-
- docs
|
|
12
|
-
- paper-trading
|
|
13
|
-
- devnet
|
|
14
|
-
- signer
|
|
15
|
-
- mainnet
|
|
16
|
-
- token
|
|
17
|
-
- live
|
|
18
|
-
- trading
|
|
19
|
-
- first
|
|
20
|
-
- paper
|
|
21
|
-
- safety
|
|
22
|
-
- model
|
|
23
|
-
confidence: high
|
|
24
|
-
owner: maintainers
|
|
25
|
-
origin: docs-generated
|
|
26
|
-
reviewed_by: generated@2026-10-16
|
|
27
|
-
generated_from: dexterm/site content/docs (task-1420)
|
|
28
|
-
sources:
|
|
29
|
-
- site/content/docs/paper-trading.md
|
|
30
|
-
date: 2026-10-16
|
|
31
|
-
---
|
|
32
|
-
|
|
33
|
-
Jupiter has no devnet. A Jupiter route is built on **mainnet state** (its accounts, address-lookup tables and blockhash), so a devnet signer can never simulate or fill a swap of a real token: the simulation fails with an RPC error such as `invalid transaction: Transaction loads an address table account that doesn't exist`, and the caps refuse it (`simulation-failed`). The ticket now says this **before** you press ⏎ on any token while the signer is on devnet (`DEVNET cannot fill mainnet tokens: paper trade (L) or restart with --mainnet (real funds, caps $5/$20)`), and when a simulation does fail the PLAN shows the **full** RPC error over several lines (it used to be cut to `invalid transaction: Tr…`) with a plain-English hint when the pattern is this mismatch; the signer also writes the full error to the app log. Your two options are exactly those: paper trade the token with `L`, or run `dexterm --mainnet` with a funded mainnet wallet inside the caps (next section). The devnet signing path itself is proven by the probe, which is built for devnet on purpose.
|
|
34
|
-
|
|
35
|
-
On **devnet** a Jupiter swap is refused at the caps step (`mainnet-not-enabled`): Jupiter has no devnet, so a real swap is a mainnet action. The signing path is proven on devnet instead by **`dexterm wallet probe`** (or `/wallet probe`): a transaction dexterm builds itself that wraps 0.001 SOL into your own wrapped-SOL account and closes it back, fees only, through exactly the same keypress → Phantom → verify → re-simulate → submit → confirm path, with its own policy (no route allowed) and never on mainnet.
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
id: docs-paper-trading-jupiter-rate-limits
|
|
3
|
-
title: Paper trading, live trading and the safety model › Live trading (devnet first) › Jupiter rate limits
|
|
4
|
-
kind: docs
|
|
5
|
-
page: paper-trading
|
|
6
|
-
page_title: Paper trading, live trading and the safety model
|
|
7
|
-
heading: Jupiter rate limits
|
|
8
|
-
anchor: jupiter-rate-limits
|
|
9
|
-
url: https://dexterm.xyz/docs/paper-trading#jupiter-rate-limits
|
|
10
|
-
tags:
|
|
11
|
-
- docs
|
|
12
|
-
- paper-trading
|
|
13
|
-
- jupiter
|
|
14
|
-
- rate
|
|
15
|
-
- limits
|
|
16
|
-
- live
|
|
17
|
-
- trading
|
|
18
|
-
- devnet
|
|
19
|
-
- first
|
|
20
|
-
- paper
|
|
21
|
-
- safety
|
|
22
|
-
- model
|
|
23
|
-
confidence: high
|
|
24
|
-
owner: maintainers
|
|
25
|
-
origin: docs-generated
|
|
26
|
-
reviewed_by: generated@2026-10-16
|
|
27
|
-
generated_from: dexterm/site content/docs (task-1420)
|
|
28
|
-
sources:
|
|
29
|
-
- site/content/docs/paper-trading.md
|
|
30
|
-
date: 2026-10-16
|
|
31
|
-
---
|
|
32
|
-
|
|
33
|
-
Jupiter's keyless API allows about five requests per ten seconds per IP, answers `429` with no `Retry-After` but with a reset time, and its alternate host (`lite-api.jup.ag`) can answer `503` (both recorded on 2026-10-12 and kept as fixtures). A limit used to kill the plan (`build-failed: HTTP 429`) and park the preview on "fetching…" for half a minute. Now every keyless Jupiter call on the trade path is retried on the **other host** after the server's own reset (or `Retry-After`, with a jittered backoff), at most three attempts inside ten seconds; a `5xx` or a dropped connection alternates the same way; the LIVE preview, the signer's re-quote and the build go through the signer's **one** rate limiter and a quote fetched for the preview is reused by the build a moment later (two calls, not three). When the budget is spent, or the data layer's health gate is cooling the source down after two 429s in a minute, the ticket **keeps the plan**: it shows `Jupiter is rate limiting this IP (429 from api.jup.ag), retrying in Ns`, retries by itself when the wait ends, `r` retries now and `esc` cancels. Nothing is built or signed while it waits.
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
id: docs-paper-trading-link-a-wallet
|
|
3
|
-
title: Paper trading, live trading and the safety model › Live trading (devnet first) › Link a wallet
|
|
4
|
-
kind: docs
|
|
5
|
-
page: paper-trading
|
|
6
|
-
page_title: Paper trading, live trading and the safety model
|
|
7
|
-
heading: Link a wallet
|
|
8
|
-
anchor: link-a-wallet
|
|
9
|
-
url: https://dexterm.xyz/docs/paper-trading#link-a-wallet
|
|
10
|
-
tags:
|
|
11
|
-
- docs
|
|
12
|
-
- paper-trading
|
|
13
|
-
- link
|
|
14
|
-
- wallet
|
|
15
|
-
- live
|
|
16
|
-
- trading
|
|
17
|
-
- devnet
|
|
18
|
-
- first
|
|
19
|
-
- paper
|
|
20
|
-
- safety
|
|
21
|
-
- model
|
|
22
|
-
confidence: high
|
|
23
|
-
owner: maintainers
|
|
24
|
-
origin: docs-generated
|
|
25
|
-
reviewed_by: generated@2026-10-16
|
|
26
|
-
generated_from: dexterm/site content/docs (task-1420)
|
|
27
|
-
sources:
|
|
28
|
-
- site/content/docs/paper-trading.md
|
|
29
|
-
date: 2026-10-16
|
|
30
|
-
---
|
|
31
|
-
|
|
32
|
-
`dexterm wallet link` (or `/wallet link` typed on the screener's `/` line or in the chat box) starts a one-shot server on `127.0.0.1:41291` (a fixed loopback port since `task-1368`; a random one only if it is busy, and the page then says so) with a single-use token, and opens your browser to it. The page asks Phantom to **connect** and **sign a message** (a dexterm nonce): no transaction, no approval of funds. The port is fixed because Phantom remembers which **origins** it trusts: link and every later sign page share `http://127.0.0.1:41291`, so after the first Connect prompt Phantom connects silently. dexterm verifies the Ed25519 proof and stores **only your public key** in `~/.dexterm/wallet-link.json`. `dexterm wallet status`, `unlink`, `/wallet`, `/wallet unlink` show or remove it. No private key, seed or password ever reaches dexterm; it has no code that could hold one.
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
id: docs-paper-trading-live-trading-devnet-first
|
|
3
|
-
title: Paper trading, live trading and the safety model › Live trading (devnet first)
|
|
4
|
-
kind: docs
|
|
5
|
-
page: paper-trading
|
|
6
|
-
page_title: Paper trading, live trading and the safety model
|
|
7
|
-
heading: Live trading (devnet first)
|
|
8
|
-
anchor: live-trading-devnet-first
|
|
9
|
-
url: https://dexterm.xyz/docs/paper-trading#live-trading-devnet-first
|
|
10
|
-
tags:
|
|
11
|
-
- docs
|
|
12
|
-
- paper-trading
|
|
13
|
-
- live
|
|
14
|
-
- trading
|
|
15
|
-
- devnet
|
|
16
|
-
- first
|
|
17
|
-
- paper
|
|
18
|
-
- safety
|
|
19
|
-
- model
|
|
20
|
-
confidence: high
|
|
21
|
-
owner: maintainers
|
|
22
|
-
origin: docs-generated
|
|
23
|
-
reviewed_by: generated@2026-10-16
|
|
24
|
-
generated_from: dexterm/site content/docs (task-1420)
|
|
25
|
-
sources:
|
|
26
|
-
- site/content/docs/paper-trading.md
|
|
27
|
-
date: 2026-10-16
|
|
28
|
-
---
|
|
29
|
-
|
|
30
|
-
**Status: in progress.** The code is on main and verified against fakes, a hand-built attack suite and a real recorded Jupiter transaction; the one thing not yet observed is a transaction signed by the real Phantom extension on devnet, which the maintainers' probe run will settle. Nothing here has touched mainnet.
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
id: docs-paper-trading-mainnet
|
|
3
|
-
title: Paper trading, live trading and the safety model › Live trading (devnet first) › Mainnet
|
|
4
|
-
kind: docs
|
|
5
|
-
page: paper-trading
|
|
6
|
-
page_title: Paper trading, live trading and the safety model
|
|
7
|
-
heading: Mainnet
|
|
8
|
-
anchor: mainnet
|
|
9
|
-
url: https://dexterm.xyz/docs/paper-trading#mainnet
|
|
10
|
-
tags:
|
|
11
|
-
- docs
|
|
12
|
-
- paper-trading
|
|
13
|
-
- mainnet
|
|
14
|
-
- live
|
|
15
|
-
- trading
|
|
16
|
-
- devnet
|
|
17
|
-
- first
|
|
18
|
-
- paper
|
|
19
|
-
- safety
|
|
20
|
-
- model
|
|
21
|
-
confidence: high
|
|
22
|
-
owner: maintainers
|
|
23
|
-
origin: docs-generated
|
|
24
|
-
reviewed_by: generated@2026-10-16
|
|
25
|
-
generated_from: dexterm/site content/docs (task-1420)
|
|
26
|
-
sources:
|
|
27
|
-
- site/content/docs/paper-trading.md
|
|
28
|
-
date: 2026-10-16
|
|
29
|
-
---
|
|
30
|
-
|
|
31
|
-
Only with `--mainnet`. The banner is red, the caps are $5 per trade and $20 per day by default (raise them only with the flag, never above $500 / $2000), 1 SOL out per transaction, 3% impact, 500 bps slippage. dexterm takes no fee; you pay network fees only. Nobody has run a mainnet trade through this path yet, and nothing on this page authorizes one.
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
id: docs-paper-trading-the-live-fire-path-devnet-the-fast-wallet
|
|
3
|
-
title: Paper trading, live trading and the safety model › Order plans and standing mandates › The live fire path (devnet, the fast wallet)
|
|
4
|
-
kind: docs
|
|
5
|
-
page: paper-trading
|
|
6
|
-
page_title: Paper trading, live trading and the safety model
|
|
7
|
-
heading: The live fire path (devnet, the fast wallet)
|
|
8
|
-
anchor: the-live-fire-path-devnet-the-fast-wallet
|
|
9
|
-
url: https://dexterm.xyz/docs/paper-trading#the-live-fire-path-devnet-the-fast-wallet
|
|
10
|
-
tags:
|
|
11
|
-
- docs
|
|
12
|
-
- paper-trading
|
|
13
|
-
- live
|
|
14
|
-
- fire
|
|
15
|
-
- path
|
|
16
|
-
- devnet
|
|
17
|
-
- fast
|
|
18
|
-
- wallet
|
|
19
|
-
- order
|
|
20
|
-
- plans
|
|
21
|
-
- standing
|
|
22
|
-
- mandates
|
|
23
|
-
- paper
|
|
24
|
-
- trading
|
|
25
|
-
confidence: high
|
|
26
|
-
owner: maintainers
|
|
27
|
-
origin: docs-generated
|
|
28
|
-
reviewed_by: generated@2026-10-16
|
|
29
|
-
generated_from: dexterm/site content/docs (task-1420)
|
|
30
|
-
sources:
|
|
31
|
-
- site/content/docs/paper-trading.md
|
|
32
|
-
date: 2026-10-16
|
|
33
|
-
---
|
|
34
|
-
|
|
35
|
-
A standing mandate is meant to fire at machine speed, which a Phantom approval per fill cannot do. So the live path uses a second, **capped fast wallet**: the one key dexterm ever holds, created only by `dexterm wallet fast create` after a real keypress on a TTY, stored at `~/.dexterm/fast-wallet.json` at mode 600, **devnet only** (the record says so, the signer process loads it only against a devnet RPC, and there is no mainnet variant, no export and no import). `dexterm wallet fast status` shows its public key and devnet balance, `dexterm wallet fast airdrop` asks the devnet faucet, `dexterm wallet fast remove` deletes it (refused while it still holds SOL unless `--force`). Your main wallet is never named by a mandate and the fast wallet never signs for it: the signer refuses either crossing before caps, reservation or signing.
|
|
36
|
-
|
|
37
|
-
`L` on the `O` screen raises the fire-path prompt; a held keypress switches plan fills from PAPER to **LIVE · DEVNET · fast wallet** (and back), journaled as `settings.executor`. The switch is refused by voice, an agent, a pipe or the popup (it takes nothing but a keypress), while any plan is armed or holding (its legs would strand on the other ledger), when the run has no signer process (replay, offline, `--no-live`), when the signer is not on devnet, or when no fast wallet is loaded. Every run starts on paper; the journal never recovers a live switch.
|
|
38
|
-
|
|
39
|
-
When an armed plan fires on the live path, the engine asks the signer to **build a devnet fill** for its leg. Jupiter has no devnet, so the transaction is the probe's wrap-and-unwrap shape sized to the plan's SOL leg (0.02 SOL for a $3 entry at $150/SOL), with an on-chain memo naming the plan leg; the signer decodes it, runs the probe-shape policy and the program allow-list, simulates it with the fast wallet's token balances, prices the SOL leg from its own SOL/USD feed and **enforces its USD per-trade and daily caps on devnet too** (a fill with no trustworthy price, or above the per-trade or remaining daily budget, is refused and the reason, `per-trade-cap`, `daily-cap`, `no-usd-value`, is what the plans journal records) plus a hard **0.05 SOL per-fill ceiling**. The confirm re-checks and reserves the USD, has the fast wallet sign, verifies the signature and the message, re-simulates the signed bytes, submits and confirms. The engine journals an intent before anything is sent, treats the send as in flight until the signer answers, settles it by lookup and never resends; an outcome the signer could not determine expires in the engine after 90 seconds as unseen (the fast wallet is capped, so exposure is bounded). The plan's **token leg is modelled** from the fire-time price, because no token changes hands on devnet, and the journal labels the fill `devnet-fill` with `modelledTokens: true`, the real signature and the real SOL delta (the fees). A mainnet fill through the fast wallet is refused by construction.
|
|
40
|
-
|
|
41
|
-
What is proven here, on fakes with the real decoder, the real Ed25519 signer and the real executor pipeline: a fill is built, signed by the fast wallet (Phantom is never asked), confirmed and booked with the USD ledger charged; the ceiling, a missing price, the per-trade cap and the daily cap each refuse before anything signs; a mainnet signer or a missing fast wallet refuses the build; a fast-lane plan confirmed with the main wallet's key, or a main-lane plan built for the fast wallet, is `signer-mismatch`; the whole path works over the real authenticated child-process channel; and the engine-side adapter turns the signer's answers into the journal rows above. What is not: a fill confirmed on devnet with real faucet SOL (the public faucet answered an internal error on the day), and any mainnet action.
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
id: docs-paper-trading-the-signer-process
|
|
3
|
-
title: Paper trading, live trading and the safety model › Live trading (devnet first) › The signer process
|
|
4
|
-
kind: docs
|
|
5
|
-
page: paper-trading
|
|
6
|
-
page_title: Paper trading, live trading and the safety model
|
|
7
|
-
heading: The signer process
|
|
8
|
-
anchor: the-signer-process
|
|
9
|
-
url: https://dexterm.xyz/docs/paper-trading#the-signer-process
|
|
10
|
-
tags:
|
|
11
|
-
- docs
|
|
12
|
-
- paper-trading
|
|
13
|
-
- signer
|
|
14
|
-
- process
|
|
15
|
-
- live
|
|
16
|
-
- trading
|
|
17
|
-
- devnet
|
|
18
|
-
- first
|
|
19
|
-
- paper
|
|
20
|
-
- safety
|
|
21
|
-
- model
|
|
22
|
-
confidence: high
|
|
23
|
-
owner: maintainers
|
|
24
|
-
origin: docs-generated
|
|
25
|
-
reviewed_by: generated@2026-10-16
|
|
26
|
-
generated_from: dexterm/site content/docs (task-1420)
|
|
27
|
-
sources:
|
|
28
|
-
- site/content/docs/paper-trading.md
|
|
29
|
-
date: 2026-10-16
|
|
30
|
-
---
|
|
31
|
-
|
|
32
|
-
The first LIVE action starts a **separate signer process** with exactly the caps flags you started dexterm with (`--max-usd`, `--daily-usd`, `--max-sol-out`, `--max-slippage-bps`, `--trade-rpc`, `--mainnet`). It talks to the terminal over an authenticated pipe whose only methods are `status · plan · probe · precheck · confirm · drop · panic`: there is no `sign(bytes)`, no `submit`, no `setCaps`, and no way to name a wallet other than the one in the signer's own link file. If the signer dies it is never respawned; LIVE stays off until you restart.
|
|
33
|
-
|
|
34
|
-
The signer owns: the caps and their hard ceilings; the **daily USD ledger** (SQLite, shared by every dexterm process on the machine, survives a restart); the **kill switch**; its own HTTP client for Jupiter and the RPC; its own **SOL/USD feed** (DexScreener and CoinGecko, timestamped, both required within 3% and under 60 s on mainnet); and the wallet bridge. The network it reports and caps by is classified from the RPC endpoint it actually talks to, by exact hostname, never from a flag or a label.
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
id: docs-paper-trading-what-the-live-path-keeps
|
|
3
|
-
title: Paper trading, live trading and the safety model › What the live path keeps
|
|
4
|
-
kind: docs
|
|
5
|
-
page: paper-trading
|
|
6
|
-
page_title: Paper trading, live trading and the safety model
|
|
7
|
-
heading: What the live path keeps
|
|
8
|
-
anchor: what-the-live-path-keeps
|
|
9
|
-
url: https://dexterm.xyz/docs/paper-trading#what-the-live-path-keeps
|
|
10
|
-
tags:
|
|
11
|
-
- docs
|
|
12
|
-
- paper-trading
|
|
13
|
-
- live
|
|
14
|
-
- path
|
|
15
|
-
- keeps
|
|
16
|
-
- paper
|
|
17
|
-
- trading
|
|
18
|
-
- safety
|
|
19
|
-
- model
|
|
20
|
-
confidence: high
|
|
21
|
-
owner: maintainers
|
|
22
|
-
origin: docs-generated
|
|
23
|
-
reviewed_by: generated@2026-10-16
|
|
24
|
-
generated_from: dexterm/site content/docs (task-1420)
|
|
25
|
-
sources:
|
|
26
|
-
- site/content/docs/paper-trading.md
|
|
27
|
-
date: 2026-10-16
|
|
28
|
-
---
|
|
29
|
-
|
|
30
|
-
These are the invariants from the spec; hold us to them:
|
|
31
|
-
|
|
32
|
-
1. **Non-custodial.** You hold the keys. dexterm builds, simulates and hands off; your wallet signs. The Phantom bridge stores only your public key.
|
|
33
|
-
2. **Keypress gate on by default.** Models and voice create proposals; arming needs a physical keypress or a wallet approval. Opting out, if ever offered, needs an explicit "this is less safe" confirmation, is local, logged and reversible, and the signer caps still apply.
|
|
34
|
-
3. **Caps live in the signer, not the UI.** The signer re-simulates and re-checks every transaction (per-trade and daily USD caps, price-impact and slippage ceilings, the SOL-out cap, the token-balance diff, a positive description of what a Jupiter swap looks like: exactly one route instruction bound to your order, no token transfers, burns or approvals to anyone) and refuses out of policy even if the UI, the model or a popup is compromised.
|
|
35
|
-
4. **The AI has no interface to the signer.** No build, sign or send tool exists for the model. Its write-shaped tools are paper only: `open_ticket` opens a PAPER ticket, and (from 0.1.5, only if you start `--agent-paper` on a mandate you armed) an agent you connected can use the `paper_*` tools to book the **simulated** ledger inside that mandate. A registry test enumerates every MCP tool and fails if any could reach a signing, sending or cap-changing path, and the paper path imports nothing signer-shaped. Even on a live-capable context the model's ticket yields a paper ticket and the signer is never called. The scan mode and the MCP server import nothing signer-shaped.
|
|
36
|
-
|
|
37
|
-
> warn: paper results are not predictive, and live results are real. Paper fills take the quote at its word; a real fill pays real slippage, priority fees and failed transactions, and most memecoins go to zero. Nothing here is financial advice.
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
id: docs-paper-trading-your-first-live-trade
|
|
3
|
-
title: Paper trading, live trading and the safety model › Live trading (devnet first) › Your first live trade
|
|
4
|
-
kind: docs
|
|
5
|
-
page: paper-trading
|
|
6
|
-
page_title: Paper trading, live trading and the safety model
|
|
7
|
-
heading: Your first live trade
|
|
8
|
-
anchor: your-first-live-trade
|
|
9
|
-
url: https://dexterm.xyz/docs/paper-trading#your-first-live-trade
|
|
10
|
-
tags:
|
|
11
|
-
- docs
|
|
12
|
-
- paper-trading
|
|
13
|
-
- first
|
|
14
|
-
- live
|
|
15
|
-
- trade
|
|
16
|
-
- trading
|
|
17
|
-
- devnet
|
|
18
|
-
- paper
|
|
19
|
-
- safety
|
|
20
|
-
- model
|
|
21
|
-
confidence: high
|
|
22
|
-
owner: maintainers
|
|
23
|
-
origin: docs-generated
|
|
24
|
-
reviewed_by: generated@2026-10-16
|
|
25
|
-
generated_from: dexterm/site content/docs (task-1420)
|
|
26
|
-
sources:
|
|
27
|
-
- site/content/docs/paper-trading.md
|
|
28
|
-
date: 2026-10-16
|
|
29
|
-
---
|
|
30
|
-
|
|
31
|
-
A walkthrough for one small, real swap inside the default caps. It is the path the verifier follows with a devnet signer (every step up to the confirm behaves the same, and the devnet wall above is where it stops) and on fixtures; nobody has yet run it to a mainnet fill, and nothing here is advice to.
|
|
32
|
-
|
|
33
|
-
1. **Link your wallet.** `dexterm wallet link` opens Phantom on a loopback page; connect and sign the nonce. `dexterm wallet status` shows the public key. dexterm never sees a key.
|
|
34
|
-
2. **Fund a small mainnet wallet.** Use a wallet that holds only what you are willing to lose plus fees: for a $5 trade at SOL $108 that is about 0.06 SOL (0.046 for the swap, the rest for the token-account rent of 0.00204 SOL, network and priority fees and a reserve). The per-trade cap is $5 and the daily cap $20 by default; the hard ceilings are $500 and $2000 and only `--mainnet` can raise anything.
|
|
35
|
-
3. **Start on mainnet with the caps you mean.** `dexterm --mainnet --max-usd 5` (add `--daily-usd 20`, `--max-sol-out 1`, `--max-slippage-bps 500` to be explicit). The ticket header turns red: `⚠ LIVE · MAINNET — REAL FUNDS · caps $5/trade $20/day`. The signer process starts on the first LIVE action with exactly these flags, classifies the network from the RPC it talks to, and needs two independent SOL/USD sources within 3% before it will price anything.
|
|
36
|
-
4. **Open a ticket and size it under the cap.** `B` on a token, `L` to flip LIVE, type a size; watch the cap line and press `f` if it is red (it sets the largest size that fits, fees and rent included). Slippage stays at 50 bps unless you change it; impact over 3% is refused.
|
|
37
|
-
5. **Build the plan.** `⏎`. If Jupiter rate-limits, the ticket waits and retries by itself (`r` now, `esc` cancels). The PLAN lists what will be signed, what you pay and receive, the minimum received, the fee, the route, the simulation result (how much SOL leaves your wallet), the SOL/USD price and its sources, and the caps verdict; `within caps` means the signer will not refuse it at this moment.
|
|
38
|
-
6. **Confirm.** `Y`. The signer re-checks the caps, reserves the USD on the daily ledger, opens the sign page. The page **connects first** (a Connect prompt the first time on this origin, silent after that), shows the connected account and refuses one that is not the linked wallet (`Phantom is on account … but dexterm linked …`), then asks Phantom to sign; approve in Phantom. If Phantom answers 4100 ("not authorized") the page says so and what to do: press Approve again and accept the Connect prompt, or allow `127.0.0.1:41291` under Phantom's Trusted apps, then confirm the trade again in dexterm; nothing was signed. The signed bytes must be the same message with your signature (a Lighthouse tail appended by Phantom is the one tolerated change); they are decoded, policy-checked, bound and re-simulated with fresh balances, then submitted and confirmed.
|
|
39
|
-
7. **Expected outcome.** `✓ LIVE MAINNET BUY confirmed — 0.0144 AVGOx @ 2.778 SOL · sig …` with the signature; the position appears under the chart marked live and on the positions screen under LIVE POSITIONS; the daily ledger shows the spend (`Caps … spent $4.32`). A refusal (`✗ REFUSED by the signer — per-trade-cap: …`) means nothing was signed or sent. `send-unknown` with a signature means the transaction may have been broadcast: check the explorer, do not resend.
|
|
40
|
-
8. **Panic key.** `/wallet panic` in the app or `dexterm wallet panic` from any shell disables live signing everywhere at once (kill-switch file, locked ledger, plans forgotten). `dexterm wallet resume` on a real TTY is the only way back.
|
|
41
|
-
9. **Read the journal.** `dexterm wallet status` shows the linked key, the signer's network and caps, today's spend and the panic state. Confirmed real fills live in `~/.dexterm/live-trades.sqlite` (the signer's own ledger, read by the positions screen); the daily USD reservations in the shared cap ledger `~/.dexterm/caps.sqlite`; the signer's log lines (including the full text of any failed simulation) go to the app log. Order plans, if you use them, append to `~/.dexterm/plans.journal`, which `dexterm plan journal --verify` recomputes.
|