dsh-vision-router 2.0.0 → 2.1.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 (92) hide show
  1. package/README.md +33 -16
  2. package/README.zh.md +34 -17
  3. package/cordis.patch.yml +19 -9
  4. package/docs/architecture/2x-contract-ledger.md +165 -0
  5. package/docs/architecture/compat-inventory.md +121 -0
  6. package/docs/architecture/dsh-compatibility-matrix.md +57 -0
  7. package/docs/architecture/dsh-support-window.md +50 -0
  8. package/docs/architecture/final-closure-audit.md +148 -0
  9. package/docs/architecture/p2-jobs-feasibility.md +94 -0
  10. package/docs/architecture/p3-compat-retirement.md +46 -0
  11. package/docs/architecture/p3-host-native-seams.md +43 -0
  12. package/docs/architecture/p3-native-recovery-evaluation.md +65 -0
  13. package/docs/architecture/runtime-boundaries.md +124 -0
  14. package/docs/releases/v2.0.1.md +17 -0
  15. package/docs/releases/v2.1.0-support-window.md +29 -0
  16. package/docs/releases/v2.1.0.md +83 -0
  17. package/entry.js +13 -307
  18. package/index.js +85 -352
  19. package/lib/abort-signal-compat.js +191 -0
  20. package/lib/adapter-update-coalescer.js +113 -29
  21. package/lib/adversarial-hardening.js +24 -9
  22. package/lib/artifact-boundary.js +16 -175
  23. package/lib/artifact-io.js +220 -0
  24. package/lib/artifact-retention.js +305 -53
  25. package/lib/catalog-corrections.js +6 -1
  26. package/lib/client-host-compat-prelude.js +249 -0
  27. package/lib/client-presentation-boundary.js +61 -3
  28. package/lib/client.js +71 -72
  29. package/lib/core-vision-surface.js +124 -0
  30. package/lib/depth-guidance.js +114 -90
  31. package/lib/doctor-cli-p0.js +168 -0
  32. package/lib/doctor-cli.js +7 -0
  33. package/lib/doctor-vision-limits.js +72 -0
  34. package/lib/dsh-contract-compat.js +207 -39
  35. package/lib/dsh-host-capabilities.js +107 -0
  36. package/lib/dsh-support-window.js +48 -0
  37. package/lib/http-compat.js +22 -6
  38. package/lib/image-resource-governor.js +35 -10
  39. package/lib/legacy-core-vision-policy-bridge.js +25 -226
  40. package/lib/legacy-global-proxy-boundary.js +127 -0
  41. package/lib/live-model-client-prelude.js +0 -12
  42. package/lib/mixed-router.js +81 -81
  43. package/lib/public-entry.js +42 -4
  44. package/lib/runtime-composition.js +348 -0
  45. package/lib/runtime-i18n-boundary.js +683 -0
  46. package/lib/runtime-i18n-core-scope.js +56 -0
  47. package/lib/runtime-i18n-core.js +34 -0
  48. package/lib/runtime-i18n.js +121 -0
  49. package/lib/session-surface-policy.js +97 -0
  50. package/lib/session-vision-index.js +282 -0
  51. package/lib/session-vision-runtime.js +48 -0
  52. package/lib/settings-factory-lifecycle.js +144 -0
  53. package/lib/settings-ia-client-prelude.js +74 -2
  54. package/lib/settings-limit-client-prelude.js +110 -0
  55. package/lib/settings-native-card-layout.js +297 -0
  56. package/lib/settings-number-contract.js +29 -0
  57. package/lib/structured-flow-hardening.js +207 -76
  58. package/lib/tesseract-exec-compat.js +58 -32
  59. package/lib/update-check.js +17 -5
  60. package/lib/v2-settings-ia-integration.js +9 -4
  61. package/lib/vision-artifact-store.js +77 -0
  62. package/lib/vision-backend-runtime-policy.js +6 -2
  63. package/lib/vision-background-benchmark.js +130 -41
  64. package/lib/vision-background-failure-policy.js +70 -0
  65. package/lib/vision-background-stop-store.js +54 -9
  66. package/lib/vision-capability-benchmark-client.js +57 -66
  67. package/lib/vision-capability-benchmark-presentation.js +97 -0
  68. package/lib/vision-capability-benchmark-service.js +3 -3
  69. package/lib/vision-execution-order-apply.js +61 -0
  70. package/lib/vision-execution-order-plan.js +64 -0
  71. package/lib/vision-execution-order.js +38 -0
  72. package/lib/vision-limit-diagnostics.js +202 -0
  73. package/lib/vision-product-presentation.js +284 -0
  74. package/lib/vision-provider-transport.js +197 -0
  75. package/lib/vision-resilience.js +87 -45
  76. package/lib/vision-routing-evidence.js +366 -0
  77. package/lib/vision-routing-runtime.js +278 -0
  78. package/lib/vision-tool-runtime-boundary.js +27 -21
  79. package/lib/vision-turn-budget-client-prelude.js +9 -9
  80. package/lib/web/benchmark-panel.js +6 -0
  81. package/lib/web/diagnostics-panel.js +44 -0
  82. package/lib/web/index.js +60 -0
  83. package/lib/web/model-picker.js +22 -0
  84. package/lib/web/onboarding.js +6 -0
  85. package/lib/web/product-state.js +59 -0
  86. package/lib/web/remote-settings-client.js +8 -0
  87. package/lib/web/routing-section.js +6 -0
  88. package/lib/web/settings-controller.js +6 -0
  89. package/lib/web-capability-boundary.js +65 -9
  90. package/lib/windows-screenshot-dpi-compat.js +148 -0
  91. package/package.json +14 -6
  92. package/lib/vision-capability-shadow.js +0 -576
@@ -1,6 +1,8 @@
1
1
  const wrappedContexts = new WeakMap()
2
2
  const patchedWebServers = new WeakMap()
3
3
 
4
+ const VISION_ROUTER_WEB_PREFIX = '/_dsh/vision-router/'
5
+
4
6
  const LOCAL_MUTATION_ROUTES = new Map([
5
7
  ['/_dsh/vision-router/self-update', new Set(['POST'])],
6
8
  ['/_dsh/vision-router/logs', new Set(['POST'])],
@@ -89,6 +91,41 @@ function rejectRemoteMutation(res) {
89
91
  }))
90
92
  }
91
93
 
94
+ function rejectUnauthenticatedHostRequest(res, status) {
95
+ const code = status === 403 ? 403 : 401
96
+ res.writeHead(code, {
97
+ 'content-type': 'application/json; charset=utf-8',
98
+ 'cache-control': 'no-store',
99
+ })
100
+ res.end(JSON.stringify({
101
+ ok: false,
102
+ error: code === 401 ? 'dsh web authentication required' : 'dsh web request rejected',
103
+ }))
104
+ }
105
+
106
+ function hostRequestRejection(req, getConnection) {
107
+ // Direct handler calls and unit fixtures intentionally have no transport and
108
+ // are not browser requests. Do not turn alpha.1 browser authentication into
109
+ // a new requirement for internal Host composition or old compatibility tests.
110
+ if (!req?.socket && !req?.connection) return undefined
111
+ let connection
112
+ try { connection = typeof getConnection === 'function' ? getConnection() : undefined }
113
+ catch { connection = undefined }
114
+ const requestRejection = connection && typeof connection.requestRejection === 'function'
115
+ ? connection.requestRejection.bind(connection)
116
+ : undefined
117
+ if (requestRejection === undefined) return undefined
118
+ try {
119
+ const status = requestRejection(req)
120
+ return status === 401 || status === 403 ? status : undefined
121
+ } catch {
122
+ // Host authentication is a security boundary. If an alpha/newer Host
123
+ // advertises it but cannot evaluate this request, fail closed rather than
124
+ // silently falling back to the pre-authenticated rc.6/rc.7 behavior.
125
+ return 403
126
+ }
127
+ }
128
+
92
129
  function redactRemoteBody(path, body) {
93
130
  if (!body || typeof body !== 'object' || Array.isArray(body)) return body
94
131
  if (path === '/_dsh/vision-router/update-check') {
@@ -140,17 +177,25 @@ function runWithRemoteReadRedaction(path, handler, req, res) {
140
177
  return result
141
178
  }
142
179
 
143
- function guardedRoute(route) {
180
+ function guardedRoute(route, getConnection) {
144
181
  if (!route || typeof route !== 'object' || typeof route.handler !== 'function') return route
182
+ const pluginOwned = typeof route.path === 'string' && route.path.startsWith(VISION_ROUTER_WEB_PREFIX)
145
183
  const mutationMethods = LOCAL_MUTATION_ROUTES.get(route.path)
146
184
  const sensitiveReadMethods = SENSITIVE_READ_ROUTES.get(route.path)
147
- if ((!mutationMethods || mutationMethods.size === 0) && (!sensitiveReadMethods || sensitiveReadMethods.size === 0)) {
185
+ if (!pluginOwned && (!mutationMethods || mutationMethods.size === 0) && (!sensitiveReadMethods || sensitiveReadMethods.size === 0)) {
148
186
  return route
149
187
  }
150
188
  const originalHandler = route.handler
151
189
  return {
152
190
  ...route,
153
191
  handler(req, res) {
192
+ if (pluginOwned) {
193
+ const rejection = hostRequestRejection(req, getConnection)
194
+ if (rejection !== undefined) {
195
+ rejectUnauthenticatedHostRequest(res, rejection)
196
+ return undefined
197
+ }
198
+ }
154
199
  const method = String(req?.method ?? '').toUpperCase()
155
200
  const localUi = isLocalUiRequest(req)
156
201
  if (mutationMethods?.has(method) && !localUi) {
@@ -170,7 +215,7 @@ function guardedRoute(route) {
170
215
  * child context. DSH rc.6/rc.7 use that exact child identity for effect
171
216
  * ownership, so the service method is the narrow safe interception point.
172
217
  */
173
- function retainWebServerBoundary(webServer) {
218
+ function retainWebServerBoundary(webServer, getConnection) {
174
219
  if (!webServer || (typeof webServer !== 'object' && typeof webServer !== 'function')) return () => {}
175
220
  if (typeof webServer.register !== 'function') return () => {}
176
221
 
@@ -179,7 +224,7 @@ function retainWebServerBoundary(webServer) {
179
224
  const originalRegister = webServer.register
180
225
  let active = true
181
226
  const guardedRegister = function registerWithLocalMutationBoundary(route) {
182
- return originalRegister.call(this, active ? guardedRoute(route) : route)
227
+ return originalRegister.call(this, active ? guardedRoute(route, getConnection) : route)
183
228
  }
184
229
  webServer.register = guardedRegister
185
230
  state = { count: 0, originalRegister, guardedRegister, deactivate: () => { active = false } }
@@ -200,10 +245,12 @@ function retainWebServerBoundary(webServer) {
200
245
  }
201
246
 
202
247
  /**
203
- * DSH's all-interface WebServer deliberately has no TLS/auth/origin policy.
204
- * Same-origin checks therefore prevent browser CSRF but cannot authenticate a
205
- * LAN client. Keep plugin-owned OS/process/disk mutations local-UI-only and do
206
- * not issue their bearer capability tokens or host paths to remote clients.
248
+ * DSH rc.6/rc.7 expose no browser-authentication service for named plugin
249
+ * routes, so the historical local-machine fences below remain the compatibility
250
+ * floor. DSH 0.1.2-alpha.1 adds `connection.requestRejection(req)` specifically
251
+ * so another Web route can inherit the Host/Origin + signed-browser-session
252
+ * boundary. Feature-detect that seam and apply it to every DVR-owned named
253
+ * route before the plugin's narrower local-mutation/read-redaction policy.
207
254
  */
208
255
  export function installLocalMutationRouteBoundary(ctx) {
209
256
  if (!ctx || (typeof ctx !== 'object' && typeof ctx !== 'function')) return ctx
@@ -220,7 +267,16 @@ export function installLocalMutationRouteBoundary(ctx) {
220
267
  return inject.call(target, dependencies, callback, ...rest)
221
268
  }
222
269
  return inject.call(target, dependencies, (childCtx) => {
223
- const release = retainWebServerBoundary(childCtx?.webServer)
270
+ const getConnection = () => {
271
+ try {
272
+ if (typeof childCtx?.get === 'function') return childCtx.get('connection')
273
+ } catch {}
274
+ try {
275
+ if (typeof target?.get === 'function') return target.get('connection')
276
+ } catch {}
277
+ return childCtx?.connection ?? target?.connection
278
+ }
279
+ const release = retainWebServerBoundary(childCtx?.webServer, getConnection)
224
280
  let owned = false
225
281
  try {
226
282
  if (typeof childCtx?.effect === 'function') {
@@ -0,0 +1,148 @@
1
+ const VIRTUAL_SCREEN_MARKER = '[System.Windows.Forms.SystemInformation]::VirtualScreen'
2
+ const COPY_FROM_SCREEN_MARKER = '$g.CopyFromScreen($b.X,$b.Y,0,0,$bmp.Size)'
3
+ const SAVE_PATTERN = /\$bmp\.Save\('((?:''|[^'])*)'\)/
4
+
5
+ function powerShellBasename(file) {
6
+ return String(file ?? '').replace(/\\/g, '/').split('/').pop().toLowerCase()
7
+ }
8
+
9
+ function quotePowerShellSingle(value) {
10
+ return `'${String(value).replace(/'/g, "''")}'`
11
+ }
12
+
13
+ function savedPathFromLegacyScript(script) {
14
+ const match = SAVE_PATTERN.exec(String(script ?? ''))
15
+ return match ? match[1].replace(/''/g, "'") : undefined
16
+ }
17
+
18
+ export function isLegacyWindowsScreenshotScript(script) {
19
+ const source = String(script ?? '')
20
+ return (
21
+ source.includes('Add-Type -AssemblyName System.Windows.Forms,System.Drawing') &&
22
+ source.includes(VIRTUAL_SCREEN_MARKER) &&
23
+ source.includes('[System.Drawing.Graphics]::FromImage($bmp)') &&
24
+ source.includes(COPY_FROM_SCREEN_MARKER) &&
25
+ savedPathFromLegacyScript(source) !== undefined
26
+ )
27
+ }
28
+
29
+ export function buildPerMonitorWindowsScreenshotScript(outputPath) {
30
+ const quotedPath = quotePowerShellSingle(outputPath)
31
+ const source = String.raw`using System;
32
+ using System.Drawing;
33
+ using System.Runtime.InteropServices;
34
+ using System.Windows.Forms;
35
+
36
+ public static class DshVisionDesktopCapture
37
+ {
38
+ private static readonly IntPtr PerMonitorV2 = new IntPtr(-4);
39
+ private static readonly IntPtr PerMonitorV1 = new IntPtr(-3);
40
+
41
+ [DllImport("user32.dll")]
42
+ private static extern IntPtr SetThreadDpiAwarenessContext(IntPtr dpiContext);
43
+
44
+ private static IntPtr TrySetContext(IntPtr context)
45
+ {
46
+ try
47
+ {
48
+ return SetThreadDpiAwarenessContext(context);
49
+ }
50
+ catch (EntryPointNotFoundException)
51
+ {
52
+ return IntPtr.Zero;
53
+ }
54
+ catch (DllNotFoundException)
55
+ {
56
+ return IntPtr.Zero;
57
+ }
58
+ }
59
+
60
+ private static IntPtr EnterPerMonitorContext()
61
+ {
62
+ IntPtr previous = TrySetContext(PerMonitorV2);
63
+ if (previous == IntPtr.Zero)
64
+ {
65
+ previous = TrySetContext(PerMonitorV1);
66
+ }
67
+ if (previous == IntPtr.Zero)
68
+ {
69
+ throw new InvalidOperationException(
70
+ "could not enter a per-monitor DPI awareness context; refusing to return a potentially misaligned screenshot");
71
+ }
72
+ return previous;
73
+ }
74
+
75
+ private static void RestoreContext(IntPtr previous)
76
+ {
77
+ try
78
+ {
79
+ SetThreadDpiAwarenessContext(previous);
80
+ }
81
+ catch
82
+ {
83
+ // The helper process exits immediately after capture. Restoration
84
+ // is still attempted so this method is correct if reused.
85
+ }
86
+ }
87
+
88
+ public static void ValidateDpiContext()
89
+ {
90
+ IntPtr previous = EnterPerMonitorContext();
91
+ RestoreContext(previous);
92
+ }
93
+
94
+ public static void Capture(string outputPath)
95
+ {
96
+ IntPtr previous = EnterPerMonitorContext();
97
+ try
98
+ {
99
+ Rectangle bounds = SystemInformation.VirtualScreen;
100
+ if (bounds.Width <= 0 || bounds.Height <= 0)
101
+ {
102
+ throw new InvalidOperationException("the Windows virtual screen has no drawable area");
103
+ }
104
+
105
+ using (var bitmap = new Bitmap(bounds.Width, bounds.Height))
106
+ using (var graphics = Graphics.FromImage(bitmap))
107
+ {
108
+ graphics.CopyFromScreen(bounds.X, bounds.Y, 0, 0, bounds.Size);
109
+ bitmap.Save(outputPath);
110
+ }
111
+ }
112
+ finally
113
+ {
114
+ RestoreContext(previous);
115
+ }
116
+ }
117
+ }`
118
+
119
+ return [
120
+ 'Add-Type -AssemblyName System.Windows.Forms,System.Drawing',
121
+ `$__dshVisionCaptureSource = @'\n${source}\n'@`,
122
+ 'try {',
123
+ " Add-Type -TypeDefinition $__dshVisionCaptureSource -ReferencedAssemblies 'System.Windows.Forms.dll','System.Drawing.dll' -ErrorAction Stop",
124
+ '} catch {',
125
+ " throw ('vision_screenshot: failed to initialize the Windows DPI-aware capture helper: ' + $_.Exception.Message)",
126
+ '}',
127
+ `[DshVisionDesktopCapture]::Capture(${quotedPath})`,
128
+ ].join('\n')
129
+ }
130
+
131
+ export function rewriteWindowsScreenshotExecArgs(file, args, options = {}) {
132
+ const platform = options.platform ?? (typeof process !== 'undefined' ? process.platform : '')
133
+ if (platform !== 'win32') return args
134
+ const executable = powerShellBasename(file)
135
+ if (executable !== 'powershell.exe' && executable !== 'powershell') return args
136
+ if (!Array.isArray(args)) return args
137
+
138
+ const commandIndex = args.findIndex((arg) => String(arg).toLowerCase() === '-command')
139
+ if (commandIndex < 0 || commandIndex + 1 >= args.length) return args
140
+ const script = args[commandIndex + 1]
141
+ if (!isLegacyWindowsScreenshotScript(script)) return args
142
+
143
+ const outputPath = savedPathFromLegacyScript(script)
144
+ if (outputPath === undefined) return args
145
+ const rewritten = args.slice()
146
+ rewritten[commandIndex + 1] = buildPerMonitorWindowsScreenshotScript(outputPath)
147
+ return rewritten
148
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-vision-router",
3
- "version": "2.0.0",
3
+ "version": "2.1.0",
4
4
  "description": "Eyes for text-only DeepSeek Harness agents: built-in free vision chain (no key) + pixel-level vision tools (Q&A, grounding, crop, pixel diff, colors, OCR, SVG trace, cutout, screenshots). One-command install, no Python, image turns work like ordinary tool-calling turns.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -11,7 +11,7 @@
11
11
  "type": "module",
12
12
  "main": "lib/public-entry.js",
13
13
  "bin": {
14
- "dsh-vision-router": "./lib/doctor-cli.js"
14
+ "dsh-vision-router": "./lib/doctor-cli-p0.js"
15
15
  },
16
16
  "exports": {
17
17
  ".": "./lib/public-entry.js",
@@ -54,8 +54,8 @@
54
54
  "undici": "^7.29.0"
55
55
  },
56
56
  "peerDependencies": {
57
- "@deepseek-ai/dsh-anonymous-user-id": "^0.1.0-rc.6 || ^0.1.1-rc.1",
58
- "@deepseek-ai/dsh-llm-deepseek": "^0.1.0-rc.6 || ^0.1.1-rc.1",
57
+ "@deepseek-ai/dsh-anonymous-user-id": "^0.1.0-rc.8 || ^0.1.1-rc.1",
58
+ "@deepseek-ai/dsh-llm-deepseek": "^0.1.0-rc.8 || ^0.1.1-rc.1",
59
59
  "sharp": ">=0.35.3 <1"
60
60
  },
61
61
  "peerDependenciesMeta": {
@@ -69,7 +69,15 @@
69
69
  "sharp": "^0.35.3"
70
70
  },
71
71
  "scripts": {
72
- "test": "node --test tests/adapter-prepare-call-compat.test.js tests/core.test.js tests/capability-advisory.test.js tests/vision-execution-policy.test.js tests/vision-backend-diagnostics.test.js tests/live-model-discovery.test.js tests/live-model-credential-resolution.test.js tests/vision-model-registry.test.js tests/live-model-client-stability.test.js tests/providers-persistence.test.js tests/provider-directory-fallback.test.js tests/model-catalog-policy.test.js tests/settings-ia-client-prelude.test.js tests/settings-ia-fj.test.js tests/settings-ia-acceptance-regression.test.js tests/settings-migration.test.js tests/settings-section-order.test.js tests/attachment-admission-policy.test.js tests/vision-resilience.test.js tests/vision-breaker-readonly.test.js tests/client.test.js tests/issue-284-vision-mode-toggle.test.js tests/issue-284-vision-mode-hardening.test.js tests/issue-284-attachment-id-hint.test.js tests/issue-284-model-visibility.test.js tests/issue-284-vision-selection-effort.test.js tests/client-presentation-boundary.test.js tests/remote-settings-bridge.test.js tests/remote-settings-v2-contract.test.js tests/remote-settings-risk-confirmation.test.js tests/local-remote-settings-permission.test.js tests/rc6-real-settings-persistence.test.js tests/artifact-path-security.test.js tests/http-compat.test.js tests/catalog-corrections.test.js tests/update-check.test.js tests/self-update.test.js tests/doctor.test.js tests/doctor-cli.test.js tests/legacy-session-repair.test.js tests/profile-pnpm-diagnostics.test.js tests/doctor-v2.test.js tests/doctor-cli-v2.test.js tests/doctor-runtime.test.js tests/session-repair-v2.test.js tests/bundle-defaults.test.js tests/file-logger.test.js tests/replay-delegation.test.js tests/adversarial-hardening.test.js tests/vision-adversarial-hardening-v2.test.js tests/vision-capability-benchmark-visual-proof.test.js tests/wrapper-directory.test.js tests/logging-ui.test.js tests/manifest-dependencies.test.js tests/structured-bootstrap.test.js tests/structured-bootstrap-gate.test.js tests/local-ollama.test.js tests/ollama-cold-start.test.js tests/ollama-cold-start-loaded.test.js tests/zero-regression-gate.test.js tests/runtime-e2e.test.js tests/local-vision-stabilizer.test.js tests/local-connection-probe.test.js tests/repetition-guard.test.js tests/guide-scroll-gate.test.js tests/settings-scroll-jank-regression.test.js tests/android-attachment-compat.test.js tests/free-cloud-first.test.js tests/rc6-rc7-compat.test.js tests/native-image-coexistence.test.js tests/issue-276-session-image-ownership.test.js tests/issue-276-entry-policy-bridge.test.js tests/issue-276-policy-hardening.test.js tests/issue-289-native-nonintervention.test.js tests/pi-ai-bridge-wire-compat.test.js tests/mixed-router.test.js tests/depth-tier.test.js tests/depth-quota-behavior.test.js tests/structured-flow-hardening.test.js tests/vision-budget-activation.test.js tests/runtime-boundary-fixes.test.js tests/tesseract-node24-boot.test.js tests/session-vision-state.test.js tests/session-vision-state-integration.test.js tests/image-resource-governor.test.js tests/pixel-diff-stream.test.js tests/large-image-resource-integration.test.js tests/structured-guard-idempotency.test.js tests/vision-routing-product.test.js tests/vision-runtime-performance.test.js tests/vision-routing-settings-prelude.test.js tests/v2-settings-ia-integration.test.js tests/vision-capability-router.test.js tests/vision-capability-reference.test.js tests/vision-capability-benchmark.test.js tests/vision-capability-grounding-proof-contract.test.js tests/vision-capability-probe.test.js tests/vision-capability-shadow.test.js tests/vision-capability-axis-freshness.test.js tests/vision-capability-shadow-health.test.js tests/vision-capability-benchmark-service.test.js tests/vision-capability-preflight-hardening.test.js tests/vision-capability-benchmark-contract.test.js tests/vision-capability-benchmark-client.test.js tests/vision-capability-benchmark-client-productization.test.js tests/vision-capability-adapter-route.test.js tests/vision-background-benchmark.test.js tests/vision-background-benchmark-productization.test.js tests/vision-capability-benchmark-budget.test.js tests/vision-image-input-verdict.test.js tests/vision-capability-failure-classification.test.js tests/vision-capability-gate-client.test.js tests/v2-product-review-fixes.test.js tests/qa-top5-reliability.test.js tests/qa-screenshot-runtime.test.js tests/qa-runtime-identity.test.js tests/qa-turn-budget-cancellation.test.js tests/qa-cancellation-publication.test.js tests/qa-reliability-tail.test.js tests/qa-endpoint-route-alias.test.js tests/vision-toggle-root-hardening.test.js && node --test tests/vision-backend-runtime-policy.test.js"
72
+ "test": "node --test tests/adapter-prepare-call-compat.test.js tests/core.test.js tests/capability-advisory.test.js tests/vision-execution-policy.test.js tests/vision-backend-diagnostics.test.js tests/live-model-discovery.test.js tests/live-model-credential-resolution.test.js tests/vision-model-registry.test.js tests/live-model-client-stability.test.js tests/providers-persistence.test.js tests/provider-directory-fallback.test.js tests/model-catalog-policy.test.js tests/settings-ia-client-prelude.test.js tests/settings-ia-fj.test.js tests/settings-ia-acceptance-regression.test.js tests/settings-migration.test.js tests/settings-section-order.test.js tests/attachment-admission-policy.test.js tests/vision-resilience.test.js tests/vision-resilience-lifecycle.test.js tests/vision-breaker-readonly.test.js tests/alpha1-browser-lifecycle-integration.test.js tests/client.test.js tests/issue-307-regression.test.js tests/issue-284-vision-mode-toggle.test.js tests/issue-284-vision-mode-hardening.test.js tests/issue-284-attachment-id-hint.test.js tests/issue-284-model-visibility.test.js tests/issue-284-vision-selection-effort.test.js tests/client-presentation-boundary.test.js tests/remote-settings-bridge.test.js tests/remote-settings-v2-contract.test.js tests/remote-settings-risk-confirmation.test.js tests/local-remote-settings-permission.test.js tests/rc6-real-settings-persistence.test.js tests/artifact-path-security.test.js tests/http-compat.test.js tests/catalog-corrections.test.js tests/update-check.test.js tests/update-check-signal-lifecycle.test.js tests/self-update.test.js tests/doctor.test.js tests/doctor-cli.test.js tests/legacy-session-repair.test.js tests/profile-pnpm-diagnostics.test.js tests/doctor-v2.test.js tests/doctor-cli-v2.test.js tests/doctor-runtime.test.js tests/dsh-host-capabilities.test.js tests/doctor-host-capabilities.test.js tests/session-repair-v2.test.js tests/bundle-defaults.test.js tests/file-logger.test.js tests/replay-delegation.test.js tests/adversarial-hardening.test.js tests/vision-adversarial-hardening-v2.test.js tests/vision-capability-benchmark-visual-proof.test.js tests/wrapper-directory.test.js tests/logging-ui.test.js tests/manifest-dependencies.test.js tests/structured-bootstrap.test.js tests/structured-bootstrap-gate.test.js tests/local-ollama.test.js tests/ollama-cold-start.test.js tests/ollama-cold-start-loaded.test.js tests/zero-regression-gate.test.js tests/runtime-e2e.test.js tests/local-vision-stabilizer.test.js tests/local-connection-probe.test.js tests/repetition-guard.test.js tests/guide-scroll-gate.test.js tests/settings-scroll-jank-regression.test.js tests/android-attachment-compat.test.js tests/free-cloud-first.test.js tests/rc6-rc7-compat.test.js tests/native-image-coexistence.test.js tests/issue-276-session-image-ownership.test.js tests/issue-276-entry-policy-bridge.test.js tests/issue-276-policy-hardening.test.js tests/issue-289-native-nonintervention.test.js tests/pi-ai-bridge-wire-compat.test.js tests/mixed-router.test.js tests/depth-tier.test.js tests/depth-quota-behavior.test.js tests/structured-flow-hardening.test.js tests/structured-flow-adversarial.test.js tests/vision-budget-activation.test.js tests/runtime-boundary-fixes.test.js tests/runtime-i18n.test.js tests/tesseract-node24-boot.test.js tests/session-vision-state.test.js tests/session-vision-state-integration.test.js tests/image-resource-governor.test.js tests/resource-retention-lifecycle.test.js tests/pixel-diff-stream.test.js tests/large-image-resource-integration.test.js tests/structured-guard-idempotency.test.js tests/vision-routing-product.test.js tests/vision-runtime-performance.test.js tests/vision-routing-settings-prelude.test.js tests/v2-settings-ia-integration.test.js tests/vision-capability-router.test.js tests/vision-capability-reference.test.js tests/vision-capability-benchmark.test.js tests/vision-capability-grounding-proof-contract.test.js tests/vision-capability-probe.test.js tests/vision-capability-shadow.test.js tests/vision-capability-axis-freshness.test.js tests/vision-capability-shadow-health.test.js tests/vision-capability-benchmark-service.test.js tests/vision-capability-preflight-hardening.test.js tests/vision-capability-benchmark-contract.test.js tests/vision-capability-benchmark-client.test.js tests/vision-capability-benchmark-client-productization.test.js tests/vision-capability-adapter-route.test.js tests/vision-background-benchmark.test.js tests/vision-background-lifecycle.test.js tests/vision-background-benchmark-productization.test.js tests/vision-capability-benchmark-budget.test.js tests/vision-image-input-verdict.test.js tests/vision-capability-failure-classification.test.js tests/vision-capability-gate-client.test.js tests/v2-product-review-fixes.test.js tests/qa-top5-reliability.test.js tests/qa-screenshot-runtime.test.js tests/qa-runtime-identity.test.js tests/qa-turn-budget-cancellation.test.js tests/qa-cancellation-publication.test.js tests/qa-reliability-tail.test.js tests/qa-endpoint-route-alias.test.js tests/settings-native-card-semantics.test.js tests/settings-native-card-lazy-data.test.js tests/settings-invalid-staged-dirty.test.js tests/vision-toggle-root-hardening.test.js && node --test tests/vision-backend-runtime-policy.test.js",
73
+ "test:core": "node --test tests/core.test.js tests/runtime-e2e.test.js tests/structured-bootstrap.test.js tests/structured-flow-hardening.test.js tests/structured-flow-adversarial.test.js tests/vision-execution-policy.test.js tests/vision-backend-runtime-policy.test.js",
74
+ "test:routing": "node --test tests/vision-routing-product.test.js tests/vision-capability-router.test.js tests/vision-capability-probe.test.js tests/vision-capability-shadow.test.js tests/vision-capability-shadow-health.test.js tests/vision-runtime-performance.test.js tests/vision-background-benchmark.test.js tests/vision-image-input-verdict.test.js",
75
+ "test:session": "node --test tests/session-vision-state.test.js tests/session-vision-state-integration.test.js tests/replay-delegation.test.js tests/legacy-session-repair.test.js tests/session-repair-v2.test.js tests/issue-276-session-image-ownership.test.js",
76
+ "test:resources": "node --test tests/artifact-path-security.test.js tests/image-resource-governor.test.js tests/resource-retention-lifecycle.test.js tests/pixel-diff-stream.test.js tests/large-image-resource-integration.test.js tests/qa-turn-budget-cancellation.test.js tests/qa-cancellation-publication.test.js",
77
+ "test:compat": "node --test tests/adapter-prepare-call-compat.test.js tests/attachment-admission-policy.test.js tests/rc6-rc7-compat.test.js tests/rc6-real-settings-persistence.test.js tests/android-attachment-compat.test.js tests/http-compat.test.js tests/pi-ai-bridge-wire-compat.test.js tests/native-image-coexistence.test.js tests/tesseract-node24-boot.test.js tests/dsh-host-capabilities.test.js",
78
+ "test:web": "node --test tests/alpha1-browser-lifecycle-integration.test.js tests/client.test.js tests/client-presentation-boundary.test.js tests/settings-ia-client-prelude.test.js tests/settings-ia-acceptance-regression.test.js tests/remote-settings-bridge.test.js tests/remote-settings-v2-contract.test.js tests/local-remote-settings-permission.test.js tests/v2-settings-ia-integration.test.js tests/logging-ui.test.js",
79
+ "test:contract": "node --test tests/manifest-dependencies.test.js tests/bundle-defaults.test.js tests/zero-regression-gate.test.js tests/issue-289-native-nonintervention.test.js tests/runtime-boundary-fixes.test.js tests/runtime-i18n.test.js tests/adapter-prepare-call-compat.test.js tests/rc6-rc7-compat.test.js tests/attachment-admission-policy.test.js tests/dsh-host-capabilities.test.js tests/doctor-host-capabilities.test.js tests/structured-bootstrap.test.js tests/structured-bootstrap-gate.test.js",
80
+ "test:stress": "node scripts/image-resource-stress.mjs && node --test tests/large-image-resource-integration.test.js tests/resource-retention-lifecycle.test.js"
73
81
  },
74
82
  "pnpm": {
75
83
  "onlyBuiltDependencies": ["sharp"]
@@ -87,4 +95,4 @@
87
95
  },
88
96
  "bundle": { "patch": "./cordis.patch.yml" }
89
97
  }
90
- }
98
+ }