@openacp/cli 0.6.9 → 2026.41.1

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.
Files changed (133) hide show
  1. package/README.md +116 -152
  2. package/dist/cli.d.ts +11 -0
  3. package/dist/cli.js +27740 -415
  4. package/dist/cli.js.map +1 -1
  5. package/dist/data/registry-snapshot.json +1 -1
  6. package/dist/index.d.ts +1944 -463
  7. package/dist/index.js +17365 -102
  8. package/dist/index.js.map +1 -1
  9. package/package.json +13 -7
  10. package/dist/action-detect-P7ZE4NEM.js +0 -16
  11. package/dist/action-detect-P7ZE4NEM.js.map +0 -1
  12. package/dist/adapter-LNEGLMOE.js +0 -799
  13. package/dist/adapter-LNEGLMOE.js.map +0 -1
  14. package/dist/admin-6SYB6XCZ.js +0 -23
  15. package/dist/admin-6SYB6XCZ.js.map +0 -1
  16. package/dist/agent-catalog-FC3HGDEQ.js +0 -11
  17. package/dist/agent-catalog-FC3HGDEQ.js.map +0 -1
  18. package/dist/agent-dependencies-4OWBMZWZ.js +0 -24
  19. package/dist/agent-dependencies-4OWBMZWZ.js.map +0 -1
  20. package/dist/agent-registry-WT4NXPYG.js +0 -9
  21. package/dist/agent-registry-WT4NXPYG.js.map +0 -1
  22. package/dist/agent-store-VZLFPTZU.js +0 -9
  23. package/dist/agent-store-VZLFPTZU.js.map +0 -1
  24. package/dist/agents-QO7DKARJ.js +0 -15
  25. package/dist/agents-QO7DKARJ.js.map +0 -1
  26. package/dist/api-client-CFQT5U7D.js +0 -14
  27. package/dist/api-client-CFQT5U7D.js.map +0 -1
  28. package/dist/autostart-X33OGMX6.js +0 -23
  29. package/dist/autostart-X33OGMX6.js.map +0 -1
  30. package/dist/chunk-2CJ46J3C.js +0 -154
  31. package/dist/chunk-2CJ46J3C.js.map +0 -1
  32. package/dist/chunk-2HMQOC7N.js +0 -134
  33. package/dist/chunk-2HMQOC7N.js.map +0 -1
  34. package/dist/chunk-33RP6K2O.js +0 -435
  35. package/dist/chunk-33RP6K2O.js.map +0 -1
  36. package/dist/chunk-34M4OS5P.js +0 -83
  37. package/dist/chunk-34M4OS5P.js.map +0 -1
  38. package/dist/chunk-4CTX774K.js +0 -265
  39. package/dist/chunk-4CTX774K.js.map +0 -1
  40. package/dist/chunk-7QJS2XBD.js +0 -92
  41. package/dist/chunk-7QJS2XBD.js.map +0 -1
  42. package/dist/chunk-BDYVCIBH.js +0 -735
  43. package/dist/chunk-BDYVCIBH.js.map +0 -1
  44. package/dist/chunk-BN3X7UXB.js +0 -738
  45. package/dist/chunk-BN3X7UXB.js.map +0 -1
  46. package/dist/chunk-BNLGTZ34.js +0 -122
  47. package/dist/chunk-BNLGTZ34.js.map +0 -1
  48. package/dist/chunk-GAK6PIBW.js +0 -224
  49. package/dist/chunk-GAK6PIBW.js.map +0 -1
  50. package/dist/chunk-H5P2C6H4.js +0 -4740
  51. package/dist/chunk-H5P2C6H4.js.map +0 -1
  52. package/dist/chunk-I7WC6E5S.js +0 -71
  53. package/dist/chunk-I7WC6E5S.js.map +0 -1
  54. package/dist/chunk-J4SJTKIK.js +0 -203
  55. package/dist/chunk-J4SJTKIK.js.map +0 -1
  56. package/dist/chunk-JHYXKVV2.js +0 -183
  57. package/dist/chunk-JHYXKVV2.js.map +0 -1
  58. package/dist/chunk-JKBFUAJK.js +0 -282
  59. package/dist/chunk-JKBFUAJK.js.map +0 -1
  60. package/dist/chunk-JUYDFUSN.js +0 -673
  61. package/dist/chunk-JUYDFUSN.js.map +0 -1
  62. package/dist/chunk-KIRH7TUJ.js +0 -219
  63. package/dist/chunk-KIRH7TUJ.js.map +0 -1
  64. package/dist/chunk-LBIKITQT.js +0 -22
  65. package/dist/chunk-LBIKITQT.js.map +0 -1
  66. package/dist/chunk-LGP2YGRL.js +0 -4880
  67. package/dist/chunk-LGP2YGRL.js.map +0 -1
  68. package/dist/chunk-NAMYZIS5.js +0 -1
  69. package/dist/chunk-NAMYZIS5.js.map +0 -1
  70. package/dist/chunk-NVPG6JCL.js +0 -724
  71. package/dist/chunk-NVPG6JCL.js.map +0 -1
  72. package/dist/chunk-O7CPGUAI.js +0 -298
  73. package/dist/chunk-O7CPGUAI.js.map +0 -1
  74. package/dist/chunk-S64CB6J3.js +0 -98
  75. package/dist/chunk-S64CB6J3.js.map +0 -1
  76. package/dist/chunk-UKT3G5IA.js +0 -484
  77. package/dist/chunk-UKT3G5IA.js.map +0 -1
  78. package/dist/chunk-V5GZQEIY.js +0 -101
  79. package/dist/chunk-V5GZQEIY.js.map +0 -1
  80. package/dist/chunk-VOIJ6OY4.js +0 -63
  81. package/dist/chunk-VOIJ6OY4.js.map +0 -1
  82. package/dist/chunk-VUNV25KB.js +0 -16
  83. package/dist/chunk-VUNV25KB.js.map +0 -1
  84. package/dist/chunk-W3EYKZNQ.js +0 -45
  85. package/dist/chunk-W3EYKZNQ.js.map +0 -1
  86. package/dist/chunk-WTZDAYZX.js +0 -172
  87. package/dist/chunk-WTZDAYZX.js.map +0 -1
  88. package/dist/chunk-XANPHG7W.js +0 -145
  89. package/dist/chunk-XANPHG7W.js.map +0 -1
  90. package/dist/config-6S355X75.js +0 -15
  91. package/dist/config-6S355X75.js.map +0 -1
  92. package/dist/config-editor-RVLWZLVB.js +0 -13
  93. package/dist/config-editor-RVLWZLVB.js.map +0 -1
  94. package/dist/config-registry-AHYI4MYL.js +0 -18
  95. package/dist/config-registry-AHYI4MYL.js.map +0 -1
  96. package/dist/daemon-4CS6HMB5.js +0 -30
  97. package/dist/daemon-4CS6HMB5.js.map +0 -1
  98. package/dist/discord-7IVQKB2H.js +0 -2083
  99. package/dist/discord-7IVQKB2H.js.map +0 -1
  100. package/dist/dist-UHQK5CXN.js +0 -21151
  101. package/dist/dist-UHQK5CXN.js.map +0 -1
  102. package/dist/doctor-HZZ5BSHB.js +0 -10
  103. package/dist/doctor-HZZ5BSHB.js.map +0 -1
  104. package/dist/doctor-OLYBO3V3.js +0 -15
  105. package/dist/doctor-OLYBO3V3.js.map +0 -1
  106. package/dist/install-cloudflared-Z7VCGOVG.js +0 -33
  107. package/dist/install-cloudflared-Z7VCGOVG.js.map +0 -1
  108. package/dist/install-jq-HUYSQWKR.js +0 -32
  109. package/dist/install-jq-HUYSQWKR.js.map +0 -1
  110. package/dist/integrate-PNEHRY2I.js +0 -373
  111. package/dist/integrate-PNEHRY2I.js.map +0 -1
  112. package/dist/log-NXABYJTT.js +0 -24
  113. package/dist/log-NXABYJTT.js.map +0 -1
  114. package/dist/main-ZK4MPMBG.js +0 -238
  115. package/dist/main-ZK4MPMBG.js.map +0 -1
  116. package/dist/menu-YY5MKHEK.js +0 -16
  117. package/dist/menu-YY5MKHEK.js.map +0 -1
  118. package/dist/new-session-FEO4J4VU.js +0 -17
  119. package/dist/new-session-FEO4J4VU.js.map +0 -1
  120. package/dist/post-upgrade-CJG5I7M2.js +0 -80
  121. package/dist/post-upgrade-CJG5I7M2.js.map +0 -1
  122. package/dist/session-IUSI7P5S.js +0 -20
  123. package/dist/session-IUSI7P5S.js.map +0 -1
  124. package/dist/settings-RQPAM4KC.js +0 -14
  125. package/dist/settings-RQPAM4KC.js.map +0 -1
  126. package/dist/setup-3GQSYBE4.js +0 -35
  127. package/dist/setup-3GQSYBE4.js.map +0 -1
  128. package/dist/suggest-7D6B542M.js +0 -38
  129. package/dist/suggest-7D6B542M.js.map +0 -1
  130. package/dist/tunnel-service-CJLUH6SZ.js +0 -1174
  131. package/dist/tunnel-service-CJLUH6SZ.js.map +0 -1
  132. package/dist/version-NQZBM5M7.js +0 -16
  133. package/dist/version-NQZBM5M7.js.map +0 -1
@@ -1,673 +0,0 @@
1
- // src/adapters/shared/message-formatter.ts
2
- function extractContentText(content, depth = 0) {
3
- if (!content || depth > 5) return "";
4
- if (typeof content === "string") return content;
5
- if (Array.isArray(content)) {
6
- return content.map((c) => extractContentText(c, depth + 1)).filter(Boolean).join("\n");
7
- }
8
- if (typeof content !== "object") return String(content);
9
- const obj = content;
10
- if (obj.text && typeof obj.text === "string") return obj.text;
11
- if (obj.content) {
12
- if (typeof obj.content === "string") return obj.content;
13
- if (Array.isArray(obj.content)) {
14
- return obj.content.map((c) => extractContentText(c, depth + 1)).filter(Boolean).join("\n");
15
- }
16
- return extractContentText(obj.content, depth + 1);
17
- }
18
- if (obj.input) return extractContentText(obj.input, depth + 1);
19
- if (obj.output) return extractContentText(obj.output, depth + 1);
20
- const keys = Object.keys(obj).filter((k) => k !== "type");
21
- if (keys.length === 0) return "";
22
- try {
23
- return JSON.stringify(obj, null, 2);
24
- } catch {
25
- return "";
26
- }
27
- }
28
- function parseRawInput(rawInput) {
29
- try {
30
- if (typeof rawInput === "string") {
31
- return JSON.parse(rawInput);
32
- }
33
- if (typeof rawInput === "object" && rawInput !== null) {
34
- return rawInput;
35
- }
36
- } catch {
37
- }
38
- return {};
39
- }
40
- function formatToolSummary(name, rawInput, displaySummary) {
41
- if (displaySummary && typeof displaySummary === "string") {
42
- return displaySummary;
43
- }
44
- const args = parseRawInput(rawInput);
45
- const lowerName = name.toLowerCase();
46
- if (lowerName === "read") {
47
- const fp = args.file_path ?? args.filePath ?? "";
48
- const limit = args.limit ? ` (${args.limit} lines)` : "";
49
- return fp ? `\u{1F4D6} Read ${fp}${limit}` : `\u{1F527} ${name}`;
50
- }
51
- if (lowerName === "edit") {
52
- const fp = args.file_path ?? args.filePath ?? "";
53
- return fp ? `\u270F\uFE0F Edit ${fp}` : `\u{1F527} ${name}`;
54
- }
55
- if (lowerName === "write") {
56
- const fp = args.file_path ?? args.filePath ?? "";
57
- return fp ? `\u{1F4DD} Write ${fp}` : `\u{1F527} ${name}`;
58
- }
59
- if (lowerName === "bash") {
60
- const cmd = String(args.command ?? "").slice(0, 60);
61
- return cmd ? `\u25B6\uFE0F Run: ${cmd}` : `\u{1F527} ${name}`;
62
- }
63
- if (lowerName === "grep") {
64
- const pattern = args.pattern ?? "";
65
- const path = args.path ?? "";
66
- return pattern ? `\u{1F50D} Grep "${pattern}"${path ? ` in ${path}` : ""}` : `\u{1F527} ${name}`;
67
- }
68
- if (lowerName === "glob") {
69
- const pattern = args.pattern ?? "";
70
- return pattern ? `\u{1F50D} Glob ${pattern}` : `\u{1F527} ${name}`;
71
- }
72
- if (lowerName === "agent") {
73
- const desc = String(args.description ?? "").slice(0, 60);
74
- return desc ? `\u{1F9E0} Agent: ${desc}` : `\u{1F527} ${name}`;
75
- }
76
- if (lowerName === "webfetch" || lowerName === "web_fetch") {
77
- const url = String(args.url ?? "").slice(0, 60);
78
- return url ? `\u{1F310} Fetch ${url}` : `\u{1F527} ${name}`;
79
- }
80
- if (lowerName === "websearch" || lowerName === "web_search") {
81
- const query = String(args.query ?? "").slice(0, 60);
82
- return query ? `\u{1F310} Search "${query}"` : `\u{1F527} ${name}`;
83
- }
84
- return `\u{1F527} ${name}`;
85
- }
86
- function formatToolTitle(name, rawInput, displayTitle) {
87
- if (displayTitle && typeof displayTitle === "string") {
88
- return displayTitle;
89
- }
90
- const args = parseRawInput(rawInput);
91
- const lowerName = name.toLowerCase();
92
- if (["read", "edit", "write"].includes(lowerName)) {
93
- return String(args.file_path ?? args.filePath ?? name);
94
- }
95
- if (lowerName === "bash") {
96
- return String(args.command ?? name).slice(0, 60);
97
- }
98
- if (lowerName === "grep") {
99
- const pattern = args.pattern ?? "";
100
- const path = args.path ?? "";
101
- return pattern ? `"${pattern}"${path ? ` in ${path}` : ""}` : name;
102
- }
103
- if (lowerName === "glob") {
104
- return String(args.pattern ?? name);
105
- }
106
- if (lowerName === "agent") {
107
- return String(args.description ?? name).slice(0, 60);
108
- }
109
- if (["webfetch", "web_fetch"].includes(lowerName)) {
110
- return String(args.url ?? name).slice(0, 60);
111
- }
112
- if (["websearch", "web_search"].includes(lowerName)) {
113
- return String(args.query ?? name).slice(0, 60);
114
- }
115
- return name;
116
- }
117
- var NOISE_RULES = [
118
- {
119
- match: (name) => name.toLowerCase() === "ls",
120
- action: "hide"
121
- },
122
- {
123
- match: (_name, kind, rawInput) => {
124
- if (kind !== "read") return false;
125
- const args = parseRawInput(rawInput);
126
- const p = String(args.file_path ?? args.filePath ?? args.path ?? "");
127
- return p.endsWith("/");
128
- },
129
- action: "hide"
130
- },
131
- {
132
- match: (name) => name.toLowerCase() === "glob",
133
- action: "collapse"
134
- }
135
- ];
136
- function evaluateNoise(name, kind, rawInput) {
137
- for (const rule of NOISE_RULES) {
138
- if (rule.match(name, kind, rawInput)) return rule.action;
139
- }
140
- return null;
141
- }
142
-
143
- // src/adapters/shared/message-dispatcher.ts
144
- var HIDDEN_ON_LOW = /* @__PURE__ */ new Set(["thought", "plan", "usage"]);
145
- function shouldDispatch(type, verbosity) {
146
- if (verbosity === "low" && HIDDEN_ON_LOW.has(type)) return false;
147
- return true;
148
- }
149
- async function dispatchMessage(handlers, ctx, content, verbosity = "medium") {
150
- if (!shouldDispatch(content.type, verbosity)) return;
151
- switch (content.type) {
152
- case "text":
153
- return handlers.onText(ctx, content);
154
- case "thought":
155
- return handlers.onThought(ctx, content);
156
- case "tool_call":
157
- return handlers.onToolCall(ctx, content);
158
- case "tool_update":
159
- return handlers.onToolUpdate(ctx, content);
160
- case "plan":
161
- return handlers.onPlan(ctx, content);
162
- case "usage":
163
- return handlers.onUsage(ctx, content);
164
- case "session_end":
165
- return handlers.onSessionEnd(ctx, content);
166
- case "error":
167
- return handlers.onError(ctx, content);
168
- case "attachment":
169
- return handlers.onAttachment(ctx, content);
170
- case "system_message":
171
- return handlers.onSystemMessage(ctx, content);
172
- default:
173
- return;
174
- }
175
- }
176
-
177
- // src/adapters/shared/format-types.ts
178
- var STATUS_ICONS = {
179
- pending: "\u23F3",
180
- in_progress: "\u{1F504}",
181
- completed: "\u2705",
182
- failed: "\u274C",
183
- cancelled: "\u{1F6AB}",
184
- running: "\u{1F504}",
185
- done: "\u2705",
186
- error: "\u274C"
187
- };
188
-
189
- // src/adapters/shared/format-utils.ts
190
- function progressBar(ratio, length = 10) {
191
- const filled = Math.round(Math.min(ratio, 1) * length);
192
- return "\u2593".repeat(filled) + "\u2591".repeat(length - filled);
193
- }
194
- function formatTokens(n) {
195
- return n >= 1e3 ? `${Math.round(n / 1e3)}k` : String(n);
196
- }
197
- function stripCodeFences(text) {
198
- return text.replace(/```\w*\n?/g, "").replace(/```$/gm, "").trim();
199
- }
200
- function truncateContent(text, maxLen) {
201
- if (text.length <= maxLen) return text;
202
- return text.slice(0, maxLen) + "\n\u2026 (truncated)";
203
- }
204
- function splitMessage(text, maxLength) {
205
- if (text.length <= maxLength) return [text];
206
- const chunks = [];
207
- let remaining = text;
208
- while (remaining.length > 0) {
209
- if (remaining.length <= maxLength) {
210
- chunks.push(remaining);
211
- break;
212
- }
213
- const wouldLeaveSmall = remaining.length < maxLength * 1.3;
214
- const searchLimit = wouldLeaveSmall ? Math.floor(remaining.length / 2) + 300 : maxLength;
215
- const threshold = maxLength * 0.2;
216
- let splitAt = remaining.lastIndexOf("\n\n", searchLimit);
217
- if (splitAt === -1 || splitAt < threshold) {
218
- splitAt = remaining.lastIndexOf("\n", searchLimit);
219
- }
220
- if (splitAt === -1 || splitAt < threshold) {
221
- splitAt = searchLimit;
222
- }
223
- const candidate = remaining.slice(0, splitAt);
224
- const fences = candidate.match(/```/g);
225
- if (fences && fences.length % 2 !== 0) {
226
- const closingFence = remaining.indexOf("```", splitAt);
227
- if (closingFence !== -1) {
228
- const afterFence = remaining.indexOf("\n", closingFence + 3);
229
- const fenceSplit = afterFence !== -1 ? afterFence + 1 : closingFence + 3;
230
- if (fenceSplit <= maxLength * 2) {
231
- splitAt = fenceSplit;
232
- }
233
- }
234
- }
235
- chunks.push(remaining.slice(0, splitAt));
236
- remaining = remaining.slice(splitAt).replace(/^\n+/, "");
237
- }
238
- return chunks;
239
- }
240
-
241
- // src/product-guide.ts
242
- var PRODUCT_GUIDE = `
243
- # OpenACP \u2014 Product Guide
244
-
245
- OpenACP lets you chat with AI coding agents (like Claude Code) through messaging platforms (Telegram, Discord).
246
- You type messages in your chat platform, the agent reads/writes/runs code in your project folder, and results stream back in real time.
247
-
248
- ---
249
-
250
- ## Quick Start
251
-
252
- 1. Start OpenACP: \`openacp\` (or \`openacp start\` for background daemon)
253
- 2. Open your messaging platform (Telegram group or Discord server) \u2014 you'll see the Assistant topic/thread
254
- 3. Tap/click \u{1F195} New Session or type /new
255
- 4. Pick an agent and a project folder
256
- 5. Chat in the session topic/thread \u2014 the agent works on your code
257
-
258
- ---
259
-
260
- ## Core Concepts
261
-
262
- ### Sessions
263
- A session = one conversation with one AI agent working in one project folder.
264
- Each session gets its own topic (Telegram) or forum thread (Discord). Chat there to give instructions to the agent.
265
-
266
- ### Agents
267
- An agent is an AI coding tool (e.g., Claude Code, Gemini, Cursor, Codex, etc.).
268
- OpenACP supports 28+ agents from the official ACP Registry (agentclientprotocol.com).
269
- You can install multiple agents and choose which one to use per session.
270
- The default agent is used when you don't specify one.
271
-
272
- ### Agent Management
273
- - Browse agents: \`/agents\` in your chat platform or \`openacp agents\` in CLI
274
- - Install: tap the install button in /agents, or \`openacp agents install <name>\`
275
- - Uninstall: \`openacp agents uninstall <name>\`
276
- - Setup/login: \`openacp agents run <name> -- <args>\` (e.g., \`openacp agents run gemini -- auth login\`)
277
- - Details: \`openacp agents info <name>\` shows version, dependencies, and setup steps
278
-
279
- Some agents need additional setup before they can be used:
280
- - Claude: requires \`claude login\`
281
- - Gemini: requires \`openacp agents run gemini -- auth login\`
282
- - Codex: requires setting \`OPENAI_API_KEY\` environment variable
283
- - GitHub Copilot: requires \`openacp agents run copilot -- auth login\`
284
-
285
- Agents are installed in three ways depending on the agent:
286
- - **npx** \u2014 Node.js agents, downloaded automatically on first use
287
- - **uvx** \u2014 Python agents, downloaded automatically on first use
288
- - **binary** \u2014 Platform-specific binaries, downloaded to \`~/.openacp/agents/\`
289
-
290
- ### Project Folder (Workspace)
291
- The directory where the agent reads, writes, and runs code.
292
- When creating a session, you choose which folder the agent works in.
293
- You can type a full path like \`~/code/my-project\` or just a name like \`my-project\` (it becomes \`<base-dir>/my-project\`).
294
-
295
- ### System Topics
296
- - **Assistant** \u2014 Always-on helper that can answer questions, create sessions, check status, troubleshoot
297
- - **Notifications** \u2014 System alerts (permission requests, session errors, completions)
298
-
299
- ---
300
-
301
- ## Creating Sessions
302
-
303
- ### From menu
304
- Tap \u{1F195} New Session \u2192 choose agent (if multiple) \u2192 choose project folder \u2192 confirm
305
-
306
- ### From command
307
- - \`/new\` \u2014 Interactive flow (asks agent + folder)
308
- - \`/new claude ~/code/my-project\` \u2014 Create directly with specific agent and folder
309
-
310
- ### From Assistant topic
311
- Just ask: "Create a session for my-project with claude" \u2014 the assistant handles it
312
-
313
- ### Quick new chat
314
- \`/newchat\` in a session topic \u2014 creates new session with same agent and folder as current one
315
-
316
- ---
317
-
318
- ## Working with Sessions
319
-
320
- ### Chat
321
- Type messages in the session topic. The agent responds with code changes, explanations, tool outputs.
322
-
323
- ### What you see while the agent works
324
- - **\u{1F4AD} Thinking indicator** \u2014 Shows when the agent is reasoning, with elapsed time
325
- - **Text responses** \u2014 Streamed in real time, updated every few seconds
326
- - **Tool calls** \u2014 When the agent runs commands or edits files, you see tool name, input, status, and output
327
- - **\u{1F4CB} Plan card** \u2014 Visual task progress with completed/in-progress/pending items and progress bar
328
- - **"View File" / "View Diff" buttons** \u2014 Opens in browser with Monaco editor (requires tunnel)
329
-
330
- ### Session lifecycle
331
- 1. **Creating** \u2014 Topic created, agent spawning
332
- 2. **Warming up** \u2014 Agent primes its cache (happens automatically, invisible to you)
333
- 3. **Active** \u2014 Ready for your messages
334
- 4. **Auto-naming** \u2014 After your first message, the session gets a descriptive name (agent summarizes in ~5 words). The topic title updates automatically.
335
- 5. **Finished/Error** \u2014 Session completed or hit an error
336
-
337
- ### Agent skills
338
- Some agents provide slash commands (e.g., /compact, /review). Available skills are pinned in the session topic.
339
-
340
- ### Permission requests
341
- When the agent wants to run a command, it asks for permission.
342
- You see buttons: \u2705 Allow, \u274C Reject (and sometimes "Always Allow").
343
- A notification also appears in the Notifications topic with a link to the request.
344
-
345
- ### Dangerous mode
346
- Auto-approves ALL permission requests \u2014 the agent runs any command without asking.
347
- - Enable: \`/enable_dangerous\` or tap the \u2620\uFE0F button in the session
348
- - Disable: \`/disable_dangerous\` or tap the \u{1F510} button
349
- - \u26A0\uFE0F Use with caution \u2014 the agent can execute anything
350
-
351
- ### Session timeout
352
- Idle sessions are automatically cancelled after a configurable timeout (default: 60 minutes).
353
- Configure via \`security.sessionTimeoutMinutes\` in config.
354
-
355
- ---
356
-
357
- ## Session Transfer (Handoff)
358
-
359
- ### Chat \u2192 Terminal
360
- 1. Type \`/handoff\` in a session topic/thread
361
- 2. You get a command like \`claude --resume <SESSION_ID>\`
362
- 3. Copy and run it in your terminal \u2014 the session continues there with full conversation history
363
-
364
- ### Terminal \u2192 Chat
365
- 1. First time: run \`openacp integrate claude\` to install the handoff skill (one-time setup)
366
- 2. In Claude Code, use the /openacp:handoff slash command
367
- 3. The session appears as a new topic/thread and you can continue chatting there
368
-
369
- ### How it works
370
- - The agent session ID is shared between platforms
371
- - Conversation history is preserved \u2014 pick up where you left off
372
- - The agent that supports resume (e.g., Claude with \`--resume\`) handles the actual transfer
373
-
374
- ---
375
-
376
- ## Managing Sessions
377
-
378
- ### Status
379
- - \`/status\` \u2014 Shows active sessions count and details
380
- - Ask the Assistant: "What sessions are running?"
381
-
382
- ### List all sessions
383
- - \`/sessions\` \u2014 Shows all sessions with status (active, finished, error)
384
-
385
- ### Cancel
386
- - \`/cancel\` in a session topic \u2014 cancels that session
387
- - Ask the Assistant: "Cancel the stuck session"
388
-
389
- ### Cleanup
390
- - From \`/sessions\` \u2192 tap cleanup buttons (finished, errors, all)
391
- - Ask the Assistant: "Clean up old sessions"
392
-
393
- ---
394
-
395
- ## Assistant Topic
396
-
397
- The Assistant is an always-on AI helper in its own topic. It can:
398
- - Answer questions about OpenACP
399
- - Create sessions for you
400
- - Check status and health
401
- - Cancel sessions
402
- - Clean up old sessions
403
- - Troubleshoot issues
404
- - Manage configuration
405
-
406
- Just chat naturally: "How do I create a session?", "What's the status?", "Something is stuck"
407
-
408
- ### Clear history
409
- \`/clear\` in the Assistant topic \u2014 resets the conversation
410
-
411
- ---
412
-
413
- ## System Commands
414
-
415
- | Command | Where | What it does |
416
- |---------|-------|-------------|
417
- | \`/new [agent] [path]\` | Anywhere | Create new session |
418
- | \`/newchat\` | Session topic | New session, same agent + folder |
419
- | \`/cancel\` | Session topic | Cancel current session |
420
- | \`/status\` | Anywhere | Show status |
421
- | \`/sessions\` | Anywhere | List all sessions |
422
- | \`/agents\` | Anywhere | Browse & install agents from ACP Registry |
423
- | \`/install <name>\` | Anywhere | Install an agent |
424
- | \`/enable_dangerous\` | Session topic | Auto-approve all permissions |
425
- | \`/disable_dangerous\` | Session topic | Restore permission prompts |
426
- | \`/handoff\` | Session topic | Transfer session to terminal |
427
- | \`/clear\` | Assistant topic | Clear assistant history |
428
- | \`/menu\` | Anywhere | Show action menu |
429
- | \`/help\` | Anywhere | Show help |
430
- | \`/restart\` | Anywhere | Restart OpenACP |
431
- | \`/update\` | Anywhere | Update to latest version |
432
- | \`/integrate\` | Anywhere | Manage agent integrations |
433
-
434
- ---
435
-
436
- ## Menu Buttons
437
-
438
- | Button | Action |
439
- |--------|--------|
440
- | \u{1F195} New Session | Create new session (interactive) |
441
- | \u{1F4CB} Sessions | List all sessions with cleanup options |
442
- | \u{1F4CA} Status | Show active/total session count |
443
- | \u{1F916} Agents | List available agents |
444
- | \u{1F517} Integrate | Manage agent integrations |
445
- | \u2753 Help | Show help text |
446
- | \u{1F504} Restart | Restart OpenACP |
447
- | \u2B06\uFE0F Update | Check and install updates |
448
-
449
- ---
450
-
451
- ## CLI Commands
452
-
453
- ### Server
454
- - \`openacp\` \u2014 Start (uses configured mode: foreground or daemon)
455
- - \`openacp start\` \u2014 Start as background daemon
456
- - \`openacp stop\` \u2014 Stop daemon
457
- - \`openacp status\` \u2014 Show daemon status
458
- - \`openacp logs\` \u2014 Tail daemon logs
459
- - \`openacp --foreground\` \u2014 Force foreground mode (useful for debugging or containers)
460
-
461
- ### Auto-start (run on boot)
462
- - macOS: installs a LaunchAgent in \`~/Library/LaunchAgents/\`
463
- - Linux: installs a systemd user service in \`~/.config/systemd/user/\`
464
- - Enabled automatically when you start the daemon. Remove with \`openacp stop\`.
465
-
466
- ### Configuration
467
- - \`openacp config\` \u2014 Interactive config editor
468
- - \`openacp reset\` \u2014 Delete all data and start fresh
469
-
470
- ### Agent Management (CLI)
471
- - \`openacp agents\` \u2014 List all agents (installed + available from ACP Registry)
472
- - \`openacp agents install <name>\` \u2014 Install an agent
473
- - \`openacp agents uninstall <name>\` \u2014 Remove an agent
474
- - \`openacp agents info <name>\` \u2014 Show details, dependencies, and setup guide
475
- - \`openacp agents run <name> [-- args]\` \u2014 Run agent CLI directly (for login, config, etc.)
476
- - \`openacp agents refresh\` \u2014 Force-refresh registry cache
477
-
478
- ### Plugins
479
- - \`openacp install <package>\` \u2014 Install adapter plugin
480
- - \`openacp uninstall <package>\` \u2014 Remove adapter plugin
481
- - \`openacp plugins\` \u2014 List installed plugins
482
-
483
- ### Integration
484
- - \`openacp integrate <agent>\` \u2014 Install agent integration (e.g., Claude handoff skill)
485
- - \`openacp integrate <agent> --uninstall\` \u2014 Remove integration
486
-
487
- ### API (requires running daemon)
488
- \`openacp api <command>\` \u2014 Interact with running daemon:
489
-
490
- | Command | Description |
491
- |---------|-------------|
492
- | \`status\` | List active sessions |
493
- | \`session <id>\` | Session details |
494
- | \`new <agent> <path>\` | Create session |
495
- | \`send <id> "text"\` | Send prompt |
496
- | \`cancel <id>\` | Cancel session |
497
- | \`dangerous <id> on/off\` | Toggle dangerous mode |
498
- | \`topics [--status x,y]\` | List topics |
499
- | \`delete-topic <id> [--force]\` | Delete topic |
500
- | \`cleanup [--status x,y]\` | Cleanup old topics |
501
- | \`agents\` | List agents |
502
- | \`health\` | System health |
503
- | \`config\` | Show config |
504
- | \`config set <key> <value>\` | Update config |
505
- | \`adapters\` | List adapters |
506
- | \`tunnel\` | Tunnel status |
507
- | \`notify "message"\` | Send notification |
508
- | \`version\` | Daemon version |
509
- | \`restart\` | Restart daemon |
510
-
511
- ---
512
-
513
- ## File Viewer (Tunnel)
514
-
515
- When tunnel is enabled, file edits and diffs get "View" buttons that open in your browser:
516
- - **Monaco Editor** \u2014 Full VS Code editor with syntax highlighting
517
- - **Diff viewer** \u2014 Side-by-side or inline comparison
518
- - **Line highlighting** \u2014 Click lines to highlight
519
- - Dark/light theme toggle
520
-
521
- ### Setup
522
- Enable in config: set \`tunnel.enabled\` to \`true\`.
523
- Providers: Cloudflare (default, free), ngrok, bore, Tailscale Funnel.
524
-
525
- ### Port Tunneling
526
-
527
- Expose any local port (dev servers, APIs, etc.) to the internet:
528
-
529
- **CLI commands** (agent can call these directly):
530
- - \`openacp tunnel add <port> --label <name>\` \u2014 Create tunnel to a local port
531
- - \`openacp tunnel list\` \u2014 List active tunnels
532
- - \`openacp tunnel stop <port>\` \u2014 Stop a tunnel
533
- - \`openacp tunnel stop-all\` \u2014 Stop all user tunnels
534
-
535
- **Telegram commands**:
536
- - \`/tunnel <port> [label]\` \u2014 Create tunnel
537
- - \`/tunnels\` \u2014 List active tunnels
538
- - \`/tunnel stop <port>\` \u2014 Stop tunnel
539
-
540
- Example: after starting a dev server on port 3000, run \`openacp tunnel add 3000 --label my-app\` to get a public URL.
541
-
542
- ---
543
-
544
- ## Configuration
545
-
546
- Config file: \`~/.openacp/config.json\`
547
-
548
- ### Channels
549
- - **channels.telegram.botToken** \u2014 Your Telegram bot token
550
- - **channels.telegram.chatId** \u2014 Your Telegram supergroup ID
551
- - **channels.discord.botToken** \u2014 Your Discord bot token
552
- - **channels.discord.guildId** \u2014 Your Discord server (guild) ID
553
-
554
- ### Agents
555
- - **defaultAgent** \u2014 Which agent to use by default
556
- - Agents are managed via \`/agents\` (Telegram) or \`openacp agents\` (CLI)
557
- - Installed agents are stored in \`~/.openacp/agents.json\`
558
- - Agent list is fetched from the ACP Registry CDN and cached locally (24h)
559
-
560
- ### Workspace
561
- - **workspace.baseDir** \u2014 Base directory for project folders (default: \`~/openacp-workspace\`)
562
-
563
- ### Security
564
- - **security.allowedUserIds** \u2014 Restrict who can use the bot (empty = everyone)
565
- - **security.maxConcurrentSessions** \u2014 Max parallel sessions (default: 5)
566
- - **security.sessionTimeoutMinutes** \u2014 Auto-cancel idle sessions (default: 60)
567
-
568
- ### Tunnel / File Viewer
569
- - **tunnel.enabled** \u2014 Enable file viewer tunnel
570
- - **tunnel.provider** \u2014 Tunnel provider: cloudflare (default, free), ngrok, bore, tailscale
571
- - **tunnel.port** \u2014 Local port for tunnel server (default: 3100)
572
- - **tunnel.auth.enabled** \u2014 Enable authentication for tunnel URLs
573
- - **tunnel.auth.token** \u2014 Auth token for tunnel access
574
- - **tunnel.storeTtlMinutes** \u2014 How long viewer links stay cached (default: 60)
575
-
576
- ### Logging
577
- - **logging.level** \u2014 Log level: silent, debug, info, warn, error, fatal (default: info)
578
- - **logging.logDir** \u2014 Log directory (default: \`~/.openacp/logs\`)
579
- - **logging.maxFileSize** \u2014 Max log file size before rotation
580
- - **logging.maxFiles** \u2014 Max number of rotated log files
581
- - **logging.sessionLogRetentionDays** \u2014 Auto-delete old session logs (default: 30)
582
-
583
- ### Data Retention
584
- - **sessionStore.ttlDays** \u2014 How long session records persist (default: 30). Old records are cleaned up automatically.
585
-
586
- ### Environment variables
587
- Override config with env vars:
588
- - \`OPENACP_TELEGRAM_BOT_TOKEN\`
589
- - \`OPENACP_TELEGRAM_CHAT_ID\`
590
- - \`OPENACP_DISCORD_BOT_TOKEN\`
591
- - \`OPENACP_DISCORD_GUILD_ID\`
592
- - \`OPENACP_DEFAULT_AGENT\`
593
- - \`OPENACP_RUN_MODE\` \u2014 foreground or daemon
594
- - \`OPENACP_API_PORT\` \u2014 API server port (default: 21420)
595
- - \`OPENACP_TUNNEL_ENABLED\`
596
- - \`OPENACP_TUNNEL_PORT\`
597
- - \`OPENACP_TUNNEL_PROVIDER\`
598
- - \`OPENACP_LOG_LEVEL\`
599
- - \`OPENACP_LOG_DIR\`
600
- - \`OPENACP_DEBUG\` \u2014 Sets log level to debug
601
-
602
- ---
603
-
604
- ## Troubleshooting
605
-
606
- ### Session stuck / not responding
607
- - Check status: ask Assistant "Is anything stuck?"
608
- - Cancel and create new: \`/cancel\` then \`/new\`
609
- - Check system health: Assistant can run health check
610
-
611
- ### Agent not found
612
- - Check available agents: \`/agents\` or \`openacp agents\`
613
- - Install missing agent: \`openacp agents install <name>\`
614
- - Some agents need login first: \`openacp agents info <name>\` to see setup steps
615
- - Run agent CLI for setup: \`openacp agents run <name> -- <args>\`
616
-
617
- ### Permission request not showing
618
- - Check Notifications topic for the alert
619
- - Try \`/enable_dangerous\` to auto-approve (if you trust the agent)
620
-
621
- ### Session disappeared after restart
622
- - Sessions persist across restarts
623
- - Send a message in the old topic \u2014 it auto-resumes
624
- - If topic was deleted, the session record may still exist in status
625
-
626
- ### Bot not responding at all
627
- - Check daemon: \`openacp status\`
628
- - Check logs: \`openacp logs\`
629
- - Restart: \`openacp start\` or \`/restart\`
630
-
631
- ### Messages going to wrong topic
632
- - Each session is bound to a specific topic/thread
633
- - If you see messages appearing in the Assistant topic instead of the session topic, try creating a new session
634
-
635
- ### Viewing logs
636
- - Session-specific logs: \`~/.openacp/logs/sessions/\`
637
- - System logs: \`openacp logs\` to tail live
638
- - Set \`OPENACP_DEBUG=true\` for verbose output
639
-
640
- ---
641
-
642
- ## Data & Storage
643
-
644
- All data is stored in \`~/.openacp/\`:
645
- - \`config.json\` \u2014 Configuration
646
- - \`agents.json\` \u2014 Installed agents (managed by AgentCatalog)
647
- - \`registry-cache.json\` \u2014 Cached ACP Registry data (refreshes every 24h)
648
- - \`agents/\` \u2014 Downloaded binary agents
649
- - \`sessions/\` \u2014 Session records and state
650
- - \`topics/\` \u2014 Topic-to-session mappings
651
- - \`logs/\` \u2014 System and session logs
652
- - \`plugins/\` \u2014 Installed adapter plugins
653
- - \`openacp.pid\` \u2014 Daemon PID file
654
-
655
- Session records auto-cleanup: 30 days (configurable via \`sessionStore.ttlDays\`).
656
- Session logs auto-cleanup: 30 days (configurable via \`logging.sessionLogRetentionDays\`).
657
- `;
658
-
659
- export {
660
- STATUS_ICONS,
661
- progressBar,
662
- formatTokens,
663
- stripCodeFences,
664
- truncateContent,
665
- splitMessage,
666
- extractContentText,
667
- formatToolSummary,
668
- formatToolTitle,
669
- evaluateNoise,
670
- PRODUCT_GUIDE,
671
- dispatchMessage
672
- };
673
- //# sourceMappingURL=chunk-JUYDFUSN.js.map