Commit Graph

46 Commits

Author SHA1 Message Date
Mohamed Boudra
7c1517d830 feat(server): add Playwright MCP with headless mode to spawned Claude agents
Spawned agents now get Playwright browser automation capabilities by default.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 05:08:56 +00:00
Mohamed Boudra
e80989ea78 perf: remove raw field from timeline items to reduce payload size
Remove the `raw` field that was duplicating provider data in timeline
items, reducing WebSocket payload sizes by 64-85%:
- session_state: ~320KB → ~48KB
- agent_stream_snapshot: ~320KB → ~114KB

Changes:
- Remove raw from AgentTimelineItem, AgentStreamEvent, AgentPermissionRequest
- Remove raw assignments from claude-agent.ts and codex-agent.ts
- Remove provider_event handling from stream.ts (only used for Codex raw)
- Update tests to reflect new behavior

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-28 18:20:33 +00:00
Mohamed Boudra
ae4678bca8 fix: eliminate duplicate WebSocket messages during agent history priming
- Skip dispatching individual agent_stream events when replaying history
  (the snapshot is sent after priming anyway, so individual events were wasted)
- Add WebSocket message logging on client (type, size, id) for debugging
- Change default daemon URL from dev to localhost
- Clean up unused imports in session.ts

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-28 17:44:07 +00:00
Mohamed Boudra
1b019c4688 chore: update android scripts and add dev runner with IPC restart support 2025-11-28 11:39:31 +01:00
Mohamed Boudra
b97ae99b2b feat(app): add Android product flavors and env-based daemon config 2025-11-28 08:19:41 +01:00
Mohamed Boudra
08dc2ed937 feat(app): add zustand store for session state management 2025-11-27 21:36:03 +01:00
Mohamed Boudra
bf58e81ce8 refactor(app): simplify session directory with direct snapshots and add sessionReady state
Replace subscription-based session accessor pattern with direct snapshot updates in daemon connections context. Add sessionReady flag to connection state to track when initial agent list has been received. Auto-select first ready host in create agent modal. Migrate from app.json to app.config.js. Add android:release script and Playwright testing docs.
2025-11-27 21:06:48 +01:00
Mohamed Boudra
670c38ab8c Remove legacy host auto-connect state 2025-11-26 18:53:53 +01:00
Mohamed Boudra
db87f331fb Remove primary host plumbing 2025-11-26 18:30:04 +01:00
Mohamed Boudra
e6d2998904 Remove primary host concept 2025-11-26 17:51:25 +01:00
Mohamed Boudra
04d51fbe10 Rename daemon UI copy to host 2025-11-26 17:26:25 +01:00
Mohamed Boudra
59967aad87 chore: land multi-daemon rollout 2025-11-26 08:47:49 +00:00
Mohamed Boudra
4ab79b1a50 feat: add multi-daemon support with session routing and connection management
Introduce DaemonRegistry and DaemonConnections contexts for managing multiple server connections. Add session directory for aggregating agents across daemons, with automatic routing based on agent/server context.

Key changes:
- Add daemon profile management (add/edit/remove/set default)
- Implement connection state tracking with reconnection and exponential backoff
- Create useAggregatedAgents hook for unified agent list across daemons
- Add useDaemonSession and useDaemonRequest hooks for daemon-scoped operations
- Update agent routes to include serverId for proper session routing
- Add connection health indicators on home screen and settings
- Persist session snapshots per daemon for faster hydration on reconnect
- Guard screens gracefully when target daemon is offline
- Add React Query for consistent loading/error state management

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-26 08:25:02 +01:00
Mohamed Boudra
30d1b63b2b chore: typecheck and build readiness 2025-11-24 22:31:41 +01:00
Mohamed Boudra
a95184cc5a Fix agent web loading issues 2025-11-23 14:49:29 +01:00
Mohamed Boudra
47a99f5668 Fix reasoning timeline UI and type errors 2025-11-23 14:12:53 +01:00
Mohamed Boudra
95bacf8fc7 feat: add git branch/worktree setup, message queueing, file explorer improvements, and server restart 2025-11-22 23:20:42 +01:00
Mohamed Boudra
9feec81047 feat: improve audio streaming and add wait-for-agent cancellation support 2025-11-16 18:02:13 +01:00
Mohamed Boudra
9dcc8314b2 Add barge-in telemetry 2025-11-15 19:31:27 +01:00
Mohamed Boudra
4bd36c0808 feat: keep agents running during orchestrator speech 2025-11-15 19:21:57 +01:00
Mohamed Boudra
24a245bd17 auto-focus orchestrator agent during realtime 2025-11-15 19:18:39 +01:00
Mohamed Boudra
7284efd0fe Prototype streaming TTS chunks 2025-11-15 19:06:53 +01:00
Mohamed Boudra
8202985bad Interrupt focused agent before realtime turns 2025-11-15 18:35:13 +01:00
Mohamed Boudra
673c6f1594 Abort realtime turn on speech start 2025-11-15 18:21:02 +01:00
Mohamed Boudra
2a02f41182 refactor: implement agent cancellation and deletion with UI controls
Add cancel button during agent runs, real-time mode toggle in all states, and agent deletion via long-press action sheet. Server now handles cancel_agent_request and delete_agent_request messages, cleaning up agent state and notifying clients.
2025-11-15 18:13:04 +01:00
Mohamed Boudra
b45583a2b2 refactor: standardize pending permission keying and user message hydration 2025-11-15 17:36:15 +01:00
Mohamed Boudra
c37e499562 refactor(agent): unify timeline events with tool_call schema and add resume/refresh capabilities 2025-11-15 11:58:41 +01:00
Mohamed Boudra
8cf808b14d refactor(agent): consolidate agent system into unified AgentManager with provider-based architecture
Replace separate ACP and agent-types modules with unified AgentManager using provider pattern. Migrate Claude and Codex implementations to provider-specific clients. Streamline session-agent integration, remove old ACP notification types, and introduce agent timeline events. Delete obsolete documentation and test files. Add AgentRegistry for persistence and agent-stream-based communication pattern.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-15 02:06:09 +01:00
Mohamed Boudra
f766a18d7b refactor(file-explorer): centralize navigation state in session context and optimize initialization 2025-11-11 18:15:46 +01:00
Mohamed Boudra
c5b30ed878 Add read-only file explorer 2025-11-07 20:36:23 +01:00
Mohamed Boudra
086dde30cc feat(agent): add git diff viewer and improve permission handling
- Add git diff viewer screen accessible via agent dropdown menu
- Implement git_diff_request/response WebSocket messages
- Add dropdown menu to agent screen header with "View Changes" option
- Clear pending permissions when starting new agent turn to prevent conflicts
- Treat agent refusals as completed rather than failed state
- Add test coverage for permission handling edge cases
- Configure vitest to run in single-threaded mode for stability
- Remove redundant wrapper in agent stream view

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-26 22:19:16 +01:00
Mohamed Boudra
edf47a24bc refactor(agent): consolidate agent type definitions and add multi-agent-type support 2025-10-26 18:03:03 +01:00
Mohamed Boudra
2c1b5b13fe fix(agent): track initialization state to prevent duplicate agent initialization 2025-10-26 16:28:55 +01:00
Mohamed Boudra
c4bb10d3c9 feat: add voice note recording overlay with transcription feedback and worktree support 2025-10-26 13:48:14 +01:00
Mohamed Boudra
7d1ef63c8f chore(deps): upgrade claude-code-acp to v0.8.4 and optimize image upload implementation 2025-10-26 09:07:41 +01:00
Mohamed Boudra
a3224175ee feat: add image upload support to agent chat with attachment preview 2025-10-26 07:35:06 +01:00
Mohamed Boudra
faf087b3a6 refactor: standardize footer height calculations and alignment across components 2025-10-25 22:14:15 +02:00
Mohamed Boudra
8d591da671 refactor: add dynamic input height, agent sorting, and last activity tracking 2025-10-25 21:56:44 +02:00
Mohamed Boudra
64d1518a6f Prompt is too long 2025-10-25 15:14:44 +02:00
Mohamed Boudra
ff02b500e0 feat: add voice detection gating for TTS playback and optimize agent screen rendering 2025-10-24 15:52:47 +02:00
Mohamed Boudra
f2fe25de23 refactor: implement footer controls context for smooth transitions
Codex implemented a portal/context architecture to eliminate layout jank:

- Created FooterControlsProvider context with register/unregister methods
- GlobalFooter now reserves fixed height (88px + insets) for all modes
- Both AgentInputArea and RealtimeControls stack absolutely in same space
- Single shared Reanimated value drives cross-fade (250ms)
- Agent screen registers controls via context instead of rendering inline
- Content padding adjusted to account for footer height
- Borders and safe area moved to shared container
- AgentInputArea simplified to pure component (no internal animations)

This guarantees:
- No layout shifts during transitions
- Smooth cross-fade between control modes
- No gaps or double borders
- Both controls never occupy layout space simultaneously

Implementation by OpenAI Codex per architectural recommendation.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-24 11:36:17 +02:00
Mohamed Boudra
29e6da8536 feat: add screenshot and settings for Claude, refactor agent stream and orchestrator views
- Introduced a new screenshot image for the app.
- Added local settings for Claude permissions.
- Refactored AgentStreamView and OrchestratorMessagesView to utilize new types for tool calls and permissions.
- Updated ToolCallBottomSheet to handle selected tool calls more efficiently.
- Enhanced type definitions for shared data structures related to tool calls and permissions.
2025-10-23 22:12:02 +02:00
Mohamed Boudra
74fffcd8a3 refactor: optimize audio initialization and fix agent interactions
- Lazy initialize audio (on-demand instead of mount) in both player and Speechmatics hooks
- Add audio session teardown on stop for proper cleanup
- Implement agent audio recording with sendAgentAudio in AgentInputArea
- Fix Android navigation race condition in CreateAgentModal (navigate before closing)
- Add animations to global footer and agent screen (FadeIn/FadeOut)
- Auto-cancel stuck agents when sending new messages
- Fix permission request ID propagation from AgentManager to Session
- Apply theme background color via AppContainer wrapper

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-23 13:15:18 +02:00
Mohamed Boudra
91d691f31d ```
refactor: reset message IDs on new turn and add activity log handlers

- Reset assistant message and thought IDs when starting new agent turn
- Add comprehensive activity log handlers in session context
- Handle tool calls, results, and errors with proper state updates
- Add transcription and assistant chunk streaming handlers
- Improve audio playback with proper error handling and confirmation
- Use generateMessageId() for consistent ID generation
- Filter out transcription activity logs from chat
- Stop audio playback when real speech is detected
```
2025-10-23 12:22:42 +02:00
Mohamed Boudra
41be2d4096 ```
refactor: implement async agent creation flow with loading states

- Add loading states and request tracking to agent creation modal
- Move agent creation logic from parent to modal component
- Add automatic navigation to agent page after creation
- Implement requestId-based response matching for agent_created events
- Add audio output handling in session context
- Improve modal UX with disabled states during creation
```
2025-10-23 12:04:12 +02:00
Mohamed Boudra
8177aa0c2a feat: add home screen with agent list and orchestrator navigation 2025-10-23 11:11:20 +02:00