allagents 0.21.2 → 0.21.3
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/index.js +127 -45
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -28865,7 +28865,7 @@ var package_default;
|
|
|
28865
28865
|
var init_package = __esm(() => {
|
|
28866
28866
|
package_default = {
|
|
28867
28867
|
name: "allagents",
|
|
28868
|
-
version: "0.21.
|
|
28868
|
+
version: "0.21.3",
|
|
28869
28869
|
description: "CLI tool for managing multi-repo AI agent workspaces with plugin synchronization",
|
|
28870
28870
|
type: "module",
|
|
28871
28871
|
bin: {
|
|
@@ -31172,52 +31172,132 @@ async function runPlugins(context, cache2) {
|
|
|
31172
31172
|
async function runPluginDetail(pluginKey, context, cache2) {
|
|
31173
31173
|
const scope = pluginKey.startsWith("project:") ? "project" : "user";
|
|
31174
31174
|
const pluginSource = pluginKey.replace(/^(project|user):/, "");
|
|
31175
|
-
|
|
31176
|
-
|
|
31177
|
-
|
|
31178
|
-
|
|
31179
|
-
|
|
31180
|
-
|
|
31181
|
-
|
|
31182
|
-
|
|
31183
|
-
|
|
31175
|
+
while (true) {
|
|
31176
|
+
const action = await select2({
|
|
31177
|
+
message: `Plugin: ${pluginSource} [${scope}]`,
|
|
31178
|
+
options: [
|
|
31179
|
+
{ label: "Browse skills", value: "browse" },
|
|
31180
|
+
{ label: "Remove", value: "remove" },
|
|
31181
|
+
{ label: "Back", value: "back" }
|
|
31182
|
+
]
|
|
31183
|
+
});
|
|
31184
|
+
if (Ct(action) || action === "back") {
|
|
31185
|
+
return;
|
|
31186
|
+
}
|
|
31187
|
+
if (action === "browse") {
|
|
31188
|
+
await runBrowsePluginSkills(pluginSource, scope, context, cache2);
|
|
31189
|
+
continue;
|
|
31190
|
+
}
|
|
31191
|
+
if (action === "remove") {
|
|
31192
|
+
const confirmed = await confirm({
|
|
31193
|
+
message: `Remove plugin "${pluginSource}"?`
|
|
31194
|
+
});
|
|
31195
|
+
if (Ct(confirmed) || !confirmed) {
|
|
31196
|
+
continue;
|
|
31197
|
+
}
|
|
31198
|
+
const s = Ie();
|
|
31199
|
+
s.start("Removing plugin...");
|
|
31200
|
+
if (scope === "project" && context.workspacePath) {
|
|
31201
|
+
const result = await removePlugin(pluginSource, context.workspacePath);
|
|
31202
|
+
if (!result.success) {
|
|
31203
|
+
s.stop("Removal failed");
|
|
31204
|
+
kt2(result.error ?? "Unknown error", "Error");
|
|
31205
|
+
continue;
|
|
31206
|
+
}
|
|
31207
|
+
s.stop("Plugin removed");
|
|
31208
|
+
const syncS = Ie();
|
|
31209
|
+
syncS.start("Syncing...");
|
|
31210
|
+
await syncWorkspace(context.workspacePath);
|
|
31211
|
+
syncS.stop("Sync complete");
|
|
31212
|
+
} else {
|
|
31213
|
+
const result = await removeUserPlugin(pluginSource);
|
|
31214
|
+
if (!result.success) {
|
|
31215
|
+
s.stop("Removal failed");
|
|
31216
|
+
kt2(result.error ?? "Unknown error", "Error");
|
|
31217
|
+
continue;
|
|
31218
|
+
}
|
|
31219
|
+
s.stop("Plugin removed");
|
|
31220
|
+
const syncS = Ie();
|
|
31221
|
+
syncS.start("Syncing...");
|
|
31222
|
+
await syncUserWorkspace();
|
|
31223
|
+
syncS.stop("Sync complete");
|
|
31224
|
+
}
|
|
31225
|
+
cache2?.invalidate();
|
|
31226
|
+
kt2(`Removed: ${pluginSource} [${scope}]`, "Success");
|
|
31227
|
+
return;
|
|
31228
|
+
}
|
|
31184
31229
|
}
|
|
31185
|
-
|
|
31186
|
-
|
|
31187
|
-
|
|
31230
|
+
}
|
|
31231
|
+
async function runBrowsePluginSkills(pluginSource, scope, context, cache2) {
|
|
31232
|
+
try {
|
|
31233
|
+
const workspacePath = scope === "user" ? getHomeDir() : context.workspacePath ?? process.cwd();
|
|
31234
|
+
const allSkills = await getAllSkillsFromPlugins(workspacePath);
|
|
31235
|
+
const pluginSkills = allSkills.filter((s2) => s2.pluginSource === pluginSource);
|
|
31236
|
+
if (pluginSkills.length === 0) {
|
|
31237
|
+
kt2("No skills found in this plugin.", "Skills");
|
|
31238
|
+
return;
|
|
31239
|
+
}
|
|
31240
|
+
const options2 = pluginSkills.map((skill) => ({
|
|
31241
|
+
label: `${skill.name}`,
|
|
31242
|
+
value: skill.name
|
|
31243
|
+
}));
|
|
31244
|
+
const initialValues = pluginSkills.filter((s2) => !s2.disabled).map((s2) => s2.name);
|
|
31245
|
+
const selected = await multiselect2({
|
|
31246
|
+
message: `Toggle skills in ${pluginSource} (selected = enabled)`,
|
|
31247
|
+
options: options2,
|
|
31248
|
+
initialValues,
|
|
31249
|
+
required: false
|
|
31188
31250
|
});
|
|
31189
|
-
if (Ct(
|
|
31251
|
+
if (Ct(selected)) {
|
|
31252
|
+
return;
|
|
31253
|
+
}
|
|
31254
|
+
const selectedSet = new Set(selected);
|
|
31255
|
+
const toDisable = pluginSkills.filter((s2) => !s2.disabled && !selectedSet.has(s2.name));
|
|
31256
|
+
const toEnable = pluginSkills.filter((s2) => s2.disabled && selectedSet.has(s2.name));
|
|
31257
|
+
if (toDisable.length === 0 && toEnable.length === 0) {
|
|
31258
|
+
kt2("No changes made.", "Skills");
|
|
31190
31259
|
return;
|
|
31191
31260
|
}
|
|
31192
31261
|
const s = Ie();
|
|
31193
|
-
s.start("
|
|
31194
|
-
|
|
31195
|
-
const
|
|
31196
|
-
if (
|
|
31197
|
-
|
|
31198
|
-
|
|
31199
|
-
|
|
31262
|
+
s.start("Updating skills...");
|
|
31263
|
+
for (const skill of toDisable) {
|
|
31264
|
+
const skillKey = `${skill.pluginName}:${skill.name}`;
|
|
31265
|
+
if (scope === "user") {
|
|
31266
|
+
await addUserDisabledSkill(skillKey);
|
|
31267
|
+
} else if (context.workspacePath) {
|
|
31268
|
+
await addDisabledSkill(skillKey, context.workspacePath);
|
|
31200
31269
|
}
|
|
31201
|
-
|
|
31202
|
-
|
|
31203
|
-
|
|
31204
|
-
|
|
31205
|
-
|
|
31206
|
-
|
|
31207
|
-
|
|
31208
|
-
if (!result.success) {
|
|
31209
|
-
s.stop("Removal failed");
|
|
31210
|
-
kt2(result.error ?? "Unknown error", "Error");
|
|
31211
|
-
return;
|
|
31270
|
+
}
|
|
31271
|
+
for (const skill of toEnable) {
|
|
31272
|
+
const skillKey = `${skill.pluginName}:${skill.name}`;
|
|
31273
|
+
if (scope === "user") {
|
|
31274
|
+
await removeUserDisabledSkill(skillKey);
|
|
31275
|
+
} else if (context.workspacePath) {
|
|
31276
|
+
await removeDisabledSkill(skillKey, context.workspacePath);
|
|
31212
31277
|
}
|
|
31213
|
-
|
|
31214
|
-
|
|
31215
|
-
|
|
31278
|
+
}
|
|
31279
|
+
s.stop("Skills updated");
|
|
31280
|
+
const syncS = Ie();
|
|
31281
|
+
syncS.start("Syncing...");
|
|
31282
|
+
if (scope === "project" && context.workspacePath) {
|
|
31283
|
+
await syncWorkspace(context.workspacePath);
|
|
31284
|
+
} else if (scope === "user") {
|
|
31216
31285
|
await syncUserWorkspace();
|
|
31217
|
-
syncS.stop("Sync complete");
|
|
31218
31286
|
}
|
|
31287
|
+
syncS.stop("Sync complete");
|
|
31219
31288
|
cache2?.invalidate();
|
|
31220
|
-
|
|
31289
|
+
const changes = [];
|
|
31290
|
+
for (const skill of toEnable) {
|
|
31291
|
+
changes.push(`✓ Enabled: ${skill.name}`);
|
|
31292
|
+
}
|
|
31293
|
+
for (const skill of toDisable) {
|
|
31294
|
+
changes.push(`✗ Disabled: ${skill.name}`);
|
|
31295
|
+
}
|
|
31296
|
+
kt2(changes.join(`
|
|
31297
|
+
`), "Updated");
|
|
31298
|
+
} catch (error) {
|
|
31299
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
31300
|
+
kt2(message, "Error");
|
|
31221
31301
|
}
|
|
31222
31302
|
}
|
|
31223
31303
|
async function runInstallPlugin(context, cache2) {
|
|
@@ -31384,7 +31464,7 @@ async function runMarketplaceDetail(marketplaceName, context, cache2) {
|
|
|
31384
31464
|
}
|
|
31385
31465
|
}
|
|
31386
31466
|
}
|
|
31387
|
-
var select2, text2, confirm;
|
|
31467
|
+
var select2, text2, confirm, multiselect2;
|
|
31388
31468
|
var init_plugins = __esm(() => {
|
|
31389
31469
|
init_dist2();
|
|
31390
31470
|
init_workspace_modify();
|
|
@@ -31392,7 +31472,9 @@ var init_plugins = __esm(() => {
|
|
|
31392
31472
|
init_sync();
|
|
31393
31473
|
init_marketplace();
|
|
31394
31474
|
init_status2();
|
|
31395
|
-
(
|
|
31475
|
+
init_skills();
|
|
31476
|
+
init_constants();
|
|
31477
|
+
({ select: select2, text: text2, confirm, multiselect: multiselect2 } = exports_dist);
|
|
31396
31478
|
});
|
|
31397
31479
|
|
|
31398
31480
|
// src/cli/tui/actions/clients.ts
|
|
@@ -31425,7 +31507,7 @@ async function runManageClients(context, cache2) {
|
|
|
31425
31507
|
currentClients = userConfig?.clients ?? [];
|
|
31426
31508
|
}
|
|
31427
31509
|
const allClients = ClientTypeSchema.options.filter((c) => c !== "vscode");
|
|
31428
|
-
const selectedClients = await
|
|
31510
|
+
const selectedClients = await multiselect3({
|
|
31429
31511
|
message: `Select AI clients [${scope}]`,
|
|
31430
31512
|
options: allClients.map((c) => ({
|
|
31431
31513
|
label: c,
|
|
@@ -31471,7 +31553,7 @@ async function runManageClients(context, cache2) {
|
|
|
31471
31553
|
kt2(message, "Error");
|
|
31472
31554
|
}
|
|
31473
31555
|
}
|
|
31474
|
-
var select3,
|
|
31556
|
+
var select3, multiselect3;
|
|
31475
31557
|
var init_clients = __esm(() => {
|
|
31476
31558
|
init_dist2();
|
|
31477
31559
|
init_workspace_config();
|
|
@@ -31479,7 +31561,7 @@ var init_clients = __esm(() => {
|
|
|
31479
31561
|
init_user_workspace();
|
|
31480
31562
|
init_sync();
|
|
31481
31563
|
init_status2();
|
|
31482
|
-
({ select: select3, multiselect:
|
|
31564
|
+
({ select: select3, multiselect: multiselect3 } = exports_dist);
|
|
31483
31565
|
});
|
|
31484
31566
|
|
|
31485
31567
|
// src/cli/tui/actions/skills.ts
|
|
@@ -31525,7 +31607,7 @@ async function runSkills(context, cache2) {
|
|
|
31525
31607
|
value: s2.key
|
|
31526
31608
|
}));
|
|
31527
31609
|
const initialValues = skills.filter((s2) => !s2.disabled).map((s2) => s2.key);
|
|
31528
|
-
const selected = await
|
|
31610
|
+
const selected = await multiselect4({
|
|
31529
31611
|
message: "Toggle skills (selected = enabled)",
|
|
31530
31612
|
options: options2,
|
|
31531
31613
|
initialValues,
|
|
@@ -31588,7 +31670,7 @@ async function runSkills(context, cache2) {
|
|
|
31588
31670
|
kt2(message, "Error");
|
|
31589
31671
|
}
|
|
31590
31672
|
}
|
|
31591
|
-
var
|
|
31673
|
+
var multiselect4;
|
|
31592
31674
|
var init_skills2 = __esm(() => {
|
|
31593
31675
|
init_dist2();
|
|
31594
31676
|
init_skills();
|
|
@@ -31596,7 +31678,7 @@ var init_skills2 = __esm(() => {
|
|
|
31596
31678
|
init_user_workspace();
|
|
31597
31679
|
init_sync();
|
|
31598
31680
|
init_constants();
|
|
31599
|
-
({ multiselect:
|
|
31681
|
+
({ multiselect: multiselect4 } = exports_dist);
|
|
31600
31682
|
});
|
|
31601
31683
|
|
|
31602
31684
|
// src/cli/tui/wizard.ts
|