@dot-skill/runtime 0.4.2 → 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/index.js +9 -2
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -1,7 +1,14 @@
|
|
|
1
1
|
import { randomUUID } from "node:crypto";
|
|
2
|
+
import { readFileSync } from "node:fs";
|
|
2
3
|
import { inspectSkill, unpackSkill, validatePackageBytes, verifyMintTrust, sha256Digest, } from "@dot-skill/core";
|
|
3
|
-
|
|
4
|
-
const
|
|
4
|
+
function loadRuntimeIdentity() {
|
|
5
|
+
const metadata = JSON.parse(readFileSync(new URL("../package.json", import.meta.url), "utf8"));
|
|
6
|
+
if (typeof metadata.name !== "string" || typeof metadata.version !== "string") {
|
|
7
|
+
throw new Error("Invalid @dot-skill/runtime package metadata");
|
|
8
|
+
}
|
|
9
|
+
return { name: metadata.name, version: metadata.version };
|
|
10
|
+
}
|
|
11
|
+
const { name: RUNTIME_NAME, version: RUNTIME_VERSION } = loadRuntimeIdentity();
|
|
5
12
|
function substitute(template, inputs) {
|
|
6
13
|
return template.replace(/\{\{\s*([a-zA-Z_][a-zA-Z0-9_]*)\s*\}\}/g, (_, name) => {
|
|
7
14
|
const v = inputs[name];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dot-skill/runtime",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.3",
|
|
4
4
|
"description": "Open .skill Protocol — reference workflow runtime",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": {
|
|
@@ -33,8 +33,8 @@
|
|
|
33
33
|
"clean": "rm -rf dist"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@dot-skill/core": "^0.4.
|
|
37
|
-
"@dot-skill/protocol": "^0.4.
|
|
36
|
+
"@dot-skill/core": "^0.4.3",
|
|
37
|
+
"@dot-skill/protocol": "^0.4.3"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"@types/node": "^26.1.1",
|