allagents 1.0.6 → 1.0.8

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 (3) hide show
  1. package/README.md +19 -0
  2. package/dist/index.js +181 -40
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -214,6 +214,25 @@ allagents plugin list [marketplace]
214
214
  allagents plugin validate <path>
215
215
  ```
216
216
 
217
+ ### Skills Commands
218
+
219
+ ```bash
220
+ # Add a specific skill from a GitHub repo
221
+ allagents skills add reddit --from ReScienceLab/opc-skills
222
+
223
+ # Add a skill via GitHub URL (skill name extracted from path)
224
+ allagents skills add https://github.com/owner/repo/tree/main/skills/my-skill
225
+
226
+ # List all skills and their enabled/disabled status
227
+ allagents skills list
228
+
229
+ # Disable a skill without uninstalling its plugin
230
+ allagents skills remove brainstorming
231
+
232
+ # Re-enable a previously disabled skill
233
+ allagents skills add brainstorming
234
+ ```
235
+
217
236
  ### GitHub Overrides
218
237
 
219
238
  For **Copilot** and **VSCode**, AllAgents copies GitHub-specific files from a plugin's `.github/` folder into the workspace's `.github/` directory:
package/dist/index.js CHANGED
@@ -26013,6 +26013,7 @@ var init_marketplace_manifest = __esm(() => {
26013
26013
  homepage: exports_external.string().optional(),
26014
26014
  strict: exports_external.boolean().optional(),
26015
26015
  tags: exports_external.array(exports_external.string()).optional(),
26016
+ skills: exports_external.array(exports_external.string()).optional(),
26016
26017
  lspServers: exports_external.record(LspServerSchema).optional()
26017
26018
  });
26018
26019
  MarketplaceManifestSchema = exports_external.object({
@@ -26129,7 +26130,8 @@ function extractPluginEntry(entry, index, warnings) {
26129
26130
  source,
26130
26131
  ...typeof obj.version === "string" && { version: obj.version },
26131
26132
  ...typeof obj.category === "string" && { category: obj.category },
26132
- ...typeof obj.homepage === "string" && { homepage: obj.homepage }
26133
+ ...typeof obj.homepage === "string" && { homepage: obj.homepage },
26134
+ ...Array.isArray(obj.skills) && obj.skills.every((s) => typeof s === "string") && { skills: obj.skills }
26133
26135
  };
26134
26136
  }
26135
26137
  function resolvePluginSourcePath(source, marketplacePath) {
@@ -27227,6 +27229,8 @@ async function getMarketplacePluginsFromManifest(marketplacePath) {
27227
27229
  info.category = plugin.category;
27228
27230
  if (plugin.homepage)
27229
27231
  info.homepage = plugin.homepage;
27232
+ if (plugin.skills)
27233
+ info.skills = plugin.skills;
27230
27234
  return info;
27231
27235
  });
27232
27236
  return { plugins, warnings: result.warnings };
@@ -33416,7 +33420,7 @@ var package_default;
33416
33420
  var init_package = __esm(() => {
33417
33421
  package_default = {
33418
33422
  name: "allagents",
33419
- version: "1.0.6",
33423
+ version: "1.0.8",
33420
33424
  description: "CLI tool for managing multi-repo AI agent workspaces with plugin synchronization",
33421
33425
  type: "module",
33422
33426
  bin: {
@@ -36092,6 +36096,8 @@ init_constants();
36092
36096
  init_plugin_path();
36093
36097
  init_plugin();
36094
36098
  init_skill();
36099
+ init_marketplace();
36100
+ init_marketplace_manifest_parser();
36095
36101
  function hasProjectConfig(dir) {
36096
36102
  return existsSync19(join22(dir, CONFIG_DIR, WORKSPACE_CONFIG_FILE));
36097
36103
  }
@@ -36355,6 +36361,148 @@ Syncing workspace...
36355
36361
  }
36356
36362
  }
36357
36363
  });
36364
+ async function installSkillFromSource(opts) {
36365
+ const { skill, from, isUser, workspacePath } = opts;
36366
+ if (!isJsonMode()) {
36367
+ console.log(`Skill '${skill}' not found. Installing from: ${from}...`);
36368
+ }
36369
+ const parsed = isGitHubUrl(from) ? parseGitHubUrl(from) : null;
36370
+ const fetchResult = await fetchPlugin(from, {
36371
+ ...parsed?.branch && { branch: parsed.branch }
36372
+ });
36373
+ if (!fetchResult.success) {
36374
+ return { success: false, error: `Failed to fetch '${from}': ${fetchResult.error ?? "Unknown error"}` };
36375
+ }
36376
+ const manifestResult = await parseMarketplaceManifest(fetchResult.cachePath);
36377
+ if (manifestResult.success) {
36378
+ return installSkillViaMarketplace({ skill, from, isUser, workspacePath });
36379
+ }
36380
+ return installSkillDirect({ skill, from, isUser, workspacePath, cachePath: fetchResult.cachePath });
36381
+ }
36382
+ async function installSkillViaMarketplace(opts) {
36383
+ const { skill, from, isUser, workspacePath } = opts;
36384
+ if (!isJsonMode()) {
36385
+ console.log("Detected marketplace. Registering...");
36386
+ }
36387
+ const parsed = isGitHubUrl(from) ? parseGitHubUrl(from) : null;
36388
+ const scopeOptions = isUser ? undefined : { scope: "project", workspacePath };
36389
+ 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);
36402
+ }
36403
+ }
36404
+ if (!marketplaceName) {
36405
+ return { success: false, error: `Failed to register marketplace: ${mktResult.error ?? "Unknown error"}` };
36406
+ }
36407
+ const mktPlugins = await listMarketplacePlugins(marketplaceName, isUser ? undefined : workspacePath);
36408
+ if (mktPlugins.plugins.length === 0) {
36409
+ return { success: false, error: `No plugins found in marketplace '${marketplaceName}'.` };
36410
+ }
36411
+ let targetPluginName = null;
36412
+ const allAvailableSkills = [];
36413
+ for (const mktPlugin of mktPlugins.plugins) {
36414
+ const skillNames = mktPlugin.skills ? mktPlugin.skills.map((s) => s.split("/").pop() ?? "").filter(Boolean) : await discoverSkillNames(mktPlugin.path);
36415
+ allAvailableSkills.push(...skillNames);
36416
+ if (!targetPluginName && skillNames.includes(skill)) {
36417
+ targetPluginName = mktPlugin.name;
36418
+ }
36419
+ }
36420
+ if (!targetPluginName) {
36421
+ return {
36422
+ success: false,
36423
+ error: `Skill '${skill}' not found in marketplace '${marketplaceName}'.
36424
+
36425
+ Available skills: ${allAvailableSkills.join(", ") || "none"}`
36426
+ };
36427
+ }
36428
+ const pluginSpec = `${targetPluginName}@${marketplaceName}`;
36429
+ if (!isJsonMode()) {
36430
+ console.log(`Found skill '${skill}' in plugin '${targetPluginName}'. Installing ${pluginSpec}...`);
36431
+ }
36432
+ const installResult = isUser ? await addUserPlugin(pluginSpec) : await addPlugin(pluginSpec, workspacePath);
36433
+ if (!installResult.success) {
36434
+ if (!installResult.error?.includes("already exists") && !installResult.error?.includes("duplicates existing")) {
36435
+ return { success: false, error: `Failed to install plugin '${pluginSpec}': ${installResult.error ?? "Unknown error"}` };
36436
+ }
36437
+ if (!isJsonMode()) {
36438
+ console.log(`Plugin '${pluginSpec}' already installed.`);
36439
+ }
36440
+ }
36441
+ return applySkillAllowlist({ skill, pluginName: targetPluginName, isUser, workspacePath });
36442
+ }
36443
+ async function installSkillDirect(opts) {
36444
+ const { skill, from, isUser, workspacePath, cachePath } = opts;
36445
+ const availableSkills = await discoverSkillNames(cachePath);
36446
+ if (!availableSkills.includes(skill)) {
36447
+ return {
36448
+ success: false,
36449
+ error: `Skill '${skill}' not found in plugin '${from}'.
36450
+
36451
+ Available skills: ${availableSkills.join(", ") || "none"}
36452
+
36453
+ Tip: run \`allagents skills list\` to see all installed skills.`
36454
+ };
36455
+ }
36456
+ const installResult = isUser ? await addUserPlugin(from) : await addPlugin(from, workspacePath);
36457
+ if (!installResult.success) {
36458
+ if (!installResult.error?.includes("already exists") && !installResult.error?.includes("duplicates existing")) {
36459
+ return { success: false, error: `Failed to install plugin '${from}': ${installResult.error ?? "Unknown error"}` };
36460
+ }
36461
+ if (!isJsonMode()) {
36462
+ console.log("Plugin already installed.");
36463
+ }
36464
+ }
36465
+ const pluginName = getPluginName(cachePath);
36466
+ return applySkillAllowlist({ skill, pluginName, isUser, workspacePath });
36467
+ }
36468
+ async function applySkillAllowlist(opts) {
36469
+ const { skill, pluginName, isUser, workspacePath } = opts;
36470
+ const allSkills = await getAllSkillsFromPlugins(workspacePath);
36471
+ const pluginSkills = allSkills.filter((s) => s.pluginName === pluginName);
36472
+ const currentMode = pluginSkills[0]?.pluginSkillsMode ?? "none";
36473
+ if (currentMode === "allowlist") {
36474
+ const skillKey = `${pluginName}:${skill}`;
36475
+ const addResult = isUser ? await addUserEnabledSkill(skillKey) : await addEnabledSkill(skillKey, workspacePath);
36476
+ if (!addResult.success) {
36477
+ if (!addResult.error?.includes("already enabled")) {
36478
+ return { success: false, error: `Failed to enable skill: ${addResult.error ?? "Unknown error"}` };
36479
+ }
36480
+ }
36481
+ } else {
36482
+ const setModeResult = isUser ? await setUserPluginSkillsMode(pluginName, "allowlist", [skill]) : await setPluginSkillsMode(pluginName, "allowlist", [skill], workspacePath);
36483
+ if (!setModeResult.success) {
36484
+ return { success: false, error: `Failed to configure skill allowlist: ${setModeResult.error ?? "Unknown error"}` };
36485
+ }
36486
+ }
36487
+ if (!isJsonMode()) {
36488
+ console.log(`✓ Enabled skill: ${skill} (${pluginName})`);
36489
+ console.log(`
36490
+ Syncing workspace...
36491
+ `);
36492
+ }
36493
+ const syncResult = isUser ? await syncUserWorkspace() : await syncWorkspace(workspacePath);
36494
+ if (!syncResult.success) {
36495
+ return { success: false, error: "Sync failed" };
36496
+ }
36497
+ return {
36498
+ success: true,
36499
+ pluginName,
36500
+ syncResult: {
36501
+ copied: syncResult.totalCopied,
36502
+ failed: syncResult.totalFailed
36503
+ }
36504
+ };
36505
+ }
36358
36506
  var addCmd = import_cmd_ts3.command({
36359
36507
  name: "add",
36360
36508
  description: buildDescription(skillsAddMeta),
@@ -36403,56 +36551,49 @@ var addCmd = import_cmd_ts3.command({
36403
36551
  skill = urlResolved.skill;
36404
36552
  }
36405
36553
  }
36406
- let matches = await findSkillByName(skill, workspacePath);
36554
+ const matches = await findSkillByName(skill, workspacePath);
36407
36555
  if (matches.length === 0) {
36408
36556
  if (from) {
36409
- if (!isJsonMode()) {
36410
- console.log(`Skill '${skill}' not found. Installing plugin: ${from}...`);
36411
- }
36412
- const installResult = isUser ? await addUserPlugin(from) : await addPlugin(from, workspacePath);
36413
- if (!installResult.success) {
36414
- const error = `Failed to install plugin '${from}': ${installResult.error ?? "Unknown error"}`;
36557
+ const installFromResult = await installSkillFromSource({
36558
+ skill,
36559
+ from,
36560
+ isUser,
36561
+ workspacePath
36562
+ });
36563
+ if (!installFromResult.success) {
36415
36564
  if (isJsonMode()) {
36416
- jsonOutput({ success: false, command: "plugin skills add", error });
36565
+ jsonOutput({ success: false, command: "plugin skills add", error: installFromResult.error });
36417
36566
  process.exit(1);
36418
36567
  }
36419
- console.error(`Error: ${error}`);
36568
+ console.error(`Error: ${installFromResult.error}`);
36420
36569
  process.exit(1);
36421
36570
  }
36422
- if (!isJsonMode()) {
36423
- console.log(`Running initial sync...
36424
- `);
36425
- }
36426
- await (isUser ? syncUserWorkspace() : syncWorkspace(workspacePath));
36427
- matches = await findSkillByName(skill, workspacePath);
36428
- if (matches.length === 0) {
36429
- const allSkills = await getAllSkillsFromPlugins(workspacePath);
36430
- const skillNames = [...new Set(allSkills.map((s) => s.name))].join(", ");
36431
- const error = `Skill '${skill}' not found in plugin '${from}'.
36432
-
36433
- Available skills: ${skillNames || "none"}
36434
-
36435
- Tip: run \`allagents skills list\` to see all installed skills.`;
36436
- if (isJsonMode()) {
36437
- jsonOutput({ success: false, command: "plugin skills add", error });
36438
- process.exit(1);
36439
- }
36440
- console.error(`Error: ${error}`);
36441
- process.exit(1);
36571
+ if (isJsonMode()) {
36572
+ jsonOutput({
36573
+ success: true,
36574
+ command: "plugin skills add",
36575
+ data: {
36576
+ skill,
36577
+ plugin: installFromResult.pluginName,
36578
+ syncResult: installFromResult.syncResult
36579
+ }
36580
+ });
36581
+ return;
36442
36582
  }
36443
- } else {
36444
- const allSkills = await getAllSkillsFromPlugins(workspacePath);
36445
- const skillNames = [...new Set(allSkills.map((s) => s.name))].join(", ");
36446
- const error = `Skill '${skill}' not found in any installed plugin.
36583
+ console.log("Sync complete.");
36584
+ return;
36585
+ }
36586
+ const allSkills = await getAllSkillsFromPlugins(workspacePath);
36587
+ const skillNames = [...new Set(allSkills.map((s) => s.name))].join(", ");
36588
+ const error = `Skill '${skill}' not found in any installed plugin.
36447
36589
 
36448
36590
  Available skills: ${skillNames || "none"}`;
36449
- if (isJsonMode()) {
36450
- jsonOutput({ success: false, command: "plugin skills add", error });
36451
- process.exit(1);
36452
- }
36453
- console.error(`Error: ${error}`);
36591
+ if (isJsonMode()) {
36592
+ jsonOutput({ success: false, command: "plugin skills add", error });
36454
36593
  process.exit(1);
36455
36594
  }
36595
+ console.error(`Error: ${error}`);
36596
+ process.exit(1);
36456
36597
  }
36457
36598
  let targetSkill = matches[0];
36458
36599
  if (!targetSkill) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "allagents",
3
- "version": "1.0.6",
3
+ "version": "1.0.8",
4
4
  "description": "CLI tool for managing multi-repo AI agent workspaces with plugin synchronization",
5
5
  "type": "module",
6
6
  "bin": {