Files
coder/agent/agenttest
Kyle Carberry 01f9e4b4be feat(agent): wire agentcontext into agent lifecycle
Boot the agentcontext.Manager during agent init, seed its
sources from the existing CODER_AGENT_EXP_*_DIRS env vars, run
its watcher/resolver loop in the graceful context, and tear it
down in agent.Close.

Mount the source CRUD and resync HTTP API at /api/v0/context.

Connect to coderd via the new ConnectRPC210WithRole and push
each snapshot via DRPCPusher. The push goroutine is registered
through a new startAgentAPI210 helper that exposes the v2.10
client. When the manifest lands, trigger a Resync so the
snapshot reflects the workspace directory immediately instead
of waiting for the next filesystem event.

Add agenttest.Client.ContextStatePushes and a FakeAgentAPI
PushContextState implementation so tests can assert on the
push traffic, plus an end-to-end test that boots a real agent
against the fake and verifies AGENTS.md appears in a snapshot.
2026-06-02 14:29:49 +00:00
..