@nodetool-ai/protocol 0.8.2 → 0.8.3
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.
- package/README.md +1 -1
- package/dist/.nodetool-build-stamp +1 -1
- package/dist/api-schemas/api-error-code.d.ts +9 -1
- package/dist/api-schemas/api-error-code.d.ts.map +1 -1
- package/dist/api-schemas/api-error-code.js +6 -0
- package/dist/api-schemas/api-error-code.js.map +1 -1
- package/dist/api-schemas/app-runs.d.ts +28 -0
- package/dist/api-schemas/app-runs.d.ts.map +1 -1
- package/dist/api-schemas/applications.d.ts +42 -0
- package/dist/api-schemas/applications.d.ts.map +1 -1
- package/dist/api-schemas/assets.d.ts +7 -0
- package/dist/api-schemas/assets.d.ts.map +1 -1
- package/dist/api-schemas/assets.js +5 -0
- package/dist/api-schemas/assets.js.map +1 -1
- package/dist/api-schemas/jobs.d.ts +7 -0
- package/dist/api-schemas/jobs.d.ts.map +1 -1
- package/dist/api-schemas/messages.d.ts +9 -0
- package/dist/api-schemas/messages.d.ts.map +1 -1
- package/dist/api-schemas/messages.js +10 -0
- package/dist/api-schemas/messages.js.map +1 -1
- package/dist/api-schemas/projects.d.ts +102 -6
- package/dist/api-schemas/projects.d.ts.map +1 -1
- package/dist/api-schemas/projects.js +24 -0
- package/dist/api-schemas/projects.js.map +1 -1
- package/dist/api-schemas/sketch.d.ts +40 -0
- package/dist/api-schemas/sketch.d.ts.map +1 -1
- package/dist/api-schemas/sketch.js +14 -4
- package/dist/api-schemas/sketch.js.map +1 -1
- package/dist/api-schemas/storyboards.d.ts +170 -0
- package/dist/api-schemas/storyboards.d.ts.map +1 -1
- package/dist/api-schemas/storyboards.js +42 -2
- package/dist/api-schemas/storyboards.js.map +1 -1
- package/dist/api-schemas/timeline-tool-contracts.js +13 -13
- package/dist/api-schemas/timeline-tool-contracts.js.map +1 -1
- package/dist/api-schemas/timeline-tool-params.d.ts.map +1 -1
- package/dist/api-schemas/timeline-tool-params.js +2 -1
- package/dist/api-schemas/timeline-tool-params.js.map +1 -1
- package/dist/api-schemas/timeline.d.ts +15 -0
- package/dist/api-schemas/timeline.d.ts.map +1 -1
- package/dist/api-schemas/timeline.js +9 -1
- package/dist/api-schemas/timeline.js.map +1 -1
- package/dist/api-schemas/workflows.d.ts +156 -0
- package/dist/api-schemas/workflows.d.ts.map +1 -1
- package/dist/api-schemas/workflows.js +38 -4
- package/dist/api-schemas/workflows.js.map +1 -1
- package/dist/api-types.d.ts +12 -1
- package/dist/api-types.d.ts.map +1 -1
- package/dist/api-types.js +8 -0
- package/dist/api-types.js.map +1 -1
- package/dist/bridge-frames.d.ts +23 -3
- package/dist/bridge-frames.d.ts.map +1 -1
- package/dist/bridge-frames.js +24 -3
- package/dist/bridge-frames.js.map +1 -1
- package/dist/bridge-frames.schema.json +31 -0
- package/dist/bridge-protocol.d.ts +8 -7
- package/dist/bridge-protocol.d.ts.map +1 -1
- package/dist/bridge-protocol.js +8 -7
- package/dist/bridge-protocol.js.map +1 -1
- package/dist/cloud-profile.d.ts +13 -0
- package/dist/cloud-profile.d.ts.map +1 -1
- package/dist/cloud-profile.js +34 -0
- package/dist/cloud-profile.js.map +1 -1
- package/dist/creative.d.ts +4 -0
- package/dist/creative.d.ts.map +1 -1
- package/dist/creative.js.map +1 -1
- package/dist/game-asset-catalog.d.ts +129 -0
- package/dist/game-asset-catalog.d.ts.map +1 -0
- package/dist/game-asset-catalog.js +208 -0
- package/dist/game-asset-catalog.js.map +1 -0
- package/dist/game-design.d.ts +18 -0
- package/dist/game-design.d.ts.map +1 -1
- package/dist/game-design.js +148 -0
- package/dist/game-design.js.map +1 -1
- package/dist/game-entity-metadata.d.ts +7 -0
- package/dist/game-entity-metadata.d.ts.map +1 -0
- package/dist/game-entity-metadata.js +42 -0
- package/dist/game-entity-metadata.js.map +1 -0
- package/dist/game-input.d.ts +186 -0
- package/dist/game-input.d.ts.map +1 -0
- package/dist/game-input.js +166 -0
- package/dist/game-input.js.map +1 -0
- package/dist/game-particles.d.ts +314 -0
- package/dist/game-particles.d.ts.map +1 -0
- package/dist/game-particles.js +134 -0
- package/dist/game-particles.js.map +1 -0
- package/dist/game-script-events.d.ts +32 -0
- package/dist/game-script-events.d.ts.map +1 -0
- package/dist/game-script-events.js +32 -0
- package/dist/game-script-events.js.map +1 -0
- package/dist/game-script-params.d.ts +134 -0
- package/dist/game-script-params.d.ts.map +1 -0
- package/dist/game-script-params.js +109 -0
- package/dist/game-script-params.js.map +1 -0
- package/dist/game-slot-prompt.d.ts +6 -1
- package/dist/game-slot-prompt.d.ts.map +1 -1
- package/dist/game-slot-prompt.js +1 -1
- package/dist/game-slot-prompt.js.map +1 -1
- package/dist/game-ui.d.ts +681 -0
- package/dist/game-ui.d.ts.map +1 -0
- package/dist/game-ui.js +215 -0
- package/dist/game-ui.js.map +1 -0
- package/dist/game2d/components/audio.d.ts +144 -0
- package/dist/game2d/components/audio.d.ts.map +1 -0
- package/dist/game2d/components/audio.js +137 -0
- package/dist/game2d/components/audio.js.map +1 -0
- package/dist/game2d/components/audioSource.d.ts +65 -0
- package/dist/game2d/components/audioSource.d.ts.map +1 -1
- package/dist/game2d/components/audioSource.js +44 -1
- package/dist/game2d/components/audioSource.js.map +1 -1
- package/dist/game2d/components/behaviors.d.ts +53 -0
- package/dist/game2d/components/behaviors.d.ts.map +1 -1
- package/dist/game2d/components/behaviors.js +4 -1
- package/dist/game2d/components/behaviors.js.map +1 -1
- package/dist/game2d/components/entity-components.d.ts +129 -0
- package/dist/game2d/components/entity-components.d.ts.map +1 -1
- package/dist/game2d/components/entity-components.js +3 -1
- package/dist/game2d/components/entity-components.js.map +1 -1
- package/dist/game2d/index.d.ts +1691 -28
- package/dist/game2d/index.d.ts.map +1 -1
- package/dist/game2d/index.js +37 -8
- package/dist/game2d/index.js.map +1 -1
- package/dist/game3d/components/animation-graph.d.ts +335 -0
- package/dist/game3d/components/animation-graph.d.ts.map +1 -0
- package/dist/game3d/components/animation-graph.js +66 -0
- package/dist/game3d/components/animation-graph.js.map +1 -0
- package/dist/game3d/components/animator.d.ts +1 -0
- package/dist/game3d/components/animator.d.ts.map +1 -1
- package/dist/game3d/components/animator.js +2 -1
- package/dist/game3d/components/animator.js.map +1 -1
- package/dist/game3d/components/assets.d.ts +28 -0
- package/dist/game3d/components/assets.d.ts.map +1 -1
- package/dist/game3d/components/assets.js +5 -1
- package/dist/game3d/components/assets.js.map +1 -1
- package/dist/game3d/components/behaviors.d.ts +106 -0
- package/dist/game3d/components/behaviors.d.ts.map +1 -1
- package/dist/game3d/components/collider.d.ts +5 -0
- package/dist/game3d/components/collider.d.ts.map +1 -1
- package/dist/game3d/components/collider.js +4 -1
- package/dist/game3d/components/collider.js.map +1 -1
- package/dist/game3d/components/collision-matrix.d.ts +6 -0
- package/dist/game3d/components/collision-matrix.d.ts.map +1 -0
- package/dist/game3d/components/collision-matrix.js +7 -0
- package/dist/game3d/components/collision-matrix.js.map +1 -0
- package/dist/game3d/components/environment.d.ts +91 -0
- package/dist/game3d/components/environment.d.ts.map +1 -1
- package/dist/game3d/components/environment.js +35 -2
- package/dist/game3d/components/environment.js.map +1 -1
- package/dist/game3d/components/light.d.ts +8 -0
- package/dist/game3d/components/light.d.ts.map +1 -1
- package/dist/game3d/components/light.js +8 -3
- package/dist/game3d/components/light.js.map +1 -1
- package/dist/game3d/components/performance.d.ts +30 -0
- package/dist/game3d/components/performance.d.ts.map +1 -0
- package/dist/game3d/components/performance.js +27 -0
- package/dist/game3d/components/performance.js.map +1 -0
- package/dist/game3d/components/shadows.d.ts +25 -0
- package/dist/game3d/components/shadows.d.ts.map +1 -0
- package/dist/game3d/components/shadows.js +21 -0
- package/dist/game3d/components/shadows.js.map +1 -0
- package/dist/game3d/index.d.ts +3016 -7
- package/dist/game3d/index.d.ts.map +1 -1
- package/dist/game3d/index.js +47 -16
- package/dist/game3d/index.js.map +1 -1
- package/dist/graph-links.d.ts +37 -0
- package/dist/graph-links.d.ts.map +1 -0
- package/dist/graph-links.js +73 -0
- package/dist/graph-links.js.map +1 -0
- package/dist/graph.d.ts +19 -0
- package/dist/graph.d.ts.map +1 -1
- package/dist/graph.js.map +1 -1
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -1
- package/dist/missing-runtime-package.d.ts +9 -1
- package/dist/missing-runtime-package.d.ts.map +1 -1
- package/dist/missing-runtime-package.js +31 -0
- package/dist/missing-runtime-package.js.map +1 -1
- package/dist/native-game-templates.d.ts +21 -0
- package/dist/native-game-templates.d.ts.map +1 -0
- package/dist/native-game-templates.js +32 -0
- package/dist/native-game-templates.js.map +1 -0
- package/dist/nodetool-models.js +2 -2
- package/dist/nodetool-models.js.map +1 -1
- package/dist/one-take.d.ts +134 -0
- package/dist/one-take.d.ts.map +1 -0
- package/dist/one-take.js +207 -0
- package/dist/one-take.js.map +1 -0
- package/dist/python-packs.d.ts +25 -4
- package/dist/python-packs.d.ts.map +1 -1
- package/dist/python-packs.js +41 -17
- package/dist/python-packs.js.map +1 -1
- package/dist/run-trace.d.ts +2 -0
- package/dist/run-trace.d.ts.map +1 -1
- package/dist/run-trace.js +29 -3
- package/dist/run-trace.js.map +1 -1
- package/dist/workflow-document-revision.d.ts +1 -1
- package/dist/workflow-document-revision.d.ts.map +1 -1
- package/dist/workflow-document-revision.js +14 -1
- package/dist/workflow-document-revision.js.map +1 -1
- package/dist/workflow-plan.d.ts +15 -1
- package/dist/workflow-plan.d.ts.map +1 -1
- package/dist/workflow-plan.js +49 -3
- package/dist/workflow-plan.js.map +1 -1
- package/dist/ws-commands.d.ts +9 -0
- package/dist/ws-commands.d.ts.map +1 -1
- package/dist/ws-commands.js +23 -2
- package/dist/ws-commands.js.map +1 -1
- package/package.json +7 -1
- package/schema/sdk-v1.execution.schema.json +20 -0
- package/schema/sdk-v1.manifest.json +1 -1
|
@@ -5,7 +5,9 @@
|
|
|
5
5
|
* Package Manager.
|
|
6
6
|
*/
|
|
7
7
|
/** Runtime package ids the desktop app can install (see electron definitions). */
|
|
8
|
-
export type RuntimePackageId = "python" | "nodejs" | "ffmpeg" | "pandoc" | "pdftotext" | "yt-dlp" | "transformers-js" | "tensorflow-js" | "node-llama-cpp" | "whisper-cpp" | "playwright" | "claude-agent-sdk";
|
|
8
|
+
export type RuntimePackageId = "python" | "nodejs" | "ffmpeg" | "pandoc" | "pdftotext" | "yt-dlp" | "rust" | "manimgx" | "transformers-js" | "tensorflow-js" | "node-llama-cpp" | "whisper-cpp" | "playwright" | "claude-agent-sdk" | "pdf-js" | "office-documents" | "tesseract-ocr" | "fabric" | "email-imap";
|
|
9
|
+
/** Display names for the runtime packages, as the Package Manager lists them. */
|
|
10
|
+
export declare const RUNTIME_PACKAGE_NAMES: Readonly<Record<RuntimePackageId, string>>;
|
|
9
11
|
declare const MISSING_RUNTIME_PACKAGE: unique symbol;
|
|
10
12
|
export declare class MissingRuntimePackageError extends Error {
|
|
11
13
|
readonly runtimePackage: RuntimePackageId;
|
|
@@ -14,6 +16,12 @@ export declare class MissingRuntimePackageError extends Error {
|
|
|
14
16
|
cause?: unknown;
|
|
15
17
|
});
|
|
16
18
|
}
|
|
19
|
+
/**
|
|
20
|
+
* The error a feature throws when the npm package it imports is absent. The
|
|
21
|
+
* message names the package and where to install it, so a caller that only
|
|
22
|
+
* shows `message` (an agent, the CLI) still tells the user what to do.
|
|
23
|
+
*/
|
|
24
|
+
export declare function missingRuntimePackageError(specifier: string, runtimePackage: RuntimePackageId, cause?: unknown): MissingRuntimePackageError;
|
|
17
25
|
/**
|
|
18
26
|
* The runtime package a failure is missing, or null. Follows `cause`, because
|
|
19
27
|
* a provider or node can wrap the loader's error in its own.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"missing-runtime-package.d.ts","sourceRoot":"","sources":["../src/missing-runtime-package.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,kFAAkF;AAClF,MAAM,MAAM,gBAAgB,GACxB,QAAQ,GACR,QAAQ,GACR,QAAQ,GACR,QAAQ,GACR,WAAW,GACX,QAAQ,GACR,iBAAiB,GACjB,eAAe,GACf,gBAAgB,GAChB,aAAa,GACb,YAAY,GACZ,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"missing-runtime-package.d.ts","sourceRoot":"","sources":["../src/missing-runtime-package.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,kFAAkF;AAClF,MAAM,MAAM,gBAAgB,GACxB,QAAQ,GACR,QAAQ,GACR,QAAQ,GACR,QAAQ,GACR,WAAW,GACX,QAAQ,GACR,MAAM,GACN,SAAS,GACT,iBAAiB,GACjB,eAAe,GACf,gBAAgB,GAChB,aAAa,GACb,YAAY,GACZ,kBAAkB,GAClB,QAAQ,GACR,kBAAkB,GAClB,eAAe,GACf,QAAQ,GACR,YAAY,CAAC;AAEjB,iFAAiF;AACjF,eAAO,MAAM,qBAAqB,EAAE,QAAQ,CAAC,MAAM,CAAC,gBAAgB,EAAE,MAAM,CAAC,CAoB5E,CAAC;AAEF,QAAA,MAAM,uBAAuB,eAA+C,CAAC;AAE7E,qBAAa,0BAA2B,SAAQ,KAAK;IAKjD,QAAQ,CAAC,cAAc,EAAE,gBAAgB;IAJ3C,QAAQ,CAAC,CAAC,uBAAuB,CAAC,QAAQ;IAE1C,YACE,OAAO,EAAE,MAAM,EACN,cAAc,EAAE,gBAAgB,EACzC,OAAO,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,OAAO,CAAA;KAAE,EAI9B;CACF;AAED;;;;GAIG;AACH,wBAAgB,0BAA0B,CACxC,SAAS,EAAE,MAAM,EACjB,cAAc,EAAE,gBAAgB,EAChC,KAAK,CAAC,EAAE,OAAO,GACd,0BAA0B,CAO5B;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,OAAO,GACb,gBAAgB,GAAG,IAAI,CAczB"}
|
|
@@ -4,6 +4,28 @@
|
|
|
4
4
|
* editor can offer to install it in place instead of sending the user to the
|
|
5
5
|
* Package Manager.
|
|
6
6
|
*/
|
|
7
|
+
/** Display names for the runtime packages, as the Package Manager lists them. */
|
|
8
|
+
export const RUNTIME_PACKAGE_NAMES = {
|
|
9
|
+
python: "Python",
|
|
10
|
+
nodejs: "Node.js",
|
|
11
|
+
ffmpeg: "FFmpeg & Codecs",
|
|
12
|
+
pandoc: "Pandoc",
|
|
13
|
+
pdftotext: "PDF Tools (Poppler)",
|
|
14
|
+
"yt-dlp": "yt-dlp",
|
|
15
|
+
rust: "Rust",
|
|
16
|
+
manimgx: "ManimGX",
|
|
17
|
+
"transformers-js": "Transformers.js",
|
|
18
|
+
"tensorflow-js": "TensorFlow.js Models",
|
|
19
|
+
"node-llama-cpp": "llama.cpp (in-process)",
|
|
20
|
+
"whisper-cpp": "whisper.cpp",
|
|
21
|
+
playwright: "Playwright",
|
|
22
|
+
"claude-agent-sdk": "Claude Agent SDK",
|
|
23
|
+
"pdf-js": "PDF Libraries",
|
|
24
|
+
"office-documents": "Office Documents",
|
|
25
|
+
"tesseract-ocr": "Tesseract OCR",
|
|
26
|
+
fabric: "Fabric.js",
|
|
27
|
+
"email-imap": "Email (IMAP)"
|
|
28
|
+
};
|
|
7
29
|
const MISSING_RUNTIME_PACKAGE = Symbol.for("nodetool.missingRuntimePackage");
|
|
8
30
|
export class MissingRuntimePackageError extends Error {
|
|
9
31
|
runtimePackage;
|
|
@@ -14,6 +36,15 @@ export class MissingRuntimePackageError extends Error {
|
|
|
14
36
|
this.name = "MissingRuntimePackageError";
|
|
15
37
|
}
|
|
16
38
|
}
|
|
39
|
+
/**
|
|
40
|
+
* The error a feature throws when the npm package it imports is absent. The
|
|
41
|
+
* message names the package and where to install it, so a caller that only
|
|
42
|
+
* shows `message` (an agent, the CLI) still tells the user what to do.
|
|
43
|
+
*/
|
|
44
|
+
export function missingRuntimePackageError(specifier, runtimePackage, cause) {
|
|
45
|
+
const name = RUNTIME_PACKAGE_NAMES[runtimePackage];
|
|
46
|
+
return new MissingRuntimePackageError(`The optional "${specifier}" package is not installed. Install ${name} from the Package Manager, or run "npm install ${specifier}" where NodeTool runs.`, runtimePackage, { cause });
|
|
47
|
+
}
|
|
17
48
|
/**
|
|
18
49
|
* The runtime package a failure is missing, or null. Follows `cause`, because
|
|
19
50
|
* a provider or node can wrap the loader's error in its own.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"missing-runtime-package.js","sourceRoot":"","sources":["../src/missing-runtime-package.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;
|
|
1
|
+
{"version":3,"file":"missing-runtime-package.js","sourceRoot":"","sources":["../src/missing-runtime-package.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAwBH,iFAAiF;AACjF,MAAM,CAAC,MAAM,qBAAqB,GAA+C;IAC/E,MAAM,EAAE,QAAQ;IAChB,MAAM,EAAE,SAAS;IACjB,MAAM,EAAE,iBAAiB;IACzB,MAAM,EAAE,QAAQ;IAChB,SAAS,EAAE,qBAAqB;IAChC,QAAQ,EAAE,QAAQ;IAClB,IAAI,EAAE,MAAM;IACZ,OAAO,EAAE,SAAS;IAClB,iBAAiB,EAAE,iBAAiB;IACpC,eAAe,EAAE,sBAAsB;IACvC,gBAAgB,EAAE,wBAAwB;IAC1C,aAAa,EAAE,aAAa;IAC5B,UAAU,EAAE,YAAY;IACxB,kBAAkB,EAAE,kBAAkB;IACtC,QAAQ,EAAE,eAAe;IACzB,kBAAkB,EAAE,kBAAkB;IACtC,eAAe,EAAE,eAAe;IAChC,MAAM,EAAE,WAAW;IACnB,YAAY,EAAE,cAAc;CAC7B,CAAC;AAEF,MAAM,uBAAuB,GAAG,MAAM,CAAC,GAAG,CAAC,gCAAgC,CAAC,CAAC;AAE7E,MAAM,OAAO,0BAA2B,SAAQ,KAAK;IAKxC,cAAc;IAJhB,CAAC,uBAAuB,CAAC,GAAG,IAAI,CAAC;IAE1C,YACE,OAAe,EACN,cAAgC,EACzC,OAA6B;QAE7B,KAAK,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;8BAHf,cAAc;QAIvB,IAAI,CAAC,IAAI,GAAG,4BAA4B,CAAC;IAC3C,CAAC;CACF;AAED;;;;GAIG;AACH,MAAM,UAAU,0BAA0B,CACxC,SAAiB,EACjB,cAAgC,EAChC,KAAe;IAEf,MAAM,IAAI,GAAG,qBAAqB,CAAC,cAAc,CAAC,CAAC;IACnD,OAAO,IAAI,0BAA0B,CACnC,iBAAiB,SAAS,uCAAuC,IAAI,kDAAkD,SAAS,wBAAwB,EACxJ,cAAc,EACd,EAAE,KAAK,EAAE,CACV,CAAC;AACJ,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,uBAAuB,CACrC,KAAc;IAEd,IAAI,OAAO,GAAY,KAAK,CAAC;IAC7B,KAAK,IAAI,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,CAAC,IAAI,OAAO,YAAY,KAAK,EAAE,KAAK,EAAE,EAAE,CAAC;QACnE,sEAAsE;QACtE,0BAA0B;QAC1B,IACE,uBAAuB,IAAI,OAAO;YAClC,gBAAgB,IAAI,OAAO,EAC3B,CAAC;YACD,OAAQ,OAAsC,CAAC,cAAc,CAAC;QAChE,CAAC;QACD,OAAO,GAAG,OAAO,CAAC,KAAK,CAAC;IAC1B,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The built-in engine's game templates: the asset slots each one plays with.
|
|
3
|
+
*
|
|
4
|
+
* Pure data, so the web Game flow designs against the same manifest the
|
|
5
|
+
* headless `design_game` and `build_game` capabilities read through
|
|
6
|
+
* `@nodetool-ai/game-nodes`.
|
|
7
|
+
*/
|
|
8
|
+
import { type GameAssetManifest } from "./game-assets.js";
|
|
9
|
+
export interface NativeGameTemplate {
|
|
10
|
+
readonly id: string;
|
|
11
|
+
readonly name: string;
|
|
12
|
+
/** One line on how a game built from it plays. */
|
|
13
|
+
readonly description: string;
|
|
14
|
+
readonly manifest: GameAssetManifest;
|
|
15
|
+
}
|
|
16
|
+
export declare const NATIVE_GAME_TEMPLATES: readonly NativeGameTemplate[];
|
|
17
|
+
/** The template with this id, or null. */
|
|
18
|
+
export declare function findNativeGameTemplate(id: string): NativeGameTemplate | null;
|
|
19
|
+
/** The template a new game starts on. */
|
|
20
|
+
export declare const DEFAULT_NATIVE_GAME_TEMPLATE: string;
|
|
21
|
+
//# sourceMappingURL=native-game-templates.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"native-game-templates.d.ts","sourceRoot":"","sources":["../src/native-game-templates.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAqB,KAAK,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAE7E,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,kDAAkD;IAClD,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,QAAQ,EAAE,iBAAiB,CAAC;CACtC;AAoBD,eAAO,MAAM,qBAAqB,EAAE,SAAS,kBAAkB,EAAe,CAAC;AAE/E,0CAA0C;AAC1C,wBAAgB,sBAAsB,CAAC,EAAE,EAAE,MAAM,GAAG,kBAAkB,GAAG,IAAI,CAE5E;AAED,yCAAyC;AACzC,eAAO,MAAM,4BAA4B,QAAc,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The built-in engine's game templates: the asset slots each one plays with.
|
|
3
|
+
*
|
|
4
|
+
* Pure data, so the web Game flow designs against the same manifest the
|
|
5
|
+
* headless `design_game` and `build_game` capabilities read through
|
|
6
|
+
* `@nodetool-ai/game-nodes`.
|
|
7
|
+
*/
|
|
8
|
+
import { gameAssetManifest } from "./game-assets.js";
|
|
9
|
+
const TOP_DOWN = {
|
|
10
|
+
id: "topdown",
|
|
11
|
+
name: "Top-down room",
|
|
12
|
+
description: "Walk one walled room seen from above and pick up the collectible to win.",
|
|
13
|
+
manifest: gameAssetManifest.parse({
|
|
14
|
+
version: 1,
|
|
15
|
+
template: "topdown",
|
|
16
|
+
engineVersion: "1",
|
|
17
|
+
slots: [
|
|
18
|
+
{ id: "player", kind: "spritesheet", cell: [32, 32], animations: { idle: 1, walk: 4 }, prompt: "top-down player character" },
|
|
19
|
+
{ id: "wall", kind: "tileset", cell: [32, 32], count: 1, prompt: "top-down stone wall tile" },
|
|
20
|
+
{ id: "gem", kind: "spritesheet", cell: [32, 32], animations: { idle: 1 }, prompt: "bright collectible gem" },
|
|
21
|
+
{ id: "sfx.collect", kind: "sfx", seconds: 0.4, prompt: "short collection chime" }
|
|
22
|
+
]
|
|
23
|
+
})
|
|
24
|
+
};
|
|
25
|
+
export const NATIVE_GAME_TEMPLATES = [TOP_DOWN];
|
|
26
|
+
/** The template with this id, or null. */
|
|
27
|
+
export function findNativeGameTemplate(id) {
|
|
28
|
+
return NATIVE_GAME_TEMPLATES.find((template) => template.id === id) ?? null;
|
|
29
|
+
}
|
|
30
|
+
/** The template a new game starts on. */
|
|
31
|
+
export const DEFAULT_NATIVE_GAME_TEMPLATE = TOP_DOWN.id;
|
|
32
|
+
//# sourceMappingURL=native-game-templates.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"native-game-templates.js","sourceRoot":"","sources":["../src/native-game-templates.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,iBAAiB,EAA0B,MAAM,kBAAkB,CAAC;AAU7E,MAAM,QAAQ,GAAuB;IACnC,EAAE,EAAE,SAAS;IACb,IAAI,EAAE,eAAe;IACrB,WAAW,EACT,0EAA0E;IAC5E,QAAQ,EAAE,iBAAiB,CAAC,KAAK,CAAC;QAChC,OAAO,EAAE,CAAC;QACV,QAAQ,EAAE,SAAS;QACnB,aAAa,EAAE,GAAG;QAClB,KAAK,EAAE;YACL,EAAE,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,UAAU,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,2BAA2B,EAAE;YAC5H,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,0BAA0B,EAAE;YAC7F,EAAE,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,UAAU,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,wBAAwB,EAAE;YAC7G,EAAE,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,wBAAwB,EAAE;SACnF;KACF,CAAC;CACH,CAAC;AAEF,MAAM,CAAC,MAAM,qBAAqB,GAAkC,CAAC,QAAQ,CAAC,CAAC;AAE/E,0CAA0C;AAC1C,MAAM,UAAU,sBAAsB,CAAC,EAAU;IAC/C,OAAO,qBAAqB,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,EAAE,KAAK,EAAE,CAAC,IAAI,IAAI,CAAC;AAC9E,CAAC;AAED,yCAAyC;AACzC,MAAM,CAAC,MAAM,4BAA4B,GAAG,QAAQ,CAAC,EAAE,CAAC"}
|
package/dist/nodetool-models.js
CHANGED
|
@@ -34,7 +34,7 @@ export const NODETOOL_MODELS = [
|
|
|
34
34
|
name: "Balanced",
|
|
35
35
|
kind: "image",
|
|
36
36
|
blurb: "Sharper stills, and it can work from your reference images.",
|
|
37
|
-
tasks: ["text_to_image", "image_to_image"],
|
|
37
|
+
tasks: ["text_to_image", "image_to_image", "image_edit"],
|
|
38
38
|
delegate: { provider: "fal_ai", model: "fal-ai/nano-banana" },
|
|
39
39
|
editDelegate: { provider: "fal_ai", model: "fal-ai/nano-banana/edit" }
|
|
40
40
|
},
|
|
@@ -43,7 +43,7 @@ export const NODETOOL_MODELS = [
|
|
|
43
43
|
name: "Detailed",
|
|
44
44
|
kind: "image",
|
|
45
45
|
blurb: "Most detail per still, and the slowest of the three.",
|
|
46
|
-
tasks: ["text_to_image", "image_to_image"],
|
|
46
|
+
tasks: ["text_to_image", "image_to_image", "image_edit"],
|
|
47
47
|
delegate: {
|
|
48
48
|
provider: "fal_ai",
|
|
49
49
|
model: "fal-ai/bytedance/seedream/v4/text-to-image"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nodetool-models.js","sourceRoot":"","sources":["../src/nodetool-models.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AA+CH,MAAM,CAAC,MAAM,oBAAoB,GAAG,UAAU,CAAC;AAE/C,MAAM,CAAC,MAAM,eAAe,GAAgC;IAC1D;QACE,EAAE,EAAE,mBAAmB;QACvB,IAAI,EAAE,mBAAmB;QACzB,IAAI,EAAE,UAAU;QAChB,KAAK,EAAE,0CAA0C;QACjD,QAAQ,EAAE,EAAE,QAAQ,EAAE,WAAW,EAAE,KAAK,EAAE,iBAAiB,EAAE;KAC9D;IACD;QACE,EAAE,EAAE,uBAAuB;QAC3B,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,OAAO;QACb,KAAK,EAAE,uDAAuD;QAC9D,KAAK,EAAE,CAAC,eAAe,CAAC;QACxB,QAAQ,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,uBAAuB,EAAE;KACjE;IACD;QACE,EAAE,EAAE,sBAAsB;QAC1B,IAAI,EAAE,UAAU;QAChB,IAAI,EAAE,OAAO;QACb,KAAK,EAAE,6DAA6D;QACpE,KAAK,EAAE,CAAC,eAAe,EAAE,gBAAgB,CAAC;
|
|
1
|
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C,YAAY,CAAC;IAC1E,OAAO,GAAG,CAAC,QAAQ,CAAC;AACtB,CAAC,CAAC"}
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* One-take direction: a whole storyboard rendered as one continuous clip.
|
|
3
|
+
*
|
|
4
|
+
* The board stores one prompt the creator writes (brand, rules, light, …).
|
|
5
|
+
* Everything the board already knows is compiled, never stored, so a change
|
|
6
|
+
* to a shot shows up in the editor preview, the render and the agent tools at
|
|
7
|
+
* once:
|
|
8
|
+
*
|
|
9
|
+
* | Block | Compiled from |
|
|
10
|
+
* | ------- | ---------------------------------------------------------------- |
|
|
11
|
+
* | `REFS` | every shot still in shot order, numbered `[Image N]` |
|
|
12
|
+
* | `STEPS` | each shot: time range, description, motion, `End:` end state |
|
|
13
|
+
* | `AUDIO` | each shot's `sound` with its time range |
|
|
14
|
+
*
|
|
15
|
+
* The render sends the creator's prompt, then the compiled block. Duration and
|
|
16
|
+
* aspect ratio travel as request parameters, so the creator's text never has
|
|
17
|
+
* to repeat them.
|
|
18
|
+
*
|
|
19
|
+
* `[Image N]` is the provider-neutral marker the render path already uses: the
|
|
20
|
+
* Dreamina provider turns each one into an inline image mention. Because the
|
|
21
|
+
* numbering follows the board, the creator can refer to `[Image 3]` in their
|
|
22
|
+
* own text.
|
|
23
|
+
*/
|
|
24
|
+
import type { Shot, ShotModelRef } from "./creative.js";
|
|
25
|
+
/**
|
|
26
|
+
* A board's one-take direction, stored on the storyboard document. Every
|
|
27
|
+
* render setting is optional: an absent one falls back as documented.
|
|
28
|
+
*/
|
|
29
|
+
export interface OneTakeDirection {
|
|
30
|
+
/** The creator's own prompt. Sent before the compiled block. */
|
|
31
|
+
prompt: string;
|
|
32
|
+
/**
|
|
33
|
+
* The clip's length in seconds. Absent: the sum of the shot durations. When
|
|
34
|
+
* it differs from that sum, every shot's window scales to fit it.
|
|
35
|
+
*/
|
|
36
|
+
duration_seconds?: number | null;
|
|
37
|
+
/** Absent: the board's aspect ratio. */
|
|
38
|
+
aspect_ratio?: string | null;
|
|
39
|
+
/** Absent: 1080p when the model offers it, else the model's first. */
|
|
40
|
+
resolution?: string | null;
|
|
41
|
+
/** The video model. Absent: the board's video model. */
|
|
42
|
+
model?: ShotModelRef | null;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* One image the clip conditions on, in `[Image N]` order. Only shot stills
|
|
46
|
+
* go in: the stills already carry the cast, so entity images would only
|
|
47
|
+
* compete with them.
|
|
48
|
+
*/
|
|
49
|
+
export interface OneTakeReference {
|
|
50
|
+
shot_id: string;
|
|
51
|
+
asset_id: string;
|
|
52
|
+
label: string;
|
|
53
|
+
}
|
|
54
|
+
/** What {@link compileOneTake} needs from a board. */
|
|
55
|
+
export interface OneTakeBoard {
|
|
56
|
+
shots: readonly Shot[];
|
|
57
|
+
oneTake?: OneTakeDirection | null;
|
|
58
|
+
}
|
|
59
|
+
/** A shot's place on the one-take clock. */
|
|
60
|
+
export interface OneTakeStep {
|
|
61
|
+
shot_id: string;
|
|
62
|
+
start_seconds: number;
|
|
63
|
+
end_seconds: number;
|
|
64
|
+
}
|
|
65
|
+
export interface CompiledOneTake {
|
|
66
|
+
/** The block compiled from the board: REFS, STEPS, AUDIO. */
|
|
67
|
+
compiled: string;
|
|
68
|
+
/** What the render sends: the creator's prompt, then the compiled block. */
|
|
69
|
+
prompt: string;
|
|
70
|
+
/** The images in `[Image N]` order; index 0 is `[Image 1]`. */
|
|
71
|
+
references: OneTakeReference[];
|
|
72
|
+
/** Each shot's window on the clip, in order, scaled to its duration. */
|
|
73
|
+
steps: OneTakeStep[];
|
|
74
|
+
/** The clip's length: the direction's duration, else the shot total. */
|
|
75
|
+
duration_seconds: number;
|
|
76
|
+
/** The sum of the shot durations, before any scaling. */
|
|
77
|
+
shot_total_seconds: number;
|
|
78
|
+
}
|
|
79
|
+
/** A shot without a duration counts as this long. */
|
|
80
|
+
export declare const ONE_TAKE_DEFAULT_SHOT_SECONDS = 5;
|
|
81
|
+
/** `0-5s`, as the compiled blocks print a window. */
|
|
82
|
+
export declare const oneTakeWindow: (start: number, end: number) => string;
|
|
83
|
+
/**
|
|
84
|
+
* The shots in board order, each with its window on the clip. With
|
|
85
|
+
* `durationSeconds`, the windows scale so the last one ends there.
|
|
86
|
+
*/
|
|
87
|
+
export declare function oneTakeSteps(shots: readonly Shot[], durationSeconds?: number | null): OneTakeStep[];
|
|
88
|
+
/** The images the clip conditions on: every shot still, in shot order. */
|
|
89
|
+
export declare function oneTakeReferences(board: OneTakeBoard): OneTakeReference[];
|
|
90
|
+
/**
|
|
91
|
+
* Compile the board's part of the one-take prompt and join it to the
|
|
92
|
+
* creator's prompt. Empty blocks drop.
|
|
93
|
+
*/
|
|
94
|
+
export declare function compileOneTake(board: OneTakeBoard): CompiledOneTake;
|
|
95
|
+
/** The fewest shots one scene clip covers. One shot renders its own clip. */
|
|
96
|
+
export declare const SCENE_CLIP_MIN_SHOTS = 2;
|
|
97
|
+
/** The most shots one scene clip covers. */
|
|
98
|
+
export declare const SCENE_CLIP_MAX_SHOTS = 5;
|
|
99
|
+
/**
|
|
100
|
+
* A run of consecutive shots rendered as one clip: a one take over part of
|
|
101
|
+
* the board. It is stored on the board, so the run, its prompt and its
|
|
102
|
+
* settings survive a reload and a re-render. An absent setting falls back to
|
|
103
|
+
* the board's one-take direction, then as {@link OneTakeDirection} documents.
|
|
104
|
+
*
|
|
105
|
+
* The clip lands on the run's first shot and every other shot in the run is
|
|
106
|
+
* covered by its window of it (`Shot.covered_by`), exactly as a one take.
|
|
107
|
+
*/
|
|
108
|
+
export interface SceneClipDirection extends OneTakeDirection {
|
|
109
|
+
id: string;
|
|
110
|
+
/** The run's shot ids in board order. */
|
|
111
|
+
shot_ids: string[];
|
|
112
|
+
}
|
|
113
|
+
/** A scene clip's shots, or why they no longer form a run. */
|
|
114
|
+
export type SceneClipRun = {
|
|
115
|
+
shots: Shot[];
|
|
116
|
+
issue: null;
|
|
117
|
+
} | {
|
|
118
|
+
shots: Shot[];
|
|
119
|
+
issue: string;
|
|
120
|
+
};
|
|
121
|
+
/**
|
|
122
|
+
* Resolve a scene clip's shots on the board. The run must name between
|
|
123
|
+
* {@link SCENE_CLIP_MIN_SHOTS} and {@link SCENE_CLIP_MAX_SHOTS} existing
|
|
124
|
+
* shots that sit next to each other in board order and share one scene.
|
|
125
|
+
* A deleted or moved shot breaks the run rather than silently changing what
|
|
126
|
+
* the clip covers.
|
|
127
|
+
*/
|
|
128
|
+
export declare function sceneClipRun(shots: readonly Shot[], shotIds: readonly string[]): SceneClipRun;
|
|
129
|
+
/**
|
|
130
|
+
* Compile a scene clip: {@link compileOneTake} over the run's shots alone, so
|
|
131
|
+
* `[Image N]` numbers and the step windows start at the run's first shot.
|
|
132
|
+
*/
|
|
133
|
+
export declare function compileSceneClip(shots: readonly Shot[], clip: SceneClipDirection): CompiledOneTake;
|
|
134
|
+
//# sourceMappingURL=one-take.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"one-take.d.ts","sourceRoot":"","sources":["../src/one-take.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,KAAK,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAExD;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC/B,gEAAgE;IAChE,MAAM,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,wCAAwC;IACxC,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,sEAAsE;IACtE,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,wDAAwD;IACxD,KAAK,CAAC,EAAE,YAAY,GAAG,IAAI,CAAC;CAC7B;AAED;;;;GAIG;AACH,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;I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Q,gBAAgB;IAC1D,EAAE,EAAE,MAAM,CAAC;IACX,yCAAyC;IACzC,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AAED,8DAA8D;AAC9D,MAAM,MAAM,YAAY,GACpB;IAAE,KAAK,EAAE,IAAI,EAAE,CAAC;IAAC,KAAK,EAAE,IAAI,CAAA;CAAE,GAC9B;IAAE,KAAK,EAAE,IAAI,EAAE,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAErC;;;;;;GAMG;AACH,wBAAgB,YAAY,CAC1B,KAAK,EAAE,SAAS,IAAI,EAAE,EACtB,OAAO,EAAE,SAAS,MAAM,EAAE,GACzB,YAAY,CA+Bd;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,SAAS,IAAI,EAAE,EACtB,IAAI,EAAE,kBAAkB,GACvB,eAAe,CAKjB"}
|
package/dist/one-take.js
ADDED
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* One-take direction: a whole storyboard rendered as one continuous clip.
|
|
3
|
+
*
|
|
4
|
+
* The board stores one prompt the creator writes (brand, rules, light, …).
|
|
5
|
+
* Everything the board already knows is compiled, never stored, so a change
|
|
6
|
+
* to a shot shows up in the editor preview, the render and the agent tools at
|
|
7
|
+
* once:
|
|
8
|
+
*
|
|
9
|
+
* | Block | Compiled from |
|
|
10
|
+
* | ------- | ---------------------------------------------------------------- |
|
|
11
|
+
* | `REFS` | every shot still in shot order, numbered `[Image N]` |
|
|
12
|
+
* | `STEPS` | each shot: time range, description, motion, `End:` end state |
|
|
13
|
+
* | `AUDIO` | each shot's `sound` with its time range |
|
|
14
|
+
*
|
|
15
|
+
* The render sends the creator's prompt, then the compiled block. Duration and
|
|
16
|
+
* aspect ratio travel as request parameters, so the creator's text never has
|
|
17
|
+
* to repeat them.
|
|
18
|
+
*
|
|
19
|
+
* `[Image N]` is the provider-neutral marker the render path already uses: the
|
|
20
|
+
* Dreamina provider turns each one into an inline image mention. Because the
|
|
21
|
+
* numbering follows the board, the creator can refer to `[Image 3]` in their
|
|
22
|
+
* own text.
|
|
23
|
+
*/
|
|
24
|
+
/** A shot without a duration counts as this long. */
|
|
25
|
+
export const ONE_TAKE_DEFAULT_SHOT_SECONDS = 5;
|
|
26
|
+
/** Rounds a window edge to a tenth of a second. */
|
|
27
|
+
const tenth = (value) => Math.round(value * 10) / 10;
|
|
28
|
+
/** `5` → `"5"`, `2.5` → `"2.5"`. */
|
|
29
|
+
const seconds = (value) => Number.isInteger(value) ? String(value) : String(Math.round(value * 10) / 10);
|
|
30
|
+
/** `0-5s`, as the compiled blocks print a window. */
|
|
31
|
+
export const oneTakeWindow = (start, end) => `${seconds(start)}-${seconds(end)}s`;
|
|
32
|
+
const byIndex = (shots) => [...shots].sort((a, b) => a.index - b.index);
|
|
33
|
+
/**
|
|
34
|
+
* The shots in board order, each with its window on the clip. With
|
|
35
|
+
* `durationSeconds`, the windows scale so the last one ends there.
|
|
36
|
+
*/
|
|
37
|
+
export function oneTakeSteps(shots, durationSeconds) {
|
|
38
|
+
const steps = shotSteps(shots);
|
|
39
|
+
const total = steps.at(-1)?.end_seconds ?? 0;
|
|
40
|
+
if (!durationSeconds || durationSeconds <= 0 || total <= 0 || durationSeconds === total) {
|
|
41
|
+
return steps;
|
|
42
|
+
}
|
|
43
|
+
const scale = durationSeconds / total;
|
|
44
|
+
return steps.map((step) => ({
|
|
45
|
+
shot_id: step.shot_id,
|
|
46
|
+
start_seconds: tenth(step.start_seconds * scale),
|
|
47
|
+
end_seconds: tenth(step.end_seconds * scale)
|
|
48
|
+
}));
|
|
49
|
+
}
|
|
50
|
+
/** Each shot's window at its own duration. */
|
|
51
|
+
function shotSteps(shots) {
|
|
52
|
+
let clock = 0;
|
|
53
|
+
return byIndex(shots).map((shot) => {
|
|
54
|
+
const length = shot.duration_seconds && shot.duration_seconds > 0
|
|
55
|
+
? shot.duration_seconds
|
|
56
|
+
: ONE_TAKE_DEFAULT_SHOT_SECONDS;
|
|
57
|
+
const step = {
|
|
58
|
+
shot_id: shot.id,
|
|
59
|
+
start_seconds: clock,
|
|
60
|
+
end_seconds: clock + length
|
|
61
|
+
};
|
|
62
|
+
clock += length;
|
|
63
|
+
return step;
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
const sentence = (text) => {
|
|
67
|
+
const trimmed = (text ?? "").trim();
|
|
68
|
+
return trimmed.length === 0 || /[.!?…:]$/.test(trimmed)
|
|
69
|
+
? trimmed
|
|
70
|
+
: `${trimmed}.`;
|
|
71
|
+
};
|
|
72
|
+
/** A shot's name in a reference label: its title, else "shot N". */
|
|
73
|
+
const shotName = (shot) => shot.slug?.trim() || `shot ${shot.index + 1}`;
|
|
74
|
+
/** The images the clip conditions on: every shot still, in shot order. */
|
|
75
|
+
export function oneTakeReferences(board) {
|
|
76
|
+
const steps = new Map(oneTakeSteps(board.shots, board.oneTake?.duration_seconds).map((step) => [
|
|
77
|
+
step.shot_id,
|
|
78
|
+
step
|
|
79
|
+
]));
|
|
80
|
+
return byIndex(board.shots).flatMap((shot) => {
|
|
81
|
+
const assetId = shot.keyframe?.asset_id;
|
|
82
|
+
const step = steps.get(shot.id);
|
|
83
|
+
if (!assetId || !step) {
|
|
84
|
+
return [];
|
|
85
|
+
}
|
|
86
|
+
return [
|
|
87
|
+
{
|
|
88
|
+
shot_id: shot.id,
|
|
89
|
+
asset_id: assetId,
|
|
90
|
+
label: `the still of ${shotName(shot)} at ${oneTakeWindow(step.start_seconds, step.end_seconds)}`
|
|
91
|
+
}
|
|
92
|
+
];
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
function compileRefs(references) {
|
|
96
|
+
return references
|
|
97
|
+
.map((reference, index) => `[Image ${index + 1}] is ${reference.label}.`)
|
|
98
|
+
.join(" ");
|
|
99
|
+
}
|
|
100
|
+
function compileSteps(shots, steps) {
|
|
101
|
+
const byId = new Map(shots.map((shot) => [shot.id, shot]));
|
|
102
|
+
return steps
|
|
103
|
+
.map((step, index) => {
|
|
104
|
+
const shot = byId.get(step.shot_id);
|
|
105
|
+
const body = [sentence(shot?.action), sentence(shot?.motion)]
|
|
106
|
+
.filter((part) => part.length > 0)
|
|
107
|
+
.join(" ");
|
|
108
|
+
const end = shot?.end_state?.trim()
|
|
109
|
+
? ` End: ${sentence(shot.end_state)}`
|
|
110
|
+
: "";
|
|
111
|
+
const number = String(index + 1).padStart(2, "0");
|
|
112
|
+
return `STEP_${number}: ${oneTakeWindow(step.start_seconds, step.end_seconds)}. ${body}${end}`.trimEnd();
|
|
113
|
+
})
|
|
114
|
+
.join("\n");
|
|
115
|
+
}
|
|
116
|
+
function compileAudio(shots, steps) {
|
|
117
|
+
const byId = new Map(shots.map((shot) => [shot.id, shot]));
|
|
118
|
+
return steps
|
|
119
|
+
.map((step) => {
|
|
120
|
+
const sound = byId.get(step.shot_id)?.sound?.trim();
|
|
121
|
+
return sound
|
|
122
|
+
? `<${sound}> at ${oneTakeWindow(step.start_seconds, step.end_seconds)}`
|
|
123
|
+
: null;
|
|
124
|
+
})
|
|
125
|
+
.filter((cue) => cue !== null)
|
|
126
|
+
.join(" · ");
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* Compile the board's part of the one-take prompt and join it to the
|
|
130
|
+
* creator's prompt. Empty blocks drop.
|
|
131
|
+
*/
|
|
132
|
+
export function compileOneTake(board) {
|
|
133
|
+
const steps = oneTakeSteps(board.shots, board.oneTake?.duration_seconds);
|
|
134
|
+
const shotTotal = shotSteps(board.shots).at(-1)?.end_seconds ?? 0;
|
|
135
|
+
const references = oneTakeReferences(board);
|
|
136
|
+
const refs = compileRefs(references);
|
|
137
|
+
const audio = compileAudio(board.shots, steps);
|
|
138
|
+
const compiled = [
|
|
139
|
+
refs ? `REFS: ${refs}` : "",
|
|
140
|
+
compileSteps(board.shots, steps),
|
|
141
|
+
audio ? `AUDIO: ${audio}` : ""
|
|
142
|
+
]
|
|
143
|
+
.filter((block) => block.length > 0)
|
|
144
|
+
.join("\n\n");
|
|
145
|
+
const own = board.oneTake?.prompt.trim() ?? "";
|
|
146
|
+
return {
|
|
147
|
+
compiled,
|
|
148
|
+
prompt: [own, compiled].filter((part) => part.length > 0).join("\n\n"),
|
|
149
|
+
references,
|
|
150
|
+
steps,
|
|
151
|
+
duration_seconds: steps.at(-1)?.end_seconds ?? 0,
|
|
152
|
+
shot_total_seconds: shotTotal
|
|
153
|
+
};
|
|
154
|
+
}
|
|
155
|
+
// ── Scene clips ─────────────────────────────────────────────────────────────
|
|
156
|
+
/** The fewest shots one scene clip covers. One shot renders its own clip. */
|
|
157
|
+
export const SCENE_CLIP_MIN_SHOTS = 2;
|
|
158
|
+
/** The most shots one scene clip covers. */
|
|
159
|
+
export const SCENE_CLIP_MAX_SHOTS = 5;
|
|
160
|
+
/**
|
|
161
|
+
* Resolve a scene clip's shots on the board. The run must name between
|
|
162
|
+
* {@link SCENE_CLIP_MIN_SHOTS} and {@link SCENE_CLIP_MAX_SHOTS} existing
|
|
163
|
+
* shots that sit next to each other in board order and share one scene.
|
|
164
|
+
* A deleted or moved shot breaks the run rather than silently changing what
|
|
165
|
+
* the clip covers.
|
|
166
|
+
*/
|
|
167
|
+
export function sceneClipRun(shots, shotIds) {
|
|
168
|
+
const ordered = byIndex(shots);
|
|
169
|
+
const positions = shotIds.map((id) => ordered.findIndex((shot) => shot.id === id));
|
|
170
|
+
const found = positions
|
|
171
|
+
.filter((position) => position >= 0)
|
|
172
|
+
.sort((a, b) => a - b);
|
|
173
|
+
const run = found.map((position) => ordered[position]);
|
|
174
|
+
if (found.length < shotIds.length) {
|
|
175
|
+
return { shots: run, issue: "A shot in this scene clip was deleted." };
|
|
176
|
+
}
|
|
177
|
+
if (run.length < SCENE_CLIP_MIN_SHOTS || run.length > SCENE_CLIP_MAX_SHOTS) {
|
|
178
|
+
return {
|
|
179
|
+
shots: run,
|
|
180
|
+
issue: `A scene clip covers ${SCENE_CLIP_MIN_SHOTS} to ${SCENE_CLIP_MAX_SHOTS} shots.`
|
|
181
|
+
};
|
|
182
|
+
}
|
|
183
|
+
if (found.some((position, i) => i > 0 && position !== found[i - 1] + 1)) {
|
|
184
|
+
return {
|
|
185
|
+
shots: run,
|
|
186
|
+
issue: "The shots in this scene clip are no longer next to each other."
|
|
187
|
+
};
|
|
188
|
+
}
|
|
189
|
+
if (run.some((shot) => (shot.scene_id ?? null) !== (run[0].scene_id ?? null))) {
|
|
190
|
+
return {
|
|
191
|
+
shots: run,
|
|
192
|
+
issue: "The shots in this scene clip are no longer in one scene."
|
|
193
|
+
};
|
|
194
|
+
}
|
|
195
|
+
return { shots: run, issue: null };
|
|
196
|
+
}
|
|
197
|
+
/**
|
|
198
|
+
* Compile a scene clip: {@link compileOneTake} over the run's shots alone, so
|
|
199
|
+
* `[Image N]` numbers and the step windows start at the run's first shot.
|
|
200
|
+
*/
|
|
201
|
+
export function compileSceneClip(shots, clip) {
|
|
202
|
+
return compileOneTake({
|
|
203
|
+
shots: sceneClipRun(shots, clip.shot_ids).shots,
|
|
204
|
+
oneTake: clip
|
|
205
|
+
});
|
|
206
|
+
}
|
|
207
|
+
//# sourceMappingURL=one-take.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"one-take.js","sourceRoot":"","sources":["../src/one-take.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AA+DH,qDAAqD;AACrD,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAAC,CAAC;AAE/C,mDAAmD;AACnD,MAAM,KAAK,GAAG,CAAC,KAAa,EAAU,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,EAAE,CAAC,GAAG,EAAE,CAAC;AAErE,oCAAoC;AACpC,MAAM,OAAO,GAAG,CAAC,KAAa,EAAU,EAAE,CACxC,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI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AQ,KAAK,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC;QACxE,OAAO;YACL,KAAK,EAAE,GAAG;YACV,KAAK,EAAE,gEAAgE;SACxE,CAAC;IACJ,CAAC;IACD,IAAI,GAAG,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,IAAI,IAAI,CAAC,CAAC,EAAE,CAAC;QAC9E,OAAO;YACL,KAAK,EAAE,GAAG;YACV,KAAK,EAAE,0DAA0D;SAClE,CAAC;IACJ,CAAC;IACD,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AACrC,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,gBAAgB,CAC9B,KAAsB,EACtB,IAAwB;IAExB,OAAO,cAAc,CAAC;QACpB,KAAK,EAAE,YAAY,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,KAAK;QAC/C,OAAO,EAAE,IAAI;KACd,CAAC,CAAC;AACL,CAAC"}
|
package/dist/python-packs.d.ts
CHANGED
|
@@ -2,8 +2,15 @@
|
|
|
2
2
|
* Catalog of the Python node packs the package manager offers.
|
|
3
3
|
*
|
|
4
4
|
* Each pack installs from PyPI under the name of its GitHub repo. The catalog ships with the
|
|
5
|
-
* app, so adding or removing a pack is a change to this file.
|
|
5
|
+
* app, so adding or removing a pack is a change to this file. List only packs that are
|
|
6
|
+
* published on PyPI: an entry without a release fails on Install.
|
|
7
|
+
*
|
|
8
|
+
* Every pack releases on its own schedule. The desktop app never pins a pack to the app
|
|
9
|
+
* version. Compatibility with the app is the bridge protocol floor
|
|
10
|
+
* (`MIN_NODETOOL_CORE_VERSION`), which applies to `nodetool-core` only.
|
|
6
11
|
*/
|
|
12
|
+
/** `<process.platform>-<process.arch>`, for example `darwin-arm64`. */
|
|
13
|
+
export type PythonPackPlatform = `${string}-${string}`;
|
|
7
14
|
export interface PythonNodePack {
|
|
8
15
|
/** Display name shown in the package manager. */
|
|
9
16
|
name: string;
|
|
@@ -14,12 +21,26 @@ export interface PythonNodePack {
|
|
|
14
21
|
/** Python module prefixes of the node types this pack registers. */
|
|
15
22
|
namespaces: readonly string[];
|
|
16
23
|
/**
|
|
17
|
-
*
|
|
18
|
-
*
|
|
24
|
+
* Platforms the pack runs on, as `<process.platform>-<process.arch>`. Absent
|
|
25
|
+
* means every platform. The package manager hides the pack elsewhere and
|
|
26
|
+
* refuses to install it.
|
|
27
|
+
*/
|
|
28
|
+
platforms?: readonly PythonPackPlatform[];
|
|
29
|
+
/**
|
|
30
|
+
* Lowest macOS major version the pack's wheels install on. The package
|
|
31
|
+
* manager hides the pack on older macOS and refuses to install it.
|
|
19
32
|
*/
|
|
20
|
-
|
|
33
|
+
minMacOSVersion?: number;
|
|
34
|
+
/** What the pack needs, named in the refusal on an unsupported platform. */
|
|
35
|
+
platformRequirement?: string;
|
|
21
36
|
}
|
|
22
37
|
export declare const PYTHON_NODE_PACKS: readonly PythonNodePack[];
|
|
23
38
|
/** The catalog pack with this GitHub `owner/repo` id, if any. */
|
|
24
39
|
export declare function findPythonNodePack(repoId: string): PythonNodePack | undefined;
|
|
40
|
+
/**
|
|
41
|
+
* Whether `pack` runs on the given platform and architecture (Node's
|
|
42
|
+
* `process.platform` and `process.arch` values). On macOS, `osVersion` is the
|
|
43
|
+
* product version (`13.6.1`). An unknown version passes the macOS check.
|
|
44
|
+
*/
|
|
45
|
+
export declare function isPythonPackSupported(pack: PythonNodePack, platform: string, arch: string, osVersion?: string): boolean;
|
|
25
46
|
//# sourceMappingURL=python-packs.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"python-packs.d.ts","sourceRoot":"","sources":["../src/python-packs.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"python-packs.d.ts","sourceRoot":"","sources":["../src/python-packs.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,uEAAuE;AACvE,MAAM,MAAM,kBAAkB,GAAG,GAAG,MAAM,IAAI,MAAM,EAAE,CAAC;AAEvD,MAAM,WAAW,cAAc;IAC7B,iDAAiD;IACjD,IAAI,EAAE,MAAM,CAAC;IACb,wEAAwE;IACxE,OAAO,EAAE,MAAM,CAAC;IAChB,+DAA+D;IAC/D,WAAW,EAAE,MAAM,CAAC;IACpB,oEAAoE;IACpE,UAAU,EAAE,SAAS,MAAM,EAAE,CAAC;IAC9B;;;;OAIG;IACH,SAAS,CAAC,EAAE,SAAS,kBAAkB,EAAE,CAAC;IAC1C;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,4EAA4E;IAC5E,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B;AAED,eAAO,MAAM,iBAAiB,EAAE,SAAS,cAAc,EA4CtD,CAAC;AAEF,iEAAiE;AACjE,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,MAAM,GACb,cAAc,GAAG,SAAS,CAG5B;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,cAAc,EACpB,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,MAAM,EACZ,SAAS,CAAC,EAAE,MAAM,GACjB,OAAO,CAWT"}
|