@dot-skill/cli 0.4.1 → 0.4.3
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.js +15 -2
- package/package.json +6 -6
package/dist/cli.js
CHANGED
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
* skill compile -m "…" --mint # release (complete or refuse)
|
|
13
13
|
* skill load ./file.skill # resume handoff in another AI
|
|
14
14
|
*/
|
|
15
|
+
import { readFileSync } from "node:fs";
|
|
15
16
|
import { readFile, writeFile } from "node:fs/promises";
|
|
16
17
|
import { resolve } from "node:path";
|
|
17
18
|
import { inspectSkill, migrateLegacySkill, toSkillMdAdapter, unpackSkill, validatePackageBytes, mintSkillPackage, verifyMintTrust, compileRecipeToSkill, compileSkillSource, approveCompilation, redactSecrets, CompileRefusalError, } from "@dot-skill/core";
|
|
@@ -19,7 +20,14 @@ import { runSkillArchive } from "@dot-skill/runtime";
|
|
|
19
20
|
import { lookup, list, verify as registryVerify, publish as registryPublish } from "@dot-skill/registry";
|
|
20
21
|
import { isValidAgentHost } from "@dot-skill/protocol";
|
|
21
22
|
import { initWorkspace, requireWorkspace, proposeSection, proposeMany, stage, unstage, status, compileWorkspace, checkpoint, discardSection, loadHead, loadSkillHandoff, setJourney, requireAgentHost, } from "@dot-skill/workspace";
|
|
22
|
-
|
|
23
|
+
function loadPackageVersion() {
|
|
24
|
+
const metadata = JSON.parse(readFileSync(new URL("../package.json", import.meta.url), "utf8"));
|
|
25
|
+
if (typeof metadata.version !== "string" || metadata.version.length === 0) {
|
|
26
|
+
throw new Error("Invalid @dot-skill/cli package version metadata");
|
|
27
|
+
}
|
|
28
|
+
return metadata.version;
|
|
29
|
+
}
|
|
30
|
+
const VERSION = loadPackageVersion();
|
|
23
31
|
function usage(exitCode = 1) {
|
|
24
32
|
console.log(`skill — Open .skill Protocol CLI v${VERSION}
|
|
25
33
|
|
|
@@ -47,7 +55,7 @@ Package tools:
|
|
|
47
55
|
|
|
48
56
|
Env (agents):
|
|
49
57
|
SKILL_HOST (required) SKILL_PROVIDER SKILL_MODEL SKILL_DEPLOYMENT
|
|
50
|
-
SKILL_ENDPOINT SKILL_ACTOR SKILL_AGENT_RUNTIME
|
|
58
|
+
SKILL_ENDPOINT SKILL_ACTOR SKILL_AGENT_RUNTIME SKILL_AGENT_VERSION
|
|
51
59
|
SKILL_INPUT_TOKENS SKILL_OUTPUT_TOKENS SKILL_SESSION_ID
|
|
52
60
|
|
|
53
61
|
Install: npm i -g @dot-skill/cli or npx @dot-skill/cli …
|
|
@@ -230,6 +238,9 @@ async function main() {
|
|
|
230
238
|
mint: flag(rest, "--mint"),
|
|
231
239
|
profile,
|
|
232
240
|
host: opt(rest, "--host"),
|
|
241
|
+
agent_runtime: process.env.SKILL_AGENT_RUNTIME ?? "@dot-skill/cli",
|
|
242
|
+
agent_version: process.env.SKILL_AGENT_VERSION ??
|
|
243
|
+
(process.env.SKILL_AGENT_RUNTIME ? "unknown" : VERSION),
|
|
233
244
|
input_tokens: opt(rest, "--input-tokens")
|
|
234
245
|
? Number(opt(rest, "--input-tokens"))
|
|
235
246
|
: undefined,
|
|
@@ -298,6 +309,8 @@ async function main() {
|
|
|
298
309
|
? redactSecrets(process.env.SKILL_ENDPOINT)
|
|
299
310
|
: undefined,
|
|
300
311
|
agent_runtime: process.env.SKILL_AGENT_RUNTIME ?? "@dot-skill/cli",
|
|
312
|
+
agent_version: process.env.SKILL_AGENT_VERSION ??
|
|
313
|
+
(process.env.SKILL_AGENT_RUNTIME ? "unknown" : VERSION),
|
|
301
314
|
});
|
|
302
315
|
const out = opt(rest, "-o") ?? file;
|
|
303
316
|
await writeFile(resolve(out), packageBytes);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dot-skill/cli",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.3",
|
|
4
4
|
"description": "skill — Open .skill Protocol CLI (continuity and release workflows)",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": {
|
|
@@ -32,11 +32,11 @@
|
|
|
32
32
|
"test": "node --test dist/conformance.test.js"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@dot-skill/core": "^0.4.
|
|
36
|
-
"@dot-skill/protocol": "^0.4.
|
|
37
|
-
"@dot-skill/registry": "^0.4.
|
|
38
|
-
"@dot-skill/runtime": "^0.4.
|
|
39
|
-
"@dot-skill/workspace": "^0.4.
|
|
35
|
+
"@dot-skill/core": "^0.4.3",
|
|
36
|
+
"@dot-skill/protocol": "^0.4.3",
|
|
37
|
+
"@dot-skill/registry": "^0.4.3",
|
|
38
|
+
"@dot-skill/runtime": "^0.4.3",
|
|
39
|
+
"@dot-skill/workspace": "^0.4.3"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@types/node": "^22.15.21",
|