@theholocron/cli 3.29.7 → 3.29.9
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/dist/cli.mjs +39 -11
- package/dist/cli.mjs.map +1 -1
- package/dist/index.d.mts +1 -1
- package/package.json +1 -1
package/dist/cli.mjs
CHANGED
|
@@ -3753,7 +3753,7 @@ async function installSkills({ agent, skills, repoRoot }) {
|
|
|
3753
3753
|
const installed = [];
|
|
3754
3754
|
const missing = [];
|
|
3755
3755
|
for (const name of skills) {
|
|
3756
|
-
const srcDir = join(skillsRoot, "
|
|
3756
|
+
const srcDir = join(skillsRoot, "src", name);
|
|
3757
3757
|
try {
|
|
3758
3758
|
await stat(srcDir);
|
|
3759
3759
|
} catch {
|
|
@@ -4390,24 +4390,52 @@ function parseWorkflowsFromTs(source) {
|
|
|
4390
4390
|
const hasPresetSpread = /\.\.\.[a-zA-Z_$][a-zA-Z0-9_$]*/.test(body);
|
|
4391
4391
|
const explicit = [];
|
|
4392
4392
|
const objSpans = [];
|
|
4393
|
-
|
|
4394
|
-
|
|
4395
|
-
|
|
4396
|
-
|
|
4393
|
+
let j = 0;
|
|
4394
|
+
while (j < body.length) {
|
|
4395
|
+
if (body[j] !== "{") {
|
|
4396
|
+
j++;
|
|
4397
|
+
continue;
|
|
4398
|
+
}
|
|
4399
|
+
const objStart = j;
|
|
4400
|
+
let objDepth = 1;
|
|
4401
|
+
j++;
|
|
4402
|
+
while (j < body.length && objDepth > 0) {
|
|
4403
|
+
if (body[j] === "{") objDepth++;
|
|
4404
|
+
else if (body[j] === "}") objDepth--;
|
|
4405
|
+
j++;
|
|
4406
|
+
}
|
|
4407
|
+
const objContent = body.slice(objStart, j);
|
|
4408
|
+
objSpans.push([objStart, j]);
|
|
4409
|
+
const nameMatch = objContent.match(/\bname\s*:\s*"([^"]+)"/);
|
|
4410
|
+
if (!nameMatch) continue;
|
|
4411
|
+
const name = nameMatch[1];
|
|
4397
4412
|
let withObj;
|
|
4398
|
-
|
|
4399
|
-
|
|
4400
|
-
|
|
4401
|
-
|
|
4413
|
+
const withKeyMatch = objContent.match(/\bwith\s*:\s*\{/);
|
|
4414
|
+
if (withKeyMatch) {
|
|
4415
|
+
const withOpen = withKeyMatch.index + withKeyMatch[0].length - 1;
|
|
4416
|
+
let withDepth = 1;
|
|
4417
|
+
let k = withOpen + 1;
|
|
4418
|
+
while (k < objContent.length && withDepth > 0) {
|
|
4419
|
+
if (objContent[k] === "{") withDepth++;
|
|
4420
|
+
else if (objContent[k] === "}") withDepth--;
|
|
4421
|
+
k++;
|
|
4422
|
+
}
|
|
4423
|
+
const withStr = objContent.slice(withOpen, k);
|
|
4424
|
+
try {
|
|
4425
|
+
const jsonSafe = withStr.replace(/([{,]\s*)([a-zA-Z_$][a-zA-Z0-9_$]*)\s*:/g, "$1\"$2\":");
|
|
4426
|
+
withObj = JSON.parse(jsonSafe);
|
|
4427
|
+
} catch {}
|
|
4428
|
+
}
|
|
4402
4429
|
explicit.push({
|
|
4403
|
-
pos:
|
|
4430
|
+
pos: objStart,
|
|
4404
4431
|
entry: {
|
|
4405
|
-
name
|
|
4432
|
+
name,
|
|
4406
4433
|
...withObj && { with: withObj }
|
|
4407
4434
|
}
|
|
4408
4435
|
});
|
|
4409
4436
|
}
|
|
4410
4437
|
const strRe = /"([^"]+)"/g;
|
|
4438
|
+
let m;
|
|
4411
4439
|
while ((m = strRe.exec(body)) !== null) if (!objSpans.some(([s, e]) => m.index >= s && m.index < e)) explicit.push({
|
|
4412
4440
|
pos: m.index,
|
|
4413
4441
|
entry: { name: m[1] }
|