feat(tui+deploy): wire TUI to live ReasoningLoop via agent_bridge; add Docker deployment#4
Merged
Merged
Conversation
Implements run_agent_session() which drives the full investigate → plan → approve → act lifecycle in a background tokio task, emitting SessionUpdates into the TUI channel. Part of feat/tui-agent-bridge: TUI wired to live ReasoningLoop + Dockerfile.
Replace hardcoded default host with app state values for session start.
…dd --dry-run flag
…bookworm-slim runtime)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Wires the Sentinel TUI to a live
ReasoningLoopvia the asyncagent_bridgemodule, and adds Docker/Compose deployment artifacts.sentinel-tui changes
agent_bridge.rs(prior commit)AgentConfigstruct: goal, host, dry_run, backend_name, api keys, modelrun_agent_session(): async bridge that drivesReasoningLoop→SessionUpdatechannel +ApprovalRequestchannelapp.rspending_goal,host,dry_run,session_update_rx,approval_rx,approval_responderstart_session()setspending_goalso the event loop can spawn the agent task on the next tickapply_session_update()dispatches allSessionUpdatevariants to TUI statepoll_session_updates()/poll_approval()drain channels each tickmain.rsrun_app()event loop: drains updates, polls approval, spawnsrun_agent_sessiontokio task whenpending_goalis set--dry-runCLI flag ontuisubcommandclaude-opus-4-8Deployment
Dockerfile: multi-stagerust:1.82-slimbuilder →debian:bookworm-slimruntime; PTY-safe binarydocker-compose.yml:ANTHROPIC_API_KEYguard, TTY wiring (stdin_open,tty), defaulttui --host localhostHow to run
Lifecycle
Goal input → start_session() → pending_goal set → run_app() spawns run_agent_session() → ReasoningLoop drives investigate→plan→approve→act → SessionUpdate stream updates TUI in real time