allagents 0.32.0-next.2 → 0.32.2

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 +63 -29
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -21419,7 +21419,10 @@ function resolveClientMappings(clients, baseMappings) {
21419
21419
  vscode: { ...baseMappings.copilot }
21420
21420
  };
21421
21421
  }
21422
- var CLIENT_MAPPINGS, CANONICAL_SKILLS_PATH = ".agents/skills/", USER_CLIENT_MAPPINGS;
21422
+ function getDisplayName(client) {
21423
+ return CLIENT_DISPLAY_ALIASES[client] ?? client;
21424
+ }
21425
+ var CLIENT_MAPPINGS, CANONICAL_SKILLS_PATH = ".agents/skills/", USER_CLIENT_MAPPINGS, CLIENT_DISPLAY_ALIASES;
21423
21426
  var init_client_mapping = __esm(() => {
21424
21427
  CLIENT_MAPPINGS = {
21425
21428
  claude: {
@@ -21637,6 +21640,9 @@ var init_client_mapping = __esm(() => {
21637
21640
  agentFile: "AGENTS.md"
21638
21641
  }
21639
21642
  };
21643
+ CLIENT_DISPLAY_ALIASES = {
21644
+ vscode: "copilot"
21645
+ };
21640
21646
  });
21641
21647
 
21642
21648
  // src/utils/symlink.ts
@@ -22492,7 +22498,6 @@ var init_marketplace_manifest_parser = __esm(() => {
22492
22498
  var exports_user_workspace = {};
22493
22499
  __export(exports_user_workspace, {
22494
22500
  setUserClients: () => setUserClients,
22495
- resolveGitHubIdentity: () => resolveGitHubIdentity,
22496
22501
  removeUserPluginsForMarketplace: () => removeUserPluginsForMarketplace,
22497
22502
  removeUserPlugin: () => removeUserPlugin,
22498
22503
  removeUserEnabledSkill: () => removeUserEnabledSkill,
@@ -22663,29 +22668,6 @@ async function removeUserPluginsForMarketplace(marketplaceName) {
22663
22668
  await writeFile2(configPath, dump(config, { lineWidth: -1 }), "utf-8");
22664
22669
  return matching.map((entry) => getPluginSource(entry));
22665
22670
  }
22666
- async function resolveGitHubIdentity(pluginSource) {
22667
- if (isGitHubUrl(pluginSource)) {
22668
- const parsed = parseGitHubUrl(pluginSource);
22669
- return parsed ? `${parsed.owner}/${parsed.repo}`.toLowerCase() : null;
22670
- }
22671
- if (isPluginSpec(pluginSource)) {
22672
- const parsed = parsePluginSpec(pluginSource);
22673
- if (!parsed)
22674
- return null;
22675
- const marketplace = await getMarketplace(parsed.marketplaceName);
22676
- if (!marketplace)
22677
- return null;
22678
- const manifestResult = await parseMarketplaceManifest(marketplace.path);
22679
- if (!manifestResult.success)
22680
- return null;
22681
- const entry = manifestResult.data.plugins.find((p) => p.name === parsed.plugin);
22682
- if (!entry || typeof entry.source === "string")
22683
- return null;
22684
- const parsedUrl = parseGitHubUrl(entry.source.url);
22685
- return parsedUrl ? `${parsedUrl.owner}/${parsedUrl.repo}`.toLowerCase() : null;
22686
- }
22687
- return null;
22688
- }
22689
22671
  async function addPluginToUserConfig(plugin, configPath, autoRegistered) {
22690
22672
  try {
22691
22673
  const content = await readFile4(configPath, "utf-8");
@@ -22906,7 +22888,6 @@ var init_user_workspace = __esm(() => {
22906
22888
  init_js_yaml();
22907
22889
  init_constants();
22908
22890
  init_workspace_config();
22909
- init_marketplace_manifest_parser();
22910
22891
  init_plugin_path();
22911
22892
  init_marketplace();
22912
22893
  init_marketplace();
@@ -23482,7 +23463,7 @@ async function resolvePluginSpecWithAutoRegister(spec, options = {}) {
23482
23463
  Expected at: ${join9(marketplace.path, expectedSubpath, pluginName)}`
23483
23464
  };
23484
23465
  }
23485
- const shouldReturnRegisteredAs = didAutoRegister || marketplace.name !== marketplaceName;
23466
+ const shouldReturnRegisteredAs = didAutoRegister || marketplace.name !== marketplaceName || owner != null && subpath == null;
23486
23467
  const marketplaceSource = marketplace.source.type === "github" ? marketplace.source.location : undefined;
23487
23468
  return {
23488
23469
  success: true,
@@ -23664,6 +23645,19 @@ async function addPluginToConfig(plugin, configPath, autoRegistered) {
23664
23645
  error: `Plugin already exists in .allagents/workspace.yaml: ${plugin}`
23665
23646
  };
23666
23647
  }
23648
+ const newIdentity = await resolveGitHubIdentity(plugin);
23649
+ if (newIdentity) {
23650
+ for (const existing of config.plugins) {
23651
+ const existingSource = getPluginSource(existing);
23652
+ const existingIdentity = await resolveGitHubIdentity(existingSource);
23653
+ if (existingIdentity === newIdentity) {
23654
+ return {
23655
+ success: false,
23656
+ error: `Plugin duplicates existing entry '${existingSource}': both resolve to ${newIdentity}`
23657
+ };
23658
+ }
23659
+ }
23660
+ }
23667
23661
  config.plugins.push(plugin);
23668
23662
  const newContent = dump(config, { lineWidth: -1 });
23669
23663
  await writeFile4(configPath, newContent, "utf-8");
@@ -23718,6 +23712,21 @@ async function removePlugin(plugin, workspacePath = process.cwd()) {
23718
23712
  return source.startsWith(`${plugin}@`) || source === plugin;
23719
23713
  });
23720
23714
  }
23715
+ if (index === -1) {
23716
+ const identity = await resolveGitHubIdentity(plugin);
23717
+ if (identity) {
23718
+ for (let i2 = 0;i2 < config.plugins.length; i2++) {
23719
+ const p = config.plugins[i2];
23720
+ if (!p)
23721
+ continue;
23722
+ const existing = await resolveGitHubIdentity(getPluginSource(p));
23723
+ if (existing === identity) {
23724
+ index = i2;
23725
+ break;
23726
+ }
23727
+ }
23728
+ }
23729
+ }
23721
23730
  if (index === -1) {
23722
23731
  return {
23723
23732
  success: false,
@@ -23903,6 +23912,29 @@ function pruneEnabledSkillsForPlugin(config, pluginEntry) {
23903
23912
  config.enabledSkills = undefined;
23904
23913
  }
23905
23914
  }
23915
+ async function resolveGitHubIdentity(pluginSource) {
23916
+ if (isGitHubUrl(pluginSource)) {
23917
+ const parsed = parseGitHubUrl(pluginSource);
23918
+ return parsed ? `${parsed.owner}/${parsed.repo}`.toLowerCase() : null;
23919
+ }
23920
+ if (isPluginSpec(pluginSource)) {
23921
+ const parsed = parsePluginSpec(pluginSource);
23922
+ if (!parsed)
23923
+ return null;
23924
+ const marketplace = await getMarketplace(parsed.marketplaceName);
23925
+ if (!marketplace)
23926
+ return null;
23927
+ const manifestResult = await parseMarketplaceManifest(marketplace.path);
23928
+ if (!manifestResult.success)
23929
+ return null;
23930
+ const entry = manifestResult.data.plugins.find((p) => p.name === parsed.plugin);
23931
+ if (!entry || typeof entry.source === "string")
23932
+ return null;
23933
+ const parsedUrl = parseGitHubUrl(entry.source.url);
23934
+ return parsedUrl ? `${parsedUrl.owner}/${parsedUrl.repo}`.toLowerCase() : null;
23935
+ }
23936
+ return null;
23937
+ }
23906
23938
  async function updateRepositories(changes, workspacePath = process.cwd()) {
23907
23939
  if (changes.remove.length === 0 && changes.add.length === 0) {
23908
23940
  return { success: true };
@@ -23929,6 +23961,7 @@ var init_workspace_modify = __esm(() => {
23929
23961
  init_constants();
23930
23962
  init_workspace_config();
23931
23963
  init_plugin_path();
23964
+ init_marketplace_manifest_parser();
23932
23965
  init_marketplace();
23933
23966
  DEFAULT_PROJECT_CLIENTS = ["universal"];
23934
23967
  });
@@ -26432,7 +26465,8 @@ function classifyCopyResults(copyResults) {
26432
26465
  const classification = classifyDestination(result.destination);
26433
26466
  if (!classification)
26434
26467
  continue;
26435
- const { client, artifactType } = classification;
26468
+ const { artifactType } = classification;
26469
+ const client = getDisplayName(classification.client);
26436
26470
  let counts = clientCounts.get(client);
26437
26471
  if (!counts) {
26438
26472
  counts = { skills: 0, commands: 0, agents: 0, hooks: 0 };
@@ -28974,7 +29008,7 @@ var package_default;
28974
29008
  var init_package = __esm(() => {
28975
29009
  package_default = {
28976
29010
  name: "allagents",
28977
- version: "0.32.0-next.2",
29011
+ version: "0.32.2",
28978
29012
  description: "CLI tool for managing multi-repo AI agent workspaces with plugin synchronization",
28979
29013
  type: "module",
28980
29014
  bin: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "allagents",
3
- "version": "0.32.0-next.2",
3
+ "version": "0.32.2",
4
4
  "description": "CLI tool for managing multi-repo AI agent workspaces with plugin synchronization",
5
5
  "type": "module",
6
6
  "bin": {