agentloom 0.1.10 → 0.1.11

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/README.md CHANGED
@@ -72,7 +72,7 @@ Source path resolution is additive and priority-ordered:
72
72
  - Agents: `.agents/agents` -> `agents`
73
73
  - Commands: `.agents/commands` -> `commands` -> `prompts` -> provider fallbacks `.github/prompts` + `.gemini/commands`
74
74
  - Rules: `.agents/rules` -> `rules`
75
- - Skills: `.agents/skills` -> `skills` -> root `SKILL.md` fallback
75
+ - Skills: `.agents/skills` -> `skills` -> root `SKILL.md` -> root `<name>/SKILL.md` fallback
76
76
  - MCP: `.agents/mcp.json` -> `mcp.json`
77
77
 
78
78
  Aggregate `agentloom add <source>` can import command/skill/MCP-only repositories even when no `agents/` directory exists.
package/dist/core/copy.js CHANGED
@@ -76,7 +76,7 @@ Source discovery:
76
76
  agents: .agents/agents -> agents
77
77
  commands: .agents/commands -> commands -> prompts -> (.github/prompts + .gemini/commands fallback)
78
78
  rules: .agents/rules -> rules
79
- skills: .agents/skills -> skills -> root SKILL.md
79
+ skills: .agents/skills -> skills -> root SKILL.md -> root <name>/SKILL.md
80
80
 
81
81
  Usage:
82
82
  agentloom add <source> [options]
@@ -121,7 +121,7 @@ export async function importSource(options) {
121
121
  if (shouldImportSkills &&
122
122
  options.requireSkills &&
123
123
  sourceSkillsDirs.length === 0) {
124
- throw new Error(`No source skills directory found under ${prepared.importRoot} (expected .agents/skills/, skills/, or root SKILL.md, including plugin sources declared in .claude-plugin/marketplace.json).`);
124
+ throw new Error(`No source skills directory found under ${prepared.importRoot} (expected .agents/skills/, skills/, root SKILL.md, or root <name>/SKILL.md directories, including plugin sources declared in .claude-plugin/marketplace.json).`);
125
125
  }
126
126
  if (shouldImportSkills &&
127
127
  options.requireSkills &&
@@ -134,7 +134,7 @@ export async function importSource(options) {
134
134
  sourceRules.length === 0 &&
135
135
  sourceSkills.length === 0 &&
136
136
  Object.keys(sourceMcp?.mcpServers ?? {}).length === 0) {
137
- throw new Error(`No importable entities found in source "${sourceLocation}".\nExpected agents/, .agents/agents/, .github/agents/, commands/, .agents/commands/, prompts/, .gemini/commands/, .github/prompts/, mcp.json/.agents/mcp.json, rules/.agents/rules/, skills/, .agents/skills/, root SKILL.md, or plugin sources from .claude-plugin/marketplace.json.`);
137
+ throw new Error(`No importable entities found in source "${sourceLocation}".\nExpected agents/, .agents/agents/, .github/agents/, commands/, .agents/commands/, prompts/, .gemini/commands/, .github/prompts/, mcp.json/.agents/mcp.json, rules/.agents/rules/, skills/, .agents/skills/, root SKILL.md, root <name>/SKILL.md directories, or plugin sources from .claude-plugin/marketplace.json.`);
138
138
  }
139
139
  const shouldResolveAgents = shouldImportAgents &&
140
140
  (sourceAgents.length > 0 ||
@@ -209,6 +209,9 @@ function discoverSourceSkillsDirsForRoot(importRoot) {
209
209
  if (fs.existsSync(rootSkill) && fs.statSync(rootSkill).isFile()) {
210
210
  return [importRoot];
211
211
  }
212
+ if (hasImmediateRootSkillDirs(importRoot)) {
213
+ return [importRoot];
214
+ }
212
215
  return [];
213
216
  }
214
217
  function discoverSourceRulesDirsForRoot(importRoot) {
@@ -225,6 +228,18 @@ function discoverSourceRulesDirsForRoot(importRoot) {
225
228
  function dedupePaths(paths) {
226
229
  return [...new Set(paths)];
227
230
  }
231
+ function hasImmediateRootSkillDirs(importRoot) {
232
+ for (const entry of fs.readdirSync(importRoot, { withFileTypes: true })) {
233
+ if (!entry.isDirectory()) {
234
+ continue;
235
+ }
236
+ const skillFile = path.join(importRoot, entry.name, "SKILL.md");
237
+ if (fs.existsSync(skillFile) && fs.statSync(skillFile).isFile()) {
238
+ return true;
239
+ }
240
+ }
241
+ return false;
242
+ }
228
243
  function isPathWithinRoot(rootPath, targetPath) {
229
244
  const relative = path.relative(rootPath, targetPath);
230
245
  return (relative === "" ||
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentloom",
3
- "version": "0.1.10",
3
+ "version": "0.1.11",
4
4
  "description": "Unified agent and MCP sync CLI for multi-provider AI tooling",
5
5
  "type": "module",
6
6
  "bin": {