dsh-codex-style-computer-use 1.3.0 → 2.0.0
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 +53 -22
- package/README.zh.md +46 -21
- package/icon.svg +29 -0
- package/lib/audit.js +7 -0
- package/lib/batch.js +14 -19
- package/lib/bin/attention-worker.exe +0 -0
- package/lib/bin/attention-worker.exe.json +1 -1
- package/lib/compact-feedback.js +175 -0
- package/lib/continuation.js +1 -1
- package/lib/core/bin/dsh-computer-use-worker.exe +0 -0
- package/lib/core/bin/dsh-computer-use-worker.exe.json +2 -2
- package/lib/core/compile-worker.ps1 +5 -1
- package/lib/core/index.js +452 -129
- package/lib/core/native-runtime.js +23 -1
- package/lib/core/winmd/Windows.winmd +0 -0
- package/lib/core/worker.cs +2415 -356
- package/lib/feedback-routes.json +11 -0
- package/lib/feedback.js +49 -16
- package/lib/image-output.js +59 -11
- package/lib/index.js +42 -7
- package/lib/key-command.js +37 -0
- package/lib/media-contract.js +43 -0
- package/lib/observations.js +267 -13
- package/lib/policy.js +30 -10
- package/lib/tool-contract.js +56 -0
- package/lib/tools.js +174 -51
- package/lib/verification-region.js +17 -0
- package/mcp/package.json +2 -1
- package/mcp/src/execution.js +8 -5
- package/mcp/src/index.js +16 -267
- package/mcp/src/tools.js +271 -0
- package/package.json +5 -2
- package/scripts/check-behavior.mjs +83 -0
- package/scripts/measure-tool-tokens.mjs +21 -0
- package/scripts/render-promo.py +81 -0
- package/skills/computer-use/SKILL.md +35 -8
- package/skills/computer-use/references/lifecycle.md +11 -7
- package/skills/computer-use/references/maintenance.md +9 -5
- package/skills/computer-use/references/precision.md +39 -14
- package/skills/computer-use/references/progressive-control.md +10 -4
- package/skills/computer-use/references/zero-uia-apps.md +54 -0
|
@@ -8,12 +8,34 @@ import { execFileSync } from 'node:child_process'
|
|
|
8
8
|
|
|
9
9
|
const hash = bytes => createHash('sha256').update(bytes).digest('hex')
|
|
10
10
|
const fileHash = file => hash(fs.readFileSync(file))
|
|
11
|
+
export const WORKER_PROTOCOL_VERSION = 2
|
|
12
|
+
|
|
13
|
+
// Identity comes from the exact executable selected for this worker. A custom
|
|
14
|
+
// executable without a verified manifest stays explicitly unverified.
|
|
15
|
+
export function nativeRuntimeIdentity (binary) {
|
|
16
|
+
let packageVersion = 'unknown'
|
|
17
|
+
try { packageVersion = JSON.parse(fs.readFileSync(new URL('../../package.json', import.meta.url), 'utf8')).version } catch {}
|
|
18
|
+
const binaryHash = fileHash(binary)
|
|
19
|
+
let manifest
|
|
20
|
+
try { manifest = JSON.parse(fs.readFileSync(`${binary}.json`, 'utf8')) } catch {}
|
|
21
|
+
const verified = manifest?.format === 1 && manifest?.platform === 'win32' && manifest?.architecture === 'x64' &&
|
|
22
|
+
/^[a-f0-9]{64}$/.test(manifest?.sourceSha256 || '') && manifest?.binarySha256 === binaryHash
|
|
23
|
+
const sourceHash = verified ? manifest.sourceSha256 : null
|
|
24
|
+
return { packageVersion, protocolVersion: WORKER_PROTOCOL_VERSION, sourceHash, binaryHash,
|
|
25
|
+
buildId: `${packageVersion}:${sourceHash?.slice(0, 16) || 'unverified'}:${binaryHash.slice(0, 16)}`,
|
|
26
|
+
verified: !!verified }
|
|
27
|
+
}
|
|
11
28
|
const framework = env => path.join(env.SystemRoot || env.windir || 'C:\\Windows', 'Microsoft.NET', 'Framework64', 'v4.0.30319')
|
|
12
29
|
|
|
13
30
|
export function workerReferences (env = process.env) {
|
|
14
31
|
const gac = path.join(env.SystemRoot || env.windir || 'C:\\Windows', 'Microsoft.NET', 'assembly', 'GAC_MSIL')
|
|
15
32
|
return ['System.dll', 'System.Core.dll', 'System.Drawing.dll', 'System.Web.Extensions.dll', 'System.Windows.Forms.dll',
|
|
16
|
-
...['UIAutomationClient', 'UIAutomationTypes', 'WindowsBase'].map(name => path.join(gac, name, 'v4.0_4.0.0.0__31bf3856ad364e35', `${name}.dll`))
|
|
33
|
+
...['UIAutomationClient', 'UIAutomationTypes', 'WindowsBase'].map(name => path.join(gac, name, 'v4.0_4.0.0.0__31bf3856ad364e35', `${name}.dll`)),
|
|
34
|
+
// Inbox OCR (2026-11-04): the legacy csc cannot compose the split WinMetadata winmds, so the
|
|
35
|
+
// union Windows.winmd ships inside the package and the WinRT interop pieces come from the OS.
|
|
36
|
+
path.join(framework(env), 'System.Runtime.dll'),
|
|
37
|
+
path.join(gac, 'System.Runtime.WindowsRuntime', 'v4.0_4.0.0.0__b77a5c561934e089', 'System.Runtime.WindowsRuntime.dll'),
|
|
38
|
+
path.join(import.meta.dirname, 'winmd', 'Windows.winmd')]
|
|
17
39
|
}
|
|
18
40
|
|
|
19
41
|
export function compileNativeBinary (source, output, references, { env = process.env } = {}) {
|
|
Binary file
|