Commit Graph

365 Commits

Author SHA1 Message Date
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 8b8f8ff20b feat: refactor main, add providers (#46)
* feat: add providers

* feat: further refactor internal packages
2026-01-19 21:26:29 +00:00
Carlos Florêncio cdeb32af18 feat: remove dev db not used (#45) 2026-01-19 20:15:12 +00:00
Carlos Florêncio e25913c697 feat: refactor sqlite usage (#44) 2026-01-19 20:00:20 +00:00
João Salavisa 5d03b48fd9 Remove hardcoded 5-minute timeout for permission requests (#43) 2026-01-19 17:40:10 +00:00
Carlos Florêncio 2582f4b148 test(integration): use temp repo paths (#42) 2026-01-19 16:36:10 +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 535dee7ce0 feat: cli publish (#40) 2026-01-18 21:04:48 +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 3f961365fa chore: remove deprecated backward compatibility code (#36) 2026-01-18 11:07:58 +00:00
João Salavisa 5488f0bb5d fix: make Codex Prompt() synchronous to fix premature task state transition (#35) 2026-01-18 10:43:13 +00:00
Carlos Florêncio ee90f79102 fix: session state after restart 2026-01-18 10:39:08 +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 9ee0052a6b feat(events): add typed event payloads for event bus messages (#32) 2026-01-18 00:25:48 +00:00
Carlos Florêncio 0b66432647 fix: make dev ctrl+c cleanup 2026-01-18 00:23:55 +00:00
Carlos Florêncio edd093c108 feat: start agents on boot 2026-01-18 00:06:35 +00:00
Carlos Florêncio 58cd7425ed feat: improve landing page (#33) 2026-01-17 23:48:23 +00:00
Carlos Florêncio 2c5c9072ed fix: remove extra state transitions during startup resume 2026-01-17 22:54:21 +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 91a4e0551f feat: updated agents.md (#28) 2026-01-17 02:29:40 +00:00
Carlos Florêncio 64a540bc8a feat: shell selector (#27) 2026-01-17 02:00:34 +00:00
jcfs 8c17c01e55 fix: skip tool call update when no active session
- Return early with Debug log when sessionID is empty
- Change Error to Warn for tool call update failures (race condition)
2026-01-17 01:31:53 +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
jcfs 36e169d52f feat(shell): auto-respawn shell session on unexpected exit
When the shell process exits unexpectedly (e.g., user types 'exit' or shell
crashes), automatically respawn it after a 100ms delay. This ensures the
shell is always available for agents.

Only Stop() (called during agentctl shutdown) will permanently terminate
the shell - normal exits trigger respawn.

Changes:
- Add 'stopping' flag to distinguish Stop() from unexpected exit
- Store config for respawn with same settings
- Add respawn() method to restart shell with PTY
- waitForExit() now respawns unless stopping=true
2026-01-16 12:13:53 +00:00
jcfs bb7cb66bd9 fix(codex): resolve deadlock in adapter by not holding mutex during RPC calls
The LoadSession, NewSession, Cancel, and Prompt methods were holding
a.mu.Lock() while waiting for client.Call() to return. The codex client's
readLoop processes incoming messages synchronously, and when codex sends
notifications (like mcp_startup_complete), handleNotification tries to
acquire a.mu.RLock() - which blocks because the exclusive lock is held.
This prevents readLoop from processing the RPC response, causing deadlock.

Fix: Don't hold the mutex while waiting for RPC calls. Instead:
1. Acquire lock briefly to read client and needed fields
2. Release lock before RPC call
3. Acquire lock briefly to write results after call completes

Also reverts codex-agent SessionConfig to ResumeViaACP: true since
thread/resume works correctly when not deadlocked.
2026-01-16 02:39:05 +00:00
João Salavisa 0599800c40 refactor(lifecycle): extract manager into focused components (#20) 2026-01-16 02:24:58 +00:00
Carlos Florêncio 34b86cfab2 feat: add graceful shutdown 2026-01-16 01:59:19 +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
João Salavisa e08fa51684 refactor(agentctl): unify configuration and remove single-instance mode (#18) 2026-01-15 23:57:45 +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 9fda624874 build: improved pre-commit linter config 2026-01-15 20:02:58 +00:00
Carlos Florêncio b96e6df11f fix: typescript errors 2026-01-15 19:49:41 +00:00