Commit Graph

47 Commits

Author SHA1 Message Date
Carlos Florêncio ee612a42c5 feat: agents.json refactor (#221) 2026-02-14 15:54:11 +00:00
João Salavisa e2ba35b3bd feat: migrate agent operations from HTTP to WebSocket (#218) 2026-02-13 09:05:40 +00:00
Carlos Florêncio ead9a210f9 feat: add agent boot message (#213) 2026-02-08 23:30:40 +00:00
Carlos Florêncio 0a2ed53327 feat: improve plan mode (#212)
feat: plan mode
2026-02-08 20:38:28 +00:00
Carlos Florêncio daccb38354 feat: improve file tree (#209) 2026-02-07 18:12:23 +00:00
Carlos Florêncio cc17ae7813 feat: queue messages (#201) 2026-02-07 16:04:01 +00:00
João Salavisa 9aee7234d0 cleanup: remove dead FileListUpdate streaming path (#204) 2026-02-07 11:35:51 +00:00
João Salavisa 7066dc9fb1 fix: prevent user shell terminals from prematurely completing agent tasks (#199) 2026-02-06 01:36:46 +00:00
Carlos Florêncio 06f7fe9795 feat: improve session terminals (#185) 2026-02-05 04:09:04 +00:00
João Salavisa 7acdd9619f Fix: Handle untracked and new files in git discard operation (#168) 2026-02-03 21:45:49 +00:00
Carlos Florêncio 7f883deb8f feat: draft pr support (#165) 2026-02-03 04:37:49 +00:00
Carlos Florêncio b22e66750c feat: improved file tree (#164)
feat: improved editor
2026-02-03 04:14:07 +00:00
João Salavisa 07f6808a5d fix: git status tracking - detect staging changes and persist in snapshots (#149) 2026-02-02 01:13:21 +00:00
João Salavisa 5bd298ddc2 feat: Add file editor with diff-based save functionality (#145) 2026-02-02 00:59:48 +00:00
João Salavisa 517b408999 feat: Implement git discard changes functionality (#144) 2026-02-01 22:31:14 +00:00
João Salavisa 9ddf131a05 fix: permission request ID mismatch, SSE duplicates, and subprocess cleanup (#137) 2026-02-01 01:16:54 +00:00
Carlos Florêncio 122deb3b13 feat: add GitHub Copilot CLI and Sourcegraph Amp agent support (#130) 2026-02-01 00:40:56 +00:00
Carlos Florêncio 6d23d68633 feat: improve chat ui messages (#132) 2026-01-31 19:45:33 +00:00
João Salavisa 6eb24006f9 feat: implement task plans feature (#131) 2026-01-31 00:51:17 +00:00
Carlos Florêncio 3f7154e186 feat: chat messages normalized (#121) 2026-01-30 17:16:05 +00:00
João Salavisa 49f98b88ff fix: Multiple bug fixes for agent lifecycle and task creation (#122) 2026-01-29 23:40:02 +00:00
João Salavisa 7f0592cccd feat: implement file referencing with @filename autocomplete in chat input (#118) 2026-01-28 22:17:29 +00:00
João Salavisa d3d43d1df1 feat: Add file unstaging functionality (#107) 2026-01-27 23:17:26 +00:00
João Salavisa 0b573bbdda feat(workflow): implement workflow system with steps terminology (#102) 2026-01-27 01:21:47 +00:00
Carlos Florêncio 7c82ccdf24 feat: improve logging (#105) 2026-01-27 00:18:42 +00:00
Carlos Florêncio 9463ddac9f feat: remove npm warns from terminal + fix terminal render on refresh (#104) 2026-01-26 23:52:28 +00:00
João Salavisa c9355e526b fix: increase prompt timeout to 60min, add error feedback, rename acp to agent API (#97)
* fix: strip origin/ prefix from base branch for rebase/merge operations

The frontend was passing 'origin/main' as the base branch, but the backend
expects just the branch name (e.g., 'main') and constructs 'origin/' itself.

This caused git fetch to fail with:
  fatal: couldn't find remote ref origin/main

Because the command became 'git fetch origin origin/main' instead of
'git fetch origin main'.

* fix: increase prompt timeout to 60min, add error feedback, rename acp to agent API

- Add PromptTimeout constant (60 minutes) in common/constants/timeouts.go
- Update agentctl client and server to use the constant
- Add error message creation when prompt fails (timeout, agent not running, etc)
- Rename /acp/* endpoints to /agent/* (protocol-agnostic naming)
- Rename acp.go files to agent.go in both client and server
- Rename handler functions from handleACP* to handleAgent*
2026-01-25 20:58:30 +00:00
Carlos Florêncio 859eb70908 feat: improve task switch + cli passthrough resume (#98) 2026-01-25 20:14:40 +00:00
Carlos Florêncio ab404261dd feat: cli passthrough state transitions (#95) 2026-01-25 18:37:37 +00:00
Carlos Florêncio 66cda240e0 feat: cli passthrough setting (#93) 2026-01-25 17:49:53 +00:00
João Salavisa d43037bf82 fix: filter upstream commits, fix ahead/behind, and remove duplicate types (#91) 2026-01-25 00:16:01 +00:00
Carlos Florêncio 3b9abea3ca feat: gemini and opencode 2026-01-24 19:03:31 +00:00
Carlos Florêncio eec22dc3bb feat: claude code support (#87) 2026-01-24 13:41:45 +00:00
João Salavisa 39b6e89244 feat: Git status tracking refactor with persistent snapshots and commit history (#86) 2026-01-24 00:41:43 +00:00
Carlos Florêncio 7a7927925e feat: improved codex and auggie default permissions 2026-01-24 00:19:20 +00:00
Carlos Florêncio cff2906712 feat: setup and cleanup script (#80)
fix setup

error messages

feat: codex error handling
2026-01-23 23:36:04 +00:00
Carlos Florêncio 290359f7f0 feat: backend improved comments, logs and agents.md (#77) 2026-01-22 21:18:27 +00:00
Carlos Florêncio 752e6b4655 feat: process runners (#71) 2026-01-22 16:39:13 +00:00
João Salavisa 8dd88e8c60 refactor: comprehensive code quality improvements (#69) 2026-01-21 19:49:36 +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 086c7c4bac feat: Add PR creation via gh CLI and improve git operations (#57) 2026-01-20 02:33: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 5d03b48fd9 Remove hardcoded 5-minute timeout for permission requests (#43) 2026-01-19 17:40:10 +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 64a540bc8a feat: shell selector (#27) 2026-01-17 02:00:34 +00:00
João Salavisa 8ed33588df feat: inline permission approval for tool calls (#25) 2026-01-17 01:00:49 +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