feat(agent): cloud-side LLM agent for managed recovery #1
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/managed-tunnel"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Cloud-side agent that connects to the relay, registers MCP tools, and runs an OpenRouter tool-use loop.
Packages
internal/tools/register.go— MCP initialize + tools/list handshake →[]openai.Toolinternal/loop/run.go— ReAct loop: stream LLM response, collect tool_call deltas, execute via MCP tools/call, feed results back; streams narration as SSE narration events;finish_reason=stop→ session_doneinternal/loop/config.go—Config{Model, OpenRouterKey, ApprovalTools}; default modelgoogle/gemini-2.5-flashinternal/approval/gate.go—Gate()sends approval_required SSE event and blocks on approvalCh; wired into loop before write-like tool callsinternal/portal/push.go—PushEvents()drains eventCh to relay as push_event frames; buffers 256 events and reconnects on disconnectcmd/recova-agent/main.go— entry point scaffold (loop wiring in future task)Test plan
go test ./...passes (tools, loop MCP dispatch, approval gate x3, portal push)go build ./...cleanView command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.