allagents 0.21.2 → 0.21.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +133 -47
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -27381,7 +27381,9 @@ function collectSyncedPaths(copyResults, workspacePath, clients, clientMappings)
27381
27381
  }
27382
27382
  async function validatePlugin(pluginSource, workspacePath, offline) {
27383
27383
  if (isPluginSpec(pluginSource)) {
27384
- const resolved = await resolvePluginSpecWithAutoRegister(pluginSource);
27384
+ const resolved = await resolvePluginSpecWithAutoRegister(pluginSource, {
27385
+ offline
27386
+ });
27385
27387
  if (!resolved.success) {
27386
27388
  return {
27387
27389
  plugin: pluginSource,
@@ -28307,7 +28309,9 @@ import { readFile as readFile13, readdir as readdir4 } from "node:fs/promises";
28307
28309
  import { join as join19, resolve as resolve12 } from "node:path";
28308
28310
  async function resolvePluginPath(pluginSource, workspacePath) {
28309
28311
  if (isPluginSpec(pluginSource)) {
28310
- const resolved2 = await resolvePluginSpecWithAutoRegister(pluginSource);
28312
+ const resolved2 = await resolvePluginSpecWithAutoRegister(pluginSource, {
28313
+ offline: true
28314
+ });
28311
28315
  return resolved2.success ? resolved2.path ?? null : null;
28312
28316
  }
28313
28317
  if (isGitHubUrl(pluginSource)) {
@@ -28865,7 +28869,7 @@ var package_default;
28865
28869
  var init_package = __esm(() => {
28866
28870
  package_default = {
28867
28871
  name: "allagents",
28868
- version: "0.21.2",
28872
+ version: "0.21.4",
28869
28873
  description: "CLI tool for managing multi-repo AI agent workspaces with plugin synchronization",
28870
28874
  type: "module",
28871
28875
  bin: {
@@ -31172,52 +31176,132 @@ async function runPlugins(context, cache2) {
31172
31176
  async function runPluginDetail(pluginKey, context, cache2) {
31173
31177
  const scope = pluginKey.startsWith("project:") ? "project" : "user";
31174
31178
  const pluginSource = pluginKey.replace(/^(project|user):/, "");
31175
- const action = await select2({
31176
- message: `Plugin: ${pluginSource} [${scope}]`,
31177
- options: [
31178
- { label: "Remove", value: "remove" },
31179
- { label: "Back", value: "back" }
31180
- ]
31181
- });
31182
- if (Ct(action) || action === "back") {
31183
- return;
31179
+ while (true) {
31180
+ const action = await select2({
31181
+ message: `Plugin: ${pluginSource} [${scope}]`,
31182
+ options: [
31183
+ { label: "Browse skills", value: "browse" },
31184
+ { label: "Remove", value: "remove" },
31185
+ { label: "Back", value: "back" }
31186
+ ]
31187
+ });
31188
+ if (Ct(action) || action === "back") {
31189
+ return;
31190
+ }
31191
+ if (action === "browse") {
31192
+ await runBrowsePluginSkills(pluginSource, scope, context, cache2);
31193
+ continue;
31194
+ }
31195
+ if (action === "remove") {
31196
+ const confirmed = await confirm({
31197
+ message: `Remove plugin "${pluginSource}"?`
31198
+ });
31199
+ if (Ct(confirmed) || !confirmed) {
31200
+ continue;
31201
+ }
31202
+ const s = Ie();
31203
+ s.start("Removing plugin...");
31204
+ if (scope === "project" && context.workspacePath) {
31205
+ const result = await removePlugin(pluginSource, context.workspacePath);
31206
+ if (!result.success) {
31207
+ s.stop("Removal failed");
31208
+ kt2(result.error ?? "Unknown error", "Error");
31209
+ continue;
31210
+ }
31211
+ s.stop("Plugin removed");
31212
+ const syncS = Ie();
31213
+ syncS.start("Syncing...");
31214
+ await syncWorkspace(context.workspacePath);
31215
+ syncS.stop("Sync complete");
31216
+ } else {
31217
+ const result = await removeUserPlugin(pluginSource);
31218
+ if (!result.success) {
31219
+ s.stop("Removal failed");
31220
+ kt2(result.error ?? "Unknown error", "Error");
31221
+ continue;
31222
+ }
31223
+ s.stop("Plugin removed");
31224
+ const syncS = Ie();
31225
+ syncS.start("Syncing...");
31226
+ await syncUserWorkspace();
31227
+ syncS.stop("Sync complete");
31228
+ }
31229
+ cache2?.invalidate();
31230
+ kt2(`Removed: ${pluginSource} [${scope}]`, "Success");
31231
+ return;
31232
+ }
31184
31233
  }
31185
- if (action === "remove") {
31186
- const confirmed = await confirm({
31187
- message: `Remove plugin "${pluginSource}"?`
31234
+ }
31235
+ async function runBrowsePluginSkills(pluginSource, scope, context, cache2) {
31236
+ try {
31237
+ const workspacePath = scope === "user" ? getHomeDir() : context.workspacePath ?? process.cwd();
31238
+ const allSkills = await getAllSkillsFromPlugins(workspacePath);
31239
+ const pluginSkills = allSkills.filter((s2) => s2.pluginSource === pluginSource);
31240
+ if (pluginSkills.length === 0) {
31241
+ kt2("No skills found in this plugin.", "Skills");
31242
+ return;
31243
+ }
31244
+ const options2 = pluginSkills.map((skill) => ({
31245
+ label: `${skill.name}`,
31246
+ value: skill.name
31247
+ }));
31248
+ const initialValues = pluginSkills.filter((s2) => !s2.disabled).map((s2) => s2.name);
31249
+ const selected = await multiselect2({
31250
+ message: `Toggle skills in ${pluginSource} (selected = enabled)`,
31251
+ options: options2,
31252
+ initialValues,
31253
+ required: false
31188
31254
  });
31189
- if (Ct(confirmed) || !confirmed) {
31255
+ if (Ct(selected)) {
31256
+ return;
31257
+ }
31258
+ const selectedSet = new Set(selected);
31259
+ const toDisable = pluginSkills.filter((s2) => !s2.disabled && !selectedSet.has(s2.name));
31260
+ const toEnable = pluginSkills.filter((s2) => s2.disabled && selectedSet.has(s2.name));
31261
+ if (toDisable.length === 0 && toEnable.length === 0) {
31262
+ kt2("No changes made.", "Skills");
31190
31263
  return;
31191
31264
  }
31192
31265
  const s = Ie();
31193
- s.start("Removing plugin...");
31194
- if (scope === "project" && context.workspacePath) {
31195
- const result = await removePlugin(pluginSource, context.workspacePath);
31196
- if (!result.success) {
31197
- s.stop("Removal failed");
31198
- kt2(result.error ?? "Unknown error", "Error");
31199
- return;
31266
+ s.start("Updating skills...");
31267
+ for (const skill of toDisable) {
31268
+ const skillKey = `${skill.pluginName}:${skill.name}`;
31269
+ if (scope === "user") {
31270
+ await addUserDisabledSkill(skillKey);
31271
+ } else if (context.workspacePath) {
31272
+ await addDisabledSkill(skillKey, context.workspacePath);
31200
31273
  }
31201
- s.stop("Plugin removed");
31202
- const syncS = Ie();
31203
- syncS.start("Syncing...");
31204
- await syncWorkspace(context.workspacePath);
31205
- syncS.stop("Sync complete");
31206
- } else {
31207
- const result = await removeUserPlugin(pluginSource);
31208
- if (!result.success) {
31209
- s.stop("Removal failed");
31210
- kt2(result.error ?? "Unknown error", "Error");
31211
- return;
31274
+ }
31275
+ for (const skill of toEnable) {
31276
+ const skillKey = `${skill.pluginName}:${skill.name}`;
31277
+ if (scope === "user") {
31278
+ await removeUserDisabledSkill(skillKey);
31279
+ } else if (context.workspacePath) {
31280
+ await removeDisabledSkill(skillKey, context.workspacePath);
31212
31281
  }
31213
- s.stop("Plugin removed");
31214
- const syncS = Ie();
31215
- syncS.start("Syncing...");
31282
+ }
31283
+ s.stop("Skills updated");
31284
+ const syncS = Ie();
31285
+ syncS.start("Syncing...");
31286
+ if (scope === "project" && context.workspacePath) {
31287
+ await syncWorkspace(context.workspacePath);
31288
+ } else if (scope === "user") {
31216
31289
  await syncUserWorkspace();
31217
- syncS.stop("Sync complete");
31218
31290
  }
31291
+ syncS.stop("Sync complete");
31219
31292
  cache2?.invalidate();
31220
- kt2(`Removed: ${pluginSource} [${scope}]`, "Success");
31293
+ const changes = [];
31294
+ for (const skill of toEnable) {
31295
+ changes.push(`✓ Enabled: ${skill.name}`);
31296
+ }
31297
+ for (const skill of toDisable) {
31298
+ changes.push(`✗ Disabled: ${skill.name}`);
31299
+ }
31300
+ kt2(changes.join(`
31301
+ `), "Updated");
31302
+ } catch (error) {
31303
+ const message = error instanceof Error ? error.message : String(error);
31304
+ kt2(message, "Error");
31221
31305
  }
31222
31306
  }
31223
31307
  async function runInstallPlugin(context, cache2) {
@@ -31384,7 +31468,7 @@ async function runMarketplaceDetail(marketplaceName, context, cache2) {
31384
31468
  }
31385
31469
  }
31386
31470
  }
31387
- var select2, text2, confirm;
31471
+ var select2, text2, confirm, multiselect2;
31388
31472
  var init_plugins = __esm(() => {
31389
31473
  init_dist2();
31390
31474
  init_workspace_modify();
@@ -31392,7 +31476,9 @@ var init_plugins = __esm(() => {
31392
31476
  init_sync();
31393
31477
  init_marketplace();
31394
31478
  init_status2();
31395
- ({ select: select2, text: text2, confirm } = exports_dist);
31479
+ init_skills();
31480
+ init_constants();
31481
+ ({ select: select2, text: text2, confirm, multiselect: multiselect2 } = exports_dist);
31396
31482
  });
31397
31483
 
31398
31484
  // src/cli/tui/actions/clients.ts
@@ -31425,7 +31511,7 @@ async function runManageClients(context, cache2) {
31425
31511
  currentClients = userConfig?.clients ?? [];
31426
31512
  }
31427
31513
  const allClients = ClientTypeSchema.options.filter((c) => c !== "vscode");
31428
- const selectedClients = await multiselect2({
31514
+ const selectedClients = await multiselect3({
31429
31515
  message: `Select AI clients [${scope}]`,
31430
31516
  options: allClients.map((c) => ({
31431
31517
  label: c,
@@ -31471,7 +31557,7 @@ async function runManageClients(context, cache2) {
31471
31557
  kt2(message, "Error");
31472
31558
  }
31473
31559
  }
31474
- var select3, multiselect2;
31560
+ var select3, multiselect3;
31475
31561
  var init_clients = __esm(() => {
31476
31562
  init_dist2();
31477
31563
  init_workspace_config();
@@ -31479,7 +31565,7 @@ var init_clients = __esm(() => {
31479
31565
  init_user_workspace();
31480
31566
  init_sync();
31481
31567
  init_status2();
31482
- ({ select: select3, multiselect: multiselect2 } = exports_dist);
31568
+ ({ select: select3, multiselect: multiselect3 } = exports_dist);
31483
31569
  });
31484
31570
 
31485
31571
  // src/cli/tui/actions/skills.ts
@@ -31525,7 +31611,7 @@ async function runSkills(context, cache2) {
31525
31611
  value: s2.key
31526
31612
  }));
31527
31613
  const initialValues = skills.filter((s2) => !s2.disabled).map((s2) => s2.key);
31528
- const selected = await multiselect3({
31614
+ const selected = await multiselect4({
31529
31615
  message: "Toggle skills (selected = enabled)",
31530
31616
  options: options2,
31531
31617
  initialValues,
@@ -31588,7 +31674,7 @@ async function runSkills(context, cache2) {
31588
31674
  kt2(message, "Error");
31589
31675
  }
31590
31676
  }
31591
- var multiselect3;
31677
+ var multiselect4;
31592
31678
  var init_skills2 = __esm(() => {
31593
31679
  init_dist2();
31594
31680
  init_skills();
@@ -31596,7 +31682,7 @@ var init_skills2 = __esm(() => {
31596
31682
  init_user_workspace();
31597
31683
  init_sync();
31598
31684
  init_constants();
31599
- ({ multiselect: multiselect3 } = exports_dist);
31685
+ ({ multiselect: multiselect4 } = exports_dist);
31600
31686
  });
31601
31687
 
31602
31688
  // src/cli/tui/wizard.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "allagents",
3
- "version": "0.21.2",
3
+ "version": "0.21.4",
4
4
  "description": "CLI tool for managing multi-repo AI agent workspaces with plugin synchronization",
5
5
  "type": "module",
6
6
  "bin": {