dexterm-cli 0.2.1 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/dist/packages/autotrade/src/chat/connector.js +5 -4
  2. package/dist/packages/autotrade/src/chat/control.js +3 -0
  3. package/dist/packages/autotrade/src/chat/hub.js +37 -2
  4. package/dist/packages/autotrade/src/chat/index.js +3 -2
  5. package/dist/packages/autotrade/src/chat/readonly.js +530 -0
  6. package/dist/packages/autotrade/src/chat/service.js +12 -1
  7. package/dist/packages/autotrade/src/engine.js +75 -29
  8. package/dist/packages/autotrade/src/index.js +2 -0
  9. package/dist/packages/autotrade/src/runner.js +72 -14
  10. package/dist/packages/autotrade/src/store.js +1 -1
  11. package/dist/packages/autotrade/src/strategy.js +17 -0
  12. package/dist/packages/autotrade/src/tiers.js +194 -0
  13. package/dist/packages/classifier/src/config.js +90 -12
  14. package/dist/packages/classifier/src/index.js +1 -0
  15. package/dist/packages/classifier/src/win-acl.js +71 -0
  16. package/dist/packages/cli/src/app-help-gen.js +1 -1
  17. package/dist/packages/cli/src/autotrade-cmd/fleet.js +4 -2
  18. package/dist/packages/cli/src/autotrade-cmd/run.js +4 -2
  19. package/dist/packages/cli/src/autotrade-cmd/service.js +3 -1
  20. package/dist/packages/cli/src/autotrade-cmd/strategies.js +1 -1
  21. package/dist/packages/cli/src/autotrade-cmd/telegram-host.js +2 -0
  22. package/dist/packages/cli/src/classifier-cmd.js +16 -8
  23. package/dist/packages/cli/src/skill-eval-build.js +7 -2
  24. package/dist/packages/cli/src/version.js +1 -1
  25. package/dist/packages/mcp/assets/kb/app-help/autotrade-telegram.md +1 -1
  26. package/dist/packages/mcp/assets/kb/docs/docs-autotrade-confidence-tiers-experimental-unproven-paper-only.md +56 -0
  27. package/dist/packages/mcp/assets/kb/docs/docs-classifier-hosted-jev-with-your-own-key.md +3 -1
  28. package/dist/packages/mcp/assets/kb/docs/docs-getting-started-install.md +3 -3
  29. package/dist/packages/mcp/assets/kb/docs/docs-getting-started-requirements.md +1 -1
  30. package/dist/packages/mcp/assets/kb/docs/docs-narratives-where-to-find-it.md +1 -1
  31. package/dist/packages/mcp/assets/kb/docs/docs-telegram-read-only-data-check-top-and-signals-experimental.md +48 -0
  32. package/dist/packages/mcp/assets/kb/docs/docs-telegram-what-it-is.md +2 -0
  33. package/dist/packages/mcp/assets/kb/docs/docs-telegram-what-it-will-not-do.md +1 -1
  34. package/dist/packages/mcp/src/server.js +2 -1
  35. package/dist/packages/packs/src/skill-care.js +10 -2
  36. package/package.json +1 -1
@@ -0,0 +1,48 @@
1
+ ---
2
+ id: docs-telegram-read-only-data-check-top-and-signals-experimental
3
+ title: Telegram (your own bot) › Read-only data: /check, /top and /signals (experimental)
4
+ kind: docs
5
+ page: telegram
6
+ page_title: Telegram (your own bot)
7
+ heading: Read-only data: /check, /top and /signals (experimental)
8
+ anchor: read-only-data-check-top-and-signals-experimental
9
+ url: https://dexterm.xyz/docs/telegram#read-only-data-check-top-and-signals-experimental
10
+ tags:
11
+ - docs
12
+ - telegram
13
+ - read-only
14
+ - data
15
+ - check
16
+ - top
17
+ - signals
18
+ - experimental
19
+ - own
20
+ - bot
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/telegram.md
28
+ date: 2026-10-16
29
+ ---
30
+
31
+ Three commands that only **read**, for the account you paired, in its private chat. Read-only; dexterm never holds a key; not financial advice.
32
+
33
+ | command | what you get |
34
+ |---|---|
35
+ | `/check <CA>` | one coin by its mint address: the LARP score (https://dexterm.xyz/docs/larp) (0 to 100, the named flags behind it, and how far it could rise with the checks that could not be read), the risk facts (mint and freeze authority, top-10 holders, dev share, LP locked, rug score), market cap, liquidity, holders and the coin's age, each with the age of its data, and whether your runner holds the coin or has it as a candidate |
36
+ | `/top [N]` | the first N coins (default 5, at most 10) of the screener's trending list, your runner's own coins marked |
37
+ | `/signals [N]` | the last N signals (default 5, at most 20) your runner raised since the bot came on: screen matches, safety refusals, the drain guard, stuck bags, guards, halts and paper fills |
38
+
39
+ They need a runner on live data (`dexterm autotrade run <id> --paper`, or the always-on service). In a replay, or with no run, `/check` says there is no live data and `/top` falls back to your runner's own coins. The LARP score is evidence, not a verdict, and not a safety check.
40
+
41
+ What keeps them read-only:
42
+
43
+ - **No write path.** They are answered by a part of the bot that can only call three read tools (token data, the LARP check and the screener). It cannot reach `/pause`, `/kill`, `/flatten`, `/use`, an approval, an order, a signal or a limit, and it answers with text only: never a button.
44
+ - **Only your paired chat.** The same allowlist as `/status`: your account, in the private chat you paired it in, with the notify or control tier. Any other account, chat or group gets no answer and nothing is read.
45
+ - **Token text is data.** Names, symbols and descriptions come from the coin's creator. They pass through the same prompt firewall the analyst uses, and are shown quoted, in plain text: links, addresses, commands, mentions, bare domains, hashtags, cashtags and invisible or right-to-left characters are replaced or made inert. A mint is shown only after it checks out as an address, and only shortened (`abcd…wxyz`). No model reads these answers.
46
+ - **Short and clean.** One answer is at most 26 lines and 1,800 characters. Keys, file paths and your computer's host and login names never appear, also not inside an error from a data source.
47
+ - **Limited.** Five data requests a minute per chat (on top of the 10 commands a minute), one `/check` at a time. Over the limit the bot says so once, then stays quiet for the minute. `/kill` and `/pause` are never limited.
48
+ - **Honest about gaps.** A source that fails or does not answer in time is named ("could not be read", with the reason); nothing is filled in by a guess.
@@ -30,4 +30,6 @@ It does three things, each one a tier you grant when you pair:
30
30
  - **Control** (https://dexterm.xyz/docs/telegram#control-the-commands): `/status`, `/positions`, `/pause`, `/resume`, `/kill`, `/flatten`, `/strategies`, `/use` and `/approvals on`. Chat can always make things **safer** and never less safe.
31
31
  - **Approve** (https://dexterm.xyz/docs/telegram#approve-one-tap-entries): every new entry waits for your tap, with [Approve] [Half size] [Skip] buttons. Only a button approves; a typed message never does.
32
32
 
33
+ With the notify tier you can also ask for data: `/check <CA>`, `/top` and `/signals` (https://dexterm.xyz/docs/telegram#read-only-data-check-top-and-signals-experimental) (experimental). They only read.
34
+
33
35
  It runs on **paper**: an approved entry fills on the paper book, with no key, wallet or signer anywhere. This is also dexterm's part in live trading (https://dexterm.xyz/docs/live-trading): dexterm holds no key, and live trades happen in a separate Telegram trading bot of your choice, which holds its own wallet. dexterm sends the alerts and run control to your chat; in this version it does not place orders in that trading bot for you. In real mode (https://dexterm.xyz/docs/real-mode) (0.2.0, experimental) your chat also gets a LIVE TRADE FIRE copy of each signal, and the channels your executor reads are set up in the same file as this bot (`dexterm autotrade signal channels`; `dexterm telegram status` shows them). Experimental, not financial advice.
@@ -26,6 +26,6 @@ date: 2026-10-16
26
26
  - Run anywhere but your computer, or on a shared or hosted bot.
27
27
  - Post proposals to a group or a channel: approvals work only in your private chat, and relaying AI trade calls to an audience is something we tell you not to do.
28
28
  - Read a typed message as a trade, by a parser or by a model.
29
- - Make anything less safe from chat.
29
+ - Make anything less safe from chat, or change anything with `/check`, `/top` or `/signals`.
30
30
  - Hold or ask for your keys, seed phrase or wallet.
31
31
  - Place an order in a trading bot, or sign or send a transaction.
@@ -1429,13 +1429,14 @@ export class McpTools {
1429
1429
  default: return { error: `unknown tool ${name}` };
1430
1430
  }
1431
1431
  }
1432
- /** Close the read-only history handle (narrative_board). Safe to call when none was opened. */
1432
+ /** Close the read-only history handle (narrative_board, narratives). Safe to call when none was opened. */
1433
1433
  closeHistory() {
1434
1434
  try {
1435
1435
  this.narrativeDb?.close();
1436
1436
  }
1437
1437
  catch { /* ignore */ }
1438
1438
  this.narrativeDb = null;
1439
+ this.narratives = null; // task-2147: it held the closed handle; the next call reopens and rebuilds
1439
1440
  }
1440
1441
  }
1441
1442
  // ---------------------------------------------------------------------------
@@ -19,6 +19,14 @@ export const SKILL_CARE_SCHEMA = 'dexterm/packs/skill-care/1';
19
19
  export const DEFAULT_MIN_NEW_COINS = 150;
20
20
  /** Tolerance (absolute MCC) for calling the frozen canary "regressed" or "held". */
21
21
  export const DEFAULT_CANARY_NOISE = 0.05;
22
+ /**
23
+ * A split cutoff as ISO time for the split_rule text (task-1982). An empty split leaves the MAX_SAFE_INTEGER
24
+ * sentinel, which is outside the Date range: `toISOString()` would throw RangeError, so it reads as "none" instead.
25
+ */
26
+ export function cutoffIso(cutoff) {
27
+ const d = new Date(cutoff);
28
+ return Number.isNaN(d.getTime()) ? 'none (empty test split)' : d.toISOString();
29
+ }
22
30
  /**
23
31
  * Re-split an eval set so the NEWEST coins are a held-out TEST window the tuning never sees. By default (and
24
32
  * whenever `windowDays` is not given) the newest `testFrac` of coins by t0 are TEST (count-based, so TRAIN stays
@@ -31,14 +39,14 @@ export function rollingSplit(set, opts = {}) {
31
39
  if (opts.windowDays !== undefined) {
32
40
  const anchor = opts.anchor ?? set.rows.reduce((m, r) => Math.max(m, r.t0), 0);
33
41
  cutoff = anchor - opts.windowDays * 86_400_000;
34
- rule = `rolling window: coins with t0 in the newest ${opts.windowDays} day(s) (t0 ≥ ${new Date(cutoff).toISOString()}) are the held-out TEST window; never tuned on`;
42
+ rule = `rolling window: coins with t0 in the newest ${opts.windowDays} day(s) (t0 ≥ ${cutoffIso(cutoff)}) are the held-out TEST window; never tuned on`;
35
43
  }
36
44
  else {
37
45
  const frac = opts.testFrac ?? 0.3;
38
46
  const sorted = [...set.rows].sort((a, b) => a.t0 - b.t0);
39
47
  const idx = Math.min(sorted.length, Math.floor(sorted.length * (1 - frac)));
40
48
  cutoff = sorted[idx]?.t0 ?? Number.MAX_SAFE_INTEGER;
41
- rule = `rolling window: the newest ${Math.round(frac * 100)}% of coins by t0 (t0 ≥ ${new Date(cutoff).toISOString()}) are the held-out TEST window; never tuned on`;
49
+ rule = `rolling window: the newest ${Math.round(frac * 100)}% of coins by t0 (t0 ≥ ${cutoffIso(cutoff)}) are the held-out TEST window; never tuned on`;
42
50
  }
43
51
  const rows = set.rows.map((r) => ({ ...r, split: r.t0 >= cutoff ? 'test' : 'train' }));
44
52
  const train = rows.filter((r) => r.split === 'train');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dexterm-cli",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "mcpName": "io.github.dexterm-xyz/dexterm",
5
5
  "description": "dexterm: terminal DEX screener with a local Claude CLI analyst",
6
6
  "author": "The dexterm authors",