allagents 1.11.3-next.1 → 1.11.4-next.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 (2) hide show
  1. package/dist/index.js +73 -44
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -41967,7 +41967,7 @@ var package_default;
41967
41967
  var init_package = __esm(() => {
41968
41968
  package_default = {
41969
41969
  name: "allagents",
41970
- version: "1.11.3-next.1",
41970
+ version: "1.11.4-next.1",
41971
41971
  packageManager: "bun@1.3.12",
41972
41972
  description: "CLI tool for managing multi-repo AI agent workspaces with plugin synchronization",
41973
41973
  type: "module",
@@ -44814,7 +44814,7 @@ var skillsRemoveMeta = {
44814
44814
  };
44815
44815
  var skillsSearchMeta = {
44816
44816
  command: "skill search",
44817
- description: "Search GitHub for skills by querying SKILL.md files via the Code Search API. Results are sorted by star count. In TTY mode, shows a filter-as-you-type picker and offers to install the selected skill.",
44817
+ description: "Search GitHub for skills by querying SKILL.md files via the Code Search API. Results are sorted by star count. In TTY mode, shows a filter-as-you-type multi-select picker and offers to install the selected skills.",
44818
44818
  whenToUse: 'To discover available skills from public GitHub repositories without leaving the CLI. Bridges "I want a skill that does X" → install.',
44819
44819
  examples: [
44820
44820
  "allagents skill search terraform",
@@ -44822,7 +44822,7 @@ var skillsSearchMeta = {
44822
44822
  "allagents skill search docs --page 2 --limit 10",
44823
44823
  "allagents --json skill search docs --limit 5"
44824
44824
  ],
44825
- expectedOutput: "Skills sorted by star count: repo, skill name, stars, description. In TTY mode, followed by a filter-as-you-type install prompt.",
44825
+ expectedOutput: "Skills sorted by star count: repo, skill name, stars, description. In TTY mode, followed by a searchable multi-select install prompt.",
44826
44826
  positionals: [
44827
44827
  { name: "query", type: "string", required: true, description: "Search query (≥2 characters)." }
44828
44828
  ],
@@ -45853,6 +45853,24 @@ Use --plugin to specify: allagents skill add ${skill} --plugin <name>`;
45853
45853
  function formatSkillSearchSummary(count, query, truncated) {
45854
45854
  return `Showing ${count} skill${count !== 1 ? "s" : ""} matching "${query}"${truncated ? " (truncated)" : ""}`;
45855
45855
  }
45856
+ function formatSkillSearchHint(item) {
45857
+ return [
45858
+ item.stars > 0 ? `★ ${item.stars}` : "",
45859
+ item.description ?? ""
45860
+ ].filter(Boolean).join(" ");
45861
+ }
45862
+ function collectSelectedSkillSearchRepos(items, selectedPaths) {
45863
+ const selectedSet = new Set(selectedPaths);
45864
+ const repos = [];
45865
+ const seenRepos = new Set;
45866
+ for (const item of items) {
45867
+ if (!selectedSet.has(item.path) || seenRepos.has(item.repo))
45868
+ continue;
45869
+ seenRepos.add(item.repo);
45870
+ repos.push(item.repo);
45871
+ }
45872
+ return repos;
45873
+ }
45856
45874
  function printSearchResults(items, query, truncated) {
45857
45875
  console.log(`
45858
45876
  ${formatSkillSearchSummary(items.length, query, truncated)}
@@ -45867,14 +45885,21 @@ ${formatSkillSearchSummary(items.length, query, truncated)}
45867
45885
  }
45868
45886
  console.log("");
45869
45887
  }
45870
- async function installFromSearch(repo) {
45888
+ async function installFromSearch(repos) {
45871
45889
  const p = await Promise.resolve().then(() => (init_dist2(), exports_dist));
45872
45890
  const workspacePath = process.cwd();
45873
- const isInstalledProject = hasProjectConfig(workspacePath) ? await hasPlugin(repo, workspacePath) : false;
45874
- const isInstalledUser = await hasUserPlugin(repo);
45875
- if (isInstalledProject || isInstalledUser) {
45876
- const scopeLabel = isInstalledUser ? "user" : "project";
45877
- p.log.info(`Plugin ${source_default.bold(repo)} is already installed (${scopeLabel} scope).`);
45891
+ const installableRepos = [];
45892
+ for (const repo of repos) {
45893
+ const isInstalledProject = hasProjectConfig(workspacePath) ? await hasPlugin(repo, workspacePath) : false;
45894
+ const isInstalledUser = await hasUserPlugin(repo);
45895
+ if (isInstalledProject || isInstalledUser) {
45896
+ const scopeLabel = isInstalledUser ? "user" : "project";
45897
+ p.log.info(`Plugin ${source_default.bold(repo)} is already installed (${scopeLabel} scope).`);
45898
+ continue;
45899
+ }
45900
+ installableRepos.push(repo);
45901
+ }
45902
+ if (installableRepos.length === 0) {
45878
45903
  return false;
45879
45904
  }
45880
45905
  const scopeChoice = await p.select({
@@ -45887,36 +45912,36 @@ async function installFromSearch(repo) {
45887
45912
  if (p.isCancel(scopeChoice))
45888
45913
  return false;
45889
45914
  const s = p.spinner();
45890
- s.start("Installing plugin...");
45915
+ s.start(`Installing ${installableRepos.length === 1 ? "plugin" : "plugins"}...`);
45891
45916
  try {
45892
- if (scopeChoice === "project") {
45893
- const result = await addPlugin(repo, workspacePath);
45917
+ const installedRepos = [];
45918
+ const failedRepos = [];
45919
+ for (const repo of installableRepos) {
45920
+ const result = scopeChoice === "project" ? await addPlugin(repo, workspacePath) : await addUserPlugin(repo);
45894
45921
  if (!result.success) {
45895
- s.stop("Installation failed");
45896
- p.log.error(result.error ?? "Unknown error");
45897
- return false;
45922
+ failedRepos.push({ repo, error: result.error ?? "Unknown error" });
45923
+ continue;
45898
45924
  }
45899
- s.message("Syncing...");
45900
- const syncResult = await syncWorkspace(workspacePath);
45901
- s.stop("Installed and synced");
45902
- const lines = formatVerboseSyncLines(syncResult);
45903
- if (lines.length > 0)
45904
- p.note(lines.join(`
45905
- `), `Installed: ${repo}`);
45906
- } else {
45907
- const result = await addUserPlugin(repo);
45908
- if (!result.success) {
45909
- s.stop("Installation failed");
45910
- p.log.error(result.error ?? "Unknown error");
45911
- return false;
45925
+ installedRepos.push(repo);
45926
+ }
45927
+ if (installedRepos.length === 0) {
45928
+ s.stop("Installation failed");
45929
+ for (const { repo, error } of failedRepos) {
45930
+ p.log.error(`${source_default.bold(repo)}: ${error}`);
45912
45931
  }
45913
- s.message("Syncing...");
45914
- const syncResult = await syncUserWorkspace();
45915
- s.stop("Installed and synced");
45916
- const lines = formatVerboseSyncLines(syncResult);
45917
- if (lines.length > 0)
45918
- p.note(lines.join(`
45919
- `), `Installed: ${repo}`);
45932
+ return false;
45933
+ }
45934
+ s.message("Syncing...");
45935
+ const syncResult = scopeChoice === "project" ? await syncWorkspace(workspacePath) : await syncUserWorkspace();
45936
+ s.stop(installedRepos.length === 1 ? "Installed and synced" : "Installed plugins and synced");
45937
+ for (const { repo, error } of failedRepos) {
45938
+ p.log.error(`${source_default.bold(repo)}: ${error}`);
45939
+ }
45940
+ const lines = formatVerboseSyncLines(syncResult);
45941
+ const noteLines = installedRepos.length > 1 ? [...installedRepos, "", ...lines] : lines;
45942
+ if (noteLines.length > 0) {
45943
+ p.note(noteLines.join(`
45944
+ `), installedRepos.length === 1 ? `Installed: ${installedRepos[0]}` : `Installed: ${installedRepos.length} plugins`);
45920
45945
  }
45921
45946
  return true;
45922
45947
  } catch (err) {
@@ -45995,23 +46020,27 @@ var searchCmd = import_cmd_ts3.command({
45995
46020
  printSearchResults(result.items, query, result.truncated);
45996
46021
  return;
45997
46022
  }
45998
- const { autocomplete, isCancel, log } = await Promise.resolve().then(() => (init_dist2(), exports_dist));
46023
+ const { autocompleteMultiselect: autocompleteMultiselect2, isCancel, log } = await Promise.resolve().then(() => (init_dist2(), exports_dist));
45999
46024
  log.success(formatSkillSearchSummary(result.items.length, query, result.truncated));
46000
46025
  const options2 = result.items.map((item) => ({
46001
46026
  label: `${qualifiedName(item)} ${source_default.dim(item.repo)}`,
46002
- value: item.repo,
46003
- hint: `${item.stars > 0 ? `★${item.stars} ` : ""}${item.description ?? ""}`
46027
+ value: item.path,
46028
+ hint: formatSkillSearchHint(item)
46004
46029
  }));
46005
- options2.push({ label: "Cancel", value: "__cancel__", hint: "" });
46006
- const selected = await autocomplete({
46007
- message: "Select a skill to install",
46030
+ const selected = await autocompleteMultiselect2({
46031
+ message: "Select skills to install",
46008
46032
  options: options2,
46009
- placeholder: "Type to filter..."
46033
+ placeholder: "Type to filter...",
46034
+ required: false
46010
46035
  });
46011
- if (isCancel(selected) || selected === "__cancel__") {
46036
+ if (isCancel(selected)) {
46037
+ return;
46038
+ }
46039
+ const reposToInstall = collectSelectedSkillSearchRepos(result.items, selected);
46040
+ if (reposToInstall.length === 0) {
46012
46041
  return;
46013
46042
  }
46014
- await installFromSearch(selected);
46043
+ await installFromSearch(reposToInstall);
46015
46044
  } catch (error) {
46016
46045
  if (error instanceof SkillSearchError) {
46017
46046
  const exitCode = error.kind === "validation" ? 2 : 1;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "allagents",
3
- "version": "1.11.3-next.1",
3
+ "version": "1.11.4-next.1",
4
4
  "packageManager": "bun@1.3.12",
5
5
  "description": "CLI tool for managing multi-repo AI agent workspaces with plugin synchronization",
6
6
  "type": "module",