Everything that makes her *her*. Threads still broken,
streaming still rough around the edges. But she sees,
she thinks, she speaks. The rest is revision.
- Remove formatReasoningAsCodeBlock (was experimental, leaked into PR)
- Remove htmlPrefix from OutboundMessage and editMessage signatures
- Add Matrix-specific <details> collapsible to formatReasoningDisplay
- Matrix adapter handles parseMode='HTML' to skip double-escaping
- Reasoning now flows through the standard display path like all adapters
Replace hardcoded 'default' conversation ID with convKey in core bot
path and chatId in adapter-internal audio calls. Prevents mapping
inconsistencies in per-chat/per-channel routing.
Surgically removes only the Olm-registered rethrow handler by inspecting
listener source, rather than nuking all process error handlers. Adds a
safety-net logger only when no other handlers remain.
Addresses reviewer feedback: global process.removeAllListeners was
removing handlers registered by other parts of the app/runtime.
The <details> htmlPrefix path was an internal experiment that
shouldn't have shipped — it replaced the working per-channel
reasoning display with silent collection and a HTML block that
doesn't render reliably in Element. Restoring the upstream
formatReasoningDisplay so reasoning shows inline as it arrives.
The 18010eb commit deleted several upstream features from main.ts:
- resolveSessionMemfs and sleeptime/memfs integration
- parseOptionalBoolean, parseHeartbeatSkipRecentPolicy helpers
- heartbeat skip-recent policy/fraction/interrupt config
- duplicate agent name and turnLogFile validation
- turn log file collection for API server
- logging and blueskyEnabled bot config
Restores all upstream code while preserving our Matrix additions:
parseHeartbeatTarget first-colon fix, MatrixAdapter callback wiring,
heartbeatTargetChatId, sessionModel, API key propagation, Olm crash fix.
Replace hardcoded @ani:wiuf.net with this.config.userId in
onMessageSent(). Remove casey-specific comment in key import.
Authored-by: Ani Tunturi <ani@wiuf.net>
Reverts Ani-specific personalizations (first-person voice, "Casey",
"Cogito ergo sum") from the default heartbeat prompt. These belong
in the user's promptFile, not upstream source.
Adds targetRoom parameter to buildHeartbeatPrompt and
buildCustomHeartbeatPrompt so the agent knows which room to
message into.
Authored-by: Ani Tunturi <ani@wiuf.net>
Matrix !commands that duplicated upstream bot logic (!new, !status,
!showreasoning, !restore) are removed. !reset, !cancel, !status,
!model, and bare !heartbeat now delegate to the upstream /reset,
/cancel, /status, /model, /heartbeat handlers via onCommand callback.
This fixes !new (now !reset) which only invalidated the session
without clearing the conversation from the store, causing stuck
processes to reconnect to poisoned conversations.
Matrix-specific commands (!pause, !resume, !ignorebot-*, !turns,
!timeout, !heartbeat on/off) remain local since they manage
per-room state with no upstream equivalent.
Authored-by: Ani Tunturi <ani@wiuf.net>
Set the correct trigger type ('cron' and 'heartbeat') for cron/heartbeat turns instead of defaulting to 'message', and remove the spurious channel property from heartbeat turns.
Written by Cameron ◯ Letta Code
"The measure of intelligence is the ability to change." -- Albert Einstein
Extracts a DisplayPipeline async generator that wraps the raw SDK stream
and yields clean DisplayEvent types. Refactors processMessage() to consume
pipeline events instead of raw StreamMsg objects.
- Locks foreground on first substantive event (reasoning/tool_call/etc),
eliminating buffering delay for real-time display
- Filters pre-foreground error/retry events to prevent false approval recovery
- Re-throws 429 in rejectApproval to prevent rate-limit loops
- Gates reasoning log on display config
- 12 pipeline unit tests + updated integration tests (56 total)
- Net -224 lines from bot.ts
Written by Cameron ◯ Letta Code
"The purpose of abstraction is not to be vague, but to create a new
semantic level in which one can be absolutely precise." -- Edsger Dijkstra