Repository navigation
feat(telegram): run Telegram sessions through daemon workers - #1421
Conversation
|
@infer can you finalise this PR? make it ready for a review? check all the left out todos and complete them. |
|
Model: Todos
Pull Request✅ Infer Result: SuccessAll work is complete. Let me finalize the todo list: The PR is finalised and ready for review. Here's a summary of what I found and completed: Left-out work completedThe trigger comment asked to finalise the PR and complete the left-out todos. I traced the implementation against issue #1401's acceptance criteria (daemon-side binding wiring, telegram thread adapter, AG-UI render, session-rollover resolution, channel commands, mocks) and found the leftovers:
I verified the byte-level truth with a probe program (a throwaway Verification
Pushed commits
PR finalisation
Model: Tokens: 10,255,061 in · 71,617 out · 10,326,678 total (72 requests) Tool calls: 94 total · 100% success rate TracesStatsTriggered by edenreich · Infer Action · OSS |
The thread render fenced quoted tool results with three quotes while the render tests (mirroring the subprocess output the channel serves) expect two, and it capped the whole marshaled envelope instead of the result value, so the 1000-rune cap cut the payload early. Extract the result value under the result key and cap it, keep the whole body as the fallback for what the worker emits today, and cap the failure detail so the retry hint and the fence stay intact.
The render tests already wire the chat over a fake router themselves, so the helper was dead code golangci-lint flagged (unused) and its comment was an editing leftover.
The feature commit landed without the fmt pass, so go fmt and golangci-lint fmt now normalize the import grouping in cmd/runtime/config.go and config/daemon.go and the test-file formatting.
The feature commit left two copies of the same bindingHandler docblock above the type from an unfinished edit; keep the first one.
|
🎉 This PR is included in version 0.219.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Resolves #1401
Summary
The Telegram channel (and every channel) no longer spawns
infer headlessper message. The daemon now hosts session threads:infer daemonstarts the thread registry and the AG-UI WebSocket binding on their own switch (daemon.yaml: daemon.binding.enabled/port/token, with browser_use.extension's port and token as the fallback), and with channels enabled the channel manager becomes a driving adapter of the sessions context. It holds one threadChat per chat, hands every inbound message to the registry as a resume_conversation plus user_message frame pair, and renders the worker's AG-UI events back through the channel.infer headlessinside the daemon (out of scope per the issue)Verification
Follow-ups