@codebam/dsh-thinking-auditor 0.1.0 → 0.1.1

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
@@ -27,7 +27,30 @@ It is **not a lie detector**. It does not read intent and does not label a model
27
27
 
28
28
  ## Install
29
29
 
30
- Add a row to a profile patch (`~/.dsh/profiles/<profile>/cordis.patch.yml`):
30
+ ### npm / profile dependency (0.1.1+)
31
+
32
+ Version `0.1.1` declares `dsh.bundle.patch`, so installing it through the dsh plugin command auto-activates it:
33
+
34
+ ```sh
35
+ dsh plugin --profile <profile> add @codebam/dsh-thinking-auditor
36
+ ```
37
+
38
+ `dsh plugin` appends the package to the profile's `dsh.profile.bundles`, and the bundle patch mounts the auditor row with the defaults (`enabled: true`, `gates.maxTier: verify`, `store.persist: true`). Restart dsh if the running profile does not hot-reload its bundle list.
39
+
40
+ To change defaults per profile without editing the package, either tune the `thinking-audit` settings namespace or address the row by id in `~/.dsh/profiles/<profile>/cordis.patch.yml` (later layers win):
41
+
42
+ ```yaml
43
+ - id: thinking-auditor
44
+ config:
45
+ gates:
46
+ maxTier: block # observe | verify | block | cancel
47
+ ```
48
+
49
+ `0.1.0` has no bundle metadata, so it requires the explicit row below or an upgrade.
50
+
51
+ ### Source / pinned-path install
52
+
53
+ When loading the plugin from a checkout or an absolute path instead of a profile dependency, add the row yourself (`~/.dsh/profiles/<profile>/cordis.patch.yml`):
31
54
 
32
55
  ```yaml
33
56
  - insert:
@@ -0,0 +1,21 @@
1
+ # @codebam/dsh-thinking-auditor bundle patch.
2
+ #
3
+ # Declared through `dsh.bundle.patch` in package.json, so `dsh plugin add`
4
+ # appends this package to the profile's `dsh.profile.bundles` and the row below
5
+ # mounts automatically. The profile's own cordis.patch.yml and the home-level
6
+ # patch are applied after every bundle layer, so a deployment can override this
7
+ # row by id (or tune it from the `thinking-audit` settings namespace) without
8
+ # editing the package.
9
+ #
10
+ # The row deliberately carries only the defaults a new deployment should get;
11
+ # omitted fields resolve through the plugin's own defaults. Raise
12
+ # `gates.maxTier` to `block` or `cancel` only when the deployment wants T2/T3.
13
+ - insert:
14
+ - id: thinking-auditor
15
+ name: '@codebam/dsh-thinking-auditor'
16
+ config:
17
+ enabled: true
18
+ gates:
19
+ maxTier: verify
20
+ store:
21
+ persist: true
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codebam/dsh-thinking-auditor",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Claim-vs-evidence auditor for live DeepSeek Harness reasoning traces: session-less same-model auditing with deterministic verification gates.",
5
5
  "keywords": [
6
6
  "deepseek-harness",
@@ -29,11 +29,13 @@
29
29
  "main": "./index.mjs",
30
30
  "exports": {
31
31
  ".": "./index.mjs",
32
+ "./cordis.patch.yml": "./cordis.patch.yml",
32
33
  "./package.json": "./package.json"
33
34
  },
34
35
  "files": [
35
36
  "index.mjs",
36
37
  "src/",
38
+ "cordis.patch.yml",
37
39
  "packaging/",
38
40
  "README.md",
39
41
  "LICENSE"
@@ -78,5 +80,10 @@
78
80
  "@deepseek-ai/dsh-tools": {
79
81
  "optional": true
80
82
  }
83
+ },
84
+ "dsh": {
85
+ "bundle": {
86
+ "patch": "./cordis.patch.yml"
87
+ }
81
88
  }
82
89
  }
@@ -16,7 +16,7 @@ workspace. Copy them into the profile repo and pin the revision on first build.
16
16
  ## Steps
17
17
 
18
18
  1. **Pin the plugin.** In `pkgs/dsh-thinking-auditor.nix`, set `rev` to the
19
- pushed commit/tag (`v0.1.0` by default) and replace `hash = lib.fakeHash`
19
+ pushed commit/tag (`v0.1.1` by default) and replace `hash = lib.fakeHash`
20
20
  with the hash Nix reports on the first build:
21
21
 
22
22
  ```sh
@@ -31,14 +31,17 @@ workspace. Copy them into the profile repo and pin the revision on first build.
31
31
 
32
32
  3. **Copy the plugin into `$DSH_HOME`.** Add Part A of
33
33
  `agents.nix.snippet` (`dshThinkingAuditor`) to the same attribute set as
34
- the existing plugin copy blocks. It copies `index.mjs`, `src/`, and
35
- `package.json` into `~/.dsh/profiles/thinking-auditor/` and symlinks
34
+ the existing plugin copy blocks. It copies `index.mjs`, `src/`,
35
+ `cordis.patch.yml`, and `package.json` into
36
+ `~/.dsh/profiles/thinking-auditor/` and symlinks
36
37
  `node_modules` to `~/.dsh/profiles/node_modules` for peer resolution.
37
38
 
38
39
  4. **Mount the plugin row.** Append Part B to the `dshProfilePatch`
39
- concatenation in `home/agents.nix`. The default row caps the auditor at
40
- T1; raise `gates.maxTier` to `block` or `cancel` only when the deployment
41
- wants an irreversible-action gate or an explicit hard stop.
40
+ concatenation in `home/agents.nix`. This copy route keeps an explicit row;
41
+ a profile that depends on the package by name is auto-mounted through its
42
+ `dsh.bundle.patch` metadata. The default row caps the auditor at T1; raise
43
+ `gates.maxTier` to `block` or `cancel` only when the deployment wants an
44
+ irreversible-action gate or an explicit hard stop.
42
45
 
43
46
  5. **Verify the build.** From the profile repo:
44
47
 
@@ -71,6 +74,11 @@ workspace. Copy them into the profile repo and pin the revision on first build.
71
74
  session log, so it does not change session storage compatibility and is not
72
75
  uploaded by the official DeepSeek log route. Set `store.persist: false` to
73
76
  keep records memory-only.
77
+ - `@codebam/dsh-thinking-auditor@0.1.1` declares `dsh.bundle.patch`, so a
78
+ profile that installs it with `dsh plugin add` auto-appends it to
79
+ `dsh.profile.bundles` and mounts the bundle row without a manual patch edit.
80
+ The explicit Nix copy route below remains useful for pinned, source-built
81
+ deployments.
74
82
  - `thinking-audit` is a live settings namespace when `dsh-settings-file` is
75
83
  mounted; thresholds and gates can be tuned there without editing the profile
76
84
  patch.
@@ -6,7 +6,9 @@
6
6
  # ---------------------------------------------------------------------------
7
7
 
8
8
  # @codebam/dsh-thinking-auditor is published from its own repository,
9
- # pinned in pkgs/dsh-thinking-auditor.nix. Copy it into $DSH_HOME rather
9
+ # pinned in pkgs/dsh-thinking-auditor.nix. The package also declares
10
+ # dsh.bundle.patch, so a profile that depends on it by name activates it
11
+ # automatically; this copy route keeps the explicit row below. Copy it into $DSH_HOME rather
10
12
  # than symlinking: Node resolves a module through its symlink target, so
11
13
  # a symlinked module would look for @deepseek-ai/* next to the store
12
14
  # directory instead of the profile's node_modules.
@@ -18,6 +20,7 @@
18
20
  run ${pkgs.coreutils}/bin/cp -r ${pkgs.dsh-thinking-auditor}/lib/dsh-thinking-auditor/src "$HOME/.dsh/profiles/thinking-auditor/src"
19
21
  run ${pkgs.coreutils}/bin/chmod -R u+w "$HOME/.dsh/profiles/thinking-auditor/src"
20
22
  run ${pkgs.coreutils}/bin/cp -f ${pkgs.dsh-thinking-auditor}/lib/dsh-thinking-auditor/package.json "$HOME/.dsh/profiles/thinking-auditor/package.json"
23
+ run ${pkgs.coreutils}/bin/cp -f ${pkgs.dsh-thinking-auditor}/lib/dsh-thinking-auditor/cordis.patch.yml "$HOME/.dsh/profiles/thinking-auditor/cordis.patch.yml"
21
24
  run ${pkgs.coreutils}/bin/rm -f "$HOME/.dsh/profiles/thinking-auditor/node_modules"
22
25
  run ${pkgs.coreutils}/bin/ln -sfn "$HOME/.dsh/profiles/node_modules" "$HOME/.dsh/profiles/thinking-auditor/node_modules"
23
26
  '';
@@ -7,7 +7,7 @@
7
7
 
8
8
  stdenvNoCC.mkDerivation {
9
9
  pname = "dsh-thinking-auditor";
10
- version = "0.1.0";
10
+ version = "0.1.1";
11
11
 
12
12
  # @codebam/dsh-thinking-auditor is published to npm from its own repository;
13
13
  # this host pins the reviewed revision so the profile copies exactly the
@@ -17,13 +17,13 @@ stdenvNoCC.mkDerivation {
17
17
  src = fetchFromGitHub {
18
18
  owner = "codebam";
19
19
  repo = "dsh-thinking-auditor";
20
- rev = "v0.1.0";
20
+ rev = "v0.1.1";
21
21
  hash = lib.fakeHash;
22
22
  };
23
23
 
24
24
  nativeBuildInputs = [ nodejs ];
25
25
 
26
- # The published files are the ESM sources; there is no build step.
26
+ # The published files are the ESM sources plus the bundle patch; there is no build step.
27
27
  dontBuild = true;
28
28
 
29
29
  # home/agents.nix copies this directory into $DSH_HOME next to the profile's
@@ -31,7 +31,7 @@ stdenvNoCC.mkDerivation {
31
31
  installPhase = ''
32
32
  runHook preInstall
33
33
  install -d -m 0755 "$out/lib/dsh-thinking-auditor"
34
- cp -r index.mjs package.json src "$out/lib/dsh-thinking-auditor/"
34
+ cp -r index.mjs package.json cordis.patch.yml src "$out/lib/dsh-thinking-auditor/"
35
35
  cp LICENSE "$out/lib/dsh-thinking-auditor/"
36
36
  runHook postInstall
37
37
  '';