@openacp/cli 2026.328.2 → 2026.330.2
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/{adapter-HGJENQCN.js → adapter-4U6MC5ZS.js} +4 -4
- package/dist/api-server-5VNYFWJE.js +7 -0
- package/dist/{api-server-WFB5K6FP.js → api-server-JLBDKCU4.js} +2 -2
- package/dist/{chunk-I53NEV3S.js → chunk-5WGVYX3C.js} +13 -3
- package/dist/chunk-5WGVYX3C.js.map +1 -0
- package/dist/{chunk-RXMWJHWH.js → chunk-5ZNBNIK3.js} +723 -217
- package/dist/chunk-5ZNBNIK3.js.map +1 -0
- package/dist/{chunk-6VR4GWOO.js → chunk-7RKPIM3E.js} +247 -70
- package/dist/chunk-7RKPIM3E.js.map +1 -0
- package/dist/{chunk-IXMIC4GQ.js → chunk-BTJHGSLM.js} +2 -2
- package/dist/{chunk-5TCXYDLR.js → chunk-CFUJGWOP.js} +2 -2
- package/dist/{chunk-43JVXFYP.js → chunk-GEOXPGCO.js} +2 -2
- package/dist/{chunk-JUFN4XMB.js → chunk-KDU3ZEWT.js} +2 -2
- package/dist/{chunk-QWP76EBW.js → chunk-MITTQMGZ.js} +16 -9
- package/dist/chunk-MITTQMGZ.js.map +1 -0
- package/dist/{chunk-QBEQJFGL.js → chunk-MPGEHTGE.js} +3 -3
- package/dist/{chunk-4B6PCWQP.js → chunk-PA6MNBG4.js} +6 -2
- package/dist/chunk-PA6MNBG4.js.map +1 -0
- package/dist/{chunk-VD3QSMVY.js → chunk-QWVHCTCA.js} +2 -2
- package/dist/{chunk-NT6FYV27.js → chunk-TMVTSWVH.js} +2 -2
- package/dist/chunk-UWH7KIAA.js +701 -0
- package/dist/chunk-UWH7KIAA.js.map +1 -0
- package/dist/{chunk-JOMDPFQ2.js → chunk-W4LK6WJP.js} +29 -4
- package/dist/chunk-W4LK6WJP.js.map +1 -0
- package/dist/{chunk-E2SLHZAC.js → chunk-YIGBJFJL.js} +6 -6
- package/dist/cli.js +63 -68
- package/dist/cli.js.map +1 -1
- package/dist/config-KN6NKKPF.js +20 -0
- package/dist/{config-editor-OU6PUY66.js → config-editor-76RVZS4B.js} +3 -3
- package/dist/context-NXXW62NJ.js +9 -0
- package/dist/{core-plugins-R2EVZAJV.js → core-plugins-OCHKGCIZ.js} +9 -9
- package/dist/{daemon-DTA6KYYY.js → daemon-XFEMMJSZ.js} +3 -3
- package/dist/doctor-AV6AUO22.js +9 -0
- package/dist/index.d.ts +104 -42
- package/dist/index.js +8 -8
- package/dist/{main-RRSX5SRL.js → main-L2M4NTJY.js} +38 -30
- package/dist/main-L2M4NTJY.js.map +1 -0
- package/dist/{plugin-installer-5XHORMLS.js → plugin-installer-VSTYZSXC.js} +2 -2
- package/dist/{setup-OI6A3OXW.js → setup-E6BNEYCS.js} +4 -5
- package/dist/setup-E6BNEYCS.js.map +1 -0
- package/dist/speech-SG62JYIF.js +9 -0
- package/dist/telegram-EAVRDNFU.js +7 -0
- package/dist/tunnel-HWJ27WDH.js +7 -0
- package/dist/{tunnel-service-I2NFUX3V.js → tunnel-service-ZMO4THKE.js} +88 -8
- package/dist/tunnel-service-ZMO4THKE.js.map +1 -0
- package/package.json +1 -1
- package/dist/api-server-DSUW637I.js +0 -7
- package/dist/chunk-4B6PCWQP.js.map +0 -1
- package/dist/chunk-6VR4GWOO.js.map +0 -1
- package/dist/chunk-I53NEV3S.js.map +0 -1
- package/dist/chunk-JOMDPFQ2.js.map +0 -1
- package/dist/chunk-QWP76EBW.js.map +0 -1
- package/dist/chunk-RXMWJHWH.js.map +0 -1
- package/dist/chunk-ZHGPZBS4.js +0 -49
- package/dist/chunk-ZHGPZBS4.js.map +0 -1
- package/dist/config-UCAFCS5W.js +0 -14
- package/dist/context-7MPU7RL5.js +0 -9
- package/dist/doctor-D723IB2I.js +0 -9
- package/dist/main-RRSX5SRL.js.map +0 -1
- package/dist/setup-OI6A3OXW.js.map +0 -1
- package/dist/speech-GB7PHVQZ.js +0 -9
- package/dist/telegram-UVIAXADE.js +0 -7
- package/dist/tunnel-4WNFC7GO.js +0 -7
- package/dist/tunnel-service-I2NFUX3V.js.map +0 -1
- /package/dist/{adapter-HGJENQCN.js.map → adapter-4U6MC5ZS.js.map} +0 -0
- /package/dist/{api-server-DSUW637I.js.map → api-server-5VNYFWJE.js.map} +0 -0
- /package/dist/{api-server-WFB5K6FP.js.map → api-server-JLBDKCU4.js.map} +0 -0
- /package/dist/{chunk-IXMIC4GQ.js.map → chunk-BTJHGSLM.js.map} +0 -0
- /package/dist/{chunk-5TCXYDLR.js.map → chunk-CFUJGWOP.js.map} +0 -0
- /package/dist/{chunk-43JVXFYP.js.map → chunk-GEOXPGCO.js.map} +0 -0
- /package/dist/{chunk-JUFN4XMB.js.map → chunk-KDU3ZEWT.js.map} +0 -0
- /package/dist/{chunk-QBEQJFGL.js.map → chunk-MPGEHTGE.js.map} +0 -0
- /package/dist/{chunk-VD3QSMVY.js.map → chunk-QWVHCTCA.js.map} +0 -0
- /package/dist/{chunk-NT6FYV27.js.map → chunk-TMVTSWVH.js.map} +0 -0
- /package/dist/{chunk-E2SLHZAC.js.map → chunk-YIGBJFJL.js.map} +0 -0
- /package/dist/{config-UCAFCS5W.js.map → config-KN6NKKPF.js.map} +0 -0
- /package/dist/{config-editor-OU6PUY66.js.map → config-editor-76RVZS4B.js.map} +0 -0
- /package/dist/{context-7MPU7RL5.js.map → context-NXXW62NJ.js.map} +0 -0
- /package/dist/{core-plugins-R2EVZAJV.js.map → core-plugins-OCHKGCIZ.js.map} +0 -0
- /package/dist/{daemon-DTA6KYYY.js.map → daemon-XFEMMJSZ.js.map} +0 -0
- /package/dist/{doctor-D723IB2I.js.map → doctor-AV6AUO22.js.map} +0 -0
- /package/dist/{plugin-installer-5XHORMLS.js.map → plugin-installer-VSTYZSXC.js.map} +0 -0
- /package/dist/{speech-GB7PHVQZ.js.map → speech-SG62JYIF.js.map} +0 -0
- /package/dist/{telegram-UVIAXADE.js.map → telegram-EAVRDNFU.js.map} +0 -0
- /package/dist/{tunnel-4WNFC7GO.js.map → tunnel-HWJ27WDH.js.map} +0 -0
package/dist/cli.js
CHANGED
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
} from "./chunk-S64CB6J3.js";
|
|
14
14
|
import {
|
|
15
15
|
PLUGINS_DIR
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-W4LK6WJP.js";
|
|
17
17
|
import "./chunk-R6KZYF7D.js";
|
|
18
18
|
|
|
19
19
|
// src/cli.ts
|
|
@@ -206,10 +206,10 @@ Shows all plugins registered in the plugin registry.
|
|
|
206
206
|
`);
|
|
207
207
|
return;
|
|
208
208
|
}
|
|
209
|
-
const
|
|
210
|
-
const
|
|
209
|
+
const os2 = await import("os");
|
|
210
|
+
const path5 = await import("path");
|
|
211
211
|
const { PluginRegistry } = await import("./plugin-registry-6J3YSFHF.js");
|
|
212
|
-
const registryPath =
|
|
212
|
+
const registryPath = path5.join(os2.homedir(), ".openacp", "plugins.json");
|
|
213
213
|
const registry = new PluginRegistry(registryPath);
|
|
214
214
|
await registry.load();
|
|
215
215
|
const plugins = registry.list();
|
|
@@ -320,10 +320,10 @@ async function cmdPlugin(args2 = []) {
|
|
|
320
320
|
}
|
|
321
321
|
}
|
|
322
322
|
async function setPluginEnabled(name, enabled) {
|
|
323
|
-
const
|
|
324
|
-
const
|
|
323
|
+
const os2 = await import("os");
|
|
324
|
+
const path5 = await import("path");
|
|
325
325
|
const { PluginRegistry } = await import("./plugin-registry-6J3YSFHF.js");
|
|
326
|
-
const registryPath =
|
|
326
|
+
const registryPath = path5.join(os2.homedir(), ".openacp", "plugins.json");
|
|
327
327
|
const registry = new PluginRegistry(registryPath);
|
|
328
328
|
await registry.load();
|
|
329
329
|
const entry = registry.get(name);
|
|
@@ -336,9 +336,9 @@ async function setPluginEnabled(name, enabled) {
|
|
|
336
336
|
console.log(`Plugin ${name} ${enabled ? "enabled" : "disabled"}. Restart to apply.`);
|
|
337
337
|
}
|
|
338
338
|
async function configurePlugin(name) {
|
|
339
|
-
const
|
|
340
|
-
const
|
|
341
|
-
const { corePlugins } = await import("./core-plugins-
|
|
339
|
+
const os2 = await import("os");
|
|
340
|
+
const path5 = await import("path");
|
|
341
|
+
const { corePlugins } = await import("./core-plugins-OCHKGCIZ.js");
|
|
342
342
|
const { SettingsManager } = await import("./settings-manager-B4UN2LAC.js");
|
|
343
343
|
const { createInstallContext } = await import("./install-context-EHYV5WRY.js");
|
|
344
344
|
const plugin = corePlugins.find((p) => p.name === name);
|
|
@@ -346,7 +346,7 @@ async function configurePlugin(name) {
|
|
|
346
346
|
console.error(`Plugin "${name}" not found.`);
|
|
347
347
|
process.exit(1);
|
|
348
348
|
}
|
|
349
|
-
const basePath =
|
|
349
|
+
const basePath = path5.join(os2.homedir(), ".openacp", "plugins", "data");
|
|
350
350
|
const settingsManager = new SettingsManager(basePath);
|
|
351
351
|
const ctx = createInstallContext({ pluginName: name, settingsManager, basePath });
|
|
352
352
|
if (plugin.configure) {
|
|
@@ -358,8 +358,8 @@ async function configurePlugin(name) {
|
|
|
358
358
|
}
|
|
359
359
|
}
|
|
360
360
|
async function installPlugin(input) {
|
|
361
|
-
const
|
|
362
|
-
const
|
|
361
|
+
const os2 = await import("os");
|
|
362
|
+
const path5 = await import("path");
|
|
363
363
|
const { execFileSync } = await import("child_process");
|
|
364
364
|
const { getCurrentVersion: getCurrentVersion2 } = await import("./version-AXXV6IV2.js");
|
|
365
365
|
const { SettingsManager } = await import("./settings-manager-B4UN2LAC.js");
|
|
@@ -407,11 +407,11 @@ async function installPlugin(input) {
|
|
|
407
407
|
}
|
|
408
408
|
const installSpec = pkgVersion ? `${pkgName}@${pkgVersion}` : pkgName;
|
|
409
409
|
console.log(`Installing ${installSpec}...`);
|
|
410
|
-
const { corePlugins } = await import("./core-plugins-
|
|
410
|
+
const { corePlugins } = await import("./core-plugins-OCHKGCIZ.js");
|
|
411
411
|
const builtinPlugin = corePlugins.find((p) => p.name === pkgName);
|
|
412
|
-
const basePath =
|
|
412
|
+
const basePath = path5.join(os2.homedir(), ".openacp", "plugins", "data");
|
|
413
413
|
const settingsManager = new SettingsManager(basePath);
|
|
414
|
-
const registryPath =
|
|
414
|
+
const registryPath = path5.join(os2.homedir(), ".openacp", "plugins.json");
|
|
415
415
|
const pluginRegistry = new PluginRegistry(registryPath);
|
|
416
416
|
await pluginRegistry.load();
|
|
417
417
|
if (builtinPlugin) {
|
|
@@ -430,8 +430,8 @@ async function installPlugin(input) {
|
|
|
430
430
|
console.log(`\u2713 ${builtinPlugin.name} installed! Restart to activate.`);
|
|
431
431
|
return;
|
|
432
432
|
}
|
|
433
|
-
const pluginsDir =
|
|
434
|
-
const nodeModulesDir =
|
|
433
|
+
const pluginsDir = path5.join(os2.homedir(), ".openacp", "plugins");
|
|
434
|
+
const nodeModulesDir = path5.join(pluginsDir, "node_modules");
|
|
435
435
|
try {
|
|
436
436
|
execFileSync("npm", ["install", installSpec, "--prefix", pluginsDir, "--save"], {
|
|
437
437
|
stdio: "inherit",
|
|
@@ -444,8 +444,8 @@ async function installPlugin(input) {
|
|
|
444
444
|
const cliVersion = getCurrentVersion2();
|
|
445
445
|
const isLocalPath = pkgName.startsWith("/") || pkgName.startsWith(".");
|
|
446
446
|
try {
|
|
447
|
-
const pluginRoot = isLocalPath ?
|
|
448
|
-
const installedPkgPath =
|
|
447
|
+
const pluginRoot = isLocalPath ? path5.resolve(pkgName) : path5.join(nodeModulesDir, pkgName);
|
|
448
|
+
const installedPkgPath = path5.join(pluginRoot, "package.json");
|
|
449
449
|
const { readFileSync } = await import("fs");
|
|
450
450
|
const installedPkg = JSON.parse(readFileSync(installedPkgPath, "utf-8"));
|
|
451
451
|
const minVersion = installedPkg.engines?.openacp?.replace(/[>=^~\s]/g, "");
|
|
@@ -458,7 +458,7 @@ async function installPlugin(input) {
|
|
|
458
458
|
`);
|
|
459
459
|
}
|
|
460
460
|
}
|
|
461
|
-
const pluginModule = await import(
|
|
461
|
+
const pluginModule = await import(path5.join(pluginRoot, installedPkg.main ?? "dist/index.js"));
|
|
462
462
|
const plugin = pluginModule.default;
|
|
463
463
|
if (plugin?.install) {
|
|
464
464
|
const ctx = createInstallContext({ pluginName: plugin.name ?? pkgName, settingsManager, basePath });
|
|
@@ -485,11 +485,11 @@ async function installPlugin(input) {
|
|
|
485
485
|
}
|
|
486
486
|
}
|
|
487
487
|
async function uninstallPlugin(name, purge) {
|
|
488
|
-
const
|
|
489
|
-
const
|
|
488
|
+
const os2 = await import("os");
|
|
489
|
+
const path5 = await import("path");
|
|
490
490
|
const fs4 = await import("fs");
|
|
491
491
|
const { PluginRegistry } = await import("./plugin-registry-6J3YSFHF.js");
|
|
492
|
-
const registryPath =
|
|
492
|
+
const registryPath = path5.join(os2.homedir(), ".openacp", "plugins.json");
|
|
493
493
|
const registry = new PluginRegistry(registryPath);
|
|
494
494
|
await registry.load();
|
|
495
495
|
const entry = registry.get(name);
|
|
@@ -502,12 +502,12 @@ async function uninstallPlugin(name, purge) {
|
|
|
502
502
|
process.exit(1);
|
|
503
503
|
}
|
|
504
504
|
try {
|
|
505
|
-
const { corePlugins } = await import("./core-plugins-
|
|
505
|
+
const { corePlugins } = await import("./core-plugins-OCHKGCIZ.js");
|
|
506
506
|
const plugin = corePlugins.find((p) => p.name === name);
|
|
507
507
|
if (plugin?.uninstall) {
|
|
508
508
|
const { SettingsManager } = await import("./settings-manager-B4UN2LAC.js");
|
|
509
509
|
const { createInstallContext } = await import("./install-context-EHYV5WRY.js");
|
|
510
|
-
const basePath =
|
|
510
|
+
const basePath = path5.join(os2.homedir(), ".openacp", "plugins", "data");
|
|
511
511
|
const settingsManager = new SettingsManager(basePath);
|
|
512
512
|
const ctx = createInstallContext({ pluginName: name, settingsManager, basePath });
|
|
513
513
|
await plugin.uninstall(ctx, { purge });
|
|
@@ -515,7 +515,7 @@ async function uninstallPlugin(name, purge) {
|
|
|
515
515
|
} catch {
|
|
516
516
|
}
|
|
517
517
|
if (purge) {
|
|
518
|
-
const pluginDir =
|
|
518
|
+
const pluginDir = path5.join(os2.homedir(), ".openacp", "plugins", name);
|
|
519
519
|
fs4.rmSync(pluginDir, { recursive: true, force: true });
|
|
520
520
|
}
|
|
521
521
|
registry.remove(name);
|
|
@@ -1140,8 +1140,8 @@ Requires an existing config \u2014 run 'openacp' first to set up.
|
|
|
1140
1140
|
return;
|
|
1141
1141
|
}
|
|
1142
1142
|
await checkAndPromptUpdate();
|
|
1143
|
-
const { startDaemon, getPidPath } = await import("./daemon-
|
|
1144
|
-
const { ConfigManager } = await import("./config-
|
|
1143
|
+
const { startDaemon, getPidPath } = await import("./daemon-XFEMMJSZ.js");
|
|
1144
|
+
const { ConfigManager } = await import("./config-KN6NKKPF.js");
|
|
1145
1145
|
const cm = new ConfigManager();
|
|
1146
1146
|
if (await cm.exists()) {
|
|
1147
1147
|
await cm.load();
|
|
@@ -1171,7 +1171,7 @@ Sends a stop signal to the running OpenACP daemon process.
|
|
|
1171
1171
|
`);
|
|
1172
1172
|
return;
|
|
1173
1173
|
}
|
|
1174
|
-
const { stopDaemon } = await import("./daemon-
|
|
1174
|
+
const { stopDaemon } = await import("./daemon-XFEMMJSZ.js");
|
|
1175
1175
|
const result = await stopDaemon();
|
|
1176
1176
|
if (result.stopped) {
|
|
1177
1177
|
console.log(`OpenACP daemon stopped (was PID ${result.pid})`);
|
|
@@ -1194,7 +1194,7 @@ Shows whether the OpenACP daemon is running and its PID.
|
|
|
1194
1194
|
`);
|
|
1195
1195
|
return;
|
|
1196
1196
|
}
|
|
1197
|
-
const { getStatus } = await import("./daemon-
|
|
1197
|
+
const { getStatus } = await import("./daemon-XFEMMJSZ.js");
|
|
1198
1198
|
const status = getStatus();
|
|
1199
1199
|
if (status.running) {
|
|
1200
1200
|
console.log(`OpenACP is running (PID ${status.pid})`);
|
|
@@ -1220,7 +1220,7 @@ Log file location is configured in config (default: ~/.openacp/logs/).
|
|
|
1220
1220
|
return;
|
|
1221
1221
|
}
|
|
1222
1222
|
const { spawn } = await import("child_process");
|
|
1223
|
-
const { ConfigManager, expandHome } = await import("./config-
|
|
1223
|
+
const { ConfigManager, expandHome } = await import("./config-KN6NKKPF.js");
|
|
1224
1224
|
const pathMod = await import("path");
|
|
1225
1225
|
const cm = new ConfigManager();
|
|
1226
1226
|
let logDir = "~/.openacp/logs";
|
|
@@ -1292,7 +1292,7 @@ the API for live updates. When stopped, edits config file directly.
|
|
|
1292
1292
|
console.error("Usage: openacp config set <path> <value>");
|
|
1293
1293
|
process.exit(1);
|
|
1294
1294
|
}
|
|
1295
|
-
const { ConfigSchema } = await import("./config-
|
|
1295
|
+
const { ConfigSchema } = await import("./config-KN6NKKPF.js");
|
|
1296
1296
|
const topLevelKey = configPath.split(".")[0];
|
|
1297
1297
|
const validConfigKeys = Object.keys(ConfigSchema.shape);
|
|
1298
1298
|
if (!validConfigKeys.includes(topLevelKey)) {
|
|
@@ -1324,7 +1324,7 @@ the API for live updates. When stopped, edits config file directly.
|
|
|
1324
1324
|
console.log("Note: restart required for this change to take effect.");
|
|
1325
1325
|
}
|
|
1326
1326
|
} else {
|
|
1327
|
-
const { ConfigManager: ConfigManager2 } = await import("./config-
|
|
1327
|
+
const { ConfigManager: ConfigManager2 } = await import("./config-KN6NKKPF.js");
|
|
1328
1328
|
const cm2 = new ConfigManager2();
|
|
1329
1329
|
if (!await cm2.exists()) {
|
|
1330
1330
|
console.error('No config found. Run "openacp" first to set up.');
|
|
@@ -1337,8 +1337,8 @@ the API for live updates. When stopped, edits config file directly.
|
|
|
1337
1337
|
}
|
|
1338
1338
|
return;
|
|
1339
1339
|
}
|
|
1340
|
-
const { runConfigEditor } = await import("./config-editor-
|
|
1341
|
-
const { ConfigManager } = await import("./config-
|
|
1340
|
+
const { runConfigEditor } = await import("./config-editor-76RVZS4B.js");
|
|
1341
|
+
const { ConfigManager } = await import("./config-KN6NKKPF.js");
|
|
1342
1342
|
const cm = new ConfigManager();
|
|
1343
1343
|
if (!await cm.exists()) {
|
|
1344
1344
|
console.error('No config found. Run "openacp" first to set up.');
|
|
@@ -1368,7 +1368,7 @@ start fresh with the setup wizard. The daemon must be stopped first.
|
|
|
1368
1368
|
`);
|
|
1369
1369
|
return;
|
|
1370
1370
|
}
|
|
1371
|
-
const { getStatus } = await import("./daemon-
|
|
1371
|
+
const { getStatus } = await import("./daemon-XFEMMJSZ.js");
|
|
1372
1372
|
const status = getStatus();
|
|
1373
1373
|
if (status.running) {
|
|
1374
1374
|
console.error("OpenACP is running. Stop it first: openacp stop");
|
|
@@ -1386,9 +1386,9 @@ start fresh with the setup wizard. The daemon must be stopped first.
|
|
|
1386
1386
|
const { uninstallAutoStart } = await import("./autostart-CUPZMKKC.js");
|
|
1387
1387
|
uninstallAutoStart();
|
|
1388
1388
|
const fs4 = await import("fs");
|
|
1389
|
-
const
|
|
1390
|
-
const
|
|
1391
|
-
const openacpDir =
|
|
1389
|
+
const os2 = await import("os");
|
|
1390
|
+
const path5 = await import("path");
|
|
1391
|
+
const openacpDir = path5.join(os2.homedir(), ".openacp");
|
|
1392
1392
|
fs4.rmSync(openacpDir, { recursive: true, force: true });
|
|
1393
1393
|
console.log("Reset complete. Run `openacp` to set up again.");
|
|
1394
1394
|
}
|
|
@@ -1600,7 +1600,7 @@ Fixable issues can be auto-repaired when not using --dry-run.
|
|
|
1600
1600
|
process.exit(1);
|
|
1601
1601
|
}
|
|
1602
1602
|
const dryRun = args2.includes("--dry-run");
|
|
1603
|
-
const { DoctorEngine } = await import("./doctor-
|
|
1603
|
+
const { DoctorEngine } = await import("./doctor-AV6AUO22.js");
|
|
1604
1604
|
const engine = new DoctorEngine({ dryRun });
|
|
1605
1605
|
console.log("\n\u{1FA7A} OpenACP Doctor\n");
|
|
1606
1606
|
const report = await engine.runAll();
|
|
@@ -2121,34 +2121,29 @@ Tunnel Management:
|
|
|
2121
2121
|
}
|
|
2122
2122
|
|
|
2123
2123
|
// src/cli/commands/onboard.ts
|
|
2124
|
-
import path3 from "path";
|
|
2125
|
-
import os from "os";
|
|
2126
|
-
var OPENACP_DIR = path3.join(os.homedir(), ".openacp");
|
|
2127
|
-
var PLUGINS_DATA_DIR = path3.join(OPENACP_DIR, "plugins", "data");
|
|
2128
|
-
var REGISTRY_PATH = path3.join(OPENACP_DIR, "plugins.json");
|
|
2129
2124
|
async function cmdOnboard() {
|
|
2130
|
-
const { ConfigManager } = await import("./config-
|
|
2125
|
+
const { ConfigManager, PLUGINS_DATA_DIR: PLUGINS_DATA_DIR2, REGISTRY_PATH: REGISTRY_PATH2 } = await import("./config-KN6NKKPF.js");
|
|
2131
2126
|
const { SettingsManager } = await import("./settings-manager-B4UN2LAC.js");
|
|
2132
2127
|
const { PluginRegistry } = await import("./plugin-registry-6J3YSFHF.js");
|
|
2133
2128
|
const cm = new ConfigManager();
|
|
2134
|
-
const settingsManager = new SettingsManager(
|
|
2135
|
-
const pluginRegistry = new PluginRegistry(
|
|
2129
|
+
const settingsManager = new SettingsManager(PLUGINS_DATA_DIR2);
|
|
2130
|
+
const pluginRegistry = new PluginRegistry(REGISTRY_PATH2);
|
|
2136
2131
|
await pluginRegistry.load();
|
|
2137
2132
|
if (await cm.exists()) {
|
|
2138
|
-
const { runReconfigure } = await import("./setup-
|
|
2133
|
+
const { runReconfigure } = await import("./setup-E6BNEYCS.js");
|
|
2139
2134
|
await runReconfigure(cm);
|
|
2140
2135
|
} else {
|
|
2141
|
-
const { runSetup } = await import("./setup-
|
|
2136
|
+
const { runSetup } = await import("./setup-E6BNEYCS.js");
|
|
2142
2137
|
await runSetup(cm, { skipRunMode: true, settingsManager, pluginRegistry });
|
|
2143
2138
|
}
|
|
2144
2139
|
}
|
|
2145
2140
|
|
|
2146
2141
|
// src/cli/commands/default.ts
|
|
2147
|
-
import
|
|
2148
|
-
import
|
|
2149
|
-
var
|
|
2150
|
-
var
|
|
2151
|
-
var
|
|
2142
|
+
import path3 from "path";
|
|
2143
|
+
import os from "os";
|
|
2144
|
+
var OPENACP_DIR = path3.join(os.homedir(), ".openacp");
|
|
2145
|
+
var PLUGINS_DATA_DIR = path3.join(OPENACP_DIR, "plugins", "data");
|
|
2146
|
+
var REGISTRY_PATH = path3.join(OPENACP_DIR, "plugins.json");
|
|
2152
2147
|
async function cmdDefault(command2) {
|
|
2153
2148
|
const forceForeground = command2 === "--foreground";
|
|
2154
2149
|
if (command2 && !command2.startsWith("-")) {
|
|
@@ -2179,22 +2174,22 @@ async function cmdDefault(command2) {
|
|
|
2179
2174
|
process.exit(1);
|
|
2180
2175
|
}
|
|
2181
2176
|
await checkAndPromptUpdate();
|
|
2182
|
-
const { ConfigManager } = await import("./config-
|
|
2177
|
+
const { ConfigManager } = await import("./config-KN6NKKPF.js");
|
|
2183
2178
|
const cm = new ConfigManager();
|
|
2184
2179
|
if (!await cm.exists()) {
|
|
2185
2180
|
const { SettingsManager } = await import("./settings-manager-B4UN2LAC.js");
|
|
2186
2181
|
const { PluginRegistry } = await import("./plugin-registry-6J3YSFHF.js");
|
|
2187
|
-
const settingsManager = new SettingsManager(
|
|
2188
|
-
const pluginRegistry = new PluginRegistry(
|
|
2182
|
+
const settingsManager = new SettingsManager(PLUGINS_DATA_DIR);
|
|
2183
|
+
const pluginRegistry = new PluginRegistry(REGISTRY_PATH);
|
|
2189
2184
|
await pluginRegistry.load();
|
|
2190
|
-
const { runSetup } = await import("./setup-
|
|
2185
|
+
const { runSetup } = await import("./setup-E6BNEYCS.js");
|
|
2191
2186
|
const shouldStart = await runSetup(cm, { settingsManager, pluginRegistry });
|
|
2192
2187
|
if (!shouldStart) process.exit(0);
|
|
2193
2188
|
}
|
|
2194
2189
|
await cm.load();
|
|
2195
2190
|
const config = cm.get();
|
|
2196
2191
|
if (!forceForeground && config.runMode === "daemon") {
|
|
2197
|
-
const { startDaemon, getPidPath } = await import("./daemon-
|
|
2192
|
+
const { startDaemon, getPidPath } = await import("./daemon-XFEMMJSZ.js");
|
|
2198
2193
|
const result = startDaemon(getPidPath(), config.logging.logDir);
|
|
2199
2194
|
if ("error" in result) {
|
|
2200
2195
|
console.error(result.error);
|
|
@@ -2203,15 +2198,15 @@ async function cmdDefault(command2) {
|
|
|
2203
2198
|
console.log(`OpenACP daemon started (PID ${result.pid})`);
|
|
2204
2199
|
return;
|
|
2205
2200
|
}
|
|
2206
|
-
const { markRunning } = await import("./daemon-
|
|
2201
|
+
const { markRunning } = await import("./daemon-XFEMMJSZ.js");
|
|
2207
2202
|
markRunning();
|
|
2208
|
-
const { startServer } = await import("./main-
|
|
2203
|
+
const { startServer } = await import("./main-L2M4NTJY.js");
|
|
2209
2204
|
await startServer();
|
|
2210
2205
|
}
|
|
2211
2206
|
|
|
2212
2207
|
// src/cli/commands/dev.ts
|
|
2213
2208
|
import fs3 from "fs";
|
|
2214
|
-
import
|
|
2209
|
+
import path4 from "path";
|
|
2215
2210
|
async function cmdDev(args2 = []) {
|
|
2216
2211
|
if (wantsHelp(args2)) {
|
|
2217
2212
|
console.log(`
|
|
@@ -2238,12 +2233,12 @@ async function cmdDev(args2 = []) {
|
|
|
2238
2233
|
console.error("Error: missing plugin path. Usage: openacp dev <plugin-path>");
|
|
2239
2234
|
process.exit(1);
|
|
2240
2235
|
}
|
|
2241
|
-
const pluginPath =
|
|
2236
|
+
const pluginPath = path4.resolve(pluginPathArg);
|
|
2242
2237
|
if (!fs3.existsSync(pluginPath)) {
|
|
2243
2238
|
console.error(`Error: plugin path does not exist: ${pluginPath}`);
|
|
2244
2239
|
process.exit(1);
|
|
2245
2240
|
}
|
|
2246
|
-
const tsconfigPath =
|
|
2241
|
+
const tsconfigPath = path4.join(pluginPath, "tsconfig.json");
|
|
2247
2242
|
const hasTsconfig = fs3.existsSync(tsconfigPath);
|
|
2248
2243
|
if (hasTsconfig) {
|
|
2249
2244
|
console.log("Compiling plugin TypeScript...");
|
|
@@ -2279,7 +2274,7 @@ async function cmdDev(args2 = []) {
|
|
|
2279
2274
|
process.env.OPENACP_DEBUG = "1";
|
|
2280
2275
|
}
|
|
2281
2276
|
process.env.OPENACP_DEV_LOOP = "1";
|
|
2282
|
-
const { startServer } = await import("./main-
|
|
2277
|
+
const { startServer } = await import("./main-L2M4NTJY.js");
|
|
2283
2278
|
await startServer({ devPluginPath: pluginPath, noWatch });
|
|
2284
2279
|
}
|
|
2285
2280
|
|
|
@@ -2312,7 +2307,7 @@ var commands = {
|
|
|
2312
2307
|
"onboard": () => cmdOnboard(),
|
|
2313
2308
|
"dev": () => cmdDev(args),
|
|
2314
2309
|
"--daemon-child": async () => {
|
|
2315
|
-
const { startServer } = await import("./main-
|
|
2310
|
+
const { startServer } = await import("./main-L2M4NTJY.js");
|
|
2316
2311
|
await startServer();
|
|
2317
2312
|
}
|
|
2318
2313
|
};
|