@xynogen/pix-skills 0.5.1 → 0.5.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xynogen/pix-skills",
3
- "version": "0.5.1",
3
+ "version": "0.5.2",
4
4
  "description": "Pi extension — agent skill loader (skill tool + skills bundle)",
5
5
  "type": "module",
6
6
  "main": "src/index.ts",
package/src/directive.ts CHANGED
@@ -30,7 +30,7 @@ export function findCommandDirectives(content: string): CommandDirective[] {
30
30
  hits.push({
31
31
  start,
32
32
  end: start + m[0].length - lead.length,
33
- command: m[2]?.trim(),
33
+ command: m[2]?.trim() ?? "",
34
34
  });
35
35
  }
36
36
  return hits;
package/src/index.ts CHANGED
@@ -107,14 +107,14 @@ export function extractDescription(content: string): string | null {
107
107
  const m = content.match(/^---\s*\n([\s\S]*?)\n---/);
108
108
  if (!m) return null;
109
109
  const dm = m[1]?.match(/^description\s*:\s*["']?(.+?)["']?\s*$/m);
110
- return dm ? dm[1]?.trim() : null;
110
+ return dm ? (dm[1]?.trim() ?? null) : null;
111
111
  }
112
112
 
113
113
  export function extractName(content: string): string | null {
114
114
  const m = content.match(/^---\s*\n([\s\S]*?)\n---/);
115
115
  if (!m) return null;
116
116
  const nm = m[1]?.match(/^name\s*:\s*["']?(.+?)["']?\s*$/m);
117
- return nm ? nm[1]?.trim() : null;
117
+ return nm ? (nm[1]?.trim() ?? null) : null;
118
118
  }
119
119
 
120
120
  // ─── Command directive interpolation ───────────────────────────────────────────
package/src/run.ts CHANGED
@@ -34,7 +34,8 @@ export function runArgv(argv: string[], opts: RunOptions): Promise<string> {
34
34
 
35
35
  let child: ReturnType<typeof spawn>;
36
36
  try {
37
- child = spawn(argv[0] as string, argv.slice(1), {
37
+ const cmd = argv[0] ?? "";
38
+ child = spawn(cmd, argv.slice(1), {
38
39
  cwd: opts.cwd,
39
40
  stdio: ["ignore", "pipe", "pipe"],
40
41
  });