allagents 0.20.1 → 0.20.3

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 +83 -38
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -30306,7 +30306,7 @@ var package_default;
30306
30306
  var init_package = __esm(() => {
30307
30307
  package_default = {
30308
30308
  name: "allagents",
30309
- version: "0.20.1",
30309
+ version: "0.20.3",
30310
30310
  description: "CLI tool for managing multi-repo AI agent workspaces with plugin synchronization",
30311
30311
  type: "module",
30312
30312
  bin: {
@@ -30376,10 +30376,10 @@ var init_package = __esm(() => {
30376
30376
 
30377
30377
  // src/cli/update-check.ts
30378
30378
  import { readFile as readFile14 } from "node:fs/promises";
30379
- import { join as join20 } from "node:path";
30379
+ import { join as join21 } from "node:path";
30380
30380
  import { spawn as spawn2 } from "node:child_process";
30381
30381
  async function getCachedUpdateInfo(path3) {
30382
- const filePath = path3 ?? join20(getHomeDir(), CONFIG_DIR, CACHE_FILE);
30382
+ const filePath = path3 ?? join21(getHomeDir(), CONFIG_DIR, CACHE_FILE);
30383
30383
  try {
30384
30384
  const raw = await readFile14(filePath, "utf-8");
30385
30385
  const data = JSON.parse(raw);
@@ -30417,8 +30417,8 @@ function buildNotice(currentVersion, latestVersion) {
30417
30417
  Run \`allagents self update\` to upgrade.`;
30418
30418
  }
30419
30419
  function backgroundUpdateCheck() {
30420
- const dir = join20(getHomeDir(), CONFIG_DIR);
30421
- const filePath = join20(dir, CACHE_FILE);
30420
+ const dir = join21(getHomeDir(), CONFIG_DIR);
30421
+ const filePath = join21(dir, CACHE_FILE);
30422
30422
  const script = `
30423
30423
  const https = require('https');
30424
30424
  const fs = require('fs');
@@ -32254,15 +32254,15 @@ class TuiCache {
32254
32254
  }
32255
32255
 
32256
32256
  // src/cli/tui/context.ts
32257
- import { existsSync as existsSync18 } from "node:fs";
32258
- import { join as join21 } from "node:path";
32257
+ import { existsSync as existsSync19 } from "node:fs";
32258
+ import { join as join22 } from "node:path";
32259
32259
  async function getTuiContext(cwd = process.cwd(), cache2) {
32260
32260
  const cachedContext = cache2?.getContext();
32261
32261
  if (cachedContext) {
32262
32262
  return cachedContext;
32263
32263
  }
32264
- const configPath = join21(cwd, CONFIG_DIR, WORKSPACE_CONFIG_FILE);
32265
- const hasWorkspace = existsSync18(configPath) && !isUserConfigPath(cwd);
32264
+ const configPath = join22(cwd, CONFIG_DIR, WORKSPACE_CONFIG_FILE);
32265
+ const hasWorkspace = existsSync19(configPath) && !isUserConfigPath(cwd);
32266
32266
  let projectPluginCount = 0;
32267
32267
  if (hasWorkspace) {
32268
32268
  try {
@@ -33960,10 +33960,13 @@ var pluginUninstallMeta = {
33960
33960
  };
33961
33961
 
33962
33962
  // src/cli/commands/plugin-skills.ts
33963
+ init_source();
33963
33964
  init_sync();
33964
33965
  init_workspace_modify();
33965
33966
  init_user_workspace();
33966
33967
  var import_cmd_ts3 = __toESM(require_cjs(), 1);
33968
+ import { existsSync as existsSync18 } from "node:fs";
33969
+ import { join as join20 } from "node:path";
33967
33970
 
33968
33971
  // src/core/skills.ts
33969
33972
  init_js_yaml();
@@ -34094,6 +34097,16 @@ var skillsAddMeta = {
34094
34097
 
34095
34098
  // src/cli/commands/plugin-skills.ts
34096
34099
  init_constants();
34100
+ function hasProjectConfig(dir) {
34101
+ return existsSync18(join20(dir, CONFIG_DIR, WORKSPACE_CONFIG_FILE));
34102
+ }
34103
+ function resolveScope(cwd) {
34104
+ if (isUserConfigPath(cwd))
34105
+ return "user";
34106
+ if (hasProjectConfig(cwd))
34107
+ return "project";
34108
+ return "user";
34109
+ }
34097
34110
  function groupSkillsByPlugin(skills) {
34098
34111
  const grouped = new Map;
34099
34112
  for (const skill of skills) {
@@ -34122,16 +34135,23 @@ var listCmd = import_cmd_ts3.command({
34122
34135
  },
34123
34136
  handler: async ({ scope }) => {
34124
34137
  try {
34125
- const isUser = scope === "user" || !scope && isUserConfigPath(process.cwd());
34126
- const workspacePath = isUser ? getHomeDir() : process.cwd();
34127
- const skills = await getAllSkillsFromPlugins(workspacePath);
34138
+ const cwd = process.cwd();
34139
+ const inProjectDir = !isUserConfigPath(cwd) && hasProjectConfig(cwd);
34140
+ const showUser = scope !== "project";
34141
+ const showProject = scope === "project" || !scope && inProjectDir;
34142
+ const userSkills = showUser ? await getAllSkillsFromPlugins(getHomeDir()) : [];
34143
+ const projectSkills = showProject ? await getAllSkillsFromPlugins(cwd) : [];
34144
+ const userKeys = new Set(userSkills.map((s) => `${s.pluginName}:${s.name}`));
34145
+ const dedupedProjectSkills = projectSkills.filter((s) => !userKeys.has(`${s.pluginName}:${s.name}`));
34128
34146
  if (isJsonMode()) {
34147
+ const effectiveScope = scope === "user" ? "user" : scope === "project" ? "project" : "all";
34148
+ const allSkills = [...userSkills, ...dedupedProjectSkills];
34129
34149
  jsonOutput({
34130
34150
  success: true,
34131
34151
  command: "plugin skills list",
34132
34152
  data: {
34133
- scope: isUser ? "user" : "project",
34134
- skills: skills.map((s) => ({
34153
+ scope: effectiveScope,
34154
+ skills: allSkills.map((s) => ({
34135
34155
  name: s.name,
34136
34156
  plugin: s.pluginName,
34137
34157
  disabled: s.disabled
@@ -34140,19 +34160,37 @@ var listCmd = import_cmd_ts3.command({
34140
34160
  });
34141
34161
  return;
34142
34162
  }
34143
- if (skills.length === 0) {
34163
+ if (userSkills.length === 0 && dedupedProjectSkills.length === 0) {
34144
34164
  console.log("No skills found. Install a plugin first with:");
34145
34165
  console.log(" allagents plugin install <plugin>");
34146
34166
  return;
34147
34167
  }
34148
- const grouped = groupSkillsByPlugin(skills);
34149
- for (const [pluginName, data] of grouped) {
34168
+ if (userSkills.length > 0 && scope !== "project") {
34150
34169
  console.log(`
34151
- ${pluginName} (${data.source}):`);
34152
- for (const skill of data.skills) {
34153
- const icon = skill.disabled ? "✗" : "✓";
34154
- const status = skill.disabled ? " (disabled)" : "";
34155
- console.log(` ${icon} ${skill.name}${status}`);
34170
+ ${source_default.whiteBright("User Skills:")}`);
34171
+ const grouped = groupSkillsByPlugin(userSkills);
34172
+ for (const [pluginName, data] of grouped) {
34173
+ console.log(`
34174
+ ${source_default.hex("#89b4fa")(pluginName)} (${data.source}):`);
34175
+ for (const skill of data.skills) {
34176
+ const icon = skill.disabled ? "✗" : "✓";
34177
+ const status = skill.disabled ? " (disabled)" : "";
34178
+ console.log(` ${icon} ${skill.name}${status}`);
34179
+ }
34180
+ }
34181
+ }
34182
+ if (dedupedProjectSkills.length > 0) {
34183
+ console.log(`
34184
+ ${source_default.whiteBright("Project Skills:")}`);
34185
+ const grouped = groupSkillsByPlugin(dedupedProjectSkills);
34186
+ for (const [pluginName, data] of grouped) {
34187
+ console.log(`
34188
+ ${source_default.hex("#89b4fa")(pluginName)} (${data.source}):`);
34189
+ for (const skill of data.skills) {
34190
+ const icon = skill.disabled ? "✗" : "✓";
34191
+ const status = skill.disabled ? " (disabled)" : "";
34192
+ console.log(` ${icon} ${skill.name}${status}`);
34193
+ }
34156
34194
  }
34157
34195
  }
34158
34196
  console.log();
@@ -34189,7 +34227,7 @@ var removeCmd = import_cmd_ts3.command({
34189
34227
  },
34190
34228
  handler: async ({ skill, scope, plugin }) => {
34191
34229
  try {
34192
- const isUser = scope === "user" || !scope && isUserConfigPath(process.cwd());
34230
+ const isUser = scope === "user" || !scope && resolveScope(process.cwd()) === "user";
34193
34231
  const workspacePath = isUser ? getHomeDir() : process.cwd();
34194
34232
  const matches = await findSkillByName(skill, workspacePath);
34195
34233
  if (matches.length === 0) {
@@ -34313,7 +34351,7 @@ var addCmd = import_cmd_ts3.command({
34313
34351
  },
34314
34352
  handler: async ({ skill, scope, plugin }) => {
34315
34353
  try {
34316
- const isUser = scope === "user" || !scope && isUserConfigPath(process.cwd());
34354
+ const isUser = scope === "user" || !scope && resolveScope(process.cwd()) === "user";
34317
34355
  const workspacePath = isUser ? getHomeDir() : process.cwd();
34318
34356
  const matches = await findSkillByName(skill, workspacePath);
34319
34357
  if (matches.length === 0) {
@@ -34889,23 +34927,30 @@ var pluginListCmd = import_cmd_ts4.command({
34889
34927
  console.log("No plugins found in registered marketplaces.");
34890
34928
  return;
34891
34929
  }
34892
- console.log(`Installed plugins:
34930
+ const installedPlugins = allPluginEntries.filter((e) => e.installed && !e.warning);
34931
+ const availablePlugins = allPluginEntries.filter((e) => !e.installed && !e.warning);
34932
+ const warnings = allPluginEntries.filter((e) => e.warning);
34933
+ for (const entry of warnings) {
34934
+ console.log(` Warning: ${entry.warning}`);
34935
+ }
34936
+ if (installedPlugins.length > 0) {
34937
+ console.log(`Installed plugins:
34938
+ `);
34939
+ for (const entry of installedPlugins) {
34940
+ console.log(` ❯ ${entry.name}@${entry.marketplace}`);
34941
+ console.log(` Version: ${entry.version ?? "unknown"}`);
34942
+ console.log(` Scope: ${entry.installed?.scope}
34893
34943
  `);
34894
- for (const entry of allPluginEntries) {
34895
- if (entry.warning) {
34896
- console.log(` Warning: ${entry.warning}`);
34897
- continue;
34898
34944
  }
34899
- const isEnabled = !!entry.installed;
34900
- const statusIcon = isEnabled ? "✓" : "✗";
34901
- const statusText = isEnabled ? "enabled" : "disabled";
34902
- console.log(` ❯ ${entry.name}@${entry.marketplace}`);
34903
- console.log(` Version: ${entry.version ?? "unknown"}`);
34904
- if (entry.installed) {
34905
- console.log(` Scope: ${entry.installed.scope}`);
34945
+ }
34946
+ if (availablePlugins.length > 0) {
34947
+ console.log(`Available plugins:
34948
+ `);
34949
+ for (const entry of availablePlugins) {
34950
+ console.log(` ❯ ${entry.name}@${entry.marketplace}`);
34951
+ console.log(` Version: ${entry.version ?? "unknown"}
34952
+ `);
34906
34953
  }
34907
- console.log(` Status: ${statusIcon} ${statusText}`);
34908
- console.log();
34909
34954
  }
34910
34955
  } catch (error) {
34911
34956
  if (error instanceof Error) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "allagents",
3
- "version": "0.20.1",
3
+ "version": "0.20.3",
4
4
  "description": "CLI tool for managing multi-repo AI agent workspaces with plugin synchronization",
5
5
  "type": "module",
6
6
  "bin": {