@hasna/skills 0.7.1 → 0.7.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
@@ -55,6 +55,12 @@ skills hook install --agent all --selection-profile default --json
55
55
  skills hook install --agent all --selection-profile default --apply --json
56
56
  ```
57
57
 
58
+ Native hook invocations must use their installed adapter's selection profile.
59
+ An old client command or environment override naming another profile refuses
60
+ before synchronization or context loading. Review the hook installation and
61
+ restart the native client to load its current commands. Explicit `skills load`,
62
+ `skills context`, and `skills sync` commands can still select other profiles.
63
+
58
64
  The hook install `--include-vendor` option is retained for compatibility with
59
65
  older scripts. Hook planning always inventories and disables discovered vendor
60
66
  system skills; use `migrate native --include-vendor` when retiring their
@@ -94,6 +100,9 @@ allowlist unchanged: approve the two exact
94
100
  managed event/command pairs through Hermes normal hook trust and restart.
95
101
  The adapter refuses unreviewed installed plugin sources and custom Hermes
96
102
  homes/profiles, user-specific tilde expansion, and `TERMINAL_CWD` overrides.
103
+ Nonempty `HERMES_BUNDLED_PLUGINS` and `HERMES_BUNDLED_SKILLS` overrides are
104
+ also refused during discovery and hook checks; unset them to use the reviewed
105
+ default source paths. Custom bundle locations need a dedicated discovery adapter.
97
106
  Retire native payloads before use. Legacy `skills-cli.md` files can shadow the
98
107
  bridge and must also be preserved and retired before proceeding. Only `skill_view(name:
99
108
  "skills-cli")` is allowed natively; author payloads with Skills CLI commands.
@@ -102,6 +111,57 @@ context, and the trusted pre-tool guard blocks drift and native skill fallback;
102
111
  this is not a claim that Hermes can prevent every model call after a failed
103
112
  prompt hook or guarantee refusal if the native host/supervisor itself dies. Arbitrary project/plugin paths still require a discovery audit.
104
113
 
114
+ Reviewed discovery can also bind `directories: [{ path, sha256 }]` alongside
115
+ its full source-file hashes. The public SDK's `captureDiscoveryDirectories(paths)`
116
+ captures recursive, sorted path/type membership without reading plugin payloads.
117
+ Include every directory the reviewed loader scans, including plugin version
118
+ selection parents and Python entrypoint discovery directories. Membership hashes
119
+ detect added, removed or changed file types; keep source hashes for reviewed bytes.
120
+ Missing directories bind as `sha256: null`. Symlinks and special nodes refuse.
121
+ The bounds are 64 roots, 20,000 total entries, 8 MiB of path/type metadata and
122
+ 64 levels of recursion. Capture and checks require stable directory identities;
123
+ quiesce source writers for installation because these checks are not atomic with
124
+ a later native import.
125
+
126
+ For full binary or source-byte coverage, use the public SDK's
127
+ `captureDiscoveryByteSources(paths)` and retain its explicit `hashMode: "bytes"`
128
+ on each source witness. It hashes the exact file bytes, including invalid UTF-8,
129
+ with limits of 64 MiB per file and 256 MiB across one capture or verification.
130
+ Missing files bind as `sha256: null`; symlinks, special files and changing file
131
+ identities refuse. Raw witnesses cannot use configuration field projections.
132
+ Existing witnesses without `hashMode` retain their original UTF-8 decoding
133
+ contract and 16 MiB file limit; they are not silently converted into byte hashes.
134
+ Directory membership and file bytes are separate witnesses. Neither substitutes
135
+ for reviewing the actual executable, import paths or loader behavior.
136
+
137
+ For an explicitly reviewed launcher or interpreter reached through symlinks,
138
+ use `captureDiscoveryPathSources(paths)` and retain `hashMode: "path-bytes"`.
139
+ Its digest binds the canonical input, directory identities, each link's identity
140
+ and target, and the resolved regular file's identity and exact bytes. Relative
141
+ link targets resolve component by component, including `..` after an alias.
142
+ Missing targets also receive a digest that binds the path leading to their
143
+ absence. Retargeting to identical bytes, replacing a link or an ancestor, or
144
+ changing a file's metadata requires a fresh review. Unrelated sibling writes
145
+ do not change directory identity witnesses.
146
+
147
+ Path witnesses share the 64 MiB file and 256 MiB aggregate byte limits. Each
148
+ path allows at most 40 links, 256 traversal steps and 64 KiB of metadata; one
149
+ capture or verification permits 8 MiB of path metadata. Special nodes, cycles,
150
+ oversized inputs and changes during capture refuse. Native hook checks repeat
151
+ the witness verification; this does not make a later native execution atomic
152
+ with external writers. Keep source writers quiescent during activation.
153
+ Use `bytes` mode for configuration that hook installation will replace: path
154
+ witnesses cannot predict the future identity of a planned write. Existing raw
155
+ byte and directory witnesses still refuse links. Older clients reject the new
156
+ mode; upgrade the CLI before installing a policy that uses it.
157
+
158
+ Hermes requires directory witnesses, including when upgrading an older policy.
159
+ For an automatic bridge with no runtime installed, rerun normal `skills hook install`
160
+ to review and apply the new bindings. Existing native trust is preserved.
161
+ Reviewed Hermes installations need fresh source and directory coverage in their
162
+ `--discovery-inputs` file. Other agents may add directory witnesses to their
163
+ reviewed bindings without changing existing source-only reviews.
164
+
105
165
  Hook installation preserves unrelated configuration, hooks, and plugin assets.
106
166
  It disables discovered Codex native skills; exact system-skill trees can remain
107
167
  only with their hash-bound disabled paths; migration preserves these package files. A client that restores or changes
@@ -112,6 +172,13 @@ copies, and `--include-vendor` retires vendor `SKILL.md` discovery files while
112
172
  preserving shared scripts and assets. Archive receipts and configuration backups
113
173
  live under the Skills data directory.
114
174
 
175
+ After vendor documents are archived, inventory still scans their retained asset
176
+ directories for newly introduced skills. Vendor container traversal allows 32
177
+ directory levels; the ordinary native-root limit remains unchanged. Each inventory
178
+ is bounded to 20,000 discovery entries and 4 MiB of UTF-8 path metadata before
179
+ directory entries are retained or sorted. Unsupported special files and unsafe
180
+ directory links are refused.
181
+
115
182
  Native archives persist a version 2 recovery journal before moving payloads;
116
183
  `migrate native --json --apply` returns its `receiptPath`. The journal records
117
184
  every source, archive path, expected hash, and move status, then marks successful
@@ -132,6 +199,11 @@ session start and gates later prompt submission; its prompt hook does not
132
199
  inject context on the supported installed path. Other inventoried clients do
133
200
  not automatically gain a working prompt adapter.
134
201
 
202
+ Gemini's `BeforeAgent` prompt can include the Skills policy emitted at session
203
+ start. The hook excludes that exact leading policy from skill selection, so it
204
+ does not displace the user's requested skill. Other hook context and user text
205
+ remain part of the selection input.
206
+
135
207
  Known local plugin registrations are resolved automatically. Plugins with
136
208
  instruction-injecting hooks, unresolved runtime registrations, unsupported
137
209
  legacy command formats, and higher-precedence project discovery settings need