@hasna/skills 0.8.9 → 0.8.11
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 +103 -1
- package/bin/index.js +26509 -24016
- package/bin/mcp.js +596 -222
- package/bin/migrate.js +7 -5
- package/bin/server.js +12313 -73626
- package/bin/worker.js +7636 -60520
- package/dist/cli/commands/plugin-admission.d.ts +2 -0
- package/dist/index.d.ts +9 -2
- package/dist/index.js +23559 -21779
- package/dist/lib/agent-adapters.d.ts +1 -0
- package/dist/lib/agent-codex-trust.d.ts +42 -0
- package/dist/lib/agent-discovery.d.ts +4 -2
- package/dist/lib/claude-marketplace-registry.d.ts +17 -0
- package/dist/lib/codex-hook-rpc.d.ts +13 -0
- package/dist/lib/codex-hook-trust-files.d.ts +15 -0
- package/dist/lib/codex-hook-trust-identity.d.ts +16 -0
- package/dist/lib/codex-hook-trust-layout.d.ts +3 -0
- package/dist/lib/fleet-credentials.d.ts +18 -0
- package/dist/lib/hook-diagnostics.d.ts +7 -0
- package/dist/lib/plugin-admission.d.ts +101 -0
- package/dist/lib/plugin-discovery.d.ts +13 -0
- package/dist/lib/plugin-projection-store.d.ts +14 -0
- package/dist/lib/plugin-projection.d.ts +80 -0
- package/dist/lib/profile-client.d.ts +10 -0
- package/dist/lib/recurring-recovery.d.ts +2 -2
- package/dist/lib/recurring-surface.d.ts +1 -1
- package/dist/lib/remote-client.d.ts +14 -4
- package/dist/lib/remote-credit-checkout.d.ts +22 -0
- package/dist/lib/remote-customer-operations.d.ts +3 -4
- package/dist/lib/remote-permissions.d.ts +24 -0
- package/dist/lib/selection-cache.d.ts +32 -0
- package/dist/lib/selection-resolver.d.ts +3 -1
- package/dist/lib/session-reconciliation.d.ts +100 -0
- package/dist/sdk/index.d.ts +5 -2
- package/dist/sdk/index.js +18528 -78089
- package/docs/plugin-admission.md +221 -0
- package/package.json +7 -5
package/README.md
CHANGED
|
@@ -92,6 +92,13 @@ before synchronization or context loading. Review the hook installation and
|
|
|
92
92
|
restart the native client to load its current commands. Explicit `skills load`,
|
|
93
93
|
`skills context`, and `skills sync` commands can still select other profiles.
|
|
94
94
|
|
|
95
|
+
Reinstalling hooks without `--command` or `--selection-profile` preserves each
|
|
96
|
+
agent's existing executable and profile independently, including when using
|
|
97
|
+
`--agent all`. New agents use `skills` and `default`. Either explicit flag
|
|
98
|
+
overrides that choice for the requested agents. The policy's shared default
|
|
99
|
+
profile changes only when `--selection-profile` is supplied; older managed
|
|
100
|
+
agents without a per-agent profile retain that shared default.
|
|
101
|
+
|
|
95
102
|
The hook install `--include-vendor` option is retained for compatibility with
|
|
96
103
|
older scripts. Hook planning always inventories and disables discovered vendor
|
|
97
104
|
system skills; use `migrate native --include-vendor` when retiring their
|
|
@@ -103,6 +110,24 @@ request a selected skill in a prompt, for example `Use $pdf-generate to create
|
|
|
103
110
|
a PDF`. The hooks supply instructions; executing the skill remains a separate
|
|
104
111
|
explicit action.
|
|
105
112
|
|
|
113
|
+
For Codex 0.153.0, 0.154.0, and 0.155.0, the normal installed Skills CLI can
|
|
114
|
+
plan native trust for its three exact managed hook definitions:
|
|
115
|
+
|
|
116
|
+
```bash
|
|
117
|
+
skills hook trust --agent codex --json
|
|
118
|
+
skills hook trust --agent codex --apply --plan-digest <reviewed-plan-digest> --json
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
Review the commands, current hashes, and existing trust/enable state in the
|
|
122
|
+
plan. Apply refuses if the plan, package, declarations, or configuration changed.
|
|
123
|
+
It enrolls the current exact definitions, including reviewed modified hooks,
|
|
124
|
+
and preserves unrelated trust, settings, and comments. A private journal keeps
|
|
125
|
+
the pre-write configuration; a failed write or verification requires journal
|
|
126
|
+
reconciliation before retry. Unsupported versions or configuration layouts
|
|
127
|
+
refuse without a configuration write. Enrollment uses a short-lived native
|
|
128
|
+
app-server and makes hooks eligible for new Codex processes. Existing sessions
|
|
129
|
+
retain their own configuration; use their native hook controls to refresh them.
|
|
130
|
+
|
|
106
131
|
Each supported agent gets one small `skills-cli` native skill containing CLI
|
|
107
132
|
instructions, without a copied catalogue. Claude's native Skill tool admits
|
|
108
133
|
that bridge after other copies are retired. Prompt guards verify the owned
|
|
@@ -264,6 +289,14 @@ system configuration, process-specific overrides, and alternate agent home
|
|
|
264
289
|
directories are outside automatic coverage and require their own integration
|
|
265
290
|
review before declaring a station migrated.
|
|
266
291
|
|
|
292
|
+
For reviewed Claude plugins, `skills integration plugin plan`, `admit` and
|
|
293
|
+
`resolve` provide a command-source admission boundary before native discovery.
|
|
294
|
+
Original packages and migrated skill/command prompts remain in private versioned
|
|
295
|
+
Skills storage. Native projections retain ordinary components, and a typed
|
|
296
|
+
receipt permits only verified registry/cache transitions. See
|
|
297
|
+
[plugin admission](docs/plugin-admission.md) for the package, review and runtime
|
|
298
|
+
contracts; these commands do not change live agent registrations or settings.
|
|
299
|
+
|
|
267
300
|
If your home `.claude` or `.codex` directory intentionally links to another
|
|
268
301
|
directory within your home, add `--allow-root-aliases` to hook installation and
|
|
269
302
|
native migration. The plan records and rechecks the exact link and target;
|
|
@@ -281,6 +314,42 @@ pinned session. It preserves exact versions and does not extend an expired
|
|
|
281
314
|
receipt's lifetime. Authentication, integrity and native discovery failures still
|
|
282
315
|
block; they do not silently switch to a local catalog.
|
|
283
316
|
|
|
317
|
+
An intentional profile change for an already running session uses a separate
|
|
318
|
+
reviewed operation. `sync` and hook reinstallation do not migrate session pins:
|
|
319
|
+
|
|
320
|
+
```bash
|
|
321
|
+
skills sessions show <session-id> --json
|
|
322
|
+
skills sessions reconcile <session-id> \
|
|
323
|
+
--from-profile <old-profile> --from-revision <old-revision> \
|
|
324
|
+
--receipt-sha256 <receipt-sha256> \
|
|
325
|
+
--selection-profile <target-profile> --profile-revision <target-revision> --json
|
|
326
|
+
# Within five minutes, repeat with --apply --plan-digest <digest> \
|
|
327
|
+
# --plan-issued-at <issuedAt> --plan-expires-at <expiresAt>.
|
|
328
|
+
```
|
|
329
|
+
|
|
330
|
+
Reconciliation authenticates against the current target profile and refuses a
|
|
331
|
+
changed target revision, authority, workspace, old receipt or plan. It archives
|
|
332
|
+
the original bytes and prepared replacement under
|
|
333
|
+
`selection-cache/session-reconciliations`, then replaces only the named session
|
|
334
|
+
receipt atomically. Loaded instructions are retained only when their exact
|
|
335
|
+
authority, workspace, version and bundle digest still match. Existing child
|
|
336
|
+
sessions and project locks keep their own pins; new children inherit the newly
|
|
337
|
+
reviewed parent selection. Each new child receipt privately records the exact
|
|
338
|
+
parent receipt hash and monotonic generation it inherited. Parent and child locks
|
|
339
|
+
are acquired in deterministic path order, and the parent is re-read immediately
|
|
340
|
+
before the child commit; any changed or ABA generation refuses the child write.
|
|
341
|
+
No agent process is stopped or restarted.
|
|
342
|
+
|
|
343
|
+
Use the same updated Skills installation for every process writing this cache.
|
|
344
|
+
Session writers coordinate with reconciliation and refuse a stale write that
|
|
345
|
+
would restore an earlier pin. Reviewed reconciliation approvals bind their
|
|
346
|
+
`issuedAt` and `expiresAt` into the digest and expire after five minutes; after
|
|
347
|
+
that replay boundary, prepare and review a new plan. A competing writer or surviving lock fails closed;
|
|
348
|
+
do not delete a lock without reviewing its owning operation. If application
|
|
349
|
+
reports an incomplete outcome, inspect `sessions show` and the preserved
|
|
350
|
+
operation receipt before retrying. The archive contains both original and
|
|
351
|
+
prepared bytes even if the final receipt write fails.
|
|
352
|
+
|
|
284
353
|
## Profiles, station sync and rollback
|
|
285
354
|
|
|
286
355
|
```bash
|
|
@@ -348,6 +417,24 @@ user and stable station ID, so rotating a key does not create a new station.
|
|
|
348
417
|
Consumers need `skills:read` and `stations:write`; profile publishers need
|
|
349
418
|
`skills:write`. Key scopes apply even to workspace owners.
|
|
350
419
|
|
|
420
|
+
`skills auth whoami --json` reports the current credential's effective
|
|
421
|
+
`permissions.publish` and `permissions.profilesWrite`, alongside its account
|
|
422
|
+
role and advertised scopes. Human output labels each permission `allowed`,
|
|
423
|
+
`denied`, or `unknown`; JSON uses `null` for unknown access. An owner role alone
|
|
424
|
+
does not grant either permission. `skills capabilities --json` and the SDK's
|
|
425
|
+
`getCapabilities()` also retain the server's typed permission and scope fields.
|
|
426
|
+
|
|
427
|
+
Before sending a bundle, `push` and `RemoteSkillsClient.publishSkill()` read
|
|
428
|
+
fresh capabilities and stop on an explicit publication denial. `profiles set`
|
|
429
|
+
similarly stops before a profile write. The refusal reports
|
|
430
|
+
`SKILLS_PERMISSION_DENIED` with the affected permission and guidance to obtain
|
|
431
|
+
an authorized credential; it never changes credentials or their scopes.
|
|
432
|
+
Servers that omit permissions (or predate the capabilities route) retain their
|
|
433
|
+
existing server-authorized write behavior, with access displayed as unknown.
|
|
434
|
+
Authentication failures and malformed permission responses do not bypass the
|
|
435
|
+
preflight. `push --dry-run` remains a local packing check and does not check
|
|
436
|
+
hosted publication access.
|
|
437
|
+
|
|
351
438
|
`--selection-profile` chooses the shared skill selection. The top-level
|
|
352
439
|
`--profile` option chooses an isolated credential file; these are separate
|
|
353
440
|
settings. `HASNA_SKILLS_SELECTION_PROFILE` overrides the installed selection
|
|
@@ -651,6 +738,8 @@ of app folders, and `XDG_CONFIG_HOME` is not consulted at all.
|
|
|
651
738
|
| `skills load <name> --selection-profile <id>` | | Load complete instructions from the verified selection |
|
|
652
739
|
| `skills context <prompt> --selection-profile <id>` | | Resolve instructions matching the prompt and profile triggers |
|
|
653
740
|
| `skills hook install --agent all --selection-profile <id>` | | Plan one CLI bridge plus supported native hooks; `--apply` installs it, then restart and trust the hooks |
|
|
741
|
+
| `skills sessions show <id> --json` | | Inspect one session's exact profile revision and receipt hash without loading payloads |
|
|
742
|
+
| `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 |
|
|
654
743
|
| `skills hook agents --json` | | Report maintained adapters and explicit coverage limits |
|
|
655
744
|
| `skills migrate native` | | Inventory native copies; `--apply` archives managed copies, with explicit `--include-unmanaged` and `--include-vendor` retirement options |
|
|
656
745
|
| `skills pull --all --selection-profile <id>` | | With CLI loading active, refresh the selected profile into the verified cache |
|
|
@@ -1056,7 +1145,7 @@ skills --profile customer billing status --json
|
|
|
1056
1145
|
skills --profile customer billing usage --json
|
|
1057
1146
|
skills --profile customer billing invoices --json
|
|
1058
1147
|
skills --profile customer credits packs --json
|
|
1059
|
-
skills --profile customer credits buy <pack-id> --json
|
|
1148
|
+
skills --profile customer credits buy <pack-id> --idempotency-key checkout-001 --json
|
|
1060
1149
|
skills --profile customer billing portal --json
|
|
1061
1150
|
skills --profile customer auth keys list --email you@example.com --code <FRESH-CODE> --json
|
|
1062
1151
|
# Request a fresh OTP, then create a separately scoped key (shown once).
|
|
@@ -1065,6 +1154,19 @@ skills --profile customer auth keys create automation --email you@example.com --
|
|
|
1065
1154
|
skills --profile customer auth logout --json
|
|
1066
1155
|
```
|
|
1067
1156
|
|
|
1157
|
+
For credit checkouts, generate and retain a unique request key **before** calling.
|
|
1158
|
+
The SDK accepts `createCreditCheckout(packId, { idempotencyKey })`; MCP
|
|
1159
|
+
`create_credit_checkout` accepts `idempotency_key`. Success and bounded checkout
|
|
1160
|
+
errors retain `requestIdempotencyKey`. An omitted key is generated before the
|
|
1161
|
+
single POST, but an explicit saved key is needed if the client process exits
|
|
1162
|
+
before returning any result. Recover only on the same server, account and pack.
|
|
1163
|
+
No surface retries a checkout automatically. For unresolved or in-progress
|
|
1164
|
+
outcomes, inspect billing and explicitly reuse the same key after any indicated
|
|
1165
|
+
wait. Expired or fulfilled outcomes need a deliberate decision, not a fresh key
|
|
1166
|
+
on an automatic retry. The provider's derived `idempotencyKey` is not the request
|
|
1167
|
+
key. This protocol requires the configured server to honor checkout idempotency;
|
|
1168
|
+
older servers can return a link without proving durable recovery semantics.
|
|
1169
|
+
|
|
1068
1170
|
An origin, a full `/api/v1` base and a base with a path prefix normalize to the
|
|
1069
1171
|
same routes. `HASNA_PROFILE=customer` selects the same profile as `--profile`.
|
|
1070
1172
|
`HASNA_SKILLS_API_URL` (or the compatible `SKILLS_API_URL`) is an explicit URL
|