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.
Files changed (41) hide show
  1. package/README.md +53 -22
  2. package/README.zh.md +46 -21
  3. package/icon.svg +29 -0
  4. package/lib/audit.js +7 -0
  5. package/lib/batch.js +14 -19
  6. package/lib/bin/attention-worker.exe +0 -0
  7. package/lib/bin/attention-worker.exe.json +1 -1
  8. package/lib/compact-feedback.js +175 -0
  9. package/lib/continuation.js +1 -1
  10. package/lib/core/bin/dsh-computer-use-worker.exe +0 -0
  11. package/lib/core/bin/dsh-computer-use-worker.exe.json +2 -2
  12. package/lib/core/compile-worker.ps1 +5 -1
  13. package/lib/core/index.js +452 -129
  14. package/lib/core/native-runtime.js +23 -1
  15. package/lib/core/winmd/Windows.winmd +0 -0
  16. package/lib/core/worker.cs +2415 -356
  17. package/lib/feedback-routes.json +11 -0
  18. package/lib/feedback.js +49 -16
  19. package/lib/image-output.js +59 -11
  20. package/lib/index.js +42 -7
  21. package/lib/key-command.js +37 -0
  22. package/lib/media-contract.js +43 -0
  23. package/lib/observations.js +267 -13
  24. package/lib/policy.js +30 -10
  25. package/lib/tool-contract.js +56 -0
  26. package/lib/tools.js +174 -51
  27. package/lib/verification-region.js +17 -0
  28. package/mcp/package.json +2 -1
  29. package/mcp/src/execution.js +8 -5
  30. package/mcp/src/index.js +16 -267
  31. package/mcp/src/tools.js +271 -0
  32. package/package.json +5 -2
  33. package/scripts/check-behavior.mjs +83 -0
  34. package/scripts/measure-tool-tokens.mjs +21 -0
  35. package/scripts/render-promo.py +81 -0
  36. package/skills/computer-use/SKILL.md +35 -8
  37. package/skills/computer-use/references/lifecycle.md +11 -7
  38. package/skills/computer-use/references/maintenance.md +9 -5
  39. package/skills/computer-use/references/precision.md +39 -14
  40. package/skills/computer-use/references/progressive-control.md +10 -4
  41. 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