@hasna/skills 0.8.10 → 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 +52 -1
- package/bin/index.js +1304 -574
- package/bin/mcp.js +329 -82
- package/bin/migrate.js +6 -5
- package/bin/server.js +12312 -73626
- package/bin/worker.js +7635 -60520
- package/dist/index.d.ts +4 -1
- package/dist/index.js +817 -261
- package/dist/lib/agent-discovery.d.ts +1 -1
- package/dist/lib/claude-marketplace-registry.d.ts +17 -0
- package/dist/lib/fleet-credentials.d.ts +18 -0
- package/dist/lib/hook-diagnostics.d.ts +7 -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 +10 -3
- package/dist/lib/remote-credit-checkout.d.ts +22 -0
- package/dist/lib/remote-customer-operations.d.ts +2 -3
- 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 +3 -1
- package/dist/sdk/index.js +13212 -73972
- package/docs/plugin-admission.md +23 -0
- package/package.json +6 -5
package/README.md
CHANGED
|
@@ -314,6 +314,42 @@ pinned session. It preserves exact versions and does not extend an expired
|
|
|
314
314
|
receipt's lifetime. Authentication, integrity and native discovery failures still
|
|
315
315
|
block; they do not silently switch to a local catalog.
|
|
316
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
|
+
|
|
317
353
|
## Profiles, station sync and rollback
|
|
318
354
|
|
|
319
355
|
```bash
|
|
@@ -702,6 +738,8 @@ of app folders, and `XDG_CONFIG_HOME` is not consulted at all.
|
|
|
702
738
|
| `skills load <name> --selection-profile <id>` | | Load complete instructions from the verified selection |
|
|
703
739
|
| `skills context <prompt> --selection-profile <id>` | | Resolve instructions matching the prompt and profile triggers |
|
|
704
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 |
|
|
705
743
|
| `skills hook agents --json` | | Report maintained adapters and explicit coverage limits |
|
|
706
744
|
| `skills migrate native` | | Inventory native copies; `--apply` archives managed copies, with explicit `--include-unmanaged` and `--include-vendor` retirement options |
|
|
707
745
|
| `skills pull --all --selection-profile <id>` | | With CLI loading active, refresh the selected profile into the verified cache |
|
|
@@ -1107,7 +1145,7 @@ skills --profile customer billing status --json
|
|
|
1107
1145
|
skills --profile customer billing usage --json
|
|
1108
1146
|
skills --profile customer billing invoices --json
|
|
1109
1147
|
skills --profile customer credits packs --json
|
|
1110
|
-
skills --profile customer credits buy <pack-id> --json
|
|
1148
|
+
skills --profile customer credits buy <pack-id> --idempotency-key checkout-001 --json
|
|
1111
1149
|
skills --profile customer billing portal --json
|
|
1112
1150
|
skills --profile customer auth keys list --email you@example.com --code <FRESH-CODE> --json
|
|
1113
1151
|
# Request a fresh OTP, then create a separately scoped key (shown once).
|
|
@@ -1116,6 +1154,19 @@ skills --profile customer auth keys create automation --email you@example.com --
|
|
|
1116
1154
|
skills --profile customer auth logout --json
|
|
1117
1155
|
```
|
|
1118
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
|
+
|
|
1119
1170
|
An origin, a full `/api/v1` base and a base with a path prefix normalize to the
|
|
1120
1171
|
same routes. `HASNA_PROFILE=customer` selects the same profile as `--profile`.
|
|
1121
1172
|
`HASNA_SKILLS_API_URL` (or the compatible `SKILLS_API_URL`) is an explicit URL
|