allagents 1.0.2 → 1.0.4

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 +31 -18
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -29572,7 +29572,7 @@ function classifyDeletedPath(path, client, mapping) {
29572
29572
  }
29573
29573
  return null;
29574
29574
  }
29575
- function computeDeletedArtifacts(previousState, newStatePaths, clients, clientMappings) {
29575
+ function computeDeletedArtifacts(previousState, newStatePaths, clients, clientMappings, availableSkillNames) {
29576
29576
  if (!previousState)
29577
29577
  return [];
29578
29578
  const deleted = [];
@@ -29589,6 +29589,8 @@ function computeDeletedArtifacts(previousState, newStatePaths, clients, clientMa
29589
29589
  const artifact = classifyDeletedPath(path, client, mapping);
29590
29590
  if (!artifact)
29591
29591
  continue;
29592
+ if (artifact.type === "skill" && availableSkillNames?.has(artifact.name))
29593
+ continue;
29592
29594
  const key = `${client}:${artifact.type}:${artifact.name}`;
29593
29595
  if (!seen.has(key)) {
29594
29596
  seen.add(key);
@@ -29598,6 +29600,16 @@ function computeDeletedArtifacts(previousState, newStatePaths, clients, clientMa
29598
29600
  }
29599
29601
  return deleted;
29600
29602
  }
29603
+ async function collectAvailableSkillNames(validPlugins) {
29604
+ const names = new Set;
29605
+ for (const plugin of validPlugins) {
29606
+ const skills = await collectPluginSkills(plugin.resolved, plugin.plugin);
29607
+ for (const skill of skills) {
29608
+ names.add(skill.folderName);
29609
+ }
29610
+ }
29611
+ return names;
29612
+ }
29601
29613
  async function validatePlugin(pluginSource, workspacePath, offline) {
29602
29614
  if (isPluginSpec(pluginSource)) {
29603
29615
  const resolved = await resolvePluginSpecWithAutoRegister(pluginSource, {
@@ -30146,10 +30158,11 @@ ${fileValidationErrors.map((e) => ` - ${e}`).join(`
30146
30158
  }
30147
30159
  const { totalCopied, totalFailed, totalSkipped, totalGenerated } = countCopyResults(pluginResults, workspaceFileResults);
30148
30160
  const hasFailures = pluginResults.some((r) => !r.success) || totalFailed > 0;
30161
+ const availableSkillNames = await collectAvailableSkillNames(validPlugins);
30149
30162
  const allCopyResultsForState = [...pluginResults.flatMap((r) => r.copyResults), ...workspaceFileResults];
30150
30163
  const resolvedMappings = resolveClientMappings(syncClients, CLIENT_MAPPINGS);
30151
30164
  const newStatePaths = collectSyncedPaths(allCopyResultsForState, workspacePath, syncClients, resolvedMappings);
30152
- const deletedArtifacts = computeDeletedArtifacts(previousState, newStatePaths, syncClients, resolvedMappings);
30165
+ const deletedArtifacts = computeDeletedArtifacts(previousState, newStatePaths, syncClients, resolvedMappings, availableSkillNames);
30153
30166
  const { pluginsByClient: nativePluginsByClient } = collectNativePluginSources(validPlugins);
30154
30167
  if (!dryRun) {
30155
30168
  await persistSyncState(workspacePath, pluginResults, workspaceFileResults, syncClients, nativePluginsByClient, nativeResult, vscodeState ? { vscodeState } : undefined);
@@ -30235,10 +30248,11 @@ ${failedValidations.map((v) => ` - ${v.plugin}: ${v.error}`).join(`
30235
30248
  mcpResults.codex = codexMcp;
30236
30249
  }
30237
30250
  const nativeResult = await syncNativePlugins(validPlugins, previousState, "user", homeDir, dryRun, warnings, messages);
30251
+ const availableUserSkillNames = await collectAvailableSkillNames(validPlugins);
30238
30252
  const allCopyResultsForState = pluginResults.flatMap((r) => r.copyResults);
30239
30253
  const resolvedUserMappings = resolveClientMappings(syncClients, USER_CLIENT_MAPPINGS);
30240
30254
  const newStatePaths = collectSyncedPaths(allCopyResultsForState, homeDir, syncClients, resolvedUserMappings);
30241
- const deletedArtifacts = computeDeletedArtifacts(previousState, newStatePaths, syncClients, resolvedUserMappings);
30255
+ const deletedArtifacts = computeDeletedArtifacts(previousState, newStatePaths, syncClients, resolvedUserMappings, availableUserSkillNames);
30242
30256
  if (!dryRun) {
30243
30257
  const { pluginsByClient: nativePluginsByClient } = collectNativePluginSources(validPlugins);
30244
30258
  await persistSyncState(homeDir, pluginResults, [], syncClients, nativePluginsByClient, nativeResult, {
@@ -30841,20 +30855,19 @@ function formatSyncSummary(result, { dryRun = false, label = "Sync" } = {}) {
30841
30855
  return lines;
30842
30856
  }
30843
30857
  function formatDeletedArtifacts(artifacts) {
30844
- const byClient = new Map;
30845
- for (const artifact of artifacts) {
30846
- const displayName = getDisplayName(artifact.client);
30847
- let list = byClient.get(displayName);
30848
- if (!list) {
30849
- list = [];
30850
- byClient.set(displayName, list);
30851
- }
30852
- list.push(artifact);
30853
- }
30854
- return Array.from(byClient.entries()).map(([displayClient, items]) => {
30855
- const names = items.map((a) => `${a.type} '${a.name}'`).join(", ");
30856
- return ` Deleted (${displayClient}): ${names}`;
30857
- });
30858
+ const seen = new Set;
30859
+ const unique = [];
30860
+ for (const a of artifacts) {
30861
+ const key = `${a.type}:${a.name}`;
30862
+ if (seen.has(key))
30863
+ continue;
30864
+ seen.add(key);
30865
+ unique.push(a);
30866
+ }
30867
+ if (unique.length === 0)
30868
+ return [];
30869
+ const names = unique.map((a) => `${a.type} '${a.name}'`).join(", ");
30870
+ return [` Deleted: ${names}`];
30858
30871
  }
30859
30872
  function formatMcpResult(mcpResult, scope) {
30860
30873
  const { added, overwritten, removed, skipped } = mcpResult;
@@ -33403,7 +33416,7 @@ var package_default;
33403
33416
  var init_package = __esm(() => {
33404
33417
  package_default = {
33405
33418
  name: "allagents",
33406
- version: "1.0.2",
33419
+ version: "1.0.4",
33407
33420
  description: "CLI tool for managing multi-repo AI agent workspaces with plugin synchronization",
33408
33421
  type: "module",
33409
33422
  bin: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "allagents",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "description": "CLI tool for managing multi-repo AI agent workspaces with plugin synchronization",
5
5
  "type": "module",
6
6
  "bin": {