@hasna/skills 0.10.48 → 0.10.50
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/README.md +66 -1
- package/bin/index.js +1137 -667
- package/bin/maintenance.js +18 -0
- package/bin/mcp.js +88 -11
- package/bin/migrate.js +19 -1
- package/bin/server.js +19 -1
- package/bin/worker.js +19 -1
- package/dist/cli/commands/runtime-launcher.d.ts +102 -0
- package/dist/cli/commands/runtime.d.ts +7 -0
- package/dist/cli/index.d.ts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +452 -272
- package/dist/lib/agent-discovery.d.ts +1 -1
- package/dist/lib/agent-integration.d.ts +1 -0
- package/dist/lib/claude-settings-witness.d.ts +19 -0
- package/dist/lib/launch-cwd-apply.d.ts +1 -0
- package/dist/lib/launch-cwd.d.ts +5 -0
- package/dist/lib/self-spawn.d.ts +21 -0
- package/dist/mcp/index.d.ts +1 -0
- package/dist/sdk/index.js +433 -255
- package/dist/server/index.d.ts +1 -1
- package/dist/server/maintenance.d.ts +1 -1
- package/dist/server/migrate.d.ts +17 -0
- package/dist/server/worker.d.ts +1 -0
- package/docs/plugin-admission.md +39 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -559,7 +559,8 @@ The plan proves the preserved original matches every witness being replaced,
|
|
|
559
559
|
permits only the documented non-discovery differences, and labels the replacement
|
|
560
560
|
witness (the JSON receipt lists them under `replacedWitnesses`). `--apply`
|
|
561
561
|
preserves and reads back the original policy before writing, and never writes the
|
|
562
|
-
native configuration. Claude upgrades to `claude-settings-v3
|
|
562
|
+
native configuration. Claude upgrades to `claude-settings-v3`, or to
|
|
563
|
+
`claude-settings-v4` with `--claude-witness-version 4`; Codex uses
|
|
563
564
|
`codex-settings-v2`, which also replaces the narrower automatic
|
|
564
565
|
`plugins`/`marketplaces`/`skills` projection of the same file once the preserved
|
|
565
566
|
original is proved to explain it. That projection is order-sensitive, so it keeps
|
|
@@ -1270,6 +1271,55 @@ reinstall or change your PATH.
|
|
|
1270
1271
|
copyfile runtime, preserves configuration and launcher preimages, and keeps the
|
|
1271
1272
|
previous runtime available for receipt-bound rollback.
|
|
1272
1273
|
|
|
1274
|
+
Every launcher the updater switches (`skills`, `skills-mcp`, `skills-serve`,
|
|
1275
|
+
`skills-server`, `skills-worker`, `skills-maintenance` and `skills-migrate`, in each
|
|
1276
|
+
PATH directory it manages, and every alias `--adopt-aliases` switches) is written as a
|
|
1277
|
+
pinned launcher, not a bare symlink. It is a `#!/bin/sh -p` file: the shell ignores
|
|
1278
|
+
exported functions and `SHELLOPTS`-style settings from your environment, and the
|
|
1279
|
+
updater refuses with `LAUNCHER_SHELL_UNSUPPORTED` before writing anything when
|
|
1280
|
+
`/bin/sh` does not accept `-p` (for example dash older than 0.5.11). The launcher
|
|
1281
|
+
execs the exact Bun binary that ran the update with
|
|
1282
|
+
`--config=/dev/null --no-env-file --no-macros --no-install --cwd=<runtime version root>`
|
|
1283
|
+
on the exact entry, through `env -i` with an explicit environment allowlist:
|
|
1284
|
+
`HOME`, `PATH`, `TMPDIR`, `USER`, `LOGNAME`, `SHELL`, `TZ`, `LANG`, terminal names
|
|
1285
|
+
(`TERM`, `TERM_PROGRAM`, `TERM_PROGRAM_VERSION`, `COLORTERM`, `COLUMNS`, `LINES`),
|
|
1286
|
+
`NO_COLOR`, `FORCE_COLOR`, `CI`, `EDITOR`, `VISUAL`, `PAGER`, `SSH_AUTH_SOCK`,
|
|
1287
|
+
`DATABASE_URL`, the server settings `HOST`, `PORT`, `NODE_ENV`, `AGENT_ID` and
|
|
1288
|
+
`ECS_CONTAINER_METADATA_URI_V4`, the agent names `TERMINAL_CWD`, `CODEX_HOME`,
|
|
1289
|
+
`HERMES_HOME` and `HERMES_ENABLE_PROJECT_PLUGINS`, and every name starting with
|
|
1290
|
+
`HASNA_`, `SKILLS_`, `SKILL_`, `MCP_`, `XDG_`, `LC_` or `AWS_`. Your `LC_ALL` passes
|
|
1291
|
+
through unchanged. Everything else never reaches the runtime, including `BUN_*`,
|
|
1292
|
+
`NODE_OPTIONS`, `DYLD_*`, `LD_*`, `NODE_EXTRA_CA_CERTS` and the proxy variables
|
|
1293
|
+
(`HTTP_PROXY`, `HTTPS_PROXY`, `NO_PROXY`). A `bunfig.toml`, `.env` or `tsconfig.json`
|
|
1294
|
+
in the directory you run a command from is never read.
|
|
1295
|
+
|
|
1296
|
+
Each of those entries (the CLI, the MCP server, the API server, the worker,
|
|
1297
|
+
maintenance and migrate) returns to your directory before anything else runs, so
|
|
1298
|
+
relative paths keep working, including a relative `HASNA_SKILLS_DATABASE_URL`. When
|
|
1299
|
+
the CLI starts another copy of itself (the hook's context lookup and its
|
|
1300
|
+
`SessionStart` sync), the child gets the same Bun flags, the runtime version root as
|
|
1301
|
+
its working directory and the same environment allowlist, and also returns to your
|
|
1302
|
+
directory first. The receipt records the old and new launcher shape of every path,
|
|
1303
|
+
the backup keeps the exact previous launcher (symlink text or pinned bytes), and
|
|
1304
|
+
`--rollback` restores it byte for byte. Codex hook trust, the Claude settings
|
|
1305
|
+
projection and `skills self-update` read a managed pinned launcher as the exact
|
|
1306
|
+
entry it runs and bind the launcher's own bytes as well.
|
|
1307
|
+
|
|
1308
|
+
An updater from before pinned launchers (0.10.48 and earlier) writes bare symlinks,
|
|
1309
|
+
including when it installs a version that has them, and an exact-version update to
|
|
1310
|
+
the version already installed is refused. `skills self-update --adopt-aliases` pins
|
|
1311
|
+
those launchers in place: in `~/.local/bin`, `~/.bun/bin`, `/opt/homebrew/bin` and
|
|
1312
|
+
`/usr/local/bin`, a bare symlink that already reaches the current runtime's entry is
|
|
1313
|
+
adopted like an alias still pointing at an older install. The same refusals apply
|
|
1314
|
+
(an unsafe or unwritable directory, a launcher owned by another account, a foreign
|
|
1315
|
+
file, an unsupported link chain), the exact symlink is kept as
|
|
1316
|
+
`<launcher>.skills-alias-prev-<receipt id>`, the receipt records it as the old
|
|
1317
|
+
`symlink` shape, and `--rollback-aliases <receipt id>` restores it exactly. A
|
|
1318
|
+
launcher already pinned to the current runtime is left unchanged. Undo in reverse
|
|
1319
|
+
order: roll back the adoption before rolling back the runtime update that wrote
|
|
1320
|
+
those symlinks, because that update's `--rollback` refuses with
|
|
1321
|
+
`LAUNCHER_DRIFT_ROLLBACK_REFUSED` while the adopted pinned launchers are in place.
|
|
1322
|
+
|
|
1273
1323
|
To require a minimum dependency age, pass a positive integer number of days and
|
|
1274
1324
|
repeat the exclusion option for package names or package globs:
|
|
1275
1325
|
|
|
@@ -2534,3 +2584,18 @@ Upgrade an existing review with `skills hook rebind-settings --agent codex
|
|
|
2534
2584
|
Review the plan before adding `--apply`; the original review preimage must match
|
|
2535
2585
|
its original mode, and unrelated changes refuse. This preserves the native
|
|
2536
2586
|
configuration, root aliases, other witnesses and active session pins.
|
|
2587
|
+
|
|
2588
|
+
`claude-settings-v4` is an explicit successor to `claude-settings-v3`. It
|
|
2589
|
+
additionally ignores only a top-level `theme` whose value is exactly one of the
|
|
2590
|
+
documented built-in values (`auto`, `dark`, `light`, `dark-daltonized`,
|
|
2591
|
+
`light-daltonized`, `dark-ansi`, `light-ansi`). Custom and plugin themes, other
|
|
2592
|
+
values or types, nested `theme` keys, `skipDangerousModePermissionPrompt` and
|
|
2593
|
+
every permission, hook, environment, helper and unknown setting stay bound.
|
|
2594
|
+
Existing raw/V1/V2/V3 reviews retain their original meaning.
|
|
2595
|
+
|
|
2596
|
+
Capture with `skills hook witness --kind claude-settings-v4 --path <settings.json>`.
|
|
2597
|
+
Upgrade an existing review with `skills hook rebind-settings --agent claude
|
|
2598
|
+
--claude-witness-version 4 --reviewed-preimage <preserved-settings.json>
|
|
2599
|
+
--expected-policy-sha256 <policy-hash> --expected-settings-sha256 <settings-hash>`.
|
|
2600
|
+
Review the plan before adding `--apply`. See
|
|
2601
|
+
[built-in theme reviews](docs/plugin-admission.md#explicit-v4-built-in-theme-reviews).
|