@lumerahq/cli 0.15.1 → 0.15.2

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.
@@ -4,8 +4,8 @@ import {
4
4
 
5
5
  // src/lib/skills.ts
6
6
  import { createHash } from "crypto";
7
- import { existsSync, mkdirSync, readdirSync, readFileSync, writeFileSync } from "fs";
8
- import { join } from "path";
7
+ import { existsSync, mkdirSync, readdirSync, readFileSync, symlinkSync, lstatSync, writeFileSync } from "fs";
8
+ import { join, relative } from "path";
9
9
  import pc from "picocolors";
10
10
  function slugToFilename(slug) {
11
11
  const normalizedSlug = slug.startsWith("lumera-") ? slug : `lumera-${slug}`;
@@ -69,6 +69,37 @@ function parseSkillSummary(content) {
69
69
  }
70
70
  return { title, summary: summaryLines.join(" ") };
71
71
  }
72
+ function ensureSkillSymlinks(projectRoot) {
73
+ const canonicalDir = join(projectRoot, ".claude", "skills");
74
+ if (!existsSync(canonicalDir)) return;
75
+ const symlinks = [
76
+ {
77
+ dir: join(projectRoot, ".pi"),
78
+ link: join(projectRoot, ".pi", "skills"),
79
+ target: relative(join(projectRoot, ".pi"), canonicalDir)
80
+ },
81
+ {
82
+ dir: join(projectRoot, ".agents"),
83
+ link: join(projectRoot, ".agents", "skills"),
84
+ target: relative(join(projectRoot, ".agents"), canonicalDir)
85
+ }
86
+ ];
87
+ for (const { dir, link, target } of symlinks) {
88
+ mkdirSync(dir, { recursive: true });
89
+ if (existsSync(link)) {
90
+ try {
91
+ const stat = lstatSync(link);
92
+ if (stat.isSymbolicLink()) continue;
93
+ } catch {
94
+ }
95
+ continue;
96
+ }
97
+ try {
98
+ symlinkSync(target, link);
99
+ } catch {
100
+ }
101
+ }
102
+ }
72
103
  async function installAllSkills(targetDir, options) {
73
104
  const verbose = options?.verbose ?? false;
74
105
  const skills = await fetchSkillsList();
@@ -99,6 +130,7 @@ async function installAllSkills(targetDir, options) {
99
130
  failed++;
100
131
  }
101
132
  }
133
+ ensureSkillSymlinks(targetDir);
102
134
  return { installed, failed };
103
135
  }
104
136
  var SKILLS_START_MARKER = "<!-- LUMERA_SKILLS_START -->";
@@ -146,6 +178,7 @@ export {
146
178
  fetchSkillsList,
147
179
  fetchSkillContent,
148
180
  getLocalSkills,
181
+ ensureSkillSymlinks,
149
182
  installAllSkills,
150
183
  syncClaudeMd
151
184
  };
package/dist/index.js CHANGED
@@ -242,7 +242,7 @@ async function main() {
242
242
  break;
243
243
  // Project
244
244
  case "init":
245
- await import("./init-ZI3FZSRE.js").then((m) => m.init(args.slice(1)));
245
+ await import("./init-AK4DKHXI.js").then((m) => m.init(args.slice(1)));
246
246
  break;
247
247
  case "templates":
248
248
  await import("./templates-ESFQ4QO4.js").then((m) => m.templates(subcommand, args.slice(2)));
@@ -255,7 +255,7 @@ async function main() {
255
255
  break;
256
256
  // Skills
257
257
  case "skills":
258
- await import("./skills-6TSSUJYR.js").then((m) => m.skills(subcommand, args.slice(2)));
258
+ await import("./skills-ALZOR3K6.js").then((m) => m.skills(subcommand, args.slice(2)));
259
259
  break;
260
260
  // Auth
261
261
  case "login":
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  installAllSkills,
3
3
  syncClaudeMd
4
- } from "./chunk-FZPONF23.js";
4
+ } from "./chunk-BT6SXE2F.js";
5
5
  import {
6
6
  listAllTemplates,
7
7
  resolveTemplate
@@ -1,4 +1,5 @@
1
1
  import {
2
+ ensureSkillSymlinks,
2
3
  fetchSkillContent,
3
4
  fetchSkillsList,
4
5
  getLocalSkills,
@@ -6,7 +7,7 @@ import {
6
7
  installAllSkills,
7
8
  slugToFilename,
8
9
  syncClaudeMd
9
- } from "./chunk-FZPONF23.js";
10
+ } from "./chunk-BT6SXE2F.js";
10
11
  import "./chunk-WZMAQXDY.js";
11
12
  import "./chunk-PNKVD2UK.js";
12
13
 
@@ -358,6 +359,7 @@ async function update(args, flags) {
358
359
  console.log();
359
360
  console.log(pc.green(" \u2713"), `Update complete (${changes.join(", ")})`);
360
361
  syncClaudeMd(projectRoot);
362
+ ensureSkillSymlinks(projectRoot);
361
363
  console.log();
362
364
  } catch (err) {
363
365
  console.log(pc.red(" Error:"), String(err));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lumerahq/cli",
3
- "version": "0.15.1",
3
+ "version": "0.15.2",
4
4
  "description": "CLI for building and deploying Lumera apps",
5
5
  "type": "module",
6
6
  "engines": {