feat(coderd/agentapi): implement sub agent api (#17823)

Closes https://github.com/coder/internal/issues/619

Implement the `coderd` side of the AgentAPI for the upcoming
dev-container agents work.

`agent/agenttest/client.go` is left unimplemented for a future PR
working to implement the agent side of this feature.
This commit is contained in:
Danielle Maywood
2025-05-29 12:15:47 +01:00
committed by GitHub
parent bc83de2a72
commit b712d0b23f
25 changed files with 1767 additions and 252 deletions
@@ -330,3 +330,9 @@ INNER JOIN workspace_resources ON workspace_resources.id = workspace_agents.reso
INNER JOIN workspace_builds ON workspace_builds.job_id = workspace_resources.job_id
WHERE workspace_builds.id = $1
ORDER BY workspace_agent_script_timings.script_id, workspace_agent_script_timings.started_at;
-- name: GetWorkspaceAgentsByParentID :many
SELECT * FROM workspace_agents WHERE parent_id = @parent_id::uuid;
-- name: DeleteWorkspaceSubAgentByID :exec
DELETE FROM workspace_agents WHERE id = $1 AND parent_id IS NOT NULL;