@mutagent/cli 0.1.183 → 0.1.185
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/bin/cli.js +18 -9
- package/dist/bin/cli.js.map +4 -4
- package/dist/index.js +11 -4
- package/dist/index.js.map +3 -3
- package/package.json +1 -1
package/dist/bin/cli.js
CHANGED
|
@@ -1306,8 +1306,11 @@ function getCompatMetadata(cliVersion = _globalCliVersion) {
|
|
|
1306
1306
|
for (const p of candidatePaths) {
|
|
1307
1307
|
if (existsSync2(p)) {
|
|
1308
1308
|
const content = readFileSync2(p, "utf-8");
|
|
1309
|
-
const verMatch =
|
|
1310
|
-
const minMatch =
|
|
1309
|
+
const verMatch = /^\s+skill_version:\s+"?([^"\n]+)"?\s*$/m.exec(content);
|
|
1310
|
+
const minMatch = /^\s+skill_min_cli_version:\s+"?([^"\n]+)"?\s*$/m.exec(content);
|
|
1311
|
+
if (/^metadata:/m.test(content) && !verMatch && !minMatch) {
|
|
1312
|
+
throw new Error("Bundled SKILL.md is missing metadata.skill_version / skill_min_cli_version" + " — re-run `bun run sync-skill` to regenerate.");
|
|
1313
|
+
}
|
|
1311
1314
|
if (verMatch?.[1])
|
|
1312
1315
|
skillVersion = verMatch[1].trim();
|
|
1313
1316
|
if (minMatch?.[1])
|
|
@@ -1315,7 +1318,11 @@ function getCompatMetadata(cliVersion = _globalCliVersion) {
|
|
|
1315
1318
|
break;
|
|
1316
1319
|
}
|
|
1317
1320
|
}
|
|
1318
|
-
} catch {
|
|
1321
|
+
} catch (err) {
|
|
1322
|
+
if (err instanceof Error && err.message.startsWith("Bundled SKILL.md is missing")) {
|
|
1323
|
+
throw err;
|
|
1324
|
+
}
|
|
1325
|
+
}
|
|
1319
1326
|
_compatCache = { cliVersion, skillVersion, skillMinCliVersion };
|
|
1320
1327
|
return _compatCache;
|
|
1321
1328
|
}
|
|
@@ -9694,8 +9701,10 @@ description: |
|
|
|
9694
9701
|
"create evaluation", "upload dataset", "explore prompts", "mutagent cli",
|
|
9695
9702
|
"eval", "dataset", "guided", "how do I optimize", "improve my prompt",
|
|
9696
9703
|
"set up tracing", "add observability".
|
|
9697
|
-
|
|
9698
|
-
|
|
9704
|
+
license: MIT
|
|
9705
|
+
metadata:
|
|
9706
|
+
skill_version: "1.1.0"
|
|
9707
|
+
skill_min_cli_version: "0.1.163"
|
|
9699
9708
|
---
|
|
9700
9709
|
|
|
9701
9710
|
# MutagenT CLI Skill
|
|
@@ -9774,10 +9783,10 @@ npm install -g @mutagent/cli
|
|
|
9774
9783
|
|
|
9775
9784
|
**Step 3 -- Version compatibility check:**
|
|
9776
9785
|
Parse \`_compat.cliVersion\` from the \`--version --json\` output and compare against
|
|
9777
|
-
\`
|
|
9786
|
+
\`metadata.skill_min_cli_version\` (above in this file's frontmatter, currently \`0.1.163\`).
|
|
9778
9787
|
|
|
9779
|
-
- If \`cliVersion >=
|
|
9780
|
-
- If \`cliVersion <
|
|
9788
|
+
- If \`cliVersion >= metadata.skill_min_cli_version\`: all good, proceed normally.
|
|
9789
|
+
- If \`cliVersion < metadata.skill_min_cli_version\`: emit a **PROMINENT PERSISTENT WARN** to the user:
|
|
9781
9790
|
|
|
9782
9791
|
> Warning: **CLI version mismatch**: Your \`mutagent\` CLI is \`{cliVersion}\` but this Skill
|
|
9783
9792
|
> requires \`>= 0.1.163\`. Some features may not work correctly.
|
|
@@ -13669,5 +13678,5 @@ if (isInteractive && !isSkillCommand) {
|
|
|
13669
13678
|
}
|
|
13670
13679
|
program.parse();
|
|
13671
13680
|
|
|
13672
|
-
//# debugId=
|
|
13681
|
+
//# debugId=D75FDA5C12BF0C2D64756E2164756E21
|
|
13673
13682
|
//# sourceMappingURL=cli.js.map
|