Add token-based auth to API server: when api.token is set and host is not
127.0.0.1/localhost, all /api/* routes require Bearer token or ?token query param.
SSE supports query param since EventSource cannot set headers.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Entire-Checkpoint: 22c5ab501afc
Adds GET /api/events that streams EventBus events to dashboard clients
with optional ?sessionId= filter for session-scoped event subscriptions.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Entire-Checkpoint: 3290361e05d2
Add POST /api/sessions/:id/permission to allow dashboard to resolve pending permission requests. Returns 404 for unknown sessions, 400 when no matching pending permission gate.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Entire-Checkpoint: d80059abc1c2
- handleCancelSession now calls sessionManager.cancelSession() instead of
session.abortPrompt() directly, ensuring status transitions to cancelled
- handleListSessions returns extended fields: createdAt, dangerousMode,
queueDepth, promptRunning, lastActiveAt for dashboard use
- Add getSessionRecord and cancelSession to sessionManager mock
- Update existing list test to use toMatchObject for forward compatibility
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Entire-Checkpoint: 9b2db4989d74
16 tasks covering full feature parity with Telegram adapter.
Fixed critical API mismatches found during review:
- sessionManager.listSessions() not getAllSessions()
- agentManager.getAvailableAgents() not getInstalledAgents()
- core.handleNewSession() positional args not object
- configManager.save() nested objects not dot-paths
- Channel-aware platform storage for Discord snowflakes
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Entire-Checkpoint: f43825efdb0d
Generate a random 64-char hex secret on first start, store at ~/.openacp/api-secret
with 0600 permissions. Validate Bearer token on every request except GET /api/health
and GET /api/version. Update api-client to auto-attach the token, and fix the adopt
command in commands.ts to use apiCall instead of raw fetch.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The createRequire import from 'node:module' was unused since the code
was refactored to use readFileSync instead of require() in ESM.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
5 tasks: unused import, injection escaping, PID race condition,
API authentication, final verification.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Spec for embedded React + Vite dashboard served from OpenACP API server.
Covers architecture, SSE real-time updates, 5 pages (dashboard, sessions,
agents, config, topics), auth, EventBus design, and error handling.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Address 9 issues from spec review: explicit file paths for API client,
exempt health/version routes, systemd % escaping, ESRCH vs EPERM
handling in PID polling, token rotation guidance.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace Claude-only handoff with data-driven integration engine:
- Add AgentIntegrationSpec to define hooks, settings paths, output formats per agent
- Extend AGENT_CAPABILITIES with resume commands for 7 agents (Claude, Cursor, Gemini, Cline, Codex, Kilo, Amp)
- Add integration specs for 4 agents with hooks systems (Claude, Cursor, Gemini, Cline)
- Rewrite integrate.ts as generic engine: generates scripts, merges settings based on spec data
- Support both settings_json (Claude/Gemini/Cline) and hooks_json (Cursor) config formats
- Support both markdown commands (Claude) and skills (Cursor) for handoff triggers
- Auto-integrate handoff on agent install (CLI + Telegram bot)
- Auto-unintegrate on agent uninstall
- Backward compat: Claude keeps CLAUDE_SESSION_ID/CLAUDE_WORKING_DIR variable names
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add "Did you mean: X?" suggestions when users mistype commands, agent
names, config keys, or flags. Uses fastest-levenshtein with prefix and
substring matching for comprehensive typo detection across 7 integration
points: top-level commands, api subcommands, agents subcommands, agent
name lookups, integrate command, config set keys, and doctor flags.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Updated the agent installation process to display setup steps with tap-to-copy commands in Telegram. Introduced a new function to format setup steps, ensuring commands are easily accessible. Adjusted CLI examples for clarity and consistency, emphasizing first-run instructions for certain agents.
Added a new method to enhance installed agents by updating their properties based on registry information. This includes fixing names, versions, registry IDs, and distributions for agents that were migrated with generic or unknown values. Logs a message when changes are made to the installed agents.
Updated CLI command functions to accept and utilize arguments, improving flexibility and usability. Added help messages for install, uninstall, and plugins commands. Enhanced API command help for better user guidance. Improved agent installation logic to ensure the latest package versions are used.
The agents run command was only passing user args, missing the agent's
own args (e.g., package name for npx). Now includes base args while
stripping ACP-specific flags (--acp, acp) so the interactive CLI works.
- Add per-agent setup info for 20+ agents (login commands, API keys, env vars)
- Create docs/guide/agents.md with detailed setup instructions for every agent
- Show setup steps automatically after agent installation (CLI + Telegram)
- Add `openacp agents run` command to execute agent CLI for login/config
- Rewrite CLI help with clear sections and examples
- Update assistant system prompt to use AgentCatalog for agent discovery
- Update product guide with agent management, registry info, and troubleshooting
- Added 'pnpm test:watch' command for watch mode in testing.
- Expanded file structure documentation to include new core and adapter modules.
- Introduced sections on message flow and session state machine for better understanding of architecture.
- Updated CLI commands section with detailed usage for daemon management, configuration, agents, plugins, integrations, diagnostics, and API.
- Add pagination to /agents in Telegram (6 per page, prev/next buttons)
- Show agent descriptions from ACP Registry in both CLI and Telegram
- Deduplicate agent picker logic (handleNew + startInteractiveNewSession)
- Improve CLI install progress with visual progress bar
- Add supported agents table and ACP Registry attribution to README
- Add social links and keywords to package.json and publish script
- Fix na: callback to use topic-first pattern (prevent race condition)
- Add zip-slip protection for binary archive extraction
- Remove duplicate escapeHtml, import from formatting.ts
- Consolidate commandExists into single shared function
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add AgentCatalog service layer that fetches agents from the official ACP
Registry CDN, supports 3 distribution types (npx, uvx, binary), and
manages installed agents in ~/.openacp/agents.json.
- New core modules: agent-catalog, agent-store, agent-installer, agent-dependencies
- Bundle registry snapshot for offline fallback
- Auto-migrate existing config.agents to new agent store on startup
- CLI: openacp agents list/install/uninstall/refresh/info
- Telegram: /agents browser, /install command, per-session agent picker
- Setup flow rewritten to use registry with multi-select
- 28 agents available from registry (Claude, Gemini, Cursor, Copilot, etc.)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Introduced a new 'doctor' command in the CLI for running system diagnostics, including a dry-run option.
- Updated the Telegram adapter to integrate the 'doctor' command into the command structure and menu.
- Enhanced the README with a new section for screenshots showcasing the application interface.
- Introduced a new LICENSE file with the MIT License.
- Updated package.json to specify the license as MIT.
- Modified README.md to reflect the change in license from AGPL-3.0 to MIT.
- Updated the CLI configuration command to support setting values directly via arguments.
- Refactored session management to utilize a unified session creation pipeline, improving code organization and maintainability.
- Introduced new API endpoints for editable configuration fields and improved handling of session state changes.
- Enhanced the Telegram adapter to streamline session creation and management, including better integration with the command structure.
- Added tests for new session creation and configuration updates to ensure reliability.
- Updated the Telegram adapter to minimize API calls by refining terminal status checks.
- Enhanced user experience with additional "Cancel" options in command prompts.
- Improved message chunking logic to better handle long messages and prevent HTML tag breaks.
- Introduced a mechanism to track message truncation for more accurate message management.