Invoice-Downloader
EthanYoQ
电子发票整理与报销准备工具:从邮箱批量收集 PDF/OFD/XML 发票,OCR 识别、分类归档并生成 Excel 汇总;提供 Windows/macOS 桌面版与 DSH 插件。
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:vladtsvirko/dsh-telegram-connector
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
Drive a DeepSeek Harness runtime from Telegram — same workspaces, same sessions, same tools as the web UI, from your phone.
One forum topic per session, grouped by workspace. A group may host one
workspace or several; a shared group names every session topic
[Workspace] title, and that prefix is what routes an empty topic. A session
started in the browser can be adopted as a topic with its history (/sync); a
session started from the phone is the same session in the browser. There is no
shadow store of conversations: Telegram is a projection of the harness.
private chat with the bot control plane: workspaces, links, status
group "web-app" one workspace
├── General (or your /dashboard topic) dashboard: /new, /sync, session admin
├── session-9cb8… one session
└── session-2f41… one session
group "landing-page" another workspace
└── …
group "agency" two workspaces share the group
├── General group dashboard: /new <workspace>, /sync, /unbind
├── [web-app] session-9cb8… one workspace's session
└── [landing-page] session-2f41… another workspace's session
The full command reference is docs/COMMANDS.md — the bot's
/help <command> prints the same text, and every command accepts --help. The reasoning
behind the mapping is in docs/DESIGN.md; supported DSH
versions are in COMPATIBILITY.md.
/new. Topics are never silently re-assigned./bind (or another startgroup link)
adds a workspace; existing topics gain their [Workspace] prefixes, and
/sync adopts every active session in every attached workspace. Archived
sessions are skipped./sync adopts sessions created in the web UI,
creates a topic for each and replays the tail of the conversation. Renaming
round-trips both ways, and closing a topic archives its session. Archiving
from the web UI is not mirrored: run /close for that./reactions (Telegram's fixed reaction set is validated).Forwarded from …
context turn; forwarded rich messages are read from rich_message.blocks, and
a reply to a forwarded message also records its origin in the reference block.processMode: live is the default: one card is edited while the turn
runs and collapses to a summary at the end. summary sends only the collapsed
summary; off hides process rows. Web-UI sessions follow the same mode./commands and /skills read the live
registries; /<name> loads a user-invocable skill, so commands and skills from
newly installed plugins work without a connector release. /run bypasses a
connector name collision and /skill forces a skill./commands@bot works, and
//text sends a prompt that starts with /. Media sent with a skill is
attached to that turn; media sent with a command is staged for the next
prompt, because commands do not take attachments.telegram-rich-text). Headings, lists, details,
math, footnotes and <tg-time> render natively; tables are converted to a
code block or a bullet list on the way out (see above)./new, /sync,
/close, /rename, /model and friends; session topics accept plain text./plugins lists the profile's bundles, /plugins add
inspects a spec before anything runs and asks for a confirmation, and
enable/disable/remove work without opening a terminal.[via Telegram] marker, so the answer can use chat steps instead of host
commands. Web UI prompts are unmarked; the marker is in the session, not in
the Telegram message.dsh-plugin-updater
bundle. It is installed once into the profile; every plugin update —
connector, Penpot, or /system update plugin … — goes through it: HMR trial,
remove + install, one commit card. The updater is never the target, so it
survives the update it is running. HMR applies the reload; a
restart-required response falls back to the supervisor restart. The updater
is a separate bundle, so it is never unloaded by the connector update it is
running./start (and /menu) opens a Home card with live counters
and eight destinations: Sessions, Plugins, Updates, Components, System,
Settings, Help and Web UI. Screens are edited in place, destructive actions
have confirmation cards, and text-entry actions open a one-line chat prompt. While Telegram has
HTML widgets disabled (since 2026-11-13), the same screens are sent as rich
messages with inline buttons and edited in place; the widget cards return
automatically when Telegram allows them again. Sessions browses
workspaces and topics, opens a topic directly, and edits a session's model
from the runtime's catalog; System shows the probes, restarts behind an
inline confirmation, and opens Mobile toolchains (iOS/Android state,
install/remove, Xcode SDK path, Apple login instructions and logout). /panel keeps the previous tabbed panel (update,
plugins, components) until those move into cards. Deployment actions are
admin-only, exactly like the typed commands. /dashboard in a group still
claims an empty topic as the dashboard./system update connector resolves and installs the
newest compatible connector version the same way. /system update penpot updates
the design plugin through the plugin manager; plugin versions are independent
of the setup tag. /system update setup confirms, drains agents and moves the whole
setup through the updater sidecar. The trial comes with Commit / Roll back
buttons; ignore it and it rolls back by itself. A dead runtime, a dead updater,
a broken .env or the host itself still needs a shell — that boundary is
documented in the setup repo's
LIMITS.md.Built and tested against DSH 0.2.1-rc.5; unit tests for rendering, reactions,
bindings and the plugin surface, tsc --noEmit clean.
| Part | State |
|---|---|
Bot API client (src/telegram.ts) |
done — topics, titles, close/reopen, deletes |
Rendering (src/render.ts) |
done — rich Markdown, tables as a code block or bullets, HTML/plain fallbacks, fence- and table-aware split |
Telegram agent context (src/telegram-prompt.ts) |
done — per-session prompt section + telegram-rich-text skill |
Bindings (src/bindings.ts) |
done — atomic JSON, v2 schema |
| Control plane, groups, topics, streaming | done |
| Sync: workspace ⇄ group, session ⇄ topic, topic close ⇄ session archive | done (an archive made in the web UI is not mirrored) |
/sync adoption + history replay |
done |
Plugins surface (src/plugins.ts) |
done — list, info, add with confirm, enable/disable, remove |
web profile and the agents service (any normal
install). Optional pieces — workspace registry, session query/title, plugin
manager, the container supervisor — are detected at runtime, and the features
that need them say so instead of crashing./setprivacy → Disable).
Otherwise it cannot see plain messages in topics, which is the entire input
path.Bots cannot create groups or enable Topics, so workspace new prints a
one-tap ?startgroup= link — you create the group, the bot binds it.
The supported path is the setup repository, which installs the runtime, this connector at the matching tag, and a supervisor that can restart it from Telegram:
git clone https://github.com/vladtsvirko/dsh-tg-docker-setup
cd dsh-tg-docker-setup
./setup.sh # asks for port, bind address, provider, key,
# bot token, allowed ids, admin id, git author
./setup.sh --check prints the whole plan and changes nothing. The setup
pins a recommended connector tag in its plugins.json; the connector is
versioned on its own and can move to a newer compatible version from the bot without
a setup release. See docs/STANDALONE.md for the same
install without the setup.
The connector is published to npm as an exact version:
dsh plugin --profile web add dsh-telegram-connector@0.24.0
The registry tarball already contains the built lib/, so there is no
prepare build and no allowBuilds entry. Restart the runtime after adding
the plugin. The setup's plugins.json uses the same spec and keeps the GitHub
tag as a fallback when the registry is unreachable.
On DSH 0.2.1-rc.5 or newer, open Plugins → dsh-telegram-connector and
press Configure on the dsh-telegram-connector row. The page has three
fields — bot token, allowed user ids and admin user id — and
Save writes the row's config into the profile's user layer. No .env edit
or restart is needed; the connector reconnects with a saved token and starts
polling, and allowed/admin ids are read on each check.
That is the standalone path: the setup is not required, and the connector does
not assume the setup's supervisor or updater. Commands that need them
(/system update setup, /components, /firewall allow, restart/rollback)
report that the sidecar is unavailable instead of failing. Everything else —
workspaces, sessions, topics, plugins and model calls — works on any DSH
runtime.
Installing from the source repository is still possible:
cat >> "$DSH_HOME/profiles/web/pnpm-workspace.yaml" <<'YAML'
allowBuilds:
dsh-telegram-connector@https://github.com/vladtsvirko/dsh-telegram-connector.git: true
YAML
dsh plugin --profile web add github:vladtsvirko/dsh-telegram-connector#v0.24.0
That path runs the package's prepare build; pnpm ≥ 10 refuses it until the
allowBuilds entry exists (pnpm prints the exact key).
The package is a plugin bundle: cordis.patch.yml mounts one row.
The row config from the UI is the first source. The environment is the fallback (the setup writes it; a standalone profile can export it instead):
Environment:
| Variable | Meaning |
|---|---|
DSH_TELEGRAM_BOT_TOKEN |
main bot token (polling, buttons, topic creation) |
DSH_TELEGRAM_PUBLISHER_TOKENS |
optional comma-separated send-only bot tokens |
DSH_TIMEZONE |
default zone for parsing typed times (/timezone overrides) |
DSH_ADMIN_USER_ID |
the one account allowed to change the deployment; unset falls back to the control-chat owner |
DSH_UPDATER_TOKEN / DSH_UPDATER_URL |
bearer token and endpoint for /system update setup, manage, firewall. The entrypoint/installer sets the token; the URL defaults to http://updater:8787 (the native install writes http://127.0.0.1:8787) |
DSH_SUPERVISOR_URL / DSH_SUPERVISOR_TOKEN |
set by the deployment's entrypoint; absent outside it |
DSH_HOME |
state directory (bindings.json, update/); defaults to the runtime's home |
DSH_WORKSPACE |
workspace root used when workspaceRoot is unset |
DSH_PORT |
used to build the /web link; defaults to 4310 |
DSH_PROVIDER / DSH_PROVIDER_API_KEY_ENV |
default provider for new sessions and the variable holding its key |
Plugin row:
| Key | Default | Meaning |
|---|---|---|
botToken |
$DSH_TELEGRAM_BOT_TOKEN |
BotFather token |
allowedUserIds |
[] |
Telegram user ids allowed to drive the bot; empty refuses everyone |
adminUserId |
control-chat owner, else any allowed user | the one account allowed to run /system (except status), plugin mutations, /workspace, /bind, /system takechat |
requestTimeoutSeconds / downloadTimeoutSeconds |
60 / 120 |
HTTP timeouts (seconds) for one Bot API call and one media download |
workspaceRoot |
$DSH_WORKSPACE, else $DSH_HOME/workspace |
where /workspace new creates directories |
provider / model |
profile default | model route for new sessions |
editIntervalMs |
1200 |
minimum spacing between streaming edits |
processMode |
live |
live edits a process card during the turn and collapses it at the end; summary sends only the collapsed summary; off hides process rows |
pollTimeoutSeconds |
25 |
long-poll timeout |
reconcileIntervalSeconds |
60 |
UI → Telegram reconciliation period; 0 disables |
agentPreset |
DSH default | preset mounted in new Telegram sessions (tools live there); existing sessions keep the preset recorded in their header |
reactionsEnabled |
true |
master switch for read/streaming/staged reactions |
readReaction |
👀 |
emoji set on a prompt when the bot reads it; "" disables it |
streamingReaction |
✍ |
emoji set on a reply while it is being edited; "" disables it |
stagedReaction |
🙉 |
emoji set on media staged until a caption or text prompt; "" disables it |
State lives in $DSH_HOME/telegram-connector/bindings.json (atomic writes).
/reactions writes the same file, so an online change survives a restart and
takes precedence over the plugin row. Telegram only accepts its own reaction
emoji — /reactions allowed lists them; ✓, ✅ and ⏳ are not accepted.
Set at least allowedUserIds in the mounted plugin row — the default refuses
everyone, including you. For a refused text message the bot replies with the
sender's numeric id, which is the easiest way to find it (media and commands get
no echo of the id).
Defaults when a key is unset: adminUserId → the control-chat owner, else any
allowlisted user; provider/model → the profile default; workspaceRoot →
$DSH_WORKSPACE, else $DSH_HOME/workspace; processMode → live.
/start. That chat becomes the
control chat (one per runtime; it is where notices appear)./workspace new web-app — creates the directory, registers the workspace in
DSH and prints a t.me/…?startgroup=workspace_<id> link./start workspace_<id>; the group is bound and the dashboard is posted./new starts a session. Or create a topic by hand — the first
plain message in it creates the session./dashboard in it.
Commands move there; session topics then take plain text only.The bot is self-documenting: /help lists the commands for the current chat
and <command> --help explains one command
(including subcommands: /plugins add --help). The same text is in
docs/COMMANDS.md. A <session> argument accepts a full
session id, an id prefix, or the topic title.
| Command | Effect |
|---|---|
/workspaces |
list workspaces, their groups and links (a link only for a group-less workspace); a shared group is still one group |
/workspace new <title> |
create directory + workspace, print the group link |
/workspace link <name> |
print the group link again |
/workspace remove <name> |
preview the topics, confirm, then unregister from DSH and delete only that workspace's session topics (sibling workspaces and their topics stay) |
/plugins |
list the profile's bundles: enabled, disabled, available |
/plugins info <name> |
version, source, rows, overrides and any error |
/plugins add <spec> |
inspect a package, then install it after Confirm (or /plugins confirm) |
/plugins enable <name> · /plugins disable <name> |
select or deselect a bundle (confirmed like the rest) |
/plugins remove <name> |
uninstall a bundle (asks for confirmation) |
/plugins confirm · /plugins cancel |
finish or drop a pending install/removal (the card has the same buttons) |
/plugins approve |
allow the install scripts pnpm blocked, and retry |
/system restart |
restart into a trial: the new state is live, with a rollback window |
/system restart now |
restart without a trial; the current state becomes the rollback point |
/system update connector [to <version>] [now] |
move the connector to its newest compatible version, in a trial |
/system update penpot [to <version>] [now] |
move the Penpot plugin to its newest compatible version through the plugin manager |
/system update plugin <name> [to <version>] [now] |
the generic form for any GitHub-installed bundle |
/system update setup [--i-know-versions-are-incompatible] |
confirm, drain, then update setup through the updater service |
/system confirm |
commit the running trial (or press Commit) |
/system rollback |
restore the last committed state and restart |
/system cancel |
abandon a pending update and unblock the bot; after acceptance it stops the updater job |
/components |
optional components (e.g. the design stack): a card with Enable/Disable/Port buttons |
/system status |
versions, supervisor, open trial, web/key/registry probes |
/system takechat |
make this chat the control chat (notices and update reports follow it) |
/firewall |
native only: whether ufw lets the web UI through, and the /firewall allow <port> fix |
/web |
a signed link into the web UI for the same sessions |
/panel |
the control center widget: live status, workspace links, components and system actions (private chat only; /start and /menu post it too) |
/timezone [zone] |
IANA zone used to read times you type (default $DSH_TIMEZONE or UTC) |
/reactions … |
read/streaming/staged reactions: show, set, on/off, reset, allowed |
/system status |
connector, runtime and updater state |
/start · /menu |
the card app: Home with Sessions, System, Web UI and the legacy panel |
/help [command] |
the command index, or one command |
Plugin commands run in the private chat because they change the whole profile, not one workspace.
/dashboard topic)| Command | Effect |
|---|---|
/new [workspace] [title] |
mint a session and create its topic; the workspace is required when several share the group |
/sessions · /status |
dashboard; /status <session> shows one session |
/dashboard |
make this empty topic the command surface |
/sync [workspace] |
adopt every active session in every attached workspace (or one): topic + history per session; archived ones are skipped |
/archived |
archived sessions and whether they have a topic |
/unarchive [workspace] <id\|all> |
restore archived sessions, create topics; a shared group needs the workspace |
/rename <session> <title> |
rename session and topic |
/model <session> <provider>/<model> |
per-session model route |
/close <session> · /reopen <session> |
archive/unarchive and close/reopen the topic |
/forget <session> |
drop the binding; session and topic stay |
/unbind [workspace\|all] |
detach one workspace (or all) and delete only its session topics |
/dangerous cleanup [confirm] |
delete known topics that are not sessions |
| Command | Effect |
|---|---|
| plain text | a turn in this session |
/commands · /skills |
list the live host-command and user-skill catalogs |
/<name> |
load a user-invocable skill into the next turn |
/run <command> [args] |
run a host command even when a connector name wins |
/skill <name> [args] |
load a skill even when a host command owns the name |
//text |
send a prompt that literally starts with / |
/help |
the session command manual |
Management lives in the dashboard: /new, /sessions, /status, /dashboard,
/sync, /archived, /unarchive, /rename, /model, /close,
/reopen, /forget, /unbind, /dangerous cleanup. The session-taking ones
(/status <session>, /rename, /model, /close, /reopen, /forget) take
the session as an argument; a session topic is for talking, not configuring.
Only a leading non-whitespace / starts a command; slashes later in the text
are literal.
An unbound group accepts /bind <workspace id|title>; a bound group accepts it too and adds another workspace. A workspace still lives in exactly one group.
DSH state is the truth; Telegram follows it.
reconcileIntervalSeconds; in a shared group the topic prefixes are
rewritten instead.[Workspace] prefix is repaired and explained./sync is the explicit adoption step. It walks every workspace attached to the
group (or the one named in /sync <workspace>) and decides per session:
archived → skip; bound → probe the topic with a message send and delete it,
keeping the binding if it answers and dropping it if not; otherwise create a
topic, bind it, and replay the last 20 messages as one transcript. It is safe to
run repeatedly — the second run reports adopted 0.
In a shared group every created or adopted topic is named [Workspace] title;
the prefix is routing as well as a label. /sync also rewrites old bare names
when the group has just gained a second workspace. Topics are created
last-session-first, so the group reads top-to-bottom in the workspace's order.
That is a snapshot: Telegram orders the topic list by recency and offers no
reorder method, so it can drift as topics see activity.
Both surfaces attach to the same runtime, the same DSH_HOME and the same
session store — there is no export step and no second copy of a conversation.
/web prints a signed link into the web UI for the
same sessions (bot chat only; treat the link as a password). A session started
with /new is an ordinary DSH session, so the UI lists it./sync in the group adopts it. After that, prompts you send in the browser
are mirrored into the topic (one-way) and answers appear in both places./system restart now does the same thing by hand./system restart now and the confirmed Take over
button are admin-only: they restart the whole runtime. Once the tab releases
the session, any allowlisted member can continue it in Telegram — sessions are
shared per topic, not per user.Restart. Bindings load at startup and agents are created lazily, so an idle restart is free. A topic bound to an existing session resumes it rather than minting a new one.
One live agent per session. If a web UI tab owns a session, a prompt from Telegram fails with a readable message instead of hijacking it.
Rate limits. Telegram allows roughly 20 messages/minute per bot per
group and about one message/second per chat. Every outgoing message goes
through one outbox per group: FIFO (control notices jump), persisted one small
file per item, paced per bot. When the queue waits, the dashboard topic carries a
single editable line (⏳ Telegram rate limit — N queued…); when every bot is
saturated, the owner gets a weekly digest instead of silence. Streaming edits
use a separate budget and are owned by the bot that sent the message.
/sync announces its own wait in the dashboard chat with
the sync card says waiting for Telegram's rate limit; it continues automatically.
Exactly-once: a send that Telegram accepted and acknowledged is removed
from the queue and never repeated. The unavoidable window is a process death
between Telegram accepting and the acknowledgement; those items are moved to
outbox/<chat>/lost/ rather than retried, so a reply is never duplicated — it
can be missed, and the owner gets a notice in the bot chat (once per group per
minute) naming the group and topic so it can be resent from the transcript,
plus a count for anything the throttle suppressed.
Crash catch-up. Turns and prompts pass through a small journal (the logical bridge). If the process dies before a turn is acknowledged, the next boot posts one “while the connector was away” digest per session; pending prompts are re-injected. The digest is queued before its journal entry is retired, so it is never duplicated; a re-injected prompt can be duplicated in the crash window.
Publisher bots. DSH_TELEGRAM_PUBLISHER_TOKENS is a comma-separated list
of extra bot tokens. They are send-only: add each to every workspace group as
a member (the Bot API cannot do that for you). The main bot checks membership
every six hours and reports a missing publisher in that group's dashboard topic.
Publisher messages are ignored as input, so they never feed the agent.
Rendering. Agent Markdown is sent as a Telegram rich message; headings and
lists render natively, while every table is rewritten to a monospaced code
block (or a bullet list when too wide) because not every client renders GFM
tables. If the API rejects rich content, a small HTML subset takes over, and a
rejected entity falls back to plain text. Answers are split above ~3400
characters (SAFE_LENGTH), on fences and tables (a split table repeats its
header).
More than one bot. Optional publisher bots multiply the group ceiling (20 messages/minute per bot). The main bot polls and owns buttons; publishers post, and the switcher picks whichever has headroom. One outbox per group keeps the queue in order, shows a single status line while it waits, and reports saturation to the owner.
Time is yours. Deadlines and reminders are sent as Telegram <tg-time>, so
every client renders them in its own zone; logs and stored state stay UTC.
Times you type — “tomorrow at 9:00” — are read in the bot's configured zone
(/timezone, $DSH_TIMEZONE, default UTC).
Self-update. /system update connector resolves the newest npm version
(or the repository tag for a git install), checks its declared DSH range, and asks the
supervisor to stop the runtime, run the entrypoint's reset-plugin into that
exact ref, and start it again inside a trial. now skips the trial. A failed
install or an unhealthy boot restores the previous state before the runtime
comes back, so a bad connector release cannot strand the bot. The connector is
versioned independently of the setup; moving the setup tag is
/system update setup, which confirms, drains agents and uses the updater
sidecar. /system rollback restores the profile, not the image.
Supervised restarts. The runtime runs under a supervisor
that owns modifications to the profile and keeps a copy of it. It is the only
process that does not load plugins, so a plugin that breaks startup cannot take
the way back with it. A confirmed plugin change opens a trial before it is
applied: live under HMR, or around a restart when the manager asks for one.
The trial message carries Commit and Roll back buttons; it rolls back
on a crash, on a boot that never checks in, or when the window closes, and a
container restart inside the window resumes it. A plain restart announces itself on the next boot (back up …),
and the Telegram offset is written before any restart, so the command cannot be
redelivered and run twice. Without a supervisor the commands say so and point
at the host.
Errors from the agent are posted in the topic that caused them.
Both surfaces show the same runtime, from different records: the web UI lists the
runtime's workspace registry, Telegram lists the connector's bindings.
They can disagree after a crash during a registry write, after an upgrade that
reset the storage domain, or after a boot under a different DSH_HOME — the bot
still names the workspace and its topics, the web UI shows nothing, and a prompt
has nowhere to land.
The connector repairs that instead of reporting it. At boot it recreates a bound
workspace whose directory still exists (under the id the registry issues, moving
the binding and its sessions with it), re-attaches the sessions the workspace
lost, and posts one line in the control chat. /sync does the same on demand,
and /system status shows both counts before a prompt can fail:
registry: 2 workspace(s) in the runtime · 2 bound to Telegram
data: /srv/dsh/data · this runtime (native)
The data line names a second live runtime over the same directory
(warning: another runtime holds it (pid …, since …)) — the one failure a
restart cannot clear, because that process keeps the kernel lock on every
session it has open.
| Symptom | Cause / fix |
|---|---|
You are not authorized with an id |
add that id to allowedUserIds |
| bot ignores plain messages in topics | privacy mode is on — BotFather → /setprivacy → Disable |
could not create the session topic |
bot is not admin, or lacks Manage Topics |
/sync reports adopted 0 |
every session is archived, already bound to a live topic, or the workspace id does not match — check /archived and the dashboard |
this session is held by another client |
something owns the session's write handle; the refusal says which. Another topic of this group already runs it — send there, or /forget this binding (no restart helps). A web UI tab — the message is queued; Take over asks, then restarts dsh and releases every handle. Another dsh process over the same data directory — stop it first (sudo systemctl stop dsh.service); a restart of this runtime cannot clear its lock, and ./install.sh --doctor names it |
| nothing happens after adding the plugin | token is empty — the connector logs a warning and stays idle |
| group title never follows a rename | bot lacks Change Info in that group |
this runtime exposes no plugin manager |
the profile is not base-backed, or @deepseek-ai/dsh-plugin-manager is not mounted |
/plugins add says already installed |
updates are a removal plus an install; use the host CLI, or remove first |
| a plugin change says restart required | this runtime has no HMR — /system restart, then /system confirm if it works |
/system restart says not running under the supervisor |
the runtime was started directly (no container), so restart it from the host |
allowedUserIds is the gate for using the bot, and adminUserId is the
gate for changing the deployment (/system restart|update|rollback, plugin
mutations, /workspace and /bind). An empty allowlist means nobody, not
everybody. When adminUserId is unset, the control-chat owner is admin, and
otherwise any allowlisted user can run admin commands.cordis.patch.yml never carries it./dangerous cleanup
requires an explicit confirm; /forget never deletes anything./plugins add inspects first and installs only
after Confirm (or /plugins confirm); blocked install scripts need /plugins approve, which
names exactly the packages allowed. The connector refuses to remove or disable
itself, since that would cut the line mid-command.bindings.json contains chat ids and session ids, not message contents.npm install
npm run build # tsc → lib/
npm test # vitest: render, bindings, plugins, supervisor, delivery, …
npm run typecheck
src/index.ts is the plugin (routing, commands, streaming); help.ts is the
command registry behind /help and the Telegram command menu;
telegram.ts is the typed Bot API client; render.ts normalises rich Markdown
and splits; outbox.ts owns the per-group queue and publishers; bindings.ts
persists the mapping; sessions.ts owns the topic key model; bridge.ts is the
turn journal; mirror.ts mirrors web-UI turns; plugins.ts reads the host's
plugin manager and renders its answers; supervisor.ts talks to the container
supervisor over its loopback socket. CONTRIBUTING.md has the
full module table.
MIT
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: telegram。