@openacp/cli 2026.326.4 → 2026.327.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 (72) hide show
  1. package/README.md +2 -2
  2. package/dist/{adapter-77ZCVABT.js → adapter-IZNL6AK2.js} +13 -13
  3. package/dist/{adapter-6ANPBSVU.js → adapter-Z435XYBQ.js} +2 -2
  4. package/dist/{api-server-CHVSUDBX.js → api-server-2I7B3MXR.js} +2 -2
  5. package/dist/{api-server-3PYLRBCN.js → api-server-5VEESFOT.js} +2 -2
  6. package/dist/{chunk-Y64XWMJ4.js → chunk-366FOUJG.js} +2 -2
  7. package/dist/{chunk-WVLDNYOJ.js → chunk-5RO42TWV.js} +2 -2
  8. package/dist/{chunk-UNJUWWQO.js → chunk-5YW56UJK.js} +1 -10
  9. package/dist/chunk-5YW56UJK.js.map +1 -0
  10. package/dist/{chunk-NBFIBGAT.js → chunk-7KGWYNWE.js} +1 -1
  11. package/dist/chunk-CDAUYTVP.js +41 -0
  12. package/dist/chunk-CDAUYTVP.js.map +1 -0
  13. package/dist/{chunk-Q6ZXJTZB.js → chunk-CFM4GJ74.js} +7 -11
  14. package/dist/chunk-CFM4GJ74.js.map +1 -0
  15. package/dist/{chunk-RKB2ZK6S.js → chunk-FDLQ5M6W.js} +17 -136
  16. package/dist/chunk-FDLQ5M6W.js.map +1 -0
  17. package/dist/{chunk-FQEBWOZR.js → chunk-QUXTZU36.js} +45 -126
  18. package/dist/chunk-QUXTZU36.js.map +1 -0
  19. package/dist/{chunk-QSDZDHNS.js → chunk-VO3A2NI4.js} +4 -4
  20. package/dist/{chunk-V5JT5TPD.js → chunk-ZPTM4NGK.js} +2 -2
  21. package/dist/cli.js +145 -46
  22. package/dist/cli.js.map +1 -1
  23. package/dist/{config-editor-HNEKXRLQ.js → config-editor-2GYL2SSZ.js} +2 -2
  24. package/dist/{core-plugins-VEUNFTMB.js → core-plugins-I6UPXQBL.js} +7 -10
  25. package/dist/{discord-NOJQ5PZO.js → discord-DXDTGVGS.js} +2 -2
  26. package/dist/index.d.ts +14 -62
  27. package/dist/index.js +15 -21
  28. package/dist/index.js.map +1 -1
  29. package/dist/{integrate-5C6KSU6D.js → integrate-APK4OEQF.js} +2 -2
  30. package/dist/integrate-APK4OEQF.js.map +1 -0
  31. package/dist/{main-T5WVCCFN.js → main-EJBK65NS.js} +33 -52
  32. package/dist/main-EJBK65NS.js.map +1 -0
  33. package/dist/{new-session-AVQCNXRG.js → new-session-HFO5GHSZ.js} +3 -3
  34. package/dist/plugin-create-LCXXNDK6.js +950 -0
  35. package/dist/plugin-create-LCXXNDK6.js.map +1 -0
  36. package/dist/plugin-search-HQ4WQKOF.js +40 -0
  37. package/dist/plugin-search-HQ4WQKOF.js.map +1 -0
  38. package/dist/{post-upgrade-XLHZ6ZB7.js → post-upgrade-2MG3VUDV.js} +2 -2
  39. package/dist/registry-client-AVGRE4CF.js +8 -0
  40. package/dist/{setup-BAI2F24H.js → setup-N7KT56O7.js} +7 -7
  41. package/dist/{telegram-ZDC3JQF2.js → telegram-QWMJU3A6.js} +2 -2
  42. package/package.json +2 -2
  43. package/dist/chunk-2CX4IEEC.js +0 -124
  44. package/dist/chunk-2CX4IEEC.js.map +0 -1
  45. package/dist/chunk-FQEBWOZR.js.map +0 -1
  46. package/dist/chunk-Q6ZXJTZB.js.map +0 -1
  47. package/dist/chunk-RKB2ZK6S.js.map +0 -1
  48. package/dist/chunk-UNJUWWQO.js.map +0 -1
  49. package/dist/chunk-WAAD23KY.js +0 -222
  50. package/dist/chunk-WAAD23KY.js.map +0 -1
  51. package/dist/integrate-5C6KSU6D.js.map +0 -1
  52. package/dist/main-T5WVCCFN.js.map +0 -1
  53. package/dist/plugin-create-AQ3B22BZ.js +0 -334
  54. package/dist/plugin-create-AQ3B22BZ.js.map +0 -1
  55. package/dist/usage-WYNK6ZC5.js +0 -10
  56. /package/dist/{adapter-77ZCVABT.js.map → adapter-IZNL6AK2.js.map} +0 -0
  57. /package/dist/{adapter-6ANPBSVU.js.map → adapter-Z435XYBQ.js.map} +0 -0
  58. /package/dist/{api-server-3PYLRBCN.js.map → api-server-2I7B3MXR.js.map} +0 -0
  59. /package/dist/{api-server-CHVSUDBX.js.map → api-server-5VEESFOT.js.map} +0 -0
  60. /package/dist/{chunk-Y64XWMJ4.js.map → chunk-366FOUJG.js.map} +0 -0
  61. /package/dist/{chunk-WVLDNYOJ.js.map → chunk-5RO42TWV.js.map} +0 -0
  62. /package/dist/{chunk-NBFIBGAT.js.map → chunk-7KGWYNWE.js.map} +0 -0
  63. /package/dist/{chunk-QSDZDHNS.js.map → chunk-VO3A2NI4.js.map} +0 -0
  64. /package/dist/{chunk-V5JT5TPD.js.map → chunk-ZPTM4NGK.js.map} +0 -0
  65. /package/dist/{config-editor-HNEKXRLQ.js.map → config-editor-2GYL2SSZ.js.map} +0 -0
  66. /package/dist/{core-plugins-VEUNFTMB.js.map → core-plugins-I6UPXQBL.js.map} +0 -0
  67. /package/dist/{discord-NOJQ5PZO.js.map → discord-DXDTGVGS.js.map} +0 -0
  68. /package/dist/{new-session-AVQCNXRG.js.map → new-session-HFO5GHSZ.js.map} +0 -0
  69. /package/dist/{post-upgrade-XLHZ6ZB7.js.map → post-upgrade-2MG3VUDV.js.map} +0 -0
  70. /package/dist/{telegram-ZDC3JQF2.js.map → registry-client-AVGRE4CF.js.map} +0 -0
  71. /package/dist/{setup-BAI2F24H.js.map → setup-N7KT56O7.js.map} +0 -0
  72. /package/dist/{usage-WYNK6ZC5.js.map → telegram-QWMJU3A6.js.map} +0 -0
@@ -66,7 +66,7 @@ function createApiServerPlugin() {
66
66
  },
67
67
  async setup(ctx) {
68
68
  const config = ctx.pluginConfig;
69
- const { ApiServer } = await import("./api-server-CHVSUDBX.js");
69
+ const { ApiServer } = await import("./api-server-2I7B3MXR.js");
70
70
  const apiConfig = {
71
71
  port: config.port ?? 0,
72
72
  host: config.host ?? "127.0.0.1"
@@ -94,4 +94,4 @@ var api_server_default = createApiServerPlugin();
94
94
  export {
95
95
  api_server_default
96
96
  };
97
- //# sourceMappingURL=chunk-V5JT5TPD.js.map
97
+ //# sourceMappingURL=chunk-ZPTM4NGK.js.map
package/dist/cli.js CHANGED
@@ -4,10 +4,6 @@ import {
4
4
  readApiPort,
5
5
  removeStalePortFile
6
6
  } from "./chunk-4WXALZA3.js";
7
- import {
8
- PLUGINS_DIR
9
- } from "./chunk-QVMEF6FB.js";
10
- import "./chunk-XMMAGAT4.js";
11
7
  import {
12
8
  checkAndPromptUpdate,
13
9
  compareVersions,
@@ -15,6 +11,10 @@ import {
15
11
  getLatestVersion,
16
12
  runUpdate
17
13
  } from "./chunk-S64CB6J3.js";
14
+ import {
15
+ PLUGINS_DIR
16
+ } from "./chunk-QVMEF6FB.js";
17
+ import "./chunk-XMMAGAT4.js";
18
18
  import "./chunk-VUNV25KB.js";
19
19
 
20
20
  // src/cli.ts
@@ -232,7 +232,8 @@ async function cmdPlugin(args2 = []) {
232
232
 
233
233
  \x1B[1mUsage:\x1B[0m
234
234
  openacp plugin list List all plugins with status
235
- openacp plugin add <package> Install a plugin package
235
+ openacp plugin search <query> Search the plugin registry
236
+ openacp plugin add <package>[@version] Install a plugin package
236
237
  openacp plugin install <package> Alias for add
237
238
  openacp plugin remove <package> Remove a plugin package
238
239
  openacp plugin uninstall <package> Alias for remove (--purge to delete data)
@@ -243,7 +244,9 @@ async function cmdPlugin(args2 = []) {
243
244
 
244
245
  \x1B[1mExamples:\x1B[0m
245
246
  openacp plugin list
247
+ openacp plugin search telegram
246
248
  openacp plugin add @openacp/adapter-discord
249
+ openacp plugin add translator@1.2.0
247
250
  openacp plugin enable @openacp/adapter-discord
248
251
  openacp plugin configure @openacp/adapter-discord
249
252
  openacp plugin remove @openacp/adapter-discord --purge
@@ -253,6 +256,11 @@ async function cmdPlugin(args2 = []) {
253
256
  switch (subcommand) {
254
257
  case "list":
255
258
  return cmdPlugins(args2.slice(1));
259
+ case "search": {
260
+ const { cmdPluginSearch } = await import("./plugin-search-HQ4WQKOF.js");
261
+ await cmdPluginSearch(args2.slice(2));
262
+ return;
263
+ }
256
264
  case "add":
257
265
  case "install": {
258
266
  const pkg = args2[2];
@@ -302,7 +310,7 @@ async function cmdPlugin(args2 = []) {
302
310
  return;
303
311
  }
304
312
  case "create": {
305
- const { cmdPluginCreate } = await import("./plugin-create-AQ3B22BZ.js");
313
+ const { cmdPluginCreate } = await import("./plugin-create-LCXXNDK6.js");
306
314
  await cmdPluginCreate();
307
315
  return;
308
316
  }
@@ -331,7 +339,7 @@ async function setPluginEnabled(name, enabled) {
331
339
  async function configurePlugin(name) {
332
340
  const os = await import("os");
333
341
  const path4 = await import("path");
334
- const { corePlugins } = await import("./core-plugins-VEUNFTMB.js");
342
+ const { corePlugins } = await import("./core-plugins-I6UPXQBL.js");
335
343
  const { SettingsManager } = await import("./settings-manager-MD2U4ZV2.js");
336
344
  const { createInstallContext } = await import("./install-context-XPWTFT3J.js");
337
345
  const plugin = corePlugins.find((p) => p.name === name);
@@ -350,38 +358,129 @@ async function configurePlugin(name) {
350
358
  console.log(`Plugin ${name} has no configure or install hook.`);
351
359
  }
352
360
  }
353
- async function installPlugin(pkg) {
354
- console.log(`Installing ${pkg}...`);
355
- const { corePlugins } = await import("./core-plugins-VEUNFTMB.js");
356
- const plugin = corePlugins.find((p) => p.name === pkg);
357
- if (!plugin) {
358
- console.error(`Plugin "${pkg}" not found. Community plugin install coming soon.`);
359
- return;
361
+ async function installPlugin(input) {
362
+ const os = await import("os");
363
+ const path4 = await import("path");
364
+ const { execSync: execSync3 } = await import("child_process");
365
+ const { getCurrentVersion: getCurrentVersion2 } = await import("./version-NQZBM5M7.js");
366
+ const { SettingsManager } = await import("./settings-manager-MD2U4ZV2.js");
367
+ const { createInstallContext } = await import("./install-context-XPWTFT3J.js");
368
+ const { PluginRegistry } = await import("./plugin-registry-WB3DR67H.js");
369
+ let pkgName;
370
+ let pkgVersion;
371
+ if (input.startsWith("@")) {
372
+ const afterScope = input.indexOf("/", 1);
373
+ if (afterScope === -1) {
374
+ pkgName = input;
375
+ } else {
376
+ const rest = input.slice(afterScope + 1);
377
+ const atIdx = rest.indexOf("@");
378
+ if (atIdx !== -1) {
379
+ pkgName = input.slice(0, afterScope + 1 + atIdx);
380
+ pkgVersion = rest.slice(atIdx + 1);
381
+ } else {
382
+ pkgName = input;
383
+ }
384
+ }
385
+ } else {
386
+ const atIdx = input.lastIndexOf("@");
387
+ if (atIdx > 0) {
388
+ pkgName = input.slice(0, atIdx);
389
+ pkgVersion = input.slice(atIdx + 1);
390
+ } else {
391
+ pkgName = input;
392
+ }
360
393
  }
361
- if (plugin.install) {
362
- const os = await import("os");
363
- const path4 = await import("path");
364
- const { SettingsManager } = await import("./settings-manager-MD2U4ZV2.js");
365
- const { createInstallContext } = await import("./install-context-XPWTFT3J.js");
366
- const { PluginRegistry } = await import("./plugin-registry-WB3DR67H.js");
367
- const basePath = path4.join(os.homedir(), ".openacp", "plugins");
368
- const settingsManager = new SettingsManager(basePath);
369
- const registryPath = path4.join(os.homedir(), ".openacp", "plugins.json");
370
- const registry = new PluginRegistry(registryPath);
371
- await registry.load();
372
- const ctx = createInstallContext({ pluginName: plugin.name, settingsManager, basePath });
373
- await plugin.install(ctx);
374
- registry.register(plugin.name, {
375
- version: plugin.version,
394
+ const { RegistryClient } = await import("./registry-client-AVGRE4CF.js");
395
+ const client = new RegistryClient();
396
+ let registryPlugin = null;
397
+ try {
398
+ const registry = await client.getRegistry();
399
+ registryPlugin = registry.plugins.find((p) => p.name === pkgName || p.npm === pkgName);
400
+ if (registryPlugin) {
401
+ console.log(`Resolved from registry: ${pkgName} \u2192 ${registryPlugin.npm}`);
402
+ pkgName = registryPlugin.npm;
403
+ if (!registryPlugin.verified) {
404
+ console.log("\u26A0\uFE0F This plugin is not verified by the OpenACP team.");
405
+ }
406
+ }
407
+ } catch {
408
+ }
409
+ const installSpec = pkgVersion ? `${pkgName}@${pkgVersion}` : pkgName;
410
+ console.log(`Installing ${installSpec}...`);
411
+ const { corePlugins } = await import("./core-plugins-I6UPXQBL.js");
412
+ const builtinPlugin = corePlugins.find((p) => p.name === pkgName);
413
+ const basePath = path4.join(os.homedir(), ".openacp", "plugins");
414
+ const settingsManager = new SettingsManager(basePath);
415
+ const registryPath = path4.join(os.homedir(), ".openacp", "plugins.json");
416
+ const pluginRegistry = new PluginRegistry(registryPath);
417
+ await pluginRegistry.load();
418
+ if (builtinPlugin) {
419
+ if (builtinPlugin.install) {
420
+ const ctx = createInstallContext({ pluginName: builtinPlugin.name, settingsManager, basePath });
421
+ await builtinPlugin.install(ctx);
422
+ }
423
+ pluginRegistry.register(builtinPlugin.name, {
424
+ version: builtinPlugin.version,
376
425
  source: "builtin",
377
426
  enabled: true,
378
- settingsPath: settingsManager.getSettingsPath(plugin.name),
379
- description: plugin.description
427
+ settingsPath: settingsManager.getSettingsPath(builtinPlugin.name),
428
+ description: builtinPlugin.description
380
429
  });
381
- await registry.save();
382
- console.log(`Plugin ${plugin.name} installed! Restart to activate.`);
383
- } else {
384
- console.log(`Plugin ${plugin.name} has no install hook. Nothing to do.`);
430
+ await pluginRegistry.save();
431
+ console.log(`\u2713 ${builtinPlugin.name} installed! Restart to activate.`);
432
+ return;
433
+ }
434
+ const pluginsDir = path4.join(os.homedir(), ".openacp", "plugins");
435
+ const nodeModulesDir = path4.join(pluginsDir, "node_modules");
436
+ try {
437
+ execSync3(`npm install ${installSpec} --prefix "${pluginsDir}" --save`, {
438
+ stdio: "inherit",
439
+ timeout: 6e4
440
+ });
441
+ } catch {
442
+ console.error(`Failed to install ${installSpec}. Check the package name and try again.`);
443
+ process.exit(1);
444
+ }
445
+ const cliVersion = getCurrentVersion2();
446
+ try {
447
+ const installedPkgPath = path4.join(nodeModulesDir, pkgName, "package.json");
448
+ const { readFileSync } = await import("fs");
449
+ const installedPkg = JSON.parse(readFileSync(installedPkgPath, "utf-8"));
450
+ const minVersion = installedPkg.engines?.openacp?.replace(/[>=^~\s]/g, "");
451
+ if (minVersion) {
452
+ const { compareVersions: compareVersions2 } = await import("./version-NQZBM5M7.js");
453
+ if (compareVersions2(cliVersion, minVersion) < 0) {
454
+ console.log(`
455
+ \u26A0\uFE0F This plugin requires OpenACP >= ${minVersion}. You have ${cliVersion}.`);
456
+ console.log(` Run 'openacp update' to get the latest version.
457
+ `);
458
+ }
459
+ }
460
+ const pluginModule = await import(path4.join(nodeModulesDir, pkgName, installedPkg.main ?? "dist/index.js"));
461
+ const plugin = pluginModule.default;
462
+ if (plugin?.install) {
463
+ const ctx = createInstallContext({ pluginName: plugin.name ?? pkgName, settingsManager, basePath });
464
+ await plugin.install(ctx);
465
+ }
466
+ pluginRegistry.register(plugin?.name ?? pkgName, {
467
+ version: installedPkg.version,
468
+ source: "npm",
469
+ enabled: true,
470
+ settingsPath: settingsManager.getSettingsPath(plugin?.name ?? pkgName),
471
+ description: plugin?.description ?? installedPkg.description
472
+ });
473
+ await pluginRegistry.save();
474
+ console.log(`\u2713 ${plugin?.name ?? pkgName} installed! Restart to activate.`);
475
+ } catch (err) {
476
+ pluginRegistry.register(pkgName, {
477
+ version: pkgVersion ?? "unknown",
478
+ source: "npm",
479
+ enabled: true,
480
+ settingsPath: settingsManager.getSettingsPath(pkgName)
481
+ });
482
+ await pluginRegistry.save();
483
+ console.log(`\u2713 ${pkgName} installed (npm only). Restart to activate.`);
385
484
  }
386
485
  }
387
486
  async function uninstallPlugin(name, purge) {
@@ -402,7 +501,7 @@ async function uninstallPlugin(name, purge) {
402
501
  process.exit(1);
403
502
  }
404
503
  try {
405
- const { corePlugins } = await import("./core-plugins-VEUNFTMB.js");
504
+ const { corePlugins } = await import("./core-plugins-I6UPXQBL.js");
406
505
  const plugin = corePlugins.find((p) => p.name === name);
407
506
  if (plugin?.uninstall) {
408
507
  const { SettingsManager } = await import("./settings-manager-MD2U4ZV2.js");
@@ -1225,7 +1324,7 @@ the API for live updates. When stopped, edits config file directly.
1225
1324
  }
1226
1325
  return;
1227
1326
  }
1228
- const { runConfigEditor } = await import("./config-editor-HNEKXRLQ.js");
1327
+ const { runConfigEditor } = await import("./config-editor-2GYL2SSZ.js");
1229
1328
  const { ConfigManager } = await import("./config-I4FMCJGZ.js");
1230
1329
  const cm = new ConfigManager();
1231
1330
  if (!await cm.exists()) {
@@ -1412,7 +1511,7 @@ a "Handoff" slash command to Claude Code.
1412
1511
  `);
1413
1512
  return;
1414
1513
  }
1415
- const { getIntegration, listIntegrations } = await import("./integrate-5C6KSU6D.js");
1514
+ const { getIntegration, listIntegrations } = await import("./integrate-APK4OEQF.js");
1416
1515
  const agent = args2[1];
1417
1516
  const uninstall = args2.includes("--uninstall");
1418
1517
  if (!agent) {
@@ -1706,7 +1805,7 @@ Run 'openacp agents' to see available agents.
1706
1805
  const { getAgentCapabilities } = await import("./agent-dependencies-WS7Z2DFW.js");
1707
1806
  const caps = getAgentCapabilities(result.agentKey);
1708
1807
  if (caps.integration) {
1709
- const { installIntegration } = await import("./integrate-5C6KSU6D.js");
1808
+ const { installIntegration } = await import("./integrate-APK4OEQF.js");
1710
1809
  const intResult = await installIntegration(result.agentKey, caps.integration);
1711
1810
  if (intResult.success) {
1712
1811
  console.log(` \x1B[32m\u2713\x1B[0m Handoff integration installed for ${result.agentKey}`);
@@ -1748,7 +1847,7 @@ async function agentsUninstall(name, help = false) {
1748
1847
  const { getAgentCapabilities } = await import("./agent-dependencies-WS7Z2DFW.js");
1749
1848
  const caps = getAgentCapabilities(name);
1750
1849
  if (caps.integration) {
1751
- const { uninstallIntegration } = await import("./integrate-5C6KSU6D.js");
1850
+ const { uninstallIntegration } = await import("./integrate-APK4OEQF.js");
1752
1851
  await uninstallIntegration(name, caps.integration);
1753
1852
  console.log(` \x1B[32m\u2713\x1B[0m Handoff integration removed for ${name}`);
1754
1853
  }
@@ -2013,10 +2112,10 @@ async function cmdOnboard() {
2013
2112
  const { ConfigManager } = await import("./config-I4FMCJGZ.js");
2014
2113
  const cm = new ConfigManager();
2015
2114
  if (await cm.exists()) {
2016
- const { runReconfigure } = await import("./setup-BAI2F24H.js");
2115
+ const { runReconfigure } = await import("./setup-N7KT56O7.js");
2017
2116
  await runReconfigure(cm);
2018
2117
  } else {
2019
- const { runSetup } = await import("./setup-BAI2F24H.js");
2118
+ const { runSetup } = await import("./setup-N7KT56O7.js");
2020
2119
  await runSetup(cm, { skipRunMode: true });
2021
2120
  }
2022
2121
  }
@@ -2055,7 +2154,7 @@ async function cmdDefault(command2) {
2055
2154
  const { ConfigManager } = await import("./config-I4FMCJGZ.js");
2056
2155
  const cm = new ConfigManager();
2057
2156
  if (!await cm.exists()) {
2058
- const { runSetup } = await import("./setup-BAI2F24H.js");
2157
+ const { runSetup } = await import("./setup-N7KT56O7.js");
2059
2158
  const shouldStart = await runSetup(cm);
2060
2159
  if (!shouldStart) process.exit(0);
2061
2160
  }
@@ -2073,7 +2172,7 @@ async function cmdDefault(command2) {
2073
2172
  }
2074
2173
  const { markRunning } = await import("./daemon-PXO5QPCR.js");
2075
2174
  markRunning();
2076
- const { startServer } = await import("./main-T5WVCCFN.js");
2175
+ const { startServer } = await import("./main-EJBK65NS.js");
2077
2176
  await startServer();
2078
2177
  }
2079
2178
 
@@ -2147,7 +2246,7 @@ async function cmdDev(args2 = []) {
2147
2246
  process.env.OPENACP_DEBUG = "1";
2148
2247
  }
2149
2248
  process.env.OPENACP_DEV_LOOP = "1";
2150
- const { startServer } = await import("./main-T5WVCCFN.js");
2249
+ const { startServer } = await import("./main-EJBK65NS.js");
2151
2250
  await startServer({ devPluginPath: pluginPath, noWatch });
2152
2251
  }
2153
2252
 
@@ -2180,7 +2279,7 @@ var commands = {
2180
2279
  "onboard": () => cmdOnboard(),
2181
2280
  "dev": () => cmdDev(args),
2182
2281
  "--daemon-child": async () => {
2183
- const { startServer } = await import("./main-T5WVCCFN.js");
2282
+ const { startServer } = await import("./main-EJBK65NS.js");
2184
2283
  await startServer();
2185
2284
  }
2186
2285
  };