Commit Graph

298 Commits

Author SHA1 Message Date
Mohamed Boudra
07ca5222c1 fix(server): use createTestLogger in unit tests
Add createTestLogger utility to provide silent pino loggers for tests.
Update test files that construct AgentRegistry, AgentManager, and
agent clients to pass the required logger parameter.
2026-01-17 13:10:02 +07:00
Mohamed Boudra
45096acdcb fix(server): increase hookTimeout and fix ClaudeAgentClient constructor
- Increase vitest hookTimeout from 30s to 60s to prevent hook timeouts
  in e2e tests that need time to start daemon instances
- Add `**/dist/**` to excludes to avoid running compiled test files
- Fix ClaudeAgentClient constructor call in claude-agent-commands.test.ts
  to pass required logger option
2026-01-17 13:09:42 +07:00
Mohamed Boudra
1c9d9367c1 fix(server): remove CI-based test exclusions from vitest config
Enable full server test suite (including e2e and integration tests) to
run in CI. Removed conditional exclude logic based on CI env var.

The suite now runs the same tests in CI and locally, maintaining
parallel execution support via forks pool.
2026-01-17 12:07:00 +07:00
Mohamed Boudra
d964415eba feat(server): improve task CLI with steering, execution order, and planner guidance
- Fix steering notes to check scope task instead of leaf task
- Fix NOT_DONE replan to use scope for bird's eye view
- Pass reason to planner prompt ("Why you were called" section)
- Add execution-order.ts with reusable computeExecutionOrder and buildSortedChildrenMap
- Make 'tree' an alias for 'plan' command
- Add comprehensive help text for run command and acceptance criteria
- Add planner guidance for propagating requirements to subtasks
2026-01-17 11:46:38 +07:00
Mohamed Boudra
420f25f1e9 feat: add download toast, e2e permission tests, and update favicons
- Add download toast component with progress indicator and auto-dismiss
- Add download store for managing file download state
- Add e2e tests for permission prompts (allow/deny flows)
- Add global setup for e2e tests with isolated daemon instance
- Update favicon assets with new design
- Refactor agent-stream-view to use shared tool-call-details component
- Simplify file-explorer-pane component
- Clean up unused screenshots and PRODUCTION.md

🤖 Generated with [Claude Code](https://claude.com/claude-code)
2026-01-16 20:23:07 +07:00
Mohamed Boudra
ed50c168ad refactor(app): unified panel state machine for mobile sidebars
Replace separate sidebar stores with a unified panel store that uses a
discriminated union state machine on mobile. This makes it impossible
for both the agent list and file explorer sidebars to be open at the
same time on mobile.

Mobile state machine (mobileView):
- 'agent': Main agent view (no overlay panel)
- 'agent-list': Agent list sidebar (left overlay)
- 'file-explorer': File explorer sidebar (right overlay)

Desktop retains independent boolean toggles since sidebars sit
alongside content rather than overlaying it.

Key changes:
- Created stores/panel-store.ts with unified state
- Deleted stores/sidebar-store.ts and explorer-sidebar-store.ts
- Updated all components to use new panel store
- Animation contexts derive isOpen from unified state
2026-01-16 16:19:49 +07:00
Mohamed Boudra
b8f056060f feat(server): migrate all logging to pino
- Add pino with pino-pretty for structured logging
- Create root logger in index.ts with child loggers per module
- Support log level via PASEO_LOG env var and config.json
- Support log format (pretty/json) via PASEO_LOG_FORMAT and config.json
- Replace all console.* in runtime code with appropriate log levels
- Scripts use process.stdout/stderr for output
- Error logging uses correct pattern: logger.error({ err }, msg)
2026-01-15 17:16:01 +07:00
Mohamed Boudra
ef853914d5 feat: improve agent stream view UI, fix history replay timestamps, and enhance planner/worker loop 2026-01-15 15:10:08 +07:00
Mohamed Boudra
5289be9c06 feat(task): add TDD pattern guidance to planner prompt
When top-level task mentions "TDD" or "test-driven", planner now
creates test-first task pairs:
1. Write failing test (must fail for RIGHT reason, not syntax errors)
2. Make test pass (depends on failing test task)

This enforces TDD through task structure rather than acceptance criteria.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
2026-01-15 10:09:39 +07:00
Mohamed Boudra
02b3f83ae2 feat(task): add acceptance criteria, planner/worker/judge loop
- Add acceptanceCriteria field to tasks (structured checklist)
- Add --accept flag to create/update commands (repeatable, append-only)
- Add failed status for catastrophically stuck tasks
- Implement planner/worker/judge agent loop in run command:
  - Planner (gpt-5.2): breaks down tasks, reorganizes tree, writes criteria
  - Worker (sonnet/codex): implements tasks, cannot mark done
  - Judge (haiku): verifies acceptance criteria with no-excuses policy
- Hybrid replanning: after NOT_DONE and every N completions
- Parent tasks blocked until all children are done
- Add getDescendants method for children tree traversal
- Update getReady/getBlocked/getClosed to use children tree for scope

🤖 Generated with [Claude Code](https://claude.com/claude-code)
2026-01-15 10:00:01 +07:00
Mohamed Boudra
86ea9966fc test: exclude claude-agent test in CI 2026-01-14 19:47:09 +07:00
Mohamed Boudra
b6ab9f3bc1 test: exclude more integration tests in CI 2026-01-14 19:44:33 +07:00
Mohamed Boudra
1cbe185ac5 test: exclude e2e and integration tests in CI 2026-01-14 19:42:46 +07:00
Mohamed Boudra
347389965c test: skip opencode integration tests in CI 2026-01-14 19:37:03 +07:00
Mohamed Boudra
aa090748a6 chore: sync all local changes 2026-01-14 19:23:27 +07:00
Mohamed Boudra
70e2d66dd5 feat: persist draft messages and UI refinements
- Add dedicated draft-store with AsyncStorage persistence for drafts
  that survive app refresh/crash
- Reduce markdown bold weight from bold to medium (500)
- Various theme and component style updates
- Server bootstrap and config improvements

🤖 Generated with [Claude Code](https://claude.com/claude-code)
2026-01-14 10:07:54 +07:00
Mohamed Boudra
34a49c147f feat: add smart notification routing with device-aware heartbeats and push support 2026-01-13 16:07:34 +07:00
Mohamed Boudra
7f7f5c53e6 Add server-side client activity tracking for smart notifications
- Add client_heartbeat message type for clients to report activity
- Add shouldNotify field to attention_required events
- Track client activity (focusedAgentId, lastActivityAt) per session
- WebSocketServer checks all sessions to determine shouldNotify
- If any client is active on the agent (within 60s), shouldNotify=false
- Add onAgentAttention callback to AgentManager for clean separation
2026-01-13 11:50:13 +07:00
Mohamed Boudra
2fa7ec17cb WIP: Refactor and polyfill updates
- Add crypto polyfill for Expo
- Update daemon client and websocket server
- Simplify codex agent tests
2026-01-13 11:06:21 +07:00
Mohamed Boudra
868f9fb571 WIP: Large refactor checkpoint
- Refactored daemon client and RPC layer
- Added new client package structure in server
- Removed legacy hooks (use-daemon-request, use-session-rpc, use-websocket)
- Added use-daemon-client hook
- Added e2e test infrastructure with Playwright
- Updated agent providers and session handling
- Removed codex-sdk patches
2026-01-12 13:30:20 +07:00
Mohamed Boudra
f81fd1c01a Add command autocomplete and stream spacing updates 2026-01-11 22:36:34 +07:00
Mohamed Boudra
0ec2fc62db feat(agent): add command support to ClaudeAgentSession
- Add AgentSlashCommand and AgentCommandResult types
- Add listCommands() and executeCommand() to AgentSession interface
- Implement command support in ClaudeAgentSession
- Fix user message handling for local command output (string content)
- Add POC scripts for command investigation
- Add TDD tests for command functionality
2026-01-11 17:16:08 +07:00
Mohamed Boudra
ebabcc09e5 feat: add opencode provider and refactor stream model to head/tail architecture 2026-01-11 16:00:25 +07:00
Mohamed Boudra
42129926ae feat(app): add maestro tests, download progress, and task hierarchy
Add Maestro E2E test flows for app launch and sidebar interactions. Implement download progress tracking with speed/ETA display in file explorer. Extend task CLI with parent-child hierarchy, body content from stdin, and ancestor context in task show. Fix explorer sidebar gesture to allow horizontal scrolling while preserving close swipe. Replace hardcoded monospace font with Fonts.mono constant. Fix RefreshControl to only show spinner on manual pull-to-refresh.
2026-01-10 22:44:57 +07:00
Mohamed Boudra
2d03e86bcb feat: use mnemonic-id for worktree names
Replace prompt-based slugifying with mnemonic-id package for generating
human-readable worktree names like "hungry-hippo". Names are generated
when the worktree toggle is enabled rather than derived from the prompt.
2026-01-09 19:00:41 +07:00
Mohamed Boudra
1a2498e9e7 refactor: remove terminal MCP, Playwright, and commands infrastructure
- Remove terminal/tmux MCP from voice LLM - it now only uses agent-control MCP
- Remove Playwright MCP auto-injection from Claude and Codex agents
- Remove commands state from session, store, and UI
- Remove present_artifact tool and guidelines from voice prompt
- Update agent-prompt.md examples to focus on agents instead of commands
- Remove @huggingface/transformers dependency and test scripts
- Add expandTilde utility to utils/path.ts

🤖 Generated with [Claude Code](https://claude.com/claude-code)
2026-01-09 13:01:26 +07:00
Mohamed Boudra
666a0f2fa6 fix: limit worktree slug length to 50 characters
Truncates at word boundary (hyphen) when possible for cleaner names.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
2026-01-09 11:07:19 +07:00
Mohamed Boudra
3ba778eea7 wip: local changes and task backlog
- Refactor agent-form-dropdowns component
- Simplify app index routing
- Update agent-input-area and message-input
- Improve worktree utility with tests
- Add task backlog for upcoming work
2026-01-09 08:40:16 +07:00
Mohamed Boudra
cc74d6d0d2 feat: remove import agent feature from UI
Remove the import agent functionality from the app while preserving
the underlying resume capability in the agent code.

Changes:
- Remove ImportAgentModal and import flow from create-agent-modal.tsx
- Remove "Import Agent" menu item from agent screen
- Remove "Import" button from home footer
- Remove resumeAgent from session context and store
- Remove list_persisted_agents WS messages from server
- Remove handleListPersistedAgentsRequest handler
- Clean up unused styles and types

The resumeAgent capability remains in the agent manager for potential
future use or internal tooling.
2026-01-08 21:48:48 +07:00
Mohamed Boudra
f2e03c53c1 fix: validate sessionId on resume and respect CLAUDE_CONFIG_DIR
- Use CLAUDE_CONFIG_DIR env var for Claude config location
- Rename tool call name to 'permission' for permission requests
- Update tests to use CLAUDE_CONFIG_DIR instead of HOME
2026-01-08 19:06:03 +07:00
Mohamed Boudra
be33676bb6 fix: resolve interrupt/send message desync in Claude agent
After interrupt(), the SDK query iterator is done and cannot be reused.
Previously we cached the dead query, so messages sent after interrupt
got no response.

Changes:
- Clear this.query and this.input after interrupt() completes
- Await pending interrupt before calling ensureQuery() in processPrompt
- Check for turn supersession after awaiting interrupt
- Pass resume: sessionId when creating new query to preserve history
- Reduce abort test sleep from 60s to 15s (same coverage, faster)
- Add SDK behavior test to verify interrupt() makes query done

🤖 Generated with [Claude Code](https://claude.com/claude-code)
2026-01-08 17:33:55 +07:00
Mohamed Boudra
f51db38e81 fix: validate sessionId on resume and respect CLAUDE_CONFIG_DIR
- Constructor now throws if resuming with handle that has no sessionId
- Removed fallback chain (sessionId ?? nativeHandle ?? null)
- Removed pendingLocalId - no more random UUID generation on resume
- Added validation after run() - throws if sessionId still null
- resolveHistoryPath() now respects CLAUDE_CONFIG_DIR env var
- Added comprehensive resume test that verifies context preservation
- Fixed test helper to also respect CLAUDE_CONFIG_DIR
2026-01-08 15:35:18 +07:00
Mohamed Boudra
d233115ab9 feat: add task management CLI and improve activity curation
- Add task store with dependency tracking and CLI (packages/server/src/tasks/)
- Extract principal param logic to shared util for server/app reuse
- Improve activity curator: collapse timeline, dedupe tool calls, simpler output
- Add MessageInput ref for focus control after agent cancel
- Include recent activity in wait timeout messages

🤖 Generated with [Claude Code](https://claude.com/claude-code)
2026-01-08 14:56:10 +07:00
Mohamed Boudra
0d9a69d00f fix: branch reset on workdir change and Codex MCP server config merge
- Reset git branch to current when user changes working directory in create-agent modal
- Fix Codex MCP servers not being passed from extra.codex.mcp_servers config
- Remove macbook host from default daemons
- Update test expectations and structure

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-07 14:42:16 +07:00
Mohamed Boudra
66881511b6 refactor: simplify tool call display and path handling
- Remove displayName from tool calls, use name directly with icon
- Add medium font weight for tool call badges
- Strip workspace root from file paths at parsing level using Zod schema
- Add accentBorder to tool call badges and git diff file blocks
- Fix user message alignment and vertical spacing
- Deduplicate stripCwdPrefix into tool-call-parsers.ts

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-07 12:38:04 +07:00
Mohamed Boudra
4f3b2317ab wip: tool call structure investigation and e2e tests
- Add debug logging for tool call payloads in agent-stream-view
- Add e2e tests to verify tool call structure for Claude and Codex agents
- Include sidebar toggle and horizontal scroll improvements from previous work

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-07 10:30:29 +07:00
Mohamed Boudra
ed25db4e22 feat(git-diff): server-side syntax highlighting with full file context
- Move syntax highlighting from client to server for proper AST context
- Add highlighted_diff_request/response message types
- Create diff-highlighter and syntax-highlighter utils on server
- Fix TSX dialect to use "ts jsx" for proper TypeScript parsing
- Redesign diff UI: card-style file sections, GitHub Dark theme colors
- Reduce visual clutter: smaller padding, subtle backgrounds

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-06 15:26:09 +07:00
Mohamed Boudra
41b321a621 fix(git-diff): include untracked (new) files in diff output
Uses git ls-files --others to find untracked files and git diff --no-index
to generate diff output showing their content as additions.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-06 08:30:53 +07:00
Mohamed Boudra
0806fd7965 feat(file-explorer): add download progress toast and auto-restart dev server
- Add download status toast (downloading/complete/error) for file downloads
- Update to use expo-file-system's new File API
- Auto-restart dev server on crash (non-zero exit codes)

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-05 23:48:32 +07:00
Mohamed Boudra
33a3031f74 fix(agent): restore MCP wait timeout and fix direct URL navigation
- Restore 50-second self-imposed timeout for agent wait operations in MCP
  server. Returns friendly message instead of letting SDK timeout trigger
  generic "tool failed" error that confuses orchestrator agents.

- Fix direct URL navigation to agent screens by waiting for WebSocket
  connection before initializing. Previously, init would fire before WS
  connected, fail silently, and never retry due to guard ref.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-05 23:47:58 +07:00
Mohamed Boudra
348242541c feat(git-diff): add React Query with pull-to-refresh and cleaner diff display
- Add useGitDiffQuery hook using React Query for caching and revalidation
- Add sendRpcRequest utility for promisified WebSocket RPC with requestId matching
- Add requestId to git_diff_request/response for proper request correlation
- Enable pull-to-refresh via RefreshControl in GitDiffPane
- Auto-revalidate when sidebar opens with "changes" tab active
- Clean up diff display: remove metadata noise, strip +/- prefixes
- Default both sidebars open on web platform

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-05 21:27:35 +07:00
Mohamed Boudra
e8890a2fc1 wip: uncommitted changes
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-03 16:06:40 +07:00
Mohamed Boudra
63247f73b3 feat(file-explorer): add file download with share sheet support 2026-01-01 13:07:51 +07:00
Mohamed Boudra
57a86d011a Add file download tokens over WS and HTTP 2025-12-29 12:12:13 +07:00
Mohamed Boudra
09d4acce4c Clean up Claude agent SDK message conversion
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-29 11:02:02 +07:00
Mohamed Boudra
1200bce7e3 Fix Codex image prompt data URLs 2025-12-29 10:34:43 +07:00
Mohamed Boudra
b559422cb0 Write Codex image attachments to temp files 2025-12-29 10:13:00 +07:00
Mohamed Boudra
a087b085e6 Add multimodal prompt blocks for agent prompts 2025-12-29 09:15:09 +07:00
Mohamed Boudra
d5f5351d37 Add image attachments to agent creation 2025-12-29 09:07:54 +07:00
Mohamed Boudra
29d561725c Fix Codex import list 2025-12-28 23:59:09 +07:00