allagents 0.32.1 → 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.
- package/dist/index.js +54 -27
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -22498,7 +22498,6 @@ var init_marketplace_manifest_parser = __esm(() => {
|
|
|
22498
22498
|
var exports_user_workspace = {};
|
|
22499
22499
|
__export(exports_user_workspace, {
|
|
22500
22500
|
setUserClients: () => setUserClients,
|
|
22501
|
-
resolveGitHubIdentity: () => resolveGitHubIdentity,
|
|
22502
22501
|
removeUserPluginsForMarketplace: () => removeUserPluginsForMarketplace,
|
|
22503
22502
|
removeUserPlugin: () => removeUserPlugin,
|
|
22504
22503
|
removeUserEnabledSkill: () => removeUserEnabledSkill,
|
|
@@ -22669,29 +22668,6 @@ async function removeUserPluginsForMarketplace(marketplaceName) {
|
|
|
22669
22668
|
await writeFile2(configPath, dump(config, { lineWidth: -1 }), "utf-8");
|
|
22670
22669
|
return matching.map((entry) => getPluginSource(entry));
|
|
22671
22670
|
}
|
|
22672
|
-
async function resolveGitHubIdentity(pluginSource) {
|
|
22673
|
-
if (isGitHubUrl(pluginSource)) {
|
|
22674
|
-
const parsed = parseGitHubUrl(pluginSource);
|
|
22675
|
-
return parsed ? `${parsed.owner}/${parsed.repo}`.toLowerCase() : null;
|
|
22676
|
-
}
|
|
22677
|
-
if (isPluginSpec(pluginSource)) {
|
|
22678
|
-
const parsed = parsePluginSpec(pluginSource);
|
|
22679
|
-
if (!parsed)
|
|
22680
|
-
return null;
|
|
22681
|
-
const marketplace = await getMarketplace(parsed.marketplaceName);
|
|
22682
|
-
if (!marketplace)
|
|
22683
|
-
return null;
|
|
22684
|
-
const manifestResult = await parseMarketplaceManifest(marketplace.path);
|
|
22685
|
-
if (!manifestResult.success)
|
|
22686
|
-
return null;
|
|
22687
|
-
const entry = manifestResult.data.plugins.find((p) => p.name === parsed.plugin);
|
|
22688
|
-
if (!entry || typeof entry.source === "string")
|
|
22689
|
-
return null;
|
|
22690
|
-
const parsedUrl = parseGitHubUrl(entry.source.url);
|
|
22691
|
-
return parsedUrl ? `${parsedUrl.owner}/${parsedUrl.repo}`.toLowerCase() : null;
|
|
22692
|
-
}
|
|
22693
|
-
return null;
|
|
22694
|
-
}
|
|
22695
22671
|
async function addPluginToUserConfig(plugin, configPath, autoRegistered) {
|
|
22696
22672
|
try {
|
|
22697
22673
|
const content = await readFile4(configPath, "utf-8");
|
|
@@ -22912,7 +22888,6 @@ var init_user_workspace = __esm(() => {
|
|
|
22912
22888
|
init_js_yaml();
|
|
22913
22889
|
init_constants();
|
|
22914
22890
|
init_workspace_config();
|
|
22915
|
-
init_marketplace_manifest_parser();
|
|
22916
22891
|
init_plugin_path();
|
|
22917
22892
|
init_marketplace();
|
|
22918
22893
|
init_marketplace();
|
|
@@ -23488,7 +23463,7 @@ async function resolvePluginSpecWithAutoRegister(spec, options = {}) {
|
|
|
23488
23463
|
Expected at: ${join9(marketplace.path, expectedSubpath, pluginName)}`
|
|
23489
23464
|
};
|
|
23490
23465
|
}
|
|
23491
|
-
const shouldReturnRegisteredAs = didAutoRegister || marketplace.name !== marketplaceName;
|
|
23466
|
+
const shouldReturnRegisteredAs = didAutoRegister || marketplace.name !== marketplaceName || owner != null && subpath == null;
|
|
23492
23467
|
const marketplaceSource = marketplace.source.type === "github" ? marketplace.source.location : undefined;
|
|
23493
23468
|
return {
|
|
23494
23469
|
success: true,
|
|
@@ -23670,6 +23645,19 @@ async function addPluginToConfig(plugin, configPath, autoRegistered) {
|
|
|
23670
23645
|
error: `Plugin already exists in .allagents/workspace.yaml: ${plugin}`
|
|
23671
23646
|
};
|
|
23672
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
|
+
}
|
|
23673
23661
|
config.plugins.push(plugin);
|
|
23674
23662
|
const newContent = dump(config, { lineWidth: -1 });
|
|
23675
23663
|
await writeFile4(configPath, newContent, "utf-8");
|
|
@@ -23724,6 +23712,21 @@ async function removePlugin(plugin, workspacePath = process.cwd()) {
|
|
|
23724
23712
|
return source.startsWith(`${plugin}@`) || source === plugin;
|
|
23725
23713
|
});
|
|
23726
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
|
+
}
|
|
23727
23730
|
if (index === -1) {
|
|
23728
23731
|
return {
|
|
23729
23732
|
success: false,
|
|
@@ -23909,6 +23912,29 @@ function pruneEnabledSkillsForPlugin(config, pluginEntry) {
|
|
|
23909
23912
|
config.enabledSkills = undefined;
|
|
23910
23913
|
}
|
|
23911
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
|
+
}
|
|
23912
23938
|
async function updateRepositories(changes, workspacePath = process.cwd()) {
|
|
23913
23939
|
if (changes.remove.length === 0 && changes.add.length === 0) {
|
|
23914
23940
|
return { success: true };
|
|
@@ -23935,6 +23961,7 @@ var init_workspace_modify = __esm(() => {
|
|
|
23935
23961
|
init_constants();
|
|
23936
23962
|
init_workspace_config();
|
|
23937
23963
|
init_plugin_path();
|
|
23964
|
+
init_marketplace_manifest_parser();
|
|
23938
23965
|
init_marketplace();
|
|
23939
23966
|
DEFAULT_PROJECT_CLIENTS = ["universal"];
|
|
23940
23967
|
});
|
|
@@ -28981,7 +29008,7 @@ var package_default;
|
|
|
28981
29008
|
var init_package = __esm(() => {
|
|
28982
29009
|
package_default = {
|
|
28983
29010
|
name: "allagents",
|
|
28984
|
-
version: "0.32.
|
|
29011
|
+
version: "0.32.2",
|
|
28985
29012
|
description: "CLI tool for managing multi-repo AI agent workspaces with plugin synchronization",
|
|
28986
29013
|
type: "module",
|
|
28987
29014
|
bin: {
|