@lumerahq/cli 0.32.5 → 0.32.7

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.
@@ -7,7 +7,7 @@ import {
7
7
 
8
8
  // src/lib/skills.ts
9
9
  import { createHash } from "crypto";
10
- import { existsSync, mkdirSync, readdirSync, readFileSync, symlinkSync, lstatSync, statSync, writeFileSync } from "fs";
10
+ import { existsSync, mkdirSync, readdirSync, readFileSync, realpathSync, symlinkSync, lstatSync, statSync, writeFileSync } from "fs";
11
11
  import { join, relative } from "path";
12
12
  import pc from "picocolors";
13
13
  function slugToDirName(slug) {
@@ -161,19 +161,23 @@ async function installAllSkills(targetDir, options) {
161
161
  }
162
162
  var SKILLS_START_MARKER = "<!-- LUMERA_SKILLS_START -->";
163
163
  var SKILLS_END_MARKER = "<!-- LUMERA_SKILLS_END -->";
164
- function syncClaudeMd(projectRoot) {
165
- const claudeMdPath = join(projectRoot, "CLAUDE.md");
164
+ function syncSkillDescriptions(projectRoot) {
166
165
  const skillsDir = join(projectRoot, ".agents", "skills");
167
- if (!existsSync(claudeMdPath)) {
168
- return;
169
- }
170
- const claudeMd = readFileSync(claudeMdPath, "utf-8");
171
- const startIdx = claudeMd.indexOf(SKILLS_START_MARKER);
172
- const endIdx = claudeMd.indexOf(SKILLS_END_MARKER);
173
- if (startIdx === -1 || endIdx === -1) {
174
- console.log(pc.dim(" Skipping CLAUDE.md sync (no skill markers found)"));
175
- return;
166
+ const seen = /* @__PURE__ */ new Set();
167
+ const files = [];
168
+ for (const filename of ["AGENTS.md", "CLAUDE.md"]) {
169
+ const filePath = join(projectRoot, filename);
170
+ if (!existsSync(filePath)) continue;
171
+ const resolvedPath = realpathSync(filePath);
172
+ if (seen.has(resolvedPath)) continue;
173
+ seen.add(resolvedPath);
174
+ const content = readFileSync(filePath, "utf-8");
175
+ const startIdx = content.indexOf(SKILLS_START_MARKER);
176
+ const endIdx = content.indexOf(SKILLS_END_MARKER);
177
+ if (startIdx === -1 || endIdx < startIdx + SKILLS_START_MARKER.length) continue;
178
+ files.push({ filePath, content, startIdx, endIdx });
176
179
  }
180
+ if (files.length === 0) return;
177
181
  const skillEntries = [];
178
182
  if (existsSync(skillsDir)) {
179
183
  for (const entry of readdirSync(skillsDir).sort()) {
@@ -205,12 +209,13 @@ function syncClaudeMd(projectRoot) {
205
209
  } else {
206
210
  generated = skillEntries.map((s) => `**${s.slug}** \u2014 ${s.summary}`).join("\n\n");
207
211
  }
208
- const before = claudeMd.slice(0, startIdx + SKILLS_START_MARKER.length);
209
- const after = claudeMd.slice(endIdx);
210
- const updated = `${before}
212
+ for (const { filePath, content, startIdx, endIdx } of files) {
213
+ const before = content.slice(0, startIdx + SKILLS_START_MARKER.length);
214
+ const after = content.slice(endIdx);
215
+ writeFileSync(filePath, `${before}
211
216
  ${generated}
212
- ${after}`;
213
- writeFileSync(claudeMdPath, updated);
217
+ ${after}`);
218
+ }
214
219
  }
215
220
 
216
221
  export {
@@ -222,5 +227,5 @@ export {
222
227
  getLocalSkills,
223
228
  ensureSkillSymlinks,
224
229
  installAllSkills,
225
- syncClaudeMd
230
+ syncSkillDescriptions
226
231
  };
package/dist/index.js CHANGED
@@ -281,7 +281,7 @@ async function main() {
281
281
  break;
282
282
  // Project
283
283
  case "init":
284
- await import("./init-WE722M4X.js").then((m) => m.init(args.slice(1)));
284
+ await import("./init-KACYHD23.js").then((m) => m.init(args.slice(1)));
285
285
  break;
286
286
  case "register":
287
287
  await import("./register-ZXNNU3NJ.js").then((m) => m.register(args.slice(1)));
@@ -297,7 +297,7 @@ async function main() {
297
297
  break;
298
298
  // Skills
299
299
  case "skills":
300
- await import("./skills-PXZHERAS.js").then((m) => m.skills(subcommand, args.slice(2)));
300
+ await import("./skills-LWOZFY5X.js").then((m) => m.skills(subcommand, args.slice(2)));
301
301
  break;
302
302
  // Dependencies
303
303
  case "deps":
@@ -7,8 +7,8 @@ import {
7
7
  } from "./chunk-H357NP7T.js";
8
8
  import {
9
9
  installAllSkills,
10
- syncClaudeMd
11
- } from "./chunk-VL5GDJKU.js";
10
+ syncSkillDescriptions
11
+ } from "./chunk-XT3G4EDM.js";
12
12
  import {
13
13
  createApiClient,
14
14
  validateProjectNameLength
@@ -72,16 +72,6 @@ function copyDir(src, dest, replacements, isRoot = true) {
72
72
  }
73
73
  }
74
74
  }
75
- function ensureClaudeInstructionsLink(projectRoot) {
76
- const agentsMdPath = join(projectRoot, "AGENTS.md");
77
- const claudeMdPath = join(projectRoot, "CLAUDE.md");
78
- if (!existsSync(agentsMdPath) || existsSync(claudeMdPath)) return;
79
- try {
80
- symlinkSync("AGENTS.md", claudeMdPath);
81
- } catch {
82
- writeFileSync(claudeMdPath, readFileSync(agentsMdPath, "utf-8"));
83
- }
84
- }
85
75
  function isGitInstalled() {
86
76
  try {
87
77
  execSync("git --version", { stdio: "ignore" });
@@ -372,7 +362,6 @@ async function init(args) {
372
362
  [sourceTitle, projectTitle]
373
363
  ];
374
364
  copyDir(templateDir, targetDir, replacements);
375
- ensureClaudeInstructionsLink(targetDir);
376
365
  const installCommand = existsSync(join(targetDir, "pnpm-lock.yaml")) ? "pnpm install --frozen-lockfile" : "pnpm install";
377
366
  const hasPythonProject = existsSync(join(targetDir, "pyproject.toml"));
378
367
  function listFiles(dir, prefix = "") {
@@ -438,7 +427,7 @@ async function init(args) {
438
427
  } else {
439
428
  stopSkills(pc.green("\u2713") + pc.dim(` ${installed} Lumera skills installed`));
440
429
  }
441
- syncClaudeMd(targetDir);
430
+ syncSkillDescriptions(targetDir);
442
431
  if (isGitInstalled()) {
443
432
  try {
444
433
  execSync('git add -A && git commit -m "chore: install lumera skills"', {
@@ -7,8 +7,8 @@ import {
7
7
  installAllSkills,
8
8
  slugToDirName,
9
9
  slugToFilename,
10
- syncClaudeMd
11
- } from "./chunk-VL5GDJKU.js";
10
+ syncSkillDescriptions
11
+ } from "./chunk-XT3G4EDM.js";
12
12
  import "./chunk-JLVVHTBY.js";
13
13
  import "./chunk-FJFIWC7G.js";
14
14
  import "./chunk-PNKVD2UK.js";
@@ -234,7 +234,7 @@ async function install(flags) {
234
234
  console.log(pc.green(" \u2713"), `Installed ${installed} skills`);
235
235
  }
236
236
  console.log(pc.dim(` Location: .agents/skills/`));
237
- syncClaudeMd(projectRoot);
237
+ syncSkillDescriptions(projectRoot);
238
238
  console.log();
239
239
  } catch (err) {
240
240
  console.log(pc.red(" Error:"), String(err));
@@ -282,7 +282,7 @@ async function update(args, flags) {
282
282
  if (verbose && diff.unchanged.length > 0) {
283
283
  console.log(pc.dim(` ${diff.unchanged.length} skills unchanged`));
284
284
  }
285
- syncClaudeMd(projectRoot);
285
+ syncSkillDescriptions(projectRoot);
286
286
  console.log();
287
287
  return;
288
288
  }
@@ -369,7 +369,7 @@ async function update(args, flags) {
369
369
  }
370
370
  console.log();
371
371
  console.log(pc.green(" \u2713"), `Update complete (${changes.join(", ")})`);
372
- syncClaudeMd(projectRoot);
372
+ syncSkillDescriptions(projectRoot);
373
373
  ensureSkillSymlinks(projectRoot);
374
374
  console.log();
375
375
  } catch (err) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lumerahq/cli",
3
- "version": "0.32.5",
3
+ "version": "0.32.7",
4
4
  "description": "CLI for building and deploying Lumera apps",
5
5
  "type": "module",
6
6
  "engines": {
@@ -0,0 +1 @@
1
+ @AGENTS.md
@@ -31,7 +31,7 @@
31
31
  "check:ci": "biome check . && tsr generate && tsc --noEmit"
32
32
  },
33
33
  "dependencies": {
34
- "@lumerahq/ui": "^0.20.3",
34
+ "@lumerahq/ui": "^0.20.4",
35
35
  "@tanstack/react-query": "^5.90.11",
36
36
  "@tanstack/react-router": "1.155.0",
37
37
  "clsx": "^2.1.1",
@@ -19,8 +19,8 @@ importers:
19
19
  .:
20
20
  dependencies:
21
21
  '@lumerahq/ui':
22
- specifier: ^0.20.3
23
- version: 0.20.3(@types/react@19.2.16)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)
22
+ specifier: ^0.20.4
23
+ version: 0.20.4(@types/react@19.2.16)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)
24
24
  '@tanstack/react-query':
25
25
  specifier: ^5.90.11
26
26
  version: 5.101.0(react@19.2.7)
@@ -464,8 +464,8 @@ packages:
464
464
  '@jridgewell/trace-mapping@0.3.31':
465
465
  resolution: {integrity: sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==}
466
466
 
467
- '@lumerahq/ui@0.20.3':
468
- resolution: {integrity: sha512-+hPuYbIw7FWLA8log31Xi51JX1R1+oGxIrw/gBJG9IJ1zvfIjEoRf2Z+BhY141mLhBSMeXJfBaSgy4bTe6muMA==}
467
+ '@lumerahq/ui@0.20.4':
468
+ resolution: {integrity: sha512-ZDdHzQXL24ClGiLz1VDpIachh/dn52p9f7t/lG9fBlwE+i+QB+jTJ5N3BjRDUM38WhKSflLzZneJTbeRV1DeHQ==}
469
469
  peerDependencies:
470
470
  react: ^18.0.0 || ^19.0.0
471
471
  react-dom: ^18.0.0 || ^19.0.0
@@ -2318,7 +2318,7 @@ snapshots:
2318
2318
  '@jridgewell/resolve-uri': 3.1.2
2319
2319
  '@jridgewell/sourcemap-codec': 1.5.5
2320
2320
 
2321
- '@lumerahq/ui@0.20.3(@types/react@19.2.16)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)':
2321
+ '@lumerahq/ui@0.20.4(@types/react@19.2.16)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)':
2322
2322
  dependencies:
2323
2323
  '@base-ui/react': 1.5.0(@types/react@19.2.16)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)
2324
2324
  '@tanstack/react-query': 5.101.0(react@19.2.7)