dsh-crate-web 0.1.2-preview.3 → 0.1.2-preview.6
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 +14 -3
- package/core/dsh_pack/_version.py +1 -1
- package/core/dsh_pack/cli.py +2 -2
- package/core/dsh_pack/desktop_verify.py +6 -0
- package/core/dsh_pack/errors.py +14 -0
- package/core/dsh_pack/export.py +58 -15
- package/lib/index.js +6 -29
- package/package.json +7 -2
- package/packaging/windows-terminal/README.md +43 -0
- package/packaging/windows-terminal/build.py +258 -0
- package/packaging/windows-terminal/dsh__node_modules__@deepseek-ai__dsh-sandbox-local__lib__index.js.patch +21 -0
- package/packaging/windows-terminal/dsh__node_modules__@deepseek-ai__dsh-subprocess-local__lib__index.js.patch +51 -0
- package/packaging/windows-terminal/dsh__node_modules__@deepseek-ai__dsh-terminal-bash__lib__index.js.patch +38 -0
- package/packaging/windows-terminal/dsh__node_modules__node-pty__lib__windowsPtyAgent.js.patch +31 -0
- package/packaging/windows-terminal/dsh__node_modules__node-pty__lib__windowsTerminal.js.patch +107 -0
- package/packaging/windows-terminal/manifest.json +577 -0
- package/runtime-inventory.mjs +31 -0
- package/skills/dsh-crate-troubleshooting/compatibility.json +1 -1
- package/skills/dsh-crate-troubleshooting/reference/diagnostics.generated.md +1 -1
- package/verify-desktop.mjs +6 -2
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/** Read Loader metadata only; a partial enumeration never proves absence. */
|
|
2
|
+
const phases = { 0: 'pending', 1: 'loading', 2: 'active', 3: 'failed', 4: null, 5: 'unloading' }
|
|
3
|
+
export function readRuntimeInventory(ctx) {
|
|
4
|
+
const rows = []
|
|
5
|
+
const loader = ctx?.loader
|
|
6
|
+
if (!loader || typeof loader.entries !== 'function') return { rows, complete: false }
|
|
7
|
+
try {
|
|
8
|
+
for (const entry of loader.entries()) {
|
|
9
|
+
if (entry.options.group) continue
|
|
10
|
+
if (typeof entry.options.name !== 'string' || typeof entry.id !== 'string') throw new Error('invalid Loader row')
|
|
11
|
+
if (entry.options.name.startsWith('cordis:')) continue
|
|
12
|
+
rows.push({ id: entry.id, name: entry.options.name, enabled: entry.disabled !== true,
|
|
13
|
+
phase: entry.fiber ? (phases[entry.fiber.state] ?? null) : null })
|
|
14
|
+
}
|
|
15
|
+
return { rows, complete: true }
|
|
16
|
+
} catch {
|
|
17
|
+
return { rows, complete: false }
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export function inspectorApplicability(rows, complete) {
|
|
22
|
+
if (complete !== true || !Array.isArray(rows) || !rows.length || rows.some(row => !row ||
|
|
23
|
+
typeof row.id !== 'string' || typeof row.name !== 'string' || typeof row.enabled !== 'boolean')) {
|
|
24
|
+
throw new Error('Inspector applicability not confirmed: runtime inventory missing or incomplete')
|
|
25
|
+
}
|
|
26
|
+
const matches = rows.filter(row => row.name === '@deepseek-ai/dsh-experimental-inspector')
|
|
27
|
+
const applicable = matches.some(row => row.enabled)
|
|
28
|
+
return { inventoryComplete: true, inventoryCount: rows.length, applicable,
|
|
29
|
+
reason: applicable ? 'enabled' : matches.length ? 'disabled' : 'not-declared',
|
|
30
|
+
plugins: matches.map(({ id, name, enabled, phase }) => ({ id, name, enabled, phase })) }
|
|
31
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# DSH Crate Diagnostic Codes
|
|
2
2
|
|
|
3
|
-
> Generated from `core/dsh_pack/diagnostics.py` (schema v1, producer `dsh-crate`, crate 0.1.2-preview.
|
|
3
|
+
> Generated from `core/dsh_pack/diagnostics.py` (schema v1, producer `dsh-crate`, crate 0.1.2-preview.6). Do not edit by hand.
|
|
4
4
|
|
|
5
5
|
Total codes: **79**. Stages: **16**.
|
|
6
6
|
|
package/verify-desktop.mjs
CHANGED
|
@@ -7,6 +7,7 @@ import { open, mkdir, readdir, lstat, readFile, writeFile } from 'node:fs/promis
|
|
|
7
7
|
import { createServer } from 'node:net'
|
|
8
8
|
import { dirname, isAbsolute, join, relative, resolve } from 'node:path'
|
|
9
9
|
import { pathToFileURL } from 'node:url'
|
|
10
|
+
import { inspectorApplicability } from './runtime-inventory.mjs'
|
|
10
11
|
|
|
11
12
|
const sleep = ms => new Promise(resolve => setTimeout(resolve, ms))
|
|
12
13
|
const inside = (root, path) => { const part = relative(resolve(root), resolve(path)); return part === '' || (!part.startsWith('..') && !isAbsolute(part)) }
|
|
@@ -61,7 +62,9 @@ export function validateSurface(value, home, webPort) {
|
|
|
61
62
|
throw new Error('Verification backend identity does not match its isolated desktop')
|
|
62
63
|
}
|
|
63
64
|
if (!Number.isInteger(webPort) || webPort < 1 || webPort > 65535) throw new Error('Owned backend Web port missing from startup log')
|
|
64
|
-
|
|
65
|
+
const inspector = inspectorApplicability(value.runtimePlugins, value.runtimeInventoryComplete)
|
|
66
|
+
const { runtimePlugins, runtimeInventoryComplete, ...surface } = value
|
|
67
|
+
return { ...surface, inspector, webPort, authenticationContext: 'official owned desktop protocol and authenticated profiles route; credentials not exported' }
|
|
65
68
|
}
|
|
66
69
|
|
|
67
70
|
class Cdp {
|
|
@@ -247,7 +250,8 @@ export class DesktopController {
|
|
|
247
250
|
let result; try { result = await backend.json() } catch { result = {} }
|
|
248
251
|
return { accountMenu, httpStatus: response.status, origin: location.origin, protocol: location.protocol, hostname: location.hostname,
|
|
249
252
|
backendHttpStatus: backend.status, backendStatus: result.status, runtimePid: result.runtime?.pid,
|
|
250
|
-
|
|
253
|
+
runtimeHome: result.runtime?.dshHome, runtimeProfile: result.runtime?.currentProfile,
|
|
254
|
+
runtimePlugins: result.runtimePlugins, runtimeInventoryComplete: result.runtimeInventoryComplete };
|
|
251
255
|
})()`)
|
|
252
256
|
const log = join(this.config.job, `desktop-${this.generation}.stdout.log`)
|
|
253
257
|
if ((await lstat(log)).size > 1024 * 1024) throw new Error('Owned desktop startup log exceeded observation limit')
|