@field/cascade 0.12.0 → 0.13.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 (35) hide show
  1. package/AGENTS.md +1 -1
  2. package/CHANGELOG.md +50 -0
  3. package/README.md +1 -1
  4. package/dist/cli/{chunk-OM6BEME6.js → chunk-2L34ERS2.js} +3 -3
  5. package/dist/cli/{chunk-3RXL5GHB.js → chunk-JEW5MPGI.js} +4 -4
  6. package/dist/cli/{chunk-ST6LROUG.js → chunk-OBZAP3GG.js} +4 -4
  7. package/dist/cli/{chunk-73S4JZXK.js → chunk-QAGATJGE.js} +5 -5
  8. package/dist/cli/{chunk-MP653A5O.js → chunk-QKL7CCRS.js} +84 -10
  9. package/dist/cli/{chunk-2JEU3MGB.js → chunk-W5PJ5RMP.js} +155 -83
  10. package/dist/cli/{chunk-EU4ZFZ7Y.js → chunk-W7OUAT7J.js} +2 -2
  11. package/dist/cli/{cliCommands-JJN5Z3ZC.js → cliCommands-XVFRD7CF.js} +3 -3
  12. package/dist/cli/{commands-PHYFYA3F.js → commands-M2XLTPTZ.js} +7 -7
  13. package/dist/cli/{doctorCommand-ORWQRNYP.js → doctorCommand-RAEI7GVY.js} +2 -2
  14. package/dist/cli/{editorCommands-NFR32JOY.js → editorCommands-5BBG4S6V.js} +6 -6
  15. package/dist/cli/{graphCommands-EOUOBOIJ.js → graphCommands-MULQ7VD2.js} +2 -2
  16. package/dist/cli/{graphFile-YTGJB5F5.js → graphFile-CITF36ZM.js} +3 -3
  17. package/dist/cli/{helpCommand-PULH6ZYB.js → helpCommand-X2QDANM3.js} +2 -2
  18. package/dist/cli/index.js +13 -13
  19. package/dist/cli/{mcp-JVZFQOEX.js → mcp-YRIGRLYQ.js} +3 -3
  20. package/dist/cli/{parity-X6DEH2DV.js → parity-3N3HTKWX.js} +4 -4
  21. package/dist/cli/{project-VYGIA7JX.js → project-SJF5ZF3F.js} +2 -2
  22. package/dist/cli/{projectRuntime-2Q4JKEH3.js → projectRuntime-NY4XMDFH.js} +3 -3
  23. package/dist/cli/{render-PT4MWI6U.js → render-Y23W6MY6.js} +10 -5
  24. package/dist/cli/{runCommand-HNPQVZMS.js → runCommand-XOG7AVC5.js} +3 -3
  25. package/dist/cli/{runner-5XPXVW7J.js → runner-DNJO5WO2.js} +5 -5
  26. package/dist/cli/{share-MHF6TNRK.js → share-B7HTCOJX.js} +5 -5
  27. package/dist/cli/{webBuild-WPPMGGW7.js → webBuild-2K4COCGY.js} +4 -4
  28. package/dist/contracts/capabilities.d.ts +21 -0
  29. package/dist/player/app.js +8 -5
  30. package/dist/player/embed.js +2 -0
  31. package/dist/player/types.d.ts +6 -0
  32. package/dist/runtime/definition/architecture.js +89 -0
  33. package/doc/PROJECT_AUTHORING.md +60 -1
  34. package/doc/WEB_PLAYER.md +9 -1
  35. package/package.json +1 -1
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  sceneDocument
3
- } from "./chunk-73S4JZXK.js";
3
+ } from "./chunk-QAGATJGE.js";
4
4
  import {
5
5
  setEmbeddedCompiler,
6
6
  setProjectModuleCompiler
@@ -8,8 +8,8 @@ import {
8
8
  import {
9
9
  installHeadlessCanvas
10
10
  } from "./chunk-EZRWJ4G2.js";
11
- import "./chunk-3RXL5GHB.js";
12
- import "./chunk-OM6BEME6.js";
11
+ import "./chunk-JEW5MPGI.js";
12
+ import "./chunk-2L34ERS2.js";
13
13
  import {
14
14
  composeContactSheet
15
15
  } from "./chunk-53LGFPWX.js";
@@ -20,7 +20,7 @@ import {
20
20
  installProjectStages,
21
21
  moduleId,
22
22
  projectModuleFile
23
- } from "./chunk-MP653A5O.js";
23
+ } from "./chunk-QKL7CCRS.js";
24
24
  import "./chunk-MI5JLQYA.js";
25
25
  import "./chunk-GRIN2DDP.js";
26
26
  import "./chunk-X4WKAOQP.js";
@@ -43,7 +43,7 @@ import "./chunk-BZ63XQ3I.js";
43
43
  import {
44
44
  compileEmbedded,
45
45
  compileProjectModule
46
- } from "./chunk-EU4ZFZ7Y.js";
46
+ } from "./chunk-W7OUAT7J.js";
47
47
  import "./chunk-YH637PDL.js";
48
48
  import "./chunk-X566FWBV.js";
49
49
  import "./chunk-WD62JIP6.js";
@@ -52,7 +52,7 @@ import {
52
52
  } from "./chunk-5ORUQ6ES.js";
53
53
  import {
54
54
  ProjectRoot
55
- } from "./chunk-2JEU3MGB.js";
55
+ } from "./chunk-W5PJ5RMP.js";
56
56
  import "./chunk-NJFMDXHR.js";
57
57
  import "./chunk-J7VK7MNF.js";
58
58
  import "./chunk-FWMSGKEH.js";
@@ -1371,4 +1371,4 @@ export {
1371
1371
  LOCK_HELP,
1372
1372
  runLockCommand
1373
1373
  };
1374
- //# sourceMappingURL=commands-PHYFYA3F.js.map
1374
+ //# sourceMappingURL=commands-M2XLTPTZ.js.map
@@ -37,7 +37,7 @@ async function doctor(root, options = {}) {
37
37
  }
38
38
  if (hasStages(root)) {
39
39
  try {
40
- const { ProjectRoot } = await import("./project-VYGIA7JX.js");
40
+ const { ProjectRoot } = await import("./project-SJF5ZF3F.js");
41
41
  const { readStageConfig } = await import("./stageRunner-KY2EJP7X.js");
42
42
  const { stageSources } = await import("./stageCache-TY2BFZJR.js");
43
43
  const project = new ProjectRoot(root);
@@ -103,4 +103,4 @@ export {
103
103
  importsModule,
104
104
  runDoctorCommand
105
105
  };
106
- //# sourceMappingURL=doctorCommand-ORWQRNYP.js.map
106
+ //# sourceMappingURL=doctorCommand-RAEI7GVY.js.map
@@ -3,11 +3,11 @@ import {
3
3
  EDITOR_HELP,
4
4
  runEditorCommand,
5
5
  sceneDocument
6
- } from "./chunk-73S4JZXK.js";
6
+ } from "./chunk-QAGATJGE.js";
7
7
  import "./chunk-EZRWJ4G2.js";
8
- import "./chunk-3RXL5GHB.js";
9
- import "./chunk-OM6BEME6.js";
10
- import "./chunk-MP653A5O.js";
8
+ import "./chunk-JEW5MPGI.js";
9
+ import "./chunk-2L34ERS2.js";
10
+ import "./chunk-QKL7CCRS.js";
11
11
  import "./chunk-MI5JLQYA.js";
12
12
  import "./chunk-GRIN2DDP.js";
13
13
  import "./chunk-X4WKAOQP.js";
@@ -27,7 +27,7 @@ import "./chunk-YH637PDL.js";
27
27
  import "./chunk-X566FWBV.js";
28
28
  import "./chunk-WD62JIP6.js";
29
29
  import "./chunk-5ORUQ6ES.js";
30
- import "./chunk-2JEU3MGB.js";
30
+ import "./chunk-W5PJ5RMP.js";
31
31
  import "./chunk-NJFMDXHR.js";
32
32
  import "./chunk-J7VK7MNF.js";
33
33
  import "./chunk-FWMSGKEH.js";
@@ -38,4 +38,4 @@ export {
38
38
  runEditorCommand,
39
39
  sceneDocument
40
40
  };
41
- //# sourceMappingURL=editorCommands-NFR32JOY.js.map
41
+ //# sourceMappingURL=editorCommands-5BBG4S6V.js.map
@@ -6,7 +6,7 @@ import {
6
6
  // src/cli/graphCommands.ts
7
7
  import fs from "node:fs/promises";
8
8
  import path from "node:path";
9
- var loadGraphFile = async () => (await import("./graphFile-YTGJB5F5.js")).GraphFile;
9
+ var loadGraphFile = async () => (await import("./graphFile-CITF36ZM.js")).GraphFile;
10
10
  async function runGraphCommand(args, options) {
11
11
  const parsed = parseArguments(args);
12
12
  const [command, ...rest] = parsed.positional;
@@ -181,4 +181,4 @@ export {
181
181
  applyEdits,
182
182
  runGraphCommand
183
183
  };
184
- //# sourceMappingURL=graphCommands-EOUOBOIJ.js.map
184
+ //# sourceMappingURL=graphCommands-MULQ7VD2.js.map
@@ -2,7 +2,7 @@ import {
2
2
  builtinModuleIds,
3
3
  diagnoseGraph,
4
4
  moduleDefinitions
5
- } from "./chunk-MP653A5O.js";
5
+ } from "./chunk-QKL7CCRS.js";
6
6
  import "./chunk-MI5JLQYA.js";
7
7
  import "./chunk-GRIN2DDP.js";
8
8
  import "./chunk-X4WKAOQP.js";
@@ -31,7 +31,7 @@ import "./chunk-WD62JIP6.js";
31
31
  import {
32
32
  writeFileAtomic
33
33
  } from "./chunk-5ORUQ6ES.js";
34
- import "./chunk-2JEU3MGB.js";
34
+ import "./chunk-W5PJ5RMP.js";
35
35
  import "./chunk-NJFMDXHR.js";
36
36
  import "./chunk-J7VK7MNF.js";
37
37
  import "./chunk-FWMSGKEH.js";
@@ -289,4 +289,4 @@ export {
289
289
  openGraph,
290
290
  serializeGraph
291
291
  };
292
- //# sourceMappingURL=graphFile-YTGJB5F5.js.map
292
+ //# sourceMappingURL=graphFile-CITF36ZM.js.map
@@ -76,7 +76,7 @@ async function findNode(type, project) {
76
76
  }
77
77
  async function projectDefinition(project, name) {
78
78
  if (!existsSync(path.join(project, "nodes", name, "index.ts"))) return void 0;
79
- const { moduleDefinitions } = await import("./projectRuntime-2Q4JKEH3.js");
79
+ const { moduleDefinitions } = await import("./projectRuntime-NY4XMDFH.js");
80
80
  const definitions = await moduleDefinitions(path.join(project, "index.cascade"), [`project.${name}`]);
81
81
  return definitions.get(`project.${name}`);
82
82
  }
@@ -154,4 +154,4 @@ export {
154
154
  formatNode,
155
155
  runHelpCommand
156
156
  };
157
- //# sourceMappingURL=helpCommand-PULH6ZYB.js.map
157
+ //# sourceMappingURL=helpCommand-X2QDANM3.js.map
package/dist/cli/index.js CHANGED
@@ -22,16 +22,16 @@ var reported = (exitCode, run) => async () => {
22
22
  };
23
23
  var HANDLERS = {
24
24
  async studio(args) {
25
- const { runStudioCli } = await import("./cliCommands-JJN5Z3ZC.js");
25
+ const { runStudioCli } = await import("./cliCommands-XVFRD7CF.js");
26
26
  await runStudioCli(args);
27
27
  },
28
28
  async run(args) {
29
29
  if (args.includes("--scene") || args.includes("--write")) return HANDLERS.editor(args, false);
30
- const { runCommand } = await import("./runCommand-HNPQVZMS.js");
30
+ const { runCommand } = await import("./runCommand-XOG7AVC5.js");
31
31
  await runCommand(args);
32
32
  },
33
33
  async render(args, help) {
34
- const { RENDER_HELP, parseRenderArgs, renderGraph } = await import("./render-PT4MWI6U.js");
34
+ const { RENDER_HELP, parseRenderArgs, renderGraph } = await import("./render-Y23W6MY6.js");
35
35
  if (help) {
36
36
  console.log(RENDER_HELP);
37
37
  return;
@@ -43,45 +43,45 @@ var HANDLERS = {
43
43
  })();
44
44
  },
45
45
  async renderWorker(args) {
46
- const { runRenderWorker } = await import("./render-PT4MWI6U.js");
46
+ const { runRenderWorker } = await import("./render-Y23W6MY6.js");
47
47
  await runRenderWorker(args[1]);
48
48
  },
49
49
  async build(args) {
50
- const { buildCommand } = await import("./runCommand-HNPQVZMS.js");
50
+ const { buildCommand } = await import("./runCommand-XOG7AVC5.js");
51
51
  await buildCommand(args);
52
52
  },
53
53
  async editor(args) {
54
- const { runEditorCommand } = await import("./editorCommands-NFR32JOY.js");
54
+ const { runEditorCommand } = await import("./editorCommands-5BBG4S6V.js");
55
55
  await reported(1, () => runEditorCommand(args))();
56
56
  },
57
57
  async parity(args) {
58
58
  await reported(2, async () => {
59
- const { runParityCommand } = await import("./parity-X6DEH2DV.js");
59
+ const { runParityCommand } = await import("./parity-3N3HTKWX.js");
60
60
  process.exitCode = await runParityCommand(args.slice(1));
61
61
  })();
62
62
  },
63
63
  async graph(args) {
64
- const { runGraphCommand } = await import("./graphCommands-EOUOBOIJ.js");
64
+ const { runGraphCommand } = await import("./graphCommands-MULQ7VD2.js");
65
65
  await reported(1, async () => {
66
66
  await runGraphCommand(args, { json: false });
67
67
  })();
68
68
  },
69
69
  async lock(args, help) {
70
- const { runLockCommand, LOCK_HELP } = await import("./commands-PHYFYA3F.js");
70
+ const { runLockCommand, LOCK_HELP } = await import("./commands-M2XLTPTZ.js");
71
71
  if (help) console.log(LOCK_HELP);
72
72
  else await runLockCommand(args);
73
73
  },
74
74
  async mcp(args) {
75
- const { runMcpServer } = await import("./mcp-JVZFQOEX.js");
75
+ const { runMcpServer } = await import("./mcp-YRIGRLYQ.js");
76
76
  await runMcpServer(args.slice(1), VERSION);
77
77
  },
78
78
  async help(args, help) {
79
- const { runHelpCommand, HELP_NODE_USAGE } = await import("./helpCommand-PULH6ZYB.js");
79
+ const { runHelpCommand, HELP_NODE_USAGE } = await import("./helpCommand-X2QDANM3.js");
80
80
  if (help) console.log(`Usage: ${HELP_NODE_USAGE}`);
81
81
  else await reported(1, () => runHelpCommand(args))();
82
82
  },
83
83
  async doctor(args, help) {
84
- const { runDoctorCommand, DOCTOR_USAGE } = await import("./doctorCommand-ORWQRNYP.js");
84
+ const { runDoctorCommand, DOCTOR_USAGE } = await import("./doctorCommand-RAEI7GVY.js");
85
85
  if (help) console.log(`Usage: ${DOCTOR_USAGE}`);
86
86
  else await reported(1, () => runDoctorCommand(args))();
87
87
  }
@@ -100,7 +100,7 @@ async function main() {
100
100
  await runWithJsonEnvelope(async () => {
101
101
  if (opensStudio) throw new Error("This command opens Studio, which has no --json output");
102
102
  if (verb?.handler === "graph") {
103
- const { runGraphCommand } = await import("./graphCommands-EOUOBOIJ.js");
103
+ const { runGraphCommand } = await import("./graphCommands-MULQ7VD2.js");
104
104
  return runGraphCommand(commandArgs, { json: true });
105
105
  }
106
106
  await dispatch(commandArgs);
@@ -43,12 +43,12 @@ function toolRunner(call) {
43
43
  switch (call.kind) {
44
44
  case "edit":
45
45
  return async (args, server) => {
46
- const { applyEdits } = await import("./graphCommands-EOUOBOIJ.js");
46
+ const { applyEdits } = await import("./graphCommands-MULQ7VD2.js");
47
47
  return captureEnvelope(() => applyEdits(server.resolve(args.graph), call.operations(args), { json: true, dryRun: args.dryRun === true }));
48
48
  };
49
49
  case "graph":
50
50
  return async (args, server) => {
51
- const { runGraphCommand } = await import("./graphCommands-EOUOBOIJ.js");
51
+ const { runGraphCommand } = await import("./graphCommands-MULQ7VD2.js");
52
52
  return captureEnvelope(() => runGraphCommand(call.argv(args, (file) => server.resolve(file)), { json: true }));
53
53
  };
54
54
  case "cli":
@@ -161,4 +161,4 @@ export {
161
161
  handle,
162
162
  runMcpServer
163
163
  };
164
- //# sourceMappingURL=mcp-JVZFQOEX.js.map
164
+ //# sourceMappingURL=mcp-YRIGRLYQ.js.map
@@ -10,7 +10,7 @@ import {
10
10
  createProjectHost,
11
11
  installProjectIo,
12
12
  installProjectStages
13
- } from "./chunk-MP653A5O.js";
13
+ } from "./chunk-QKL7CCRS.js";
14
14
  import "./chunk-MI5JLQYA.js";
15
15
  import "./chunk-GRIN2DDP.js";
16
16
  import "./chunk-X4WKAOQP.js";
@@ -33,14 +33,14 @@ import "./chunk-BZ63XQ3I.js";
33
33
  import {
34
34
  compileEmbedded,
35
35
  compileProjectModule
36
- } from "./chunk-EU4ZFZ7Y.js";
36
+ } from "./chunk-W7OUAT7J.js";
37
37
  import "./chunk-YH637PDL.js";
38
38
  import "./chunk-X566FWBV.js";
39
39
  import "./chunk-WD62JIP6.js";
40
40
  import "./chunk-5ORUQ6ES.js";
41
41
  import {
42
42
  ProjectRoot
43
- } from "./chunk-2JEU3MGB.js";
43
+ } from "./chunk-W5PJ5RMP.js";
44
44
  import "./chunk-NJFMDXHR.js";
45
45
  import "./chunk-J7VK7MNF.js";
46
46
  import "./chunk-FWMSGKEH.js";
@@ -331,4 +331,4 @@ export {
331
331
  runParityCommand,
332
332
  snapshotValue
333
333
  };
334
- //# sourceMappingURL=parity-X6DEH2DV.js.map
334
+ //# sourceMappingURL=parity-3N3HTKWX.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  PathSafetyError,
3
3
  ProjectRoot
4
- } from "./chunk-2JEU3MGB.js";
4
+ } from "./chunk-W5PJ5RMP.js";
5
5
  import "./chunk-NJFMDXHR.js";
6
6
  import "./chunk-J7VK7MNF.js";
7
7
  import "./chunk-FWMSGKEH.js";
@@ -9,4 +9,4 @@ export {
9
9
  PathSafetyError,
10
10
  ProjectRoot
11
11
  };
12
- //# sourceMappingURL=project-VYGIA7JX.js.map
12
+ //# sourceMappingURL=project-SJF5ZF3F.js.map
@@ -12,7 +12,7 @@ import {
12
12
  renderDeterministicProjectFrames,
13
13
  runDeterministicProjectGraph,
14
14
  validateProjectGraph
15
- } from "./chunk-MP653A5O.js";
15
+ } from "./chunk-QKL7CCRS.js";
16
16
  import "./chunk-MI5JLQYA.js";
17
17
  import "./chunk-GRIN2DDP.js";
18
18
  import "./chunk-X4WKAOQP.js";
@@ -32,7 +32,7 @@ import "./chunk-YH637PDL.js";
32
32
  import "./chunk-X566FWBV.js";
33
33
  import "./chunk-WD62JIP6.js";
34
34
  import "./chunk-5ORUQ6ES.js";
35
- import "./chunk-2JEU3MGB.js";
35
+ import "./chunk-W5PJ5RMP.js";
36
36
  import "./chunk-NJFMDXHR.js";
37
37
  import "./chunk-J7VK7MNF.js";
38
38
  import "./chunk-FWMSGKEH.js";
@@ -52,4 +52,4 @@ export {
52
52
  runDeterministicProjectGraph,
53
53
  validateProjectGraph
54
54
  };
55
- //# sourceMappingURL=projectRuntime-2Q4JKEH3.js.map
55
+ //# sourceMappingURL=projectRuntime-NY4XMDFH.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  runGraph
3
- } from "./chunk-ST6LROUG.js";
3
+ } from "./chunk-OBZAP3GG.js";
4
4
  import "./chunk-2KXB47FP.js";
5
5
  import "./chunk-EZRWJ4G2.js";
6
6
  import {
@@ -16,7 +16,7 @@ import {
16
16
  import {
17
17
  parseEnvArgs
18
18
  } from "./chunk-ZL4JTG5Y.js";
19
- import "./chunk-MP653A5O.js";
19
+ import "./chunk-QKL7CCRS.js";
20
20
  import "./chunk-MI5JLQYA.js";
21
21
  import "./chunk-GRIN2DDP.js";
22
22
  import "./chunk-X4WKAOQP.js";
@@ -35,12 +35,12 @@ import {
35
35
  } from "./chunk-CO22XHNG.js";
36
36
  import "./chunk-LTXWBXOM.js";
37
37
  import "./chunk-BZ63XQ3I.js";
38
- import "./chunk-EU4ZFZ7Y.js";
38
+ import "./chunk-W7OUAT7J.js";
39
39
  import "./chunk-YH637PDL.js";
40
40
  import "./chunk-X566FWBV.js";
41
41
  import "./chunk-WD62JIP6.js";
42
42
  import "./chunk-5ORUQ6ES.js";
43
- import "./chunk-2JEU3MGB.js";
43
+ import "./chunk-W5PJ5RMP.js";
44
44
  import "./chunk-NJFMDXHR.js";
45
45
  import "./chunk-J7VK7MNF.js";
46
46
  import "./chunk-FWMSGKEH.js";
@@ -180,12 +180,17 @@ function parseRenderArgs(args) {
180
180
  function sharedOutputPaths(a, b) {
181
181
  const shared = [];
182
182
  for (const output of a.outputs) {
183
+ if (isContentNamed(output.source)) continue;
183
184
  if (b.outputs.some((other) => other.nodeId === output.nodeId && other.source === output.source)) {
184
185
  shared.push({ nodeId: output.nodeId, source: output.source });
185
186
  }
186
187
  }
187
188
  return shared;
188
189
  }
190
+ function isContentNamed(source) {
191
+ const clean = source.split("\\").join("/");
192
+ return /(?:^|\/)\.cascade-cache\//.test(clean) && /^[^.]*\.[0-9a-f]{12}(?:\.[^/]*)?$/.test(path.posix.basename(clean));
193
+ }
189
194
  function fixedPathMessage(shared, a, b) {
190
195
  const nodes = shared.map(({ nodeId, source }) => `"${nodeId}" (${source})`).join(", ");
191
196
  return `Cannot render in parallel: ${shared.length === 1 ? "node" : "nodes"} ${nodes} wrote frames ${a} and ${b} to the same file, so workers would overwrite each other's frames and the sequence would silently mix them up. Give the output a per-frame path: put the frame in the file name, or save through saveImage(canvas, cachePath(context.nodeId, ".png")) from cascade/io or the assets capability, which name files by their content. Or render with --workers 1.`;
@@ -435,4 +440,4 @@ export {
435
440
  runRenderWorker,
436
441
  sharedOutputPaths
437
442
  };
438
- //# sourceMappingURL=render-PT4MWI6U.js.map
443
+ //# sourceMappingURL=render-Y23W6MY6.js.map
@@ -155,7 +155,7 @@ async function runCommand(args) {
155
155
  process.exitCode = await superviseProcess(process.execPath, [...process.execArgv, process.argv[1], ...childArgs], ms);
156
156
  return;
157
157
  }
158
- const { runGraph } = await import("./runner-5XPXVW7J.js");
158
+ const { runGraph } = await import("./runner-DNJO5WO2.js");
159
159
  try {
160
160
  if (options.json) console.log = console.error;
161
161
  await runGraph(options);
@@ -168,7 +168,7 @@ async function runCommand(args) {
168
168
  }
169
169
  }
170
170
  async function buildCommand(args) {
171
- const { buildPlayer } = await import("./webBuild-WPPMGGW7.js");
171
+ const { buildPlayer } = await import("./webBuild-2K4COCGY.js");
172
172
  if (!args[1] || args[1].startsWith("-")) throw new Error("cascade build requires a graph file");
173
173
  let out;
174
174
  const assets = [];
@@ -195,4 +195,4 @@ export {
195
195
  buildCommand,
196
196
  runCommand
197
197
  };
198
- //# sourceMappingURL=runCommand-HNPQVZMS.js.map
198
+ //# sourceMappingURL=runCommand-XOG7AVC5.js.map
@@ -2,14 +2,14 @@ import {
2
2
  RENDER_SUGGESTION_FRAMES,
3
3
  renderSuggestion,
4
4
  runGraph
5
- } from "./chunk-ST6LROUG.js";
5
+ } from "./chunk-OBZAP3GG.js";
6
6
  import "./chunk-2KXB47FP.js";
7
7
  import "./chunk-EZRWJ4G2.js";
8
8
  import "./chunk-BP7UKF36.js";
9
9
  import "./chunk-RUU3YWXU.js";
10
10
  import "./chunk-7QE2ZNSN.js";
11
11
  import "./chunk-ZL4JTG5Y.js";
12
- import "./chunk-MP653A5O.js";
12
+ import "./chunk-QKL7CCRS.js";
13
13
  import "./chunk-MI5JLQYA.js";
14
14
  import "./chunk-GRIN2DDP.js";
15
15
  import "./chunk-X4WKAOQP.js";
@@ -25,12 +25,12 @@ import "./chunk-ICH7N5PN.js";
25
25
  import "./chunk-CO22XHNG.js";
26
26
  import "./chunk-LTXWBXOM.js";
27
27
  import "./chunk-BZ63XQ3I.js";
28
- import "./chunk-EU4ZFZ7Y.js";
28
+ import "./chunk-W7OUAT7J.js";
29
29
  import "./chunk-YH637PDL.js";
30
30
  import "./chunk-X566FWBV.js";
31
31
  import "./chunk-WD62JIP6.js";
32
32
  import "./chunk-5ORUQ6ES.js";
33
- import "./chunk-2JEU3MGB.js";
33
+ import "./chunk-W5PJ5RMP.js";
34
34
  import "./chunk-NJFMDXHR.js";
35
35
  import "./chunk-J7VK7MNF.js";
36
36
  import "./chunk-FWMSGKEH.js";
@@ -40,4 +40,4 @@ export {
40
40
  renderSuggestion,
41
41
  runGraph
42
42
  };
43
- //# sourceMappingURL=runner-5XPXVW7J.js.map
43
+ //# sourceMappingURL=runner-DNJO5WO2.js.map
@@ -3,9 +3,9 @@ import {
3
3
  exportEditor,
4
4
  scanForLeaks,
5
5
  vercelConfig
6
- } from "./chunk-3RXL5GHB.js";
7
- import "./chunk-OM6BEME6.js";
8
- import "./chunk-MP653A5O.js";
6
+ } from "./chunk-JEW5MPGI.js";
7
+ import "./chunk-2L34ERS2.js";
8
+ import "./chunk-QKL7CCRS.js";
9
9
  import "./chunk-MI5JLQYA.js";
10
10
  import "./chunk-GRIN2DDP.js";
11
11
  import "./chunk-X4WKAOQP.js";
@@ -25,7 +25,7 @@ import "./chunk-YH637PDL.js";
25
25
  import "./chunk-X566FWBV.js";
26
26
  import "./chunk-WD62JIP6.js";
27
27
  import "./chunk-5ORUQ6ES.js";
28
- import "./chunk-2JEU3MGB.js";
28
+ import "./chunk-W5PJ5RMP.js";
29
29
  import "./chunk-NJFMDXHR.js";
30
30
  import "./chunk-J7VK7MNF.js";
31
31
  import "./chunk-FWMSGKEH.js";
@@ -163,4 +163,4 @@ export {
163
163
  share,
164
164
  shareSlug
165
165
  };
166
- //# sourceMappingURL=share-MHF6TNRK.js.map
166
+ //# sourceMappingURL=share-B7HTCOJX.js.map
@@ -6,8 +6,8 @@ import {
6
6
  installRoot,
7
7
  playerFile,
8
8
  staticRuntimePlugin
9
- } from "./chunk-OM6BEME6.js";
10
- import "./chunk-MP653A5O.js";
9
+ } from "./chunk-2L34ERS2.js";
10
+ import "./chunk-QKL7CCRS.js";
11
11
  import "./chunk-MI5JLQYA.js";
12
12
  import "./chunk-GRIN2DDP.js";
13
13
  import "./chunk-X4WKAOQP.js";
@@ -27,7 +27,7 @@ import "./chunk-YH637PDL.js";
27
27
  import "./chunk-X566FWBV.js";
28
28
  import "./chunk-WD62JIP6.js";
29
29
  import "./chunk-5ORUQ6ES.js";
30
- import "./chunk-2JEU3MGB.js";
30
+ import "./chunk-W5PJ5RMP.js";
31
31
  import "./chunk-NJFMDXHR.js";
32
32
  import "./chunk-J7VK7MNF.js";
33
33
  import "./chunk-FWMSGKEH.js";
@@ -41,4 +41,4 @@ export {
41
41
  playerFile,
42
42
  staticRuntimePlugin
43
43
  };
44
- //# sourceMappingURL=webBuild-WPPMGGW7.js.map
44
+ //# sourceMappingURL=webBuild-2K4COCGY.js.map
@@ -18,10 +18,31 @@ export interface ProgressReporter {
18
18
  detail?: JsonValue;
19
19
  }): void;
20
20
  }
21
+ /**
22
+ * A cache a node finds again by its own key: `put(key, data)` then, on a later
23
+ * cook or run, `get(key)` returns those bytes (or null). Keys are path-like
24
+ * (`stage/3fa9c2…`, letters, digits, `.`, `_`, `-`, `/`-separated) and are never
25
+ * renamed by a content hash. Derive a key from everything the bytes depend on.
26
+ */
27
+ export interface KeyedCache {
28
+ get(key: string, options: {
29
+ signal: CascadeAbortSignal;
30
+ }): Promise<Uint8Array | null>;
31
+ put(key: string, data: Uint8Array, options: {
32
+ signal: CascadeAbortSignal;
33
+ }): Promise<void>;
34
+ }
35
+ /**
36
+ * Project files. Reads resolve in the project (and `shared/` and the read-only
37
+ * roots cascade.json `reads` declares). Writes keep the name given, and go to
38
+ * `.cascade-cache/` or a folder cascade.json `writes` declares.
39
+ */
21
40
  export interface FileCapability {
22
41
  read(path: string, options: {
23
42
  signal: CascadeAbortSignal;
24
43
  }): Promise<Uint8Array>;
44
+ /** The keyed cache, under `.cascade-cache/keyed/`. */
45
+ readonly cache: KeyedCache;
25
46
  write(path: string, data: Uint8Array, options: {
26
47
  signal: CascadeAbortSignal;
27
48
  }): Promise<void>;
@@ -308,7 +308,7 @@ async function startPlayer(options) {
308
308
  if (!root) throw new Error("Cascade player needs a document body or explicit root");
309
309
  const view = hostDocument.defaultView;
310
310
  const initial = readInitialState(view?.location.href);
311
- const ui = createUi(hostDocument, root);
311
+ const ui = createUi(hostDocument, root, options.chrome ?? initial.chrome);
312
312
  let assets;
313
313
  let disposeIo;
314
314
  let gpu;
@@ -545,7 +545,7 @@ var BrowserPlayer = class {
545
545
  this.assertActive();
546
546
  let result;
547
547
  try {
548
- result = await this.context.graph.run({ frame, fps: this.context.graph.getFps() });
548
+ result = await this.context.graph.run({ frame, fps: this.context.graph.getFps(), reuse: "strict" });
549
549
  this.settledRoots = outputValues(result);
550
550
  if (result.status !== "completed") throw resultError(result);
551
551
  if (!this.selected) this.selected = preferredOutput(result);
@@ -666,10 +666,11 @@ var BrowserPlayer = class {
666
666
  if (this.disposed) throw new Error("Cascade player is disposed");
667
667
  }
668
668
  };
669
- function createUi(hostDocument, root) {
669
+ function createUi(hostDocument, root, chrome) {
670
670
  root.replaceChildren();
671
671
  root.dataset.cascadePlayer = "";
672
- Object.assign(root.style, { display: "flex", flexDirection: "column", height: "100%", margin: "0", background: "#141414", color: "#eee", overflow: "hidden" });
672
+ Object.assign(root.style, { display: "flex", flexDirection: "column", height: "100%", margin: "0", overflow: "hidden" });
673
+ if (chrome) Object.assign(root.style, { background: "#141414", color: "#eee" });
673
674
  const toolbar = hostDocument.createElement("div");
674
675
  toolbar.dataset.cascadeControls = "";
675
676
  Object.assign(toolbar.style, { display: "flex", gap: "8px", padding: "8px", flex: "none", alignItems: "center" });
@@ -690,7 +691,8 @@ function createUi(hostDocument, root) {
690
691
  output.dataset.cascadeOutput = "";
691
692
  Object.assign(output.style, { display: "grid", placeItems: "center", flex: "1", minHeight: "0", minWidth: "0", overflow: "auto" });
692
693
  toolbar.append(play, frame);
693
- root.append(toolbar, error, output);
694
+ if (chrome) root.append(toolbar);
695
+ root.append(error, output);
694
696
  return { play, frame, error, output };
695
697
  }
696
698
  function renderSceneCanvas(hostDocument, scene, width, height, stroke = [1, 1, 1, 1]) {
@@ -740,6 +742,7 @@ function readInitialState(href) {
740
742
  frame,
741
743
  fps,
742
744
  autoplay: query.get("autoplay") === "1",
745
+ chrome: query.get("chrome") !== "0",
743
746
  ...nodeId && port ? { output: { nodeId, port } } : {}
744
747
  };
745
748
  }
@@ -12,6 +12,8 @@ async function mountPlayer(container, options) {
12
12
  setQueryOption(url, "frame", options.frame ?? 1);
13
13
  setQueryOption(url, "fps", options.fps ?? 30);
14
14
  url.searchParams.set("autoplay", options.autoplay ? "1" : "0");
15
+ if (options.chrome === false) url.searchParams.set("chrome", "0");
16
+ else url.searchParams.delete("chrome");
15
17
  if (options.output) {
16
18
  url.searchParams.set("outputNode", options.output.nodeId);
17
19
  url.searchParams.set("outputPort", options.output.port);
@@ -32,4 +32,10 @@ export interface MountPlayerOptions {
32
32
  readonly fps?: number;
33
33
  readonly autoplay?: boolean;
34
34
  readonly output?: PlayerOutputSelection;
35
+ /**
36
+ * `false` shows the output alone on a transparent page: no dark frame, Play
37
+ * button or frame field. Errors still appear. Default `true`; the URL form
38
+ * is `?chrome=0`.
39
+ */
40
+ readonly chrome?: boolean;
35
41
  }