@osovv/vv-opencode 2.3.0-rc.7 → 2.3.0-rc.8
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/CHANGELOG.md +8 -0
- package/README.md +8 -4
- package/dist/cli.js +4 -2
- package/dist/cli.js.map +1 -1
- package/dist/commands/telegram-log.d.ts +12 -0
- package/dist/commands/telegram-log.js +54 -0
- package/dist/commands/telegram-log.js.map +1 -0
- package/dist/commands/telegram-status.d.ts +60 -0
- package/dist/commands/telegram-status.js +305 -0
- package/dist/commands/telegram-status.js.map +1 -0
- package/dist/commands/telegram.d.ts +2 -0
- package/dist/commands/telegram.js +32 -0
- package/dist/commands/telegram.js.map +1 -0
- package/dist/lib/vvoc-config.d.ts +7 -0
- package/dist/lib/vvoc-config.js +13 -0
- package/dist/lib/vvoc-config.js.map +1 -1
- package/dist/plugins/telegram/bot-api.d.ts +2 -2
- package/dist/plugins/telegram/bot-api.js +3 -6
- package/dist/plugins/telegram/bot-api.js.map +1 -1
- package/dist/plugins/telegram/commands.js +8 -20
- package/dist/plugins/telegram/commands.js.map +1 -1
- package/dist/plugins/telegram/config.d.ts +3 -0
- package/dist/plugins/telegram/config.js +5 -1
- package/dist/plugins/telegram/config.js.map +1 -1
- package/dist/plugins/telegram/delivery.d.ts +6 -0
- package/dist/plugins/telegram/delivery.js +26 -0
- package/dist/plugins/telegram/delivery.js.map +1 -1
- package/dist/plugins/telegram/index.js +12 -6
- package/dist/plugins/telegram/index.js.map +1 -1
- package/dist/plugins/telegram/log.d.ts +13 -0
- package/dist/plugins/telegram/log.js +70 -0
- package/dist/plugins/telegram/log.js.map +1 -0
- package/dist/plugins/telegram/sessions.d.ts +12 -4
- package/dist/plugins/telegram/sessions.js +92 -36
- package/dist/plugins/telegram/sessions.js.map +1 -1
- package/dist/plugins/telegram/topology.d.ts +14 -5
- package/dist/plugins/telegram/topology.js +63 -38
- package/dist/plugins/telegram/topology.js.map +1 -1
- package/dist/plugins/workflow/results.d.ts +15 -15
- package/package.json +1 -1
- package/schemas/vvoc/v3.json +7 -1
- package/templates/skills/vv-execute/references/tool-contracts.md +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
## 2.3.0-rc.8 (2026-10-07)
|
|
2
|
+
|
|
3
|
+
### Summary
|
|
4
|
+
|
|
5
|
+
This release fixes the Telegram bridge so it stays bounded and observable. Topics are now created only for top-level sessions, so child and helper sessions no longer spawn their own topics and instead render as cards in the parent topic. The topic surface is capped at a configurable maxTopics (default 20) most recent sessions, with evicted topics removed via deleteForumTopic, a method the Bot API supports in private chats, and their topic/session rows, mirrors, and outbox records purged so nothing later targets a dead thread. New top-level sessions are adopted immediately on session.created, the event pump now resubscribes and resyncs after a stream end instead of going silent, and a periodic resync keeps the surface current. Plugin diagnostics now append to a bounded log at $XDG_DATA_HOME/vvoc/telegram/telegram.log, and two new commands, vvoc telegram status and vvoc telegram log, report config/token/state/verdict and tail the log so operators can diagnose issues on any machine without reading server code, with the token never printed.
|
|
6
|
+
|
|
7
|
+
* feat(telegram): top-level-only topics, delete-based rotation, log, and status CLI ([59deaaa](https://github.com/osovv/vv-opencode/commit/59deaaa))
|
|
8
|
+
|
|
1
9
|
## 2.3.0-rc.7 (2026-10-05)
|
|
2
10
|
|
|
3
11
|
### Summary
|
package/README.md
CHANGED
|
@@ -696,14 +696,14 @@ Conservatively materialized by `vvoc sync`/`init`; `enforce` blocks only ERROR s
|
|
|
696
696
|
|
|
697
697
|
`TelegramBridgePlugin` runs a single-owner Telegram bot inside the OpenCode server process — no second process, no exposed ports. Enable forum topics for the bot in @BotFather first; the bridge uses the private chat between you and the bot only.
|
|
698
698
|
|
|
699
|
-
The layout is one Telegram DM topic per
|
|
699
|
+
The layout is one Telegram DM topic per **top-level** session, with a fixed **General** topic as the control lane. Child sessions and helper sessions — subagents, and the auto-title `vvoc title` session — never get a topic; their activity renders as a bounded card inside the parent topic. Topic titles carry a live status emoji (⚙️ running, 💤 idle, ❓ question, 🔐 permission, ‼️ error, ⏹ aborted) ahead of the session title. The surface is capped at General plus the `maxTopics` (default 20) most recent top-level sessions: when a newer session pushes an older one out, that topic is **deleted** — the Bot API rejects closing a topic in a private chat, so deletion is the only way to bound the surface, and the evicted thread and its history are removed. New sessions are adopted immediately on creation and a periodic reconcile keeps the surface in sync; `/sync` reconciles on demand.
|
|
700
700
|
|
|
701
701
|
Commands:
|
|
702
702
|
|
|
703
703
|
| Command | Where | What it does |
|
|
704
704
|
|---|---|---|
|
|
705
705
|
| `/new` | General | Pick a project from an inline list; the session is created with that project's default agent and gets its own topic |
|
|
706
|
-
| `/sync` | General | Idempotent reconciliation: create topics for
|
|
706
|
+
| `/sync` | General | Idempotent reconciliation: create topics for top-level sessions missing one, delete evicted ones, report counts |
|
|
707
707
|
| `/status` | General or session topic | Active sessions with context usage, or the current session's state |
|
|
708
708
|
| `/help` | anywhere | Command list |
|
|
709
709
|
| plain text | session topic | Prompt for that session; consecutive texts inside the merge window join into one prompt |
|
|
@@ -723,18 +723,22 @@ Configuration is an optional top-level section of `vvoc.json` (schema v3). The b
|
|
|
723
723
|
"botToken": "${TELEGRAM_BOT_TOKEN}",
|
|
724
724
|
"allowedUserIds": [123456789],
|
|
725
725
|
"activityWindowMinutes": 240,
|
|
726
|
+
"maxTopics": 20,
|
|
726
727
|
"apiRoot": "https://tg.example.com"
|
|
727
728
|
}
|
|
728
729
|
```
|
|
729
730
|
|
|
730
731
|
- `botToken` — a literal or `${VAR}` placeholder resolved from the OpenCode process environment at startup; an unset variable disables the gateway with a value-free diagnostic naming the variable. Prefer the environment or the global vvoc layer; never commit a token.
|
|
731
732
|
- `allowedUserIds` — the numeric Telegram user ids allowed to talk to the bot (get yours from @userinfobot). This is the entire access boundary: single owner, private chat, non-owner messages are ignored.
|
|
732
|
-
- `activityWindowMinutes` — how long a session
|
|
733
|
+
- `activityWindowMinutes` — how long a session counts as active after its last update (default 240).
|
|
734
|
+
- `maxTopics` — how many session topics stay live beside General (default 20, 1..100); older topics are deleted.
|
|
733
735
|
- `apiRoot` or `proxyUrl` — mutually exclusive connectivity modes for restricted corporate networks: a custom Bot API root behind your own reverse proxy, or an outbound proxy URL for `api.telegram.org`.
|
|
734
|
-
- `settings` — delivery defaults: `showReasoning` (default false), `showToolCalls` (default
|
|
736
|
+
- `settings` — delivery defaults: `showReasoning` (default false), `showToolCalls` (default true), `formatMode` (`markdown` default or `raw`), `codeFileMaxKb` (default 100; larger code blocks arrive as file documents), `mergeWindowMs` (default 1500).
|
|
735
737
|
|
|
736
738
|
Durable state (update offset, topic and session map, message mirror, pending finals, settings) lives in the OpenCode plugin storage, scoped to the plugin, and survives `opencode service restart`; a changed bot token resets the stored maps instead of reusing stale bindings. Assistant output streams through draft previews with a throttled edit fallback, finals are delivered exactly once per message across restarts, and all topics share one chat rate budget, so streaming is throttled adaptively. Telegram configuration changes require an OpenCode restart, like other runtime plugins; the `telegram` plugin toggle (`plugins["telegram"]`) is a kill-switch that registers nothing.
|
|
737
739
|
|
|
740
|
+
Diagnose the bridge without opening the server: `vvoc telegram status` reports the resolved toggle and section, a value-free disabled reason (including unresolved `${VAR}` names), live `getMe` token liveness, the bot fingerprint, the General topic id, topic/session/mirror counts, the update offset age, whether the config is newer than the last gateway boot, and a verdict (`--json` for machine output). The plugin also appends token-free diagnostics to `$XDG_DATA_HOME/vvoc/telegram/telegram.log`, readable with `vvoc telegram log [--lines N]` or `vvoc telegram log --path`.
|
|
741
|
+
|
|
738
742
|
### Web tools
|
|
739
743
|
|
|
740
744
|
`WebToolsPlugin` exposes exactly two canonical model-facing tools:
|
package/dist/cli.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
// START_MODULE_CONTRACT
|
|
5
5
|
// PURPOSE: Assemble and run the vvoc CLI entrypoint.
|
|
6
6
|
// SCOPE: Package version lookup, top-level command registration including the lint command, and main command execution.
|
|
7
|
-
// DEPENDS: [citty, src/commands/analytics.ts, src/commands/completion.ts, src/commands/config.ts, src/commands/doctor.ts, src/commands/guardian.ts, src/commands/init.ts, src/commands/install.ts, src/commands/launch.ts, src/commands/orchestration.ts, src/commands/lint.ts, src/commands/patch-provider.ts, src/commands/preset.ts, src/commands/plugin.ts, src/commands/role.ts, src/commands/status.ts, src/commands/sync.ts, src/commands/upgrade.ts, src/commands/version.ts, src/lib/package.ts]
|
|
7
|
+
// DEPENDS: [citty, src/commands/analytics.ts, src/commands/completion.ts, src/commands/config.ts, src/commands/doctor.ts, src/commands/guardian.ts, src/commands/init.ts, src/commands/install.ts, src/commands/launch.ts, src/commands/orchestration.ts, src/commands/lint.ts, src/commands/patch-provider.ts, src/commands/preset.ts, src/commands/plugin.ts, src/commands/role.ts, src/commands/status.ts, src/commands/sync.ts, src/commands/telegram.ts, src/commands/upgrade.ts, src/commands/version.ts, src/lib/package.ts]
|
|
8
8
|
// LINKS: [M-CLI-COMMANDS]
|
|
9
9
|
// ROLE: SCRIPT
|
|
10
10
|
// MAP_MODE: LOCALS
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
// END_MODULE_MAP
|
|
17
17
|
//
|
|
18
18
|
// START_CHANGE_SUMMARY
|
|
19
|
-
// LAST_CHANGE: [C-
|
|
19
|
+
// LAST_CHANGE: [C-TELEGRAM-TOPIC-HYGIENE T-008 - Registered the telegram command group in the CLI tree.]
|
|
20
20
|
// END_CHANGE_SUMMARY
|
|
21
21
|
import { defineCommand, runMain } from "citty";
|
|
22
22
|
import analytics from "./commands/analytics.js";
|
|
@@ -35,6 +35,7 @@ import plugin from "./commands/plugin.js";
|
|
|
35
35
|
import role from "./commands/role.js";
|
|
36
36
|
import status from "./commands/status.js";
|
|
37
37
|
import sync from "./commands/sync.js";
|
|
38
|
+
import telegram from "./commands/telegram.js";
|
|
38
39
|
import upgrade from "./commands/upgrade.js";
|
|
39
40
|
import version from "./commands/version.js";
|
|
40
41
|
import { getPackageVersion } from "./lib/package.js";
|
|
@@ -63,6 +64,7 @@ const main = defineCommand({
|
|
|
63
64
|
role,
|
|
64
65
|
status,
|
|
65
66
|
sync,
|
|
67
|
+
telegram,
|
|
66
68
|
upgrade,
|
|
67
69
|
version,
|
|
68
70
|
},
|
package/dist/cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AAEA,mBAAmB;AACnB,kBAAkB;AAClB,wBAAwB;AACxB,uDAAuD;AACvD,0HAA0H;AAC1H,
|
|
1
|
+
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AAEA,mBAAmB;AACnB,kBAAkB;AAClB,wBAAwB;AACxB,uDAAuD;AACvD,0HAA0H;AAC1H,sgBAAsgB;AACtgB,4BAA4B;AAC5B,iBAAiB;AACjB,qBAAqB;AACrB,sBAAsB;AACtB,EAAE;AACF,mBAAmB;AACnB,oEAAoE;AACpE,wCAAwC;AACxC,iBAAiB;AACjB,EAAE;AACF,uBAAuB;AACvB,2GAA2G;AAC3G,qBAAqB;AAErB,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAC/C,OAAO,SAAS,MAAM,yBAAyB,CAAC;AAChD,OAAO,UAAU,MAAM,0BAA0B,CAAC;AAClD,OAAO,MAAM,MAAM,sBAAsB,CAAC;AAC1C,OAAO,MAAM,MAAM,sBAAsB,CAAC;AAC1C,OAAO,QAAQ,MAAM,wBAAwB,CAAC;AAC9C,OAAO,IAAI,MAAM,oBAAoB,CAAC;AACtC,OAAO,OAAO,MAAM,uBAAuB,CAAC;AAC5C,OAAO,MAAM,MAAM,sBAAsB,CAAC;AAC1C,OAAO,IAAI,MAAM,oBAAoB,CAAC;AACtC,OAAO,aAAa,MAAM,6BAA6B,CAAC;AACxD,OAAO,aAAa,MAAM,8BAA8B,CAAC;AACzD,OAAO,MAAM,MAAM,sBAAsB,CAAC;AAC1C,OAAO,MAAM,MAAM,sBAAsB,CAAC;AAC1C,OAAO,IAAI,MAAM,oBAAoB,CAAC;AACtC,OAAO,MAAM,MAAM,sBAAsB,CAAC;AAC1C,OAAO,IAAI,MAAM,oBAAoB,CAAC;AACtC,OAAO,QAAQ,MAAM,wBAAwB,CAAC;AAC9C,OAAO,OAAO,MAAM,uBAAuB,CAAC;AAC5C,OAAO,OAAO,MAAM,uBAAuB,CAAC;AAC5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAErD,iCAAiC;AACjC,MAAM,cAAc,GAAG,MAAM,iBAAiB,EAAE,CAAC;AAEjD,MAAM,IAAI,GAAG,aAAa,CAAC;IACzB,IAAI,EAAE;QACJ,IAAI,EAAE,MAAM;QACZ,OAAO,EAAE,cAAc;QACvB,WAAW,EACT,+HAA+H;KAClI;IACD,WAAW,EAAE;QACX,SAAS;QACT,UAAU;QACV,MAAM;QACN,MAAM;QACN,QAAQ;QACR,IAAI;QACJ,OAAO;QACP,MAAM;QACN,IAAI;QACJ,aAAa;QACb,gBAAgB,EAAE,aAAa;QAC/B,MAAM;QACN,MAAM;QACN,IAAI;QACJ,MAAM;QACN,IAAI;QACJ,QAAQ;QACR,OAAO;QACP,OAAO;KACR;CACF,CAAC,CAAC;AACH,+BAA+B;AAE/B,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
declare const _default: import("citty").CommandDef<{
|
|
2
|
+
readonly lines: {
|
|
3
|
+
readonly type: "string";
|
|
4
|
+
readonly description: "Number of trailing lines to print (default 50).";
|
|
5
|
+
};
|
|
6
|
+
readonly path: {
|
|
7
|
+
readonly type: "boolean";
|
|
8
|
+
readonly default: false;
|
|
9
|
+
readonly description: "Print only the log file path.";
|
|
10
|
+
};
|
|
11
|
+
}>;
|
|
12
|
+
export default _default;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
// FILE: src/commands/telegram-log.ts
|
|
2
|
+
// VERSION: 1.0.0
|
|
3
|
+
// START_MODULE_CONTRACT
|
|
4
|
+
// PURPOSE: Print the tail of the vvoc Telegram plugin log, or its file path.
|
|
5
|
+
// SCOPE: Optional line-count parsing with a bounded default and a path-only flag over the bounded log reader.
|
|
6
|
+
// DEPENDS: [citty, src/plugins/telegram/log.ts]
|
|
7
|
+
// LINKS: [M-CLI-COMMANDS, M-PLUGIN-TELEGRAM-BRIDGE]
|
|
8
|
+
// ROLE: RUNTIME
|
|
9
|
+
// MAP_MODE: EXPORTS
|
|
10
|
+
// END_MODULE_CONTRACT
|
|
11
|
+
//
|
|
12
|
+
// START_MODULE_MAP
|
|
13
|
+
// default - The vvoc telegram log command definition.
|
|
14
|
+
// END_MODULE_MAP
|
|
15
|
+
//
|
|
16
|
+
// START_CHANGE_SUMMARY
|
|
17
|
+
// LAST_CHANGE: [C-TELEGRAM-TOPIC-HYGIENE T-008 - Added the vvoc telegram log command over the bounded plugin log.]
|
|
18
|
+
// END_CHANGE_SUMMARY
|
|
19
|
+
import { defineCommand } from "citty";
|
|
20
|
+
import { getTelegramLogPath, readTelegramLogTail } from "../plugins/telegram/log.js";
|
|
21
|
+
export default defineCommand({
|
|
22
|
+
meta: {
|
|
23
|
+
name: "log",
|
|
24
|
+
description: "Print the tail of the vvoc Telegram plugin log.",
|
|
25
|
+
},
|
|
26
|
+
args: {
|
|
27
|
+
lines: {
|
|
28
|
+
type: "string",
|
|
29
|
+
description: "Number of trailing lines to print (default 50).",
|
|
30
|
+
},
|
|
31
|
+
path: {
|
|
32
|
+
type: "boolean",
|
|
33
|
+
default: false,
|
|
34
|
+
description: "Print only the log file path.",
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
run({ args }) {
|
|
38
|
+
if (args.path === true) {
|
|
39
|
+
console.log(getTelegramLogPath());
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
const parsed = typeof args.lines === "string" ? Number.parseInt(args.lines, 10) : Number.NaN;
|
|
43
|
+
const lines = Number.isFinite(parsed) && parsed > 0 ? parsed : 50;
|
|
44
|
+
const tail = readTelegramLogTail(lines);
|
|
45
|
+
if (tail.length === 0) {
|
|
46
|
+
console.log(`(no log yet at ${getTelegramLogPath()})`);
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
for (const line of tail) {
|
|
50
|
+
console.log(line);
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
});
|
|
54
|
+
//# sourceMappingURL=telegram-log.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"telegram-log.js","sourceRoot":"","sources":["../../src/commands/telegram-log.ts"],"names":[],"mappings":"AAAA,qCAAqC;AACrC,iBAAiB;AACjB,wBAAwB;AACxB,+EAA+E;AAC/E,gHAAgH;AAChH,kDAAkD;AAClD,sDAAsD;AACtD,kBAAkB;AAClB,sBAAsB;AACtB,sBAAsB;AACtB,EAAE;AACF,mBAAmB;AACnB,wDAAwD;AACxD,iBAAiB;AACjB,EAAE;AACF,uBAAuB;AACvB,qHAAqH;AACrH,qBAAqB;AAErB,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAErF,eAAe,aAAa,CAAC;IAC3B,IAAI,EAAE;QACJ,IAAI,EAAE,KAAK;QACX,WAAW,EAAE,iDAAiD;KAC/D;IACD,IAAI,EAAE;QACJ,KAAK,EAAE;YACL,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,iDAAiD;SAC/D;QACD,IAAI,EAAE;YACJ,IAAI,EAAE,SAAS;YACf,OAAO,EAAE,KAAK;YACd,WAAW,EAAE,+BAA+B;SAC7C;KACF;IACD,GAAG,CAAC,EAAE,IAAI,EAAE;QACV,IAAI,IAAI,CAAC,IAAI,KAAK,IAAI,EAAE,CAAC;YACvB,OAAO,CAAC,GAAG,CAAC,kBAAkB,EAAE,CAAC,CAAC;YAClC,OAAO;QACT,CAAC;QACD,MAAM,MAAM,GAAG,OAAO,IAAI,CAAC,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC;QAC7F,MAAM,KAAK,GAAG,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC;QAClE,MAAM,IAAI,GAAG,mBAAmB,CAAC,KAAK,CAAC,CAAC;QACxC,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACtB,OAAO,CAAC,GAAG,CAAC,kBAAkB,kBAAkB,EAAE,GAAG,CAAC,CAAC;YACvD,OAAO;QACT,CAAC;QACD,KAAK,MAAM,IAAI,IAAI,IAAI,EAAE,CAAC;YACxB,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QACpB,CAAC;IACH,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/** Durable bridge state read from the OpenCode kv table. */
|
|
2
|
+
export type TelegramDurableState = {
|
|
3
|
+
readonly metaFound: boolean;
|
|
4
|
+
readonly generalThreadId: number | null;
|
|
5
|
+
readonly fingerprint: string | undefined;
|
|
6
|
+
readonly topics: number;
|
|
7
|
+
readonly sessions: number;
|
|
8
|
+
readonly mirrors: number;
|
|
9
|
+
readonly offset: number | null;
|
|
10
|
+
readonly offsetUpdatedAtMs: number | null;
|
|
11
|
+
readonly lastActivityMs: number | null;
|
|
12
|
+
};
|
|
13
|
+
/** Full status report rendered by the command. */
|
|
14
|
+
export type TelegramStatusReport = {
|
|
15
|
+
readonly toggleEnabled: boolean;
|
|
16
|
+
readonly enabled: boolean;
|
|
17
|
+
readonly reason: string | undefined;
|
|
18
|
+
readonly missingVars: readonly string[];
|
|
19
|
+
readonly fingerprint: string | undefined;
|
|
20
|
+
readonly tokenOk: boolean;
|
|
21
|
+
readonly botUsername: string | undefined;
|
|
22
|
+
readonly tokenError: string | undefined;
|
|
23
|
+
readonly state: TelegramDurableState;
|
|
24
|
+
readonly restartLikely: boolean;
|
|
25
|
+
readonly verdict: string;
|
|
26
|
+
};
|
|
27
|
+
type ProbeResult = {
|
|
28
|
+
readonly ok: boolean;
|
|
29
|
+
readonly username?: string;
|
|
30
|
+
readonly error?: string;
|
|
31
|
+
};
|
|
32
|
+
/** Injectable seams so the report is testable without network, database, or real tokens. */
|
|
33
|
+
export type TelegramStatusOptions = {
|
|
34
|
+
readonly cwd?: string;
|
|
35
|
+
readonly configDir?: string;
|
|
36
|
+
readonly env?: NodeJS.ProcessEnv;
|
|
37
|
+
readonly loadConfig?: () => Promise<{
|
|
38
|
+
plugins?: unknown;
|
|
39
|
+
telegram?: unknown;
|
|
40
|
+
}>;
|
|
41
|
+
readonly probeToken?: (token: string, apiRoot: string | undefined) => Promise<ProbeResult>;
|
|
42
|
+
readonly readState?: () => Promise<TelegramDurableState>;
|
|
43
|
+
readonly configMtimeMs?: number | undefined;
|
|
44
|
+
readonly logMtimeMs?: number | undefined;
|
|
45
|
+
};
|
|
46
|
+
export declare function collectTelegramStatus(options?: TelegramStatusOptions): Promise<TelegramStatusReport>;
|
|
47
|
+
/** Render a status report as human-readable lines. */
|
|
48
|
+
export declare function renderTelegramStatus(report: TelegramStatusReport): void;
|
|
49
|
+
declare const _default: import("citty").CommandDef<{
|
|
50
|
+
readonly json: {
|
|
51
|
+
readonly type: "boolean";
|
|
52
|
+
readonly default: false;
|
|
53
|
+
readonly description: "Emit the report as JSON.";
|
|
54
|
+
};
|
|
55
|
+
readonly "config-dir": {
|
|
56
|
+
readonly type: "string";
|
|
57
|
+
readonly description: "Override the global config home used for vvoc/ and opencode/.";
|
|
58
|
+
};
|
|
59
|
+
}>;
|
|
60
|
+
export default _default;
|
|
@@ -0,0 +1,305 @@
|
|
|
1
|
+
// FILE: src/commands/telegram-status.ts
|
|
2
|
+
// VERSION: 1.0.0
|
|
3
|
+
// START_MODULE_CONTRACT
|
|
4
|
+
// PURPOSE: Diagnose the vvoc Telegram bridge: resolved config and toggle, token liveness, bot fingerprint, durable topic and offset state, and a plain verdict.
|
|
5
|
+
// SCOPE: Effective vvoc config loading with an injectable seam, value-free disabled-cause reporting, a bounded getMe probe, best-effort OpenCode kv state reading, restart-likelihood heuristics, and text or JSON rendering; the token is never printed.
|
|
6
|
+
// DEPENDS: [citty, node:fs, bun:sqlite, src/lib/config-layers.ts, src/lib/plugin-toggle-config.ts, src/lib/vvoc-paths.ts, src/plugins/telegram/config.ts, src/plugins/telegram/log.ts]
|
|
7
|
+
// LINKS: [M-CLI-COMMANDS, M-TELEGRAM-CONFIG]
|
|
8
|
+
// ROLE: RUNTIME
|
|
9
|
+
// MAP_MODE: EXPORTS
|
|
10
|
+
// END_MODULE_CONTRACT
|
|
11
|
+
//
|
|
12
|
+
// START_MODULE_MAP
|
|
13
|
+
// TelegramDurableState - Durable bridge state read from the OpenCode kv table.
|
|
14
|
+
// TelegramStatusReport - Full status report rendered by the command.
|
|
15
|
+
// TelegramStatusOptions - Injectable seams for the status report.
|
|
16
|
+
// collectTelegramStatus - Build the report from injectable config, probe, and state seams.
|
|
17
|
+
// renderTelegramStatus - Render a report as human-readable lines.
|
|
18
|
+
// default - The vvoc telegram status command definition.
|
|
19
|
+
// END_MODULE_MAP
|
|
20
|
+
//
|
|
21
|
+
// START_CHANGE_SUMMARY
|
|
22
|
+
// LAST_CHANGE: [C-TELEGRAM-TOPIC-HYGIENE T-008 - Added the vvoc telegram status command for cross-machine diagnosis.]
|
|
23
|
+
// END_CHANGE_SUMMARY
|
|
24
|
+
import { defineCommand } from "citty";
|
|
25
|
+
import { existsSync, statSync } from "node:fs";
|
|
26
|
+
import { join } from "node:path";
|
|
27
|
+
import { loadEffectiveVvocConfig } from "../lib/config-layers.js";
|
|
28
|
+
import { isVvocPluginEnabled } from "../lib/plugin-toggle-config.js";
|
|
29
|
+
import { getDataHome, getGlobalVvocConfigPath } from "../lib/vvoc-paths.js";
|
|
30
|
+
import { resolveTelegramConfig, telegramBotFingerprint } from "../plugins/telegram/config.js";
|
|
31
|
+
import { getTelegramLogPath } from "../plugins/telegram/log.js";
|
|
32
|
+
const EMPTY_STATE = {
|
|
33
|
+
metaFound: false,
|
|
34
|
+
generalThreadId: null,
|
|
35
|
+
fingerprint: undefined,
|
|
36
|
+
topics: 0,
|
|
37
|
+
sessions: 0,
|
|
38
|
+
mirrors: 0,
|
|
39
|
+
offset: null,
|
|
40
|
+
offsetUpdatedAtMs: null,
|
|
41
|
+
lastActivityMs: null,
|
|
42
|
+
};
|
|
43
|
+
function mtimeMs(path) {
|
|
44
|
+
try {
|
|
45
|
+
return existsSync(path) ? statSync(path).mtimeMs : undefined;
|
|
46
|
+
}
|
|
47
|
+
catch {
|
|
48
|
+
return undefined;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
function numberField(record, key) {
|
|
52
|
+
const value = record[key];
|
|
53
|
+
return typeof value === "number" ? value : null;
|
|
54
|
+
}
|
|
55
|
+
function stringField(record, key) {
|
|
56
|
+
const value = record[key];
|
|
57
|
+
return typeof value === "string" && value.length > 0 ? value : undefined;
|
|
58
|
+
}
|
|
59
|
+
/** Read durable bridge state from the OpenCode kv table; any failure yields the empty state. */
|
|
60
|
+
async function readDurableState() {
|
|
61
|
+
try {
|
|
62
|
+
const dbPath = join(getDataHome(), "opencode", "opencode.db");
|
|
63
|
+
if (!existsSync(dbPath))
|
|
64
|
+
return EMPTY_STATE;
|
|
65
|
+
const { Database } = await import("bun:sqlite");
|
|
66
|
+
const db = new Database(dbPath, { readonly: true });
|
|
67
|
+
try {
|
|
68
|
+
const meta = db
|
|
69
|
+
.query("select key, value, time_updated from kv where key like '%:telegram/v1/meta' order by time_updated desc limit 1")
|
|
70
|
+
.get();
|
|
71
|
+
if (meta === null)
|
|
72
|
+
return EMPTY_STATE;
|
|
73
|
+
const metaKey = stringField(meta, "key");
|
|
74
|
+
if (metaKey === undefined)
|
|
75
|
+
return EMPTY_STATE;
|
|
76
|
+
const prefix = metaKey.slice(0, metaKey.length - "telegram/v1/meta".length);
|
|
77
|
+
const metaValue = (() => {
|
|
78
|
+
try {
|
|
79
|
+
return JSON.parse(String(meta.value));
|
|
80
|
+
}
|
|
81
|
+
catch {
|
|
82
|
+
return {};
|
|
83
|
+
}
|
|
84
|
+
})();
|
|
85
|
+
const count = (suffix) => {
|
|
86
|
+
const row = db
|
|
87
|
+
.query("select count(*) as n from kv where key like ?")
|
|
88
|
+
.get(`${prefix}telegram/v1/${suffix}/%`);
|
|
89
|
+
return typeof row?.n === "number" ? row.n : 0;
|
|
90
|
+
};
|
|
91
|
+
const offsetRow = db
|
|
92
|
+
.query("select value, time_updated from kv where key = ?")
|
|
93
|
+
.get(`${prefix}telegram/v1/offset`);
|
|
94
|
+
const activityRow = db
|
|
95
|
+
.query("select max(time_updated) as m from kv where key like ?")
|
|
96
|
+
.get(`${prefix}telegram/v1/%`);
|
|
97
|
+
const offsetValue = offsetRow === null ? null : Number(String(offsetRow.value));
|
|
98
|
+
return {
|
|
99
|
+
metaFound: true,
|
|
100
|
+
generalThreadId: numberField(metaValue, "generalThreadId"),
|
|
101
|
+
fingerprint: stringField(metaValue, "fingerprint"),
|
|
102
|
+
topics: count("topic"),
|
|
103
|
+
sessions: count("session"),
|
|
104
|
+
mirrors: count("mirror"),
|
|
105
|
+
offset: Number.isFinite(offsetValue) ? offsetValue : null,
|
|
106
|
+
offsetUpdatedAtMs: offsetRow === null ? null : numberField(offsetRow, "time_updated"),
|
|
107
|
+
lastActivityMs: activityRow === null ? null : numberField(activityRow, "m"),
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
finally {
|
|
111
|
+
db.close();
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
catch {
|
|
115
|
+
return EMPTY_STATE;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
/** Probe the token with getMe; every failure is normalized and the token is redacted. */
|
|
119
|
+
async function probeToken(token, apiRoot) {
|
|
120
|
+
const base = apiRoot !== undefined && apiRoot.trim().length > 0
|
|
121
|
+
? apiRoot.replace(/\/+$/, "")
|
|
122
|
+
: "https://api.telegram.org";
|
|
123
|
+
try {
|
|
124
|
+
const controller = new AbortController();
|
|
125
|
+
const timer = setTimeout(() => controller.abort(), 8_000);
|
|
126
|
+
let response;
|
|
127
|
+
try {
|
|
128
|
+
response = await fetch(`${base}/bot${token}/getMe`, { signal: controller.signal });
|
|
129
|
+
}
|
|
130
|
+
finally {
|
|
131
|
+
clearTimeout(timer);
|
|
132
|
+
}
|
|
133
|
+
const body = (await response.json().catch(() => undefined));
|
|
134
|
+
if (body?.ok === true && body.result !== undefined) {
|
|
135
|
+
return { ok: true, username: body.result.username };
|
|
136
|
+
}
|
|
137
|
+
return { ok: false, error: body?.description ?? `HTTP ${response.status}` };
|
|
138
|
+
}
|
|
139
|
+
catch (error) {
|
|
140
|
+
const raw = error instanceof Error ? error.message : "unreachable";
|
|
141
|
+
return { ok: false, error: raw.split(token).join("[redacted]") };
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
// START_CONTRACT: collectTelegramStatus
|
|
145
|
+
// PURPOSE: Build the Telegram status report from the effective config plus injectable probe and state seams.
|
|
146
|
+
// INPUTS: { options: TelegramStatusOptions - cwd, config dir, env, and injectable seams }
|
|
147
|
+
// OUTPUTS: { TelegramStatusReport - resolved causes, token probe, durable state, and verdict }
|
|
148
|
+
// SIDE_EFFECTS: reads the vvoc config, the OpenCode kv table, and optionally calls the Telegram API
|
|
149
|
+
// LINKS: M-CLI-COMMANDS, M-TELEGRAM-CONFIG
|
|
150
|
+
// END_CONTRACT: collectTelegramStatus
|
|
151
|
+
export async function collectTelegramStatus(options = {}) {
|
|
152
|
+
const env = options.env ?? process.env;
|
|
153
|
+
const loadConfig = options.loadConfig ??
|
|
154
|
+
(async () => (await loadEffectiveVvocConfig({ cwd: options.cwd, configDir: options.configDir })).config);
|
|
155
|
+
const probe = options.probeToken ?? probeToken;
|
|
156
|
+
const state = options.readState ?? readDurableState;
|
|
157
|
+
let config;
|
|
158
|
+
try {
|
|
159
|
+
config = await loadConfig();
|
|
160
|
+
}
|
|
161
|
+
catch (error) {
|
|
162
|
+
return {
|
|
163
|
+
toggleEnabled: false,
|
|
164
|
+
enabled: false,
|
|
165
|
+
reason: `config error: ${error instanceof Error ? error.message : "unreadable"}`,
|
|
166
|
+
missingVars: [],
|
|
167
|
+
fingerprint: undefined,
|
|
168
|
+
tokenOk: false,
|
|
169
|
+
botUsername: undefined,
|
|
170
|
+
tokenError: undefined,
|
|
171
|
+
state: EMPTY_STATE,
|
|
172
|
+
restartLikely: false,
|
|
173
|
+
verdict: "config could not be loaded",
|
|
174
|
+
};
|
|
175
|
+
}
|
|
176
|
+
const toggleEnabled = isVvocPluginEnabled(config, "telegram");
|
|
177
|
+
const resolved = resolveTelegramConfig(config.telegram, env);
|
|
178
|
+
const durable = await state();
|
|
179
|
+
const configMtime = options.configMtimeMs ?? mtimeMs(getGlobalVvocConfigPath(options.configDir));
|
|
180
|
+
const logMtime = options.logMtimeMs ?? mtimeMs(getTelegramLogPath());
|
|
181
|
+
const restartLikely = configMtime !== undefined && logMtime !== undefined && configMtime > logMtime;
|
|
182
|
+
if (!toggleEnabled) {
|
|
183
|
+
return {
|
|
184
|
+
toggleEnabled,
|
|
185
|
+
enabled: false,
|
|
186
|
+
reason: "toggle-disabled",
|
|
187
|
+
missingVars: [],
|
|
188
|
+
fingerprint: undefined,
|
|
189
|
+
tokenOk: false,
|
|
190
|
+
botUsername: undefined,
|
|
191
|
+
tokenError: undefined,
|
|
192
|
+
state: durable,
|
|
193
|
+
restartLikely,
|
|
194
|
+
verdict: "plugins.telegram is false: the gateway registers nothing",
|
|
195
|
+
};
|
|
196
|
+
}
|
|
197
|
+
if (!resolved.enabled) {
|
|
198
|
+
const suffix = resolved.missingVars.length > 0 ? ` (missing: ${resolved.missingVars.join(", ")})` : "";
|
|
199
|
+
return {
|
|
200
|
+
toggleEnabled,
|
|
201
|
+
enabled: false,
|
|
202
|
+
reason: resolved.reason,
|
|
203
|
+
missingVars: resolved.missingVars,
|
|
204
|
+
fingerprint: undefined,
|
|
205
|
+
tokenOk: false,
|
|
206
|
+
botUsername: undefined,
|
|
207
|
+
tokenError: undefined,
|
|
208
|
+
state: durable,
|
|
209
|
+
restartLikely,
|
|
210
|
+
verdict: `gateway disabled — ${resolved.reason}${suffix}`,
|
|
211
|
+
};
|
|
212
|
+
}
|
|
213
|
+
const fingerprint = telegramBotFingerprint(resolved.botToken);
|
|
214
|
+
const probed = await probe(resolved.botToken, resolved.apiRoot);
|
|
215
|
+
const verdict = (() => {
|
|
216
|
+
if (!probed.ok)
|
|
217
|
+
return `token probe failed: ${probed.error ?? "unknown error"}`;
|
|
218
|
+
if (!durable.metaFound)
|
|
219
|
+
return "token is valid but no durable state exists yet (the gateway may not have booted)";
|
|
220
|
+
if (durable.fingerprint !== undefined && durable.fingerprint !== fingerprint) {
|
|
221
|
+
return "stored state belongs to a different token: it resets on the next boot";
|
|
222
|
+
}
|
|
223
|
+
if (restartLikely)
|
|
224
|
+
return "config changed after the last gateway boot: restart OpenCode to apply";
|
|
225
|
+
if (durable.offsetUpdatedAtMs !== null &&
|
|
226
|
+
Date.now() - durable.offsetUpdatedAtMs > 15 * 60_000) {
|
|
227
|
+
return "polling looks stale: the update offset has not advanced for over 15 minutes";
|
|
228
|
+
}
|
|
229
|
+
return "healthy";
|
|
230
|
+
})();
|
|
231
|
+
return {
|
|
232
|
+
toggleEnabled,
|
|
233
|
+
enabled: true,
|
|
234
|
+
reason: undefined,
|
|
235
|
+
missingVars: [],
|
|
236
|
+
fingerprint,
|
|
237
|
+
tokenOk: probed.ok,
|
|
238
|
+
botUsername: probed.username,
|
|
239
|
+
tokenError: probed.error,
|
|
240
|
+
state: durable,
|
|
241
|
+
restartLikely,
|
|
242
|
+
verdict,
|
|
243
|
+
};
|
|
244
|
+
}
|
|
245
|
+
function ageLabel(ms) {
|
|
246
|
+
if (ms === null)
|
|
247
|
+
return "never";
|
|
248
|
+
const delta = Date.now() - ms;
|
|
249
|
+
if (delta < 60_000)
|
|
250
|
+
return `${Math.max(0, Math.round(delta / 1000))}s ago`;
|
|
251
|
+
if (delta < 3_600_000)
|
|
252
|
+
return `${Math.round(delta / 60_000)}m ago`;
|
|
253
|
+
return `${Math.round(delta / 3_600_000)}h ago`;
|
|
254
|
+
}
|
|
255
|
+
/** Render a status report as human-readable lines. */
|
|
256
|
+
export function renderTelegramStatus(report) {
|
|
257
|
+
console.log("vvoc Telegram bridge status");
|
|
258
|
+
console.log(` plugin toggle: ${report.toggleEnabled ? "enabled" : "disabled"}`);
|
|
259
|
+
console.log(` gateway: ${report.enabled ? "enabled" : `disabled (${report.reason ?? "unknown"})`}`);
|
|
260
|
+
if (report.missingVars.length > 0) {
|
|
261
|
+
console.log(` unresolved vars: ${report.missingVars.join(", ")}`);
|
|
262
|
+
}
|
|
263
|
+
if (report.fingerprint !== undefined) {
|
|
264
|
+
console.log(` bot fingerprint: ${report.fingerprint}`);
|
|
265
|
+
}
|
|
266
|
+
if (report.enabled) {
|
|
267
|
+
console.log(` token probe: ${report.tokenOk ? `ok${report.botUsername ? ` (@${report.botUsername})` : ""}` : `failed (${report.tokenError ?? "unknown"})`}`);
|
|
268
|
+
console.log(` General topic: ${report.state.generalThreadId ?? "unknown"}`);
|
|
269
|
+
console.log(` surface: ${report.state.topics} topics, ${report.state.sessions} sessions, ${report.state.mirrors} mirrors`);
|
|
270
|
+
console.log(` update offset: ${report.state.offset ?? "none"} (${ageLabel(report.state.offsetUpdatedAtMs)})`);
|
|
271
|
+
console.log(` last activity: ${ageLabel(report.state.lastActivityMs)}`);
|
|
272
|
+
}
|
|
273
|
+
if (report.restartLikely) {
|
|
274
|
+
console.log(" restart: config is newer than the last gateway boot");
|
|
275
|
+
}
|
|
276
|
+
console.log(` verdict: ${report.verdict}`);
|
|
277
|
+
}
|
|
278
|
+
export default defineCommand({
|
|
279
|
+
meta: {
|
|
280
|
+
name: "status",
|
|
281
|
+
description: "Show the vvoc Telegram bridge configuration, token, and durable gateway state.",
|
|
282
|
+
},
|
|
283
|
+
args: {
|
|
284
|
+
json: {
|
|
285
|
+
type: "boolean",
|
|
286
|
+
default: false,
|
|
287
|
+
description: "Emit the report as JSON.",
|
|
288
|
+
},
|
|
289
|
+
"config-dir": {
|
|
290
|
+
type: "string",
|
|
291
|
+
description: "Override the global config home used for vvoc/ and opencode/.",
|
|
292
|
+
},
|
|
293
|
+
},
|
|
294
|
+
async run({ args }) {
|
|
295
|
+
const report = await collectTelegramStatus({
|
|
296
|
+
configDir: typeof args["config-dir"] === "string" ? args["config-dir"] : undefined,
|
|
297
|
+
});
|
|
298
|
+
if (args.json === true) {
|
|
299
|
+
console.log(JSON.stringify(report, null, 2));
|
|
300
|
+
return;
|
|
301
|
+
}
|
|
302
|
+
renderTelegramStatus(report);
|
|
303
|
+
},
|
|
304
|
+
});
|
|
305
|
+
//# sourceMappingURL=telegram-status.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"telegram-status.js","sourceRoot":"","sources":["../../src/commands/telegram-status.ts"],"names":[],"mappings":"AAAA,wCAAwC;AACxC,iBAAiB;AACjB,wBAAwB;AACxB,kKAAkK;AAClK,4PAA4P;AAC5P,yLAAyL;AACzL,+CAA+C;AAC/C,kBAAkB;AAClB,sBAAsB;AACtB,sBAAsB;AACtB,EAAE;AACF,mBAAmB;AACnB,iFAAiF;AACjF,uEAAuE;AACvE,oEAAoE;AACpE,6FAA6F;AAC7F,oEAAoE;AACpE,2DAA2D;AAC3D,iBAAiB;AACjB,EAAE;AACF,uBAAuB;AACvB,wHAAwH;AACxH,qBAAqB;AAErB,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,C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WAAW,EAAE,0BAA0B;SACxC;QACD,YAAY,EAAE;YACZ,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,+DAA+D;SAC7E;KACF;IACD,KAAK,CAAC,GAAG,CAAC,EAAE,IAAI,EAAE;QAChB,MAAM,MAAM,GAAG,MAAM,qBAAqB,CAAC;YACzC,SAAS,EAAE,OAAO,IAAI,CAAC,YAAY,CAAC,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,SAAS;SACnF,CAAC,CAAC;QACH,IAAI,IAAI,CAAC,IAAI,KAAK,IAAI,EAAE,CAAC;YACvB,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;YAC7C,OAAO;QACT,CAAC;QACD,oBAAoB,CAAC,MAAM,CAAC,CAAC;IAC/B,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
// FILE: src/commands/telegram.ts
|
|
2
|
+
// VERSION: 1.0.0
|
|
3
|
+
// START_MODULE_CONTRACT
|
|
4
|
+
// PURPOSE: Group Telegram bridge subcommands (status, log) under the vvoc telegram parent command.
|
|
5
|
+
// SCOPE: Parent command definition and subcommand wiring.
|
|
6
|
+
// DEPENDS: [citty, src/commands/telegram-status.js, src/commands/telegram-log.js]
|
|
7
|
+
// LINKS: [M-CLI-COMMANDS]
|
|
8
|
+
// ROLE: RUNTIME
|
|
9
|
+
// MAP_MODE: EXPORTS
|
|
10
|
+
// END_MODULE_CONTRACT
|
|
11
|
+
//
|
|
12
|
+
// START_MODULE_MAP
|
|
13
|
+
// default - Telegram parent command grouping bridge subcommands.
|
|
14
|
+
// END_MODULE_MAP
|
|
15
|
+
//
|
|
16
|
+
// START_CHANGE_SUMMARY
|
|
17
|
+
// LAST_CHANGE: [C-TELEGRAM-TOPIC-HYGIENE T-008 - Created the telegram parent command for status and log.]
|
|
18
|
+
// END_CHANGE_SUMMARY
|
|
19
|
+
import { defineCommand } from "citty";
|
|
20
|
+
import statusCommand from "./telegram-status.js";
|
|
21
|
+
import logCommand from "./telegram-log.js";
|
|
22
|
+
export default defineCommand({
|
|
23
|
+
meta: {
|
|
24
|
+
name: "telegram",
|
|
25
|
+
description: "Telegram bridge commands.",
|
|
26
|
+
},
|
|
27
|
+
subCommands: {
|
|
28
|
+
status: statusCommand,
|
|
29
|
+
log: logCommand,
|
|
30
|
+
},
|
|
31
|
+
});
|
|
32
|
+
//# sourceMappingURL=telegram.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"telegram.js","sourceRoot":"","sources":["../../src/commands/telegram.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,iBAAiB;AACjB,wBAAwB;AACxB,qGAAqG;AACrG,4DAA4D;AAC5D,oFAAoF;AACpF,4BAA4B;AAC5B,kBAAkB;AAClB,sBAAsB;AACtB,sBAAsB;AACtB,EAAE;AACF,mBAAmB;AACnB,mEAAmE;AACnE,iBAAiB;AACjB,EAAE;AACF,uBAAuB;AACvB,4GAA4G;AAC5G,qBAAqB;AAErB,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,aAAa,MAAM,sBAAsB,CAAC;AACjD,OAAO,UAAU,MAAM,mBAAmB,CAAC;AAE3C,eAAe,aAAa,CAAC;IAC3B,IAAI,EAAE;QACJ,IAAI,EAAE,UAAU;QAChB,WAAW,EAAE,2BAA2B;KACzC;IACD,WAAW,EAAE;QACX,MAAM,EAAE,aAAa;QACrB,GAAG,EAAE,UAAU;KAChB;CACF,CAAC,CAAC"}
|
|
@@ -92,6 +92,7 @@ export type VvocTelegramConfig = {
|
|
|
92
92
|
botToken: string;
|
|
93
93
|
allowedUserIds: number[];
|
|
94
94
|
activityWindowMinutes?: number;
|
|
95
|
+
maxTopics?: number;
|
|
95
96
|
apiRoot?: string;
|
|
96
97
|
proxyUrl?: string;
|
|
97
98
|
settings?: VvocTelegramSettings;
|
|
@@ -649,6 +650,12 @@ export declare const VVOC_CONFIG_SCHEMA: {
|
|
|
649
650
|
minimum: number;
|
|
650
651
|
description: string;
|
|
651
652
|
};
|
|
653
|
+
maxTopics: {
|
|
654
|
+
type: string;
|
|
655
|
+
minimum: number;
|
|
656
|
+
maximum: number;
|
|
657
|
+
description: string;
|
|
658
|
+
};
|
|
652
659
|
apiRoot: {
|
|
653
660
|
type: string;
|
|
654
661
|
minLength: number;
|