feat(steer): desktop and Telegram Steer through shared run-input admission - #298
sambitcreate wants to merge 1 commit into
Conversation
…ssion Desktop composer Steer, a new Steer action on queued text rows, and Telegram /steer now all go through #251's main-owned admission (llmClient.admitChatRunInput / chat:admitRunInput), so guidance is in the transcript before Pi reads it. The legacy in-memory chat:steer IPC, llmClient.steer and steerGeneration are removed. The harness reuses the admission's committed message id when Pi emits the queued input, instead of projecting a second visible copy, and no longer returns host-committed input to the draft on Stop. No Remote contract, contractRevision, endpoint, receipt or IPC changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Hermes Review BotConfidence: 5 Engine: SummaryThis change routes desktop composer Steer, a new per-row Steer action on queued messages, and Telegram Confidence Score: 5/5Full end-to-end verification completed across desktop IPC, Telegram control routing, harness emission/projection lifecycle, queue mutation states, and Playwright e2e specs. 📁 Important Files Changed
FindingsNo findings. Sequence DiagramsequenceDiagram
autonumber
actor User as User (Desktop / Telegram)
participant UI as Desktop UI / Telegram Bot
participant Admission as Run-Input Admission
participant Store as Chat Transcript Store
participant Harness as Pi Agent Runtime
User->>UI: Submit Steer (Composer / Queued Row / /steer)
UI->>Admission: admit({ streamId, mode: "steer", text })
Admission->>Harness: queueAdmissionBlocked() preflight probe
Admission->>Store: appendChatMessageWithReconciliation(messageId, text)
Admission->>Harness: queueSteer(message, { visibleChatMessageId })
Harness-->>Admission: receipt ({ accepted: true, queue: "steer" })
Admission-->>UI: { admitted: true, committed: true, messageId }
UI->>UI: Optimistic transcript update & receipt toast / reply
Harness->>Harness: On emission: reuse visibleChatMessageId & skip duplicate projection
[]
|
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes This review covers the initial PR head, adding desktop and Telegram Steer through shared run-input admission and updating Pi's visible-message projection.
- Desktop Steer Replaces the legacy IPC with shared admission for composer and queued text rows, with committed transcript display and receipt-aware draft and queue handling.
- Telegram
/steerCaptures the current run's stream and owner, admits only on the matching active route, and adds receipt replies and edited-command handling. - Harness projection Reuses host-committed message IDs when Pi emits queued input and no longer returns those messages as undelivered after Stop.
- Coverage and guidance Adds queue, harness, Telegram, and Playwright behavior tests and updates run-control docs and the Telegram onboarding description.
GPT Luna | 𝕏

Summary
This PR replaces the desktop and Telegram parts of #220, built on top of #251. Everything goes through #251's admission service, receipt and IPC. There is no new endpoint, receipt type or IPC channel, and the Aiden Remote wire contract and
contractRevision(18) are unchanged.Desktop
chat:admitRunInput. Main saves the guidance to the transcript before Pi reads it.Buttonwith theCornerDownRighticon and an accessible label.chat:steerIPC,llmClient.steerandsteerGenerationare removed, so desktop Steer has a single path.Telegram
/steer <guidance>admits text into the route's own running turn, using the stream captured fromsendTelegramTurn.chats:changedwhen the guidance is committed./steermessages are never sent./steeris added to the bot command menu and help text, and the onboarding Telegram tile mentions steering.Harness fix (needed for #251's mobile path as well)
PiRuntimeQueueOptions.visibleChatMessageId, emission now reuses the committed id.takeUndeliveredQueuedMessages, so after Stop it stays as history instead of returning to the draft.What was kept or dropped from #220
/steer/steeris rejected asrun_not_activeand cannot duplicate.queuedUserMessageIdmarker changeflushDurableMessagesalready writes it.afterPersistoffset barrierTests
renderer/lib/chat-message-queue.test.ts: 25 pass. New tests cover:main/services/pi-agent-runtime-harness.test.ts: admitted steering appears once, and Stop keeps it as history. Both fail on main./steeradmission payload/steertests/e2e/chat-message-queue.spec.ts: 15/15 pass. This includes the new queued-row Steer test and updated Stop, rejected and unknown receipt tests.npm run type-check,type-check:e2eandlintare clean.pi-compaction-core.test.tshas 4 failures that also fail identically onorigin/mainand are unrelated to this PR.Follow-up: desktop Steer no longer feeds
chat:guidance-returned. That plumbing is still generic, but may now be dead code.🤖 Generated with Claude Code