@hasna/skills 0.10.1 → 0.10.3

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 CHANGED
@@ -453,17 +453,22 @@ during installation. A successful update does not reload an existing session.
453
453
  At session start, the hook authenticates and refreshes the profile. Prompt hooks
454
454
  select complete skill instructions from that verified cache using explicit
455
455
  `$skill` references, profile keywords, paths and always-required selections.
456
- A session retains its selected versions; compaction restores loaded instructions,
456
+ A session retains its loaded selections; compaction restores loaded instructions,
457
457
  and subagents inherit the parent's selection. Instructions that exceed the
458
458
  context budget produce an explicit `skills load` command. A hook never executes
459
- a skill. Cached use is explicit and expires after 24 hours. When cached context
460
- expires or is missing, the hook makes one authenticated API attempt for the same
461
- pinned session. It preserves exact versions and does not extend an expired
462
- receipt's lifetime. Authentication, integrity and native discovery failures still
463
- block; they do not silently switch to a local catalog.
464
-
465
- An intentional profile change for an already running session uses a separate
466
- reviewed operation. `sync` and hook reinstallation do not migrate session pins:
459
+ a skill. Cached use is explicit and expires after 24 hours. When a session
460
+ receipt expires, the hook authenticates the current profile. If every loaded
461
+ selection still has identical metadata and bundle digest, it archives the old
462
+ receipt and advances that session to the current profile under an exact receipt
463
+ precondition. Unloaded selections may be added or removed. If a loaded selection
464
+ changed or disappeared, the hook blocks and requires the explicit reconciliation
465
+ below. A missing cache may be recovered through authenticated context.
466
+ Authentication, integrity and native discovery failures still block; they do
467
+ not silently switch to a local catalog.
468
+
469
+ An intentional change to a loaded selection or profile identity for an already
470
+ running session uses a separate reviewed operation. `sync` and hook
471
+ reinstallation do not migrate session pins:
467
472
 
468
473
  ```bash
469
474
  skills sessions show <session-id> --json
@@ -488,6 +493,30 @@ are acquired in deterministic path order, and the parent is re-read immediately
488
493
  before the child commit; any changed or ABA generation refuses the child write.
489
494
  No agent process is stopped or restarted.
490
495
 
496
+ Session write locks created by current releases include the host, boot and
497
+ process start identity (plus the Linux PID namespace). After 30 seconds, a
498
+ later writer can archive one only when that identity proves the writer is gone
499
+ on this same host. The exact lock bytes and a metadata record remain under
500
+ `selection-cache/session-lock-recoveries`; the session receipt is not changed
501
+ by recovery. A live, recent, malformed or different-host lock still blocks the
502
+ write. A recovery guard serializes competing recoverers.
503
+
504
+ Older PID-only locks require a local review because they do not identify their
505
+ host. On the host that created the lock, inspect the receipt and lock, verify
506
+ the recorded PID belongs to no live writer, then apply the exact reviewed lock:
507
+
508
+ ```bash
509
+ skills sessions recover-lock <session-id> --json
510
+ skills sessions recover-lock <session-id> --apply \
511
+ --review-digest <review-digest> --confirm-local-host --json
512
+ ```
513
+
514
+ The second command rechecks the lock, receipt, age and PID before archiving.
515
+ Keep the archive path returned by the command. If the review changes or the
516
+ writer cannot be proven gone, leave the lock in place; do not remove the
517
+ session receipt or stop a running agent. A surviving recovery guard also
518
+ requires separate review before another recovery attempt.
519
+
491
520
  Use the same updated Skills installation for every process writing this cache.
492
521
  Session writers coordinate with reconciliation and refuse a stale write that
493
522
  would restore an earlier pin. Reviewed reconciliation approvals bind their
@@ -1469,7 +1498,15 @@ The server supports SQLite and Postgres. The database is an adapter choice, not
1469
1498
  different product: the schema, the organization scoping, and the run lifecycle are
1470
1499
  identical either way.
1471
1500
 
1501
+ Set `SKILLS_PUBLIC_BASE_URL` to this server's public API origin before starting
1502
+ `skills-serve` or embedding its SDK handler. The server uses that authority in
1503
+ profile receipts; its socket address cannot establish the public URL. For a
1504
+ local-only instance, use the loopback origin shown below. A deployed independent
1505
+ instance should use its own HTTPS origin. Without an explicit public URL, the
1506
+ server refuses to start before opening storage.
1507
+
1472
1508
  ```bash
1509
+ export SKILLS_PUBLIC_BASE_URL=http://127.0.0.1:8787
1473
1510
  skills-serve # SQLite at ~/.hasna/skills/server.db
1474
1511
  HASNA_SKILLS_DATABASE_URL=<path>/server.db skills-serve
1475
1512
  HASNA_SKILLS_DATABASE_URL=postgres://user:CHANGEME@host/skills skills-serve