allagents 1.11.2-next.1 → 1.11.3-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 (3) hide show
  1. package/README.md +1 -0
  2. package/dist/index.js +85 -22
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -97,6 +97,7 @@ clients:
97
97
  | `allagents skill add <name>` | Add a skill from a repo (plural `skills` alias supported) |
98
98
  | `allagents skill list` | List skills and status |
99
99
  | `allagents mcp add <name> <commandOrUrl>` | Add an MCP server and sync to clients |
100
+ | `allagents mcp proxy <serverUrl>` | Bridge a remote HTTP MCP server to local stdio |
100
101
  | `allagents mcp list` | List workspace MCP servers |
101
102
  | `allagents workspace status` | Show workspace state |
102
103
  | `allagents self update` | Update AllAgents CLI |
package/dist/index.js CHANGED
@@ -29425,7 +29425,7 @@ function isHttpServer(config) {
29425
29425
  return typeof config === "object" && config !== null && "url" in config && typeof config.url === "string";
29426
29426
  }
29427
29427
  function toProxiedConfig(url, headers) {
29428
- const args = ["mcp", "proxy-stdio", url];
29428
+ const args = ["mcp", "proxy", url];
29429
29429
  if (headers) {
29430
29430
  for (const [key, value] of Object.entries(headers)) {
29431
29431
  args.push("--header", `${key}=${value}`);
@@ -34876,7 +34876,10 @@ async function searchSkills(query, options2 = {}, deps = {}) {
34876
34876
  const firstSegment = item.path.split("/")[0] ?? "";
34877
34877
  return !firstSegment.startsWith(".");
34878
34878
  });
34879
- await fetchStarsForItems(visible, token, fetchFn);
34879
+ await Promise.all([
34880
+ fetchStarsForItems(visible, token, fetchFn),
34881
+ enrichDescriptionsForItems(visible, token, fetchFn)
34882
+ ]);
34880
34883
  visible.sort((a, b) => b.stars - a.stars);
34881
34884
  const finalItems = visible.slice(0, limit);
34882
34885
  return {
@@ -34900,15 +34903,9 @@ function dedupeItems(items) {
34900
34903
  }
34901
34904
  async function fetchStarsForItems(items, token, fetchFn) {
34902
34905
  const uniqueRepos = [...new Set(items.map((i2) => i2.repo))];
34903
- const headers = {
34904
- Accept: "application/vnd.github+json",
34905
- "X-GitHub-Api-Version": "2022-11-28",
34906
- "User-Agent": "allagents-cli"
34907
- };
34908
- if (token)
34909
- headers.Authorization = `token ${token}`;
34906
+ const headers = buildGitHubApiHeaders(token);
34910
34907
  const starsMap = new Map;
34911
- await Promise.allSettled(uniqueRepos.map(async (repo) => {
34908
+ await forEachWithConcurrency(uniqueRepos, ENRICHMENT_CONCURRENCY, async (repo) => {
34912
34909
  try {
34913
34910
  const res = await fetchFn(`https://api.github.com/repos/${repo}`, { headers });
34914
34911
  if (!res.ok)
@@ -34916,15 +34913,78 @@ async function fetchStarsForItems(items, token, fetchFn) {
34916
34913
  const body = await res.json();
34917
34914
  starsMap.set(repo, body.stargazers_count ?? 0);
34918
34915
  } catch {}
34919
- }));
34916
+ });
34920
34917
  for (const item of items) {
34921
34918
  const s = starsMap.get(item.repo);
34922
34919
  if (s !== undefined)
34923
34920
  item.stars = s;
34924
34921
  }
34925
34922
  }
34926
- var OWNER_REGEX, COULD_BE_OWNER_REGEX, SkillSearchError;
34923
+ async function enrichDescriptionsForItems(items, token, fetchFn) {
34924
+ const headers = buildGitHubApiHeaders(token);
34925
+ const descriptionMap = new Map;
34926
+ const uniqueSkills = [...new Set(items.map((item) => `${item.repo}#${item.sha}`))];
34927
+ await forEachWithConcurrency(uniqueSkills, ENRICHMENT_CONCURRENCY, async (key) => {
34928
+ const [repo, sha] = key.split("#");
34929
+ if (!repo || !sha)
34930
+ return;
34931
+ try {
34932
+ const res = await fetchFn(`https://api.github.com/repos/${repo}/git/blobs/${sha}`, { headers });
34933
+ if (!res.ok)
34934
+ return;
34935
+ const body = await res.json();
34936
+ const content = decodeGitBlob(body.content, body.encoding);
34937
+ if (!content)
34938
+ return;
34939
+ const metadata = parseSkillMetadata(content);
34940
+ if (!metadata?.description)
34941
+ return;
34942
+ descriptionMap.set(key, metadata.description);
34943
+ } catch {}
34944
+ });
34945
+ for (const item of items) {
34946
+ const description = descriptionMap.get(`${item.repo}#${item.sha}`);
34947
+ if (description)
34948
+ item.description = description;
34949
+ }
34950
+ }
34951
+ async function forEachWithConcurrency(items, concurrency, worker) {
34952
+ if (items.length === 0)
34953
+ return;
34954
+ let nextIndex = 0;
34955
+ const runWorker = async () => {
34956
+ while (true) {
34957
+ const currentIndex = nextIndex++;
34958
+ if (currentIndex >= items.length)
34959
+ return;
34960
+ await worker(items[currentIndex]);
34961
+ }
34962
+ };
34963
+ const workerCount = Math.min(concurrency, items.length);
34964
+ await Promise.all(Array.from({ length: workerCount }, () => runWorker()));
34965
+ }
34966
+ function buildGitHubApiHeaders(token) {
34967
+ const headers = {
34968
+ Accept: "application/vnd.github+json",
34969
+ "X-GitHub-Api-Version": "2022-11-28",
34970
+ "User-Agent": "allagents-cli"
34971
+ };
34972
+ if (token)
34973
+ headers.Authorization = `token ${token}`;
34974
+ return headers;
34975
+ }
34976
+ function decodeGitBlob(content, encoding) {
34977
+ if (!content)
34978
+ return;
34979
+ if (!encoding || encoding === "utf-8")
34980
+ return content;
34981
+ if (encoding !== "base64")
34982
+ return;
34983
+ return Buffer.from(content.replace(/\s+/g, ""), "base64").toString("utf8");
34984
+ }
34985
+ var OWNER_REGEX, COULD_BE_OWNER_REGEX, ENRICHMENT_CONCURRENCY = 10, SkillSearchError;
34927
34986
  var init_skill_search = __esm(() => {
34987
+ init_skill();
34928
34988
  OWNER_REGEX = /^[A-Za-z0-9-]{1,39}$/;
34929
34989
  COULD_BE_OWNER_REGEX = /^[a-zA-Z0-9]([a-zA-Z0-9-]{0,37}[a-zA-Z0-9])?$/;
34930
34990
  SkillSearchError = class SkillSearchError extends Error {
@@ -41907,7 +41967,7 @@ var package_default;
41907
41967
  var init_package = __esm(() => {
41908
41968
  package_default = {
41909
41969
  name: "allagents",
41910
- version: "1.11.2-next.1",
41970
+ version: "1.11.3-next.1",
41911
41971
  packageManager: "bun@1.3.12",
41912
41972
  description: "CLI tool for managing multi-repo AI agent workspaces with plugin synchronization",
41913
41973
  type: "module",
@@ -45790,9 +45850,12 @@ Use --plugin to specify: allagents skill add ${skill} --plugin <name>`;
45790
45850
  }
45791
45851
  }
45792
45852
  });
45853
+ function formatSkillSearchSummary(count, query, truncated) {
45854
+ return `Showing ${count} skill${count !== 1 ? "s" : ""} matching "${query}"${truncated ? " (truncated)" : ""}`;
45855
+ }
45793
45856
  function printSearchResults(items, query, truncated) {
45794
45857
  console.log(`
45795
- Showing ${items.length} result${items.length !== 1 ? "s" : ""} for "${query}"${truncated ? " (truncated)" : ""}
45858
+ ${formatSkillSearchSummary(items.length, query, truncated)}
45796
45859
  `);
45797
45860
  for (const item of items) {
45798
45861
  const repoCol = item.repo.padEnd(30);
@@ -45932,8 +45995,8 @@ var searchCmd = import_cmd_ts3.command({
45932
45995
  printSearchResults(result.items, query, result.truncated);
45933
45996
  return;
45934
45997
  }
45935
- const { autocomplete, isCancel } = await Promise.resolve().then(() => (init_dist2(), exports_dist));
45936
- printSearchResults(result.items, query, result.truncated);
45998
+ const { autocomplete, isCancel, log } = await Promise.resolve().then(() => (init_dist2(), exports_dist));
45999
+ log.success(formatSkillSearchSummary(result.items.length, query, result.truncated));
45937
46000
  const options2 = result.items.map((item) => ({
45938
46001
  label: `${qualifiedName(item)} ${source_default.dim(item.repo)}`,
45939
46002
  value: item.repo,
@@ -45941,7 +46004,7 @@ var searchCmd = import_cmd_ts3.command({
45941
46004
  }));
45942
46005
  options2.push({ label: "Cancel", value: "__cancel__", hint: "" });
45943
46006
  const selected = await autocomplete({
45944
- message: `Select a skill to install (type to filter ${result.items.length} results)`,
46007
+ message: "Select a skill to install",
45945
46008
  options: options2,
45946
46009
  placeholder: "Type to filter..."
45947
46010
  });
@@ -56220,9 +56283,9 @@ var mcpRemoveCmd = import_cmd_ts5.command({
56220
56283
  await runPostMutationSync("mcp remove", `✓ Removed MCP server '${name}' from workspace.yaml`, { name });
56221
56284
  }
56222
56285
  });
56223
- var mcpProxyStdioCmd = import_cmd_ts5.command({
56224
- name: "proxy-stdio",
56225
- description: "Internal: expose a remote HTTP MCP server as local stdio",
56286
+ var mcpProxyCmd = import_cmd_ts5.command({
56287
+ name: "proxy",
56288
+ description: "Expose a remote HTTP MCP server locally over stdio",
56226
56289
  args: {
56227
56290
  serverUrl: import_cmd_ts5.positional({ type: import_cmd_ts5.string, displayName: "serverUrl" }),
56228
56291
  header: import_cmd_ts5.multioption({
@@ -56234,7 +56297,7 @@ var mcpProxyStdioCmd = import_cmd_ts5.command({
56234
56297
  handler: async ({ serverUrl, header }) => {
56235
56298
  const headerResult = parseKeyValuePairs(header, "--header");
56236
56299
  if ("error" in headerResult) {
56237
- exitWithError("mcp proxy-stdio", headerResult.error);
56300
+ exitWithError("mcp proxy", headerResult.error);
56238
56301
  }
56239
56302
  await runHttpMcpStdioProxy(serverUrl, headerResult.values);
56240
56303
  }
@@ -56356,7 +56419,7 @@ var mcpCmd = conciseSubcommands({
56356
56419
  description: "Manage MCP servers for AI clients",
56357
56420
  cmds: {
56358
56421
  add: mcpAddCmd,
56359
- "proxy-stdio": mcpProxyStdioCmd,
56422
+ proxy: mcpProxyCmd,
56360
56423
  remove: mcpRemoveCmd,
56361
56424
  list: mcpListCmd,
56362
56425
  get: mcpGetCmd,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "allagents",
3
- "version": "1.11.2-next.1",
3
+ "version": "1.11.3-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",