@openacp/cli 2026.41.3 → 2026.41.4
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/cli.js +123 -109
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +1 -4
- package/dist/index.js +30 -59
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1451,9 +1451,6 @@ declare class Session extends TypedEmitter<SessionEvents> {
|
|
|
1451
1451
|
private maybeTranscribeAudio;
|
|
1452
1452
|
private processTTSResponse;
|
|
1453
1453
|
private autoName;
|
|
1454
|
-
/** Fire-and-forget warm-up: primes model cache while user types their first message */
|
|
1455
|
-
warmup(): Promise<void>;
|
|
1456
|
-
private runWarmup;
|
|
1457
1454
|
setInitialConfigOptions(options: ConfigOption[]): void;
|
|
1458
1455
|
setAgentCapabilities(caps: AgentCapabilities | undefined): void;
|
|
1459
1456
|
getConfigOption(id: string): ConfigOption | undefined;
|
|
@@ -3213,7 +3210,7 @@ declare class OutputModeResolver {
|
|
|
3213
3210
|
* OpenACP Product Guide — comprehensive reference for the AI assistant.
|
|
3214
3211
|
* The assistant reads this at runtime to answer user questions about features.
|
|
3215
3212
|
*/
|
|
3216
|
-
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### Dangerous mode\nAuto-approves ALL permission requests \u2014 the agent runs any command without asking.\n- Enable: `/enable_dangerous` or tap the \u2620\uFE0F button in the session\n- Disable: `/disable_dangerous` 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_dangerous` | Session topic | Auto-approve all permissions |\n| `/disable_dangerous` | 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| `dangerous <id> on/off` | Toggle dangerous mode |\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_dangerous` 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";
|
|
3213
|
+
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
3214
|
|
|
3218
3215
|
interface TelegramChannelConfig extends ChannelConfig {
|
|
3219
3216
|
botToken: string;
|
package/dist/index.js
CHANGED
|
@@ -2411,8 +2411,8 @@ Each session gets its own topic \u2014 chat there to work with the agent.
|
|
|
2411
2411
|
/menu \u2014 Show action menu
|
|
2412
2412
|
|
|
2413
2413
|
\u{1F512} <b>Session Options</b>
|
|
2414
|
-
/
|
|
2415
|
-
/
|
|
2414
|
+
/enable_bypass \u2014 Auto-approve permissions
|
|
2415
|
+
/disable_bypass \u2014 Restore permission prompts
|
|
2416
2416
|
/handoff \u2014 Continue session in terminal
|
|
2417
2417
|
/archive \u2014 Archive session topic
|
|
2418
2418
|
/clear \u2014 Clear assistant history
|
|
@@ -4024,10 +4024,6 @@ var Session = class extends TypedEmitter {
|
|
|
4024
4024
|
await this.queue.enqueue(text3, attachments);
|
|
4025
4025
|
}
|
|
4026
4026
|
async processPrompt(text3, attachments) {
|
|
4027
|
-
if (text3 === "\0__warmup__") {
|
|
4028
|
-
await this.runWarmup();
|
|
4029
|
-
return;
|
|
4030
|
-
}
|
|
4031
4027
|
if (this._status === "finished") return;
|
|
4032
4028
|
this.promptCount++;
|
|
4033
4029
|
this.emit("prompt_count_changed", this.promptCount);
|
|
@@ -4203,27 +4199,6 @@ ${result.text}` : result.text;
|
|
|
4203
4199
|
this.resume();
|
|
4204
4200
|
}
|
|
4205
4201
|
}
|
|
4206
|
-
/** Fire-and-forget warm-up: primes model cache while user types their first message */
|
|
4207
|
-
async warmup() {
|
|
4208
|
-
await this.queue.enqueue("\0__warmup__");
|
|
4209
|
-
}
|
|
4210
|
-
async runWarmup() {
|
|
4211
|
-
this.pause((_event, args) => {
|
|
4212
|
-
const agentEvent = args[0];
|
|
4213
|
-
return agentEvent?.type === "commands_update";
|
|
4214
|
-
});
|
|
4215
|
-
try {
|
|
4216
|
-
const start = Date.now();
|
|
4217
|
-
await this.agentInstance.prompt('Reply with only "ready".');
|
|
4218
|
-
this.activate();
|
|
4219
|
-
this.log.info({ durationMs: Date.now() - start }, "Warm-up complete");
|
|
4220
|
-
} catch (err) {
|
|
4221
|
-
this.log.error({ err }, "Warm-up failed");
|
|
4222
|
-
} finally {
|
|
4223
|
-
this.clearBuffer();
|
|
4224
|
-
this.resume();
|
|
4225
|
-
}
|
|
4226
|
-
}
|
|
4227
4202
|
// --- ACP Mode / Config / Model State ---
|
|
4228
4203
|
setInitialConfigOptions(options) {
|
|
4229
4204
|
this.configOptions = options ?? [];
|
|
@@ -11765,10 +11740,10 @@ When the agent wants to run a command, it asks for permission.
|
|
|
11765
11740
|
You see buttons: \u2705 Allow, \u274C Reject (and sometimes "Always Allow").
|
|
11766
11741
|
A notification also appears in the Notifications topic with a link to the request.
|
|
11767
11742
|
|
|
11768
|
-
###
|
|
11743
|
+
### Bypass permissions
|
|
11769
11744
|
Auto-approves ALL permission requests \u2014 the agent runs any command without asking.
|
|
11770
|
-
- Enable: \`/
|
|
11771
|
-
- Disable: \`/
|
|
11745
|
+
- Enable: \`/enable_bypass\` or tap the \u2620\uFE0F button in the session
|
|
11746
|
+
- Disable: \`/disable_bypass\` or tap the \u{1F510} button
|
|
11772
11747
|
- \u26A0\uFE0F Use with caution \u2014 the agent can execute anything
|
|
11773
11748
|
|
|
11774
11749
|
### Session timeout
|
|
@@ -11844,8 +11819,8 @@ Just chat naturally: "How do I create a session?", "What's the status?", "Someth
|
|
|
11844
11819
|
| \`/sessions\` | Anywhere | List all sessions |
|
|
11845
11820
|
| \`/agents\` | Anywhere | Browse & install agents from ACP Registry |
|
|
11846
11821
|
| \`/install <name>\` | Anywhere | Install an agent |
|
|
11847
|
-
| \`/
|
|
11848
|
-
| \`/
|
|
11822
|
+
| \`/enable_bypass\` | Session topic | Auto-approve all permissions |
|
|
11823
|
+
| \`/disable_bypass\` | Session topic | Restore permission prompts |
|
|
11849
11824
|
| \`/handoff\` | Session topic | Transfer session to terminal |
|
|
11850
11825
|
| \`/clear\` | Assistant topic | Clear assistant history |
|
|
11851
11826
|
| \`/menu\` | Anywhere | Show action menu |
|
|
@@ -11917,7 +11892,7 @@ Just chat naturally: "How do I create a session?", "What's the status?", "Someth
|
|
|
11917
11892
|
| \`new <agent> <path>\` | Create session |
|
|
11918
11893
|
| \`send <id> "text"\` | Send prompt |
|
|
11919
11894
|
| \`cancel <id>\` | Cancel session |
|
|
11920
|
-
| \`
|
|
11895
|
+
| \`bypass <id> on/off\` | Toggle bypass permissions |
|
|
11921
11896
|
| \`topics [--status x,y]\` | List topics |
|
|
11922
11897
|
| \`delete-topic <id> [--force]\` | Delete topic |
|
|
11923
11898
|
| \`cleanup [--status x,y]\` | Cleanup old topics |
|
|
@@ -12039,7 +12014,7 @@ Override config with env vars:
|
|
|
12039
12014
|
|
|
12040
12015
|
### Permission request not showing
|
|
12041
12016
|
- Check Notifications topic for the alert
|
|
12042
|
-
- Try \`/
|
|
12017
|
+
- Try \`/enable_bypass\` to auto-approve (if you trust the agent)
|
|
12043
12018
|
|
|
12044
12019
|
### Session disappeared after restart
|
|
12045
12020
|
- Sessions persist across restarts
|
|
@@ -12351,11 +12326,11 @@ function setupDangerousModeCallbacks(bot, core) {
|
|
|
12351
12326
|
session.clientOverrides.bypassPermissions = newDangerousMode2;
|
|
12352
12327
|
log18.info(
|
|
12353
12328
|
{ sessionId, dangerousMode: newDangerousMode2 },
|
|
12354
|
-
"
|
|
12329
|
+
"Bypass permissions toggled via button"
|
|
12355
12330
|
);
|
|
12356
12331
|
core.sessionManager.patchRecord(sessionId, { clientOverrides: session.clientOverrides }).catch(() => {
|
|
12357
12332
|
});
|
|
12358
|
-
const toastText2 = newDangerousMode2 ? "\u2620\uFE0F
|
|
12333
|
+
const toastText2 = newDangerousMode2 ? "\u2620\uFE0F Bypass enabled \u2014 permissions auto-approved" : "\u{1F510} Bypass disabled \u2014 approvals required";
|
|
12359
12334
|
try {
|
|
12360
12335
|
await ctx.answerCallbackQuery({ text: toastText2 });
|
|
12361
12336
|
} catch {
|
|
@@ -12387,9 +12362,9 @@ function setupDangerousModeCallbacks(bot, core) {
|
|
|
12387
12362
|
});
|
|
12388
12363
|
log18.info(
|
|
12389
12364
|
{ sessionId, dangerousMode: newDangerousMode },
|
|
12390
|
-
"
|
|
12365
|
+
"Bypass permissions toggled via button (store-only, session not in memory)"
|
|
12391
12366
|
);
|
|
12392
|
-
const toastText = newDangerousMode ? "\u2620\uFE0F
|
|
12367
|
+
const toastText = newDangerousMode ? "\u2620\uFE0F Bypass enabled \u2014 permissions auto-approved" : "\u{1F510} Bypass disabled \u2014 approvals required";
|
|
12393
12368
|
try {
|
|
12394
12369
|
await ctx.answerCallbackQuery({ text: toastText });
|
|
12395
12370
|
} catch {
|
|
@@ -12420,7 +12395,7 @@ async function handleEnableDangerous(ctx, core) {
|
|
|
12420
12395
|
);
|
|
12421
12396
|
if (session) {
|
|
12422
12397
|
if (session.clientOverrides.bypassPermissions) {
|
|
12423
|
-
await ctx.reply("\u2620\uFE0F
|
|
12398
|
+
await ctx.reply("\u2620\uFE0F Bypass is already enabled.", {
|
|
12424
12399
|
parse_mode: "HTML"
|
|
12425
12400
|
});
|
|
12426
12401
|
return;
|
|
@@ -12440,7 +12415,7 @@ async function handleEnableDangerous(ctx, core) {
|
|
|
12440
12415
|
return;
|
|
12441
12416
|
}
|
|
12442
12417
|
if (record.clientOverrides?.bypassPermissions ?? record.dangerousMode) {
|
|
12443
|
-
await ctx.reply("\u2620\uFE0F
|
|
12418
|
+
await ctx.reply("\u2620\uFE0F Bypass is already enabled.", {
|
|
12444
12419
|
parse_mode: "HTML"
|
|
12445
12420
|
});
|
|
12446
12421
|
return;
|
|
@@ -12449,11 +12424,11 @@ async function handleEnableDangerous(ctx, core) {
|
|
|
12449
12424
|
});
|
|
12450
12425
|
}
|
|
12451
12426
|
await ctx.reply(
|
|
12452
|
-
`\
|
|
12427
|
+
`\u2620\uFE0F <b>Bypass enabled</b>
|
|
12453
12428
|
|
|
12454
|
-
All permission requests will be auto-approved
|
|
12429
|
+
All permission requests will be auto-approved \u2014 the agent can run any action without asking.
|
|
12455
12430
|
|
|
12456
|
-
Use /
|
|
12431
|
+
Use /disable_bypass to turn this off.`,
|
|
12457
12432
|
{ parse_mode: "HTML" }
|
|
12458
12433
|
);
|
|
12459
12434
|
}
|
|
@@ -12471,7 +12446,7 @@ async function handleDisableDangerous(ctx, core) {
|
|
|
12471
12446
|
);
|
|
12472
12447
|
if (session) {
|
|
12473
12448
|
if (!session.clientOverrides.bypassPermissions) {
|
|
12474
|
-
await ctx.reply("\u{1F510}
|
|
12449
|
+
await ctx.reply("\u{1F510} Bypass is already disabled.", {
|
|
12475
12450
|
parse_mode: "HTML"
|
|
12476
12451
|
});
|
|
12477
12452
|
return;
|
|
@@ -12491,7 +12466,7 @@ async function handleDisableDangerous(ctx, core) {
|
|
|
12491
12466
|
return;
|
|
12492
12467
|
}
|
|
12493
12468
|
if (!(record.clientOverrides?.bypassPermissions ?? record.dangerousMode)) {
|
|
12494
|
-
await ctx.reply("\u{1F510}
|
|
12469
|
+
await ctx.reply("\u{1F510} Bypass is already disabled.", {
|
|
12495
12470
|
parse_mode: "HTML"
|
|
12496
12471
|
});
|
|
12497
12472
|
return;
|
|
@@ -12500,13 +12475,13 @@ async function handleDisableDangerous(ctx, core) {
|
|
|
12500
12475
|
});
|
|
12501
12476
|
}
|
|
12502
12477
|
await ctx.reply(
|
|
12503
|
-
"\u{1F510} <b>
|
|
12478
|
+
"\u{1F510} <b>Bypass disabled</b>\n\nYou will be asked to approve risky actions.",
|
|
12504
12479
|
{ parse_mode: "HTML" }
|
|
12505
12480
|
);
|
|
12506
12481
|
}
|
|
12507
12482
|
function buildSessionControlKeyboard(sessionId, dangerousMode, voiceMode) {
|
|
12508
12483
|
return new InlineKeyboard().text(
|
|
12509
|
-
dangerousMode ? "\u{1F510} Disable
|
|
12484
|
+
dangerousMode ? "\u{1F510} Disable Bypass" : "\u2620\uFE0F Enable Bypass",
|
|
12510
12485
|
`d:${sessionId}`
|
|
12511
12486
|
).row().text(
|
|
12512
12487
|
voiceMode ? "\u{1F50A} Text to Speech" : "\u{1F507} Text to Speech",
|
|
@@ -12888,7 +12863,6 @@ This is your coding session \u2014 chat here to work with the agent.`,
|
|
|
12888
12863
|
reply_markup: buildSessionControlKeyboard(session.id, false, false)
|
|
12889
12864
|
}
|
|
12890
12865
|
);
|
|
12891
|
-
session.warmup().catch((err) => log19.error({ err }, "Warm-up error"));
|
|
12892
12866
|
return threadId ?? null;
|
|
12893
12867
|
} catch (err) {
|
|
12894
12868
|
log19.error({ err }, "Session creation failed");
|
|
@@ -12969,7 +12943,6 @@ async function handleNewChat(ctx, core, chatId) {
|
|
|
12969
12943
|
reply_markup: buildSessionControlKeyboard(session.id, false, false)
|
|
12970
12944
|
}
|
|
12971
12945
|
);
|
|
12972
|
-
session.warmup().catch((err) => log19.error({ err }, "Warm-up error"));
|
|
12973
12946
|
} catch (err) {
|
|
12974
12947
|
if (newThreadId) {
|
|
12975
12948
|
try {
|
|
@@ -13000,7 +12973,6 @@ async function executeNewSession(bot, core, chatId, agentName, workspace) {
|
|
|
13000
12973
|
} });
|
|
13001
12974
|
const finalName = `\u{1F504} ${session.agentName} \u2014 New Session`;
|
|
13002
12975
|
await renameSessionTopic(bot, chatId, threadId, finalName);
|
|
13003
|
-
session.warmup().catch((err) => log19.error({ err }, "Warm-up error"));
|
|
13004
12976
|
return { session, threadId, firstMsgId };
|
|
13005
12977
|
} catch (err) {
|
|
13006
12978
|
try {
|
|
@@ -14037,7 +14009,6 @@ Context is ready \u2014 chat here to continue working with the agent.`,
|
|
|
14037
14009
|
reply_markup: buildSessionControlKeyboard(session.id, false, false)
|
|
14038
14010
|
}
|
|
14039
14011
|
);
|
|
14040
|
-
session.warmup().catch((err) => log21.error({ err }, "Warm-up error"));
|
|
14041
14012
|
} catch (err) {
|
|
14042
14013
|
log21.error({ err }, "Resume session creation failed");
|
|
14043
14014
|
if (threadId) {
|
|
@@ -14760,8 +14731,8 @@ function setupCommands(bot, core, chatId, assistant) {
|
|
|
14760
14731
|
bot.command("install", (ctx) => handleInstall(ctx, core));
|
|
14761
14732
|
bot.command("help", (ctx) => handleHelp(ctx));
|
|
14762
14733
|
bot.command("menu", (ctx) => handleMenu(ctx));
|
|
14763
|
-
bot.command("
|
|
14764
|
-
bot.command("
|
|
14734
|
+
bot.command("enable_bypass", (ctx) => handleEnableDangerous(ctx, core));
|
|
14735
|
+
bot.command("disable_bypass", (ctx) => handleDisableDangerous(ctx, core));
|
|
14765
14736
|
bot.command("restart", (ctx) => handleRestart(ctx, core));
|
|
14766
14737
|
bot.command("update", (ctx) => handleUpdate(ctx, core));
|
|
14767
14738
|
bot.command("integrate", (ctx) => handleIntegrate(ctx, core));
|
|
@@ -14845,11 +14816,11 @@ var STATIC_COMMANDS = [
|
|
|
14845
14816
|
{ command: "help", description: "Help" },
|
|
14846
14817
|
{ command: "menu", description: "Show menu" },
|
|
14847
14818
|
{
|
|
14848
|
-
command: "
|
|
14819
|
+
command: "enable_bypass",
|
|
14849
14820
|
description: "Auto-approve all permission requests (session only)"
|
|
14850
14821
|
},
|
|
14851
14822
|
{
|
|
14852
|
-
command: "
|
|
14823
|
+
command: "disable_bypass",
|
|
14853
14824
|
description: "Restore normal permission prompts (session only)"
|
|
14854
14825
|
},
|
|
14855
14826
|
{ command: "integrate", description: "Manage agent integrations" },
|
|
@@ -15086,9 +15057,9 @@ function buildAssistantSystemPrompt(ctx) {
|
|
|
15086
15057
|
- Always ask for confirmation \u2014 these are disruptive actions
|
|
15087
15058
|
- Guide user: "Tap \u{1F504} Restart button or type /restart"
|
|
15088
15059
|
|
|
15089
|
-
### Toggle
|
|
15090
|
-
- Run \`openacp api
|
|
15091
|
-
- Explain:
|
|
15060
|
+
### Toggle Bypass Permissions
|
|
15061
|
+
- Run \`openacp api bypass <id> on|off\`
|
|
15062
|
+
- Explain: bypass permissions auto-approves all permission requests \u2014 the agent can run any command without asking
|
|
15092
15063
|
|
|
15093
15064
|
## CLI Commands Reference
|
|
15094
15065
|
\`\`\`bash
|
|
@@ -15098,7 +15069,7 @@ openacp api session <id> # Session detail
|
|
|
15098
15069
|
openacp api new <agent> <workspace> --channel telegram # Create new session
|
|
15099
15070
|
openacp api send <id> "prompt text" # Send prompt to session
|
|
15100
15071
|
openacp api cancel <id> # Cancel session
|
|
15101
|
-
openacp api
|
|
15072
|
+
openacp api bypass <id> on|off # Toggle bypass permissions
|
|
15102
15073
|
|
|
15103
15074
|
# Topic management
|
|
15104
15075
|
openacp api topics # List all topics
|