@hasna/skills 0.10.42 → 0.10.44

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
@@ -56,6 +56,11 @@ changes), when the profile holds a credential `skills login` did not store
56
56
  - An API key you already have: `printenv MY_SKILLS_KEY | skills login --api-key`
57
57
  reads it from stdin, verifies it and stores it. Nothing is echoed.
58
58
  - An email code instead of the browser: `skills login --email you@example.com`.
59
+ Interactive code input is masked. For an agent or headless terminal, first
60
+ request a code with `skills login --email you@example.com --json`, then send
61
+ the fresh code through stdin to `skills login --email you@example.com
62
+ --code-stdin --json`. This finishes the same sign-in without requesting another
63
+ code. Keep the code out of shell commands, arguments and logs.
59
64
  - Running `skills` in a terminal opens the interactive browser. It also works
60
65
  signed out and has the same account commands: `/login`, `/logout`, `/whoami`.
61
66
 
@@ -124,6 +129,59 @@ remains unchanged because synced plugins can also provide hooks, MCP servers,
124
129
  and language servers. A later plugin download that restores a skill document
125
130
  will trigger another drift refusal and require review.
126
131
 
132
+ A patched Codex that enforces an exact native host-path allowlist reports its
133
+ effective policy to the Skills SessionStart and UserPromptSubmit hooks as
134
+ `native_skill_policy`. The guard's adapter parses that envelope strictly
135
+ (capability `host-path-allowlist-v1`, restricted mode, non-host sources disabled,
136
+ the sole allowed path equal to the Skills bridge document, a lowercase SHA-256
137
+ `effectiveConfigDigest`, the consumer's `processId`, `session_id`, and `turn_id`
138
+ on UserPromptSubmit only), re-verifies the bridge document on every hook, walks
139
+ the hook's real parent chain to find the claimed consumer, binds its start time
140
+ and the digest of its executable to the reviewed digests stored under
141
+ `bridge.codexNativePolicy.executableDigests` in the managed policy (an absent set
142
+ refuses; Linux has no reviewed digest by default, so the adapter refuses there
143
+ unless an operator pins one after its own review; only the file's identity to
144
+ digest mapping is cached, in `agent-hooks/codex-native-policy-executable-cache.json`).
145
+ The Skills data directory is the operator trust root: the managed policy and the
146
+ cache file must be regular files reached through no symlink, owned by the current
147
+ user or root and writable by neither group nor world, or the adapter fails closed;
148
+ a writer with the same uid is outside this boundary. The adapter then requires
149
+ the authenticated channel binding of the native hook-policy peer contract
150
+ (`native-hook-policy-peer-v1`): Codex passes
151
+ the read end of a per-hook socketpair in `CODEX_NATIVE_SKILL_POLICY_FD`; the hook
152
+ forwards it as fd 3 to the qualified ancestor's own executable, `debug
153
+ verify-hook-policy --fd 3 --expected-process-id <pid> --input-sha256 <raw stdin
154
+ SHA-256>`, which sends a fresh challenge, verifies the actual writer and prints
155
+ one `native-hook-policy-peer-v1` attestation that must name that pid, that raw
156
+ stdin digest and exactly the emitted policy; it runs once per invocation and is
157
+ never cached. The managed trust default is empty, so no envelope is accepted
158
+ until an operator records reviewed executable digests; with none, the helper is
159
+ never run, and the hook's remaining deadline bounds both the first-use executable
160
+ hash and the helper. Operators bind those digests through the package, never by
161
+ editing the policy by hand:
162
+
163
+ ```bash
164
+ skills hook trust-native --platform darwin-arm64 --digest <sha256> --expected-policy-sha256 <sha256> --json
165
+ skills hook trust-native --platform darwin-arm64 --digest <sha256> --expected-policy-sha256 <sha256> --apply --json
166
+ ```
167
+
168
+ Preview comes first and writes nothing. Each `--digest` must be the SHA-256 of an
169
+ independently verified final native artifact, taken from its own review, never
170
+ from a fetch; the command accepts digests only from its arguments. `--apply`
171
+ requires the exact current policy SHA-256, re-checks it immediately before the
172
+ atomic 0600 replace, preserves the pre-change bytes in the usual migration backup
173
+ and reads the backup and the result back before it reports; it sets exactly the
174
+ given set for that one platform and preserves every other field (values
175
+ identical; the file is re-serialized with the package formatter).
176
+ A pre-existing group- or world-writable data directory (for example 0775) refuses
177
+ both this command and the adapter until its mode is corrected. Inertness rests on that authenticated restricted policy;
178
+ plugin classification proves nothing by itself and only narrows the scope to
179
+ installed-plugin documents under `~/.codex/plugins/cache` that the verified policy
180
+ cannot load. Those are checked before any hash or helper run, and the acceptance
181
+ is recorded at `agent-hooks/codex-native-policy-acceptance.json`; user,
182
+ repository and project copies still refuse, and format or digest checks never
183
+ prove the runtime policy on their own.
184
+
127
185
  Native hook invocations must use their installed adapter's selection profile.
128
186
  An old client command or environment override naming another profile refuses
129
187
  before synchronization or context loading. Review the hook installation and