@hasna/skills 0.10.73 → 0.10.74
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 +77 -0
- package/bin/index.js +516 -45
- package/bin/mcp.js +79 -12
- package/bin/migrate.js +1 -1
- package/bin/server.js +1 -1
- package/bin/worker.js +1 -1
- package/dist/cli/commands/provenance.d.ts +18 -0
- package/dist/index.js +74 -22
- package/dist/lib/portable-skills-files.d.ts +10 -0
- package/dist/lib/selected-run.d.ts +45 -0
- package/dist/lib/selection-provenance.d.ts +108 -0
- package/dist/runtime-prerequisites.js +1 -1
- package/dist/sdk/index.js +123 -27
- package/docs/plugin-admission.md +13 -9
- package/docs/skill-standard.md +18 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -661,6 +661,10 @@ non-null `sha256`, Skills also requires plain byte witnesses for that plugin's
|
|
|
661
661
|
`hooks/hooks.json` (when present) and any string `hooks` target in the
|
|
662
662
|
manifest. A manifest listed as `claude-plugin-manifest-v1` (the form Skills
|
|
663
663
|
writes into the stored policy) or as `path-bytes` triggers no such requirement.
|
|
664
|
+
A source that the `absent-retired-claude-version` rule retains (see
|
|
665
|
+
[`discovery-binding`](#verify-the-stored-claude-discovery-binding-discovery-binding))
|
|
666
|
+
is stored exactly as listed: Skills does not project its manifest, require its
|
|
667
|
+
hook files or convert its marker, because the file no longer exists.
|
|
664
668
|
The version-root `.orphaned_at` timestamp that Claude rewrites at startup is
|
|
665
669
|
bound by presence only, as `claude-plugin-orphaned-at-v1`, and is still
|
|
666
670
|
strictly validated; see
|
|
@@ -729,6 +733,27 @@ file; drift still requires a fresh explicit review. Explicit discovery inputs
|
|
|
729
733
|
take precedence, including when their `agents` array omits a previously reviewed
|
|
730
734
|
agent. The default `--agent all` still includes every supported adapter.
|
|
731
735
|
|
|
736
|
+
That recheck has two halves, and only one of them gates reuse. BINDING CUSTODY —
|
|
737
|
+
the same managed bridge, home, alias set, agent, command/profile binding and
|
|
738
|
+
reviewed discovery — must hold before a saved review is reused, or the plan
|
|
739
|
+
refuses and names a fresh explicit review. Bridge PROTECTION — the native plugin
|
|
740
|
+
bytes, the permission and hook rules and the bundled-skill switches — is written
|
|
741
|
+
by the same plan, so it is asserted in full after the writes instead of gating
|
|
742
|
+
the repair that fixes it; a plan that does not repair it is refused before the
|
|
743
|
+
receipt is written. Hermes native shell-hook trust is the exception: it is the
|
|
744
|
+
user's own consent and no Skills write creates it, so it stays a pre-write
|
|
745
|
+
condition. One implementation serves both halves, so they cannot drift apart.
|
|
746
|
+
|
|
747
|
+
Because that recheck includes the managed bridge, `hook install` cannot reuse a
|
|
748
|
+
saved review on a host whose bridge has since broken, and in that form it cannot
|
|
749
|
+
repair its own precondition. It refuses and names the reachable form,
|
|
750
|
+
`skills hook install --agent <agent> --discovery-inputs <review> --apply`, which
|
|
751
|
+
skips the retained-review precheck and rebuilds the bridge from the review in the
|
|
752
|
+
same transaction. A reviewed binding always carries a whole-file witness for the
|
|
753
|
+
agent configuration beside its projected fields, so unchanged projected fields do
|
|
754
|
+
not excuse a change outside them: a fresh explicit discovery review, not a
|
|
755
|
+
witness refresh, is the supported route.
|
|
756
|
+
|
|
732
757
|
For reviewed Claude plugins, `skills integration plugin plan`, `admit` and
|
|
733
758
|
`resolve` provide a command-source admission boundary before native discovery.
|
|
734
759
|
Original packages and migrated skill/command prompts remain in private versioned
|
|
@@ -1212,6 +1237,13 @@ To bind the result, compare each `sources` row (`index`, `path`, `hashMode`,
|
|
|
1212
1237
|
policy bytes they review, and repeat the call immediately before the first
|
|
1213
1238
|
native change, because the verdict describes one moment.
|
|
1214
1239
|
|
|
1240
|
+
An installer that then passes the stored full-file sources (rows with `format`
|
|
1241
|
+
`null`), roots and directory witnesses back to `skills hook install --agent
|
|
1242
|
+
claude --discovery-inputs <file>` gets the same retention: `hook install`
|
|
1243
|
+
retains each `retained-absent` source with the same rule and stores it
|
|
1244
|
+
unchanged, so a historical `bytes` witness keeps its meaning. Every other
|
|
1245
|
+
source is checked and, for a fresh review, typed as usual.
|
|
1246
|
+
|
|
1215
1247
|
Claude writes `.orphaned_at` at the root of a plugin-cache version it plans to
|
|
1216
1248
|
delete (`<...>/.claude/plugins/cache/<marketplace>/<plugin>/<version>/.orphaned_at`),
|
|
1217
1249
|
rewrites its timestamp at each start, may replace the file, and later deletes
|
|
@@ -1291,6 +1323,50 @@ for the named station; it is not a native-folder snapshot in this mode.
|
|
|
1291
1323
|
`skills install --selection-profile default` without skill names also syncs the
|
|
1292
1324
|
whole selection.
|
|
1293
1325
|
|
|
1326
|
+
### Reading provenance instead of trusting one record
|
|
1327
|
+
|
|
1328
|
+
Applying a record is not adoption, and the four facts below are different. Only
|
|
1329
|
+
`skills provenance` reports them together, read-only:
|
|
1330
|
+
|
|
1331
|
+
- `selected` — the shared profile the authority serves right now;
|
|
1332
|
+
- `activated` — the snapshot this machine last verified and activated, which is
|
|
1333
|
+
what its hooks, `skills context` and `skills load` resolve from;
|
|
1334
|
+
- `applied` — the station receipt the authority holds. Only an explicit
|
|
1335
|
+
`skills sync` writes it; the managed hook keeps station reporting off its
|
|
1336
|
+
blocking lifecycle path on purpose, so this record legitimately lags the
|
|
1337
|
+
activation and is not by itself evidence that a machine is adrift;
|
|
1338
|
+
- `pinned` — the exact immutable profile revision one live session holds. A
|
|
1339
|
+
session keeps its revision when the profile moves on, so an older pin is
|
|
1340
|
+
custody by design, not drift;
|
|
1341
|
+
- `consumed` — the skills that session actually loaded, at their exact versions.
|
|
1342
|
+
|
|
1343
|
+
```bash
|
|
1344
|
+
skills provenance --json
|
|
1345
|
+
skills provenance --session <session-id> --json
|
|
1346
|
+
skills provenance --station station-example --json
|
|
1347
|
+
```
|
|
1348
|
+
|
|
1349
|
+
Every consumer is classified `current`, `behind`, `pinned` or `unverified`, and
|
|
1350
|
+
always carries a stable `reasonCode` and its reason. Identity is part of the
|
|
1351
|
+
comparison: a revision that matches under a different authority, workspace or
|
|
1352
|
+
profile is `IDENTITY_MISMATCH`, not `current`, so a foreign pin is never
|
|
1353
|
+
reported as adopted and is never diffed. Each receipt source declares the
|
|
1354
|
+
identity fields it must record, so a receipt that omits one — or carries `null` or
|
|
1355
|
+
an empty string where a nonempty string is required, which the HTTP reader also
|
|
1356
|
+
passes through — is `INCOMPLETE_RECEIPT`, not `current` and not `behind`: an
|
|
1357
|
+
absent revision is not an older revision. The local activation is named as this
|
|
1358
|
+
machine and the authority receipt as the station named on the command line; the
|
|
1359
|
+
two are never collapsed into one id. The receipt also states what it does not
|
|
1360
|
+
attest — published version and digest evidence, native discovery and locks, and
|
|
1361
|
+
live consumer adoption — rather than letting a clean-looking result imply them.
|
|
1362
|
+
`drift` lists the bundles whose exact versions differ. The command reads and
|
|
1363
|
+
never writes a pin, receipt, cache entry or station record, and it renders no
|
|
1364
|
+
skill payload and no credential: a reader's exception text is never carried,
|
|
1365
|
+
only a fixed diagnostic code, because bounding foreign text is not redacting it.
|
|
1366
|
+
With `--cached`, or when the authority cannot be read, the reference is the
|
|
1367
|
+
locally synced snapshot and every consumer is reported `unverified` rather than
|
|
1368
|
+
`current` — a local snapshot cannot establish adoption.
|
|
1369
|
+
|
|
1294
1370
|
After hook installation has enabled CLI loading, pull operations obey the same
|
|
1295
1371
|
profile. `--all` refreshes its selected versions rather than the full catalog,
|
|
1296
1372
|
and a named pull must belong to that profile:
|
|
@@ -1695,6 +1771,7 @@ of app folders, and `XDG_CONFIG_HOME` is not consulted at all.
|
|
|
1695
1771
|
| `skills context <prompt> --selection-profile <id>` | | Resolve instructions matching the prompt and profile triggers |
|
|
1696
1772
|
| `skills hook install --selection-profile <id>` | | Plan bridges and hooks for configured/detected consumers; `--agent <agent>` selects one, explicit `--agent all` requires every adapter; `--apply` installs them, then restart and trust the hooks |
|
|
1697
1773
|
| `skills sessions show <id> --json` | | Inspect one session's exact profile revision and receipt hash without loading payloads |
|
|
1774
|
+
| `skills provenance [--session <id>] [--station <id>] --json` | `--cached` | Read-only receipt of the selected, activated, applied, pinned and actually loaded skill versions, each with its status and reason; writes nothing |
|
|
1698
1775
|
| `skills sessions reconcile <id> --from-profile <id> --from-revision <rev> --receipt-sha256 <sha> --selection-profile <id> --profile-revision <rev>` | | Plan an explicit migration of one live session; `--apply --plan-digest <digest> --plan-issued-at <time> --plan-expires-at <time>` (within five minutes) preserves its old receipt and applies the reviewed replacement |
|
|
1699
1776
|
| `skills hook agents --json` | | Report maintained adapters and explicit coverage limits |
|
|
1700
1777
|
| `skills migrate native` | | Inventory native copies; `--apply` archives managed copies, with explicit `--include-unmanaged`, `--include-vendor`, or reviewed `--target-manifest` selection |
|