@hasna/skills 0.10.61 → 0.10.62
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/bin/index.js +78 -5
- package/bin/mcp.js +8 -3
- package/bin/migrate.js +8 -3
- package/bin/server.js +8 -3
- package/bin/worker.js +8 -3
- package/dist/cli/commands/runtime-copyfile.d.ts +1 -0
- package/dist/index.js +66 -60
- package/dist/lib/agent-install-selection.d.ts +1 -0
- package/dist/runtime-prerequisites.d.ts +9 -0
- package/dist/runtime-prerequisites.js +3089 -0
- package/dist/sdk/index.js +211 -205
- package/docs/runtime-activation.md +23 -0
- package/package.json +8 -3
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Runtime activation prerequisites
|
|
2
|
+
|
|
3
|
+
A target package can declare `skillsRuntimePrerequisites` in its package manifest:
|
|
4
|
+
|
|
5
|
+
```json
|
|
6
|
+
{"version":1,"entry":"dist/runtime-prerequisites.js"}
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
The copyfile updater verifies the installed artifact and dependency closure, preserves its configuration preimages and writes a prepared rollout receipt. It then runs this exact target entry before moving the runtime or replacing any launcher. Unknown declarations, missing entries, unavailable checks and invalid responses refuse activation. A refusal retains the prepared receipt and preimages; the old runtime and launchers stay active.
|
|
10
|
+
|
|
11
|
+
The target reader uses the existing consumer detector. It checks the dedicated Sumi path resolver only when Sumi is detected or configured, using the same schema, selectors and root conflict/alias checks as normal integration. It never starts native Sumi or reads its settings, credentials, models or sessions. Missing unrelated harnesses do not block activation.
|
|
12
|
+
|
|
13
|
+
The check receives the actual HOME and caller directory as two positional arguments. Run the exact built target using the existing launcher isolation flags:
|
|
14
|
+
|
|
15
|
+
```sh
|
|
16
|
+
bun --config=/dev/null --no-env-file --no-macros --no-install /absolute/package/dist/runtime-prerequisites.js /absolute/home /absolute/caller-directory
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Supply the station's PATH and documented Skills/Sumi/XDG path selectors through a scrubbed environment. Preserve the presence of unsupported `SUMI_CONFIG`/`SUMI_CONFIG_CONTENT` without projecting their contents. Credentials and Bun preload options are excluded. The check emits one JSON object with `schema: "skills.runtime-prerequisites.v1"`, `targetVersion`, `ok`, `checked` and `code`. Success exits 0 with `code: null`; a sanitized refusal exits 2. The updater bounds runtime and output, rejects stderr and binds a successful result to the target entry hash in the artifact-bound rollout receipt.
|
|
20
|
+
|
|
21
|
+
Legacy targets with no declaration remain compatible and report `prerequisites.status: "not-declared"`; this is unverified, not a passed check. Deliberate receipt-based rollback remains separate and does not run the target check.
|
|
22
|
+
|
|
23
|
+
Skills 0.10.61's installed updater predates this contract. Installing the repaired updater does not retroactively make that older updater check its target. The first installation must independently run the exact candidate reader under the reviewed retained-installer procedure before switching PATH. The new updater enforces declared checks on later updates.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hasna/skills",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.62",
|
|
4
4
|
"description": "Skills library for AI coding agents",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -41,6 +41,7 @@
|
|
|
41
41
|
"migrations/",
|
|
42
42
|
"docs/skill-standard.md",
|
|
43
43
|
"docs/plugin-admission.md",
|
|
44
|
+
"docs/runtime-activation.md",
|
|
44
45
|
"schemas/",
|
|
45
46
|
"LICENSE",
|
|
46
47
|
"README.md",
|
|
@@ -51,8 +52,8 @@
|
|
|
51
52
|
"types": "./dist/index.d.ts",
|
|
52
53
|
"scripts": {
|
|
53
54
|
"clean": "rm -rf bin/ dist/",
|
|
54
|
-
"build": "bun run clean && bun build --external @hasna/contracts/kernel-lock ./src/cli/index.tsx --outdir ./bin --target bun && bun build --external @modelcontextprotocol/sdk ./src/mcp/index.ts --outfile ./bin/mcp.js --target bun && bun build --external @hasna/contracts/kernel-lock ./src/server/index.ts --outfile ./bin/server.js --target bun && bun build --external @hasna/contracts/kernel-lock ./src/server/worker.ts --outfile ./bin/worker.js --target bun && bun build --external @hasna/contracts/kernel-lock ./src/server/migrate.ts --outfile ./bin/migrate.js --target bun && bun build --external @hasna/contracts/kernel-lock ./src/server/maintenance.ts --outfile ./bin/maintenance.js --target bun && bun build ./src/index.ts ./src/storage.ts ./src/sdk/index.ts ./src/admin-contract.ts --outdir ./dist --target bun && tsc --emitDeclarationOnly --declaration --outDir dist && bun scripts/stage-kernel-lock-assets.ts",
|
|
55
|
-
"build:js": "rm -rf dist && bun build ./src/index.ts ./src/storage.ts ./src/sdk/index.ts ./src/admin-contract.ts --outdir ./dist --target bun && tsc --emitDeclarationOnly --declaration --outDir dist && bun scripts/stage-kernel-lock-assets.ts",
|
|
55
|
+
"build": "bun run clean && bun build --external @hasna/contracts/kernel-lock ./src/cli/index.tsx --outdir ./bin --target bun && bun build --external @modelcontextprotocol/sdk ./src/mcp/index.ts --outfile ./bin/mcp.js --target bun && bun build --external @hasna/contracts/kernel-lock ./src/server/index.ts --outfile ./bin/server.js --target bun && bun build --external @hasna/contracts/kernel-lock ./src/server/worker.ts --outfile ./bin/worker.js --target bun && bun build --external @hasna/contracts/kernel-lock ./src/server/migrate.ts --outfile ./bin/migrate.js --target bun && bun build --external @hasna/contracts/kernel-lock ./src/server/maintenance.ts --outfile ./bin/maintenance.js --target bun && bun build ./src/index.ts ./src/storage.ts ./src/sdk/index.ts ./src/admin-contract.ts ./src/runtime-prerequisites.ts --outdir ./dist --target bun && tsc --emitDeclarationOnly --declaration --outDir dist && bun scripts/stage-kernel-lock-assets.ts",
|
|
56
|
+
"build:js": "rm -rf dist && bun build ./src/index.ts ./src/storage.ts ./src/sdk/index.ts ./src/admin-contract.ts ./src/runtime-prerequisites.ts --outdir ./dist --target bun && tsc --emitDeclarationOnly --declaration --outDir dist && bun scripts/stage-kernel-lock-assets.ts",
|
|
56
57
|
"test": "bun test --timeout 30000",
|
|
57
58
|
"dev": "bun run ./src/cli/index.tsx",
|
|
58
59
|
"dev:watch": "bun --watch run ./src/cli/index.tsx",
|
|
@@ -129,5 +130,9 @@
|
|
|
129
130
|
"homepage": "https://github.com/hasna/skills/tree/main/apps/skills",
|
|
130
131
|
"bugs": {
|
|
131
132
|
"url": "https://github.com/hasna/skills/issues"
|
|
133
|
+
},
|
|
134
|
+
"skillsRuntimePrerequisites": {
|
|
135
|
+
"version": 1,
|
|
136
|
+
"entry": "dist/runtime-prerequisites.js"
|
|
132
137
|
}
|
|
133
138
|
}
|