allagents 1.0.3 → 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.
- package/dist/index.js +31 -26
- 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,28 +30855,19 @@ function formatSyncSummary(result, { dryRun = false, label = "Sync" } = {}) {
|
|
|
30841
30855
|
return lines;
|
|
30842
30856
|
}
|
|
30843
30857
|
function formatDeletedArtifacts(artifacts) {
|
|
30844
|
-
const
|
|
30845
|
-
|
|
30846
|
-
|
|
30847
|
-
|
|
30848
|
-
if (
|
|
30849
|
-
|
|
30850
|
-
|
|
30851
|
-
|
|
30852
|
-
|
|
30853
|
-
|
|
30854
|
-
|
|
30855
|
-
|
|
30856
|
-
|
|
30857
|
-
const key = `${a.type}:${a.name}`;
|
|
30858
|
-
if (seen.has(key))
|
|
30859
|
-
return false;
|
|
30860
|
-
seen.add(key);
|
|
30861
|
-
return true;
|
|
30862
|
-
});
|
|
30863
|
-
const names = unique.map((a) => `${a.type} '${a.name}'`).join(", ");
|
|
30864
|
-
return ` Deleted (${displayClient}): ${names}`;
|
|
30865
|
-
});
|
|
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}`];
|
|
30866
30871
|
}
|
|
30867
30872
|
function formatMcpResult(mcpResult, scope) {
|
|
30868
30873
|
const { added, overwritten, removed, skipped } = mcpResult;
|
|
@@ -33411,7 +33416,7 @@ var package_default;
|
|
|
33411
33416
|
var init_package = __esm(() => {
|
|
33412
33417
|
package_default = {
|
|
33413
33418
|
name: "allagents",
|
|
33414
|
-
version: "1.0.
|
|
33419
|
+
version: "1.0.4",
|
|
33415
33420
|
description: "CLI tool for managing multi-repo AI agent workspaces with plugin synchronization",
|
|
33416
33421
|
type: "module",
|
|
33417
33422
|
bin: {
|