208 Commits

Author SHA1 Message Date
0xmrpeter
0fccd7ce1c chore: release v0.5.3
- Dynamic tunnel registry: multi-port tunnels with per-port cloudflared process
- Telegram /tunnel commands and CLI tunnel add/list/stop subcommands
- Agent tunnel skill for Claude (expose port, share app, preview on phone)
- Fix command handling: strip leading slashes to prevent agent subprocess hangs
- Fix session resumption: allow resuming cancelled sessions
- Prompt queue abort functionality
- Tunnel API backward compat and keyboard refresh fixes

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
v0.5.3
2026-03-23 17:04:16 +07:00
Mr.Peter
b6c7c17882
Merge pull request #43 from lngdao/feat/tunnel-port-registry
feat(tunnel): dynamic port registry with CLI, Telegram commands, and agent skill
2026-03-23 17:01:10 +07:00
lngdao
421d74b678 fix(tunnel): address PR #43 review — API compat, keyboard refresh, naming
- Keep GET /api/tunnel returning { enabled, url, provider } for backward
  compat. New list endpoint at GET /api/tunnel/list.
- Re-attach inline keyboard after stop callback so remaining tunnels
  keep their Stop buttons.
- Remove unnecessary (config as any) cast for maxUserTunnels.
- Skip system entries in restore() to prevent double-registration.
- Rename stopAll() → shutdown() (kills everything including system).
  Add stopAllUser() for user-facing operations.
2026-03-23 16:40:16 +07:00
0xmrpeter
31e707c238 fix(telegram): improve command handling and session management
- Added text processing to strip leading slashes from unrecognized commands in the Telegram adapter to prevent agent subprocesses from hanging.
- Updated session cancellation messages for clarity, changing "Cancel session command" to "Abort prompt command" and adjusting user feedback for session status.
- Modified session resumption logic to allow resuming cancelled sessions while preventing errors from being resumed.
- Implemented abort functionality in the prompt queue to handle ongoing processes more gracefully.
2026-03-23 16:01:17 +07:00
lngdao
144ae497bc feat(tunnel): dynamic port registry with CLI, Telegram commands, and agent skill
Tunnel Registry:
- Multi-port registry: each port gets its own cloudflared process + URL
- Two entry types: system (file viewer, hidden) and user (managed)
- Persistence to ~/.openacp/tunnels.json with debounced writes
- Restore tunnels on restart (re-spawn with new URLs)
- Max concurrent user tunnels (default: 5, configurable)
- Race condition handling for stop during spawn
- Provider-per-entry from TunnelProvider abstraction

Telegram:
- /tunnel <port> [label] — create tunnel
- /tunnels — list with inline Stop buttons
- /tunnel stop <port> — stop tunnel
- Session destroy auto-stops user tunnels with notification

CLI:
- openacp tunnel add/list/stop/stop-all subcommands
- Calls daemon API endpoints

Daemon API:
- POST /api/tunnel — create tunnel
- GET /api/tunnel — list user tunnels
- DELETE /api/tunnel/:port — stop tunnel
- DELETE /api/tunnel — stop all user tunnels

Agent Integration:
- Tunnel skill installed via openacp integrate claude
- ~/.claude/skills/openacp-tunnel/SKILL.md
- Broad trigger: "expose port", "share app", "preview on phone", etc.
- Product guide updated with tunnel CLI docs

Config:
- Added tunnel.maxUserTunnels (default: 5)
2026-03-23 14:47:37 +07:00
0xmrpeter
bae30700c5 chore: release v0.5.2
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
v0.5.2
2026-03-23 13:37:06 +07:00
0xmrpeter
d595a91cf6 feat: add file, image, and audio support via adapters
- Add FileService for saving/resolving files in ~/.openacp/files/<sessionId>/
- Support OGG→WAV voice conversion using ogg-opus-decoder + node-wav
- Extend ACP prompt to send image/audio as base64 when agent supports it,
  fallback to file path when not
- Handle agent→user image/audio content events via SessionBridge
- Telegram adapter: incoming photo, document, voice, audio, video_note handlers
- Telegram adapter: outgoing attachment sending (photo/voice/document)
- Add Attachment type, extend IncomingMessage/OutgoingMessage/AgentEvent
- Log agent prompt capabilities on init for debugging
- Fix agent-installer test to match version-stripping behavior

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 13:34:58 +07:00
0xmrpeter
df9150a67c Merge branch 'develop'
# Conflicts:
#	src/adapters/telegram/commands/agents.ts
#	src/cli/commands.ts
2026-03-23 11:21:04 +07:00
0xmrpeter
cc8cc53c30 chore: release v0.5.1
- Generic bi-directional handoff for all agents (not just Claude)
- CLI typo suggestions with fuzzy matching
- Per-agent setup instructions shown after install
- Fix ACP flag stripping and base args in agents run
- Comprehensive test coverage (+410 test cases across 22 new test files)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
v0.5.1
2026-03-23 11:20:02 +07:00
Mr.Peter
0ccf54e896
Merge pull request #39 from vincentlab3/fix/36-setup-claude-agent
fix(setup): show Claude in agent selection list during onboarding
2026-03-23 11:03:52 +07:00
vincent
a1400aff97 fix(setup): remove unnecessary as const from disabled field
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 10:59:44 +07:00
vincent
8583269487 fix(setup): show Claude in agent selection list during onboarding
Claude was pre-installed before the checkbox was shown, then filtered
out as "already installed", making it invisible. Now installed agents
appear as pre-checked disabled items so users can see Claude is ready.

Fixes #36

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 10:48:45 +07:00
0xmrpeter
77704bf671 test: add edge case coverage for formatting, action-detect, config-registry, agent-store, permission-gate, session-store
Add 6 new test files (~120 test cases) covering previously untested
functions and edge cases:
- formatting.ts: escapeHtml, markdownToTelegramHtml, formatToolCall,
  formatToolUpdate, formatPlan, splitMessage (code block boundary handling)
- action-detect.ts: storeAction/getAction/removeAction lifecycle,
  buildActionKeyboard for both action types
- config-registry.ts: getConfigValue nested paths, resolveOptions
  with static and dynamic options
- agent-store.ts: exists, hasAgent, corrupted/invalid JSON handling,
  atomic write persistence
- permission-gate.ts: requestId lifecycle, reject defaults, concurrent
  setPending, resolve-then-reject idempotency, custom timeouts
- session-store.ts: findByAgentSessionId with originalAgentSessionId
  fallback, corrupted file handling, concurrent saves, TTL preservation

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 02:03:40 +07:00
0xmrpeter
6dba173fce test: add comprehensive test coverage for untested modules
Add 16 new test files (~290 test cases) covering previously untested
modules: StderrCapture, streams, NotificationManager, SessionManager,
ViewerStore, extractFileInfo, version utils, ToolCallTracker,
DraftManager, Session lifecycle, ConfigManager (workspace/env/hot-reload),
OpenACPCore orchestrator, AgentManager, PromptQueue edge cases,
SkillCommandManager, and MessageTransformer tunnel integration.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 01:50:48 +07:00
0xmrpeter
519e2055d4 feat(handoff): generic bi-directional handoff for all agents
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>
2026-03-23 01:31:24 +07:00
0xmrpeter
a3c5f5c647 feat(cli): add typo suggestions with fuzzy matching across all CLI commands
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>
2026-03-23 01:19:06 +07:00
0xmrpeter
72248d18ad feat(agents): enhance setup instructions with copyable commands
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.
2026-03-23 00:02:49 +07:00
0xmrpeter
a2370e93f2 feat(agents): enrich installed agents with registry data
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.
2026-03-22 23:32:12 +07:00
0xmrpeter
1af2156a51 refactor(cli): enhance command handling by passing args to all commands
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.
2026-03-22 23:25:24 +07:00
0xmrpeter
2941956fd7 fix(agents): improve ACP flag stripping in agents run command
Handle edge cases: factory-droid's "exec --output-format acp" pair,
qwen-code's --experimental-skills flag. Verified correct stripping
for all 28 agents in the registry.
2026-03-22 22:43:54 +07:00
0xmrpeter
df7404baec fix(agents): include agent base args in agents run command
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.
2026-03-22 22:42:14 +07:00
0xmrpeter
f00ec6ac99 Merge branch 'develop' 2026-03-22 22:40:31 +07:00
0xmrpeter
95928b869d feat(agents): add comprehensive setup guide, CLI improvements, and post-install instructions
- 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
2026-03-22 22:40:13 +07:00
0xmrpeter
66a6cf84c9 feat(docs): update development guide with new CLI commands and architecture details
- 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.
2026-03-22 22:12:30 +07:00
0xmrpeter
ddd237274d chore: bump version to 0.5.0 v0.5.0 2026-03-22 21:55:50 +07:00
Mr.Peter
0dd24b8e5a
Merge pull request #30 from Open-ACP/develop
feat: ACP Registry integration for agent discovery and installation
2026-03-22 21:55:29 +07:00
0xmrpeter
aae01af109 feat(registry): improve agent UX with pagination, descriptions, and deduplication
- 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
2026-03-22 21:53:18 +07:00
0xmrpeter
2300a21dfc fix: remove duplicate handleAgents from menu.ts, cleanup imports
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 20:53:57 +07:00
0xmrpeter
ccc44194e7 fix(registry): address code review findings
- 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>
2026-03-22 20:07:04 +07:00
0xmrpeter
34a8ce36f9 feat(registry): integrate ACP Registry for agent discovery and installation
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>
2026-03-22 19:52:05 +07:00
0xmrpeter
a3f9df358f chore: update README with npm version badge 2026-03-22 17:24:02 +07:00
0xmrpeter
9ec6cb59ad chore: bump version to 0.4.11
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 17:04:50 +07:00
0xmrpeter
b71a74b50c feat(telegram): add system diagnostics command and enhance README
- 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.
2026-03-22 17:04:50 +07:00
0xmrpeter
c19b9a183d chore: add MIT license and update package metadata
- 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.
2026-03-22 17:04:50 +07:00
0xmrpeter
607317b85a feat(telegram): enhance session management and configuration commands
- 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.
2026-03-22 17:04:50 +07:00
0xmrpeter
eefe48a818 chore: bump version to 0.4.10
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 17:04:50 +07:00
0xmrpeter
098be57c6c refactor(telegram): split commands.ts into commands/ directory
Extract the 1400-line monolithic commands.ts into 6 domain-specific files:
- commands/admin.ts — restart, update, dangerous mode
- commands/menu.ts — menu keyboard, help, agents, clear, buildSkillMessages
- commands/integrate.ts — integrate flow + callbacks
- commands/session.ts — cancel, status, topics, cleanup
- commands/new-session.ts — new session creation flow + state
- commands/index.ts — setupCommands, setupAllCallbacks, re-exports

Each file registers its own grammY callback handlers with distinct prefixes.
External API preserved via re-exports from index.ts.
2026-03-22 17:04:50 +07:00
0xmrpeter
61dbd1851b refactor(telegram): add CommandsAssistantContext to types 2026-03-22 17:04:19 +07:00
0xmrpeter
90903a5935 feat(telegram): improve message handling and user interaction
- 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.
2026-03-22 17:04:19 +07:00
0xmrpeter
d976e37516 chore: bump version to 0.4.9
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 17:04:19 +07:00
0xmrpeter
bd917c20ba feat(telegram): enhance session management with interactive flow and command updates
- Introduced an interactive flow for creating new sessions, allowing users to select agents and workspaces conversationally.
- Updated the assistant system prompt to include product references and improved guidelines for user interactions.
- Added a new command to clear assistant history and improved error handling during session creation.
- Enhanced workspace input handling to support relative paths and ensure user-friendly prompts.
2026-03-22 17:04:19 +07:00
0xmrpeter
38d2490015 feat(new-session): interactive flow with agent and workspace selection 2026-03-22 17:04:19 +07:00
0xmrpeter
316c0887e2 feat(assistant): rewrite system prompt with product context and action playbook 2026-03-22 17:04:19 +07:00
0xmrpeter
de35ea00c3 feat(menu,help): reorganize keyboard layout and rewrite help text by use case 2026-03-22 17:04:19 +07:00
0xmrpeter
7bbbb5301a feat(assistant): add context-aware welcome message builder 2026-03-22 17:04:19 +07:00
0xmrpeter
02bacdbe72 chore: bump version to 0.4.8
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 17:04:19 +07:00
0xmrpeter
9b52d981fe feat: enhance Telegram adapter with new cleanup commands and session management improvements
- Added new commands for cleaning up sessions, including a comprehensive cleanup option that excludes notification and assistant topics.
- Updated message formatting for session status display and improved user feedback during cleanup operations.
- Introduced additional parameters for better session management and command handling in the Telegram adapter.
2026-03-22 17:04:19 +07:00
0xmrpeter
5309eb3eec chore: bump version to 0.4.7
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 17:04:19 +07:00
0xmrpeter
bd90bae074 feat: enhance session management and integration capabilities
- Updated session handoff terminology in documentation and code for clarity.
- Introduced new commands for managing sessions and integrations in Telegram.
- Improved session transfer functionality between terminal and Telegram.
- Enhanced message formatting to prevent HTML tag breaks during message splitting.
- Added integration management for agents, allowing installation and uninstallation of session transfer features.

This update improves user experience by streamlining session management and enhancing integration options.
2026-03-22 17:04:19 +07:00
0xmrpeter
7f349ac5f2 fix: resolve --version showing 0.0.0-dev when installed globally
Use getCurrentVersion() which walks up directories to find package.json
instead of hardcoded relative path that fails in global installs.

Bump version to 0.4.6.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 17:04:19 +07:00