@openacp/cli 2026.401.4 → 2026.401.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -3214,7 +3214,7 @@ declare class OutputModeResolver {
3214
3214
  * OpenACP Product Guide — comprehensive reference for the AI assistant.
3215
3215
  * The assistant reads this at runtime to answer user questions about features.
3216
3216
  */
3217
- declare const PRODUCT_GUIDE = "\n# OpenACP \u2014 Product Guide\n\nOpenACP lets you chat with AI coding agents (like Claude Code) through messaging platforms (Telegram, Discord).\nYou type messages in your chat platform, the agent reads/writes/runs code in your project folder, and results stream back in real time.\n\n---\n\n## Quick Start\n\n1. Start OpenACP: `openacp` (or `openacp start` for background daemon)\n2. Open your messaging platform (Telegram group or Discord server) \u2014 you'll see the Assistant topic/thread\n3. Tap/click \uD83C\uDD95 New Session or type /new\n4. Pick an agent and a project folder\n5. Chat in the session topic/thread \u2014 the agent works on your code\n\n---\n\n## Core Concepts\n\n### Sessions\nA session = one conversation with one AI agent working in one project folder.\nEach session gets its own topic (Telegram) or forum thread (Discord). Chat there to give instructions to the agent.\n\n### Agents\nAn agent is an AI coding tool (e.g., Claude Code, Gemini, Cursor, Codex, etc.).\nOpenACP supports 28+ agents from the official ACP Registry (agentclientprotocol.com).\nYou can install multiple agents and choose which one to use per session.\nThe default agent is used when you don't specify one.\n\n### Agent Management\n- Browse agents: `/agents` in your chat platform or `openacp agents` in CLI\n- Install: tap the install button in /agents, or `openacp agents install <name>`\n- Uninstall: `openacp agents uninstall <name>`\n- Setup/login: `openacp agents run <name> -- <args>` (e.g., `openacp agents run gemini -- auth login`)\n- Details: `openacp agents info <name>` shows version, dependencies, and setup steps\n\nSome agents need additional setup before they can be used:\n- Claude: requires `claude login`\n- Gemini: requires `openacp agents run gemini -- auth login`\n- Codex: requires setting `OPENAI_API_KEY` environment variable\n- GitHub Copilot: requires `openacp agents run copilot -- auth login`\n\nAgents are installed in three ways depending on the agent:\n- **npx** \u2014 Node.js agents, downloaded automatically on first use\n- **uvx** \u2014 Python agents, downloaded automatically on first use\n- **binary** \u2014 Platform-specific binaries, downloaded to `~/.openacp/agents/`\n\n### Project Folder (Workspace)\nThe directory where the agent reads, writes, and runs code.\nWhen creating a session, you choose which folder the agent works in.\nYou can type a full path like `~/code/my-project` or just a name like `my-project` (it becomes `<base-dir>/my-project`).\n\n### System Topics\n- **Assistant** \u2014 Always-on helper that can answer questions, create sessions, check status, troubleshoot\n- **Notifications** \u2014 System alerts (permission requests, session errors, completions)\n\n---\n\n## Creating Sessions\n\n### From menu\nTap \uD83C\uDD95 New Session \u2192 choose agent (if multiple) \u2192 choose project folder \u2192 confirm\n\n### From command\n- `/new` \u2014 Interactive flow (asks agent + folder)\n- `/new claude ~/code/my-project` \u2014 Create directly with specific agent and folder\n\n### From Assistant topic\nJust ask: \"Create a session for my-project with claude\" \u2014 the assistant handles it\n\n### Quick new chat\n`/newchat` in a session topic \u2014 creates new session with same agent and folder as current one\n\n---\n\n## Working with Sessions\n\n### Chat\nType messages in the session topic. The agent responds with code changes, explanations, tool outputs.\n\n### What you see while the agent works\n- **\uD83D\uDCAD Thinking indicator** \u2014 Shows when the agent is reasoning, with elapsed time\n- **Text responses** \u2014 Streamed in real time, updated every few seconds\n- **Tool calls** \u2014 When the agent runs commands or edits files, you see tool name, input, status, and output\n- **\uD83D\uDCCB Plan card** \u2014 Visual task progress with completed/in-progress/pending items and progress bar\n- **\"View File\" / \"View Diff\" buttons** \u2014 Opens in browser with Monaco editor (requires tunnel)\n\n### Session lifecycle\n1. **Creating** \u2014 Topic created, agent spawning\n2. **Warming up** \u2014 Agent primes its cache (happens automatically, invisible to you)\n3. **Active** \u2014 Ready for your messages\n4. **Auto-naming** \u2014 After your first message, the session gets a descriptive name (agent summarizes in ~5 words). The topic title updates automatically.\n5. **Finished/Error** \u2014 Session completed or hit an error\n\n### Agent skills\nSome agents provide slash commands (e.g., /compact, /review). Available skills are pinned in the session topic.\n\n### Permission requests\nWhen the agent wants to run a command, it asks for permission.\nYou see buttons: \u2705 Allow, \u274C Reject (and sometimes \"Always Allow\").\nA notification also appears in the Notifications topic with a link to the request.\n\n### Bypass permissions\nAuto-approves ALL permission requests \u2014 the agent runs any command without asking.\n- Enable: `/enable_bypass` or tap the \u2620\uFE0F button in the session\n- Disable: `/disable_bypass` or tap the \uD83D\uDD10 button\n- \u26A0\uFE0F Use with caution \u2014 the agent can execute anything\n\n### Session timeout\nIdle sessions are automatically cancelled after a configurable timeout (default: 60 minutes).\nConfigure via `security.sessionTimeoutMinutes` in config.\n\n---\n\n## Session Transfer (Handoff)\n\n### Chat \u2192 Terminal\n1. Type `/handoff` in a session topic/thread\n2. You get a command like `claude --resume <SESSION_ID>`\n3. Copy and run it in your terminal \u2014 the session continues there with full conversation history\n\n### Terminal \u2192 Chat\n1. First time: run `openacp integrate claude` to install the handoff skill (one-time setup)\n2. In Claude Code, use the /openacp:handoff slash command\n3. The session appears as a new topic/thread and you can continue chatting there\n\n### How it works\n- The agent session ID is shared between platforms\n- Conversation history is preserved \u2014 pick up where you left off\n- The agent that supports resume (e.g., Claude with `--resume`) handles the actual transfer\n\n---\n\n## Managing Sessions\n\n### Status\n- `/status` \u2014 Shows active sessions count and details\n- Ask the Assistant: \"What sessions are running?\"\n\n### List all sessions\n- `/sessions` \u2014 Shows all sessions with status (active, finished, error)\n\n### Cancel\n- `/cancel` in a session topic \u2014 cancels that session\n- Ask the Assistant: \"Cancel the stuck session\"\n\n### Cleanup\n- From `/sessions` \u2192 tap cleanup buttons (finished, errors, all)\n- Ask the Assistant: \"Clean up old sessions\"\n\n---\n\n## Assistant Topic\n\nThe Assistant is an always-on AI helper in its own topic. It can:\n- Answer questions about OpenACP\n- Create sessions for you\n- Check status and health\n- Cancel sessions\n- Clean up old sessions\n- Troubleshoot issues\n- Manage configuration\n\nJust chat naturally: \"How do I create a session?\", \"What's the status?\", \"Something is stuck\"\n\n### Clear history\n`/clear` in the Assistant topic \u2014 resets the conversation\n\n---\n\n## System Commands\n\n| Command | Where | What it does |\n|---------|-------|-------------|\n| `/new [agent] [path]` | Anywhere | Create new session |\n| `/newchat` | Session topic | New session, same agent + folder |\n| `/cancel` | Session topic | Cancel current session |\n| `/status` | Anywhere | Show status |\n| `/sessions` | Anywhere | List all sessions |\n| `/agents` | Anywhere | Browse & install agents from ACP Registry |\n| `/install <name>` | Anywhere | Install an agent |\n| `/enable_bypass` | Session topic | Auto-approve all permissions |\n| `/disable_bypass` | Session topic | Restore permission prompts |\n| `/handoff` | Session topic | Transfer session to terminal |\n| `/clear` | Assistant topic | Clear assistant history |\n| `/menu` | Anywhere | Show action menu |\n| `/help` | Anywhere | Show help |\n| `/restart` | Anywhere | Restart OpenACP |\n| `/update` | Anywhere | Update to latest version |\n| `/integrate` | Anywhere | Manage agent integrations |\n\n---\n\n## Menu Buttons\n\n| Button | Action |\n|--------|--------|\n| \uD83C\uDD95 New Session | Create new session (interactive) |\n| \uD83D\uDCCB Sessions | List all sessions with cleanup options |\n| \uD83D\uDCCA Status | Show active/total session count |\n| \uD83E\uDD16 Agents | List available agents |\n| \uD83D\uDD17 Integrate | Manage agent integrations |\n| \u2753 Help | Show help text |\n| \uD83D\uDD04 Restart | Restart OpenACP |\n| \u2B06\uFE0F Update | Check and install updates |\n\n---\n\n## CLI Commands\n\n### Server\n- `openacp` \u2014 Start (uses configured mode: foreground or daemon)\n- `openacp start` \u2014 Start as background daemon\n- `openacp stop` \u2014 Stop daemon\n- `openacp status` \u2014 Show daemon status\n- `openacp logs` \u2014 Tail daemon logs\n- `openacp --foreground` \u2014 Force foreground mode (useful for debugging or containers)\n\n### Auto-start (run on boot)\n- macOS: installs a LaunchAgent in `~/Library/LaunchAgents/`\n- Linux: installs a systemd user service in `~/.config/systemd/user/`\n- Enabled automatically when you start the daemon. Remove with `openacp stop`.\n\n### Configuration\n- `openacp config` \u2014 Interactive config editor\n- `openacp reset` \u2014 Delete all data and start fresh\n\n### Agent Management (CLI)\n- `openacp agents` \u2014 List all agents (installed + available from ACP Registry)\n- `openacp agents install <name>` \u2014 Install an agent\n- `openacp agents uninstall <name>` \u2014 Remove an agent\n- `openacp agents info <name>` \u2014 Show details, dependencies, and setup guide\n- `openacp agents run <name> [-- args]` \u2014 Run agent CLI directly (for login, config, etc.)\n- `openacp agents refresh` \u2014 Force-refresh registry cache\n\n### Plugins\n- `openacp install <package>` \u2014 Install adapter plugin\n- `openacp uninstall <package>` \u2014 Remove adapter plugin\n- `openacp plugins` \u2014 List installed plugins\n\n### Integration\n- `openacp integrate <agent>` \u2014 Install agent integration (e.g., Claude handoff skill)\n- `openacp integrate <agent> --uninstall` \u2014 Remove integration\n\n### API (requires running daemon)\n`openacp api <command>` \u2014 Interact with running daemon:\n\n| Command | Description |\n|---------|-------------|\n| `status` | List active sessions |\n| `session <id>` | Session details |\n| `new <agent> <path>` | Create session |\n| `send <id> \"text\"` | Send prompt |\n| `cancel <id>` | Cancel session |\n| `bypass <id> on/off` | Toggle bypass permissions |\n| `topics [--status x,y]` | List topics |\n| `delete-topic <id> [--force]` | Delete topic |\n| `cleanup [--status x,y]` | Cleanup old topics |\n| `agents` | List agents |\n| `health` | System health |\n| `config` | Show config |\n| `config set <key> <value>` | Update config |\n| `adapters` | List adapters |\n| `tunnel` | Tunnel status |\n| `notify \"message\"` | Send notification |\n| `version` | Daemon version |\n| `restart` | Restart daemon |\n\n---\n\n## File Viewer (Tunnel)\n\nWhen tunnel is enabled, file edits and diffs get \"View\" buttons that open in your browser:\n- **Monaco Editor** \u2014 Full VS Code editor with syntax highlighting\n- **Diff viewer** \u2014 Side-by-side or inline comparison\n- **Line highlighting** \u2014 Click lines to highlight\n- Dark/light theme toggle\n\n### Setup\nEnable in config: set `tunnel.enabled` to `true`.\nProviders: Cloudflare (default, free), ngrok, bore, Tailscale Funnel.\n\n### Port Tunneling\n\nExpose any local port (dev servers, APIs, etc.) to the internet:\n\n**CLI commands** (agent can call these directly):\n- `openacp tunnel add <port> --label <name>` \u2014 Create tunnel to a local port\n- `openacp tunnel list` \u2014 List active tunnels\n- `openacp tunnel stop <port>` \u2014 Stop a tunnel\n- `openacp tunnel stop-all` \u2014 Stop all user tunnels\n\n**Telegram commands**:\n- `/tunnel <port> [label]` \u2014 Create tunnel\n- `/tunnels` \u2014 List active tunnels\n- `/tunnel stop <port>` \u2014 Stop tunnel\n\nExample: after starting a dev server on port 3000, run `openacp tunnel add 3000 --label my-app` to get a public URL.\n\n---\n\n## Configuration\n\nConfig file: `~/.openacp/config.json`\n\n### Channels\n- **channels.telegram.botToken** \u2014 Your Telegram bot token\n- **channels.telegram.chatId** \u2014 Your Telegram supergroup ID\n- **channels.discord.botToken** \u2014 Your Discord bot token\n- **channels.discord.guildId** \u2014 Your Discord server (guild) ID\n\n### Agents\n- **defaultAgent** \u2014 Which agent to use by default\n- Agents are managed via `/agents` (Telegram) or `openacp agents` (CLI)\n- Installed agents are stored in `~/.openacp/agents.json`\n- Agent list is fetched from the ACP Registry CDN and cached locally (24h)\n\n### Workspace\n- **workspace.baseDir** \u2014 Base directory for project folders (default: `~/openacp-workspace`)\n\n### Security\n- **security.allowedUserIds** \u2014 Restrict who can use the bot (empty = everyone)\n- **security.maxConcurrentSessions** \u2014 Max parallel sessions (default: 5)\n- **security.sessionTimeoutMinutes** \u2014 Auto-cancel idle sessions (default: 60)\n\n### Tunnel / File Viewer\n- **tunnel.enabled** \u2014 Enable file viewer tunnel\n- **tunnel.provider** \u2014 Tunnel provider: cloudflare (default, free), ngrok, bore, tailscale\n- **tunnel.port** \u2014 Local port for tunnel server (default: 3100)\n- **tunnel.auth.enabled** \u2014 Enable authentication for tunnel URLs\n- **tunnel.auth.token** \u2014 Auth token for tunnel access\n- **tunnel.storeTtlMinutes** \u2014 How long viewer links stay cached (default: 60)\n\n### Logging\n- **logging.level** \u2014 Log level: silent, debug, info, warn, error, fatal (default: info)\n- **logging.logDir** \u2014 Log directory (default: `~/.openacp/logs`)\n- **logging.maxFileSize** \u2014 Max log file size before rotation\n- **logging.maxFiles** \u2014 Max number of rotated log files\n- **logging.sessionLogRetentionDays** \u2014 Auto-delete old session logs (default: 30)\n\n### Data Retention\n- **sessionStore.ttlDays** \u2014 How long session records persist (default: 30). Old records are cleaned up automatically.\n\n### Environment variables\nOverride config with env vars:\n- `OPENACP_TELEGRAM_BOT_TOKEN`\n- `OPENACP_TELEGRAM_CHAT_ID`\n- `OPENACP_DISCORD_BOT_TOKEN`\n- `OPENACP_DISCORD_GUILD_ID`\n- `OPENACP_DEFAULT_AGENT`\n- `OPENACP_RUN_MODE` \u2014 foreground or daemon\n- `OPENACP_API_PORT` \u2014 API server port (default: 21420)\n- `OPENACP_TUNNEL_ENABLED`\n- `OPENACP_TUNNEL_PORT`\n- `OPENACP_TUNNEL_PROVIDER`\n- `OPENACP_LOG_LEVEL`\n- `OPENACP_LOG_DIR`\n- `OPENACP_DEBUG` \u2014 Sets log level to debug\n\n---\n\n## Troubleshooting\n\n### Session stuck / not responding\n- Check status: ask Assistant \"Is anything stuck?\"\n- Cancel and create new: `/cancel` then `/new`\n- Check system health: Assistant can run health check\n\n### Agent not found\n- Check available agents: `/agents` or `openacp agents`\n- Install missing agent: `openacp agents install <name>`\n- Some agents need login first: `openacp agents info <name>` to see setup steps\n- Run agent CLI for setup: `openacp agents run <name> -- <args>`\n\n### Permission request not showing\n- Check Notifications topic for the alert\n- Try `/enable_bypass` to auto-approve (if you trust the agent)\n\n### Session disappeared after restart\n- Sessions persist across restarts\n- Send a message in the old topic \u2014 it auto-resumes\n- If topic was deleted, the session record may still exist in status\n\n### Bot not responding at all\n- Check daemon: `openacp status`\n- Check logs: `openacp logs`\n- Restart: `openacp start` or `/restart`\n\n### Messages going to wrong topic\n- Each session is bound to a specific topic/thread\n- If you see messages appearing in the Assistant topic instead of the session topic, try creating a new session\n\n### Viewing logs\n- Session-specific logs: `~/.openacp/logs/sessions/`\n- System logs: `openacp logs` to tail live\n- Set `OPENACP_DEBUG=true` for verbose output\n\n---\n\n## Data & Storage\n\nAll data is stored in `~/.openacp/`:\n- `config.json` \u2014 Configuration\n- `agents.json` \u2014 Installed agents (managed by AgentCatalog)\n- `registry-cache.json` \u2014 Cached ACP Registry data (refreshes every 24h)\n- `agents/` \u2014 Downloaded binary agents\n- `sessions/` \u2014 Session records and state\n- `topics/` \u2014 Topic-to-session mappings\n- `logs/` \u2014 System and session logs\n- `plugins/` \u2014 Installed adapter plugins\n- `openacp.pid` \u2014 Daemon PID file\n\nSession records auto-cleanup: 30 days (configurable via `sessionStore.ttlDays`).\nSession logs auto-cleanup: 30 days (configurable via `logging.sessionLogRetentionDays`).\n";
3217
+ declare const PRODUCT_GUIDE = "\n# OpenACP \u2014 Product Guide\n\nOpenACP lets you chat with AI coding agents (like Claude Code) through messaging platforms (Telegram, Discord).\nYou type messages in your chat platform, the agent reads/writes/runs code in your project folder, and results stream back in real time.\n\n---\n\n## Quick Start\n\n1. Start OpenACP: `openacp` (or `openacp start` for background daemon)\n2. Open your messaging platform (Telegram group or Discord server) \u2014 you'll see the Assistant topic/thread\n3. Tap/click \uD83C\uDD95 New Session or type /new\n4. Pick an agent and a project folder\n5. Chat in the session topic/thread \u2014 the agent works on your code\n\n---\n\n## Core Concepts\n\n### Sessions\nA session = one conversation with one AI agent working in one project folder.\nEach session gets its own topic (Telegram) or forum thread (Discord). Chat there to give instructions to the agent.\n\n### Agents\nAn agent is an AI coding tool (e.g., Claude Code, Gemini, Cursor, Codex, etc.).\nOpenACP supports 28+ agents from the official ACP Registry (agentclientprotocol.com).\nYou can install multiple agents and choose which one to use per session.\nThe default agent is used when you don't specify one.\n\n### Agent Management\n- Browse agents: `/agents` in your chat platform or `openacp agents` in CLI\n- Install: tap the install button in /agents, or `openacp agents install <name>`\n- Uninstall: `openacp agents uninstall <name>`\n- Setup/login: `openacp agents run <name> -- <args>` (e.g., `openacp agents run gemini -- auth login`)\n- Details: `openacp agents info <name>` shows version, dependencies, and setup steps\n\nSome agents need additional setup before they can be used:\n- Claude: requires `claude login`\n- Gemini: requires `openacp agents run gemini -- auth login`\n- Codex: requires setting `OPENAI_API_KEY` environment variable\n- GitHub Copilot: requires `openacp agents run copilot -- auth login`\n\nAgents are installed in three ways depending on the agent:\n- **npx** \u2014 Node.js agents, downloaded automatically on first use\n- **uvx** \u2014 Python agents, downloaded automatically on first use\n- **binary** \u2014 Platform-specific binaries, downloaded to `~/.openacp/agents/`\n\n### Project Folder (Workspace)\nThe directory where the agent reads, writes, and runs code.\nWhen creating a session, you choose which folder the agent works in.\nYou can type a full path like `~/code/my-project` or just a name like `my-project` (it becomes `<base-dir>/my-project`).\n\n### System Topics\n- **Assistant** \u2014 Always-on helper that can answer questions, create sessions, check status, troubleshoot\n- **Notifications** \u2014 System alerts (permission requests, session errors, completions)\n\n---\n\n## Creating Sessions\n\n### From menu\nTap \uD83C\uDD95 New Session \u2192 choose agent (if multiple) \u2192 choose project folder \u2192 confirm\n\n### From command\n- `/new` \u2014 Interactive flow (asks agent + folder)\n- `/new claude ~/code/my-project` \u2014 Create directly with specific agent and folder\n\n### From Assistant topic\nJust ask: \"Create a session for my-project with claude\" \u2014 the assistant handles it\n\n### Quick new chat\n`/newchat` in a session topic \u2014 creates new session with same agent and folder as current one\n\n---\n\n## Working with Sessions\n\n### Chat\nType messages in the session topic. The agent responds with code changes, explanations, tool outputs.\n\n### What you see while the agent works\n- **\uD83D\uDCAD Thinking indicator** \u2014 Shows when the agent is reasoning, with elapsed time\n- **Text responses** \u2014 Streamed in real time, updated every few seconds\n- **Tool calls** \u2014 When the agent runs commands or edits files, you see tool name, input, status, and output\n- **\uD83D\uDCCB Plan card** \u2014 Visual task progress with completed/in-progress/pending items and progress bar\n- **\"View File\" / \"View Diff\" buttons** \u2014 Opens in browser with Monaco editor (requires tunnel)\n\n### Session lifecycle\n1. **Creating** \u2014 Topic created, agent spawning\n2. **Warming up** \u2014 Agent primes its cache (happens automatically, invisible to you)\n3. **Active** \u2014 Ready for your messages\n4. **Auto-naming** \u2014 After your first message, the session gets a descriptive name (agent summarizes in ~5 words). The topic title updates automatically.\n5. **Finished/Error** \u2014 Session completed or hit an error\n\n### Agent skills\nSome agents provide slash commands (e.g., /compact, /review). Available skills are pinned in the session topic.\n\n### Permission requests\nWhen the agent wants to run a command, it asks for permission.\nYou see buttons: \u2705 Allow, \u274C Reject (and sometimes \"Always Allow\").\nA notification also appears in the Notifications topic with a link to the request.\n\n### Bypass permissions\nAuto-approves ALL permission requests \u2014 the agent runs any command without asking.\n- Toggle: `/bypass_permissions on` or tap the \u2620\uFE0F button in the session\n- Disable: `/bypass_permissions off` or tap the \uD83D\uDD10 button\n- \u26A0\uFE0F Use with caution \u2014 the agent can execute anything\n\n### Session timeout\nIdle sessions are automatically cancelled after a configurable timeout (default: 60 minutes).\nConfigure via `security.sessionTimeoutMinutes` in config.\n\n---\n\n## Session Transfer (Handoff)\n\n### Chat \u2192 Terminal\n1. Type `/handoff` in a session topic/thread\n2. You get a command like `claude --resume <SESSION_ID>`\n3. Copy and run it in your terminal \u2014 the session continues there with full conversation history\n\n### Terminal \u2192 Chat\n1. First time: run `openacp integrate claude` to install the handoff skill (one-time setup)\n2. In Claude Code, use the /openacp:handoff slash command\n3. The session appears as a new topic/thread and you can continue chatting there\n\n### How it works\n- The agent session ID is shared between platforms\n- Conversation history is preserved \u2014 pick up where you left off\n- The agent that supports resume (e.g., Claude with `--resume`) handles the actual transfer\n\n---\n\n## Managing Sessions\n\n### Status\n- `/status` \u2014 Shows active sessions count and details\n- Ask the Assistant: \"What sessions are running?\"\n\n### List all sessions\n- `/sessions` \u2014 Shows all sessions with status (active, finished, error)\n\n### Cancel\n- `/cancel` in a session topic \u2014 cancels that session\n- Ask the Assistant: \"Cancel the stuck session\"\n\n### Cleanup\n- From `/sessions` \u2192 tap cleanup buttons (finished, errors, all)\n- Ask the Assistant: \"Clean up old sessions\"\n\n---\n\n## Assistant Topic\n\nThe Assistant is an always-on AI helper in its own topic. It can:\n- Answer questions about OpenACP\n- Create sessions for you\n- Check status and health\n- Cancel sessions\n- Clean up old sessions\n- Troubleshoot issues\n- Manage configuration\n\nJust chat naturally: \"How do I create a session?\", \"What's the status?\", \"Something is stuck\"\n\n### Clear history\n`/clear` in the Assistant topic \u2014 resets the conversation\n\n---\n\n## System Commands\n\n| Command | Where | What it does |\n|---------|-------|-------------|\n| `/new [agent] [path]` | Anywhere | Create new session |\n| `/newchat` | Session topic | New session, same agent + folder |\n| `/cancel` | Session topic | Cancel current session |\n| `/status` | Anywhere | Show status |\n| `/sessions` | Anywhere | List all sessions |\n| `/agents` | Anywhere | Browse & install agents from ACP Registry |\n| `/install <name>` | Anywhere | Install an agent |\n| `/bypass_permissions` | Session topic | Toggle bypass permissions (on/off) |\n| `/handoff` | Session topic | Transfer session to terminal |\n| `/clear` | Assistant topic | Clear assistant history |\n| `/menu` | Anywhere | Show action menu |\n| `/help` | Anywhere | Show help |\n| `/restart` | Anywhere | Restart OpenACP |\n| `/update` | Anywhere | Update to latest version |\n| `/integrate` | Anywhere | Manage agent integrations |\n\n---\n\n## Menu Buttons\n\n| Button | Action |\n|--------|--------|\n| \uD83C\uDD95 New Session | Create new session (interactive) |\n| \uD83D\uDCCB Sessions | List all sessions with cleanup options |\n| \uD83D\uDCCA Status | Show active/total session count |\n| \uD83E\uDD16 Agents | List available agents |\n| \uD83D\uDD17 Integrate | Manage agent integrations |\n| \u2753 Help | Show help text |\n| \uD83D\uDD04 Restart | Restart OpenACP |\n| \u2B06\uFE0F Update | Check and install updates |\n\n---\n\n## CLI Commands\n\n### Server\n- `openacp` \u2014 Start (uses configured mode: foreground or daemon)\n- `openacp start` \u2014 Start as background daemon\n- `openacp stop` \u2014 Stop daemon\n- `openacp status` \u2014 Show daemon status\n- `openacp logs` \u2014 Tail daemon logs\n- `openacp --foreground` \u2014 Force foreground mode (useful for debugging or containers)\n\n### Auto-start (run on boot)\n- macOS: installs a LaunchAgent in `~/Library/LaunchAgents/`\n- Linux: installs a systemd user service in `~/.config/systemd/user/`\n- Enabled automatically when you start the daemon. Remove with `openacp stop`.\n\n### Configuration\n- `openacp config` \u2014 Interactive config editor\n- `openacp reset` \u2014 Delete all data and start fresh\n\n### Agent Management (CLI)\n- `openacp agents` \u2014 List all agents (installed + available from ACP Registry)\n- `openacp agents install <name>` \u2014 Install an agent\n- `openacp agents uninstall <name>` \u2014 Remove an agent\n- `openacp agents info <name>` \u2014 Show details, dependencies, and setup guide\n- `openacp agents run <name> [-- args]` \u2014 Run agent CLI directly (for login, config, etc.)\n- `openacp agents refresh` \u2014 Force-refresh registry cache\n\n### Plugins\n- `openacp install <package>` \u2014 Install adapter plugin\n- `openacp uninstall <package>` \u2014 Remove adapter plugin\n- `openacp plugins` \u2014 List installed plugins\n\n### Integration\n- `openacp integrate <agent>` \u2014 Install agent integration (e.g., Claude handoff skill)\n- `openacp integrate <agent> --uninstall` \u2014 Remove integration\n\n### API (requires running daemon)\n`openacp api <command>` \u2014 Interact with running daemon:\n\n| Command | Description |\n|---------|-------------|\n| `status` | List active sessions |\n| `session <id>` | Session details |\n| `new <agent> <path>` | Create session |\n| `send <id> \"text\"` | Send prompt |\n| `cancel <id>` | Cancel session |\n| `bypass <id> on/off` | Toggle bypass permissions |\n| `topics [--status x,y]` | List topics |\n| `delete-topic <id> [--force]` | Delete topic |\n| `cleanup [--status x,y]` | Cleanup old topics |\n| `agents` | List agents |\n| `health` | System health |\n| `config` | Show config |\n| `config set <key> <value>` | Update config |\n| `adapters` | List adapters |\n| `tunnel` | Tunnel status |\n| `notify \"message\"` | Send notification |\n| `version` | Daemon version |\n| `restart` | Restart daemon |\n\n---\n\n## File Viewer (Tunnel)\n\nWhen tunnel is enabled, file edits and diffs get \"View\" buttons that open in your browser:\n- **Monaco Editor** \u2014 Full VS Code editor with syntax highlighting\n- **Diff viewer** \u2014 Side-by-side or inline comparison\n- **Line highlighting** \u2014 Click lines to highlight\n- Dark/light theme toggle\n\n### Setup\nEnable in config: set `tunnel.enabled` to `true`.\nProviders: Cloudflare (default, free), ngrok, bore, Tailscale Funnel.\n\n### Port Tunneling\n\nExpose any local port (dev servers, APIs, etc.) to the internet:\n\n**CLI commands** (agent can call these directly):\n- `openacp tunnel add <port> --label <name>` \u2014 Create tunnel to a local port\n- `openacp tunnel list` \u2014 List active tunnels\n- `openacp tunnel stop <port>` \u2014 Stop a tunnel\n- `openacp tunnel stop-all` \u2014 Stop all user tunnels\n\n**Telegram commands**:\n- `/tunnel <port> [label]` \u2014 Create tunnel\n- `/tunnels` \u2014 List active tunnels\n- `/tunnel stop <port>` \u2014 Stop tunnel\n\nExample: after starting a dev server on port 3000, run `openacp tunnel add 3000 --label my-app` to get a public URL.\n\n---\n\n## Configuration\n\nConfig file: `~/.openacp/config.json`\n\n### Channels\n- **channels.telegram.botToken** \u2014 Your Telegram bot token\n- **channels.telegram.chatId** \u2014 Your Telegram supergroup ID\n- **channels.discord.botToken** \u2014 Your Discord bot token\n- **channels.discord.guildId** \u2014 Your Discord server (guild) ID\n\n### Agents\n- **defaultAgent** \u2014 Which agent to use by default\n- Agents are managed via `/agents` (Telegram) or `openacp agents` (CLI)\n- Installed agents are stored in `~/.openacp/agents.json`\n- Agent list is fetched from the ACP Registry CDN and cached locally (24h)\n\n### Workspace\n- **workspace.baseDir** \u2014 Base directory for project folders (default: `~/openacp-workspace`)\n\n### Security\n- **security.allowedUserIds** \u2014 Restrict who can use the bot (empty = everyone)\n- **security.maxConcurrentSessions** \u2014 Max parallel sessions (default: 5)\n- **security.sessionTimeoutMinutes** \u2014 Auto-cancel idle sessions (default: 60)\n\n### Tunnel / File Viewer\n- **tunnel.enabled** \u2014 Enable file viewer tunnel\n- **tunnel.provider** \u2014 Tunnel provider: cloudflare (default, free), ngrok, bore, tailscale\n- **tunnel.port** \u2014 Local port for tunnel server (default: 3100)\n- **tunnel.auth.enabled** \u2014 Enable authentication for tunnel URLs\n- **tunnel.auth.token** \u2014 Auth token for tunnel access\n- **tunnel.storeTtlMinutes** \u2014 How long viewer links stay cached (default: 60)\n\n### Logging\n- **logging.level** \u2014 Log level: silent, debug, info, warn, error, fatal (default: info)\n- **logging.logDir** \u2014 Log directory (default: `~/.openacp/logs`)\n- **logging.maxFileSize** \u2014 Max log file size before rotation\n- **logging.maxFiles** \u2014 Max number of rotated log files\n- **logging.sessionLogRetentionDays** \u2014 Auto-delete old session logs (default: 30)\n\n### Data Retention\n- **sessionStore.ttlDays** \u2014 How long session records persist (default: 30). Old records are cleaned up automatically.\n\n### Environment variables\nOverride config with env vars:\n- `OPENACP_TELEGRAM_BOT_TOKEN`\n- `OPENACP_TELEGRAM_CHAT_ID`\n- `OPENACP_DISCORD_BOT_TOKEN`\n- `OPENACP_DISCORD_GUILD_ID`\n- `OPENACP_DEFAULT_AGENT`\n- `OPENACP_RUN_MODE` \u2014 foreground or daemon\n- `OPENACP_API_PORT` \u2014 API server port (default: 21420)\n- `OPENACP_TUNNEL_ENABLED`\n- `OPENACP_TUNNEL_PORT`\n- `OPENACP_TUNNEL_PROVIDER`\n- `OPENACP_LOG_LEVEL`\n- `OPENACP_LOG_DIR`\n- `OPENACP_DEBUG` \u2014 Sets log level to debug\n\n---\n\n## Troubleshooting\n\n### Session stuck / not responding\n- Check status: ask Assistant \"Is anything stuck?\"\n- Cancel and create new: `/cancel` then `/new`\n- Check system health: Assistant can run health check\n\n### Agent not found\n- Check available agents: `/agents` or `openacp agents`\n- Install missing agent: `openacp agents install <name>`\n- Some agents need login first: `openacp agents info <name>` to see setup steps\n- Run agent CLI for setup: `openacp agents run <name> -- <args>`\n\n### Permission request not showing\n- Check Notifications topic for the alert\n- Try `/bypass_permissions on` to auto-approve (if you trust the agent)\n\n### Session disappeared after restart\n- Sessions persist across restarts\n- Send a message in the old topic \u2014 it auto-resumes\n- If topic was deleted, the session record may still exist in status\n\n### Bot not responding at all\n- Check daemon: `openacp status`\n- Check logs: `openacp logs`\n- Restart: `openacp start` or `/restart`\n\n### Messages going to wrong topic\n- Each session is bound to a specific topic/thread\n- If you see messages appearing in the Assistant topic instead of the session topic, try creating a new session\n\n### Viewing logs\n- Session-specific logs: `~/.openacp/logs/sessions/`\n- System logs: `openacp logs` to tail live\n- Set `OPENACP_DEBUG=true` for verbose output\n\n---\n\n## Data & Storage\n\nAll data is stored in `~/.openacp/`:\n- `config.json` \u2014 Configuration\n- `agents.json` \u2014 Installed agents (managed by AgentCatalog)\n- `registry-cache.json` \u2014 Cached ACP Registry data (refreshes every 24h)\n- `agents/` \u2014 Downloaded binary agents\n- `sessions/` \u2014 Session records and state\n- `topics/` \u2014 Topic-to-session mappings\n- `logs/` \u2014 System and session logs\n- `plugins/` \u2014 Installed adapter plugins\n- `openacp.pid` \u2014 Daemon PID file\n\nSession records auto-cleanup: 30 days (configurable via `sessionStore.ttlDays`).\nSession logs auto-cleanup: 30 days (configurable via `logging.sessionLogRetentionDays`).\n";
3218
3218
 
3219
3219
  interface TelegramChannelConfig extends ChannelConfig {
3220
3220
  botToken: string;
package/dist/index.js CHANGED
@@ -2412,8 +2412,7 @@ Each session gets its own topic \u2014 chat there to work with the agent.
2412
2412
  /menu \u2014 Show action menu
2413
2413
 
2414
2414
  \u{1F512} <b>Session Options</b>
2415
- /enable_bypass \u2014 Auto-approve permissions
2416
- /disable_bypass \u2014 Restore permission prompts
2415
+ /bypass_permissions \u2014 Toggle bypass permissions
2417
2416
  /handoff \u2014 Continue session in terminal
2418
2417
  /archive \u2014 Archive session topic
2419
2418
  /clear \u2014 Clear assistant history
@@ -3178,7 +3177,14 @@ var DebugTracer = class {
3178
3177
  this.dirCreated = true;
3179
3178
  }
3180
3179
  const filePath = path6.join(this.logDir, `${this.sessionId}_${layer}.jsonl`);
3181
- const line = JSON.stringify({ ts: Date.now(), ...data }) + "\n";
3180
+ const seen = /* @__PURE__ */ new WeakSet();
3181
+ const line = JSON.stringify({ ts: Date.now(), ...data }, (_key, value) => {
3182
+ if (typeof value === "object" && value !== null) {
3183
+ if (seen.has(value)) return "[Circular]";
3184
+ seen.add(value);
3185
+ }
3186
+ return value;
3187
+ }) + "\n";
3182
3188
  fs7.appendFileSync(filePath, line);
3183
3189
  } catch {
3184
3190
  }
@@ -4831,7 +4837,7 @@ var SessionManager = class {
4831
4837
  init_log();
4832
4838
 
4833
4839
  // src/core/utils/bypass-detection.ts
4834
- var BYPASS_KEYWORDS = ["bypass", "dangerous", "skip", "dontask", "dont_ask", "auto_accept"];
4840
+ var BYPASS_KEYWORDS = ["bypass", "dangerous", "auto_accept"];
4835
4841
  function isPermissionBypass(value) {
4836
4842
  const lower = value.toLowerCase();
4837
4843
  return BYPASS_KEYWORDS.some((kw) => lower.includes(kw));
@@ -10565,11 +10571,13 @@ function formatToolSummary(name, rawInput, displaySummary) {
10565
10571
  return desc ? `\u{1F9E0} Agent: ${desc}` : `\u{1F527} ${name}`;
10566
10572
  }
10567
10573
  if (lowerName === "webfetch" || lowerName === "web_fetch") {
10568
- const url = String(args.url ?? "").slice(0, 60);
10574
+ const raw = args.url ?? "";
10575
+ const url = (raw !== "undefined" ? String(raw) : "").slice(0, 60);
10569
10576
  return url ? `\u{1F310} Fetch ${url}` : `\u{1F527} ${name}`;
10570
10577
  }
10571
10578
  if (lowerName === "websearch" || lowerName === "web_search") {
10572
- const query = String(args.query ?? "").slice(0, 60);
10579
+ const raw = args.query ?? "";
10580
+ const query = (raw !== "undefined" ? String(raw) : "").slice(0, 60);
10573
10581
  return query ? `\u{1F310} Search "${query}"` : `\u{1F527} ${name}`;
10574
10582
  }
10575
10583
  return `\u{1F527} ${name}`;
@@ -10598,10 +10606,12 @@ function formatToolTitle(name, rawInput, displayTitle) {
10598
10606
  return String(args.description ?? name).slice(0, 60);
10599
10607
  }
10600
10608
  if (["webfetch", "web_fetch"].includes(lowerName)) {
10601
- return String(args.url ?? name).slice(0, 60);
10609
+ const url = typeof args.url === "string" && args.url !== "undefined" ? args.url : null;
10610
+ return (url ?? name).slice(0, 60);
10602
10611
  }
10603
10612
  if (["websearch", "web_search"].includes(lowerName)) {
10604
- return String(args.query ?? name).slice(0, 60);
10613
+ const query = typeof args.query === "string" && args.query !== "undefined" ? args.query : null;
10614
+ return (query ?? name).slice(0, 60);
10605
10615
  }
10606
10616
  return name;
10607
10617
  }
@@ -11530,6 +11540,13 @@ function buildTitle(entry, kind) {
11530
11540
  }
11531
11541
  return capitalize(entry.name);
11532
11542
  }
11543
+ if (kind === "fetch" || kind === "web") {
11544
+ const url = typeof input2.url === "string" ? input2.url : null;
11545
+ if (url && url !== "undefined") return url.length > 60 ? url.slice(0, 57) + "..." : url;
11546
+ const query = typeof input2.query === "string" ? input2.query : null;
11547
+ if (query && query !== "undefined") return query.length > 60 ? query.slice(0, 57) + "..." : query;
11548
+ return capitalize(entry.name);
11549
+ }
11533
11550
  if (entry.name.toLowerCase() === "skill" && typeof input2.skill === "string" && input2.skill) {
11534
11551
  return input2.skill;
11535
11552
  }
@@ -11743,8 +11760,8 @@ A notification also appears in the Notifications topic with a link to the reques
11743
11760
 
11744
11761
  ### Bypass permissions
11745
11762
  Auto-approves ALL permission requests \u2014 the agent runs any command without asking.
11746
- - Enable: \`/enable_bypass\` or tap the \u2620\uFE0F button in the session
11747
- - Disable: \`/disable_bypass\` or tap the \u{1F510} button
11763
+ - Toggle: \`/bypass_permissions on\` or tap the \u2620\uFE0F button in the session
11764
+ - Disable: \`/bypass_permissions off\` or tap the \u{1F510} button
11748
11765
  - \u26A0\uFE0F Use with caution \u2014 the agent can execute anything
11749
11766
 
11750
11767
  ### Session timeout
@@ -11820,8 +11837,7 @@ Just chat naturally: "How do I create a session?", "What's the status?", "Someth
11820
11837
  | \`/sessions\` | Anywhere | List all sessions |
11821
11838
  | \`/agents\` | Anywhere | Browse & install agents from ACP Registry |
11822
11839
  | \`/install <name>\` | Anywhere | Install an agent |
11823
- | \`/enable_bypass\` | Session topic | Auto-approve all permissions |
11824
- | \`/disable_bypass\` | Session topic | Restore permission prompts |
11840
+ | \`/bypass_permissions\` | Session topic | Toggle bypass permissions (on/off) |
11825
11841
  | \`/handoff\` | Session topic | Transfer session to terminal |
11826
11842
  | \`/clear\` | Assistant topic | Clear assistant history |
11827
11843
  | \`/menu\` | Anywhere | Show action menu |
@@ -12015,7 +12031,7 @@ Override config with env vars:
12015
12031
 
12016
12032
  ### Permission request not showing
12017
12033
  - Check Notifications topic for the alert
12018
- - Try \`/enable_bypass\` to auto-approve (if you trust the agent)
12034
+ - Try \`/bypass_permissions on\` to auto-approve (if you trust the agent)
12019
12035
 
12020
12036
  ### Session disappeared after restart
12021
12037
  - Sessions persist across restarts
@@ -12335,7 +12351,7 @@ function setupDangerousModeCallbacks(bot, core) {
12335
12351
  }
12336
12352
  const registry = core.lifecycleManager?.serviceRegistry?.get("command-registry");
12337
12353
  if (registry) {
12338
- await registry.execute(wantOn ? "/bypass on" : "/bypass off", {
12354
+ await registry.execute(wantOn ? "/bypass_permissions on" : "/bypass_permissions off", {
12339
12355
  raw: wantOn ? "on" : "off",
12340
12356
  sessionId,
12341
12357
  channelId: "telegram",
@@ -12389,104 +12405,6 @@ function setupDangerousModeCallbacks(bot, core) {
12389
12405
  }
12390
12406
  });
12391
12407
  }
12392
- async function handleEnableDangerous(ctx, core) {
12393
- const threadId = ctx.message?.message_thread_id;
12394
- if (!threadId) {
12395
- await ctx.reply("\u26A0\uFE0F This command only works inside a session topic.", {
12396
- parse_mode: "HTML"
12397
- });
12398
- return;
12399
- }
12400
- const session = await core.getOrResumeSession(
12401
- "telegram",
12402
- String(threadId)
12403
- );
12404
- if (session) {
12405
- if (session.clientOverrides.bypassPermissions) {
12406
- await ctx.reply("\u2620\uFE0F Bypass is already enabled.", {
12407
- parse_mode: "HTML"
12408
- });
12409
- return;
12410
- }
12411
- session.clientOverrides.bypassPermissions = true;
12412
- core.sessionManager.patchRecord(session.id, { clientOverrides: session.clientOverrides }).catch(() => {
12413
- });
12414
- } else {
12415
- const record = core.sessionManager.getRecordByThread(
12416
- "telegram",
12417
- String(threadId)
12418
- );
12419
- if (!record || record.status === "cancelled" || record.status === "error") {
12420
- await ctx.reply("\u26A0\uFE0F No active session in this topic.", {
12421
- parse_mode: "HTML"
12422
- });
12423
- return;
12424
- }
12425
- if (record.clientOverrides?.bypassPermissions ?? record.dangerousMode) {
12426
- await ctx.reply("\u2620\uFE0F Bypass is already enabled.", {
12427
- parse_mode: "HTML"
12428
- });
12429
- return;
12430
- }
12431
- core.sessionManager.patchRecord(record.sessionId, { clientOverrides: { bypassPermissions: true } }).catch(() => {
12432
- });
12433
- }
12434
- await ctx.reply(
12435
- `\u2620\uFE0F <b>Bypass Permissions enabled</b>
12436
-
12437
- All permission requests will be auto-approved \u2014 the agent can run any action without asking.
12438
-
12439
- Use /disable_bypass to turn this off.`,
12440
- { parse_mode: "HTML" }
12441
- );
12442
- }
12443
- async function handleDisableDangerous(ctx, core) {
12444
- const threadId = ctx.message?.message_thread_id;
12445
- if (!threadId) {
12446
- await ctx.reply("\u26A0\uFE0F This command only works inside a session topic.", {
12447
- parse_mode: "HTML"
12448
- });
12449
- return;
12450
- }
12451
- const session = await core.getOrResumeSession(
12452
- "telegram",
12453
- String(threadId)
12454
- );
12455
- if (session) {
12456
- if (!session.clientOverrides.bypassPermissions) {
12457
- await ctx.reply("\u{1F510} Bypass is already disabled.", {
12458
- parse_mode: "HTML"
12459
- });
12460
- return;
12461
- }
12462
- session.clientOverrides.bypassPermissions = false;
12463
- core.sessionManager.patchRecord(session.id, { clientOverrides: session.clientOverrides }).catch(() => {
12464
- });
12465
- } else {
12466
- const record = core.sessionManager.getRecordByThread(
12467
- "telegram",
12468
- String(threadId)
12469
- );
12470
- if (!record || record.status === "cancelled" || record.status === "error") {
12471
- await ctx.reply("\u26A0\uFE0F No active session in this topic.", {
12472
- parse_mode: "HTML"
12473
- });
12474
- return;
12475
- }
12476
- if (!(record.clientOverrides?.bypassPermissions ?? record.dangerousMode)) {
12477
- await ctx.reply("\u{1F510} Bypass is already disabled.", {
12478
- parse_mode: "HTML"
12479
- });
12480
- return;
12481
- }
12482
- core.sessionManager.patchRecord(record.sessionId, { clientOverrides: { bypassPermissions: false } }).catch(() => {
12483
- });
12484
- }
12485
- await ctx.reply(
12486
- "\u{1F510} <b>Bypass Permissions disabled</b>\n\nYou will be asked to approve risky actions.",
12487
- { parse_mode: "HTML" }
12488
- );
12489
- }
12490
12408
  function buildSessionControlKeyboard(sessionId, dangerousMode, voiceMode) {
12491
12409
  return new InlineKeyboard().text(
12492
12410
  dangerousMode ? "\u{1F510} Disable Bypass Permissions" : "\u2620\uFE0F Enable Bypass Permissions",
@@ -12893,9 +12811,6 @@ async function createSessionDirect(ctx, core, chatId, agentName, workspace, onCo
12893
12811
  }
12894
12812
  );
12895
12813
  onControlMessage?.(session.id, controlMsg.message_id);
12896
- await core.sessionManager.patchRecord(session.id, {
12897
- platform: { topicId: threadId }
12898
- });
12899
12814
  return threadId ?? null;
12900
12815
  } catch (err) {
12901
12816
  log19.error({ err }, "Session creation failed");
@@ -12975,9 +12890,6 @@ async function handleNewChat(ctx, core, chatId, onControlMessage) {
12975
12890
  }
12976
12891
  );
12977
12892
  onControlMessage?.(session.id, controlMsg.message_id);
12978
- await core.sessionManager.patchRecord(session.id, {
12979
- platform: { topicId: newThreadId }
12980
- });
12981
12893
  } catch (err) {
12982
12894
  if (newThreadId) {
12983
12895
  try {
@@ -14042,9 +13954,6 @@ Repo: <code>${escapeHtml(repoPath)}</code>`,
14042
13954
  }
14043
13955
  );
14044
13956
  onControlMessage?.(session.id, controlMsg.message_id);
14045
- await core.sessionManager.patchRecord(session.id, {
14046
- platform: { topicId: threadId }
14047
- });
14048
13957
  } catch (err) {
14049
13958
  log21.error({ err }, "Resume session creation failed");
14050
13959
  if (threadId) {
@@ -14768,8 +14677,6 @@ function setupCommands(bot, core, chatId, assistant) {
14768
14677
  bot.command("install", (ctx) => handleInstall(ctx, core));
14769
14678
  bot.command("help", (ctx) => handleHelp(ctx));
14770
14679
  bot.command("menu", (ctx) => handleMenu(ctx));
14771
- bot.command("enable_bypass", (ctx) => handleEnableDangerous(ctx, core));
14772
- bot.command("disable_bypass", (ctx) => handleDisableDangerous(ctx, core));
14773
14680
  bot.command("restart", (ctx) => handleRestart(ctx, core));
14774
14681
  bot.command("update", (ctx) => handleUpdate(ctx, core));
14775
14682
  bot.command("integrate", (ctx) => handleIntegrate(ctx, core));
@@ -14852,14 +14759,6 @@ var STATIC_COMMANDS = [
14852
14759
  { command: "install", description: "Install a new agent" },
14853
14760
  { command: "help", description: "Help" },
14854
14761
  { command: "menu", description: "Show menu" },
14855
- {
14856
- command: "enable_bypass",
14857
- description: "Auto-approve all permission requests (session only)"
14858
- },
14859
- {
14860
- command: "disable_bypass",
14861
- description: "Restore normal permission prompts (session only)"
14862
- },
14863
14762
  { command: "integrate", description: "Manage agent integrations" },
14864
14763
  { command: "handoff", description: "Continue this session in your terminal" },
14865
14764
  { command: "clear", description: "Clear assistant history" },
@@ -14873,7 +14772,11 @@ var STATIC_COMMANDS = [
14873
14772
  { command: "verbosity", description: "Deprecated: use /outputmode instead" },
14874
14773
  { command: "outputmode", description: "Control output display level (low/medium/high)" },
14875
14774
  { command: "resume", description: "Resume with conversation history from Entire checkpoints" },
14876
- { command: "switch", description: "Switch agent in current session" }
14775
+ { command: "switch", description: "Switch agent in current session" },
14776
+ { command: "mode", description: "Change session mode" },
14777
+ { command: "model", description: "Change AI model" },
14778
+ { command: "thought", description: "Change thinking level" },
14779
+ { command: "bypass_permissions", description: "Toggle bypass permissions (on/off)" }
14877
14780
  ];
14878
14781
 
14879
14782
  // src/plugins/telegram/permissions.ts
@@ -16169,9 +16072,10 @@ var TelegramAdapter = class extends MessagingAdapter {
16169
16072
  controlMsgIds = /* @__PURE__ */ new Map();
16170
16073
  /** Store control message ID in memory + persist to session record */
16171
16074
  storeControlMsgId(sessionId, msgId) {
16172
- this.storeControlMsgId(sessionId, msgId);
16075
+ this.controlMsgIds.set(sessionId, msgId);
16076
+ const record = this.core.sessionManager.getSessionRecord(sessionId);
16173
16077
  this.core.sessionManager.patchRecord(sessionId, {
16174
- platform: { controlMsgId: msgId }
16078
+ platform: { ...record?.platform ?? {}, controlMsgId: msgId }
16175
16079
  }).catch(() => {
16176
16080
  });
16177
16081
  }