feat: replace agent_type with agent_profile_id (#14)

* feat: replace agent_type with agent_profile_id

- Replace agent_type field with agent_profile_id across backend and frontend
- Add ProfileResolver interface and StoreProfileResolver implementation
- Update task creation/update to use agent_profile_id
- Change default agent runtime from docker to standalone
- Fix workspace state types to include all required fields
- Fix websocket handlers type mismatches for environments, executors, workspaces
- Update integration tests to use agent_profile_id

* feat: pass model as CLI argument to agents

- Add ModelFlag field to AgentTypeConfig for specifying the CLI flag
- Set ModelFlag to '--model' for all agents (auggie, claude, codex, gemini, opencode, copilot)
- Update launchStandalone to append model flag to agent command
- Update launchDocker/buildContainerConfig to append model flag to container command
- Model is passed when both agent supports ModelFlag and profile has Model configured

* fix: make WebSocket message handling async to prevent blocking

When a long-running handler like orchestrator.prompt was executing,
it blocked the ReadPump loop, preventing other requests (like
workspace.tree.get) from being processed until the handler completed.

Now each message is handled in its own goroutine, allowing concurrent
message handling so file tree requests work while the agent is working.

* feat: show task description as first message in chat

- Add 'Task' label with distinct styling (lighter background, border)
- Pass taskDescription from page to TaskChatPanel component
- Differentiate from regular user messages visually
This commit is contained in:
João Salavisa
2026-01-14 12:29:58 +00:00
committed by GitHub
parent 42d4be97e5
commit 82e8c8905b
45 changed files with 791 additions and 461 deletions
@@ -37,16 +37,16 @@ func (c *Controller) ListAgents(ctx context.Context, req dto.ListAgentsRequest)
for _, a := range agents {
agent := dto.FromAgentInstance(&dto.AgentInstanceData{
ID: a.ID,
TaskID: a.TaskID,
AgentType: a.AgentType,
ContainerID: a.ContainerID,
Status: string(a.Status),
Progress: a.Progress,
StartedAt: a.StartedAt,
FinishedAt: a.FinishedAt,
ExitCode: a.ExitCode,
ErrorMessage: a.ErrorMessage,
ID: a.ID,
TaskID: a.TaskID,
AgentProfileID: a.AgentProfileID,
ContainerID: a.ContainerID,
Status: string(a.Status),
Progress: a.Progress,
StartedAt: a.StartedAt,
FinishedAt: a.FinishedAt,
ExitCode: a.ExitCode,
ErrorMessage: a.ErrorMessage,
})
resp.Agents = append(resp.Agents, agent)
}
@@ -61,10 +61,10 @@ func (c *Controller) LaunchAgent(ctx context.Context, req dto.LaunchAgentRequest
}
launchReq := &lifecycle.LaunchRequest{
TaskID: req.TaskID,
AgentType: req.AgentType,
WorkspacePath: req.WorkspacePath,
Env: req.Env,
TaskID: req.TaskID,
AgentProfileID: req.AgentProfileID,
WorkspacePath: req.WorkspacePath,
Env: req.Env,
}
instance, err := c.lifecycle.Launch(ctx, launchReq)
@@ -91,16 +91,16 @@ func (c *Controller) GetAgentStatus(ctx context.Context, req dto.GetAgentStatusR
}
return dto.FromAgentInstance(&dto.AgentInstanceData{
ID: agent.ID,
TaskID: agent.TaskID,
AgentType: agent.AgentType,
ContainerID: agent.ContainerID,
Status: string(agent.Status),
Progress: agent.Progress,
StartedAt: agent.StartedAt,
FinishedAt: agent.FinishedAt,
ExitCode: agent.ExitCode,
ErrorMessage: agent.ErrorMessage,
ID: agent.ID,
TaskID: agent.TaskID,
AgentProfileID: agent.AgentProfileID,
ContainerID: agent.ContainerID,
Status: string(agent.Status),
Progress: agent.Progress,
StartedAt: agent.StartedAt,
FinishedAt: agent.FinishedAt,
ExitCode: agent.ExitCode,
ErrorMessage: agent.ErrorMessage,
}), nil
}