Repository navigation
v0.3.1.1
v0.3.1.1
A fix release on top of v0.3.1. No new settings and no migration: update with
./update.sh and restart the bot when it is idle.
What changed
Paragraphs are preserved in long replies
Before, almost every reply went out as a Rich Message, and Telegram shows the
paragraphs of a Rich Message without the empty line between them, so a long answer
read as one solid block. Now plain prose (paragraphs, bold, lists, inline code) is sent
as Telegram HTML with the blank lines as written. A Rich Message is used only when the
reply carries Markdown that only Telegram renders: a table, math, a task list,
<details> or a footnote.
Long HTML replies are split only between tags and entities, within the length Telegram
counts after parsing, and every open tag is closed and reopened across parts. Edits the
owner asks for (/edit or in plain words) are rendered as HTML as well, so Markdown no
longer shows up as literal ** markers.
Visible verified or unverified sender on inter-agent messages
A message that arrives through the agent webhook now shows who sent it:
fromAgentin the JSON body, or theX-From-Agentheader: the sender is
verified (the authenticated caller named it);- else a leading
[Inter-agent от <sender> → <recipient>]line at the very start of
the message: the name is shown with «(не подтверждён)», unverified, because any
caller can write that line; - else
unknown.
agentId is accepted and ignored for display. The verified flag is saved with the
queued message, so it survives a restart, and it is carried into the Codex turn, the
side-thread prompt, the recovery notice and the final reply. A trailing delivery
protocol block after a --- line (ПОРЯДОК ДЕЙСТВИЙ: and its ack-only variant) is
labelled for Codex as delivery protocol, not as the sender's request, and only when the
body carries fromAgent. Details: plugin/docs/install.md.
Parallel replies without false "parallel stream" errors
With parallel side threads on (KROT_CODEX_PARALLEL=1), several owner messages sent
while a task ran could get their status cards and answers late, one after another,
released only by a 30-second HUD guard, so a healthy parallel turn looked broken. The
cause was the per-chat minute budget being filled by status edits and HUD card
refreshes. Now:
- the owner's replies (final and interim) have their own send queue and three reserved
slots of the minute budget; - status edits leave room for sends;
- a HUD card move skips refreshes queued before it, and HUD edits stay in order;
- an interim reply waits for the HUD card like the final reply, so it lands below it;
- a side-thread card keeps one edit in flight and drops the pending line when it closes;
- the "your message is queued" notice is sent only if the message still waits, and is
cancelled or deleted when the message is picked up.
Secret redaction for queued and replayed messages
Configured secrets are now masked in the source text before it is rendered to HTML, on
the reply path, the interim reply path and the edit path, so a secret with &, <,
> or quotes can no longer slip past redaction after escaping. Reply parts saved by an
older version of the outbox are joined, redacted and re-split when loaded, so a secret
cut across two saved parts is masked before the bridge replays them after a restart.
The error journal masks explicit credential fields whatever their value is.
Link-preserving fallback
When Telegram refuses the HTML of a part, the bridge sends the plain text Telegram would
have shown instead of the escaped HTML: tags dropped, entities decoded, and link
destinations kept after their text as «text (url)» while the part still fits Telegram's
limit. Plain-text and MarkdownV2 messages are split by raw length, without HTML tags
inserted.
Smaller fixes
- A diagram Telegram's renderer refuses (for example a flowchart with a cycle) is sent
as numbered steps with links by name, instead of raw node kinds and index pairs. - A reply resumed after a restart uses the chunking its saved receipts were counted
with, so no text is lost or repeated.
Known limitations
See issue #7.