Commit Graph

52 Commits

Author SHA1 Message Date
Pedram Amini
aed9fb7c95 dropped Aider across the code base and documentation 2026-01-28 20:35:13 -05:00
VVX7
43177df7bf Add support for Factory.ai droid agent.
See: https://factory.ai/product/cli
2026-01-22 14:04:40 -05:00
Raza Rauf
231fe2fd88 chore: format entire codebase with prettier
Run `npm run format` across all TypeScript/TSX files
for consistent code formatting throughout the project.
2026-01-20 02:21:36 +05:00
Pedram Amini
3222239192 ## CHANGES
- Detect agents on SSH remotes via IPC `agents:detect(sshRemoteId)` 🌐
- Show friendly “Unable to Connect” UI when remote agent detection fails ⚠️
- Re-detect agents instantly when switching SSH remote selection in modals 🔁
- Wizard now persists SSH remote choice across step navigation 🧭
- Remote directory validation now checks existence via `fs.readDir` first 📁
- Git repo checks and Auto Run docs lookup now support SSH remote IDs 🛰️
- Directory screen hides Browse button for remote sessions, adds remote hints 📝
- Agent selection UI revamped: name + location dropdown, clearer header 🧩
- Add `showThinking` option to tabs and merged sessions, default false 🧠
- Export `AGENT_DEFINITIONS` for reuse in remote detection logic 📦
2026-01-10 21:58:17 -06:00
Pedram Amini
7edd868ca8 fix: enable YOLO mode by default for OpenCode agents
Adds defaultEnvVars support to AgentConfig interface and sets
OPENCODE_CONFIG_CONTENT with permission allow-all for OpenCode.
This prevents startup hangs caused by external_directory permission
prompts in batch mode.

Closes #158
2026-01-07 15:43:39 -06:00
Pedram Amini
31da3fa8bd ## CHANGES
- OpenCode CLI now uses `run` batch subcommand with positional prompts 🚀
- Dropped `-p` prompt flag for OpenCode JSON mode compatibility 🧩
- Added `noPromptSeparator` for OpenCode positional prompt handling 🧠
- Implemented “Close All Tabs” action for faster session cleanup 🧹
- Implemented “Close Other Tabs” to focus instantly on one tab 🎯
- Implemented “Close Tabs to Left” for browser-style tab management ⬅️
- Implemented “Close Tabs to Right” to prune clutter in one click ➡️
- Wired bulk tab-close handlers through App, Modals, MainPanel, TabBar 🔌
- Enhanced tab context menu with bulk close options and smart disabling 📋
- Updated tests to reflect OpenCode batch mode and UI copy tooltip 🧪
2026-01-06 19:49:01 -06:00
Pedram Amini
ca8587bba8 ## CHANGES
- OpenCode now uses `-p` promptArgs for true YOLO auto-approve mode 🧨
- ProcessManager supports flag-based prompts via new `promptArgs` hook 🧩
- IPC spawn handler now forwards `promptArgs` and respects SSH prompt formatting 🧵
- SSH spawning now uses local home cwd, preventing remote-path ENOENT failures 🏠
- Group chat pipeline propagates `promptArgs` everywhere and logs detection 🔍
- Added regression tests ensuring OpenCode never falls back to `run` mode 🛡️
- Delete confirmations get clearer titles and improved ARIA labels for accessibility 
- Delete modals now show a trash icon in headers for better intent clarity 🗑️
- Document Graph now reads stats/content with SSH remote ID support 🗺️
- FilePreview layer registration stabilized to avoid re-register loops 🌀
2026-01-05 21:11:21 -06:00
Pedram Amini
a043360cbe ## CHANGES
- Centralized Node version-manager bin detection into shared `pathUtils` module 🔧
- Improved nvm/fnm bin discovery with newest-version ordering and deduping 🚀
- Updated process PATH building to use the shared bin-path detector 🧭
- Refactored AgentDetector to reuse shared node-manager bin detection 🧩
- Renamed exported API to `detectNodeVersionManagerBinPaths` and updated tests 🧪
- Added brand-new “Session Statistics” panel to the Agents dashboard tab 📊
- Enhanced Agent Comparison chart to show count and duration together 🧮
- Sorted Agent Comparison bars by duration with clearer percentage semantics 📈
- Fixed Activity Heatmap tooltip overflow by smart viewport-aware positioning 🪟
- Polished heatmap spacing/label alignment for cleaner readability 🎯
2025-12-30 15:27:10 -06:00
Pedram Amini
eea260475b ## CHANGES
- Finds npm-installed CLIs inside nvm/fnm/volta/mise/asdf paths automatically 🔍
- Adds macOS Apple Events entitlement for better automation support 🔐
- Updates Discord invite link across app, docs, and README 🗣️
- Makes FilePreview scroll listener passive for smoother scrolling performance 🏎️
- Refines Activity Heatmap hour labels and spacing for cleaner readability 📊
- Repositions heatmap tooltip slightly above cells for nicer hover UX 🎯
2025-12-30 15:27:09 -06:00
Timm Stokke
1350bf7c74 refactor: consolidate tilde expansion into shared expandTilde
Removes 4 duplicate implementations of tilde expansion (~/) and
consolidates them into a single shared function in pathUtils.ts.

Changes:
- Add optional homeDir param to expandTilde for dependency injection
- Refactor agent-detector.ts to use shared expandTilde
- Refactor ssh-command-builder.ts to use shared expandTilde
- Refactor ssh-config-parser.ts to use shared expandTilde
- Refactor ssh-remote-manager.ts to use shared expandTilde
- Update ssh-command-builder tests to mock os.homedir()

Net reduction: 38 lines of code.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-30 03:57:44 -06:00
Pedram Amini
ec0aba41b8 fix: wizard custom path detection and OpenCode default path
Fixes #99 and #102 - Custom agent paths set in the wizard were not
being synced to the agent detector before refreshing detection,
causing the UI to show "not found" even with valid paths.

Changes:
- Sync custom path to agent detector via setCustomPath before refresh
- Add ~/.opencode/bin to probed Unix paths for OpenCode auto-detection
2025-12-27 13:53:21 -06:00
Pedram Amini
b12f82cd69 ## CHANGES
- Added automatic Windows file logging to persistent debug log path 📝
- Exposed IPC APIs to get log path and toggle file logging 🔌
- Enhanced Windows agent detection logs with paths, extensions, shell hints 🧭
- Promoted spawn-config logging to INFO on Windows for visibility 🔎
- Added prompt previews on Windows to diagnose truncation and formatting 🧩
- Logged command extension and argument counts instead of dumping full args 📊
- Improved Windows shell-escaping diagnostics, highlighting modified arguments 🛡️
- Included full command preview before spawning to simplify reproduction 🧾
2025-12-27 11:23:14 -06:00
Pedram Amini
ac3df7ed36 lints and tests pass 2025-12-25 13:24:07 -06:00
Pedram Amini
c615398efd MAESTRO: Prefix unused catch block error variables with underscore (Phase 2 ESLint fixes)
Renamed 11 unused catch block error variables (error/err/e) to use underscore
prefix (_error/_err/_e) to satisfy ESLint no-unused-vars rule while preserving
the catch clause structure.
2025-12-25 13:23:35 -06:00
Pedram Amini
216a2eb12b fix: expand tilde in custom paths and add macOS path probing for agent detection
Fixes #67 - Claude Code not detected when installed via default macOS installer.

Two issues were causing agent detection failures:

1. Tilde (~) in custom paths wasn't being expanded before filesystem checks.
   Users entering ~/.local/bin/claude as a custom path would fail because
   Node.js fs functions don't understand shell tilde expansion.

2. macOS lacked direct path probing for common installation locations.
   Unlike Windows which had probeWindowsPaths(), macOS relied solely on
   'which' which doesn't find binaries outside PATH or shell aliases.

Changes:
- Add expandTilde() helper to convert ~ to os.homedir()
- Apply tilde expansion in checkCustomPath() before all fs operations
- Add probeUnixPaths() method to directly check known installation paths:
  - ~/.claude/local/claude (default Claude installer location)
  - ~/.local/bin/claude
  - /opt/homebrew/bin/claude (Homebrew Apple Silicon)
  - /usr/local/bin/claude (Homebrew Intel)
  - And equivalent paths for codex, opencode, gemini, aider
- Integrate probeUnixPaths() into checkBinaryExists() as first-pass detection
2025-12-23 13:19:06 -06:00
Pedram Amini
522a70a173 windows compatibility take 4 2025-12-22 17:45:37 -06:00
Pedram Amini
fb5cff244e windows compat issue 2025-12-22 15:34:29 -06:00
Pedram Amini
5830d130b6 windows support 2025-12-22 15:26:18 -06:00
Pedram Amini
5bc2a1254c Windows support take 3 2025-12-22 15:17:48 -06:00
Pedram Amini
b4265499da ## CHANGES
- Terminal agent now defaults to PowerShell on Windows, bash elsewhere! 🚀
- PATH expansion is now platform-aware, including rich Windows install locations! 🎯
- PATH parsing now uses `path.delimiter`, fixing Windows semicolon separation! 🛠️
- Terminal PTY sessions set Windows-friendly HOME, USER, and SHELL values! 
- Base terminal PATH now includes Windows System32 and Git commands reliably! 🧩
- Command runner defaults to platform-appropriate shell, boosting cross-platform usability! 🌍
- `runCommand` adds Windows-specific environment variables for better subprocess behavior! 🔧
- Shell detection now lists Windows shells: PowerShell, pwsh, cmd, WSL! 🔎
- Windows shell detection maps IDs to `.exe` binaries before `where` lookup! 🧠
- Cloudflared CLI detection now searches Windows paths like Scoop/Chocolatey/npm! 🛰️
2025-12-21 15:09:12 -06:00
Pedram Amini
070a3e9002 final polish 2025-12-20 06:55:36 -06:00
Pedram Amini
414699dd77 all test cases passing 2025-12-20 05:08:51 -06:00
Pedram Amini
f634dc43ef ## CHANGES
- Fixed image attachment support for Codex and OpenCode agents 🖼️
- Added file-based image arguments for non-stream agents 📁
- Implemented temp file creation for image attachments 💾
- Enhanced integration tests with image upload capabilities 🧪
- Improved cleanup of temporary image files on exit 🧹
- Fixed lightbox keyboard navigation after image deletion ⌨️
- Repositioned thinking status dropdown to prevent overflow 📍
- Added proper image argument builders for each agent 🔧
- Streamlined image handling across different agent types 🎯
- Enhanced process manager with multi-image support 🚀
2025-12-19 13:55:07 -06:00
Pedram Amini
5daf3e201f OAuth enabled but no valid token found. Starting authentication...
Found expired OAuth token, attempting refresh...
Token refresh successful
## CHANGES

- Updated context window documentation for GPT-5.2 model (200K tokens) 🚀
- Fixed callback declaration order to prevent state reference issues 🔧
- Replaced async useEffect with synchronous state broadcasting for mobile 📱
- Added sessionId to Auto Run synopsis for better history tracking 📊
- Introduced updateBatchStateAndBroadcast wrapper for immediate updates 
- Enhanced mobile client state synchronization without render delays 🏃
- Fixed React Strict Mode compatibility for state updates 🛡️
- Improved real-time batch processing state propagation 🔄
- Removed dependency on React's render cycle for broadcasts 🎯
- Ensured immediate state updates reach web interface clients 🌐
2025-12-18 15:54:27 -06:00
Pedram Amini
416f373f63 ## CHANGES
- Added Sentry crash reporting for error tracking and debugging 🐛
- Implemented opt-out privacy setting for anonymous crash reports 🔒
- Enhanced agent spawning with generic config options for session continuity 🔧
- Fixed tab creation null safety checks across the codebase 🛡️
- Added Edit Agent action to Quick Actions modal for faster access 
- Enabled bookmark toggle directly from Quick Actions menu 📌
- Improved batch processing to run in read-only mode by default 📝
- Cleaned up queued items display by removing redundant tab indicators 🧹
- Strengthened null checks in tab helper functions for stability 💪
- Updated version to 0.9.1 with comprehensive bug fixes and improvements 🚀
2025-12-17 23:22:02 -06:00
Pedram Amini
9857b87473 OAuth enabled but no valid token found. Starting authentication...
Found expired OAuth token, attempting refresh...
Token refresh successful
## CHANGES

- Added Aider as a new agent option in the interface 🤖
- Improved agent-specific configuration options in modal dialogs 🔧
- Enhanced playbook dropdown to support longer names dynamically 📏
- Fixed cost tracker widget display for all usage scenarios 💰
- Added back button navigation to the Maestro Wizard interface ⬅️
- Improved markdown generation in wizard document creation flow 📝
- Fixed keyboard shortcut isolation in wizard to prevent conflicts ⌨️
- Enhanced agent output parsing for OpenCode and Codex agents 🔍
- Added YOLO mode argument handling for auto-approval features 
- Renamed "Ungrouped" sections to "Ungrouped Agents" for clarity 📁
2025-12-17 21:43:11 -06:00
Pedram Amini
142c022e2c ## CHANGES
- Added user-configurable context window settings for agents 🎯
- Improved error detection to only parse JSON events, not text 🛡️
- Fixed stderr routing for AI processes to correct tabs 🔧
- Added context window support for Codex with model detection 🧮
- Hide context usage widget when window size is zero 👻
- Added number input type for agent configuration options 🔢
- Strip ANSI codes from stderr for cleaner output 🧹
- Added hint for enabling loop mode with documents 💡
- Display correct provider name in input placeholder text ✏️
- Improved network error patterns to reduce false positives 🎯
2025-12-17 18:32:38 -06:00
Pedram Amini
a8d3e06ad0 # CHANGES
- Added requiresPromptToStart capability for agent configurations 🚀
- Fixed Codex batch mode args handling for exec subcommand 🔧
- Enhanced agent spawn logic to skip eager spawn when needed 
- Improved slash command support for all agent types 💬
- Added multi-provider support to synopsis generation 🌐
- Enhanced debug logging for spawn configuration details 🔍
- Fixed batch mode argument ordering for proper execution 📦
- Improved agent capability checks throughout the codebase 
- Added toolType parameter passing for multi-agent support 🤖
- Updated UI to show custom paths in expandable agent cards 🎨
2025-12-17 13:45:35 -06:00
Pedram Amini
a17659d408 ## CHANGES
- Added support for **OpenAI Codex** and **OpenCode** agents! 🚀
- Multiple AI coding agents now available beyond Claude Code 🤖
- Custom CLI arguments can be configured per agent type ⚙️
- Resume sessions with agent-specific session ID arguments 🔄
- Fixed race conditions in AutoRun content synchronization 🔧
- Improved performance for long content handling in tests 
- Added canceled log entries when interrupting AI sessions 📝
- Enhanced queued items filtering by active tab context 🎯
- Multi-provider synopsis generation for batch processing tasks 📊
- Updated agent detection to support extensible tool types 🛠️
2025-12-17 13:11:33 -06:00
Pedram Amini
ad4af64604 OAuth enabled but no valid token found. Starting authentication...
Found expired OAuth token, attempting refresh...
Token refresh successful
I'm ready to analyze your GitHub project changes and create an exciting update summary! However, I don't see any input provided after "INPUT:" in your message.

Please share the changelog, commit history, pull request descriptions, or any other information about what has changed in your GitHub project since the last release. This could include:

- Git commit logs
- Pull request summaries
- Release notes draft
- Feature descriptions
- Bug fixes
- Any other relevant changes

Once you provide the input, I'll create a clean, exciting CHANGES section with 10-word bullets and relevant emojis as requested! 🚀
2025-12-17 10:58:56 -06:00
Pedram Amini
501d4d8b03 MAESTRO: Implement Phase 6.5 - Codex YOLO mode enabled by default
Add YOLO mode (--dangerously-bypass-approvals-and-sandbox) to Codex base
args, making it behave consistently with Claude Code. Maestro requires
YOLO mode for non-interactive automation.

Changes:
- Add YOLO flag to Codex base args in agent-detector.ts
- Update YOLO flag filtering to include Codex flag when read-only mode active
- Add codex to batch mode agents list in useInputProcessing.ts
- Update App.tsx flag filtering (2 locations) for read-only compatibility

When read-only mode is enabled, the YOLO flag is filtered out and replaced
with --sandbox read-only, preserving the read-only toggle functionality.
2025-12-16 23:48:47 -06:00
Pedram Amini
2f6292ab30 MAESTRO: Implement Phase 5 - Codex Process Manager Integration
Wire Codex CLI into the process spawning and output handling system:

- Add yoloMode support to ProcessConfig interface and process handler
- Implement YOLO mode argument builder (--dangerously-bypass-approvals-and-sandbox)
- Implement working directory argument builder (-C dir)
- Process handler now supports: batchModePrefix, jsonOutputArgs, resumeArgs,
  readOnlyArgs, yoloModeArgs, workingDirArgs
- Output parser already wired through getOutputParser(toolType)
- Reasoning tokens already handled in CodexOutputParser.extractUsageFromRaw()

All 10,985 tests pass.
2025-12-16 23:26:33 -06:00
Pedram Amini
29239de3c6 MAESTRO: Implement Phase 2 - Codex Agent Definition Configuration
Add Codex CLI agent configuration with verified capabilities:

- Rename agent ID from 'openai-codex' to 'codex' to match ToolType
- Add AGENT_DEFINITIONS entry with CLI argument builders:
  - batchModePrefix: ['exec']
  - jsonOutputArgs: ['--json']
  - resumeArgs: session resume support
  - readOnlyArgs: ['--sandbox', 'read-only']
  - yoloModeArgs: ['--dangerously-bypass-approvals-and-sandbox']
  - workingDirArgs: ['-C', dir]
- Define verified capabilities in AGENT_CAPABILITIES
- Add yoloModeArgs and workingDirArgs to AgentConfig interface
- Update tests for openai-codex -> codex rename
2025-12-16 23:14:43 -06:00
Pedram Amini
4ba6503a89 MAESTRO: Implement Phase 7.2 - Model discovery for OpenCode
Add model discovery functionality to AgentDetector:
- Added discoverModels(agentId, forceRefresh?) method to discover available models
- Added clearModelCache(agentId?) method to clear cached model results
- Implements 5-minute cache TTL to avoid repeated CLI calls
- OpenCode: runs 'opencode models' and parses one model per line output
- Added IPC handler 'agents:getModels' for renderer access
- Updated preload.ts with window.maestro.agents.getModels() API
- Added comprehensive unit tests (13 new tests covering discovery, caching, cache clearing, error handling)
2025-12-16 23:00:52 -06:00
Pedram Amini
a8b54da75e MAESTRO: Implement Phase 7.1 - Model configuration for OpenCode
Add model selection capability and configuration UI for OpenCode agent:

- Add supportsModelSelection to AgentCapabilities interface
- Set supportsModelSelection: true for OpenCode, false for others
- Add model config option to OpenCode with text input and argBuilder
- Update AgentSelectionPanel to render text type config options
- Add unit tests for model config option argBuilder

This enables users to configure which model OpenCode uses (e.g.,
'ollama/qwen3:8b', 'anthropic/claude-sonnet-4-20250514') through the
Settings panel. When left empty, OpenCode uses its default model.
2025-12-16 22:56:50 -06:00
Pedram Amini
b30e695b67 MAESTRO: Document OpenCode Ollama configuration and add modelArgs builder
- Add comprehensive provider/model configuration section to AGENT_SUPPORT.md
- Document Ollama setup with complete JSON schema example
- Include LM Studio and llama.cpp configuration examples
- Document context window workaround for Ollama (num_ctx)
- Add model selection methods (CLI flag, config file, interactive)
- List Maestro integration considerations for future UI work
- Add modelArgs builder to AgentConfig interface
- Add modelArgs to OpenCode agent definition
- Reference official OpenCode documentation sources
2025-12-16 22:40:07 -06:00
Pedram Amini
176d3964c9 MAESTRO: Implement Phase 4 - Add OpenCode agent definition with argument builders
Extended AgentConfig interface with new fields for dynamic CLI construction:
- batchModePrefix: Args added before base args for batch mode (e.g., ['run'])
- jsonOutputArgs: Args for JSON output format (e.g., ['--format', 'json'])
- resumeArgs: Function to build resume args (e.g., ['--session', sessionId])
- readOnlyArgs: Args for read-only/plan mode (e.g., ['--agent', 'plan'])

Updated OpenCode entry in AGENT_DEFINITIONS with all argument builders.

Updated OpenCode capabilities based on verified investigation:
- supportsImageInput: true (documented -f, --file flag)
- supportsSessionStorage: true (~/.local/share/opencode/storage/)
- supportsCostTracking: true (part.cost in events)
2025-12-16 22:36:52 -06:00
Pedram Amini
d8aa7bcfd4 MAESTRO: Implement Phase 1 of multi-provider refactor - Foundation (Types & Capabilities)
Phase 1 establishes the capability system that drives feature availability per agent:

- Create src/main/agent-capabilities.ts with AgentCapabilities interface
  - Defines 12 capability flags (supportsResume, supportsImageInput, etc.)
  - Capability definitions for all known agents (claude-code, terminal, opencode, etc.)
  - Helper functions: getAgentCapabilities(), hasCapability()
  - DEFAULT_CAPABILITIES constant for unknown agents

- Update agent-detector.ts to include capabilities in AgentConfig
  - Added capabilities field to AgentConfig interface
  - Capabilities dynamically populated during agent detection
  - Re-export AgentCapabilities for convenience

- Add IPC handler agents:getCapabilities in agents.ts
  - Returns capability object for given agent ID
  - Exposed via window.maestro.agents.getCapabilities()

- Create useAgentCapabilities React hook
  - Location: src/renderer/hooks/useAgentCapabilities.ts
  - Returns capabilities with loading state
  - Includes hasCapability() helper function
  - Cache management utilities for performance

- Write comprehensive tests
  - src/__tests__/main/agent-capabilities.test.ts (20 tests)
  - Updated src/__tests__/main/agent-detector.test.ts (51 tests)
  - All 71 tests pass
2025-12-16 19:52:30 -06:00
Pedram Amini
4aa5398b9f OAuth enabled but no valid token found. Starting authentication...
Found expired OAuth token, attempting refresh...
Token refresh successful
I'd be happy to help you create a clean update summary for a GitHub project! However, I don't see any input provided after "INPUT:" in your message.

Could you please share the changelog, commit history, or release notes that you'd like me to summarize? Once you provide that information, I'll create an exciting CHANGES section with 10-word bullets and relevant emojis as requested.
2025-12-11 01:10:23 -06:00
Pedram Amini
0e7156ca41 I'd be happy to help you create a clean update summary for your GitHub project! However, I notice that you haven't provided the actual input content after "INPUT:" at the end of your message.
Could you please share:
- The commit history, pull requests, or changelog since the last release
- Any release notes or development updates
- Or any other information about what has changed in your project

Once you provide that information, I'll create an exciting CHANGES section with clean 10-word bullets and relevant emojis, formatted in Markdown with HTML links as requested.
2025-12-06 02:50:03 -06:00
Pedram Amini
b803468129 feat: Always enable YOLO mode for Claude Code
Maestro requires --dangerously-skip-permissions to function properly.
Removed the optional checkbox and made it always-on.
2025-12-01 16:35:58 -06:00
Pedram Amini
0904e8ca69 feat: Title bar context, achievement UX, and UI polish
Title Bar:
- Add centered context text showing Group | Agent | Session info
- Text remains draggable and non-selectable

Standing Ovation Achievements:
- Replace white glow background with confetti burst animation
- Confetti shoots from center and animates behind the modal
- Logarithmic scale for time sliders in Developer Playground
- Better control over badge level testing across the full range

UI/UX Improvements:
- Markdown list rendering: proper spacing, indentation, inline paragraphs
- Process Monitor: fix text truncation with flex layout
- LogViewer: persist selected filter levels across sessions
- Tab completion: prevent focus change on empty input in terminal mode
- SessionList: fix useEffect dependency causing unnecessary re-renders
- NewInstanceModal: hide internal 'terminal' agent from selection UI

Bug Fixes:
- Session persistence: properly filter non-persistable tab fields
- Agent detector: add hidden flag for internal-only agents
2025-12-01 15:42:05 -06:00
Pedram Amini
70879ea29e feat: Update supported agent names and ordering
- Replace Aider with Gemini CLI (gemini-cli)
- Replace Qwen Coder with Qwen3 Coder (qwen3-coder)
- Replace CLI Terminal with OpenAI Codex (openai-codex)
- Reorder agents: Claude Code, OpenAI Codex, Gemini CLI, Qwen3 Coder
- Update agent definitions in agent-detector.ts
- Update mobile web components (AllSessionsView, SessionPillBar)
- Update documentation (CLAUDE.md, README.md)
2025-12-01 12:34:37 -06:00
Pedram Amini
67894a2bf3 MAESTRO: Preserve AI context when command is interrupted
Switch Claude Code from --output-format json to stream-json mode so that
the session_id is captured early in the response stream rather than only
at process exit. This ensures that when a user interrupts an AI command,
the next command can still --resume the same Claude session, preserving
all context including the interrupted partial response.

Changes:
- Updated agent-detector.ts to use stream-json output format with --verbose
- Updated process-manager.ts to detect stream-json mode from args
- Simplified image handling since base args now include stream-json output
2025-11-28 06:51:06 -06:00
Pedram Amini
0ecec1cc75 refactor: Web interface as true remote control with code deduplication
Major architectural improvement to ensure web interface operations go through
the same code paths as desktop, eliminating duplicate logic and race conditions.

Key changes:
- Fix AgentDetector running 20+ times at startup via promise deduplication
- Web commands now forward to renderer's processInput instead of spawning directly
- Mode switching forwards to desktop instead of just acknowledging requests
- Interrupt forwards to desktop to properly update session state to idle
- Add IPC channels: remote:executeCommand, remote:switchMode, remote:interrupt
- Add mobile MessageHistory component for viewing session AI/shell logs

Architecture now ensures single source of truth:
  Web → IPC → Renderer (same code path as desktop)
2025-11-28 00:53:01 -06:00
Christian Beedgen
2d753bd520 Gack formatting 2025-11-26 20:20:20 -05:00
Christian Beedgen
a3d7ad1fee Add .claude/local which is where claude was hiding on my box 2025-11-26 20:15:12 -05:00
Pedram Amini
e3339fb792 production claude code access bugfix 2025-11-26 06:01:16 -06:00
Pedram Amini
787fe43990 fix: improve Claude Code batch mode handling and robustness
- Change Claude Code output format from text to json for structured parsing
- Add -- separator to ensure prompts are treated as positional args
- Fix batch mode detection to include both 'claude' and 'claude-code' tools
- Add debug logging for spawn and stdout data to aid troubleshooting
- Add "establishing session" message for first Claude interactions
- Fix input capture timing by capturing value before clearing state

These changes improve reliability when spawning Claude in batch mode
and prevent issues where prompts starting with -- could be misinterpreted
as command flags.
2025-11-24 04:23:22 -06:00
Pedram Amini
66e18e24d6 feat: add PTY support for AI agents requiring TTY
- Add requiresPty field to AgentConfig interface
- Update ProcessManager to spawn AI agents with PTY when needed
- Configure Claude Code with --print and --output-format text flags
- Maintain backward compatibility with non-PTY agents

This enhancement allows AI agents like Claude Code to run with
pseudo-terminal support for proper TTY handling, while preserving
the existing dual-process architecture for terminal sessions.
2025-11-24 03:29:18 -06:00