Commit Graph

91 Commits

Author SHA1 Message Date
Carlos Florêncio efd36ffbb7 feat: http logging middleware + mcp random port (#74) 2026-01-22 02:27:14 +00:00
João Salavisa 89d7f10211 feat: add session turns with duration display and live timer (#72) 2026-01-21 23:35:29 +00:00
Carlos Florêncio 51e55a06d3 feat: refactored chat input panels + pie context (#70) 2026-01-21 20:54:41 +00:00
João Salavisa 8dd88e8c60 refactor: comprehensive code quality improvements (#69) 2026-01-21 19:49:36 +00:00
João Salavisa fba868d3fe feat: dynamic model switching and session status fix (#68) 2026-01-21 17:19:50 +00:00
João Salavisa c57a82f81d feat(mcp): add embedded MCP server with dual transport support (#67) 2026-01-21 12:03:46 +00:00
João Salavisa fa8364307f fix: use AGENTCTL_PORT env var for backend ControlClient (#63) 2026-01-21 11:39:14 +00:00
João Salavisa dea2a07cfa feat: add context window usage display to task session (#66)
* feat: add context window usage display to task session

- Add TokenUsageDisplay component showing context window usage as a horizontal progress bar
- Add useSessionContextWindow hook with proper Zustand reactivity (subscribe to primitives)
- Add ContextWindowState to store with setContextWindow action
- Backend: propagate context_window data through orchestrator, watcher, and lifecycle events
- WebSocket handler extracts context_window from session.state_changed metadata
- Display positioned on left side of action bar, updates in real-time

* refactor: remove agent stream event WebSocket broadcasting

Agent stream events (message_chunk, tool_call, etc.) are now handled
internally by the lifecycle manager rather than being broadcast to
the frontend. Messages are accumulated and flushed as comments at
step boundaries.
2026-01-21 02:47:20 +00:00
Carlos Florêncio 93251b48ce feat: mcp servers + executors (#60)
* feat: mcp servers

* feat: mcp executors

* feat: mcp per agent profile

* feat: improve side bar

* feat: add reactive executors crud
2026-01-21 01:13:20 +00:00
Carlos Florêncio 7a1bb89fa9 feat: improve repository list setting (#65) 2026-01-21 00:42:49 +00:00
João Salavisa 9a8e3f8790 feat: implement turn cancellation for agent sessions (#64) 2026-01-20 23:50:10 +00:00
Carlos Florêncio 011009109c feat: custom branch prefix (#58)
* feat: custom branch prefix

* feat: improve ui
2026-01-20 23:15:08 +00:00
Carlos Florêncio fafd571728 feat(notifications): add system provider 2026-01-20 09:35:22 +00:00
João Salavisa 086c7c4bac feat: Add PR creation via gh CLI and improve git operations (#57) 2026-01-20 02:33:58 +00:00
Carlos Florêncio 6ec8b31e6b feat: kanban page refactoring (#52)
* feat: kanban page refactoring

* feat: remove mds
2026-01-20 02:02:34 +00:00
Carlos Florêncio 3286fd54c8 feat: settings data loading per page (#51) 2026-01-20 00:47:26 +00:00
Carlos Florêncio 0ac6a87132 feat: preview panel option (#49)
* feat: preview panel option

* feat: improved card navigation
2026-01-19 23:49:06 +00:00
Carlos Florêncio 92ada0ad22 feat: custom prompts (#48)
* feat: custom prompts

* feat: settings improvements
2026-01-19 23:48:58 +00:00
João Salavisa ecff207765 fix: refactor shell streaming to use event bus pattern (#50) 2026-01-19 23:47:35 +00:00
João Salavisa 7e43534cd2 refactor: remove auggie-specific code and use standard ACP protocol (#47)
- Remove ProtocolAuggie constant and AuggieAdapter
- Remove hooks system (HooksRegistry, AgentHooks, AuggieHooks)
- Remove PreGeneratedSessionID and SessionDir fields
- Change auggie-agent to use standard 'acp' protocol in agents.json
- Add model select dropdown to profile settings page
- Fix unused variable lint warnings

Auggie now uses the standard ACP protocol flow like other agents.
The --resume flag was found to not work in ACP mode, so the
workaround was unnecessary since session/new returns valid session IDs.
2026-01-19 22:41:00 +00:00
Carlos Florêncio c769e69ed7 feat: improve list agents 2026-01-19 00:16:38 +00:00
Carlos Florêncio 9adf40e0cc feat: multiple editors support (#41) 2026-01-19 00:01:14 +00:00
Carlos Florêncio bc6a5f28d9 feat: cli launcher npx kandev (#39)
* feat: cli launcher

* feat: improved debug
2026-01-18 20:42:03 +00:00
Carlos Florêncio 16b3fb5b92 feat: improve chat UX (#38) 2026-01-18 17:26:41 +00:00
João Salavisa 18f4b4e6fb Cleanup deprecated code and fix session recovery (#37) 2026-01-18 15:58:56 +00:00
João Salavisa 6e98665fd1 fix: improve session terminal and git status handling (#34) 2026-01-18 02:44:30 +00:00
João Salavisa dd68da4275 refactor: unify permission requests into agent event stream (#31) 2026-01-17 22:21:10 +00:00
Carlos Florêncio dce2c6fe40 feat: remove premature executor deletion 2026-01-17 19:42:44 +00:00
Carlos Florêncio fb042e4c59 feat: session refactor (#30) 2026-01-17 19:02:22 +00:00
Carlos Florêncio 64a540bc8a feat: shell selector (#27) 2026-01-17 02:00:34 +00:00
Carlos Florêncio a397833ea1 feat: task switcher column (#26) 2026-01-17 01:17:03 +00:00
João Salavisa 8ed33588df feat: inline permission approval for tool calls (#25) 2026-01-17 01:00:49 +00:00
Carlos Florêncio 72427602db feat: notifications (#24) 2026-01-16 23:14:09 +00:00
João Salavisa 2e108b040f refactor: session resumption cleanup and AgentInstance → AgentExecution rename (#23)
* feat: session resumption with ACP session ID support

- Add useSessionResumption hook for automatic session recovery on page reload
- Fix ACPSessionID not being set on AgentInstance in Launch() and createInstance()
- Add task.session.status and task.session.resume WebSocket actions
- Fix shell terminal retry logic for resumed sessions
- Fix taskSessionState reading from Zustand store instead of local state
- Remove dead code: unused stream handling functions in lifecycle/manager.go
- Fix test mock interfaces (CleanupStaleInstanceByTaskID, NewManager signature)
- Add enhanced logging for session resumption debugging
- Simplify page-client.tsx state merging logic

* refactor: remove unused AgentController (dead code)

- Delete agent_controller.go - entirely unused duplicate of Manager methods
- Remove agentController field from Manager struct
- Remove AgentController initialization in NewManager

The AgentController duplicated StartAgentProcess, initializeACPSession, and
PromptAgent from Manager but was never called. All agent control operations
go through Manager's own methods.

* refactor: remove unused MemoryRepository (dead code)

- Delete memory.go - entire MemoryRepository implementation unused
  (replaced by SQLite repository)
- Delete memory_test.go - tests for removed MemoryRepository

Found via 'deadcode' tool analysis.

* refactor: consolidate agentctl packages into server/client structure

Reorganize the confusing dual agentctl packages:
- internal/agentctl/* → internal/agentctl/server/
- internal/agent/agentctl/* → internal/agentctl/client/

Structure is now:
  internal/agentctl/
  ├── client/      - HTTP client for talking to agentctl servers
  │   ├── client.go
  │   ├── standalone.go
  │   ├── acp.go
  │   └── launcher/
  ├── server/      - agentctl server implementation (runs in containers)
  │   ├── api/
  │   ├── adapter/
  │   ├── acp/
  │   ├── config/
  │   ├── instance/
  │   ├── process/
  │   └── shell/
  └── types/       - Shared types used by both client and server

Also consolidated shared types (GitStatusUpdate, FileInfo, etc.) from
process/types.go into the shared types/ package.

* refactor: rename AgentInstance to AgentExecution for clarity

Rename AgentInstance -> AgentExecution across the entire codebase to better
reflect what it represents: an agent actively working on a task, not just
a generic 'instance'.

Changes:
- AgentInstance struct -> AgentExecution
- InstanceStore -> ExecutionStore (new file: execution_store.go)
- RecoveredInstance -> RecoveredExecution
- All method names: GetInstance* -> GetExecution*, ListInstances -> ListExecutions, etc.
- All parameters: instanceID -> executionID
- All local variables: instance -> execution
- DTOs and JSON tags: agent_instance_id -> agent_execution_id
- Database columns: agent_instance_id -> agent_execution_id

Also consolidates duplicate prompt logic:
- Merge sendInitialPrompt and SendPrompt into single SendPrompt method
- Add validateStatus parameter to differentiate initial vs follow-up prompts

Also extracts ACP session management to session.go:
- Move initializeACPSession logic to SessionManager.InitializeAndPrompt
- Move PromptAgent logic to SessionManager.SendPrompt
- Manager now delegates to SessionManager for all prompt operations

Also removes duplicate event publishing:
- Remove 9 duplicate m.publish*() methods from manager.go
- Use existing EventPublisher methods via m.eventPublisher.Publish*()

Also extracts types to dedicated file:
- Move AgentExecution, LaunchRequest, PromptResult, etc. to types.go

Net reduction: ~600 lines removed from manager.go through deduplication
and better separation of concerns.

* fix(backend): Docker runtime now creates instance via ControlServer

The Docker runtime was incorrectly creating an agentctl.Client pointing
directly to port 9999 (the ControlServer port), then trying to call
instance-specific APIs like /api/v1/agent/configure which only exist
on per-instance servers.

Fixed by making Docker runtime follow the same flow as standalone mode:
- LaunchContainer now uses StandaloneCtl to create an instance via the
  control API, then creates Client pointing to the instance port
- RecoverInstances queries the ControlServer to get the instance port
- Added waitForHealth helper to wait for agentctl to be ready

Also improved HTTP error handling in agentctl client:
- All client methods now check HTTP status codes before JSON decoding
- Better error messages include status code and response body

* fix: restore session resumption imports and variables

* fix: add sessionId prop back to TaskLayout
2026-01-16 22:14:19 +00:00
Carlos Florêncio 5085169696 feat: improved chat experience (#22) 2026-01-16 17:42:32 +00:00
Carlos Florêncio 2b38197b31 feat: improve onboarding and task setup (#21) 2026-01-16 15:51:26 +00:00
Carlos Florêncio 41bad65020 feat: task_session_worktrees 2026-01-16 01:59:00 +00:00
João Salavisa f86044c083 feat: Interactive shell terminal for agent tasks (#19) 2026-01-16 01:54:06 +00:00
Carlos Florêncio 4560901d35 feat: flaky resume sessions 2026-01-15 23:40:20 +00:00
Carlos Florêncio 712610e428 feat: rename agent_sessions to task_sessions 2026-01-15 20:31:39 +00:00
Carlos Florêncio b96e6df11f fix: typescript errors 2026-01-15 19:49:41 +00:00
Carlos Florêncio 84252719b4 feat: right panel overlay 2026-01-15 18:27:05 +00:00
Carlos Florêncio 7d0905b8cb feat: tasks refactor 2026-01-15 18:25:42 +00:00
Carlos Florêncio 44abff6493 feat: improved chat ui topbar 2026-01-15 02:55:50 +00:00
Carlos Florêncio 004fb20618 feat: chat improved renderer and comments pagination 2026-01-15 02:23:09 +00:00
João Salavisa af7fb84a53 fix: address code review issues (#16) 2026-01-14 23:12:12 +00:00
Carlos Florêncio 79bdee07db feat: tanstack virtual 2026-01-14 21:12:33 +00:00
Carlos Florêncio e965524590 feat: task comments SSR fetch 2026-01-14 20:52:22 +00:00
Carlos Florêncio 5813bd8f14 feat: cmd+enter in task chat 2026-01-14 19:07:34 +00:00
João Salavisa 82e8c8905b 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
2026-01-14 12:29:58 +00:00