@twinsearth/ai-prison-dsh-plugin 1.4.0 → 1.4.2

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/CHANGELOG.md CHANGED
@@ -2,6 +2,35 @@
2
2
 
3
3
  All notable changes to `@twinsearth/ai-prison-dsh-plugin` are recorded here.
4
4
 
5
+ ## [1.4.2] — 2026-11-18
6
+
7
+ ### Added
8
+ - Panel scrolling: the AI Prison page is a bounded scroll container now
9
+ (`height/maxHeight: 100%`, `overflow-y: auto`, thin scrollbar gutter,
10
+ `overscroll-behavior: contain`), so the page shows a vertical scrollbar and
11
+ the mouse wheel scrolls the card list instead of clipping the content.
12
+
13
+ ### Fixed
14
+ - CI: `test/harness.test.mjs` asserted Windows separators and failed on the
15
+ ubuntu runner. The test now builds expectations with `path.join`, so the
16
+ release workflow passes on every platform.
17
+
18
+ ## [1.4.1] — 2026-11-18
19
+ ## [1.4.1] — 2026-11-18
20
+
21
+ ### Fixed — tools vanished after switching the host to the real-Node runtime
22
+
23
+ - `lib/harness.js` resolved `@deepseek-ai/dsh-tools` only from paths next to
24
+ `process.execPath`. When the desktop host runs on the bundled Node with the
25
+ runtime extracted to `resources/dsh-runtime/dsh`, `execPath` no longer sits
26
+ next to the app, so `defineTool` was unavailable and `ai_prison_*` tools were
27
+ never registered (the watchdog row kept running).
28
+ - `installationAnchors` now also checks `DSH_INSTALL_DIR` and the host's second
29
+ argument (the runtime root) before the legacy desktop paths.
30
+ - New `test/harness.test.mjs` covers extracted-runtime, argument fallback and
31
+ Electron-as-Node layouts.
32
+
33
+ ## [1.4.0] — 2026-11-18
5
34
  ## [1.4.0] — 2026-11-18
6
35
 
7
36
  ### Added — P2 crash enforcement + per-plugin budgets, P3 external guard
package/client.js CHANGED
@@ -145,7 +145,23 @@ window.__ModuleLoader__.load({
145
145
  }
146
146
 
147
147
  const C = {
148
- page: { maxWidth: 980, margin: '0 auto', padding: '20px 24px 16px', color: 'var(--dsw-alias-label-primary, #0f1115)' },
148
+ page: {
149
+ maxWidth: 980,
150
+ margin: '0 auto',
151
+ padding: '20px 24px 16px',
152
+ color: 'var(--dsw-alias-label-primary, #0f1115)',
153
+ boxSizing: 'border-box',
154
+ height: '100%',
155
+ maxHeight: '100%',
156
+ minHeight: 0,
157
+ overflowY: 'auto',
158
+ overflowX: 'hidden',
159
+ overscrollBehavior: 'contain',
160
+ scrollbarGutter: 'stable',
161
+ scrollbarWidth: 'thin',
162
+ scrollbarColor: 'rgba(128,128,128,.55) transparent',
163
+ WebkitOverflowScrolling: 'touch',
164
+ },
149
165
  header: { display: 'flex', alignItems: 'center', gap: 12, marginBottom: 14 },
150
166
  title: { fontSize: 18, fontWeight: 600, margin: 0 },
151
167
  sub: { fontSize: 12, color: 'var(--dsw-alias-label-secondary, #61666b)', margin: '3px 0 0' },
package/lib/harness.js CHANGED
@@ -8,10 +8,17 @@ import { pathToFileURL } from 'node:url'
8
8
  * candidate is tried with createRequire because module resolution inside an asar
9
9
  * only works in the Electron-as-Node runtime that launched DSH.
10
10
  */
11
- export function installationAnchors({ execPath = process.execPath, env = process.env } = {}) {
11
+ export function installationAnchors({ execPath = process.execPath, env = process.env, argv = process.argv } = {}) {
12
12
  const dir = path.dirname(execPath)
13
+ // The desktop host may run on the bundled Node (real 6 GB heap) with the
14
+ // runtime extracted to disk. Then execPath no longer sits next to the app and
15
+ // the installation root arrives as DSH_INSTALL_DIR or as the host's second
16
+ // argument (after the entry module).
17
+ const argvRoot = typeof argv[2] === 'string' && argv[2].endsWith('package.json') === false ? argv[2] : undefined
13
18
  return [
14
19
  env.DSH_APP_ANCHOR,
20
+ env.DSH_INSTALL_DIR ? path.join(env.DSH_INSTALL_DIR, 'package.json') : undefined,
21
+ argvRoot && path.basename(argvRoot) === 'dsh' ? path.join(argvRoot, 'package.json') : undefined,
15
22
  path.join(dir, 'resources', 'app.asar', 'dsh', 'package.json'),
16
23
  path.join(dir, 'resources', 'app', 'dsh', 'package.json'),
17
24
  path.join(dir, '..', 'Resources', 'app.asar', 'dsh', 'package.json'),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@twinsearth/ai-prison-dsh-plugin",
3
- "version": "1.4.0",
3
+ "version": "1.4.2",
4
4
  "description": "AI Prison for DSH: six governance tools wrapping the aiprison CLI (levels, demo, drill, inspect, verify, repair-tail) plus a panel for the L0–L5 matrix and the audit-chain state. The CLI ships bundled for Windows, macOS and Linux; every capability-removal backend stays simulated.",
5
5
  "type": "module",
6
6
  "main": "index.js",