allagents 1.3.0 → 1.4.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.
- package/dist/index.js +143 -115
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -33306,19 +33306,14 @@ var exports_prompt_clients = {};
|
|
|
33306
33306
|
__export(exports_prompt_clients, {
|
|
33307
33307
|
promptForClients: () => promptForClients,
|
|
33308
33308
|
isInteractive: () => isInteractive,
|
|
33309
|
-
|
|
33309
|
+
buildClientOptions: () => buildClientOptions
|
|
33310
33310
|
});
|
|
33311
|
-
function
|
|
33312
|
-
|
|
33313
|
-
|
|
33314
|
-
|
|
33315
|
-
|
|
33316
|
-
|
|
33317
|
-
"Universal (.agents/skills)": universalGroup,
|
|
33318
|
-
"Client-specific": clientSpecificGroup
|
|
33319
|
-
},
|
|
33320
|
-
initialValues: ["universal"]
|
|
33321
|
-
};
|
|
33311
|
+
function buildClientOptions() {
|
|
33312
|
+
return ClientTypeSchema.options.map((c) => ({
|
|
33313
|
+
value: c,
|
|
33314
|
+
label: c,
|
|
33315
|
+
hint: CLIENT_MAPPINGS[c].skillsPath
|
|
33316
|
+
}));
|
|
33322
33317
|
}
|
|
33323
33318
|
function isInteractive() {
|
|
33324
33319
|
if (ue())
|
|
@@ -33329,11 +33324,11 @@ async function promptForClients() {
|
|
|
33329
33324
|
if (!isInteractive()) {
|
|
33330
33325
|
return ["universal"];
|
|
33331
33326
|
}
|
|
33332
|
-
const
|
|
33333
|
-
const selected = await
|
|
33327
|
+
const options2 = buildClientOptions();
|
|
33328
|
+
const selected = await autocompleteMultiselect({
|
|
33334
33329
|
message: "Which AI clients do you use?",
|
|
33335
|
-
options:
|
|
33336
|
-
initialValues,
|
|
33330
|
+
options: options2,
|
|
33331
|
+
initialValues: ["universal"],
|
|
33337
33332
|
required: false
|
|
33338
33333
|
});
|
|
33339
33334
|
if (Ct(selected)) {
|
|
@@ -33344,12 +33339,12 @@ async function promptForClients() {
|
|
|
33344
33339
|
}
|
|
33345
33340
|
return selected;
|
|
33346
33341
|
}
|
|
33347
|
-
var
|
|
33342
|
+
var autocompleteMultiselect;
|
|
33348
33343
|
var init_prompt_clients = __esm(() => {
|
|
33349
33344
|
init_dist2();
|
|
33350
33345
|
init_workspace_config();
|
|
33351
33346
|
init_client_mapping();
|
|
33352
|
-
({
|
|
33347
|
+
({ autocompleteMultiselect } = exports_dist);
|
|
33353
33348
|
});
|
|
33354
33349
|
|
|
33355
33350
|
// src/core/skills.ts
|
|
@@ -34003,7 +33998,7 @@ var package_default;
|
|
|
34003
33998
|
var init_package = __esm(() => {
|
|
34004
33999
|
package_default = {
|
|
34005
34000
|
name: "allagents",
|
|
34006
|
-
version: "1.
|
|
34001
|
+
version: "1.4.0",
|
|
34007
34002
|
description: "CLI tool for managing multi-repo AI agent workspaces with plugin synchronization",
|
|
34008
34003
|
type: "module",
|
|
34009
34004
|
bin: {
|
|
@@ -34284,27 +34279,44 @@ var init_context = __esm(() => {
|
|
|
34284
34279
|
async function runSync(context) {
|
|
34285
34280
|
try {
|
|
34286
34281
|
const s = Ie();
|
|
34282
|
+
let projectLines;
|
|
34287
34283
|
if (context.hasWorkspace && context.workspacePath) {
|
|
34288
34284
|
s.start("Syncing project plugins...");
|
|
34289
34285
|
const result = await syncWorkspace(context.workspacePath);
|
|
34290
|
-
s.stop("Project sync complete");
|
|
34291
34286
|
if (result.error) {
|
|
34287
|
+
if (context.userPluginCount > 0) {
|
|
34288
|
+
s.message("Syncing user plugins...");
|
|
34289
|
+
} else {
|
|
34290
|
+
s.stop("Sync failed");
|
|
34291
|
+
}
|
|
34292
34292
|
kt2(result.error, "Sync Error");
|
|
34293
34293
|
} else {
|
|
34294
|
-
|
|
34295
|
-
|
|
34296
|
-
|
|
34294
|
+
projectLines = result.pluginResults.map((pr) => formatPluginHeader(pr));
|
|
34295
|
+
projectLines.push("");
|
|
34296
|
+
projectLines.push(...formatSyncSummary(result));
|
|
34297
34297
|
if (result.nativeResult) {
|
|
34298
|
-
|
|
34298
|
+
projectLines.push(...formatNativeResult(result.nativeResult));
|
|
34299
34299
|
}
|
|
34300
|
-
|
|
34300
|
+
if (context.userPluginCount > 0) {
|
|
34301
|
+
s.message("Syncing user plugins...");
|
|
34302
|
+
} else {
|
|
34303
|
+
s.stop("Sync complete");
|
|
34304
|
+
kt2(projectLines.join(`
|
|
34301
34305
|
`), "Project Sync");
|
|
34306
|
+
return;
|
|
34307
|
+
}
|
|
34302
34308
|
}
|
|
34303
34309
|
}
|
|
34304
34310
|
if (context.userPluginCount > 0) {
|
|
34305
|
-
|
|
34311
|
+
if (!context.hasWorkspace || !context.workspacePath) {
|
|
34312
|
+
s.start("Syncing user plugins...");
|
|
34313
|
+
}
|
|
34306
34314
|
const userResult = await syncUserWorkspace();
|
|
34307
|
-
s.stop("
|
|
34315
|
+
s.stop("Sync complete");
|
|
34316
|
+
if (projectLines) {
|
|
34317
|
+
kt2(projectLines.join(`
|
|
34318
|
+
`), "Project Sync");
|
|
34319
|
+
}
|
|
34308
34320
|
if (userResult.error) {
|
|
34309
34321
|
kt2(userResult.error, "User Sync Error");
|
|
34310
34322
|
} else {
|
|
@@ -34450,11 +34462,9 @@ async function installSelectedPlugin(pluginRef, context, cache2) {
|
|
|
34450
34462
|
kt2(result.error ?? "Unknown error", "Error");
|
|
34451
34463
|
return false;
|
|
34452
34464
|
}
|
|
34453
|
-
s.
|
|
34454
|
-
const syncS = Ie();
|
|
34455
|
-
syncS.start("Syncing...");
|
|
34465
|
+
s.message("Syncing...");
|
|
34456
34466
|
await syncWorkspace(workspacePath);
|
|
34457
|
-
|
|
34467
|
+
s.stop("Installed and synced");
|
|
34458
34468
|
} else {
|
|
34459
34469
|
const result = await addUserPlugin(pluginRef);
|
|
34460
34470
|
if (!result.success) {
|
|
@@ -34462,11 +34472,9 @@ async function installSelectedPlugin(pluginRef, context, cache2) {
|
|
|
34462
34472
|
kt2(result.error ?? "Unknown error", "Error");
|
|
34463
34473
|
return false;
|
|
34464
34474
|
}
|
|
34465
|
-
s.
|
|
34466
|
-
const syncS = Ie();
|
|
34467
|
-
syncS.start("Syncing...");
|
|
34475
|
+
s.message("Syncing...");
|
|
34468
34476
|
await syncUserWorkspace();
|
|
34469
|
-
|
|
34477
|
+
s.stop("Installed and synced");
|
|
34470
34478
|
}
|
|
34471
34479
|
cache2?.invalidate();
|
|
34472
34480
|
kt2(`Installed: ${pluginRef}`, "Success");
|
|
@@ -34481,20 +34489,20 @@ async function runUpdatePlugin(pluginSource, scope, context, cache2) {
|
|
|
34481
34489
|
kt2(result.error ?? "Unknown error", "Error");
|
|
34482
34490
|
return;
|
|
34483
34491
|
}
|
|
34484
|
-
|
|
34485
|
-
|
|
34486
|
-
|
|
34487
|
-
|
|
34488
|
-
if (scope === "project" && context.workspacePath) {
|
|
34489
|
-
await syncWorkspace(context.workspacePath);
|
|
34490
|
-
} else {
|
|
34491
|
-
await syncUserWorkspace();
|
|
34492
|
-
}
|
|
34493
|
-
syncS.stop("Sync complete");
|
|
34494
|
-
cache2?.invalidate();
|
|
34492
|
+
if (result.action !== "updated") {
|
|
34493
|
+
s.stop("Already up to date");
|
|
34494
|
+
kt2(`- ${pluginSource} (${result.action})`, "Update");
|
|
34495
|
+
return;
|
|
34495
34496
|
}
|
|
34496
|
-
|
|
34497
|
-
|
|
34497
|
+
s.message("Syncing...");
|
|
34498
|
+
if (scope === "project" && context.workspacePath) {
|
|
34499
|
+
await syncWorkspace(context.workspacePath);
|
|
34500
|
+
} else {
|
|
34501
|
+
await syncUserWorkspace();
|
|
34502
|
+
}
|
|
34503
|
+
s.stop("Updated and synced");
|
|
34504
|
+
cache2?.invalidate();
|
|
34505
|
+
kt2(`✓ ${pluginSource} (${result.action})`, "Update");
|
|
34498
34506
|
}
|
|
34499
34507
|
async function runUpdateAllPlugins(context, cache2) {
|
|
34500
34508
|
const s = Ie();
|
|
@@ -34516,10 +34524,8 @@ async function runUpdateAllPlugins(context, cache2) {
|
|
|
34516
34524
|
s.stop("No plugins to update");
|
|
34517
34525
|
return;
|
|
34518
34526
|
}
|
|
34519
|
-
s.
|
|
34527
|
+
s.message(`Updating ${pluginsToUpdate.length} plugin(s)...`);
|
|
34520
34528
|
const deps = createUpdateDeps();
|
|
34521
|
-
const updateS = Ie();
|
|
34522
|
-
updateS.start("Updating plugins...");
|
|
34523
34529
|
const results = [];
|
|
34524
34530
|
let needsProjectSync = false;
|
|
34525
34531
|
let needsUserSync = false;
|
|
@@ -34540,22 +34546,17 @@ async function runUpdateAllPlugins(context, cache2) {
|
|
|
34540
34546
|
needsUserSync = true;
|
|
34541
34547
|
}
|
|
34542
34548
|
}
|
|
34543
|
-
updateS.stop("Update complete");
|
|
34544
|
-
if (needsProjectSync && context.workspacePath) {
|
|
34545
|
-
const syncS = Ie();
|
|
34546
|
-
syncS.start("Syncing project...");
|
|
34547
|
-
await syncWorkspace(context.workspacePath);
|
|
34548
|
-
syncS.stop("Project sync complete");
|
|
34549
|
-
}
|
|
34550
|
-
if (needsUserSync) {
|
|
34551
|
-
const syncS = Ie();
|
|
34552
|
-
syncS.start("Syncing user...");
|
|
34553
|
-
await syncUserWorkspace();
|
|
34554
|
-
syncS.stop("User sync complete");
|
|
34555
|
-
}
|
|
34556
34549
|
if (needsProjectSync || needsUserSync) {
|
|
34550
|
+
s.message("Syncing...");
|
|
34551
|
+
if (needsProjectSync && context.workspacePath) {
|
|
34552
|
+
await syncWorkspace(context.workspacePath);
|
|
34553
|
+
}
|
|
34554
|
+
if (needsUserSync) {
|
|
34555
|
+
await syncUserWorkspace();
|
|
34556
|
+
}
|
|
34557
34557
|
cache2?.invalidate();
|
|
34558
34558
|
}
|
|
34559
|
+
s.stop("Update complete");
|
|
34559
34560
|
const updated = results.filter((r) => r.action === "updated").length;
|
|
34560
34561
|
const skipped = results.filter((r) => r.action === "skipped").length;
|
|
34561
34562
|
const failed = results.filter((r) => r.action === "failed").length;
|
|
@@ -34587,15 +34588,17 @@ async function runPlugins(context, cache2) {
|
|
|
34587
34588
|
for (const plugin of status.plugins) {
|
|
34588
34589
|
const key = `project:${plugin.source}`;
|
|
34589
34590
|
options2.push({
|
|
34590
|
-
label:
|
|
34591
|
-
value: key
|
|
34591
|
+
label: plugin.source,
|
|
34592
|
+
value: key,
|
|
34593
|
+
hint: `${plugin.type} · project`
|
|
34592
34594
|
});
|
|
34593
34595
|
}
|
|
34594
34596
|
for (const plugin of status.userPlugins ?? []) {
|
|
34595
34597
|
const key = `user:${plugin.source}`;
|
|
34596
34598
|
options2.push({
|
|
34597
|
-
label:
|
|
34598
|
-
value: key
|
|
34599
|
+
label: plugin.source,
|
|
34600
|
+
value: key,
|
|
34601
|
+
hint: `${plugin.type} · user`
|
|
34599
34602
|
});
|
|
34600
34603
|
}
|
|
34601
34604
|
}
|
|
@@ -34686,15 +34689,13 @@ async function runPluginDetail(pluginKey, context, cache2) {
|
|
|
34686
34689
|
continue;
|
|
34687
34690
|
}
|
|
34688
34691
|
}
|
|
34689
|
-
s.
|
|
34690
|
-
const syncS = Ie();
|
|
34691
|
-
syncS.start("Syncing...");
|
|
34692
|
+
s.message("Syncing...");
|
|
34692
34693
|
if (scope === "project" && context.workspacePath) {
|
|
34693
34694
|
await syncWorkspace(context.workspacePath);
|
|
34694
34695
|
} else {
|
|
34695
34696
|
await syncUserWorkspace();
|
|
34696
34697
|
}
|
|
34697
|
-
|
|
34698
|
+
s.stop("Mode updated and synced");
|
|
34698
34699
|
cache2?.invalidate();
|
|
34699
34700
|
const newMode = currentMode === "allowlist" ? "ON" : "OFF";
|
|
34700
34701
|
kt2(`Auto-enable new skills: ${newMode}`, "Updated");
|
|
@@ -34720,11 +34721,9 @@ async function runPluginDetail(pluginKey, context, cache2) {
|
|
|
34720
34721
|
kt2(result.error ?? "Unknown error", "Error");
|
|
34721
34722
|
continue;
|
|
34722
34723
|
}
|
|
34723
|
-
s.
|
|
34724
|
-
const syncS = Ie();
|
|
34725
|
-
syncS.start("Syncing...");
|
|
34724
|
+
s.message("Syncing...");
|
|
34726
34725
|
await syncWorkspace(context.workspacePath);
|
|
34727
|
-
|
|
34726
|
+
s.stop("Removed and synced");
|
|
34728
34727
|
} else {
|
|
34729
34728
|
const result = await removeUserPlugin(pluginSource);
|
|
34730
34729
|
if (!result.success) {
|
|
@@ -34732,11 +34731,9 @@ async function runPluginDetail(pluginKey, context, cache2) {
|
|
|
34732
34731
|
kt2(result.error ?? "Unknown error", "Error");
|
|
34733
34732
|
continue;
|
|
34734
34733
|
}
|
|
34735
|
-
s.
|
|
34736
|
-
const syncS = Ie();
|
|
34737
|
-
syncS.start("Syncing...");
|
|
34734
|
+
s.message("Syncing...");
|
|
34738
34735
|
await syncUserWorkspace();
|
|
34739
|
-
|
|
34736
|
+
s.stop("Removed and synced");
|
|
34740
34737
|
}
|
|
34741
34738
|
cache2?.invalidate();
|
|
34742
34739
|
kt2(`Removed: ${pluginSource} [${scope}]`, "Success");
|
|
@@ -34808,15 +34805,13 @@ async function runBrowsePluginSkills(pluginSource, scope, context, cache2) {
|
|
|
34808
34805
|
}
|
|
34809
34806
|
}
|
|
34810
34807
|
}
|
|
34811
|
-
s.
|
|
34812
|
-
const syncS = Ie();
|
|
34813
|
-
syncS.start("Syncing...");
|
|
34808
|
+
s.message("Syncing...");
|
|
34814
34809
|
if (scope === "project" && context.workspacePath) {
|
|
34815
34810
|
await syncWorkspace(context.workspacePath);
|
|
34816
34811
|
} else if (scope === "user") {
|
|
34817
34812
|
await syncUserWorkspace();
|
|
34818
34813
|
}
|
|
34819
|
-
|
|
34814
|
+
s.stop("Skills updated and synced");
|
|
34820
34815
|
cache2?.invalidate();
|
|
34821
34816
|
const changes = [];
|
|
34822
34817
|
for (const skill of toEnable) {
|
|
@@ -34832,6 +34827,12 @@ async function runBrowsePluginSkills(pluginSource, scope, context, cache2) {
|
|
|
34832
34827
|
kt2(message, "Error");
|
|
34833
34828
|
}
|
|
34834
34829
|
}
|
|
34830
|
+
function truncateList(items, maxVisible = 3) {
|
|
34831
|
+
if (items.length <= maxVisible) {
|
|
34832
|
+
return items.join(", ");
|
|
34833
|
+
}
|
|
34834
|
+
return `${items.slice(0, maxVisible).join(", ")} +${items.length - maxVisible} more`;
|
|
34835
|
+
}
|
|
34835
34836
|
async function runInstallPlugin(context, cache2) {
|
|
34836
34837
|
try {
|
|
34837
34838
|
const marketplaces = await getCachedMarketplaces(cache2);
|
|
@@ -34846,12 +34847,14 @@ Use "Manage marketplaces" to add one first.`, "Marketplace");
|
|
|
34846
34847
|
for (const plugin of result.plugins) {
|
|
34847
34848
|
const skillNames = await discoverSkillNames(plugin.path);
|
|
34848
34849
|
const desc = plugin.description ? ` - ${plugin.description}` : "";
|
|
34849
|
-
const
|
|
34850
|
-
|
|
34851
|
-
allPlugins.push({
|
|
34852
|
-
label: `${plugin.name}${desc} (${marketplace.name})${skillInfo}`,
|
|
34850
|
+
const entry = {
|
|
34851
|
+
label: `${plugin.name}${desc} (${marketplace.name})`,
|
|
34853
34852
|
value: `${plugin.name}@${marketplace.name}`
|
|
34854
|
-
}
|
|
34853
|
+
};
|
|
34854
|
+
if (skillNames.length > 0) {
|
|
34855
|
+
entry.hint = `${skillNames.length} skills: ${truncateList(skillNames)}`;
|
|
34856
|
+
}
|
|
34857
|
+
allPlugins.push(entry);
|
|
34855
34858
|
}
|
|
34856
34859
|
}
|
|
34857
34860
|
if (allPlugins.length === 0) {
|
|
@@ -34859,9 +34862,10 @@ Use "Manage marketplaces" to add one first.`, "Marketplace");
|
|
|
34859
34862
|
return;
|
|
34860
34863
|
}
|
|
34861
34864
|
allPlugins.push({ label: "Back", value: "__back__" });
|
|
34862
|
-
const selected = await
|
|
34865
|
+
const selected = await autocomplete({
|
|
34863
34866
|
message: "Select a plugin to install",
|
|
34864
|
-
options: allPlugins
|
|
34867
|
+
options: allPlugins,
|
|
34868
|
+
placeholder: "Type to search..."
|
|
34865
34869
|
});
|
|
34866
34870
|
if (Ct(selected) || selected === "__back__") {
|
|
34867
34871
|
return;
|
|
@@ -34943,9 +34947,10 @@ async function runMarketplaceDetail(marketplaceName, context, cache2) {
|
|
|
34943
34947
|
return { label, value: plugin.name };
|
|
34944
34948
|
});
|
|
34945
34949
|
pluginOptions.push({ label: "Back", value: "__back__" });
|
|
34946
|
-
const selectedPlugin = await
|
|
34950
|
+
const selectedPlugin = await autocomplete({
|
|
34947
34951
|
message: "Select a plugin to install",
|
|
34948
|
-
options: pluginOptions
|
|
34952
|
+
options: pluginOptions,
|
|
34953
|
+
placeholder: "Type to search..."
|
|
34949
34954
|
});
|
|
34950
34955
|
if (Ct(selectedPlugin) || selectedPlugin === "__back__") {
|
|
34951
34956
|
continue;
|
|
@@ -35018,7 +35023,7 @@ What would you like to do with them?`,
|
|
|
35018
35023
|
}
|
|
35019
35024
|
}
|
|
35020
35025
|
}
|
|
35021
|
-
var select, text2, confirm, multiselect;
|
|
35026
|
+
var select, text2, confirm, multiselect, autocomplete;
|
|
35022
35027
|
var init_plugins = __esm(() => {
|
|
35023
35028
|
init_dist2();
|
|
35024
35029
|
init_workspace_modify();
|
|
@@ -35030,7 +35035,7 @@ var init_plugins = __esm(() => {
|
|
|
35030
35035
|
init_status2();
|
|
35031
35036
|
init_skills();
|
|
35032
35037
|
init_constants();
|
|
35033
|
-
({ select, text: text2, confirm, multiselect } = exports_dist);
|
|
35038
|
+
({ select, text: text2, confirm, multiselect, autocomplete } = exports_dist);
|
|
35034
35039
|
});
|
|
35035
35040
|
|
|
35036
35041
|
// src/cli/tui/actions/status.ts
|
|
@@ -35146,10 +35151,10 @@ async function runManageClients(context, cache2) {
|
|
|
35146
35151
|
currentClients = userConfig?.clients ? getClientTypes(userConfig.clients) : [];
|
|
35147
35152
|
}
|
|
35148
35153
|
const allClients = ClientTypeSchema.options;
|
|
35149
|
-
const
|
|
35150
|
-
const selectedClients = await
|
|
35154
|
+
const options2 = buildClientOptions();
|
|
35155
|
+
const selectedClients = await autocompleteMultiselect2({
|
|
35151
35156
|
message: `Select AI clients [${scope}]`,
|
|
35152
|
-
options:
|
|
35157
|
+
options: options2,
|
|
35153
35158
|
initialValues: currentClients.filter((c) => allClients.includes(c)),
|
|
35154
35159
|
required: false
|
|
35155
35160
|
});
|
|
@@ -35190,7 +35195,7 @@ async function runManageClients(context, cache2) {
|
|
|
35190
35195
|
kt2(message, "Error");
|
|
35191
35196
|
}
|
|
35192
35197
|
}
|
|
35193
|
-
var select3;
|
|
35198
|
+
var select3, autocompleteMultiselect2;
|
|
35194
35199
|
var init_clients = __esm(() => {
|
|
35195
35200
|
init_dist2();
|
|
35196
35201
|
init_workspace_config();
|
|
@@ -35199,7 +35204,7 @@ var init_clients = __esm(() => {
|
|
|
35199
35204
|
init_sync();
|
|
35200
35205
|
init_status2();
|
|
35201
35206
|
init_prompt_clients();
|
|
35202
|
-
({ select: select3 } = exports_dist);
|
|
35207
|
+
({ select: select3, autocompleteMultiselect: autocompleteMultiselect2 } = exports_dist);
|
|
35203
35208
|
});
|
|
35204
35209
|
|
|
35205
35210
|
// src/cli/tui/actions/skills.ts
|
|
@@ -35296,8 +35301,9 @@ async function runSkills(context, cache2) {
|
|
|
35296
35301
|
}
|
|
35297
35302
|
async function runToggleSkills(skills, context, cache2) {
|
|
35298
35303
|
const options2 = skills.map((s2) => ({
|
|
35299
|
-
label:
|
|
35300
|
-
value: s2.key
|
|
35304
|
+
label: s2.name,
|
|
35305
|
+
value: s2.key,
|
|
35306
|
+
hint: `${s2.pluginName} · ${s2.scope}`
|
|
35301
35307
|
}));
|
|
35302
35308
|
const initialValues = skills.filter((s2) => !s2.disabled).map((s2) => s2.key);
|
|
35303
35309
|
const selected = await multiselect2({
|
|
@@ -35358,16 +35364,14 @@ async function runToggleSkills(skills, context, cache2) {
|
|
|
35358
35364
|
else
|
|
35359
35365
|
changedProject = true;
|
|
35360
35366
|
}
|
|
35361
|
-
s.
|
|
35362
|
-
const syncS = Ie();
|
|
35363
|
-
syncS.start("Syncing...");
|
|
35367
|
+
s.message("Syncing...");
|
|
35364
35368
|
if (changedProject && context.workspacePath) {
|
|
35365
35369
|
await syncWorkspace(context.workspacePath);
|
|
35366
35370
|
}
|
|
35367
35371
|
if (changedUser) {
|
|
35368
35372
|
await syncUserWorkspace();
|
|
35369
35373
|
}
|
|
35370
|
-
|
|
35374
|
+
s.stop("Skills updated and synced");
|
|
35371
35375
|
cache2?.invalidate();
|
|
35372
35376
|
const changes = [];
|
|
35373
35377
|
for (const skill of toEnable) {
|
|
@@ -35379,6 +35383,12 @@ async function runToggleSkills(skills, context, cache2) {
|
|
|
35379
35383
|
kt2(changes.join(`
|
|
35380
35384
|
`), "Updated");
|
|
35381
35385
|
}
|
|
35386
|
+
function truncateList2(items, maxVisible = 3) {
|
|
35387
|
+
if (items.length <= maxVisible) {
|
|
35388
|
+
return items.join(", ");
|
|
35389
|
+
}
|
|
35390
|
+
return `${items.slice(0, maxVisible).join(", ")} +${items.length - maxVisible} more`;
|
|
35391
|
+
}
|
|
35382
35392
|
async function runBrowseMarketplaceSkills(context, cache2) {
|
|
35383
35393
|
const s = Ie();
|
|
35384
35394
|
s.start("Loading marketplace skills...");
|
|
@@ -35406,18 +35416,18 @@ Use "Manage marketplaces" to add one first.`, "Skills");
|
|
|
35406
35416
|
}
|
|
35407
35417
|
const options2 = [];
|
|
35408
35418
|
for (const [pluginRef, data] of byPlugin) {
|
|
35409
|
-
const skillList = data.skills.join(", ");
|
|
35410
35419
|
const desc = data.description ? ` - ${data.description}` : "";
|
|
35411
35420
|
options2.push({
|
|
35412
|
-
label: `${pluginRef}${desc}
|
|
35413
|
-
|
|
35414
|
-
|
|
35421
|
+
label: `${pluginRef}${desc}`,
|
|
35422
|
+
value: pluginRef,
|
|
35423
|
+
hint: `${data.skills.length} skills: ${truncateList2(data.skills)}`
|
|
35415
35424
|
});
|
|
35416
35425
|
}
|
|
35417
35426
|
options2.push({ label: "Back", value: "__back__" });
|
|
35418
|
-
const selected = await
|
|
35427
|
+
const selected = await autocomplete2({
|
|
35419
35428
|
message: "Select a plugin",
|
|
35420
|
-
options: options2
|
|
35429
|
+
options: options2,
|
|
35430
|
+
placeholder: "Type to search..."
|
|
35421
35431
|
});
|
|
35422
35432
|
if (Ct(selected) || selected === "__back__") {
|
|
35423
35433
|
return;
|
|
@@ -35437,7 +35447,7 @@ Use "Manage marketplaces" to add one first.`, "Skills");
|
|
|
35437
35447
|
await runBrowsePluginSkills(selected, scope, context, cache2);
|
|
35438
35448
|
}
|
|
35439
35449
|
}
|
|
35440
|
-
var multiselect2, select4;
|
|
35450
|
+
var multiselect2, select4, autocomplete2;
|
|
35441
35451
|
var init_skills2 = __esm(() => {
|
|
35442
35452
|
init_dist2();
|
|
35443
35453
|
init_skills();
|
|
@@ -35447,7 +35457,7 @@ var init_skills2 = __esm(() => {
|
|
|
35447
35457
|
init_marketplace();
|
|
35448
35458
|
init_constants();
|
|
35449
35459
|
init_plugins();
|
|
35450
|
-
({ multiselect: multiselect2, select: select4 } = exports_dist);
|
|
35460
|
+
({ multiselect: multiselect2, select: select4, autocomplete: autocomplete2 } = exports_dist);
|
|
35451
35461
|
});
|
|
35452
35462
|
|
|
35453
35463
|
// src/cli/tui/wizard.ts
|
|
@@ -35470,6 +35480,18 @@ function buildMenuOptions(context) {
|
|
|
35470
35480
|
options2.push({ label: "Exit", value: "exit" });
|
|
35471
35481
|
return options2;
|
|
35472
35482
|
}
|
|
35483
|
+
function buildCompactSummary(context) {
|
|
35484
|
+
const parts = [];
|
|
35485
|
+
if (context.hasWorkspace) {
|
|
35486
|
+
parts.push(`${context.projectPluginCount} project`);
|
|
35487
|
+
}
|
|
35488
|
+
parts.push(`${context.userPluginCount} user`);
|
|
35489
|
+
parts.push(`${context.marketplaceCount} marketplaces`);
|
|
35490
|
+
if (context.needsSync) {
|
|
35491
|
+
parts.push(source_default.yellow("sync needed"));
|
|
35492
|
+
}
|
|
35493
|
+
return parts.join(", ");
|
|
35494
|
+
}
|
|
35473
35495
|
function buildSummary(context) {
|
|
35474
35496
|
const lines = [];
|
|
35475
35497
|
if (context.hasWorkspace && context.workspacePath) {
|
|
@@ -35497,8 +35519,14 @@ async function runWizard() {
|
|
|
35497
35519
|
}
|
|
35498
35520
|
const cache2 = new TuiCache;
|
|
35499
35521
|
let context = await getTuiContext(process.cwd(), cache2);
|
|
35522
|
+
let isFirstLoop = true;
|
|
35500
35523
|
while (true) {
|
|
35501
|
-
|
|
35524
|
+
if (isFirstLoop) {
|
|
35525
|
+
kt2(buildSummary(context), "Workspace");
|
|
35526
|
+
isFirstLoop = false;
|
|
35527
|
+
} else {
|
|
35528
|
+
R2.info(source_default.dim(`Workspace: ${buildCompactSummary(context)}`));
|
|
35529
|
+
}
|
|
35502
35530
|
const action = await select5({
|
|
35503
35531
|
message: "What would you like to do?",
|
|
35504
35532
|
options: buildMenuOptions(context)
|