@cueframe/kernel 0.2.43 → 0.2.45

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 (52) hide show
  1. package/dist/_members/component-runtime/contracts.d.ts +7 -1
  2. package/dist/_members/component-runtime/contracts.d.ts.map +1 -1
  3. package/dist/_members/errors/registry.d.ts +32 -0
  4. package/dist/_members/mcp/executor.d.ts +4 -3
  5. package/dist/_members/mcp/serverClient.d.ts +7 -0
  6. package/dist/_members/plane/contract.d.ts +35 -1
  7. package/dist/authoring.js +2 -2
  8. package/dist/{chunk-WEXGESUQ.js → chunk-4S2YZQJP.js} +1 -1
  9. package/dist/{chunk-RO57QD5M.js → chunk-7XZW26U2.js} +3 -3
  10. package/dist/{chunk-NPZWMZI6.js → chunk-AMFFWX3C.js} +10 -10
  11. package/dist/{chunk-IYZEK6WY.js → chunk-CYILSHK5.js} +1 -1
  12. package/dist/{chunk-UGYYZBG4.js → chunk-EC6VFQE6.js} +1 -0
  13. package/dist/{chunk-AYOVAVNO.js → chunk-EDBQPQAG.js} +1 -1
  14. package/dist/{chunk-6PBYCESM.js → chunk-JVWLZNHC.js} +1 -1
  15. package/dist/{chunk-PCCVZYAF.js → chunk-JWMWVP64.js} +1 -1
  16. package/dist/{chunk-JX7NKSJP.js → chunk-K66NLMGX.js} +1 -1
  17. package/dist/{chunk-UAOTQSS3.js → chunk-MYBK6DKF.js} +9 -9
  18. package/dist/{chunk-SLN5UKLT.js → chunk-Q5P5UFOP.js} +2 -3
  19. package/dist/{chunk-QSWONRX2.js → chunk-ULQJWGUV.js} +20 -1
  20. package/dist/{chunk-IHKMFEBT.js → chunk-URZR6C3N.js} +1 -1
  21. package/dist/{chunk-BUAAQDDJ.js → chunk-VVKBCBNR.js} +1 -1
  22. package/dist/chunk-W5AFGFVZ.js +123 -0
  23. package/dist/{chunk-62VTAA6O.js → chunk-WL2MLKWU.js} +1 -1
  24. package/dist/{chunk-VCBLGZQQ.js → chunk-WWXTJZ67.js} +13 -4
  25. package/dist/component-runtime/browserOptions.js +2 -2
  26. package/dist/component-runtime/contracts.js +1 -1
  27. package/dist/component-runtime/importPolicy.js +2 -2
  28. package/dist/component-runtime/render.js +4 -4
  29. package/dist/component-runtime/sourceAdmission.js +2 -2
  30. package/dist/component-runtime.js +6 -6
  31. package/dist/compose.js +1 -1
  32. package/dist/composition/projection.js +2 -2
  33. package/dist/composition-ops.js +3 -3
  34. package/dist/composition.js +2 -2
  35. package/dist/core/render.js +3 -3
  36. package/dist/core/select.js +2 -2
  37. package/dist/core.js +3 -3
  38. package/dist/director/ai-sdk.js +3 -3
  39. package/dist/director/domain.js +2 -2
  40. package/dist/director.js +3 -3
  41. package/dist/errors.js +3 -1
  42. package/dist/mcp/executor.js +2 -1
  43. package/dist/mcp/server.js +2 -2
  44. package/dist/mcp.js +8 -7
  45. package/dist/plane/conformance.js +1 -1
  46. package/dist/plane/contract.js +31 -46
  47. package/dist/plane.js +1 -1
  48. package/dist/render-harness/cardAssetAdmission.js +2 -2
  49. package/dist/render-harness/cardFonts.js +2 -2
  50. package/dist/render-harness.js +11 -11
  51. package/package.json +11 -11
  52. package/dist/{chunk-JENEKKAM.js → chunk-HUZN2HRT.js} +5 -5
@@ -765,7 +765,12 @@ export declare const ComponentRenderReceiptV2: z.ZodObject<{
765
765
  }, z.core.$strict>>;
766
766
  }, z.core.$strict>;
767
767
  export type ComponentRenderReceiptV2 = z.infer<typeof ComponentRenderReceiptV2>;
768
- export declare const COMPONENT_RUNTIME_ERROR_CODES: readonly ["invalid_component_source", "unsupported_runtime_version", "component_does_not_compile", "component_runtime_error", "component_deadline_exceeded", "component_resource_exhausted", "component_asset_undeclared", "component_asset_unavailable", "component_asset_integrity_failed", "component_network_denied", "component_import_denied", "component_graphics_unavailable", "component_graphics_mismatch", "component_device_lost", "component_output_invalid", "component_conflict", "component_scene_invalid"];
768
+ /**
769
+ * Every code the bake lane can raise, host side or sandbox side. Not only the
770
+ * ones a component can report about itself: the host's own artifact verifier
771
+ * refuses through the same channel, so its codes belong here too.
772
+ */
773
+ export declare const COMPONENT_RUNTIME_ERROR_CODES: readonly ["invalid_component_source", "unsupported_runtime_version", "component_does_not_compile", "component_runtime_error", "component_deadline_exceeded", "component_resource_exhausted", "component_asset_undeclared", "component_asset_unavailable", "component_asset_integrity_failed", "component_network_denied", "component_import_denied", "component_graphics_unavailable", "component_graphics_mismatch", "component_device_lost", "component_output_invalid", "component_output_unverifiable", "component_conflict", "component_scene_invalid"];
769
774
  export declare const ComponentRuntimeErrorCode: z.ZodEnum<{
770
775
  invalid_component_source: "invalid_component_source";
771
776
  unsupported_runtime_version: "unsupported_runtime_version";
@@ -782,6 +787,7 @@ export declare const ComponentRuntimeErrorCode: z.ZodEnum<{
782
787
  component_graphics_mismatch: "component_graphics_mismatch";
783
788
  component_device_lost: "component_device_lost";
784
789
  component_output_invalid: "component_output_invalid";
790
+ component_output_unverifiable: "component_output_unverifiable";
785
791
  component_conflict: "component_conflict";
786
792
  component_scene_invalid: "component_scene_invalid";
787
793
  }>;
@@ -1 +1 @@
1
- {"version":3,"file":"contracts.d.ts","sourceRoot":"","sources":["../src/contracts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,wBAAwB,EAAG,CAAU,CAAC;AACnD,eAAO,MAAM,wBAAwB,EAAG,CAAU,CAAC;AACnD,eAAO,MAAM,yBAAyB,EAAG,CAAU,CAAC;AAEpD,eAAO,MAAM,kBAAkB;;;;;EAA8C,CAAC;AAC9E,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAEpE,eAAO,MAAM,oBAAoB,qGAE/B,CAAC;AACH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAExE,eAAO,MAAM,sBAAsB;;;;;;;;;;;4BAUjC,CAAC;AAC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AAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;gBAGzC,IAAI,EAAE,yBAAyB,EAC/B,OAAO,EAAE,MAAM,EACf,OAAO,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,OAAO,CAAC;QAAC,KAAK,CAAC,EAAE,OAAO,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;KAAE;CAQxF;AAED,wBAAgB,4BAA4B,CAC1C,OAAO,EAAE,IAAI,CAAC,wBAAwB,EAAE,UAAU,CAAC,EACnD,OAAO,EAAE,IAAI,CAAC,wBAAwB,EAAE,mBAAmB,GAAG,gBAAgB,CAAC,GAC9E,IAAI,CAoBN;AAED,wBAAgB,4BAA4B,CAC1C,OAAO,EAAE,IAAI,CAAC,wBAAwB,EAAE,UAAU,CAAC,EACnD,OAAO,EAAE,IAAI,CAAC,wBAAwB,EAAE,UAAU,CAAC,GAClD,IAAI,CAUN"}
@@ -1120,6 +1120,24 @@ export declare const ERROR_CODES: {
1120
1120
  readonly httpStatus: 503;
1121
1121
  };
1122
1122
  readonly component_output_invalid: {
1123
+ readonly stage: "render";
1124
+ readonly category: "authoring";
1125
+ readonly retryable: false;
1126
+ readonly httpStatus: 422;
1127
+ };
1128
+ readonly component_output_unverifiable: {
1129
+ readonly stage: "render";
1130
+ readonly category: "internal";
1131
+ readonly retryable: false;
1132
+ readonly httpStatus: 500;
1133
+ };
1134
+ readonly sandbox_oom: {
1135
+ readonly stage: "render";
1136
+ readonly category: "internal";
1137
+ readonly retryable: true;
1138
+ readonly httpStatus: 503;
1139
+ };
1140
+ readonly component_bake_crashed: {
1123
1141
  readonly stage: "render";
1124
1142
  readonly category: "internal";
1125
1143
  readonly retryable: false;
@@ -1663,6 +1681,20 @@ export declare class CueframeError extends Error {
1663
1681
  export declare function encodeError(e: CueframeError): string;
1664
1682
  export declare function decodeError(msg: string): CueframeError | null;
1665
1683
  export declare function scrubSensitive(s: string): string;
1684
+ /**
1685
+ * How long to wait before retrying a retryable code.
1686
+ *
1687
+ * `retryable: true` alone reads as "try again now", and callers do: four
1688
+ * immediate retries of a render all failed two minutes apart, after which the
1689
+ * caller had no basis for choosing between retrying and giving up (CUE-36).
1690
+ *
1691
+ * ONE default rather than fifty guesses. A number is only overridden where the
1692
+ * wait is genuinely different in kind — a provider that is down does not come
1693
+ * back in five seconds, and a resource another request is holding usually frees
1694
+ * up in about that long. Inventing a distinct figure for every code would look
1695
+ * more precise and mean less.
1696
+ */
1697
+ export declare const DEFAULT_RETRY_AFTER_SECONDS = 30;
1666
1698
  /** Seconds to wait before retrying, or undefined when retrying will not help. */
1667
1699
  export declare function retryAfterSecondsFor(code: ErrorCode): number | undefined;
1668
1700
  export declare function toWireEnvelope(e: Envelope, opts?: {
@@ -1,11 +1,12 @@
1
1
  import { type Executor } from './core.js';
2
+ import { type ClientIdentity } from '../plane/contract.js';
2
3
  export declare const API_URLS: Record<string, string>;
3
- export declare function makeNetworkExecutor(baseUrl: string, apiKey: string): Executor;
4
+ export declare function makeNetworkExecutor(baseUrl: string, apiKey: string, client: ClientIdentity): Executor;
4
5
  export declare function makeSessionExecutor(opts: {
5
6
  baseUrl: string;
6
7
  getToken: () => Promise<string | null>;
7
- clientVersion: string;
8
+ client: ClientIdentity;
8
9
  }): Executor;
9
- export declare function makePlatformExecutor(baseUrl: string, deployKey: string, orgId: string, opts?: {
10
+ export declare function makePlatformExecutor(baseUrl: string, deployKey: string, orgId: string, client: ClientIdentity, opts?: {
10
11
  actingUserId?: string;
11
12
  }): Executor;
@@ -0,0 +1,7 @@
1
+ import { type ClientIdentity } from '../plane/contract.js';
2
+ /**
3
+ * The stdio server is a first-party /v1 client like the desktop and the CLI,
4
+ * and it is the one agents run locally. Node-only, so it lives beside main.ts
5
+ * rather than in executor.ts, which browser bundles import.
6
+ */
7
+ export declare const MCP_SERVER_CLIENT: ClientIdentity;
@@ -73,7 +73,7 @@ export declare const PreviewFrameRequest: z.ZodObject<{
73
73
  }>>;
74
74
  scale: z.ZodOptional<z.ZodNumber>;
75
75
  jpegQuality: z.ZodOptional<z.ZodNumber>;
76
- }, z.core.$strip>;
76
+ }, z.core.$strict>;
77
77
  /** Synchronous desktop variant: the mounted persisted document is the only target. */
78
78
  export declare const DesktopPreviewFrameRequest: z.ZodObject<{
79
79
  timestamps: z.ZodArray<z.ZodNumber>;
@@ -84,3 +84,37 @@ export declare const DesktopPreviewFrameRequest: z.ZodObject<{
84
84
  scale: z.ZodOptional<z.ZodNumber>;
85
85
  jpegQuality: z.ZodOptional<z.ZodNumber>;
86
86
  }, z.core.$strict>;
87
+ /**
88
+ * Who is calling, in one request header. The server cannot infer this: a Tauri
89
+ * WebView2 request and a Chrome one carry the same user agent, so every
90
+ * first-party client states its surface, version and OS itself. Mirrors the
91
+ * `X-CueFrame-Contract` response header, from the other direction.
92
+ */
93
+ export declare const CLIENT_HEADER = "X-CueFrame-Client";
94
+ export declare const CLIENT_SURFACES: readonly ["studio", "web", "console", "clips", "cli", "mcp", "director"];
95
+ export type ClientSurface = (typeof CLIENT_SURFACES)[number];
96
+ export declare const CLIENT_OSES: readonly ["macos", "windows", "linux", "browser", "unknown"];
97
+ export type ClientOs = (typeof CLIENT_OSES)[number];
98
+ export interface ClientIdentity {
99
+ surface: ClientSurface;
100
+ version: string;
101
+ os: ClientOs;
102
+ }
103
+ /**
104
+ * A browser surface runs on `browser` and nothing else; a surface with a host
105
+ * of its own never does. The header is unauthenticated, so a combination that
106
+ * cannot occur is a planted one, and an analyst would read it as fact.
107
+ */
108
+ export declare function clientPairIsPossible(surface: ClientSurface, os: ClientOs): boolean;
109
+ export declare function formatClientHeader(client: ClientIdentity): string;
110
+ /** Null means no first-party client said so, never a guessed identity. */
111
+ export declare function parseClientHeader(value: string | null | undefined): ClientIdentity | null;
112
+ /** Node's `process.platform`, named in our terms. Anything else is `unknown`. */
113
+ export declare function osFromNodePlatform(platform: string): ClientOs;
114
+ /** The host behind a webview. Unknown beats a guess in a support log. */
115
+ export declare function osFromUserAgent(agent: string): ClientOs;
116
+ /**
117
+ * The OS a browser-hosted client reports. Only the desktop webview runs on a
118
+ * host OS worth naming; every other browser surface is `browser`.
119
+ */
120
+ export declare function clientOs(surface: ClientSurface, agent: string): ClientOs;
package/dist/authoring.js CHANGED
@@ -48,7 +48,7 @@ import {
48
48
  formatPlanSteps,
49
49
  initCodeGenPrompts
50
50
  } from "./chunk-Y4HPN4BC.js";
51
- import "./chunk-AYOVAVNO.js";
51
+ import "./chunk-EDBQPQAG.js";
52
52
  import {
53
53
  cssLayoutVars
54
54
  } from "./chunk-W5W3FDDI.js";
@@ -62,7 +62,7 @@ import "./chunk-WPZKOVYF.js";
62
62
  import "./chunk-B7J5UUUV.js";
63
63
  import "./chunk-KYRDKK2D.js";
64
64
  import "./chunk-WREYUH2E.js";
65
- import "./chunk-QSWONRX2.js";
65
+ import "./chunk-ULQJWGUV.js";
66
66
  import "./chunk-7PA7FGLD.js";
67
67
  import {
68
68
  collectSceneClipIssues,
@@ -9,7 +9,7 @@ import {
9
9
  import {
10
10
  decodeError,
11
11
  scrubSensitive
12
- } from "./chunk-QSWONRX2.js";
12
+ } from "./chunk-ULQJWGUV.js";
13
13
 
14
14
  // ../director/src/domain/chat.ts
15
15
  import { z } from "zod";
@@ -9,13 +9,13 @@ import {
9
9
  } from "./chunk-EXY4JJPH.js";
10
10
  import {
11
11
  assertComponentImportsAllowed
12
- } from "./chunk-JX7NKSJP.js";
12
+ } from "./chunk-K66NLMGX.js";
13
13
  import {
14
14
  assertComponentBrowserHardware,
15
15
  componentBrowserBackend,
16
16
  componentBrowserOptions,
17
17
  readGpuAttestation
18
- } from "./chunk-PCCVZYAF.js";
18
+ } from "./chunk-JWMWVP64.js";
19
19
  import {
20
20
  ComponentCapturePageRasterAttestationV1,
21
21
  ComponentGraphicsApiV2,
@@ -25,7 +25,7 @@ import {
25
25
  ComponentStillPngContainerFactsV1,
26
26
  ComponentStillSessionAttestationV1,
27
27
  ComponentStillSessionHostAttestationV1
28
- } from "./chunk-UGYYZBG4.js";
28
+ } from "./chunk-EC6VFQE6.js";
29
29
  import {
30
30
  parseSceneShotSpecV2
31
31
  } from "./chunk-CL5Y6V6K.js";
@@ -3,14 +3,6 @@ import {
3
3
  buildEasedZooms,
4
4
  buildPannedCenters
5
5
  } from "./chunk-QH3YI3ND.js";
6
- import {
7
- flattenCompoundClips,
8
- hasCompoundClips
9
- } from "./chunk-QISFYLBB.js";
10
- import {
11
- compositionHasVo,
12
- roleDefaultGainDb
13
- } from "./chunk-VZ7TYX6Z.js";
14
6
  import {
15
7
  DOMINANCE_WEIGHTS,
16
8
  ENTER_SEC,
@@ -28,7 +20,15 @@ import {
28
20
  scoreAndRank,
29
21
  segmentShots,
30
22
  stabilizeSelectionHysteresis
31
- } from "./chunk-IYZEK6WY.js";
23
+ } from "./chunk-CYILSHK5.js";
24
+ import {
25
+ flattenCompoundClips,
26
+ hasCompoundClips
27
+ } from "./chunk-QISFYLBB.js";
28
+ import {
29
+ compositionHasVo,
30
+ roleDefaultGainDb
31
+ } from "./chunk-VZ7TYX6Z.js";
32
32
  import {
33
33
  SHOT_SCALE_TARGET,
34
34
  shotScaleZoom
@@ -36,7 +36,7 @@ import {
36
36
  import {
37
37
  CueframeError,
38
38
  encodeError
39
- } from "./chunk-QSWONRX2.js";
39
+ } from "./chunk-ULQJWGUV.js";
40
40
  import {
41
41
  SCENE_CAPTURE_IDENTITY_FIELDS_V1,
42
42
  SCENE_PRESET_TRIANGLES,
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  CueframeError,
3
3
  encodeError
4
- } from "./chunk-QSWONRX2.js";
4
+ } from "./chunk-ULQJWGUV.js";
5
5
 
6
6
  // ../execution/core/src/render/vcam/constants.ts
7
7
  var P_MIN = 0.5;
@@ -244,6 +244,7 @@ var COMPONENT_RUNTIME_ERROR_CODES = [
244
244
  "component_graphics_mismatch",
245
245
  "component_device_lost",
246
246
  "component_output_invalid",
247
+ "component_output_unverifiable",
247
248
  "component_conflict",
248
249
  "component_scene_invalid"
249
250
  ];
@@ -6,7 +6,7 @@ import {
6
6
  import {
7
7
  CueframeError,
8
8
  encodeError
9
- } from "./chunk-QSWONRX2.js";
9
+ } from "./chunk-ULQJWGUV.js";
10
10
 
11
11
  // ../composition/src/projection/cardTokens.ts
12
12
  var CARD_MOTION_VAR_NAMES = [
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  CueframeError
3
- } from "./chunk-QSWONRX2.js";
3
+ } from "./chunk-ULQJWGUV.js";
4
4
  import {
5
5
  bundledFontFamilyFaces,
6
6
  isGenericOnlyStack,
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  ComponentHostAttestationV2,
3
3
  ComponentRuntimeError
4
- } from "./chunk-UGYYZBG4.js";
4
+ } from "./chunk-EC6VFQE6.js";
5
5
  import {
6
6
  STUDIO_SHADOW_MAP_BUDGET
7
7
  } from "./chunk-CL5Y6V6K.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  ComponentRuntimeError
3
- } from "./chunk-UGYYZBG4.js";
3
+ } from "./chunk-EC6VFQE6.js";
4
4
 
5
5
  // ../execution/component-runtime/src/allowedImports.ts
6
6
  var COMPONENT_IMPORT_ALLOWLIST = Object.freeze([
@@ -3,7 +3,7 @@ import {
3
3
  assertSceneShotParamsAdmitted,
4
4
  materializeComponentSource,
5
5
  renderComponentAlpha
6
- } from "./chunk-RO57QD5M.js";
6
+ } from "./chunk-7XZW26U2.js";
7
7
  import {
8
8
  componentArtifactId,
9
9
  componentBundleId,
@@ -13,10 +13,10 @@ import {
13
13
  } from "./chunk-EXY4JJPH.js";
14
14
  import {
15
15
  assertSourceReadsDeclaredAssets
16
- } from "./chunk-62VTAA6O.js";
16
+ } from "./chunk-WL2MLKWU.js";
17
17
  import {
18
18
  resolvedComponentRenderer
19
- } from "./chunk-PCCVZYAF.js";
19
+ } from "./chunk-JWMWVP64.js";
20
20
  import {
21
21
  ComponentBakeJobV2,
22
22
  ComponentBakeRequestV2,
@@ -25,7 +25,7 @@ import {
25
25
  ComponentRuntimeError,
26
26
  assertGraphicsReceiptMatches,
27
27
  assertRendererReceiptMatches
28
- } from "./chunk-UGYYZBG4.js";
28
+ } from "./chunk-EC6VFQE6.js";
29
29
 
30
30
  // ../execution/component-runtime/src/assetServer.ts
31
31
  import { createHash, randomBytes } from "crypto";
@@ -170,7 +170,7 @@ function assertComponentOutputProbe(probe, expected) {
170
170
  const hasAlpha = expected.codec === "vp9" ? stream?.tags?.alpha_mode === "1" : Boolean(stream?.pix_fmt?.startsWith("yuva"));
171
171
  if (stream?.codec_name !== expectedCodec || stream.width !== expected.width || stream.height !== expected.height || frames !== expected.durationInFrames || !Number.isFinite(fps) || Math.abs(fps - expected.fps) > 1e-3 || !Number.isFinite(duration) || Math.abs(duration - expectedDuration) > Math.max(0.05, 1 / expected.fps) || !hasAlpha) {
172
172
  throw new ComponentRuntimeError(
173
- "component_output_invalid",
173
+ "component_output_unverifiable",
174
174
  "Rendered component artifact failed codec, alpha, dimensions, frame-count, FPS, or duration verification."
175
175
  );
176
176
  }
@@ -178,7 +178,7 @@ function assertComponentOutputProbe(probe, expected) {
178
178
  function verifyComponentOutput(options) {
179
179
  const size = statSync2(options.path).size;
180
180
  if (size <= 0 || size > (options.maxBytes ?? 1073741824)) {
181
- throw new ComponentRuntimeError("component_output_invalid", "Rendered component artifact has an invalid size.");
181
+ throw new ComponentRuntimeError("component_output_unverifiable", "Rendered component artifact has an invalid size.");
182
182
  }
183
183
  const bundledProbe = join(dirname(process.execPath), process.platform === "win32" ? "ffprobe.exe" : "ffprobe");
184
184
  const ffprobeExecutable = options.ffprobeExecutable ?? process.env.COMPONENT_FFPROBE_EXECUTABLE ?? (existsSync(bundledProbe) ? bundledProbe : "ffprobe");
@@ -197,7 +197,7 @@ function verifyComponentOutput(options) {
197
197
  options.path
198
198
  ], { encoding: "utf8", timeout: 3e4, maxBuffer: 2e6 }));
199
199
  } catch (error) {
200
- throw new ComponentRuntimeError("component_output_invalid", "Rendered component artifact could not be probed.", { cause: error });
200
+ throw new ComponentRuntimeError("component_output_unverifiable", "Rendered component artifact could not be probed.", { cause: error });
201
201
  }
202
202
  assertComponentOutputProbe(probe, options.expected);
203
203
  if (options.expected.source.manifest.alphaPolicy === "requires-transparency") {
@@ -222,10 +222,10 @@ function verifyComponentOutput(options) {
222
222
  ], { encoding: "utf8", timeout: 3e4, maxBuffer: 2e6 });
223
223
  fractions = parseAlphaOpaqueFractions(output);
224
224
  } catch (error) {
225
- throw new ComponentRuntimeError("component_output_invalid", "Rendered component alpha policy could not be verified.", { cause: error });
225
+ throw new ComponentRuntimeError("component_output_unverifiable", "Rendered component alpha policy could not be verified.", { cause: error });
226
226
  }
227
227
  if (fractions.length === 0) {
228
- throw new ComponentRuntimeError("component_output_invalid", "Rendered component alpha policy produced no samples.");
228
+ throw new ComponentRuntimeError("component_output_unverifiable", "Rendered component alpha policy produced no samples.");
229
229
  }
230
230
  if (bakeOpacityContradictsPolicy(options.expected.source.manifest.alphaPolicy, fractions)) {
231
231
  throw new ComponentRuntimeError("component_output_invalid", "Rendered component is opaque but its manifest requires transparency.");
@@ -52,10 +52,9 @@ var PREVIEW_FRAME_CASES = [
52
52
  },
53
53
  {
54
54
  name: "an unrecognised body key is refused",
55
- why: "THREE DEFINITIONS, AND THE PUBLISHED ONE IS THE STRICTEST. The generated `previewFrameBody` ends `.strict()`, and SDK + MCP clients enforce it. But the route's own `PreviewFrameRequest` (evidence.ts:72) \u2014 the schema `zodJson` actually runs \u2014 ends `});` with NO `.strict()`, and the local handler has no unknown-key check either (ALLOWED_KEYS covers apply only). So a typo like `timestamp` or `dryRun` is accepted and ignored by BOTH servers while the published contract says it is rejected. This row asserts the STRICT reading because that is what is published and what every generated client already enforces; a server looser than its own spec is the divergence. Note this inverts the obvious stage-1 move: adopting the generated schema locally and nowhere else would make the desktop stricter than the cloud \u2014 a NEW divergence pointing the other way. Stage 1 has to settle strictness once, for both.",
55
+ why: "The published `PreviewFrameJobBody` ends `.strict()` and SDK + MCP clients enforce it; a server looser than its own spec is the divergence. Both lanes now run the strict schema, so a typo like `timestamp` or `dryRun` is a 400 everywhere.",
56
56
  body: { timestamps: [1], nonsenseKey: true },
57
- expect: { status: 400, code: "validation_error" },
58
- knownRed: ["cloud"]
57
+ expect: { status: 400, code: "validation_error" }
59
58
  }
60
59
  ];
61
60
  function isKnownRed(c, lane) {
@@ -218,7 +218,25 @@ var ERROR_CODES = {
218
218
  component_graphics_unavailable: { stage: "render", category: "authoring", retryable: false, httpStatus: 422 },
219
219
  component_graphics_mismatch: { stage: "render", category: "internal", retryable: false, httpStatus: 500 },
220
220
  component_device_lost: { stage: "render", category: "transient", retryable: true, httpStatus: 503 },
221
- component_output_invalid: { stage: "render", category: "internal", retryable: false, httpStatus: 500 },
221
+ // The component's own manifest declares transparency and its renderer produced
222
+ // an opaque frame. That is the author's contract contradicting itself, so the
223
+ // sentence naming it belongs on the wire. Fix: declare the component opaque,
224
+ // or stop painting an opaque background over the frame.
225
+ component_output_invalid: { stage: "render", category: "authoring", retryable: false, httpStatus: 422 },
226
+ // The other half of the same verifier: ffprobe would not read the artifact,
227
+ // the alpha sampler would not run or returned nothing, the artifact is empty
228
+ // or over the size ceiling, or it came back in a codec/size/fps we did not ask
229
+ // for. None of that is the author's doing and none of it is visible to them,
230
+ // so it stays a platform fault we see in Sentry.
231
+ component_output_unverifiable: { stage: "render", category: "internal", retryable: false, httpStatus: 500 },
232
+ // Two ways a bake dies without a diagnostic of its own. Both are raised as
233
+ // workflow failures by the host, never as a ComponentRuntimeError, so they are
234
+ // deliberately absent from COMPONENT_RUNTIME_ERROR_CODES. The sandbox ran out
235
+ // of memory: the same bake on a larger box can succeed, so it is worth one retry.
236
+ sandbox_oom: { stage: "render", category: "internal", retryable: true, httpStatus: 503 },
237
+ // The bake process died leaving nothing to read. Retrying reproduces it, so it
238
+ // is ours to diagnose from the run, not the caller's to wait out.
239
+ component_bake_crashed: { stage: "render", category: "internal", retryable: false, httpStatus: 500 },
222
240
  component_conflict: { stage: "validate", category: "authoring", retryable: false, httpStatus: 409 },
223
241
  component_scene_invalid: { stage: "validate", category: "authoring", retryable: false, httpStatus: 422 },
224
242
  motion_preset_unknown: { stage: "validate", category: "authoring", retryable: false, httpStatus: 422 },
@@ -496,6 +514,7 @@ export {
496
514
  encodeError,
497
515
  decodeError,
498
516
  scrubSensitive,
517
+ DEFAULT_RETRY_AFTER_SECONDS,
499
518
  retryAfterSecondsFor,
500
519
  toWireEnvelope
501
520
  };
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  ChatErrorView,
3
3
  DirectorTurnContext
4
- } from "./chunk-WEXGESUQ.js";
4
+ } from "./chunk-4S2YZQJP.js";
5
5
  import {
6
6
  GenerationArtifact
7
7
  } from "./chunk-73DQTUWY.js";
@@ -4,7 +4,7 @@ import {
4
4
  } from "./chunk-OSMXQV5V.js";
5
5
  import {
6
6
  CueframeError
7
- } from "./chunk-QSWONRX2.js";
7
+ } from "./chunk-ULQJWGUV.js";
8
8
 
9
9
  // ../execution/render-harness/src/cardAssetAdmission.ts
10
10
  import parseCss from "css-tree/parser";
@@ -0,0 +1,123 @@
1
+ // ../plane/src/contract.ts
2
+ import { z } from "zod";
3
+ var STILL_BUDGET_BASE_S = 60;
4
+ var STILL_BUDGET_PER_BEAT_S = 10;
5
+ var STILL_BUDGET_CEILING_S = 840;
6
+ var CO_BATCHED_CALLERS = 4;
7
+ var MAX_STILL_BEATS_PER_BATCH = 18;
8
+ function stillBudgetSeconds(beats) {
9
+ return STILL_BUDGET_BASE_S + STILL_BUDGET_PER_BEAT_S * beats;
10
+ }
11
+ var STILL_COBATCH_MAX_BEATS = 3;
12
+ var STILL_WORKER_COLD_START_S = 150;
13
+ function stillCaptureWaitSeconds(beats) {
14
+ const run = beats > STILL_COBATCH_MAX_BEATS ? beats : STILL_COBATCH_MAX_BEATS * CO_BATCHED_CALLERS;
15
+ return STILL_WORKER_COLD_START_S + stillBudgetSeconds(run);
16
+ }
17
+ var PreviewFrameRequest = z.object({
18
+ composition: z.unknown().optional().describe(
19
+ "The composition to render. Absent \u21D2 the project's ACTIVE composition \u2014 what create_render will encode. The response's `previewed.source` names what was rendered."
20
+ ),
21
+ compositionId: z.string().optional().describe(
22
+ "Preview a SPECIFIC persisted composition of this project (create_render parity). Absent \u21D2 the active one. A stale/foreign id is a 404 \u2014 never a silent fall-through."
23
+ ),
24
+ session_id: z.string().optional().describe(
25
+ "Compose-session id: render that session's SCRATCH composition (what the session has been editing) instead of the active row. Ignored when `composition` is passed."
26
+ ),
27
+ timestamps: z.array(z.number()).min(1).max(MAX_STILL_BEATS_PER_BATCH).describe(
28
+ `Composition seconds to capture, ${MAX_STILL_BEATS_PER_BATCH} per request. The batch renders as ONE unit of work \u2014 one warm container, one source decode, N seeks \u2014 and that unit has a fixed time budget, so a larger batch is refused here rather than accepted and timed out minutes later. For a denser sweep, split it across calls; identical beats are served from the still cache, so overlapping batches are cheap.`
29
+ ),
30
+ imageFormat: z.enum(["png", "jpeg"]).optional().describe(
31
+ "Still format. Default jpeg \u2014 these pixels go to a vision model, where jpeg is equivalent and png costs multiples in bytes to store and move. Pass png only when you need full fidelity."
32
+ ),
33
+ scale: z.number().min(0.1).max(1).optional().describe(
34
+ "Render scale 0.1\u20131. Default 0.5, which is what this schema has always recommended for vision-bound looks. Pass 1 when judging fine detail \u2014 it costs ~4x the vision tokens."
35
+ ),
36
+ jpegQuality: z.number().int().min(1).max(100).optional().describe(
37
+ "JPEG quality (jpeg only). Default 70 \u2014 the quality the eval panel grades at."
38
+ )
39
+ // The published `PreviewFrameJobBody` is a strictObject and every generated
40
+ // client enforces it. A server looser than its own spec accepted `timestamp`
41
+ // or `dryRun` and rendered the default instead (plane conformance).
42
+ }).strict();
43
+ var DesktopPreviewFrameRequest = PreviewFrameRequest.pick({
44
+ timestamps: true,
45
+ imageFormat: true,
46
+ scale: true,
47
+ jpegQuality: true
48
+ }).strict();
49
+ var CLIENT_HEADER = "X-CueFrame-Client";
50
+ var CLIENT_SURFACES = [
51
+ "studio",
52
+ "web",
53
+ "console",
54
+ "clips",
55
+ "cli",
56
+ "mcp",
57
+ "director"
58
+ ];
59
+ var CLIENT_OSES = ["macos", "windows", "linux", "browser", "unknown"];
60
+ var CLIENT_VERSION = /^[A-Za-z0-9][A-Za-z0-9._+-]{0,31}$/;
61
+ var BROWSER_SURFACES = ["web", "console", "clips"];
62
+ function clientPairIsPossible(surface, os) {
63
+ return BROWSER_SURFACES.includes(surface) === (os === "browser");
64
+ }
65
+ function formatClientHeader(client) {
66
+ if (!CLIENT_VERSION.test(client.version)) {
67
+ throw new Error(
68
+ `${CLIENT_HEADER} cannot carry the version ${JSON.stringify(client.version)}.`
69
+ );
70
+ }
71
+ if (!clientPairIsPossible(client.surface, client.os)) {
72
+ throw new Error(`${CLIENT_HEADER} cannot carry ${client.surface} on ${client.os}.`);
73
+ }
74
+ return `${client.surface}/${client.version}/${client.os}`;
75
+ }
76
+ function parseClientHeader(value) {
77
+ if (typeof value !== "string") return null;
78
+ const [surface, version, os, ...rest] = value.split("/");
79
+ if (rest.length > 0 || os === void 0) return null;
80
+ if (!CLIENT_SURFACES.includes(surface)) return null;
81
+ if (!CLIENT_OSES.includes(os)) return null;
82
+ if (!CLIENT_VERSION.test(version)) return null;
83
+ if (!clientPairIsPossible(surface, os)) return null;
84
+ return { surface, version, os };
85
+ }
86
+ function osFromNodePlatform(platform) {
87
+ if (platform === "darwin") return "macos";
88
+ if (platform === "win32") return "windows";
89
+ if (platform === "linux") return "linux";
90
+ return "unknown";
91
+ }
92
+ function osFromUserAgent(agent) {
93
+ if (/Mac OS X|Macintosh/.test(agent)) return "macos";
94
+ if (/Windows/.test(agent)) return "windows";
95
+ if (/Linux|X11|CrOS/.test(agent)) return "linux";
96
+ return "unknown";
97
+ }
98
+ function clientOs(surface, agent) {
99
+ return surface === "studio" ? osFromUserAgent(agent) : "browser";
100
+ }
101
+
102
+ export {
103
+ STILL_BUDGET_BASE_S,
104
+ STILL_BUDGET_PER_BEAT_S,
105
+ STILL_BUDGET_CEILING_S,
106
+ CO_BATCHED_CALLERS,
107
+ MAX_STILL_BEATS_PER_BATCH,
108
+ stillBudgetSeconds,
109
+ STILL_COBATCH_MAX_BEATS,
110
+ STILL_WORKER_COLD_START_S,
111
+ stillCaptureWaitSeconds,
112
+ PreviewFrameRequest,
113
+ DesktopPreviewFrameRequest,
114
+ CLIENT_HEADER,
115
+ CLIENT_SURFACES,
116
+ CLIENT_OSES,
117
+ clientPairIsPossible,
118
+ formatClientHeader,
119
+ parseClientHeader,
120
+ osFromNodePlatform,
121
+ osFromUserAgent,
122
+ clientOs
123
+ };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  ComponentRuntimeError
3
- } from "./chunk-UGYYZBG4.js";
3
+ } from "./chunk-EC6VFQE6.js";
4
4
 
5
5
  // ../execution/component-runtime/src/sourceAdmission.ts
6
6
  import { parse } from "@babel/parser";