Repository navigation
Description
Part of #1396
Summary
infer daemon becomes the one owner of external connections. It hosts the AG-UI WebSocket binding that the extension bridge turns into in #1395, keeps a registry of threads, and runs each thread in a session worker (#1398). Clients never spawn infer headless.
The binding is a relay. Worker stdout lines go to the subscribed clients as bare frames, one AG-UI event per frame with no envelope, and client frames go to the worker's stdin. That gives the socket everything #1395 originally asked for: bare events, one run per turn, the cancelled outcome and one approval contract.
A new context internal/sessions owns the thread registry and the worker supervision. The binding in internal/protocols/agui and the Telegram channel are its driving adapters, and the worker process is its infrastructure adapter.
Acceptance Criteria
-
infer daemonservesws://127.0.0.1:<port>/wswith the Origin check and tokenbrowser_hellohandshake, and boots with only the binding enabled (today it refuses to start unless channels, scheduler or heartbeat is on) -
browser_hellocarriesclient(extensionordesktop). There is one extension connection, which a new one replaces, and any number of desktop connections -
browser_hello_ackcarriesprotocol_version. Any valid-token hello is accepted, and one without a version is logged as a warning - A thread is a project dir plus a conversation id, and runs in one session worker spawned in that project dir
- Worker stdout lines reach every client subscribed to the thread unchanged, one per frame
-
new_sessionandresume_conversationtakeproject_dirplus thread options (model, agent mode, system prompt and custom instructions overrides, sandbox directories, max turns) and answer withMESSAGES_SNAPSHOT.threadIdon the thread's runs is its conversation id - CUSTOM
approval_requestreaches every client of the thread. The firstapproval_response(ipc.ApprovalResponse:tool_call_id,approved,scope) goes to the worker, and CUSTOMapproval_resolved{tool_call_id}goes to the thread's other clients -
user_message,interrupt,user_question_responseandcomputer_use_controlare forwarded to the worker unchanged -
list_conversations,list_history,list_skills,list_models,select_model,set_modeandtool_request/tool_resultkeep their shapes and are scoped to a project dir - Idle workers exit after a timeout. A worker that crashes mid-turn ends its open run with
RUN_ERROR -
infer chatno longer runs the in-process panel mirror (extension_chat.go, its event bridge subscription) -
internal/sessions/README.mdexplains what the context owns and how the binding, Telegram and the workers plug in - Integration tests cover two clients on one thread, approval first-answer-wins, resume snapshot and a worker crash
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
inference-gateway-releaser commentedon Sep 30, 2026
🎉 This issue has been resolved in version 0.219.0 🎉
The release is available on:
Your semantic-release bot 📦🚀