@hasna/skills 0.10.48 → 0.10.50

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.
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env bun
2
- export {};
2
+ import "../lib/launch-cwd-apply.js";
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env bun
2
- export {};
2
+ import "../lib/launch-cwd-apply.js";
@@ -1,4 +1,21 @@
1
1
  #!/usr/bin/env bun
2
+ /**
3
+ * Schema migration for whichever backend is configured.
4
+ *
5
+ * Migrations are per-dialect files, not one file rewritten at runtime. Both approaches
6
+ * were on the table; the parallel set won because a runtime translator would have to
7
+ * turn `jsonb`, `timestamptz`, `bigserial`, `::jsonb` casts, `now()` defaults, and
8
+ * `CREATE EXTENSION` into SQLite as a text transformation, and would silently mistranslate
9
+ * the first construct a future migration used that the translator had never seen - on
10
+ * the operator's machine, at migrate time, against their real data. Two hand-written
11
+ * files fail at review time instead, and src/server/schema-parity.test.ts executes the
12
+ * SQLite one and diffs its real introspected shape against the Postgres DDL so the pair
13
+ * cannot drift.
14
+ *
15
+ * Applied-version keys are file basenames, so migrations/0001_*.sql moving into
16
+ * migrations/postgres/ did not orphan databases that had already applied it.
17
+ */
18
+ import "../lib/launch-cwd-apply.js";
2
19
  import { type DatabaseTarget } from "./database-url.js";
3
20
  export interface MigrationResult {
4
21
  backend: DatabaseTarget["kind"];
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env bun
2
+ import "../lib/launch-cwd-apply.js";
2
3
  import { ArtifactStorage } from "../sdk/storage.js";
3
4
  import type { SkillsProductStore } from "../sdk/storage.js";
4
5
  export declare function runWorkerOnce(store: SkillsProductStore, workerId?: string, storage?: ArtifactStorage): Promise<boolean>;
@@ -239,8 +239,8 @@ Invalid values for the display preferences refuse capture and verification. Ever
239
239
  other field remains bound, including unknown future fields, hooks and their
240
240
  exact commands, permissions, native skill suppression and synchronization,
241
241
  plugin roots, marketplaces, environment and configuration precedence. Language,
242
- output style, theme, and command-bearing status or file suggestion settings are
243
- intentionally retained. These are narrow preference and inference-selection
242
+ output style, theme (v4 alone permits the built-in theme values), and
243
+ command-bearing status or file suggestion settings are intentionally retained. These are narrow preference and inference-selection
244
244
  exceptions, not general permission to change Claude configuration. The native
245
245
  bridge guard continues to check its exact commands and native Skill policy.
246
246
 
@@ -263,6 +263,43 @@ or guarantee when a running native client adopts a settings edit.
263
263
  Those complementary checks retain their existing exact registration and hook
264
264
  entry comparisons; this mode does not relax them for property-order changes.
265
265
 
266
+ ### Explicit v4 built-in theme reviews
267
+
268
+ `claude-settings-v4` is an explicit successor to v3. It binds everything v3
269
+ binds, with one more omission: the top-level `theme` key, and only when its
270
+ value is exactly one of the built-in values `auto`, `dark`, `light`,
271
+ `dark-daltonized`, `light-daltonized`, `dark-ansi` or `light-ansi`. The list is
272
+ pinned in code (`CLAUDE_BUILTIN_THEMES`) from the
273
+ [`theme` setting reference](https://code.claude.com/docs/en/settings-reference#theme)
274
+ and the [built-in presets](https://code.claude.com/docs/en/terminal-config#match-the-color-theme),
275
+ read on 2026-10-07. Custom and plugin themes (`custom:<slug>`,
276
+ `custom:<plugin-name>:<slug>`) load theme files, so they stay bound, as does any
277
+ other value, type, spelling or letter case, and any `theme` key nested inside
278
+ another setting. `skipDangerousModePermissionPrompt`, permissions, hooks,
279
+ environment, `apiKeyHelper` and other helpers, plugins, marketplaces, custom
280
+ model values and unknown settings stay bound exactly as in v3. The digest is
281
+ domain-separated from v3.
282
+
283
+ Existing v1, v2 and v3 witnesses keep their meaning; nothing selects v4
284
+ implicitly, and a stored witness is never rewritten. A policy opts in through
285
+ either explicit path:
286
+
287
+ - a fresh review: `skills hook witness --kind claude-settings-v4 --path
288
+ <settings.json> --json` (or `captureClaudeSettingsV4(path)`), placed in the
289
+ reviewed discovery inputs and applied with the normal `skills hook install
290
+ --discovery-inputs <file>` plan/apply flow;
291
+ - a preserved-preimage upgrade: `skills hook rebind-settings --agent claude
292
+ --claude-witness-version 4 --reviewed-preimage <preserved-settings.json>
293
+ --expected-policy-sha256 <policy-hash> --expected-settings-sha256
294
+ <settings-hash>` (or `upgradeClaudeSettingsWitnessV4`). It accepts a raw, v1,
295
+ v2 or v3 witness, proves the preimage matches it in its original mode, and
296
+ refuses unless the current settings equal the preimage under v4. Without
297
+ `--claude-witness-version` the rebind target remains v3.
298
+
299
+ Install a runtime that recognizes `claude-settings-v4`, including any bundled
300
+ copy of the verifier, before a policy carries it; an older runtime refuses the
301
+ unknown hash mode.
302
+
266
303
  ## Verification and limits
267
304
 
268
305
  Unit tests cover provenance and mapping failures, offline/revoked authorities,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hasna/skills",
3
- "version": "0.10.48",
3
+ "version": "0.10.50",
4
4
  "description": "Skills library for AI coding agents",
5
5
  "type": "module",
6
6
  "bin": {