detached 15563ff

docs: document protocol-agnostic bot core in README

commit
15563fff44089e52d2cc9b1d292d5087040b249e
author
patriceckhart · · 2026-07-06 06:15 UTC
parent
3cd4df6
signature
unsigned
refs
tag: v0.2.61
1 file · +8 -0
M README.md +8 -0
@@ -768,6 +768,12 @@ From then on, any DM you send is forwarded to the agent as a user prompt. Attach
768768
769769 Bot mode respects the usual zot flags: `--provider`, `--model`, `--cwd`, `--reasoning`, `--continue`, `--no-session`, `--no-tools`, and so on. Run `zot tg run -c --model claude-opus-4-1` to resume the latest session on Opus, for example.
770770
771+### Architecture: protocol-agnostic bot core
772+
773+The messenger functionality is split in two layers. A generic, protocol-agnostic core lives in `packages/agent/modes/bot`: it owns the turn queue, agent prompting, built-in command dispatch (`/start`, `/help`, `/status`, `/stop`), status formatting, and per-turn credential refresh. Concrete transports implement the small `BotAdapter` interface (inbound polling, sending replies, a typing indicator, and optional protocol-specific status text); the Telegram support in `packages/agent/modes/telegram` is one such adapter.
774+
775+This means additional messaging backends (Discord, Slack, Signal, and similar) can be added by implementing `BotAdapter` in a new package and wiring up a subcommand. No changes to the runner, agent, or core are required. Channel IDs are opaque strings owned by the adapter, so the shared runner stays free of protocol-specific types.
776+
771777 ## Development
772778
773779 ```bash
@@ -790,6 +796,8 @@ packages/agent/ cli wiring, arg parsing, system prompt, co
790796 packages/agent/extensions/ extension subprocess manager
791797 packages/agent/extproto/ extension wire-format types
792798 packages/agent/modes/ interactive tui, print, json, dialogs
799+packages/agent/modes/bot/ protocol-agnostic bot runner (BotAdapter interface)
800+packages/agent/modes/telegram/ telegram adapter, api client, daemon
793801 packages/agent/tools/ read, write, edit, bash, sandbox
794802 packages/agent/skills/ skill discovery, frontmatter parser, skill tool
795803 packages/agent/swarm/ background subagent runtime
@@ -768,6 +768,12 @@ From then on, any DM you send is forwarded to the agent as a user prompt. Attach
768 768
769 Bot mode respects the usual zot flags: `--provider`, `--model`, `--cwd`, `--reasoning`, `--continue`, `--no-session`, `--no-tools`, and so on. Run `zot tg run -c --model claude-opus-4-1` to resume the latest session on Opus, for example.769 Bot mode respects the usual zot flags: `--provider`, `--model`, `--cwd`, `--reasoning`, `--continue`, `--no-session`, `--no-tools`, and so on. Run `zot tg run -c --model claude-opus-4-1` to resume the latest session on Opus, for example.
770 770
771+### Architecture: protocol-agnostic bot core
772+
773+The messenger functionality is split in two layers. A generic, protocol-agnostic core lives in `packages/agent/modes/bot`: it owns the turn queue, agent prompting, built-in command dispatch (`/start`, `/help`, `/status`, `/stop`), status formatting, and per-turn credential refresh. Concrete transports implement the small `BotAdapter` interface (inbound polling, sending replies, a typing indicator, and optional protocol-specific status text); the Telegram support in `packages/agent/modes/telegram` is one such adapter.
774+
775+This means additional messaging backends (Discord, Slack, Signal, and similar) can be added by implementing `BotAdapter` in a new package and wiring up a subcommand. No changes to the runner, agent, or core are required. Channel IDs are opaque strings owned by the adapter, so the shared runner stays free of protocol-specific types.
776+
771 ## Development777 ## Development
772 778
773 ```bash779 ```bash
@@ -790,6 +796,8 @@ packages/agent/ cli wiring, arg parsing, system prompt, co
790 packages/agent/extensions/ extension subprocess manager796 packages/agent/extensions/ extension subprocess manager
791 packages/agent/extproto/ extension wire-format types797 packages/agent/extproto/ extension wire-format types
792 packages/agent/modes/ interactive tui, print, json, dialogs798 packages/agent/modes/ interactive tui, print, json, dialogs
799+packages/agent/modes/bot/ protocol-agnostic bot runner (BotAdapter interface)
800+packages/agent/modes/telegram/ telegram adapter, api client, daemon
793 packages/agent/tools/ read, write, edit, bash, sandbox801 packages/agent/tools/ read, write, edit, bash, sandbox
794 packages/agent/skills/ skill discovery, frontmatter parser, skill tool802 packages/agent/skills/ skill discovery, frontmatter parser, skill tool
795 packages/agent/swarm/ background subagent runtime803 packages/agent/swarm/ background subagent runtime

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 1

Tags 476

↑↓ moveenter openesc close