allagents 1.0.8 → 1.0.10

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 +28 -28
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -27808,6 +27808,16 @@ function extractPluginNames(pluginSource) {
27808
27808
  }
27809
27809
  return names;
27810
27810
  }
27811
+ if (isGitHubUrl(pluginSource)) {
27812
+ const parsed = parseGitHubUrl(pluginSource);
27813
+ if (parsed) {
27814
+ const names = [parsed.repo];
27815
+ const ownerRepo = `${parsed.owner}-${parsed.repo}`;
27816
+ if (ownerRepo !== parsed.repo)
27817
+ names.push(ownerRepo);
27818
+ return names;
27819
+ }
27820
+ }
27811
27821
  const parts = pluginSource.split(/[/\\]/).filter(Boolean);
27812
27822
  const last2 = parts[parts.length - 1];
27813
27823
  if (!last2)
@@ -33420,7 +33430,7 @@ var package_default;
33420
33430
  var init_package = __esm(() => {
33421
33431
  package_default = {
33422
33432
  name: "allagents",
33423
- version: "1.0.8",
33433
+ version: "1.0.10",
33424
33434
  description: "CLI tool for managing multi-repo AI agent workspaces with plugin synchronization",
33425
33435
  type: "module",
33426
33436
  bin: {
@@ -36364,7 +36374,7 @@ Syncing workspace...
36364
36374
  async function installSkillFromSource(opts) {
36365
36375
  const { skill, from, isUser, workspacePath } = opts;
36366
36376
  if (!isJsonMode()) {
36367
- console.log(`Skill '${skill}' not found. Installing from: ${from}...`);
36377
+ console.log(`Installing skill '${skill}' from ${from}...`);
36368
36378
  }
36369
36379
  const parsed = isGitHubUrl(from) ? parseGitHubUrl(from) : null;
36370
36380
  const fetchResult = await fetchPlugin(from, {
@@ -36381,28 +36391,22 @@ async function installSkillFromSource(opts) {
36381
36391
  }
36382
36392
  async function installSkillViaMarketplace(opts) {
36383
36393
  const { skill, from, isUser, workspacePath } = opts;
36384
- if (!isJsonMode()) {
36385
- console.log("Detected marketplace. Registering...");
36386
- }
36387
36394
  const parsed = isGitHubUrl(from) ? parseGitHubUrl(from) : null;
36388
- const scopeOptions = isUser ? undefined : { scope: "project", workspacePath };
36395
+ const sourceLocation = parsed ? `${parsed.owner}/${parsed.repo}` : undefined;
36389
36396
  let marketplaceName;
36390
- const mktResult = await addMarketplace(from, parsed?.branch ? `${parsed.repo}-${parsed.branch}` : undefined, parsed?.branch ?? undefined, undefined, scopeOptions);
36391
- if (mktResult.success) {
36392
- marketplaceName = mktResult.marketplace?.name;
36393
- } else if (mktResult.error?.includes("already exists") || mktResult.alreadyRegistered) {
36394
- const sourceLocation = parsed ? `${parsed.owner}/${parsed.repo}` : undefined;
36395
- const existing = await findMarketplace(parsed?.repo ?? from, sourceLocation, isUser ? undefined : workspacePath);
36396
- if (existing) {
36397
- marketplaceName = existing.name;
36398
- if (!isJsonMode()) {
36399
- console.log(`Marketplace '${marketplaceName}' already registered. Updating...`);
36400
- }
36401
- await updateMarketplace(marketplaceName, isUser ? undefined : workspacePath);
36397
+ const existingAnyScope = await findMarketplace(parsed?.repo ?? from, sourceLocation, isUser ? undefined : workspacePath);
36398
+ if (existingAnyScope) {
36399
+ marketplaceName = existingAnyScope.name;
36400
+ await updateMarketplace(marketplaceName, isUser ? undefined : workspacePath);
36401
+ } else {
36402
+ const scopeOptions = isUser ? undefined : { scope: "project", workspacePath };
36403
+ const mktResult = await addMarketplace(from, parsed?.branch ? `${parsed.repo}-${parsed.branch}` : undefined, parsed?.branch ?? undefined, undefined, scopeOptions);
36404
+ if (mktResult.success) {
36405
+ marketplaceName = mktResult.marketplace?.name;
36402
36406
  }
36403
36407
  }
36404
36408
  if (!marketplaceName) {
36405
- return { success: false, error: `Failed to register marketplace: ${mktResult.error ?? "Unknown error"}` };
36409
+ return { success: false, error: `Failed to register marketplace from '${from}'` };
36406
36410
  }
36407
36411
  const mktPlugins = await listMarketplacePlugins(marketplaceName, isUser ? undefined : workspacePath);
36408
36412
  if (mktPlugins.plugins.length === 0) {
@@ -36426,17 +36430,11 @@ Available skills: ${allAvailableSkills.join(", ") || "none"}`
36426
36430
  };
36427
36431
  }
36428
36432
  const pluginSpec = `${targetPluginName}@${marketplaceName}`;
36429
- if (!isJsonMode()) {
36430
- console.log(`Found skill '${skill}' in plugin '${targetPluginName}'. Installing ${pluginSpec}...`);
36431
- }
36432
36433
  const installResult = isUser ? await addUserPlugin(pluginSpec) : await addPlugin(pluginSpec, workspacePath);
36433
36434
  if (!installResult.success) {
36434
36435
  if (!installResult.error?.includes("already exists") && !installResult.error?.includes("duplicates existing")) {
36435
36436
  return { success: false, error: `Failed to install plugin '${pluginSpec}': ${installResult.error ?? "Unknown error"}` };
36436
36437
  }
36437
- if (!isJsonMode()) {
36438
- console.log(`Plugin '${pluginSpec}' already installed.`);
36439
- }
36440
36438
  }
36441
36439
  return applySkillAllowlist({ skill, pluginName: targetPluginName, isUser, workspacePath });
36442
36440
  }
@@ -36531,8 +36529,6 @@ var addCmd = import_cmd_ts3.command({
36531
36529
  try {
36532
36530
  let skill = skillArg;
36533
36531
  let from = fromArg;
36534
- const isUser = scope === "user" || !scope && resolveScope(process.cwd()) === "user";
36535
- const workspacePath = isUser ? getHomeDir() : process.cwd();
36536
36532
  const urlResolved = resolveSkillFromUrl(skill);
36537
36533
  if (urlResolved) {
36538
36534
  if (from) {
@@ -36551,6 +36547,9 @@ var addCmd = import_cmd_ts3.command({
36551
36547
  skill = urlResolved.skill;
36552
36548
  }
36553
36549
  }
36550
+ const hasFromSource = Boolean(from);
36551
+ const isUser = scope === "user" || !scope && !hasFromSource && resolveScope(process.cwd()) === "user";
36552
+ const workspacePath = isUser ? getHomeDir() : process.cwd();
36554
36553
  const matches = await findSkillByName(skill, workspacePath);
36555
36554
  if (matches.length === 0) {
36556
36555
  if (from) {
@@ -37462,7 +37461,8 @@ var pluginInstallCmd = import_cmd_ts4.command({
37462
37461
  }
37463
37462
  }
37464
37463
  const allSkills = await getAllSkillsFromPlugins(workspacePath);
37465
- const pluginSkills = allSkills.filter((s) => s.pluginSource === displayPlugin);
37464
+ const displayNames = extractPluginNames(displayPlugin);
37465
+ const pluginSkills = allSkills.filter((s) => s.pluginSource === displayPlugin || displayNames.includes(s.pluginName));
37466
37466
  if (pluginSkills.length === 0) {
37467
37467
  if (!isJsonMode()) {
37468
37468
  console.error(`Warning: No skills found in plugin ${displayPlugin}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "allagents",
3
- "version": "1.0.8",
3
+ "version": "1.0.10",
4
4
  "description": "CLI tool for managing multi-repo AI agent workspaces with plugin synchronization",
5
5
  "type": "module",
6
6
  "bin": {