dsh-vision-router 2.1.6 → 2.2.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 (49) hide show
  1. package/README.md +8 -14
  2. package/README.zh.md +8 -14
  3. package/cordis.patch.yml +14 -0
  4. package/docs/architecture/compat-inventory.md +1 -1
  5. package/docs/architecture/dsh-compatibility-matrix.md +4 -1
  6. package/docs/architecture/dsh-support-window.md +1 -2
  7. package/docs/releases/v2.1.7.md +13 -0
  8. package/docs/releases/v2.2.0.md +25 -0
  9. package/docs/remote-settings.md +2 -0
  10. package/entry.js +2 -0
  11. package/index.js +387 -77
  12. package/lib/artifact-boundary.js +11 -0
  13. package/lib/artifact-io.js +60 -7
  14. package/lib/catalog-corrections.js +5 -0
  15. package/lib/client.js +293 -48
  16. package/lib/core-primitives.js +122 -7
  17. package/lib/degraded-local-evidence.js +39 -0
  18. package/lib/dsh-contract-compat.js +202 -0
  19. package/lib/dsh-support-window.js +1 -1
  20. package/lib/image-offload-compat.js +38 -0
  21. package/lib/live-model-discovery.js +125 -15
  22. package/lib/local-vision-stabilizer.js +15 -6
  23. package/lib/official-deepseek-catalog.js +120 -0
  24. package/lib/ollama-cold-start.js +3 -15
  25. package/lib/remote-settings-bridge.js +28 -5
  26. package/lib/replay-delegation.js +68 -42
  27. package/lib/runtime-composition.js +15 -2
  28. package/lib/runtime-config-normalizer.js +271 -1
  29. package/lib/runtime-i18n-boundary.js +4 -13
  30. package/lib/runtime-i18n.js +2 -2
  31. package/lib/session-surface-compat.js +40 -0
  32. package/lib/session-turn-resolver.js +57 -0
  33. package/lib/session-vision-index.js +206 -93
  34. package/lib/session-vision-mode-boundary.js +83 -6
  35. package/lib/session-vision-runtime.js +8 -2
  36. package/lib/session-vision-state.js +0 -13
  37. package/lib/tesseract-exec-compat.js +16 -2
  38. package/lib/twin-image-capability-fallback.js +2 -11
  39. package/lib/vision-artifact-store.js +16 -3
  40. package/lib/vision-attachment-handle-runtime.js +9 -21
  41. package/lib/vision-backend-runtime-policy.js +7 -6
  42. package/lib/vision-background-stop-store.js +30 -20
  43. package/lib/vision-breaker-shadow-health.js +15 -5
  44. package/lib/vision-capability-probe.js +24 -14
  45. package/lib/vision-evidence-guidance.js +39 -0
  46. package/lib/vision-image-input-verdict.js +22 -7
  47. package/lib/vision-resilience.js +73 -1
  48. package/lib/web-capability-boundary.js +85 -22
  49. package/package.json +14 -7
@@ -3,20 +3,85 @@ const patchedWebServers = new WeakMap()
3
3
 
4
4
  const VISION_ROUTER_WEB_PREFIX = '/_dsh/vision-router/'
5
5
 
6
- const LOCAL_MUTATION_ROUTES = new Map([
7
- ['/_dsh/vision-router/self-update', new Set(['POST'])],
8
- ['/_dsh/vision-router/logs', new Set(['POST'])],
9
- ['/_dsh/vision-router/request-screenshot-permission', new Set(['POST'])],
10
- ['/_dsh/vision-router/settings-save-diagnostics', new Set(['POST'])],
6
+ export const WEB_ROUTE_REMOTE_CAPABILITY = Object.freeze({
7
+ ALLOW_REMOTE: 'allow-remote',
8
+ REDACT_REMOTE: 'redact-remote',
9
+ LOCAL_ONLY: 'local-only',
10
+ })
11
+
12
+ // One declaration owns every browser-facing capability exception. Route method
13
+ // is part of the key because the same path may be a redacted GET and a local-
14
+ // only POST. `legacyMutation` preserves the historical helper semantics for
15
+ // callers that use isLocalMutationRoute(); local-only GET capabilities such as
16
+ // test-connection are intentionally not reclassified as mutations.
17
+ const ROUTE_CAPABILITY_POLICIES = new Map([
18
+ ['/_dsh/vision-router/self-update', new Map([
19
+ ['POST', { remote: WEB_ROUTE_REMOTE_CAPABILITY.LOCAL_ONLY, legacyMutation: true }],
20
+ ])],
21
+ ['/_dsh/vision-router/logs', new Map([
22
+ ['GET', { remote: WEB_ROUTE_REMOTE_CAPABILITY.REDACT_REMOTE }],
23
+ ['POST', { remote: WEB_ROUTE_REMOTE_CAPABILITY.LOCAL_ONLY, legacyMutation: true }],
24
+ ])],
25
+ ['/_dsh/vision-router/request-screenshot-permission', new Map([
26
+ ['POST', { remote: WEB_ROUTE_REMOTE_CAPABILITY.LOCAL_ONLY, legacyMutation: true }],
27
+ ])],
28
+ ['/_dsh/vision-router/settings-save-diagnostics', new Map([
29
+ ['POST', { remote: WEB_ROUTE_REMOTE_CAPABILITY.LOCAL_ONLY, legacyMutation: true }],
30
+ ])],
11
31
  // Model-invoking capability measurements spend user/provider quota and may
12
32
  // resolve stored credentials, so they inherit the local transport boundary.
13
- ['/_dsh/vision-router/capability-benchmark', new Set(['POST', 'DELETE'])],
14
- ])
15
- const SENSITIVE_READ_ROUTES = new Map([
16
- ['/_dsh/vision-router/update-check', new Set(['GET'])],
17
- ['/_dsh/vision-router/logs', new Set(['GET'])],
33
+ ['/_dsh/vision-router/capability-benchmark', new Map([
34
+ ['GET', { remote: WEB_ROUTE_REMOTE_CAPABILITY.ALLOW_REMOTE }],
35
+ ['POST', { remote: WEB_ROUTE_REMOTE_CAPABILITY.LOCAL_ONLY, legacyMutation: true }],
36
+ ['DELETE', { remote: WEB_ROUTE_REMOTE_CAPABILITY.LOCAL_ONLY, legacyMutation: true }],
37
+ ])],
38
+ ['/_dsh/vision-router/capability-runtime', new Map([
39
+ ['GET', { remote: WEB_ROUTE_REMOTE_CAPABILITY.ALLOW_REMOTE }],
40
+ ['POST', { remote: WEB_ROUTE_REMOTE_CAPABILITY.LOCAL_ONLY, legacyMutation: true }],
41
+ ])],
42
+ ['/_dsh/vision-router/host-capabilities', new Map([
43
+ ['GET', { remote: WEB_ROUTE_REMOTE_CAPABILITY.ALLOW_REMOTE }],
44
+ ])],
45
+ // Remote settings may consume already-discovered model ids, but a remote GET
46
+ // must never gain the Host-side network refresh capability. The handler
47
+ // independently suppresses scheduling unless the transport is local.
48
+ ['/_dsh/vision-router/live-models', new Map([
49
+ ['GET', { remote: WEB_ROUTE_REMOTE_CAPABILITY.ALLOW_REMOTE }],
50
+ ])],
51
+ ['/_dsh/vision-router/model-capabilities', new Map([
52
+ ['GET', { remote: WEB_ROUTE_REMOTE_CAPABILITY.ALLOW_REMOTE }],
53
+ ])],
54
+ ['/_dsh/vision-router/remote-settings-permission', new Map([
55
+ ['POST', { remote: WEB_ROUTE_REMOTE_CAPABILITY.LOCAL_ONLY, legacyMutation: true }],
56
+ ])],
57
+ ['/_dsh/vision-router/route-ownership', new Map([
58
+ ['GET', { remote: WEB_ROUTE_REMOTE_CAPABILITY.ALLOW_REMOTE }],
59
+ ])],
60
+ // A connectivity probe is a GET, but it drives the Host to contact configured
61
+ // local/private model endpoints and returns endpoint health metadata. Treat
62
+ // the capability side effect as local-only rather than as an ordinary read.
63
+ ['/_dsh/vision-router/test-connection', new Map([
64
+ ['GET', { remote: WEB_ROUTE_REMOTE_CAPABILITY.LOCAL_ONLY }],
65
+ ])],
66
+ ['/_dsh/vision-router/update-check', new Map([
67
+ ['GET', { remote: WEB_ROUTE_REMOTE_CAPABILITY.REDACT_REMOTE }],
68
+ ])],
18
69
  ])
19
70
 
71
+ // DVR-owned browser routes are closed-world capabilities: a new route is local-only
72
+ // until its exact method is reviewed and declared above. This makes omission fail closed.
73
+ const DEFAULT_ROUTE_POLICY = Object.freeze({ remote: WEB_ROUTE_REMOTE_CAPABILITY.LOCAL_ONLY })
74
+
75
+ function routeCapabilityPolicy(path, method) {
76
+ const methods = ROUTE_CAPABILITY_POLICIES.get(String(path ?? ''))
77
+ return methods?.get(String(method ?? '').toUpperCase()) ?? DEFAULT_ROUTE_POLICY
78
+ }
79
+
80
+ /** Public classification seam for tests/doctor without exposing policy maps. */
81
+ export function webRouteRemoteCapability(path, method) {
82
+ return routeCapabilityPolicy(path, method).remote
83
+ }
84
+
20
85
  function cleanAddress(value) {
21
86
  let text = String(value ?? '').trim().toLowerCase()
22
87
  if (text.startsWith('[') && text.endsWith(']')) text = text.slice(1, -1)
@@ -76,11 +141,10 @@ export function isLocalUiRequest(req) {
76
141
  }
77
142
 
78
143
  export function isLocalMutationRoute(path, method) {
79
- const methods = LOCAL_MUTATION_ROUTES.get(String(path ?? ''))
80
- return methods?.has(String(method ?? '').toUpperCase()) === true
144
+ return routeCapabilityPolicy(path, method).legacyMutation === true
81
145
  }
82
146
 
83
- function rejectRemoteMutation(res) {
147
+ function rejectRemoteLocalCapability(res) {
84
148
  res.writeHead(403, {
85
149
  'content-type': 'application/json; charset=utf-8',
86
150
  'cache-control': 'no-store',
@@ -180,11 +244,9 @@ function runWithRemoteReadRedaction(path, handler, req, res) {
180
244
  function guardedRoute(route, getConnection) {
181
245
  if (!route || typeof route !== 'object' || typeof route.handler !== 'function') return route
182
246
  const pluginOwned = typeof route.path === 'string' && route.path.startsWith(VISION_ROUTER_WEB_PREFIX)
183
- const mutationMethods = LOCAL_MUTATION_ROUTES.get(route.path)
184
- const sensitiveReadMethods = SENSITIVE_READ_ROUTES.get(route.path)
185
- if (!pluginOwned && (!mutationMethods || mutationMethods.size === 0) && (!sensitiveReadMethods || sensitiveReadMethods.size === 0)) {
186
- return route
187
- }
247
+ const capabilityMethods = ROUTE_CAPABILITY_POLICIES.get(route.path)
248
+ if (!pluginOwned && (!capabilityMethods || capabilityMethods.size === 0)) return route
249
+
188
250
  const originalHandler = route.handler
189
251
  return {
190
252
  ...route,
@@ -198,11 +260,12 @@ function guardedRoute(route, getConnection) {
198
260
  }
199
261
  const method = String(req?.method ?? '').toUpperCase()
200
262
  const localUi = isLocalUiRequest(req)
201
- if (mutationMethods?.has(method) && !localUi) {
202
- rejectRemoteMutation(res)
263
+ const remoteCapability = routeCapabilityPolicy(route.path, method).remote
264
+ if (remoteCapability === WEB_ROUTE_REMOTE_CAPABILITY.LOCAL_ONLY && !localUi) {
265
+ rejectRemoteLocalCapability(res)
203
266
  return undefined
204
267
  }
205
- if (sensitiveReadMethods?.has(method) && !localUi) {
268
+ if (remoteCapability === WEB_ROUTE_REMOTE_CAPABILITY.REDACT_REMOTE && !localUi) {
206
269
  return runWithRemoteReadRedaction(route.path, originalHandler, req, res)
207
270
  }
208
271
  return originalHandler(req, res)
@@ -250,7 +313,7 @@ function retainWebServerBoundary(webServer, getConnection) {
250
313
  * floor. DSH 0.1.2-alpha.1 adds `connection.requestRejection(req)` specifically
251
314
  * so another Web route can inherit the Host/Origin + signed-browser-session
252
315
  * 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.
316
+ * route before the plugin's narrower local-capability/read-redaction policy.
254
317
  */
255
318
  export function installLocalMutationRouteBoundary(ctx) {
256
319
  if (!ctx || (typeof ctx !== 'object' && typeof ctx !== 'function')) return ctx
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-vision-router",
3
- "version": "2.1.6",
3
+ "version": "2.2.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": {
@@ -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.8 || ^0.1.1-rc.1 || ^0.1.3-alpha.2 || 0.1.5-alpha.1 || 0.1.5-alpha.2 || 0.1.5-rc.1 || 0.1.5-rc.2",
58
- "@deepseek-ai/dsh-llm-deepseek": "^0.1.0-rc.8 || ^0.1.1-rc.1 || ^0.1.3-alpha.2 || 0.1.5-alpha.1 || 0.1.5-alpha.2 || 0.1.5-rc.1 || 0.1.5-rc.2",
57
+ "@deepseek-ai/dsh-anonymous-user-id": "^0.1.0-rc.8 || ^0.1.1-rc.1 || ^0.1.3-alpha.2 || 0.1.5-alpha.1 || 0.1.5-alpha.2 || 0.1.5-rc.1 || 0.1.5-rc.2 || 0.1.6-alpha.1",
58
+ "@deepseek-ai/dsh-llm-deepseek": "^0.1.0-rc.8 || ^0.1.1-rc.1 || ^0.1.3-alpha.2 || 0.1.5-alpha.1 || 0.1.5-alpha.2 || 0.1.5-rc.1 || 0.1.5-rc.2 || 0.1.6-alpha.1",
59
59
  "sharp": ">=0.35.3 <1"
60
60
  },
61
61
  "peerDependenciesMeta": {
@@ -66,20 +66,27 @@
66
66
  "devDependencies": {
67
67
  "@deepseek-ai/dsh-anonymous-user-id": "^0.1.0-rc.6",
68
68
  "@deepseek-ai/dsh-llm-deepseek": "^0.1.0-rc.6",
69
+ "fast-check": "4.10.0",
69
70
  "sharp": "^0.35.4"
70
71
  },
71
72
  "scripts": {
72
- "test": "node --test tests/index-modularization.test.js tests/adapter-prepare-call-compat.test.js tests/core.test.js tests/issue-374-delegated-call-config.test.js tests/grounding-coordinate-frame.test.js tests/grounding-coordinate-runtime.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/issue-367-remote-session-inject.test.js tests/vision-mode-toggle-injection.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/clipboard-image-paste-compat.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/twin-image-capability-fallback.test.js tests/twin-image-custom-wrapper.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/vision-model-guidance-contract.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-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",
73
+ "test": "node --test tests/index-modularization.test.js tests/adapter-prepare-call-compat.test.js tests/core.test.js tests/issue-374-delegated-call-config.test.js tests/grounding-coordinate-frame.test.js tests/grounding-coordinate-runtime.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/degraded-local-evidence.test.js tests/vision-resilience-lifecycle.test.js tests/vision-breaker-readonly.test.js tests/alpha1-browser-lifecycle-integration.test.js tests/issue-367-remote-session-inject.test.js tests/vision-mode-toggle-injection.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/clipboard-image-paste-compat.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/official-deepseek-catalog.test.js tests/replay-delegation.test.js tests/twin-image-capability-fallback.test.js tests/twin-image-custom-wrapper.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/vision-model-guidance-contract.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/issue-512-tool-restriction.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/security-resource-boundaries.test.js tests/security-property-fuzz.test.js tests/security-adversarial-fuzz-contract.test.js tests/runtime-i18n.test.js tests/tesseract-adaptive-ocr.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-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",
74
+ "test:core": "node --test tests/core.test.js tests/degraded-local-evidence.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
75
  "test:routing": "node --test tests/issue-374-delegated-call-config.test.js tests/twin-image-capability-fallback.test.js tests/twin-image-custom-wrapper.test.js tests/vision-routing-product.test.js tests/vision-capability-router.test.js tests/vision-capability-probe.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
76
  "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
77
  "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
78
  "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
79
  "test:web": "node --test tests/alpha1-browser-lifecycle-integration.test.js tests/issue-367-remote-session-inject.test.js tests/vision-mode-toggle-injection.test.js tests/client.test.js tests/client-presentation-boundary.test.js tests/clipboard-image-paste-compat.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/issue-374-delegated-call-config.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: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/issue-374-delegated-call-config.test.js tests/runtime-boundary-fixes.test.js tests/security-adversarial-fuzz-contract.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
81
  "test:grounding": "node --test tests/grounding-coordinate-frame.test.js tests/grounding-coordinate-runtime.test.js tests/vision-capability-grounding-proof-contract.test.js",
81
82
  "test:stress": "node scripts/image-resource-stress.mjs && node --test tests/large-image-resource-integration.test.js tests/resource-retention-lifecycle.test.js",
82
- "test:adversarial-fuzz": "node scripts/security-adversarial-fuzz.mjs"
83
+ "test:adversarial-fuzz": "node scripts/security-adversarial-fuzz.mjs",
84
+ "test:property-fuzz": "node --test tests/security-property-fuzz.test.js",
85
+ "test:quality": "node --test tests/vision-quality-round2-baseline.test.js",
86
+ "quality:round2:render": "node quality/vision-round2/render-fixtures.mjs",
87
+ "quality:round2:template": "node quality/vision-round2/make-run-template.mjs",
88
+ "quality:round2:run": "node quality/vision-round2/run-host-api.mjs",
89
+ "quality:round2:report": "node quality/vision-round2/report-results.mjs"
83
90
  },
84
91
  "pnpm": {
85
92
  "onlyBuiltDependencies": ["sharp"]