@openacp/cli 0.5.2 → 0.6.0

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 (96) hide show
  1. package/README.md +40 -14
  2. package/dist/action-detect-6M5GCGAU.js +15 -0
  3. package/dist/admin-IKPS5PFC.js +16 -0
  4. package/dist/agents-55NX3DHM.js +14 -0
  5. package/dist/{api-client-UN7BXQOQ.js → api-client-BH2JFHQW.js} +4 -2
  6. package/dist/{autostart-K73RQZVV.js → autostart-A7JRU4WJ.js} +6 -2
  7. package/dist/chunk-3WPG7GXA.js +134 -0
  8. package/dist/chunk-3WPG7GXA.js.map +1 -0
  9. package/dist/{chunk-NDR5JCS7.js → chunk-437NLISU.js} +2 -2
  10. package/dist/chunk-5NBWM7P6.js +438 -0
  11. package/dist/chunk-5NBWM7P6.js.map +1 -0
  12. package/dist/{chunk-F4TB4UBK.js → chunk-6Q7PZWCL.js} +171 -26
  13. package/dist/chunk-6Q7PZWCL.js.map +1 -0
  14. package/dist/chunk-7G5QKLLF.js +105 -0
  15. package/dist/chunk-7G5QKLLF.js.map +1 -0
  16. package/dist/chunk-AKIU4JBF.js +145 -0
  17. package/dist/chunk-AKIU4JBF.js.map +1 -0
  18. package/dist/{chunk-JRF4G4X7.js → chunk-DWQKUECJ.js} +13 -2
  19. package/dist/chunk-DWQKUECJ.js.map +1 -0
  20. package/dist/{chunk-KSIQZC3J.js → chunk-EVFJW45N.js} +1 -1
  21. package/dist/chunk-EVFJW45N.js.map +1 -0
  22. package/dist/chunk-H7ZMPBZC.js +203 -0
  23. package/dist/chunk-H7ZMPBZC.js.map +1 -0
  24. package/dist/chunk-I7WC6E5S.js +71 -0
  25. package/dist/chunk-I7WC6E5S.js.map +1 -0
  26. package/dist/{chunk-4ZGMSNRP.js → chunk-MHFCZGRW.js} +114 -16
  27. package/dist/chunk-MHFCZGRW.js.map +1 -0
  28. package/dist/{chunk-X6LLG7XN.js → chunk-PMGNLNSH.js} +15 -6
  29. package/dist/chunk-PMGNLNSH.js.map +1 -0
  30. package/dist/chunk-SM3G6UAX.js +122 -0
  31. package/dist/chunk-SM3G6UAX.js.map +1 -0
  32. package/dist/{chunk-IRGYTNLP.js → chunk-SPX7CKWV.js} +76 -2
  33. package/dist/chunk-SPX7CKWV.js.map +1 -0
  34. package/dist/chunk-T22OLSET.js +265 -0
  35. package/dist/chunk-T22OLSET.js.map +1 -0
  36. package/dist/chunk-THBR6OXH.js +62 -0
  37. package/dist/chunk-THBR6OXH.js.map +1 -0
  38. package/dist/{chunk-65XE66HK.js → chunk-V2V767XI.js} +373 -489
  39. package/dist/chunk-V2V767XI.js.map +1 -0
  40. package/dist/{chunk-OORPX73T.js → chunk-W3EYKZNQ.js} +17 -2
  41. package/dist/chunk-W3EYKZNQ.js.map +1 -0
  42. package/dist/{chunk-VBEWSWVL.js → chunk-YYQXWA62.js} +52 -9
  43. package/dist/chunk-YYQXWA62.js.map +1 -0
  44. package/dist/cli.js +121 -32
  45. package/dist/cli.js.map +1 -1
  46. package/dist/{config-PCPIBPUA.js → config-KF2MQWAP.js} +2 -2
  47. package/dist/config-editor-OTODXUF7.js +12 -0
  48. package/dist/{daemon-JZLFRUW6.js → daemon-U6UC7OM4.js} +3 -3
  49. package/dist/discord-SLLKRUP7.js +2034 -0
  50. package/dist/discord-SLLKRUP7.js.map +1 -0
  51. package/dist/doctor-DB5PRQ6D.js +14 -0
  52. package/dist/doctor-DB5PRQ6D.js.map +1 -0
  53. package/dist/doctor-SYWNJFYK.js +9 -0
  54. package/dist/doctor-SYWNJFYK.js.map +1 -0
  55. package/dist/index.d.ts +47 -7
  56. package/dist/index.js +11 -9
  57. package/dist/{integrate-BLETI3UO.js → integrate-VOUYBPPZ.js} +106 -3
  58. package/dist/integrate-VOUYBPPZ.js.map +1 -0
  59. package/dist/{main-AH3NCVM3.js → main-M6RH3SS5.js} +31 -23
  60. package/dist/main-M6RH3SS5.js.map +1 -0
  61. package/dist/new-session-DRRP2J7E.js +16 -0
  62. package/dist/new-session-DRRP2J7E.js.map +1 -0
  63. package/dist/session-FVFLBREJ.js +19 -0
  64. package/dist/session-FVFLBREJ.js.map +1 -0
  65. package/dist/settings-LPOLJ6SA.js +12 -0
  66. package/dist/settings-LPOLJ6SA.js.map +1 -0
  67. package/dist/{setup-7JINXQOA.js → setup-LI5CKYDK.js} +9 -5
  68. package/dist/setup-LI5CKYDK.js.map +1 -0
  69. package/dist/{tunnel-service-LEVPLXAZ.js → tunnel-service-U6V4HQOO.js} +263 -47
  70. package/dist/tunnel-service-U6V4HQOO.js.map +1 -0
  71. package/dist/{version-VC5CPXBX.js → version-ALWGGVKM.js} +2 -2
  72. package/dist/version-ALWGGVKM.js.map +1 -0
  73. package/package.json +2 -1
  74. package/dist/chunk-4ZGMSNRP.js.map +0 -1
  75. package/dist/chunk-65XE66HK.js.map +0 -1
  76. package/dist/chunk-F4TB4UBK.js.map +0 -1
  77. package/dist/chunk-IRGYTNLP.js.map +0 -1
  78. package/dist/chunk-JRF4G4X7.js.map +0 -1
  79. package/dist/chunk-KSIQZC3J.js.map +0 -1
  80. package/dist/chunk-OORPX73T.js.map +0 -1
  81. package/dist/chunk-VBEWSWVL.js.map +0 -1
  82. package/dist/chunk-X6LLG7XN.js.map +0 -1
  83. package/dist/config-editor-DDF3ZFJK.js +0 -12
  84. package/dist/doctor-N2HKKUUQ.js +0 -9
  85. package/dist/integrate-BLETI3UO.js.map +0 -1
  86. package/dist/main-AH3NCVM3.js.map +0 -1
  87. package/dist/tunnel-service-LEVPLXAZ.js.map +0 -1
  88. /package/dist/{api-client-UN7BXQOQ.js.map → action-detect-6M5GCGAU.js.map} +0 -0
  89. /package/dist/{autostart-K73RQZVV.js.map → admin-IKPS5PFC.js.map} +0 -0
  90. /package/dist/{config-PCPIBPUA.js.map → agents-55NX3DHM.js.map} +0 -0
  91. /package/dist/{config-editor-DDF3ZFJK.js.map → api-client-BH2JFHQW.js.map} +0 -0
  92. /package/dist/{daemon-JZLFRUW6.js.map → autostart-A7JRU4WJ.js.map} +0 -0
  93. /package/dist/{chunk-NDR5JCS7.js.map → chunk-437NLISU.js.map} +0 -0
  94. /package/dist/{doctor-N2HKKUUQ.js.map → config-KF2MQWAP.js.map} +0 -0
  95. /package/dist/{setup-7JINXQOA.js.map → config-editor-OTODXUF7.js.map} +0 -0
  96. /package/dist/{version-VC5CPXBX.js.map → daemon-U6UC7OM4.js.map} +0 -0
@@ -3,6 +3,7 @@ import * as fs from "fs";
3
3
  import * as path from "path";
4
4
  import * as os from "os";
5
5
  var DEFAULT_PORT_FILE = path.join(os.homedir(), ".openacp", "api.port");
6
+ var DEFAULT_SECRET_FILE = path.join(os.homedir(), ".openacp", "api-secret");
6
7
  function readApiPort(portFilePath = DEFAULT_PORT_FILE) {
7
8
  try {
8
9
  const content = fs.readFileSync(portFilePath, "utf-8").trim();
@@ -12,6 +13,14 @@ function readApiPort(portFilePath = DEFAULT_PORT_FILE) {
12
13
  return null;
13
14
  }
14
15
  }
16
+ function readApiSecret(secretFilePath = DEFAULT_SECRET_FILE) {
17
+ try {
18
+ const content = fs.readFileSync(secretFilePath, "utf-8").trim();
19
+ return content || null;
20
+ } catch {
21
+ return null;
22
+ }
23
+ }
15
24
  function removeStalePortFile(portFilePath = DEFAULT_PORT_FILE) {
16
25
  try {
17
26
  fs.unlinkSync(portFilePath);
@@ -19,12 +28,18 @@ function removeStalePortFile(portFilePath = DEFAULT_PORT_FILE) {
19
28
  }
20
29
  }
21
30
  async function apiCall(port, urlPath, options) {
22
- return fetch(`http://127.0.0.1:${port}${urlPath}`, options);
31
+ const secret = readApiSecret();
32
+ const headers = new Headers(options?.headers);
33
+ if (secret) {
34
+ headers.set("Authorization", `Bearer ${secret}`);
35
+ }
36
+ return fetch(`http://127.0.0.1:${port}${urlPath}`, { ...options, headers });
23
37
  }
24
38
 
25
39
  export {
26
40
  readApiPort,
41
+ readApiSecret,
27
42
  removeStalePortFile,
28
43
  apiCall
29
44
  };
30
- //# sourceMappingURL=chunk-OORPX73T.js.map
45
+ //# sourceMappingURL=chunk-W3EYKZNQ.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/core/api-client.ts"],"sourcesContent":["import * as fs from 'node:fs'\nimport * as path from 'node:path'\nimport * as os from 'node:os'\n\nconst DEFAULT_PORT_FILE = path.join(os.homedir(), '.openacp', 'api.port')\nconst DEFAULT_SECRET_FILE = path.join(os.homedir(), '.openacp', 'api-secret')\n\nexport function readApiPort(portFilePath: string = DEFAULT_PORT_FILE): number | null {\n try {\n const content = fs.readFileSync(portFilePath, 'utf-8').trim()\n const port = parseInt(content, 10)\n return isNaN(port) ? null : port\n } catch {\n return null\n }\n}\n\nexport function readApiSecret(secretFilePath: string = DEFAULT_SECRET_FILE): string | null {\n try {\n const content = fs.readFileSync(secretFilePath, 'utf-8').trim()\n return content || null\n } catch {\n return null\n }\n}\n\nexport function removeStalePortFile(portFilePath: string = DEFAULT_PORT_FILE): void {\n try {\n fs.unlinkSync(portFilePath)\n } catch {\n // ignore\n }\n}\n\nexport async function apiCall(\n port: number,\n urlPath: string,\n options?: RequestInit,\n): Promise<Response> {\n const secret = readApiSecret()\n const headers = new Headers(options?.headers)\n if (secret) {\n headers.set('Authorization', `Bearer ${secret}`)\n }\n return fetch(`http://127.0.0.1:${port}${urlPath}`, { ...options, headers })\n}\n"],"mappings":";AAAA,YAAY,QAAQ;AACpB,YAAY,UAAU;AACtB,YAAY,QAAQ;AAEpB,IAAM,oBAAyB,UAAQ,WAAQ,GAAG,YAAY,UAAU;AACxE,IAAM,sBAA2B,UAAQ,WAAQ,GAAG,YAAY,YAAY;AAErE,SAAS,YAAY,eAAuB,mBAAkC;AACnF,MAAI;AACF,UAAM,UAAa,gBAAa,cAAc,OAAO,EAAE,KAAK;AAC5D,UAAM,OAAO,SAAS,SAAS,EAAE;AACjC,WAAO,MAAM,IAAI,IAAI,OAAO;AAAA,EAC9B,QAAQ;AACN,WAAO;AAAA,EACT;AACF;AAEO,SAAS,cAAc,iBAAyB,qBAAoC;AACzF,MAAI;AACF,UAAM,UAAa,gBAAa,gBAAgB,OAAO,EAAE,KAAK;AAC9D,WAAO,WAAW;AAAA,EACpB,QAAQ;AACN,WAAO;AAAA,EACT;AACF;AAEO,SAAS,oBAAoB,eAAuB,mBAAyB;AAClF,MAAI;AACF,IAAG,cAAW,YAAY;AAAA,EAC5B,QAAQ;AAAA,EAER;AACF;AAEA,eAAsB,QACpB,MACA,SACA,SACmB;AACnB,QAAM,SAAS,cAAc;AAC7B,QAAM,UAAU,IAAI,QAAQ,SAAS,OAAO;AAC5C,MAAI,QAAQ;AACV,YAAQ,IAAI,iBAAiB,UAAU,MAAM,EAAE;AAAA,EACjD;AACA,SAAO,MAAM,oBAAoB,IAAI,GAAG,OAAO,IAAI,EAAE,GAAG,SAAS,QAAQ,CAAC;AAC5E;","names":[]}
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  expandHome
3
- } from "./chunk-JRF4G4X7.js";
3
+ } from "./chunk-DWQKUECJ.js";
4
4
 
5
5
  // src/core/daemon.ts
6
6
  import { spawn } from "child_process";
@@ -78,23 +78,66 @@ function startDaemon(pidPath = DEFAULT_PID_PATH, logDir) {
78
78
  child.unref();
79
79
  return { pid: child.pid };
80
80
  }
81
- function stopDaemon(pidPath = DEFAULT_PID_PATH) {
82
- const pid = readPidFile(pidPath);
83
- if (pid === null) return { stopped: false, error: "Not running (no PID file)" };
81
+ function sleep(ms) {
82
+ return new Promise((resolve2) => setTimeout(resolve2, ms));
83
+ }
84
+ function isProcessAlive(pid) {
84
85
  try {
85
86
  process.kill(pid, 0);
86
- } catch {
87
+ return "alive";
88
+ } catch (e) {
89
+ const err = e;
90
+ if (err.code === "EPERM") return "eperm";
91
+ return "dead";
92
+ }
93
+ }
94
+ async function stopDaemon(pidPath = DEFAULT_PID_PATH) {
95
+ const pid = readPidFile(pidPath);
96
+ if (pid === null) return { stopped: false, error: "Not running (no PID file)" };
97
+ const status = isProcessAlive(pid);
98
+ if (status === "dead") {
87
99
  removePidFile(pidPath);
88
100
  return { stopped: false, error: "Not running (stale PID file removed)" };
89
101
  }
102
+ if (status === "eperm") {
103
+ removePidFile(pidPath);
104
+ return { stopped: false, error: "PID belongs to another process (stale PID file removed)" };
105
+ }
90
106
  try {
91
107
  process.kill(pid, "SIGTERM");
92
- clearRunning();
93
- removePidFile(pidPath);
94
- return { stopped: true, pid };
95
108
  } catch (e) {
96
109
  return { stopped: false, error: `Failed to stop: ${e.message}` };
97
110
  }
111
+ clearRunning();
112
+ const POLL_INTERVAL = 100;
113
+ const TIMEOUT = 5e3;
114
+ const start = Date.now();
115
+ while (Date.now() - start < TIMEOUT) {
116
+ await sleep(POLL_INTERVAL);
117
+ const s = isProcessAlive(pid);
118
+ if (s === "dead" || s === "eperm") {
119
+ removePidFile(pidPath);
120
+ return { stopped: true, pid };
121
+ }
122
+ }
123
+ try {
124
+ process.kill(pid, "SIGKILL");
125
+ } catch (e) {
126
+ const err = e;
127
+ if (err.code === "EPERM") {
128
+ return { stopped: false, pid, error: "PID may have been reused by another process. Run `openacp status` to verify, or manually delete the PID file." };
129
+ }
130
+ }
131
+ const killStart = Date.now();
132
+ while (Date.now() - killStart < 1e3) {
133
+ await sleep(POLL_INTERVAL);
134
+ const s = isProcessAlive(pid);
135
+ if (s === "dead" || s === "eperm") {
136
+ removePidFile(pidPath);
137
+ return { stopped: true, pid };
138
+ }
139
+ }
140
+ return { stopped: false, pid, error: "Process did not exit after SIGKILL (possible uninterruptible I/O). PID file retained." };
98
141
  }
99
142
  function getPidPath() {
100
143
  return DEFAULT_PID_PATH;
@@ -126,4 +169,4 @@ export {
126
169
  clearRunning,
127
170
  shouldAutoStart
128
171
  };
129
- //# sourceMappingURL=chunk-VBEWSWVL.js.map
172
+ //# sourceMappingURL=chunk-YYQXWA62.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/core/daemon.ts"],"sourcesContent":["import { spawn } from 'node:child_process'\nimport * as fs from 'node:fs'\nimport * as path from 'node:path'\nimport * as os from 'node:os'\nimport { expandHome } from './config.js'\n\nconst DEFAULT_PID_PATH = path.join(os.homedir(), '.openacp', 'openacp.pid')\nconst DEFAULT_LOG_DIR = path.join(os.homedir(), '.openacp', 'logs')\nconst RUNNING_MARKER = path.join(os.homedir(), '.openacp', 'running')\n\nexport function writePidFile(pidPath: string, pid: number): void {\n const dir = path.dirname(pidPath)\n fs.mkdirSync(dir, { recursive: true })\n fs.writeFileSync(pidPath, String(pid))\n}\n\nexport function readPidFile(pidPath: string): number | null {\n try {\n const content = fs.readFileSync(pidPath, 'utf-8').trim()\n const pid = parseInt(content, 10)\n return isNaN(pid) ? null : pid\n } catch {\n return null\n }\n}\n\nexport function removePidFile(pidPath: string): void {\n try {\n fs.unlinkSync(pidPath)\n } catch {\n // ignore if already gone\n }\n}\n\nexport function isProcessRunning(pidPath: string): boolean {\n const pid = readPidFile(pidPath)\n if (pid === null) return false\n try {\n process.kill(pid, 0)\n return true\n } catch {\n // Process not running, clean up stale PID file\n removePidFile(pidPath)\n return false\n }\n}\n\nexport function getStatus(pidPath: string = DEFAULT_PID_PATH): { running: boolean; pid?: number } {\n const pid = readPidFile(pidPath)\n if (pid === null) return { running: false }\n try {\n process.kill(pid, 0)\n return { running: true, pid }\n } catch {\n removePidFile(pidPath)\n return { running: false }\n }\n}\n\nexport function startDaemon(pidPath: string = DEFAULT_PID_PATH, logDir?: string): { pid: number } | { error: string } {\n // Mark as running so auto-start works on next boot\n markRunning()\n\n // Check if already running\n if (isProcessRunning(pidPath)) {\n const pid = readPidFile(pidPath)!\n return { error: `Already running (PID ${pid})` }\n }\n\n const resolvedLogDir = logDir ? expandHome(logDir) : DEFAULT_LOG_DIR\n fs.mkdirSync(resolvedLogDir, { recursive: true })\n const logFile = path.join(resolvedLogDir, 'openacp.log')\n\n // Find the CLI entry point\n const cliPath = path.resolve(process.argv[1])\n const nodePath = process.execPath\n\n const out = fs.openSync(logFile, 'a')\n const err = fs.openSync(logFile, 'a')\n\n const child = spawn(nodePath, [cliPath, '--daemon-child'], {\n detached: true,\n stdio: ['ignore', out, err],\n })\n\n // Close file descriptors in parent — child has its own copies\n fs.closeSync(out)\n fs.closeSync(err)\n\n if (!child.pid) {\n return { error: 'Failed to spawn daemon process' }\n }\n\n // PID file is written by the child process itself (in main.ts startServer)\n // to avoid race conditions and ensure consistency with LaunchAgent/systemd starts.\n // We still write it here as a fallback in case the child hasn't written it yet\n // when the parent needs to report the PID.\n writePidFile(pidPath, child.pid)\n child.unref()\n\n return { pid: child.pid }\n}\n\nfunction sleep(ms: number): Promise<void> {\n return new Promise(resolve => setTimeout(resolve, ms))\n}\n\nfunction isProcessAlive(pid: number): 'alive' | 'dead' | 'eperm' {\n try {\n process.kill(pid, 0)\n return 'alive'\n } catch (e) {\n const err = e as NodeJS.ErrnoException\n if (err.code === 'EPERM') return 'eperm'\n return 'dead'\n }\n}\n\nexport async function stopDaemon(pidPath: string = DEFAULT_PID_PATH): Promise<{ stopped: boolean; pid?: number; error?: string }> {\n const pid = readPidFile(pidPath)\n if (pid === null) return { stopped: false, error: 'Not running (no PID file)' }\n\n const status = isProcessAlive(pid)\n if (status === 'dead') {\n removePidFile(pidPath)\n return { stopped: false, error: 'Not running (stale PID file removed)' }\n }\n if (status === 'eperm') {\n removePidFile(pidPath)\n return { stopped: false, error: 'PID belongs to another process (stale PID file removed)' }\n }\n\n try {\n process.kill(pid, 'SIGTERM')\n } catch (e) {\n return { stopped: false, error: `Failed to stop: ${(e as Error).message}` }\n }\n\n clearRunning()\n\n const POLL_INTERVAL = 100\n const TIMEOUT = 5000\n const start = Date.now()\n\n while (Date.now() - start < TIMEOUT) {\n await sleep(POLL_INTERVAL)\n const s = isProcessAlive(pid)\n if (s === 'dead' || s === 'eperm') {\n removePidFile(pidPath)\n return { stopped: true, pid }\n }\n }\n\n try {\n process.kill(pid, 'SIGKILL')\n } catch (e) {\n const err = e as NodeJS.ErrnoException\n if (err.code === 'EPERM') {\n return { stopped: false, pid, error: 'PID may have been reused by another process. Run `openacp status` to verify, or manually delete the PID file.' }\n }\n }\n\n const killStart = Date.now()\n while (Date.now() - killStart < 1000) {\n await sleep(POLL_INTERVAL)\n const s = isProcessAlive(pid)\n if (s === 'dead' || s === 'eperm') {\n removePidFile(pidPath)\n return { stopped: true, pid }\n }\n }\n\n // SIGKILL sent but process still alive after 1s — extremely rare (uninterruptible I/O).\n return { stopped: false, pid, error: 'Process did not exit after SIGKILL (possible uninterruptible I/O). PID file retained.' }\n}\n\nexport function getPidPath(): string {\n return DEFAULT_PID_PATH\n}\n\n/** Mark that the daemon should auto-start on boot */\nexport function markRunning(): void {\n fs.mkdirSync(path.dirname(RUNNING_MARKER), { recursive: true })\n fs.writeFileSync(RUNNING_MARKER, '')\n}\n\n/** Remove running marker — daemon won't auto-start on boot */\nexport function clearRunning(): void {\n try { fs.unlinkSync(RUNNING_MARKER) } catch { /* ignore */ }\n}\n\n/** Check if the daemon was running before (should auto-start on boot) */\nexport function shouldAutoStart(): boolean {\n return fs.existsSync(RUNNING_MARKER)\n}\n"],"mappings":"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","names":["resolve"]}
package/dist/cli.js CHANGED
@@ -3,21 +3,21 @@ import {
3
3
  installPlugin,
4
4
  listPlugins,
5
5
  uninstallPlugin
6
- } from "./chunk-NDR5JCS7.js";
7
- import "./chunk-JRF4G4X7.js";
6
+ } from "./chunk-437NLISU.js";
7
+ import "./chunk-DWQKUECJ.js";
8
8
  import "./chunk-ESOPMQAY.js";
9
9
  import {
10
10
  apiCall,
11
11
  readApiPort,
12
12
  removeStalePortFile
13
- } from "./chunk-OORPX73T.js";
13
+ } from "./chunk-W3EYKZNQ.js";
14
14
  import {
15
15
  checkAndPromptUpdate,
16
16
  compareVersions,
17
17
  getCurrentVersion,
18
18
  getLatestVersion,
19
19
  runUpdate
20
- } from "./chunk-KSIQZC3J.js";
20
+ } from "./chunk-EVFJW45N.js";
21
21
 
22
22
  // src/cli.ts
23
23
  import { setDefaultAutoSelectFamily } from "net";
@@ -29,7 +29,7 @@ function wantsHelp(args2) {
29
29
  function printHelp() {
30
30
  console.log(`
31
31
  \x1B[1mOpenACP\x1B[0m \u2014 Self-hosted bridge for AI coding agents
32
- Connect Telegram (and more) to 28+ AI coding agents via ACP protocol.
32
+ Connect messaging platforms (Telegram, Discord) to 28+ AI coding agents via ACP protocol.
33
33
 
34
34
  \x1B[1mGetting Started:\x1B[0m
35
35
  openacp First run launches setup wizard
@@ -65,7 +65,7 @@ Connect Telegram (and more) to 28+ AI coding agents via ACP protocol.
65
65
  openacp doctor --dry-run Check only, don't fix
66
66
 
67
67
  \x1B[1mPlugins:\x1B[0m
68
- openacp install <package> Install adapter (e.g. @openacp/adapter-discord)
68
+ openacp install <package> Install adapter plugin
69
69
  openacp uninstall <package> Remove adapter
70
70
  openacp plugins List installed plugins
71
71
 
@@ -74,6 +74,12 @@ Connect Telegram (and more) to 28+ AI coding agents via ACP protocol.
74
74
  openacp integrate <agent> --uninstall
75
75
  openacp adopt <agent> <id> Adopt an external session
76
76
 
77
+ \x1B[1mTunnels:\x1B[0m
78
+ openacp tunnel add <port> [--label name] Create tunnel to local port
79
+ openacp tunnel list List active tunnels
80
+ openacp tunnel stop <port> Stop a tunnel
81
+ openacp tunnel stop-all Stop all user tunnels
82
+
77
83
  \x1B[1mDaemon API:\x1B[0m \x1B[2m(requires running daemon)\x1B[0m
78
84
  openacp api status Active sessions
79
85
  openacp api session <id> Session details
@@ -90,7 +96,7 @@ Connect Telegram (and more) to 28+ AI coding agents via ACP protocol.
90
96
  `);
91
97
  }
92
98
  async function cmdVersion() {
93
- const { getCurrentVersion: getCurrentVersion2 } = await import("./version-VC5CPXBX.js");
99
+ const { getCurrentVersion: getCurrentVersion2 } = await import("./version-ALWGGVKM.js");
94
100
  console.log(`openacp v${getCurrentVersion2()}`);
95
101
  }
96
102
  async function cmdInstall(args2) {
@@ -765,8 +771,8 @@ Requires an existing config \u2014 run 'openacp' first to set up.
765
771
  return;
766
772
  }
767
773
  await checkAndPromptUpdate();
768
- const { startDaemon, getPidPath } = await import("./daemon-JZLFRUW6.js");
769
- const { ConfigManager } = await import("./config-PCPIBPUA.js");
774
+ const { startDaemon, getPidPath } = await import("./daemon-U6UC7OM4.js");
775
+ const { ConfigManager } = await import("./config-KF2MQWAP.js");
770
776
  const cm = new ConfigManager();
771
777
  if (await cm.exists()) {
772
778
  await cm.load();
@@ -794,8 +800,8 @@ Sends a stop signal to the running OpenACP daemon process.
794
800
  `);
795
801
  return;
796
802
  }
797
- const { stopDaemon } = await import("./daemon-JZLFRUW6.js");
798
- const result = stopDaemon();
803
+ const { stopDaemon } = await import("./daemon-U6UC7OM4.js");
804
+ const result = await stopDaemon();
799
805
  if (result.stopped) {
800
806
  console.log(`OpenACP daemon stopped (was PID ${result.pid})`);
801
807
  } else {
@@ -815,7 +821,7 @@ Shows whether the OpenACP daemon is running and its PID.
815
821
  `);
816
822
  return;
817
823
  }
818
- const { getStatus } = await import("./daemon-JZLFRUW6.js");
824
+ const { getStatus } = await import("./daemon-U6UC7OM4.js");
819
825
  const status = getStatus();
820
826
  if (status.running) {
821
827
  console.log(`OpenACP is running (PID ${status.pid})`);
@@ -839,7 +845,7 @@ Log file location is configured in config (default: ~/.openacp/logs/).
839
845
  return;
840
846
  }
841
847
  const { spawn } = await import("child_process");
842
- const { ConfigManager, expandHome } = await import("./config-PCPIBPUA.js");
848
+ const { ConfigManager, expandHome } = await import("./config-KF2MQWAP.js");
843
849
  const pathMod = await import("path");
844
850
  const cm = new ConfigManager();
845
851
  let logDir = "~/.openacp/logs";
@@ -909,7 +915,7 @@ the API for live updates. When stopped, edits config file directly.
909
915
  console.error("Usage: openacp config set <path> <value>");
910
916
  process.exit(1);
911
917
  }
912
- const { ConfigSchema } = await import("./config-PCPIBPUA.js");
918
+ const { ConfigSchema } = await import("./config-KF2MQWAP.js");
913
919
  const topLevelKey = configPath.split(".")[0];
914
920
  const validConfigKeys = Object.keys(ConfigSchema.shape);
915
921
  if (!validConfigKeys.includes(topLevelKey)) {
@@ -941,7 +947,7 @@ the API for live updates. When stopped, edits config file directly.
941
947
  console.log("Note: restart required for this change to take effect.");
942
948
  }
943
949
  } else {
944
- const { ConfigManager: ConfigManager2 } = await import("./config-PCPIBPUA.js");
950
+ const { ConfigManager: ConfigManager2 } = await import("./config-KF2MQWAP.js");
945
951
  const cm2 = new ConfigManager2();
946
952
  if (!await cm2.exists()) {
947
953
  console.error('No config found. Run "openacp" first to set up.');
@@ -954,8 +960,8 @@ the API for live updates. When stopped, edits config file directly.
954
960
  }
955
961
  return;
956
962
  }
957
- const { runConfigEditor } = await import("./config-editor-DDF3ZFJK.js");
958
- const { ConfigManager } = await import("./config-PCPIBPUA.js");
963
+ const { runConfigEditor } = await import("./config-editor-OTODXUF7.js");
964
+ const { ConfigManager } = await import("./config-KF2MQWAP.js");
959
965
  const cm = new ConfigManager();
960
966
  if (!await cm.exists()) {
961
967
  console.error('No config found. Run "openacp" first to set up.');
@@ -994,7 +1000,7 @@ start fresh with the setup wizard. The daemon must be stopped first.
994
1000
  `);
995
1001
  return;
996
1002
  }
997
- const { getStatus } = await import("./daemon-JZLFRUW6.js");
1003
+ const { getStatus } = await import("./daemon-U6UC7OM4.js");
998
1004
  const status = getStatus();
999
1005
  if (status.running) {
1000
1006
  console.error("OpenACP is running. Stop it first: openacp stop");
@@ -1009,7 +1015,7 @@ start fresh with the setup wizard. The daemon must be stopped first.
1009
1015
  console.log("Aborted.");
1010
1016
  return;
1011
1017
  }
1012
- const { uninstallAutoStart } = await import("./autostart-K73RQZVV.js");
1018
+ const { uninstallAutoStart } = await import("./autostart-A7JRU4WJ.js");
1013
1019
  uninstallAutoStart();
1014
1020
  const fs = await import("fs");
1015
1021
  const os = await import("os");
@@ -1090,7 +1096,8 @@ as a Telegram topic. Requires a running daemon.
1090
1096
  process.exit(1);
1091
1097
  }
1092
1098
  try {
1093
- const res = await fetch(`http://127.0.0.1:${port}/api/sessions/adopt`, {
1099
+ const { apiCall: apiCall2 } = await import("./api-client-BH2JFHQW.js");
1100
+ const res = await apiCall2(port, "/api/sessions/adopt", {
1094
1101
  method: "POST",
1095
1102
  headers: { "Content-Type": "application/json" },
1096
1103
  body: JSON.stringify({ agent, agentSessionId: sessionId, cwd })
@@ -1098,9 +1105,9 @@ as a Telegram topic. Requires a running daemon.
1098
1105
  const data = await res.json();
1099
1106
  if (data.ok) {
1100
1107
  if (data.status === "existing") {
1101
- console.log(`Session already on Telegram. Topic pinged.`);
1108
+ console.log(`Session already active. Topic pinged.`);
1102
1109
  } else {
1103
- console.log(`Session transferred to Telegram.`);
1110
+ console.log(`Session transferred to messaging platform.`);
1104
1111
  }
1105
1112
  console.log(` Session ID: ${data.sessionId}`);
1106
1113
  console.log(` Thread ID: ${data.threadId}`);
@@ -1139,7 +1146,7 @@ a "Handoff" slash command to Claude Code.
1139
1146
  `);
1140
1147
  return;
1141
1148
  }
1142
- const { getIntegration, listIntegrations } = await import("./integrate-BLETI3UO.js");
1149
+ const { getIntegration, listIntegrations } = await import("./integrate-VOUYBPPZ.js");
1143
1150
  const agent = args2[1];
1144
1151
  const uninstall = args2.includes("--uninstall");
1145
1152
  if (!agent) {
@@ -1213,7 +1220,7 @@ Fixable issues can be auto-repaired when not using --dry-run.
1213
1220
  process.exit(1);
1214
1221
  }
1215
1222
  const dryRun = args2.includes("--dry-run");
1216
- const { DoctorEngine } = await import("./doctor-N2HKKUUQ.js");
1223
+ const { DoctorEngine } = await import("./doctor-SYWNJFYK.js");
1217
1224
  const engine = new DoctorEngine({ dryRun });
1218
1225
  console.log("\n\u{1FA7A} OpenACP Doctor\n");
1219
1226
  const report = await engine.runAll();
@@ -1255,6 +1262,87 @@ Fixable issues can be auto-repaired when not using --dry-run.
1255
1262
  process.exit(1);
1256
1263
  }
1257
1264
  }
1265
+ async function cmdTunnel(args2) {
1266
+ const subCmd = args2[1];
1267
+ const port = readApiPort();
1268
+ if (port === null) {
1269
+ console.error("OpenACP is not running. Start with `openacp start`");
1270
+ process.exit(1);
1271
+ }
1272
+ try {
1273
+ if (subCmd === "add") {
1274
+ const tunnelPort = args2[2];
1275
+ if (!tunnelPort) {
1276
+ console.error("Usage: openacp tunnel add <port> [--label name] [--session id]");
1277
+ process.exit(1);
1278
+ }
1279
+ const labelIdx = args2.indexOf("--label");
1280
+ const label = labelIdx !== -1 ? args2[labelIdx + 1] : void 0;
1281
+ const sessionIdx = args2.indexOf("--session");
1282
+ const sessionId = sessionIdx !== -1 ? args2[sessionIdx + 1] : void 0;
1283
+ const body = { port: parseInt(tunnelPort, 10) };
1284
+ if (label) body.label = label;
1285
+ if (sessionId) body.sessionId = sessionId;
1286
+ const res = await apiCall(port, "/api/tunnel", {
1287
+ method: "POST",
1288
+ headers: { "Content-Type": "application/json" },
1289
+ body: JSON.stringify(body)
1290
+ });
1291
+ const data = await res.json();
1292
+ if (!res.ok) {
1293
+ console.error(`Error: ${data.error}`);
1294
+ process.exit(1);
1295
+ }
1296
+ console.log(`Tunnel active: port ${data.port} \u2192 ${data.publicUrl}`);
1297
+ } else if (subCmd === "list") {
1298
+ const res = await apiCall(port, "/api/tunnel/list");
1299
+ const data = await res.json();
1300
+ if (data.length === 0) {
1301
+ console.log("No active tunnels.");
1302
+ return;
1303
+ }
1304
+ console.log("Active tunnels:\n");
1305
+ for (const t of data) {
1306
+ const label = t.label ? ` (${t.label})` : "";
1307
+ const status = t.status === "active" ? "\u2705" : t.status === "starting" ? "\u23F3" : "\u274C";
1308
+ console.log(` ${status} Port ${t.port}${label}`);
1309
+ if (t.publicUrl) console.log(` \u2192 ${t.publicUrl}`);
1310
+ }
1311
+ } else if (subCmd === "stop") {
1312
+ const tunnelPort = args2[2];
1313
+ if (!tunnelPort) {
1314
+ console.error("Usage: openacp tunnel stop <port>");
1315
+ process.exit(1);
1316
+ }
1317
+ const res = await apiCall(port, `/api/tunnel/${tunnelPort}`, { method: "DELETE" });
1318
+ if (!res.ok) {
1319
+ const data = await res.json();
1320
+ console.error(`Error: ${data.error}`);
1321
+ process.exit(1);
1322
+ }
1323
+ console.log(`Tunnel stopped: port ${tunnelPort}`);
1324
+ } else if (subCmd === "stop-all") {
1325
+ const res = await apiCall(port, "/api/tunnel", { method: "DELETE" });
1326
+ if (!res.ok) {
1327
+ const data = await res.json();
1328
+ console.error(`Error: ${data.error}`);
1329
+ process.exit(1);
1330
+ }
1331
+ console.log("All user tunnels stopped.");
1332
+ } else {
1333
+ console.log(`
1334
+ Tunnel Management:
1335
+ openacp tunnel add <port> [--label name] [--session id]
1336
+ openacp tunnel list
1337
+ openacp tunnel stop <port>
1338
+ openacp tunnel stop-all
1339
+ `);
1340
+ }
1341
+ } catch (err) {
1342
+ console.error(`Failed to connect to daemon: ${err.message}`);
1343
+ process.exit(1);
1344
+ }
1345
+ }
1258
1346
  async function cmdAgents(args2) {
1259
1347
  const subcommand = args2[1];
1260
1348
  if (wantsHelp(args2) && (!subcommand || subcommand === "--help" || subcommand === "-h")) {
@@ -1428,7 +1516,7 @@ Run 'openacp agents' to see available agents.
1428
1516
  const { getAgentCapabilities } = await import("./agent-dependencies-QY5QSULV.js");
1429
1517
  const caps = getAgentCapabilities(result.agentKey);
1430
1518
  if (caps.integration) {
1431
- const { installIntegration } = await import("./integrate-BLETI3UO.js");
1519
+ const { installIntegration } = await import("./integrate-VOUYBPPZ.js");
1432
1520
  const intResult = await installIntegration(result.agentKey, caps.integration);
1433
1521
  if (intResult.success) {
1434
1522
  console.log(` \x1B[32m\u2713\x1B[0m Handoff integration installed for ${result.agentKey}`);
@@ -1470,7 +1558,7 @@ async function agentsUninstall(name, help = false) {
1470
1558
  const { getAgentCapabilities } = await import("./agent-dependencies-QY5QSULV.js");
1471
1559
  const caps = getAgentCapabilities(name);
1472
1560
  if (caps.integration) {
1473
- const { uninstallIntegration } = await import("./integrate-BLETI3UO.js");
1561
+ const { uninstallIntegration } = await import("./integrate-VOUYBPPZ.js");
1474
1562
  await uninstallIntegration(name, caps.integration);
1475
1563
  console.log(` \x1B[32m\u2713\x1B[0m Handoff integration removed for ${name}`);
1476
1564
  }
@@ -1674,17 +1762,17 @@ async function cmdDefault(command2) {
1674
1762
  process.exit(1);
1675
1763
  }
1676
1764
  await checkAndPromptUpdate();
1677
- const { ConfigManager } = await import("./config-PCPIBPUA.js");
1765
+ const { ConfigManager } = await import("./config-KF2MQWAP.js");
1678
1766
  const cm = new ConfigManager();
1679
1767
  if (!await cm.exists()) {
1680
- const { runSetup } = await import("./setup-7JINXQOA.js");
1768
+ const { runSetup } = await import("./setup-LI5CKYDK.js");
1681
1769
  const shouldStart = await runSetup(cm);
1682
1770
  if (!shouldStart) process.exit(0);
1683
1771
  }
1684
1772
  await cm.load();
1685
1773
  const config = cm.get();
1686
1774
  if (!forceForeground && config.runMode === "daemon") {
1687
- const { startDaemon, getPidPath } = await import("./daemon-JZLFRUW6.js");
1775
+ const { startDaemon, getPidPath } = await import("./daemon-U6UC7OM4.js");
1688
1776
  const result = startDaemon(getPidPath(), config.logging.logDir);
1689
1777
  if ("error" in result) {
1690
1778
  console.error(result.error);
@@ -1693,9 +1781,9 @@ async function cmdDefault(command2) {
1693
1781
  console.log(`OpenACP daemon started (PID ${result.pid})`);
1694
1782
  return;
1695
1783
  }
1696
- const { markRunning } = await import("./daemon-JZLFRUW6.js");
1784
+ const { markRunning } = await import("./daemon-U6UC7OM4.js");
1697
1785
  markRunning();
1698
- const { startServer } = await import("./main-AH3NCVM3.js");
1786
+ const { startServer } = await import("./main-M6RH3SS5.js");
1699
1787
  await startServer();
1700
1788
  }
1701
1789
 
@@ -1723,8 +1811,9 @@ var commands = {
1723
1811
  "integrate": () => cmdIntegrate(args),
1724
1812
  "doctor": () => cmdDoctor(args),
1725
1813
  "agents": () => cmdAgents(args),
1814
+ "tunnel": () => cmdTunnel(args),
1726
1815
  "--daemon-child": async () => {
1727
- const { startServer } = await import("./main-AH3NCVM3.js");
1816
+ const { startServer } = await import("./main-M6RH3SS5.js");
1728
1817
  await startServer();
1729
1818
  }
1730
1819
  };