@nodetool-ai/agents 0.7.0-rc.22 → 0.8.1
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 +35 -0
- package/dist/.nodetool-build-stamp +1 -0
- package/dist/analysis/audio-dsp.d.ts +223 -0
- package/dist/analysis/audio-dsp.d.ts.map +1 -0
- package/dist/analysis/audio-dsp.js +642 -0
- package/dist/analysis/audio-dsp.js.map +1 -0
- package/dist/analysis/media-decode.d.ts +85 -0
- package/dist/analysis/media-decode.d.ts.map +1 -0
- package/dist/analysis/media-decode.js +199 -0
- package/dist/analysis/media-decode.js.map +1 -0
- package/dist/analysis/mediabunny-runtime.d.ts +15 -0
- package/dist/analysis/mediabunny-runtime.d.ts.map +1 -0
- package/dist/analysis/mediabunny-runtime.js +30 -0
- package/dist/analysis/mediabunny-runtime.js.map +1 -0
- package/dist/analysis/video-frames.d.ts +120 -0
- package/dist/analysis/video-frames.d.ts.map +1 -0
- package/dist/analysis/video-frames.js +288 -0
- package/dist/analysis/video-frames.js.map +1 -0
- package/dist/apify/assets.d.ts +80 -0
- package/dist/apify/assets.d.ts.map +1 -0
- package/dist/apify/assets.js +192 -0
- package/dist/apify/assets.js.map +1 -0
- package/dist/apify/catalog.d.ts +44 -0
- package/dist/apify/catalog.d.ts.map +1 -0
- package/dist/apify/catalog.js +108 -0
- package/dist/apify/catalog.js.map +1 -0
- package/dist/apify/client.d.ts +137 -0
- package/dist/apify/client.d.ts.map +1 -0
- package/dist/apify/client.js +346 -0
- package/dist/apify/client.js.map +1 -0
- package/dist/apify/errors.d.ts +85 -0
- package/dist/apify/errors.d.ts.map +1 -0
- package/dist/apify/errors.js +90 -0
- package/dist/apify/errors.js.map +1 -0
- package/dist/apify/normalize.d.ts +131 -0
- package/dist/apify/normalize.d.ts.map +1 -0
- package/dist/apify/normalize.js +202 -0
- package/dist/apify/normalize.js.map +1 -0
- package/dist/apify/policy.d.ts +136 -0
- package/dist/apify/policy.d.ts.map +1 -0
- package/dist/apify/policy.js +223 -0
- package/dist/apify/policy.js.map +1 -0
- package/dist/apify/run.d.ts +86 -0
- package/dist/apify/run.d.ts.map +1 -0
- package/dist/apify/run.js +158 -0
- package/dist/apify/run.js.map +1 -0
- package/dist/app-build/author.d.ts +67 -0
- package/dist/app-build/author.d.ts.map +1 -0
- package/dist/app-build/author.js +231 -0
- package/dist/app-build/author.js.map +1 -0
- package/dist/app-build/bridge.d.ts +130 -0
- package/dist/app-build/bridge.d.ts.map +1 -0
- package/dist/app-build/bridge.js +647 -0
- package/dist/app-build/bridge.js.map +1 -0
- package/dist/app-build/build-service.d.ts +66 -0
- package/dist/app-build/build-service.d.ts.map +1 -0
- package/dist/app-build/build-service.js +249 -0
- package/dist/app-build/build-service.js.map +1 -0
- package/dist/app-build/build.d.ts +115 -0
- package/dist/app-build/build.d.ts.map +1 -0
- package/dist/app-build/build.js +901 -0
- package/dist/app-build/build.js.map +1 -0
- package/dist/app-build/interactions.d.ts +20 -0
- package/dist/app-build/interactions.d.ts.map +1 -0
- package/dist/app-build/interactions.js +121 -0
- package/dist/app-build/interactions.js.map +1 -0
- package/dist/app-build/judge.d.ts +113 -0
- package/dist/app-build/judge.d.ts.map +1 -0
- package/dist/app-build/judge.js +318 -0
- package/dist/app-build/judge.js.map +1 -0
- package/dist/app-build/markdown.d.ts +10 -0
- package/dist/app-build/markdown.d.ts.map +1 -0
- package/dist/app-build/markdown.js +65 -0
- package/dist/app-build/markdown.js.map +1 -0
- package/dist/app-build/spec.d.ts +228 -0
- package/dist/app-build/spec.d.ts.map +1 -0
- package/dist/app-build/spec.js +651 -0
- package/dist/app-build/spec.js.map +1 -0
- package/dist/app-build/tool-loop.d.ts +84 -0
- package/dist/app-build/tool-loop.d.ts.map +1 -0
- package/dist/app-build/tool-loop.js +113 -0
- package/dist/app-build/tool-loop.js.map +1 -0
- package/dist/app-build/types.d.ts +215 -0
- package/dist/app-build/types.d.ts.map +1 -0
- package/dist/app-build/types.js +28 -0
- package/dist/app-build/types.js.map +1 -0
- package/dist/author-graph.d.ts +91 -0
- package/dist/author-graph.d.ts.map +1 -0
- package/dist/author-graph.js +319 -0
- package/dist/author-graph.js.map +1 -0
- package/dist/background-subtasks.d.ts +79 -0
- package/dist/background-subtasks.d.ts.map +1 -0
- package/dist/background-subtasks.js +139 -0
- package/dist/background-subtasks.js.map +1 -0
- package/dist/blender-gate.d.ts +21 -0
- package/dist/blender-gate.d.ts.map +1 -0
- package/dist/blender-gate.js +27 -0
- package/dist/blender-gate.js.map +1 -0
- package/dist/browser-gate.d.ts +28 -0
- package/dist/browser-gate.d.ts.map +1 -0
- package/dist/browser-gate.js +34 -0
- package/dist/browser-gate.js.map +1 -0
- package/dist/capabilities/adapters.d.ts +36 -0
- package/dist/capabilities/adapters.d.ts.map +1 -0
- package/dist/capabilities/adapters.js +44 -0
- package/dist/capabilities/adapters.js.map +1 -0
- package/dist/capabilities/agents.d.ts +78 -0
- package/dist/capabilities/agents.d.ts.map +1 -0
- package/dist/capabilities/agents.js +366 -0
- package/dist/capabilities/agents.js.map +1 -0
- package/dist/capabilities/agents.specs.d.ts +27 -0
- package/dist/capabilities/agents.specs.d.ts.map +1 -0
- package/dist/capabilities/agents.specs.js +243 -0
- package/dist/capabilities/agents.specs.js.map +1 -0
- package/dist/capabilities/analysis.d.ts +93 -0
- package/dist/capabilities/analysis.d.ts.map +1 -0
- package/dist/capabilities/analysis.js +812 -0
- package/dist/capabilities/analysis.js.map +1 -0
- package/dist/capabilities/analysis.specs.d.ts +39 -0
- package/dist/capabilities/analysis.specs.d.ts.map +1 -0
- package/dist/capabilities/analysis.specs.js +217 -0
- package/dist/capabilities/analysis.specs.js.map +1 -0
- package/dist/capabilities/apify.d.ts +34 -0
- package/dist/capabilities/apify.d.ts.map +1 -0
- package/dist/capabilities/apify.js +449 -0
- package/dist/capabilities/apify.js.map +1 -0
- package/dist/capabilities/apify.specs.d.ts +28 -0
- package/dist/capabilities/apify.specs.d.ts.map +1 -0
- package/dist/capabilities/apify.specs.js +232 -0
- package/dist/capabilities/apify.specs.js.map +1 -0
- package/dist/capabilities/apps.d.ts +40 -0
- package/dist/capabilities/apps.d.ts.map +1 -0
- package/dist/capabilities/apps.js +413 -0
- package/dist/capabilities/apps.js.map +1 -0
- package/dist/capabilities/apps.specs.d.ts +23 -0
- package/dist/capabilities/apps.specs.d.ts.map +1 -0
- package/dist/capabilities/apps.specs.js +236 -0
- package/dist/capabilities/apps.specs.js.map +1 -0
- package/dist/capabilities/args.d.ts +65 -0
- package/dist/capabilities/args.d.ts.map +1 -0
- package/dist/capabilities/args.js +218 -0
- package/dist/capabilities/args.js.map +1 -0
- package/dist/capabilities/assets.d.ts +45 -0
- package/dist/capabilities/assets.d.ts.map +1 -0
- package/dist/capabilities/assets.js +952 -0
- package/dist/capabilities/assets.js.map +1 -0
- package/dist/capabilities/assets.specs.d.ts +54 -0
- package/dist/capabilities/assets.specs.d.ts.map +1 -0
- package/dist/capabilities/assets.specs.js +291 -0
- package/dist/capabilities/assets.specs.js.map +1 -0
- package/dist/capabilities/background-generation.d.ts +14 -0
- package/dist/capabilities/background-generation.d.ts.map +1 -0
- package/dist/capabilities/background-generation.js +29 -0
- package/dist/capabilities/background-generation.js.map +1 -0
- package/dist/capabilities/browser.d.ts +30 -0
- package/dist/capabilities/browser.d.ts.map +1 -0
- package/dist/capabilities/browser.js +250 -0
- package/dist/capabilities/browser.js.map +1 -0
- package/dist/capabilities/browser.specs.d.ts +37 -0
- package/dist/capabilities/browser.specs.d.ts.map +1 -0
- package/dist/capabilities/browser.specs.js +173 -0
- package/dist/capabilities/browser.specs.js.map +1 -0
- package/dist/capabilities/code-grading.d.ts +68 -0
- package/dist/capabilities/code-grading.d.ts.map +1 -0
- package/dist/capabilities/code-grading.js +75 -0
- package/dist/capabilities/code-grading.js.map +1 -0
- package/dist/capabilities/code.d.ts +56 -0
- package/dist/capabilities/code.d.ts.map +1 -0
- package/dist/capabilities/code.js +327 -0
- package/dist/capabilities/code.js.map +1 -0
- package/dist/capabilities/code.specs.d.ts +22 -0
- package/dist/capabilities/code.specs.d.ts.map +1 -0
- package/dist/capabilities/code.specs.js +175 -0
- package/dist/capabilities/code.specs.js.map +1 -0
- package/dist/capabilities/collections.d.ts +44 -0
- package/dist/capabilities/collections.d.ts.map +1 -0
- package/dist/capabilities/collections.js +432 -0
- package/dist/capabilities/collections.js.map +1 -0
- package/dist/capabilities/collections.specs.d.ts +25 -0
- package/dist/capabilities/collections.specs.d.ts.map +1 -0
- package/dist/capabilities/collections.specs.js +299 -0
- package/dist/capabilities/collections.specs.js.map +1 -0
- package/dist/capabilities/compositions.d.ts +57 -0
- package/dist/capabilities/compositions.d.ts.map +1 -0
- package/dist/capabilities/compositions.js +384 -0
- package/dist/capabilities/compositions.js.map +1 -0
- package/dist/capabilities/compositions.specs.d.ts +22 -0
- package/dist/capabilities/compositions.specs.d.ts.map +1 -0
- package/dist/capabilities/compositions.specs.js +126 -0
- package/dist/capabilities/compositions.specs.js.map +1 -0
- package/dist/capabilities/concurrency.d.ts +12 -0
- package/dist/capabilities/concurrency.d.ts.map +1 -0
- package/dist/capabilities/concurrency.js +30 -0
- package/dist/capabilities/concurrency.js.map +1 -0
- package/dist/capabilities/costs.d.ts +20 -0
- package/dist/capabilities/costs.d.ts.map +1 -0
- package/dist/capabilities/costs.js +40 -0
- package/dist/capabilities/costs.js.map +1 -0
- package/dist/capabilities/costs.specs.d.ts +12 -0
- package/dist/capabilities/costs.specs.d.ts.map +1 -0
- package/dist/capabilities/costs.specs.js +35 -0
- package/dist/capabilities/costs.specs.js.map +1 -0
- package/dist/capabilities/dispatcher.d.ts +57 -0
- package/dist/capabilities/dispatcher.d.ts.map +1 -0
- package/dist/capabilities/dispatcher.js +117 -0
- package/dist/capabilities/dispatcher.js.map +1 -0
- package/dist/capabilities/documents.d.ts +25 -0
- package/dist/capabilities/documents.d.ts.map +1 -0
- package/dist/capabilities/documents.js +278 -0
- package/dist/capabilities/documents.js.map +1 -0
- package/dist/capabilities/documents.specs.d.ts +18 -0
- package/dist/capabilities/documents.specs.d.ts.map +1 -0
- package/dist/capabilities/documents.specs.js +201 -0
- package/dist/capabilities/documents.specs.js.map +1 -0
- package/dist/capabilities/email.d.ts +23 -0
- package/dist/capabilities/email.d.ts.map +1 -0
- package/dist/capabilities/email.js +226 -0
- package/dist/capabilities/email.js.map +1 -0
- package/dist/capabilities/email.specs.d.ts +16 -0
- package/dist/capabilities/email.specs.d.ts.map +1 -0
- package/dist/capabilities/email.specs.js +102 -0
- package/dist/capabilities/email.specs.js.map +1 -0
- package/dist/capabilities/entities.d.ts +52 -0
- package/dist/capabilities/entities.d.ts.map +1 -0
- package/dist/capabilities/entities.js +478 -0
- package/dist/capabilities/entities.js.map +1 -0
- package/dist/capabilities/entities.specs.d.ts +25 -0
- package/dist/capabilities/entities.specs.d.ts.map +1 -0
- package/dist/capabilities/entities.specs.js +247 -0
- package/dist/capabilities/entities.specs.js.map +1 -0
- package/dist/capabilities/example-timelines.d.ts +3 -0
- package/dist/capabilities/example-timelines.d.ts.map +1 -0
- package/dist/capabilities/example-timelines.js +191 -0
- package/dist/capabilities/example-timelines.js.map +1 -0
- package/dist/capabilities/example-timelines.specs.d.ts +5 -0
- package/dist/capabilities/example-timelines.specs.d.ts.map +1 -0
- package/dist/capabilities/example-timelines.specs.js +53 -0
- package/dist/capabilities/example-timelines.specs.js.map +1 -0
- package/dist/capabilities/files.d.ts +53 -0
- package/dist/capabilities/files.d.ts.map +1 -0
- package/dist/capabilities/files.js +1172 -0
- package/dist/capabilities/files.js.map +1 -0
- package/dist/capabilities/files.specs.d.ts +28 -0
- package/dist/capabilities/files.specs.d.ts.map +1 -0
- package/dist/capabilities/files.specs.js +259 -0
- package/dist/capabilities/files.specs.js.map +1 -0
- package/dist/capabilities/flow.d.ts +93 -0
- package/dist/capabilities/flow.d.ts.map +1 -0
- package/dist/capabilities/flow.js +285 -0
- package/dist/capabilities/flow.js.map +1 -0
- package/dist/capabilities/flow.specs.d.ts +25 -0
- package/dist/capabilities/flow.specs.d.ts.map +1 -0
- package/dist/capabilities/flow.specs.js +114 -0
- package/dist/capabilities/flow.specs.js.map +1 -0
- package/dist/capabilities/game-asset-source.d.ts +31 -0
- package/dist/capabilities/game-asset-source.d.ts.map +1 -0
- package/dist/capabilities/game-asset-source.js +81 -0
- package/dist/capabilities/game-asset-source.js.map +1 -0
- package/dist/capabilities/game.d.ts +12 -0
- package/dist/capabilities/game.d.ts.map +1 -0
- package/dist/capabilities/game.js +1262 -0
- package/dist/capabilities/game.js.map +1 -0
- package/dist/capabilities/game.specs.d.ts +3 -0
- package/dist/capabilities/game.specs.d.ts.map +1 -0
- package/dist/capabilities/game.specs.js +96 -0
- package/dist/capabilities/game.specs.js.map +1 -0
- package/dist/capabilities/gate-from-context.d.ts +39 -0
- package/dist/capabilities/gate-from-context.d.ts.map +1 -0
- package/dist/capabilities/gate-from-context.js +97 -0
- package/dist/capabilities/gate-from-context.js.map +1 -0
- package/dist/capabilities/gate-tools.d.ts +18 -0
- package/dist/capabilities/gate-tools.d.ts.map +1 -0
- package/dist/capabilities/gate-tools.js +66 -0
- package/dist/capabilities/gate-tools.js.map +1 -0
- package/dist/capabilities/generations.d.ts +79 -0
- package/dist/capabilities/generations.d.ts.map +1 -0
- package/dist/capabilities/generations.js +382 -0
- package/dist/capabilities/generations.js.map +1 -0
- package/dist/capabilities/generations.specs.d.ts +62 -0
- package/dist/capabilities/generations.specs.d.ts.map +1 -0
- package/dist/capabilities/generations.specs.js +230 -0
- package/dist/capabilities/generations.specs.js.map +1 -0
- package/dist/capabilities/google.d.ts +50 -0
- package/dist/capabilities/google.d.ts.map +1 -0
- package/dist/capabilities/google.js +246 -0
- package/dist/capabilities/google.js.map +1 -0
- package/dist/capabilities/google.specs.d.ts +52 -0
- package/dist/capabilities/google.specs.d.ts.map +1 -0
- package/dist/capabilities/google.specs.js +391 -0
- package/dist/capabilities/google.specs.js.map +1 -0
- package/dist/capabilities/html-text.d.ts +28 -0
- package/dist/capabilities/html-text.d.ts.map +1 -0
- package/dist/capabilities/html-text.js +76 -0
- package/dist/capabilities/html-text.js.map +1 -0
- package/dist/capabilities/index.d.ts +19 -0
- package/dist/capabilities/index.d.ts.map +1 -0
- package/dist/capabilities/index.js +14 -0
- package/dist/capabilities/index.js.map +1 -0
- package/dist/capabilities/invoke.d.ts +89 -0
- package/dist/capabilities/invoke.d.ts.map +1 -0
- package/dist/capabilities/invoke.js +214 -0
- package/dist/capabilities/invoke.js.map +1 -0
- package/dist/capabilities/jobs.d.ts +32 -0
- package/dist/capabilities/jobs.d.ts.map +1 -0
- package/dist/capabilities/jobs.js +123 -0
- package/dist/capabilities/jobs.js.map +1 -0
- package/dist/capabilities/jobs.specs.d.ts +20 -0
- package/dist/capabilities/jobs.specs.d.ts.map +1 -0
- package/dist/capabilities/jobs.specs.js +103 -0
- package/dist/capabilities/jobs.specs.js.map +1 -0
- package/dist/capabilities/js-scripts.d.ts +90 -0
- package/dist/capabilities/js-scripts.d.ts.map +1 -0
- package/dist/capabilities/js-scripts.js +700 -0
- package/dist/capabilities/js-scripts.js.map +1 -0
- package/dist/capabilities/js-scripts.specs.d.ts +50 -0
- package/dist/capabilities/js-scripts.specs.d.ts.map +1 -0
- package/dist/capabilities/js-scripts.specs.js +344 -0
- package/dist/capabilities/js-scripts.specs.js.map +1 -0
- package/dist/capabilities/lazy-tool.d.ts +42 -0
- package/dist/capabilities/lazy-tool.d.ts.map +1 -0
- package/dist/capabilities/lazy-tool.js +88 -0
- package/dist/capabilities/lazy-tool.js.map +1 -0
- package/dist/capabilities/local-browser.d.ts +24 -0
- package/dist/capabilities/local-browser.d.ts.map +1 -0
- package/dist/capabilities/local-browser.js +105 -0
- package/dist/capabilities/local-browser.js.map +1 -0
- package/dist/capabilities/media.d.ts +121 -0
- package/dist/capabilities/media.d.ts.map +1 -0
- package/dist/capabilities/media.js +2217 -0
- package/dist/capabilities/media.js.map +1 -0
- package/dist/capabilities/media.specs.d.ts +65 -0
- package/dist/capabilities/media.specs.d.ts.map +1 -0
- package/dist/capabilities/media.specs.js +779 -0
- package/dist/capabilities/media.specs.js.map +1 -0
- package/dist/capabilities/memory.d.ts +31 -0
- package/dist/capabilities/memory.d.ts.map +1 -0
- package/dist/capabilities/memory.js +403 -0
- package/dist/capabilities/memory.js.map +1 -0
- package/dist/capabilities/memory.specs.d.ts +55 -0
- package/dist/capabilities/memory.specs.d.ts.map +1 -0
- package/dist/capabilities/memory.specs.js +208 -0
- package/dist/capabilities/memory.specs.js.map +1 -0
- package/dist/capabilities/model3d.d.ts +29 -0
- package/dist/capabilities/model3d.d.ts.map +1 -0
- package/dist/capabilities/model3d.js +482 -0
- package/dist/capabilities/model3d.js.map +1 -0
- package/dist/capabilities/model3d.specs.d.ts +28 -0
- package/dist/capabilities/model3d.specs.d.ts.map +1 -0
- package/dist/capabilities/model3d.specs.js +305 -0
- package/dist/capabilities/model3d.specs.js.map +1 -0
- package/dist/capabilities/models.d.ts +138 -0
- package/dist/capabilities/models.d.ts.map +1 -0
- package/dist/capabilities/models.js +803 -0
- package/dist/capabilities/models.js.map +1 -0
- package/dist/capabilities/models.specs.d.ts +21 -0
- package/dist/capabilities/models.specs.d.ts.map +1 -0
- package/dist/capabilities/models.specs.js +141 -0
- package/dist/capabilities/models.specs.js.map +1 -0
- package/dist/capabilities/nodes.d.ts +26 -0
- package/dist/capabilities/nodes.d.ts.map +1 -0
- package/dist/capabilities/nodes.js +266 -0
- package/dist/capabilities/nodes.js.map +1 -0
- package/dist/capabilities/nodes.specs.d.ts +20 -0
- package/dist/capabilities/nodes.specs.d.ts.map +1 -0
- package/dist/capabilities/nodes.specs.js +106 -0
- package/dist/capabilities/nodes.specs.js.map +1 -0
- package/dist/capabilities/packs.d.ts +69 -0
- package/dist/capabilities/packs.d.ts.map +1 -0
- package/dist/capabilities/packs.js +246 -0
- package/dist/capabilities/packs.js.map +1 -0
- package/dist/capabilities/packs.specs.d.ts +27 -0
- package/dist/capabilities/packs.specs.d.ts.map +1 -0
- package/dist/capabilities/packs.specs.js +64 -0
- package/dist/capabilities/packs.specs.js.map +1 -0
- package/dist/capabilities/project-scope.d.ts +12 -0
- package/dist/capabilities/project-scope.d.ts.map +1 -0
- package/dist/capabilities/project-scope.js +19 -0
- package/dist/capabilities/project-scope.js.map +1 -0
- package/dist/capabilities/projects.d.ts +23 -0
- package/dist/capabilities/projects.d.ts.map +1 -0
- package/dist/capabilities/projects.js +206 -0
- package/dist/capabilities/projects.js.map +1 -0
- package/dist/capabilities/projects.specs.d.ts +23 -0
- package/dist/capabilities/projects.specs.d.ts.map +1 -0
- package/dist/capabilities/projects.specs.js +118 -0
- package/dist/capabilities/projects.specs.js.map +1 -0
- package/dist/capabilities/registry.d.ts +109 -0
- package/dist/capabilities/registry.d.ts.map +1 -0
- package/dist/capabilities/registry.js +445 -0
- package/dist/capabilities/registry.js.map +1 -0
- package/dist/capabilities/script-link.d.ts +22 -0
- package/dist/capabilities/script-link.d.ts.map +1 -0
- package/dist/capabilities/script-link.js +35 -0
- package/dist/capabilities/script-link.js.map +1 -0
- package/dist/capabilities/scripts.d.ts +43 -0
- package/dist/capabilities/scripts.d.ts.map +1 -0
- package/dist/capabilities/scripts.js +1789 -0
- package/dist/capabilities/scripts.js.map +1 -0
- package/dist/capabilities/scripts.specs.d.ts +40 -0
- package/dist/capabilities/scripts.specs.d.ts.map +1 -0
- package/dist/capabilities/scripts.specs.js +319 -0
- package/dist/capabilities/scripts.specs.js.map +1 -0
- package/dist/capabilities/serpapi.d.ts +42 -0
- package/dist/capabilities/serpapi.d.ts.map +1 -0
- package/dist/capabilities/serpapi.js +262 -0
- package/dist/capabilities/serpapi.js.map +1 -0
- package/dist/capabilities/serpapi.specs.d.ts +24 -0
- package/dist/capabilities/serpapi.specs.d.ts.map +1 -0
- package/dist/capabilities/serpapi.specs.js +174 -0
- package/dist/capabilities/serpapi.specs.js.map +1 -0
- package/dist/capabilities/settings.d.ts +48 -0
- package/dist/capabilities/settings.d.ts.map +1 -0
- package/dist/capabilities/settings.js +226 -0
- package/dist/capabilities/settings.js.map +1 -0
- package/dist/capabilities/settings.specs.d.ts +42 -0
- package/dist/capabilities/settings.specs.d.ts.map +1 -0
- package/dist/capabilities/settings.specs.js +126 -0
- package/dist/capabilities/settings.specs.js.map +1 -0
- package/dist/capabilities/shared.d.ts +35 -0
- package/dist/capabilities/shared.d.ts.map +1 -0
- package/dist/capabilities/shared.js +165 -0
- package/dist/capabilities/shared.js.map +1 -0
- package/dist/capabilities/shared.specs.d.ts +19 -0
- package/dist/capabilities/shared.specs.d.ts.map +1 -0
- package/dist/capabilities/shared.specs.js +134 -0
- package/dist/capabilities/shared.specs.js.map +1 -0
- package/dist/capabilities/sketches.d.ts +52 -0
- package/dist/capabilities/sketches.d.ts.map +1 -0
- package/dist/capabilities/sketches.js +1163 -0
- package/dist/capabilities/sketches.js.map +1 -0
- package/dist/capabilities/sketches.specs.d.ts +44 -0
- package/dist/capabilities/sketches.specs.d.ts.map +1 -0
- package/dist/capabilities/sketches.specs.js +392 -0
- package/dist/capabilities/sketches.specs.js.map +1 -0
- package/dist/capabilities/skills.d.ts +28 -0
- package/dist/capabilities/skills.d.ts.map +1 -0
- package/dist/capabilities/skills.js +269 -0
- package/dist/capabilities/skills.js.map +1 -0
- package/dist/capabilities/skills.specs.d.ts +17 -0
- package/dist/capabilities/skills.specs.d.ts.map +1 -0
- package/dist/capabilities/skills.specs.js +108 -0
- package/dist/capabilities/skills.specs.js.map +1 -0
- package/dist/capabilities/storyboards.d.ts +68 -0
- package/dist/capabilities/storyboards.d.ts.map +1 -0
- package/dist/capabilities/storyboards.js +2246 -0
- package/dist/capabilities/storyboards.js.map +1 -0
- package/dist/capabilities/storyboards.specs.d.ts +42 -0
- package/dist/capabilities/storyboards.specs.d.ts.map +1 -0
- package/dist/capabilities/storyboards.specs.js +418 -0
- package/dist/capabilities/storyboards.specs.js.map +1 -0
- package/dist/capabilities/threads.d.ts +25 -0
- package/dist/capabilities/threads.d.ts.map +1 -0
- package/dist/capabilities/threads.js +240 -0
- package/dist/capabilities/threads.js.map +1 -0
- package/dist/capabilities/threads.specs.d.ts +26 -0
- package/dist/capabilities/threads.specs.d.ts.map +1 -0
- package/dist/capabilities/threads.specs.js +108 -0
- package/dist/capabilities/threads.specs.js.map +1 -0
- package/dist/capabilities/timeline-audio-bake.d.ts +114 -0
- package/dist/capabilities/timeline-audio-bake.d.ts.map +1 -0
- package/dist/capabilities/timeline-audio-bake.js +188 -0
- package/dist/capabilities/timeline-audio-bake.js.map +1 -0
- package/dist/capabilities/timeline-bake.d.ts +21 -0
- package/dist/capabilities/timeline-bake.d.ts.map +1 -0
- package/dist/capabilities/timeline-bake.js +118 -0
- package/dist/capabilities/timeline-bake.js.map +1 -0
- package/dist/capabilities/timeline-isolate-subject.d.ts +157 -0
- package/dist/capabilities/timeline-isolate-subject.d.ts.map +1 -0
- package/dist/capabilities/timeline-isolate-subject.js +293 -0
- package/dist/capabilities/timeline-isolate-subject.js.map +1 -0
- package/dist/capabilities/timeline-native-media.d.ts +4 -0
- package/dist/capabilities/timeline-native-media.d.ts.map +1 -0
- package/dist/capabilities/timeline-native-media.js +920 -0
- package/dist/capabilities/timeline-native-media.js.map +1 -0
- package/dist/capabilities/timeline-track-object.d.ts +83 -0
- package/dist/capabilities/timeline-track-object.d.ts.map +1 -0
- package/dist/capabilities/timeline-track-object.js +195 -0
- package/dist/capabilities/timeline-track-object.js.map +1 -0
- package/dist/capabilities/timelines.d.ts +190 -0
- package/dist/capabilities/timelines.d.ts.map +1 -0
- package/dist/capabilities/timelines.js +2326 -0
- package/dist/capabilities/timelines.js.map +1 -0
- package/dist/capabilities/timelines.specs.d.ts +134 -0
- package/dist/capabilities/timelines.specs.d.ts.map +1 -0
- package/dist/capabilities/timelines.specs.js +1362 -0
- package/dist/capabilities/timelines.specs.js.map +1 -0
- package/dist/capabilities/types.d.ts +197 -0
- package/dist/capabilities/types.d.ts.map +1 -0
- package/dist/capabilities/types.js +19 -0
- package/dist/capabilities/types.js.map +1 -0
- package/dist/capabilities/ui.d.ts +38 -0
- package/dist/capabilities/ui.d.ts.map +1 -0
- package/dist/capabilities/ui.js +128 -0
- package/dist/capabilities/ui.js.map +1 -0
- package/dist/capabilities/ui.specs.d.ts +22 -0
- package/dist/capabilities/ui.specs.d.ts.map +1 -0
- package/dist/capabilities/ui.specs.js +59 -0
- package/dist/capabilities/ui.specs.js.map +1 -0
- package/dist/capabilities/video-production-acceptance.d.ts +27 -0
- package/dist/capabilities/video-production-acceptance.d.ts.map +1 -0
- package/dist/capabilities/video-production-acceptance.js +41 -0
- package/dist/capabilities/video-production-acceptance.js.map +1 -0
- package/dist/capabilities/video-production.d.ts +179 -0
- package/dist/capabilities/video-production.d.ts.map +1 -0
- package/dist/capabilities/video-production.js +1492 -0
- package/dist/capabilities/video-production.js.map +1 -0
- package/dist/capabilities/video-production.specs.d.ts +13 -0
- package/dist/capabilities/video-production.specs.d.ts.map +1 -0
- package/dist/capabilities/video-production.specs.js +256 -0
- package/dist/capabilities/video-production.specs.js.map +1 -0
- package/dist/capabilities/web.d.ts +86 -0
- package/dist/capabilities/web.d.ts.map +1 -0
- package/dist/capabilities/web.js +850 -0
- package/dist/capabilities/web.js.map +1 -0
- package/dist/capabilities/web.specs.d.ts +33 -0
- package/dist/capabilities/web.specs.d.ts.map +1 -0
- package/dist/capabilities/web.specs.js +286 -0
- package/dist/capabilities/web.specs.js.map +1 -0
- package/dist/capabilities/workflows.d.ts +58 -0
- package/dist/capabilities/workflows.d.ts.map +1 -0
- package/dist/capabilities/workflows.js +1530 -0
- package/dist/capabilities/workflows.js.map +1 -0
- package/dist/capabilities/workflows.specs.d.ts +63 -0
- package/dist/capabilities/workflows.specs.d.ts.map +1 -0
- package/dist/capabilities/workflows.specs.js +852 -0
- package/dist/capabilities/workflows.specs.js.map +1 -0
- package/dist/code-gen/analyze.d.ts +26 -0
- package/dist/code-gen/analyze.d.ts.map +1 -0
- package/dist/code-gen/analyze.js +79 -0
- package/dist/code-gen/analyze.js.map +1 -0
- package/dist/code-gen/port-types.d.ts +58 -0
- package/dist/code-gen/port-types.d.ts.map +1 -0
- package/dist/code-gen/port-types.js +115 -0
- package/dist/code-gen/port-types.js.map +1 -0
- package/dist/code-gen/prompt.d.ts +37 -0
- package/dist/code-gen/prompt.d.ts.map +1 -0
- package/dist/code-gen/prompt.js +129 -0
- package/dist/code-gen/prompt.js.map +1 -0
- package/dist/code-gen/sandbox-manifest.d.ts +120 -0
- package/dist/code-gen/sandbox-manifest.d.ts.map +1 -0
- package/dist/code-gen/sandbox-manifest.js +1023 -0
- package/dist/code-gen/sandbox-manifest.js.map +1 -0
- package/dist/code-gen/sandbox-prompt.d.ts +26 -0
- package/dist/code-gen/sandbox-prompt.d.ts.map +1 -0
- package/dist/code-gen/sandbox-prompt.js +126 -0
- package/dist/code-gen/sandbox-prompt.js.map +1 -0
- package/dist/code-planner.d.ts +72 -0
- package/dist/code-planner.d.ts.map +1 -0
- package/dist/code-planner.js +271 -0
- package/dist/code-planner.js.map +1 -0
- package/dist/codeact/action-diagnostics.d.ts +35 -0
- package/dist/codeact/action-diagnostics.d.ts.map +1 -0
- package/dist/codeact/action-diagnostics.js +147 -0
- package/dist/codeact/action-diagnostics.js.map +1 -0
- package/dist/codeact/capability-modules.d.ts +66 -0
- package/dist/codeact/capability-modules.d.ts.map +1 -0
- package/dist/codeact/capability-modules.js +278 -0
- package/dist/codeact/capability-modules.js.map +1 -0
- package/dist/codeact/chat-codeact.d.ts +104 -0
- package/dist/codeact/chat-codeact.d.ts.map +1 -0
- package/dist/codeact/chat-codeact.js +424 -0
- package/dist/codeact/chat-codeact.js.map +1 -0
- package/dist/codeact/codeact-executor.d.ts +247 -0
- package/dist/codeact/codeact-executor.d.ts.map +1 -0
- package/dist/codeact/codeact-executor.js +1176 -0
- package/dist/codeact/codeact-executor.js.map +1 -0
- package/dist/codeact/compact-ids.d.ts +28 -0
- package/dist/codeact/compact-ids.d.ts.map +1 -0
- package/dist/codeact/compact-ids.js +77 -0
- package/dist/codeact/compact-ids.js.map +1 -0
- package/dist/codeact/execute-code-contract.d.ts +97 -0
- package/dist/codeact/execute-code-contract.d.ts.map +1 -0
- package/dist/codeact/execute-code-contract.js +225 -0
- package/dist/codeact/execute-code-contract.js.map +1 -0
- package/dist/codeact/fabric-package.d.ts +29 -0
- package/dist/codeact/fabric-package.d.ts.map +1 -0
- package/dist/codeact/fabric-package.js +62 -0
- package/dist/codeact/fabric-package.js.map +1 -0
- package/dist/codeact/flow-package.d.ts +31 -0
- package/dist/codeact/flow-package.d.ts.map +1 -0
- package/dist/codeact/flow-package.js +80 -0
- package/dist/codeact/flow-package.js.map +1 -0
- package/dist/codeact/graph-dsl-package.d.ts +42 -0
- package/dist/codeact/graph-dsl-package.d.ts.map +1 -0
- package/dist/codeact/graph-dsl-package.js +100 -0
- package/dist/codeact/graph-dsl-package.js.map +1 -0
- package/dist/codeact/graph-model.d.ts +30 -0
- package/dist/codeact/graph-model.d.ts.map +1 -0
- package/dist/codeact/graph-model.js +408 -0
- package/dist/codeact/graph-model.js.map +1 -0
- package/dist/codeact/mcp-guest-contract.d.ts +66 -0
- package/dist/codeact/mcp-guest-contract.d.ts.map +1 -0
- package/dist/codeact/mcp-guest-contract.js +108 -0
- package/dist/codeact/mcp-guest-contract.js.map +1 -0
- package/dist/codeact/nodetool-api.d.ts +60 -0
- package/dist/codeact/nodetool-api.d.ts.map +1 -0
- package/dist/codeact/nodetool-api.js +2056 -0
- package/dist/codeact/nodetool-api.js.map +1 -0
- package/dist/codeact/prompt.d.ts +88 -0
- package/dist/codeact/prompt.d.ts.map +1 -0
- package/dist/codeact/prompt.js +326 -0
- package/dist/codeact/prompt.js.map +1 -0
- package/dist/codeact/sandbox-package-docs.d.ts +48 -0
- package/dist/codeact/sandbox-package-docs.d.ts.map +1 -0
- package/dist/codeact/sandbox-package-docs.js +55 -0
- package/dist/codeact/sandbox-package-docs.js.map +1 -0
- package/dist/codeact/sandbox-package-listing.d.ts +81 -0
- package/dist/codeact/sandbox-package-listing.d.ts.map +1 -0
- package/dist/codeact/sandbox-package-listing.js +101 -0
- package/dist/codeact/sandbox-package-listing.js.map +1 -0
- package/dist/codeact/sandbox-packages.d.ts +72 -0
- package/dist/codeact/sandbox-packages.d.ts.map +1 -0
- package/dist/codeact/sandbox-packages.js +230 -0
- package/dist/codeact/sandbox-packages.js.map +1 -0
- package/dist/codeact/timeline-package.d.ts +5 -0
- package/dist/codeact/timeline-package.d.ts.map +1 -0
- package/dist/codeact/timeline-package.js +10 -0
- package/dist/codeact/timeline-package.js.map +1 -0
- package/dist/codeact/tool-api.d.ts +197 -0
- package/dist/codeact/tool-api.d.ts.map +1 -0
- package/dist/codeact/tool-api.js +445 -0
- package/dist/codeact/tool-api.js.map +1 -0
- package/dist/codeact/tools-prelude.d.ts +32 -0
- package/dist/codeact/tools-prelude.d.ts.map +1 -0
- package/dist/codeact/tools-prelude.js +65 -0
- package/dist/codeact/tools-prelude.js.map +1 -0
- package/dist/constants.d.ts +47 -2
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +64 -2
- package/dist/constants.js.map +1 -1
- package/dist/custom-animation-bake.d.ts +57 -0
- package/dist/custom-animation-bake.d.ts.map +1 -0
- package/dist/custom-animation-bake.js +88 -0
- package/dist/custom-animation-bake.js.map +1 -0
- package/dist/dynamic-slots.d.ts +72 -0
- package/dist/dynamic-slots.d.ts.map +1 -0
- package/dist/dynamic-slots.js +0 -0
- package/dist/dynamic-slots.js.map +1 -0
- package/dist/evals/app-build-cases.d.ts +35 -0
- package/dist/evals/app-build-cases.d.ts.map +1 -0
- package/dist/evals/app-build-cases.js +722 -0
- package/dist/evals/app-build-cases.js.map +1 -0
- package/dist/evals/app-build-eval.d.ts +208 -0
- package/dist/evals/app-build-eval.d.ts.map +1 -0
- package/dist/evals/app-build-eval.js +518 -0
- package/dist/evals/app-build-eval.js.map +1 -0
- package/dist/evals/app-build-plan.d.ts +76 -0
- package/dist/evals/app-build-plan.d.ts.map +1 -0
- package/dist/evals/app-build-plan.js +140 -0
- package/dist/evals/app-build-plan.js.map +1 -0
- package/dist/evals/code-gen-cases.d.ts +13 -0
- package/dist/evals/code-gen-cases.d.ts.map +1 -0
- package/dist/evals/code-gen-cases.js +124 -0
- package/dist/evals/code-gen-cases.js.map +1 -0
- package/dist/evals/code-gen-eval.d.ts +109 -0
- package/dist/evals/code-gen-eval.d.ts.map +1 -0
- package/dist/evals/code-gen-eval.js +299 -0
- package/dist/evals/code-gen-eval.js.map +1 -0
- package/dist/evals/codeact-api-cases.d.ts +14 -0
- package/dist/evals/codeact-api-cases.d.ts.map +1 -0
- package/dist/evals/codeact-api-cases.js +29 -0
- package/dist/evals/codeact-api-cases.js.map +1 -0
- package/dist/evals/codeact-api-core.d.ts +23 -0
- package/dist/evals/codeact-api-core.d.ts.map +1 -0
- package/dist/evals/codeact-api-core.js +1411 -0
- package/dist/evals/codeact-api-core.js.map +1 -0
- package/dist/evals/codeact-api-surfaces.d.ts +25 -0
- package/dist/evals/codeact-api-surfaces.d.ts.map +1 -0
- package/dist/evals/codeact-api-surfaces.js +2191 -0
- package/dist/evals/codeact-api-surfaces.js.map +1 -0
- package/dist/evals/codeact-cases.d.ts +76 -0
- package/dist/evals/codeact-cases.d.ts.map +1 -0
- package/dist/evals/codeact-cases.js +151 -0
- package/dist/evals/codeact-cases.js.map +1 -0
- package/dist/evals/codeact-eval.d.ts +66 -0
- package/dist/evals/codeact-eval.d.ts.map +1 -0
- package/dist/evals/codeact-eval.js +250 -0
- package/dist/evals/codeact-eval.js.map +1 -0
- package/dist/evals/codeact-sandbox-pack-cases.d.ts +31 -0
- package/dist/evals/codeact-sandbox-pack-cases.d.ts.map +1 -0
- package/dist/evals/codeact-sandbox-pack-cases.js +219 -0
- package/dist/evals/codeact-sandbox-pack-cases.js.map +1 -0
- package/dist/evals/escalation-cases.d.ts +22 -0
- package/dist/evals/escalation-cases.d.ts.map +1 -0
- package/dist/evals/escalation-cases.js +343 -0
- package/dist/evals/escalation-cases.js.map +1 -0
- package/dist/evals/escalation.d.ts +92 -0
- package/dist/evals/escalation.d.ts.map +1 -0
- package/dist/evals/escalation.js +152 -0
- package/dist/evals/escalation.js.map +1 -0
- package/dist/evals/goal-judge.d.ts +51 -0
- package/dist/evals/goal-judge.d.ts.map +1 -0
- package/dist/evals/goal-judge.js +152 -0
- package/dist/evals/goal-judge.js.map +1 -0
- package/dist/evals/graph-e2e-cases.d.ts +21 -0
- package/dist/evals/graph-e2e-cases.d.ts.map +1 -0
- package/dist/evals/graph-e2e-cases.js +262 -0
- package/dist/evals/graph-e2e-cases.js.map +1 -0
- package/dist/evals/graph-e2e-eval.d.ts +202 -0
- package/dist/evals/graph-e2e-eval.d.ts.map +1 -0
- package/dist/evals/graph-e2e-eval.js +438 -0
- package/dist/evals/graph-e2e-eval.js.map +1 -0
- package/dist/evals/graph-planner-cases.d.ts +12 -0
- package/dist/evals/graph-planner-cases.d.ts.map +1 -0
- package/dist/evals/graph-planner-cases.js +256 -0
- package/dist/evals/graph-planner-cases.js.map +1 -0
- package/dist/evals/graph-planner-eval.d.ts +178 -0
- package/dist/evals/graph-planner-eval.d.ts.map +1 -0
- package/dist/evals/graph-planner-eval.js +495 -0
- package/dist/evals/graph-planner-eval.js.map +1 -0
- package/dist/evals/planner-tools.d.ts +21 -0
- package/dist/evals/planner-tools.d.ts.map +1 -0
- package/dist/evals/planner-tools.js +66 -0
- package/dist/evals/planner-tools.js.map +1 -0
- package/dist/evals/subtask-cases.d.ts +88 -0
- package/dist/evals/subtask-cases.d.ts.map +1 -0
- package/dist/evals/subtask-cases.js +322 -0
- package/dist/evals/subtask-cases.js.map +1 -0
- package/dist/evals/subtask-eval.d.ts +129 -0
- package/dist/evals/subtask-eval.d.ts.map +1 -0
- package/dist/evals/subtask-eval.js +397 -0
- package/dist/evals/subtask-eval.js.map +1 -0
- package/dist/evals/surfaces/app.d.ts +19 -0
- package/dist/evals/surfaces/app.d.ts.map +1 -0
- package/dist/evals/surfaces/app.js +341 -0
- package/dist/evals/surfaces/app.js.map +1 -0
- package/dist/evals/surfaces/creative-pipeline.d.ts +203 -0
- package/dist/evals/surfaces/creative-pipeline.d.ts.map +1 -0
- package/dist/evals/surfaces/creative-pipeline.js +909 -0
- package/dist/evals/surfaces/creative-pipeline.js.map +1 -0
- package/dist/evals/surfaces/game.d.ts +5 -0
- package/dist/evals/surfaces/game.d.ts.map +1 -0
- package/dist/evals/surfaces/game.js +42 -0
- package/dist/evals/surfaces/game.js.map +1 -0
- package/dist/evals/surfaces/js-script.d.ts +66 -0
- package/dist/evals/surfaces/js-script.d.ts.map +1 -0
- package/dist/evals/surfaces/js-script.js +407 -0
- package/dist/evals/surfaces/js-script.js.map +1 -0
- package/dist/evals/surfaces/memory.d.ts +34 -0
- package/dist/evals/surfaces/memory.d.ts.map +1 -0
- package/dist/evals/surfaces/memory.js +264 -0
- package/dist/evals/surfaces/memory.js.map +1 -0
- package/dist/evals/surfaces/model3d.d.ts +45 -0
- package/dist/evals/surfaces/model3d.d.ts.map +1 -0
- package/dist/evals/surfaces/model3d.js +346 -0
- package/dist/evals/surfaces/model3d.js.map +1 -0
- package/dist/evals/surfaces/script.d.ts +96 -0
- package/dist/evals/surfaces/script.d.ts.map +1 -0
- package/dist/evals/surfaces/script.js +709 -0
- package/dist/evals/surfaces/script.js.map +1 -0
- package/dist/evals/surfaces/sketch.d.ts +124 -0
- package/dist/evals/surfaces/sketch.d.ts.map +1 -0
- package/dist/evals/surfaces/sketch.js +1298 -0
- package/dist/evals/surfaces/sketch.js.map +1 -0
- package/dist/evals/surfaces/storyboard.d.ts +97 -0
- package/dist/evals/surfaces/storyboard.d.ts.map +1 -0
- package/dist/evals/surfaces/storyboard.js +693 -0
- package/dist/evals/surfaces/storyboard.js.map +1 -0
- package/dist/evals/surfaces/timeline.d.ts +416 -0
- package/dist/evals/surfaces/timeline.d.ts.map +1 -0
- package/dist/evals/surfaces/timeline.js +3267 -0
- package/dist/evals/surfaces/timeline.js.map +1 -0
- package/dist/evals/task-planner-cases.d.ts +57 -0
- package/dist/evals/task-planner-cases.d.ts.map +1 -0
- package/dist/evals/task-planner-cases.js +117 -0
- package/dist/evals/task-planner-cases.js.map +1 -0
- package/dist/evals/task-planner-eval.d.ts +101 -0
- package/dist/evals/task-planner-eval.d.ts.map +1 -0
- package/dist/evals/task-planner-eval.js +380 -0
- package/dist/evals/task-planner-eval.js.map +1 -0
- package/dist/evals/tool-loop-bridge.d.ts +57 -0
- package/dist/evals/tool-loop-bridge.d.ts.map +1 -0
- package/dist/evals/tool-loop-bridge.js +129 -0
- package/dist/evals/tool-loop-bridge.js.map +1 -0
- package/dist/evals/tool-loop-cases.d.ts +21 -0
- package/dist/evals/tool-loop-cases.d.ts.map +1 -0
- package/dist/evals/tool-loop-cases.js +401 -0
- package/dist/evals/tool-loop-cases.js.map +1 -0
- package/dist/evals/tool-loop-eval.d.ts +234 -0
- package/dist/evals/tool-loop-eval.d.ts.map +1 -0
- package/dist/evals/tool-loop-eval.js +373 -0
- package/dist/evals/tool-loop-eval.js.map +1 -0
- package/dist/evals/tool-loop-permission.d.ts +43 -0
- package/dist/evals/tool-loop-permission.d.ts.map +1 -0
- package/dist/evals/tool-loop-permission.js +76 -0
- package/dist/evals/tool-loop-permission.js.map +1 -0
- package/dist/game-examples.d.ts +447 -0
- package/dist/game-examples.d.ts.map +1 -0
- package/dist/game-examples.js +187 -0
- package/dist/game-examples.js.map +1 -0
- package/dist/graph-builder.d.ts +55 -3
- package/dist/graph-builder.d.ts.map +1 -1
- package/dist/graph-builder.js +159 -4
- package/dist/graph-builder.js.map +1 -1
- package/dist/graph-dsl-core.d.ts +25 -0
- package/dist/graph-dsl-core.d.ts.map +1 -0
- package/dist/graph-dsl-core.js +312 -0
- package/dist/graph-dsl-core.js.map +1 -0
- package/dist/graph-dsl.d.ts +30 -0
- package/dist/graph-dsl.d.ts.map +1 -0
- package/dist/graph-dsl.js +116 -0
- package/dist/graph-dsl.js.map +1 -0
- package/dist/host-binaries.d.ts +6 -0
- package/dist/host-binaries.d.ts.map +1 -0
- package/dist/host-binaries.js +6 -0
- package/dist/host-binaries.js.map +1 -0
- package/dist/host-binary-guard.d.ts +100 -0
- package/dist/host-binary-guard.d.ts.map +1 -0
- package/dist/host-binary-guard.js +205 -0
- package/dist/host-binary-guard.js.map +1 -0
- package/dist/host-modules/aws.d.ts +57 -0
- package/dist/host-modules/aws.d.ts.map +1 -0
- package/dist/host-modules/aws.js +309 -0
- package/dist/host-modules/aws.js.map +1 -0
- package/dist/host-modules/chrono.d.ts +15 -0
- package/dist/host-modules/chrono.d.ts.map +1 -0
- package/dist/host-modules/chrono.js +35 -0
- package/dist/host-modules/chrono.js.map +1 -0
- package/dist/host-modules/csv.d.ts +17 -0
- package/dist/host-modules/csv.d.ts.map +1 -0
- package/dist/host-modules/csv.js +64 -0
- package/dist/host-modules/csv.js.map +1 -0
- package/dist/host-modules/diff.d.ts +9 -0
- package/dist/host-modules/diff.d.ts.map +1 -0
- package/dist/host-modules/diff.js +26 -0
- package/dist/host-modules/diff.js.map +1 -0
- package/dist/host-modules/dispatcher.d.ts +41 -0
- package/dist/host-modules/dispatcher.d.ts.map +1 -0
- package/dist/host-modules/dispatcher.js +99 -0
- package/dist/host-modules/dispatcher.js.map +1 -0
- package/dist/host-modules/docx.d.ts +19 -0
- package/dist/host-modules/docx.d.ts.map +1 -0
- package/dist/host-modules/docx.js +120 -0
- package/dist/host-modules/docx.js.map +1 -0
- package/dist/host-modules/epub.d.ts +48 -0
- package/dist/host-modules/epub.d.ts.map +1 -0
- package/dist/host-modules/epub.js +100 -0
- package/dist/host-modules/epub.js.map +1 -0
- package/dist/host-modules/exif.d.ts +8 -0
- package/dist/host-modules/exif.d.ts.map +1 -0
- package/dist/host-modules/exif.js +19 -0
- package/dist/host-modules/exif.js.map +1 -0
- package/dist/host-modules/expr.d.ts +16 -0
- package/dist/host-modules/expr.d.ts.map +1 -0
- package/dist/host-modules/expr.js +18 -0
- package/dist/host-modules/expr.js.map +1 -0
- package/dist/host-modules/fabric.d.ts +46 -0
- package/dist/host-modules/fabric.d.ts.map +1 -0
- package/dist/host-modules/fabric.js +178 -0
- package/dist/host-modules/fabric.js.map +1 -0
- package/dist/host-modules/html.d.ts +51 -0
- package/dist/host-modules/html.d.ts.map +1 -0
- package/dist/host-modules/html.js +198 -0
- package/dist/host-modules/html.js.map +1 -0
- package/dist/host-modules/ics.d.ts +9 -0
- package/dist/host-modules/ics.d.ts.map +1 -0
- package/dist/host-modules/ics.js +35 -0
- package/dist/host-modules/ics.js.map +1 -0
- package/dist/host-modules/limits.d.ts +41 -0
- package/dist/host-modules/limits.d.ts.map +1 -0
- package/dist/host-modules/limits.js +76 -0
- package/dist/host-modules/limits.js.map +1 -0
- package/dist/host-modules/mammoth.d.ts +11 -0
- package/dist/host-modules/mammoth.d.ts.map +1 -0
- package/dist/host-modules/mammoth.js +29 -0
- package/dist/host-modules/mammoth.js.map +1 -0
- package/dist/host-modules/notion.d.ts +45 -0
- package/dist/host-modules/notion.d.ts.map +1 -0
- package/dist/host-modules/notion.js +128 -0
- package/dist/host-modules/notion.js.map +1 -0
- package/dist/host-modules/ocr.d.ts +25 -0
- package/dist/host-modules/ocr.d.ts.map +1 -0
- package/dist/host-modules/ocr.js +74 -0
- package/dist/host-modules/ocr.js.map +1 -0
- package/dist/host-modules/pdf.d.ts +21 -0
- package/dist/host-modules/pdf.d.ts.map +1 -0
- package/dist/host-modules/pdf.js +53 -0
- package/dist/host-modules/pdf.js.map +1 -0
- package/dist/host-modules/pdflib.d.ts +17 -0
- package/dist/host-modules/pdflib.d.ts.map +1 -0
- package/dist/host-modules/pdflib.js +138 -0
- package/dist/host-modules/pdflib.js.map +1 -0
- package/dist/host-modules/pptx.d.ts +19 -0
- package/dist/host-modules/pptx.d.ts.map +1 -0
- package/dist/host-modules/pptx.js +67 -0
- package/dist/host-modules/pptx.js.map +1 -0
- package/dist/host-modules/pptxgen.d.ts +13 -0
- package/dist/host-modules/pptxgen.d.ts.map +1 -0
- package/dist/host-modules/pptxgen.js +98 -0
- package/dist/host-modules/pptxgen.js.map +1 -0
- package/dist/host-modules/prepared-request.d.ts +41 -0
- package/dist/host-modules/prepared-request.d.ts.map +1 -0
- package/dist/host-modules/prepared-request.js +104 -0
- package/dist/host-modules/prepared-request.js.map +1 -0
- package/dist/host-modules/registry.d.ts +31 -0
- package/dist/host-modules/registry.d.ts.map +1 -0
- package/dist/host-modules/registry.js +193 -0
- package/dist/host-modules/registry.js.map +1 -0
- package/dist/host-modules/subtitle.d.ts +15 -0
- package/dist/host-modules/subtitle.d.ts.map +1 -0
- package/dist/host-modules/subtitle.js +45 -0
- package/dist/host-modules/subtitle.js.map +1 -0
- package/dist/host-modules/supabase.d.ts +42 -0
- package/dist/host-modules/supabase.d.ts.map +1 -0
- package/dist/host-modules/supabase.js +141 -0
- package/dist/host-modules/supabase.js.map +1 -0
- package/dist/host-modules/tfjs.d.ts +42 -0
- package/dist/host-modules/tfjs.d.ts.map +1 -0
- package/dist/host-modules/tfjs.js +186 -0
- package/dist/host-modules/tfjs.js.map +1 -0
- package/dist/host-modules/tokens.d.ts +17 -0
- package/dist/host-modules/tokens.d.ts.map +1 -0
- package/dist/host-modules/tokens.js +74 -0
- package/dist/host-modules/tokens.js.map +1 -0
- package/dist/host-modules/twilio.d.ts +34 -0
- package/dist/host-modules/twilio.d.ts.map +1 -0
- package/dist/host-modules/twilio.js +67 -0
- package/dist/host-modules/twilio.js.map +1 -0
- package/dist/host-modules/xlsx.d.ts +26 -0
- package/dist/host-modules/xlsx.d.ts.map +1 -0
- package/dist/host-modules/xlsx.js +323 -0
- package/dist/host-modules/xlsx.js.map +1 -0
- package/dist/host-modules/xml.d.ts +23 -0
- package/dist/host-modules/xml.d.ts.map +1 -0
- package/dist/host-modules/xml.js +38 -0
- package/dist/host-modules/xml.js.map +1 -0
- package/dist/host-modules/zip.d.ts +24 -0
- package/dist/host-modules/zip.d.ts.map +1 -0
- package/dist/host-modules/zip.js +70 -0
- package/dist/host-modules/zip.js.map +1 -0
- package/dist/index.d.ts +197 -60
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +153 -60
- package/dist/index.js.map +1 -1
- package/dist/js-sandbox-worker/host.d.ts +136 -0
- package/dist/js-sandbox-worker/host.d.ts.map +1 -0
- package/dist/js-sandbox-worker/host.js +482 -0
- package/dist/js-sandbox-worker/host.js.map +1 -0
- package/dist/js-sandbox-worker/interpreter.d.ts +276 -0
- package/dist/js-sandbox-worker/interpreter.d.ts.map +1 -0
- package/dist/js-sandbox-worker/interpreter.js +1201 -0
- package/dist/js-sandbox-worker/interpreter.js.map +1 -0
- package/dist/js-sandbox-worker/protocol.d.ts +168 -0
- package/dist/js-sandbox-worker/protocol.d.ts.map +1 -0
- package/dist/js-sandbox-worker/protocol.js +217 -0
- package/dist/js-sandbox-worker/protocol.js.map +1 -0
- package/dist/js-sandbox-worker/worker-entry.d.ts +26 -0
- package/dist/js-sandbox-worker/worker-entry.d.ts.map +1 -0
- package/dist/js-sandbox-worker/worker-entry.js +307 -0
- package/dist/js-sandbox-worker/worker-entry.js.map +1 -0
- package/dist/js-sandbox.d.ts +455 -15
- package/dist/js-sandbox.d.ts.map +1 -1
- package/dist/js-sandbox.js +1961 -309
- package/dist/js-sandbox.js.map +1 -1
- package/dist/js-script-app-runner.d.ts +9 -0
- package/dist/js-script-app-runner.d.ts.map +1 -0
- package/dist/js-script-app-runner.js +49 -0
- package/dist/js-script-app-runner.js.map +1 -0
- package/dist/js-script-sandbox.d.ts +33 -0
- package/dist/js-script-sandbox.d.ts.map +1 -0
- package/dist/js-script-sandbox.js +82 -0
- package/dist/js-script-sandbox.js.map +1 -0
- package/dist/jtbd/friction.d.ts +26 -0
- package/dist/jtbd/friction.d.ts.map +1 -0
- package/dist/jtbd/friction.js +169 -0
- package/dist/jtbd/friction.js.map +1 -0
- package/dist/jtbd/index.d.ts +6 -0
- package/dist/jtbd/index.d.ts.map +1 -0
- package/dist/jtbd/index.js +6 -0
- package/dist/jtbd/index.js.map +1 -0
- package/dist/jtbd/optimize.d.ts +71 -0
- package/dist/jtbd/optimize.d.ts.map +1 -0
- package/dist/jtbd/optimize.js +176 -0
- package/dist/jtbd/optimize.js.map +1 -0
- package/dist/jtbd/registry.d.ts +29 -0
- package/dist/jtbd/registry.d.ts.map +1 -0
- package/dist/jtbd/registry.js +451 -0
- package/dist/jtbd/registry.js.map +1 -0
- package/dist/jtbd/run.d.ts +70 -0
- package/dist/jtbd/run.d.ts.map +1 -0
- package/dist/jtbd/run.js +177 -0
- package/dist/jtbd/run.js.map +1 -0
- package/dist/jtbd/types.d.ts +141 -0
- package/dist/jtbd/types.d.ts.map +1 -0
- package/dist/jtbd/types.js +25 -0
- package/dist/jtbd/types.js.map +1 -0
- package/dist/model-prompting-skills.d.ts +45 -0
- package/dist/model-prompting-skills.d.ts.map +1 -0
- package/dist/model-prompting-skills.js +116 -0
- package/dist/model-prompting-skills.js.map +1 -0
- package/dist/network-guard.d.ts +50 -0
- package/dist/network-guard.d.ts.map +1 -0
- package/dist/network-guard.js +106 -0
- package/dist/network-guard.js.map +1 -0
- package/dist/normalize-model-properties.d.ts +26 -0
- package/dist/normalize-model-properties.d.ts.map +1 -0
- package/dist/normalize-model-properties.js +58 -0
- package/dist/normalize-model-properties.js.map +1 -0
- package/dist/output-format.d.ts +5 -1
- package/dist/output-format.d.ts.map +1 -1
- package/dist/output-format.js.map +1 -1
- package/dist/parallel-task-executor.d.ts +68 -37
- package/dist/parallel-task-executor.d.ts.map +1 -1
- package/dist/parallel-task-executor.js +234 -203
- package/dist/parallel-task-executor.js.map +1 -1
- package/dist/prompts/background-subtask-prompt.d.ts +14 -0
- package/dist/prompts/background-subtask-prompt.d.ts.map +1 -0
- package/dist/prompts/background-subtask-prompt.js +64 -0
- package/dist/prompts/background-subtask-prompt.js.map +1 -0
- package/dist/prompts/product-knowledge.d.ts +3 -0
- package/dist/prompts/product-knowledge.d.ts.map +1 -0
- package/dist/prompts/product-knowledge.js +79 -0
- package/dist/prompts/product-knowledge.js.map +1 -0
- package/dist/prompts/read-only-search-prompt.d.ts +33 -0
- package/dist/prompts/read-only-search-prompt.d.ts.map +1 -0
- package/dist/prompts/read-only-search-prompt.js +109 -0
- package/dist/prompts/read-only-search-prompt.js.map +1 -0
- package/dist/prompts/sandbox-pack-catalog.d.ts +23 -0
- package/dist/prompts/sandbox-pack-catalog.d.ts.map +1 -0
- package/dist/prompts/sandbox-pack-catalog.js +40 -0
- package/dist/prompts/sandbox-pack-catalog.js.map +1 -0
- package/dist/prompts/security-monitor-prompt.d.ts +32 -0
- package/dist/prompts/security-monitor-prompt.d.ts.map +1 -0
- package/dist/prompts/security-monitor-prompt.js +99 -0
- package/dist/prompts/security-monitor-prompt.js.map +1 -0
- package/dist/prompts/workflow-authoring-knowledge.d.ts +77 -0
- package/dist/prompts/workflow-authoring-knowledge.d.ts.map +1 -0
- package/dist/prompts/workflow-authoring-knowledge.js +319 -0
- package/dist/prompts/workflow-authoring-knowledge.js.map +1 -0
- package/dist/run-policy.d.ts +25 -0
- package/dist/run-policy.d.ts.map +1 -0
- package/dist/run-policy.js +54 -0
- package/dist/run-policy.js.map +1 -0
- package/dist/sandbox-av-media.d.ts +33 -0
- package/dist/sandbox-av-media.d.ts.map +1 -0
- package/dist/sandbox-av-media.js +666 -0
- package/dist/sandbox-av-media.js.map +1 -0
- package/dist/sandbox-bootstrap-modules.d.ts +54 -0
- package/dist/sandbox-bootstrap-modules.d.ts.map +1 -0
- package/dist/sandbox-bootstrap-modules.js +104 -0
- package/dist/sandbox-bootstrap-modules.js.map +1 -0
- package/dist/sandbox-bytes.d.ts +43 -0
- package/dist/sandbox-bytes.d.ts.map +1 -0
- package/dist/sandbox-bytes.js +61 -0
- package/dist/sandbox-bytes.js.map +1 -0
- package/dist/sandbox-canvas-api.d.ts +30 -0
- package/dist/sandbox-canvas-api.d.ts.map +1 -0
- package/dist/sandbox-canvas-api.js +81 -0
- package/dist/sandbox-canvas-api.js.map +1 -0
- package/dist/sandbox-constants.d.ts +5 -0
- package/dist/sandbox-constants.d.ts.map +1 -0
- package/dist/sandbox-constants.js +13 -0
- package/dist/sandbox-constants.js.map +1 -0
- package/dist/sandbox-json-transport.d.ts +107 -0
- package/dist/sandbox-json-transport.d.ts.map +1 -0
- package/dist/sandbox-json-transport.js +324 -0
- package/dist/sandbox-json-transport.js.map +1 -0
- package/dist/sandbox-media-handle.d.ts +78 -0
- package/dist/sandbox-media-handle.d.ts.map +1 -0
- package/dist/sandbox-media-handle.js +114 -0
- package/dist/sandbox-media-handle.js.map +1 -0
- package/dist/sandbox-media-ref.d.ts +134 -0
- package/dist/sandbox-media-ref.d.ts.map +1 -0
- package/dist/sandbox-media-ref.js +442 -0
- package/dist/sandbox-media-ref.js.map +1 -0
- package/dist/sandbox-media.d.ts +177 -0
- package/dist/sandbox-media.d.ts.map +1 -0
- package/dist/sandbox-media.js +963 -0
- package/dist/sandbox-media.js.map +1 -0
- package/dist/sandbox-module-fixtures.d.ts +445 -0
- package/dist/sandbox-module-fixtures.d.ts.map +1 -0
- package/dist/sandbox-module-fixtures.js +214 -0
- package/dist/sandbox-module-fixtures.js.map +1 -0
- package/dist/sandbox-toolbelt.d.ts +13 -0
- package/dist/sandbox-toolbelt.d.ts.map +1 -0
- package/dist/sandbox-toolbelt.js +64 -0
- package/dist/sandbox-toolbelt.js.map +1 -0
- package/dist/security-monitor.d.ts +89 -0
- package/dist/security-monitor.d.ts.map +1 -0
- package/dist/security-monitor.js +307 -0
- package/dist/security-monitor.js.map +1 -0
- package/dist/serpapi/catalog.d.ts +101 -0
- package/dist/serpapi/catalog.d.ts.map +1 -0
- package/dist/serpapi/catalog.js +246 -0
- package/dist/serpapi/catalog.js.map +1 -0
- package/dist/serpapi/client.d.ts +81 -0
- package/dist/serpapi/client.d.ts.map +1 -0
- package/dist/serpapi/client.js +228 -0
- package/dist/serpapi/client.js.map +1 -0
- package/dist/serpapi/errors.d.ts +49 -0
- package/dist/serpapi/errors.d.ts.map +1 -0
- package/dist/serpapi/errors.js +64 -0
- package/dist/serpapi/errors.js.map +1 -0
- package/dist/serpapi/normalize.d.ts +58 -0
- package/dist/serpapi/normalize.d.ts.map +1 -0
- package/dist/serpapi/normalize.js +140 -0
- package/dist/serpapi/normalize.js.map +1 -0
- package/dist/skill-prompt.d.ts +27 -0
- package/dist/skill-prompt.d.ts.map +1 -0
- package/dist/skill-prompt.js +61 -0
- package/dist/skill-prompt.js.map +1 -0
- package/dist/step-executor.d.ts +90 -77
- package/dist/step-executor.d.ts.map +1 -1
- package/dist/step-executor.js +384 -690
- package/dist/step-executor.js.map +1 -1
- package/dist/subagent.d.ts +275 -0
- package/dist/subagent.d.ts.map +1 -0
- package/dist/subagent.js +444 -0
- package/dist/subagent.js.map +1 -0
- package/dist/supervisor/prompt.d.ts +12 -0
- package/dist/supervisor/prompt.d.ts.map +1 -0
- package/dist/supervisor/prompt.js +51 -0
- package/dist/supervisor/prompt.js.map +1 -0
- package/dist/supervisor/supervisor-agent.d.ts +72 -0
- package/dist/supervisor/supervisor-agent.d.ts.map +1 -0
- package/dist/supervisor/supervisor-agent.js +185 -0
- package/dist/supervisor/supervisor-agent.js.map +1 -0
- package/dist/supervisor/tools.d.ts +56 -0
- package/dist/supervisor/tools.d.ts.map +1 -0
- package/dist/supervisor/tools.js +83 -0
- package/dist/supervisor/tools.js.map +1 -0
- package/dist/supervisor/verdict-schema.d.ts +18 -0
- package/dist/supervisor/verdict-schema.d.ts.map +1 -0
- package/dist/supervisor/verdict-schema.js +58 -0
- package/dist/supervisor/verdict-schema.js.map +1 -0
- package/dist/system-skills.d.ts +68 -0
- package/dist/system-skills.d.ts.map +1 -0
- package/dist/system-skills.js +168 -0
- package/dist/system-skills.js.map +1 -0
- package/dist/task-executor.d.ts +90 -40
- package/dist/task-executor.d.ts.map +1 -1
- package/dist/task-executor.js +259 -282
- package/dist/task-executor.js.map +1 -1
- package/dist/task-planner.d.ts +18 -12
- package/dist/task-planner.d.ts.map +1 -1
- package/dist/task-planner.js +342 -328
- package/dist/task-planner.js.map +1 -1
- package/dist/timeline-preview/compare.d.ts +27 -0
- package/dist/timeline-preview/compare.d.ts.map +1 -0
- package/dist/timeline-preview/compare.js +71 -0
- package/dist/timeline-preview/compare.js.map +1 -0
- package/dist/timeline-preview/frames.d.ts +167 -0
- package/dist/timeline-preview/frames.d.ts.map +1 -0
- package/dist/timeline-preview/frames.js +646 -0
- package/dist/timeline-preview/frames.js.map +1 -0
- package/dist/timeline-preview/model3d.d.ts +67 -0
- package/dist/timeline-preview/model3d.d.ts.map +1 -0
- package/dist/timeline-preview/model3d.js +165 -0
- package/dist/timeline-preview/model3d.js.map +1 -0
- package/dist/timeline-preview/rasterize.d.ts +33 -0
- package/dist/timeline-preview/rasterize.d.ts.map +1 -0
- package/dist/timeline-preview/rasterize.js +83 -0
- package/dist/timeline-preview/rasterize.js.map +1 -0
- package/dist/timeline-preview/sheet.d.ts +38 -0
- package/dist/timeline-preview/sheet.d.ts.map +1 -0
- package/dist/timeline-preview/sheet.js +72 -0
- package/dist/timeline-preview/sheet.js.map +1 -0
- package/dist/tools/asset-persist.d.ts +29 -0
- package/dist/tools/asset-persist.d.ts.map +1 -0
- package/dist/tools/asset-persist.js +78 -0
- package/dist/tools/asset-persist.js.map +1 -0
- package/dist/tools/base-tool.d.ts +52 -5
- package/dist/tools/base-tool.d.ts.map +1 -1
- package/dist/tools/base-tool.js +180 -3
- package/dist/tools/base-tool.js.map +1 -1
- package/dist/tools/binary-output.d.ts +54 -0
- package/dist/tools/binary-output.d.ts.map +1 -0
- package/dist/tools/binary-output.js +127 -0
- package/dist/tools/binary-output.js.map +1 -0
- package/dist/tools/browser-tools.d.ts +5 -29
- package/dist/tools/browser-tools.d.ts.map +1 -1
- package/dist/tools/browser-tools.js +5 -205
- package/dist/tools/browser-tools.js.map +1 -1
- package/dist/tools/builtin-tools.d.ts +52 -0
- package/dist/tools/builtin-tools.d.ts.map +1 -0
- package/dist/tools/builtin-tools.js +276 -0
- package/dist/tools/builtin-tools.js.map +1 -0
- package/dist/tools/control-tool.d.ts +2 -5
- package/dist/tools/control-tool.d.ts.map +1 -1
- package/dist/tools/control-tool.js +18 -15
- package/dist/tools/control-tool.js.map +1 -1
- package/dist/tools/dataseo-tools.d.ts +34 -32
- package/dist/tools/dataseo-tools.d.ts.map +1 -1
- package/dist/tools/dataseo-tools.js +148 -233
- package/dist/tools/dataseo-tools.js.map +1 -1
- package/dist/tools/external-capability-tools.d.ts +36 -0
- package/dist/tools/external-capability-tools.d.ts.map +1 -0
- package/dist/tools/external-capability-tools.js +41 -0
- package/dist/tools/external-capability-tools.js.map +1 -0
- package/dist/tools/external-mcp-tools.d.ts +139 -0
- package/dist/tools/external-mcp-tools.d.ts.map +1 -0
- package/dist/tools/external-mcp-tools.js +552 -0
- package/dist/tools/external-mcp-tools.js.map +1 -0
- package/dist/tools/finish-step-tool.d.ts +1 -1
- package/dist/tools/finish-step-tool.d.ts.map +1 -1
- package/dist/tools/finish-step-tool.js +3 -3
- package/dist/tools/finish-step-tool.js.map +1 -1
- package/dist/tools/google-tools.d.ts +28 -39
- package/dist/tools/google-tools.d.ts.map +1 -1
- package/dist/tools/google-tools.js +51 -164
- package/dist/tools/google-tools.js.map +1 -1
- package/dist/tools/google-workspace-tools.d.ts +23 -0
- package/dist/tools/google-workspace-tools.d.ts.map +1 -0
- package/dist/tools/google-workspace-tools.js +26 -0
- package/dist/tools/google-workspace-tools.js.map +1 -0
- package/dist/tools/graph-validation-registry.d.ts +33 -0
- package/dist/tools/graph-validation-registry.d.ts.map +1 -0
- package/dist/tools/graph-validation-registry.js +54 -0
- package/dist/tools/graph-validation-registry.js.map +1 -0
- package/dist/tools/http-tools.d.ts +5 -53
- package/dist/tools/http-tools.d.ts.map +1 -1
- package/dist/tools/http-tools.js +5 -177
- package/dist/tools/http-tools.js.map +1 -1
- package/dist/tools/image-injection.d.ts +51 -0
- package/dist/tools/image-injection.d.ts.map +1 -0
- package/dist/tools/image-injection.js +85 -0
- package/dist/tools/image-injection.js.map +1 -0
- package/dist/tools/mcp-tool-support.d.ts +203 -0
- package/dist/tools/mcp-tool-support.d.ts.map +1 -0
- package/dist/tools/mcp-tool-support.js +536 -0
- package/dist/tools/mcp-tool-support.js.map +1 -0
- package/dist/tools/mcp-tools.d.ts +104 -390
- package/dist/tools/mcp-tools.d.ts.map +1 -1
- package/dist/tools/mcp-tools.js +128 -600
- package/dist/tools/mcp-tools.js.map +1 -1
- package/dist/tools/media-tools.d.ts +9 -272
- package/dist/tools/media-tools.d.ts.map +1 -1
- package/dist/tools/media-tools.js +11 -676
- package/dist/tools/media-tools.js.map +1 -1
- package/dist/tools/memory-tools.d.ts +36 -0
- package/dist/tools/memory-tools.d.ts.map +1 -0
- package/dist/tools/memory-tools.js +52 -0
- package/dist/tools/memory-tools.js.map +1 -0
- package/dist/tools/openai-tools.d.ts +28 -68
- package/dist/tools/openai-tools.d.ts.map +1 -1
- package/dist/tools/openai-tools.js +51 -181
- package/dist/tools/openai-tools.js.map +1 -1
- package/dist/tools/plan-builder-tools.d.ts +141 -7
- package/dist/tools/plan-builder-tools.d.ts.map +1 -1
- package/dist/tools/plan-builder-tools.js +159 -86
- package/dist/tools/plan-builder-tools.js.map +1 -1
- package/dist/tools/run-search-tool.d.ts +82 -0
- package/dist/tools/run-search-tool.d.ts.map +1 -0
- package/dist/tools/run-search-tool.js +121 -0
- package/dist/tools/run-search-tool.js.map +1 -0
- package/dist/tools/run-subtask-tool.d.ts +49 -0
- package/dist/tools/run-subtask-tool.d.ts.map +1 -0
- package/dist/tools/run-subtask-tool.js +88 -0
- package/dist/tools/run-subtask-tool.js.map +1 -0
- package/dist/tools/search-tools.d.ts +5 -36
- package/dist/tools/search-tools.d.ts.map +1 -1
- package/dist/tools/search-tools.js +5 -215
- package/dist/tools/search-tools.js.map +1 -1
- package/dist/tools/serp-providers/apify-provider.d.ts +18 -0
- package/dist/tools/serp-providers/apify-provider.d.ts.map +1 -0
- package/dist/tools/serp-providers/apify-provider.js +93 -0
- package/dist/tools/serp-providers/apify-provider.js.map +1 -0
- package/dist/tools/serp-providers/brave-provider.d.ts +34 -0
- package/dist/tools/serp-providers/brave-provider.d.ts.map +1 -0
- package/dist/tools/serp-providers/brave-provider.js +86 -0
- package/dist/tools/serp-providers/brave-provider.js.map +1 -0
- package/dist/tools/serp-providers/dataforseo-provider.d.ts +14 -1
- package/dist/tools/serp-providers/dataforseo-provider.d.ts.map +1 -1
- package/dist/tools/serp-providers/dataforseo-provider.js +0 -9
- package/dist/tools/serp-providers/dataforseo-provider.js.map +1 -1
- package/dist/tools/serp-providers/gemini-provider.d.ts +45 -0
- package/dist/tools/serp-providers/gemini-provider.d.ts.map +1 -0
- package/dist/tools/serp-providers/gemini-provider.js +148 -0
- package/dist/tools/serp-providers/gemini-provider.js.map +1 -0
- package/dist/tools/serp-providers/index.d.ts +61 -0
- package/dist/tools/serp-providers/index.d.ts.map +1 -1
- package/dist/tools/serp-providers/index.js +119 -3
- package/dist/tools/serp-providers/index.js.map +1 -1
- package/dist/tools/serp-providers/openai-provider.d.ts +58 -0
- package/dist/tools/serp-providers/openai-provider.d.ts.map +1 -0
- package/dist/tools/serp-providers/openai-provider.js +113 -0
- package/dist/tools/serp-providers/openai-provider.js.map +1 -0
- package/dist/tools/serp-providers/serpapi-provider.d.ts +9 -5
- package/dist/tools/serp-providers/serpapi-provider.d.ts.map +1 -1
- package/dist/tools/serp-providers/serpapi-provider.js +26 -44
- package/dist/tools/serp-providers/serpapi-provider.js.map +1 -1
- package/dist/tools/serp-tool-factory.d.ts +27 -0
- package/dist/tools/serp-tool-factory.d.ts.map +1 -0
- package/dist/tools/serp-tool-factory.js +56 -0
- package/dist/tools/serp-tool-factory.js.map +1 -0
- package/dist/tools/shared-tools.d.ts +33 -0
- package/dist/tools/shared-tools.d.ts.map +1 -0
- package/dist/tools/shared-tools.js +39 -0
- package/dist/tools/shared-tools.js.map +1 -0
- package/dist/tools/start-subtask-tool.d.ts +51 -0
- package/dist/tools/start-subtask-tool.d.ts.map +1 -0
- package/dist/tools/start-subtask-tool.js +189 -0
- package/dist/tools/start-subtask-tool.js.map +1 -0
- package/dist/tools/submit-code-tool.d.ts +159 -0
- package/dist/tools/submit-code-tool.d.ts.map +1 -0
- package/dist/tools/submit-code-tool.js +209 -0
- package/dist/tools/submit-code-tool.js.map +1 -0
- package/dist/tools/subtask-fields.d.ts +11 -0
- package/dist/tools/subtask-fields.d.ts.map +1 -0
- package/dist/tools/subtask-fields.js +11 -0
- package/dist/tools/subtask-fields.js.map +1 -0
- package/dist/tools/todo-tools.d.ts +15 -0
- package/dist/tools/todo-tools.d.ts.map +1 -0
- package/dist/tools/todo-tools.js +15 -0
- package/dist/tools/todo-tools.js.map +1 -0
- package/dist/tools/tool-permissions.d.ts +40 -0
- package/dist/tools/tool-permissions.d.ts.map +1 -0
- package/dist/tools/tool-permissions.js +52 -0
- package/dist/tools/tool-permissions.js.map +1 -0
- package/dist/tools/tool-search.d.ts +39 -0
- package/dist/tools/tool-search.d.ts.map +1 -0
- package/dist/tools/tool-search.js +108 -0
- package/dist/tools/tool-search.js.map +1 -0
- package/dist/tools/vector-tool-support.d.ts +15 -0
- package/dist/tools/vector-tool-support.d.ts.map +1 -0
- package/dist/tools/vector-tool-support.js +133 -0
- package/dist/tools/vector-tool-support.js.map +1 -0
- package/dist/tools/vector-tools.d.ts +13 -220
- package/dist/tools/vector-tools.d.ts.map +1 -1
- package/dist/tools/vector-tools.js +7 -578
- package/dist/tools/vector-tools.js.map +1 -1
- package/dist/tools/wait-subtasks-tool.d.ts +27 -0
- package/dist/tools/wait-subtasks-tool.d.ts.map +1 -0
- package/dist/tools/wait-subtasks-tool.js +66 -0
- package/dist/tools/wait-subtasks-tool.js.map +1 -0
- package/dist/tsconfig.tests.tmp.tsbuildinfo +1 -0
- package/dist/types.d.ts +16 -31
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +8 -1
- package/dist/types.js.map +1 -1
- package/dist/utils/dag-scheduler.d.ts +85 -0
- package/dist/utils/dag-scheduler.d.ts.map +1 -0
- package/dist/utils/dag-scheduler.js +180 -0
- package/dist/utils/dag-scheduler.js.map +1 -0
- package/dist/utils/json-parser.d.ts +32 -1
- package/dist/utils/json-parser.d.ts.map +1 -1
- package/dist/utils/json-parser.js +145 -10
- package/dist/utils/json-parser.js.map +1 -1
- package/dist/utils/json-schema-validate.d.ts +29 -0
- package/dist/utils/json-schema-validate.d.ts.map +1 -0
- package/dist/utils/json-schema-validate.js +228 -0
- package/dist/utils/json-schema-validate.js.map +1 -0
- package/dist/utils/link-abort.d.ts +13 -0
- package/dist/utils/link-abort.d.ts.map +1 -0
- package/dist/utils/link-abort.js +23 -0
- package/dist/utils/link-abort.js.map +1 -0
- package/dist/utils/merge-generators.d.ts +58 -0
- package/dist/utils/merge-generators.d.ts.map +1 -0
- package/dist/utils/merge-generators.js +148 -0
- package/dist/utils/merge-generators.js.map +1 -0
- package/dist/utils/remove-base64-images.d.ts +0 -5
- package/dist/utils/remove-base64-images.d.ts.map +1 -1
- package/dist/utils/remove-base64-images.js.map +1 -1
- package/dist/utils/step-failure.d.ts +20 -0
- package/dist/utils/step-failure.d.ts.map +1 -0
- package/dist/utils/step-failure.js +43 -0
- package/dist/utils/step-failure.js.map +1 -0
- package/dist/utils/think-tags.d.ts +16 -0
- package/dist/utils/think-tags.d.ts.map +1 -0
- package/dist/utils/think-tags.js +23 -0
- package/dist/utils/think-tags.js.map +1 -0
- package/dist/utils/type-guards.d.ts +26 -0
- package/dist/utils/type-guards.d.ts.map +1 -0
- package/dist/utils/type-guards.js +44 -0
- package/dist/utils/type-guards.js.map +1 -0
- package/dist/utils/ui-event-buffer.d.ts +18 -0
- package/dist/utils/ui-event-buffer.d.ts.map +1 -0
- package/dist/utils/ui-event-buffer.js +18 -0
- package/dist/utils/ui-event-buffer.js.map +1 -0
- package/dist/utils/wrap-generators-parallel.d.ts +0 -5
- package/dist/utils/wrap-generators-parallel.d.ts.map +1 -1
- package/dist/utils/wrap-generators-parallel.js +3 -6
- package/dist/utils/wrap-generators-parallel.js.map +1 -1
- package/dist/wasm-sandbox/host.d.ts +106 -0
- package/dist/wasm-sandbox/host.d.ts.map +1 -0
- package/dist/wasm-sandbox/host.js +409 -0
- package/dist/wasm-sandbox/host.js.map +1 -0
- package/dist/wasm-sandbox/workers.d.ts +43 -0
- package/dist/wasm-sandbox/workers.d.ts.map +1 -0
- package/dist/wasm-sandbox/workers.js +150 -0
- package/dist/wasm-sandbox/workers.js.map +1 -0
- package/dist/workspace-paths.d.ts +40 -0
- package/dist/workspace-paths.d.ts.map +1 -0
- package/dist/workspace-paths.js +102 -0
- package/dist/workspace-paths.js.map +1 -0
- package/dist/yt-dlp-gate.d.ts +19 -0
- package/dist/yt-dlp-gate.d.ts.map +1 -0
- package/dist/yt-dlp-gate.js +22 -0
- package/dist/yt-dlp-gate.js.map +1 -0
- package/package.json +112 -14
- package/dist/agent-executor.d.ts +0 -62
- package/dist/agent-executor.d.ts.map +0 -1
- package/dist/agent-executor.js +0 -324
- package/dist/agent-executor.js.map +0 -1
- package/dist/agent-step-executor.d.ts +0 -28
- package/dist/agent-step-executor.d.ts.map +0 -1
- package/dist/agent-step-executor.js +0 -99
- package/dist/agent-step-executor.js.map +0 -1
- package/dist/agent-workflow-runner.d.ts +0 -31
- package/dist/agent-workflow-runner.d.ts.map +0 -1
- package/dist/agent-workflow-runner.js +0 -124
- package/dist/agent-workflow-runner.js.map +0 -1
- package/dist/agent.d.ts +0 -115
- package/dist/agent.d.ts.map +0 -1
- package/dist/agent.js +0 -587
- package/dist/agent.js.map +0 -1
- package/dist/base-agent.d.ts +0 -42
- package/dist/base-agent.d.ts.map +0 -1
- package/dist/base-agent.js +0 -29
- package/dist/base-agent.js.map +0 -1
- package/dist/graph-planner.d.ts +0 -56
- package/dist/graph-planner.d.ts.map +0 -1
- package/dist/graph-planner.js +0 -311
- package/dist/graph-planner.js.map +0 -1
- package/dist/multi-mode-agent.d.ts +0 -86
- package/dist/multi-mode-agent.d.ts.map +0 -1
- package/dist/multi-mode-agent.js +0 -476
- package/dist/multi-mode-agent.js.map +0 -1
- package/dist/prompts/graph-planner-prompt.d.ts +0 -48
- package/dist/prompts/graph-planner-prompt.d.ts.map +0 -1
- package/dist/prompts/graph-planner-prompt.js +0 -180
- package/dist/prompts/graph-planner-prompt.js.map +0 -1
- package/dist/reject-agentic-provider.d.ts +0 -21
- package/dist/reject-agentic-provider.d.ts.map +0 -1
- package/dist/reject-agentic-provider.js +0 -32
- package/dist/reject-agentic-provider.js.map +0 -1
- package/dist/simple-agent.d.ts +0 -29
- package/dist/simple-agent.d.ts.map +0 -1
- package/dist/simple-agent.js +0 -54
- package/dist/simple-agent.js.map +0 -1
- package/dist/sub-agent-planner.d.ts +0 -33
- package/dist/sub-agent-planner.d.ts.map +0 -1
- package/dist/sub-agent-planner.js +0 -203
- package/dist/sub-agent-planner.js.map +0 -1
- package/dist/team/db-task-board.d.ts +0 -54
- package/dist/team/db-task-board.d.ts.map +0 -1
- package/dist/team/db-task-board.js +0 -361
- package/dist/team/db-task-board.js.map +0 -1
- package/dist/team/edge-message-bus.d.ts +0 -51
- package/dist/team/edge-message-bus.d.ts.map +0 -1
- package/dist/team/edge-message-bus.js +0 -169
- package/dist/team/edge-message-bus.js.map +0 -1
- package/dist/team/edge-task-board.d.ts +0 -77
- package/dist/team/edge-task-board.d.ts.map +0 -1
- package/dist/team/edge-task-board.js +0 -140
- package/dist/team/edge-task-board.js.map +0 -1
- package/dist/team/index.d.ts +0 -16
- package/dist/team/index.d.ts.map +0 -1
- package/dist/team/index.js +0 -17
- package/dist/team/index.js.map +0 -1
- package/dist/team/message-bus.d.ts +0 -58
- package/dist/team/message-bus.d.ts.map +0 -1
- package/dist/team/message-bus.js +0 -151
- package/dist/team/message-bus.js.map +0 -1
- package/dist/team/task-board.d.ts +0 -106
- package/dist/team/task-board.d.ts.map +0 -1
- package/dist/team/task-board.js +0 -370
- package/dist/team/task-board.js.map +0 -1
- package/dist/team/team-executor.d.ts +0 -72
- package/dist/team/team-executor.d.ts.map +0 -1
- package/dist/team/team-executor.js +0 -466
- package/dist/team/team-executor.js.map +0 -1
- package/dist/team/team-tools.d.ts +0 -252
- package/dist/team/team-tools.d.ts.map +0 -1
- package/dist/team/team-tools.js +0 -412
- package/dist/team/team-tools.js.map +0 -1
- package/dist/team/types.d.ts +0 -198
- package/dist/team/types.d.ts.map +0 -1
- package/dist/team/types.js +0 -8
- package/dist/team/types.js.map +0 -1
- package/dist/tools/add-edge-tool.d.ts +0 -18
- package/dist/tools/add-edge-tool.d.ts.map +0 -1
- package/dist/tools/add-edge-tool.js +0 -92
- package/dist/tools/add-edge-tool.js.map +0 -1
- package/dist/tools/add-node-tool.d.ts +0 -22
- package/dist/tools/add-node-tool.d.ts.map +0 -1
- package/dist/tools/add-node-tool.js +0 -128
- package/dist/tools/add-node-tool.js.map +0 -1
- package/dist/tools/asset-tools.d.ts +0 -58
- package/dist/tools/asset-tools.d.ts.map +0 -1
- package/dist/tools/asset-tools.js +0 -191
- package/dist/tools/asset-tools.js.map +0 -1
- package/dist/tools/calculator-tool.d.ts +0 -24
- package/dist/tools/calculator-tool.d.ts.map +0 -1
- package/dist/tools/calculator-tool.js +0 -64
- package/dist/tools/calculator-tool.js.map +0 -1
- package/dist/tools/claude-code-tools.d.ts +0 -96
- package/dist/tools/claude-code-tools.d.ts.map +0 -1
- package/dist/tools/claude-code-tools.js +0 -463
- package/dist/tools/claude-code-tools.js.map +0 -1
- package/dist/tools/code-tools.d.ts +0 -26
- package/dist/tools/code-tools.d.ts.map +0 -1
- package/dist/tools/code-tools.js +0 -82
- package/dist/tools/code-tools.js.map +0 -1
- package/dist/tools/create-plan-tool.d.ts +0 -29
- package/dist/tools/create-plan-tool.d.ts.map +0 -1
- package/dist/tools/create-plan-tool.js +0 -355
- package/dist/tools/create-plan-tool.js.map +0 -1
- package/dist/tools/create-task-tool.d.ts +0 -28
- package/dist/tools/create-task-tool.d.ts.map +0 -1
- package/dist/tools/create-task-tool.js +0 -254
- package/dist/tools/create-task-tool.js.map +0 -1
- package/dist/tools/email-tools.d.ts +0 -76
- package/dist/tools/email-tools.d.ts.map +0 -1
- package/dist/tools/email-tools.js +0 -259
- package/dist/tools/email-tools.js.map +0 -1
- package/dist/tools/filesystem-tools.d.ts +0 -77
- package/dist/tools/filesystem-tools.d.ts.map +0 -1
- package/dist/tools/filesystem-tools.js +0 -334
- package/dist/tools/filesystem-tools.js.map +0 -1
- package/dist/tools/find-model-tool.d.ts +0 -25
- package/dist/tools/find-model-tool.d.ts.map +0 -1
- package/dist/tools/find-model-tool.js +0 -236
- package/dist/tools/find-model-tool.js.map +0 -1
- package/dist/tools/finish-graph-tool.d.ts +0 -23
- package/dist/tools/finish-graph-tool.d.ts.map +0 -1
- package/dist/tools/finish-graph-tool.js +0 -46
- package/dist/tools/finish-graph-tool.js.map +0 -1
- package/dist/tools/js-code-tool.d.ts +0 -30
- package/dist/tools/js-code-tool.d.ts.map +0 -1
- package/dist/tools/js-code-tool.js +0 -98
- package/dist/tools/js-code-tool.js.map +0 -1
- package/dist/tools/local-get-node-info-tool.d.ts +0 -19
- package/dist/tools/local-get-node-info-tool.d.ts.map +0 -1
- package/dist/tools/local-get-node-info-tool.js +0 -75
- package/dist/tools/local-get-node-info-tool.js.map +0 -1
- package/dist/tools/local-list-nodes-tool.d.ts +0 -19
- package/dist/tools/local-list-nodes-tool.d.ts.map +0 -1
- package/dist/tools/local-list-nodes-tool.js +0 -69
- package/dist/tools/local-list-nodes-tool.js.map +0 -1
- package/dist/tools/local-search-nodes-tool.d.ts +0 -21
- package/dist/tools/local-search-nodes-tool.d.ts.map +0 -1
- package/dist/tools/local-search-nodes-tool.js +0 -111
- package/dist/tools/local-search-nodes-tool.js.map +0 -1
- package/dist/tools/math-tools.d.ts +0 -156
- package/dist/tools/math-tools.d.ts.map +0 -1
- package/dist/tools/math-tools.js +0 -422
- package/dist/tools/math-tools.js.map +0 -1
- package/dist/tools/model-tools.d.ts +0 -25
- package/dist/tools/model-tools.d.ts.map +0 -1
- package/dist/tools/model-tools.js +0 -48
- package/dist/tools/model-tools.js.map +0 -1
- package/dist/tools/pdf-tools.d.ts +0 -152
- package/dist/tools/pdf-tools.d.ts.map +0 -1
- package/dist/tools/pdf-tools.js +0 -339
- package/dist/tools/pdf-tools.js.map +0 -1
- package/dist/tools/tool-registry.d.ts +0 -9
- package/dist/tools/tool-registry.d.ts.map +0 -1
- package/dist/tools/tool-registry.js +0 -17
- package/dist/tools/tool-registry.js.map +0 -1
- package/dist/tools/workspace-tools.d.ts +0 -58
- package/dist/tools/workspace-tools.d.ts.map +0 -1
- package/dist/tools/workspace-tools.js +0 -152
- package/dist/tools/workspace-tools.js.map +0 -1
|
@@ -0,0 +1,1789 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `scripts` capability module.
|
|
3
|
+
*
|
|
4
|
+
* Five capabilities that used to be five `Tool` subclasses in
|
|
5
|
+
* `../tools/script-voice-tools.ts`: reading a script, voicing its lines through
|
|
6
|
+
* the TTS provider, assembling the voiced takes into a timeline sequence, and
|
|
7
|
+
* writing the lines in the first place.
|
|
8
|
+
*
|
|
9
|
+
* Wire names, descriptions and schemas are unchanged, and `voice_script_lines`
|
|
10
|
+
* still delegates to `GenerateSpeechTool` — the one code path that knows how to
|
|
11
|
+
* ask a provider for encoded audio and fall back to the streaming route.
|
|
12
|
+
*
|
|
13
|
+
* The voice rule (`effectiveVoice`), the staleness rule (`needsVoicing`) and
|
|
14
|
+
* the script → timeline mapping (`buildScriptTimeline`) come from
|
|
15
|
+
* `@nodetool-ai/timeline`, the same module the editor and the nodes use, so a
|
|
16
|
+
* headlessly voiced script matches one voiced in the UI. Every heavy dependency
|
|
17
|
+
* is imported inside the implementation that needs it.
|
|
18
|
+
*
|
|
19
|
+
* Design: docs/tool-class-retirement-design.md § "Migration".
|
|
20
|
+
*/
|
|
21
|
+
import { isFunction, isNonBlankString, isNonEmptyString, isNumber, isObjectLike, isRecord, isString } from "../utils/type-guards.js";
|
|
22
|
+
import { UNGATED, createCapabilityRun } from "./invoke.js";
|
|
23
|
+
import { stampScriptStoryboardId } from "./script-link.js";
|
|
24
|
+
import { listScriptsSpec, createScriptSpec, getScriptSpec, voiceScriptLinesSpec, assembleScriptTimelineSpec, editScriptSpec, writeScriptSpec, deriveStoryboardFromScriptSpec, DEFAULT_ASR_PROVIDER, DEFAULT_ASR_MODEL, deleteScriptSpec } from "./scripts.specs.js";
|
|
25
|
+
import { clampConcurrency, mapWithConcurrency } from "./concurrency.js";
|
|
26
|
+
import { resolveProjectId } from "./project-scope.js";
|
|
27
|
+
/** Lines one call may voice, so a whole-script call cannot run away. */
|
|
28
|
+
const MAX_LINES_PER_CALL = 60;
|
|
29
|
+
/** Tokens the writer may spend on one script. */
|
|
30
|
+
const MAX_WRITER_TOKENS = 8192;
|
|
31
|
+
/** The length a script is written to when no step wrote one. */
|
|
32
|
+
const DEFAULT_SCRIPT_SECONDS = 60;
|
|
33
|
+
/** The guided-setup stages, in order. Mirrors `scriptSetupStage`. */
|
|
34
|
+
const SETUP_STAGES = [
|
|
35
|
+
"idea",
|
|
36
|
+
"format",
|
|
37
|
+
"review",
|
|
38
|
+
"voices",
|
|
39
|
+
"done"
|
|
40
|
+
];
|
|
41
|
+
/** The reading paces a script can be written and estimated at. */
|
|
42
|
+
const SETUP_PACES = ["slow", "normal", "fast"];
|
|
43
|
+
/** Attempts to land a document write: the first try plus one re-read-and-reapply (ADR 0001). */
|
|
44
|
+
const CAS_ATTEMPTS = 2;
|
|
45
|
+
const isError = (value) => !!value &&
|
|
46
|
+
typeof value === "object" &&
|
|
47
|
+
typeof value.error === "string";
|
|
48
|
+
const errorMessage = (e) => e instanceof Error ? e.message : String(e);
|
|
49
|
+
async function loadScript(run, scriptId) {
|
|
50
|
+
if (!isNonEmptyString(scriptId)) {
|
|
51
|
+
return { error: "script_id is required (use list_scripts to find one)." };
|
|
52
|
+
}
|
|
53
|
+
const { Script } = await import("@nodetool-ai/models");
|
|
54
|
+
const row = await Script.findById(scriptId);
|
|
55
|
+
// A script owned by someone else reads as missing — the same rule the tRPC
|
|
56
|
+
// router's ownership check applies.
|
|
57
|
+
if (!row || row.user_id !== run.context.userId) {
|
|
58
|
+
return { error: `Script ${scriptId} was not found.` };
|
|
59
|
+
}
|
|
60
|
+
return { row, doc: row.toDocument() };
|
|
61
|
+
}
|
|
62
|
+
/** Resolve a line reference: line id, 0-based reading-order index, or its text. */
|
|
63
|
+
function findLine(lines, target) {
|
|
64
|
+
const byId = lines.find((l) => l.id === target);
|
|
65
|
+
if (byId)
|
|
66
|
+
return byId;
|
|
67
|
+
const index = Number(target);
|
|
68
|
+
if (Number.isInteger(index) && index >= 0 && index < lines.length) {
|
|
69
|
+
return lines[index];
|
|
70
|
+
}
|
|
71
|
+
const text = target.trim().toLowerCase();
|
|
72
|
+
return lines.find((l) => l.text.trim().toLowerCase() === text);
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Append a take to one line and persist the script.
|
|
76
|
+
*
|
|
77
|
+
* Lines are voiced concurrently against a single row, so the write is a CAS on
|
|
78
|
+
* `updated_at`: on conflict the row is re-read and the take appended to the
|
|
79
|
+
* fresher document, never to the stale copy the synthesis started from.
|
|
80
|
+
*/
|
|
81
|
+
async function appendTake(scriptId, lineId, take) {
|
|
82
|
+
const { Script } = await import("@nodetool-ai/models");
|
|
83
|
+
for (let attempt = 0; attempt < CAS_ATTEMPTS; attempt++) {
|
|
84
|
+
const row = await Script.findById(scriptId);
|
|
85
|
+
if (!row)
|
|
86
|
+
return { error: `Script ${scriptId} was not found.` };
|
|
87
|
+
const doc = row.toDocument();
|
|
88
|
+
let updated;
|
|
89
|
+
const sections = doc.sections.map((section) => ({
|
|
90
|
+
...section,
|
|
91
|
+
lines: section.lines.map((line) => {
|
|
92
|
+
if (line.id !== lineId)
|
|
93
|
+
return line;
|
|
94
|
+
updated = {
|
|
95
|
+
...line,
|
|
96
|
+
takes: [...line.takes, take],
|
|
97
|
+
currentTakeId: take.id
|
|
98
|
+
};
|
|
99
|
+
return updated;
|
|
100
|
+
})
|
|
101
|
+
}));
|
|
102
|
+
if (!updated)
|
|
103
|
+
return { error: `Line ${lineId} is no longer in the script.` };
|
|
104
|
+
const saved = await Script.updateFieldsIfUnchanged(scriptId, row.updated_at, { document: JSON.stringify({ ...doc, sections }) },
|
|
105
|
+
// The take op rides on the write so an open editor merges this into its
|
|
106
|
+
// draft per line instead of treating the whole script as replaced.
|
|
107
|
+
{
|
|
108
|
+
ops: [
|
|
109
|
+
{
|
|
110
|
+
tool: "append_take",
|
|
111
|
+
input: { line_id: lineId, take_id: take.id }
|
|
112
|
+
}
|
|
113
|
+
]
|
|
114
|
+
});
|
|
115
|
+
if (saved)
|
|
116
|
+
return updated;
|
|
117
|
+
}
|
|
118
|
+
return {
|
|
119
|
+
error: `Script ${scriptId} is being modified concurrently; the take was synthesized but could not be saved. Retry the call.`
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Duration of the synthesized audio.
|
|
124
|
+
*
|
|
125
|
+
* ffprobe is the accurate answer and is what the editor's browser probe and the
|
|
126
|
+
* VoiceScript node both effectively measure. When it is unavailable (no ffmpeg
|
|
127
|
+
* on PATH), the last word timing is a close second, and the placeholder is the
|
|
128
|
+
* floor — a take is still playable and still assemblable without an exact
|
|
129
|
+
* length.
|
|
130
|
+
*/
|
|
131
|
+
async function measureDurationMs(bytes, words) {
|
|
132
|
+
const { execFile: execFileCb } = await import("node:child_process");
|
|
133
|
+
const { promisify } = await import("node:util");
|
|
134
|
+
const { promises: fs } = await import("node:fs");
|
|
135
|
+
const os = await import("node:os");
|
|
136
|
+
const path = await import("node:path");
|
|
137
|
+
const { PLACEHOLDER_LINE_MS } = await import("@nodetool-ai/timeline");
|
|
138
|
+
const execFile = promisify(execFileCb);
|
|
139
|
+
const dir = await fs.mkdtemp(path.join(os.tmpdir(), "nodetool-voice-"));
|
|
140
|
+
const file = path.join(dir, "take");
|
|
141
|
+
try {
|
|
142
|
+
await fs.writeFile(file, bytes);
|
|
143
|
+
const { stdout } = await execFile("ffprobe", [
|
|
144
|
+
"-v",
|
|
145
|
+
"error",
|
|
146
|
+
"-show_entries",
|
|
147
|
+
"format=duration",
|
|
148
|
+
"-of",
|
|
149
|
+
"default=noprint_wrappers=1:nokey=1",
|
|
150
|
+
file
|
|
151
|
+
]);
|
|
152
|
+
const seconds = parseFloat(stdout.trim());
|
|
153
|
+
if (Number.isFinite(seconds) && seconds > 0) {
|
|
154
|
+
return Math.round(seconds * 1000);
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
catch {
|
|
158
|
+
// ffprobe missing or unreadable output — fall through to the estimates.
|
|
159
|
+
}
|
|
160
|
+
finally {
|
|
161
|
+
await fs.rm(dir, { recursive: true, force: true });
|
|
162
|
+
}
|
|
163
|
+
const lastWordEnd = words.length > 0 ? words[words.length - 1].endMs : 0;
|
|
164
|
+
return lastWordEnd > 0 ? lastWordEnd : PLACEHOLDER_LINE_MS;
|
|
165
|
+
}
|
|
166
|
+
/** Word timings for a take. Best-effort: a failed pass leaves the take playable. */
|
|
167
|
+
async function transcribeWords(context, audio, provider, model) {
|
|
168
|
+
try {
|
|
169
|
+
const asr = await context.getProvider(provider);
|
|
170
|
+
const result = await asr.automaticSpeechRecognition({
|
|
171
|
+
audio,
|
|
172
|
+
model,
|
|
173
|
+
word_timestamps: true
|
|
174
|
+
});
|
|
175
|
+
return (result.chunks ?? [])
|
|
176
|
+
.map((chunk) => ({
|
|
177
|
+
word: chunk.text.trim(),
|
|
178
|
+
startMs: Math.round(chunk.timestamp[0] * 1000),
|
|
179
|
+
endMs: Math.round(chunk.timestamp[1] * 1000)
|
|
180
|
+
}))
|
|
181
|
+
.filter((w) => w.word.length > 0);
|
|
182
|
+
}
|
|
183
|
+
catch {
|
|
184
|
+
return [];
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
/** The voicing state of a line, as the editor's gutter shows it. */
|
|
188
|
+
function lineStatus(line, voice, helpers) {
|
|
189
|
+
if (!voice)
|
|
190
|
+
return "no_voice";
|
|
191
|
+
if (!helpers.currentTake(line))
|
|
192
|
+
return "draft";
|
|
193
|
+
return helpers.needsVoicing(line, voice) ? "stale" : "voiced";
|
|
194
|
+
}
|
|
195
|
+
const EMPTY_LINK = {
|
|
196
|
+
linked: false,
|
|
197
|
+
storyboard_id: null,
|
|
198
|
+
orphan_line_ids: [],
|
|
199
|
+
drifted_shot_ids: [],
|
|
200
|
+
shot_id_by_line_id: {},
|
|
201
|
+
issues: []
|
|
202
|
+
};
|
|
203
|
+
/**
|
|
204
|
+
* The board this script points at, and what its link looks like now.
|
|
205
|
+
*
|
|
206
|
+
* The board owns the link (design §1.1) and `scripts.storyboard_id` is the
|
|
207
|
+
* back-pointer (design §1.2), so this is one read by id. A pointer at a board
|
|
208
|
+
* that is gone, or at one that no longer names this script, is reported as an
|
|
209
|
+
* issue rather than silently dropped — the script still works, only the link
|
|
210
|
+
* affordances do not.
|
|
211
|
+
*/
|
|
212
|
+
async function storyboardLinkFor(userId, storyboardId, scriptId, doc) {
|
|
213
|
+
if (!userId || !storyboardId)
|
|
214
|
+
return EMPTY_LINK;
|
|
215
|
+
const { Storyboard } = await import("@nodetool-ai/models");
|
|
216
|
+
const { orphanedLineIds, shotDialogueDrifted, validateScriptLink } = await import("@nodetool-ai/protocol");
|
|
217
|
+
const stale = (message) => ({
|
|
218
|
+
...EMPTY_LINK,
|
|
219
|
+
storyboard_id: storyboardId,
|
|
220
|
+
issues: [message]
|
|
221
|
+
});
|
|
222
|
+
const board = await Storyboard.findById(storyboardId);
|
|
223
|
+
if (!board || board.user_id !== userId) {
|
|
224
|
+
return stale(`Storyboard ${storyboardId} is no longer available, so the script's back-pointer is stale.`);
|
|
225
|
+
}
|
|
226
|
+
const boardDoc = board.toDocument();
|
|
227
|
+
if (boardDoc.screenplay?.script_id !== scriptId) {
|
|
228
|
+
return stale(`Storyboard ${storyboardId} does not link this script back, so the back-pointer is stale.`);
|
|
229
|
+
}
|
|
230
|
+
const screenplay = {
|
|
231
|
+
...boardDoc.screenplay,
|
|
232
|
+
shots: boardDoc.shots
|
|
233
|
+
};
|
|
234
|
+
const scriptDoc = { sections: doc.sections };
|
|
235
|
+
const linesById = new Map(doc.sections.flatMap((section) => section.lines.map((line) => [line.id, line])));
|
|
236
|
+
const shotIdByLineId = {};
|
|
237
|
+
for (const shot of screenplay.shots) {
|
|
238
|
+
for (const lineId of shot.script_line_ids ?? []) {
|
|
239
|
+
shotIdByLineId[lineId] = shot.id;
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
const validation = validateScriptLink(screenplay, scriptDoc);
|
|
243
|
+
return {
|
|
244
|
+
linked: true,
|
|
245
|
+
storyboard_id: board.id,
|
|
246
|
+
orphan_line_ids: orphanedLineIds(screenplay, scriptDoc),
|
|
247
|
+
drifted_shot_ids: screenplay.shots
|
|
248
|
+
.filter((shot) => shotDialogueDrifted(shot, linesById))
|
|
249
|
+
.map((shot) => shot.id),
|
|
250
|
+
shot_id_by_line_id: shotIdByLineId,
|
|
251
|
+
issues: [...validation.errors, ...validation.warnings].map((issue) => issue.message)
|
|
252
|
+
};
|
|
253
|
+
}
|
|
254
|
+
const listScripts = {
|
|
255
|
+
spec: listScriptsSpec,
|
|
256
|
+
impl: async (run, params) => {
|
|
257
|
+
const userId = run.context.userId;
|
|
258
|
+
if (!userId)
|
|
259
|
+
return { error: "No user is bound to this session." };
|
|
260
|
+
const { Script } = await import("@nodetool-ai/models");
|
|
261
|
+
const { currentTake, effectiveVoice, needsVoicing, scriptLines } = await import("@nodetool-ai/timeline");
|
|
262
|
+
const limit = Math.max(1, Math.min(Number(params["limit"]) || 20, 100));
|
|
263
|
+
const rows = await Script.listByUser(userId, limit);
|
|
264
|
+
return {
|
|
265
|
+
scripts: rows.map((row) => {
|
|
266
|
+
const doc = row.toDocument();
|
|
267
|
+
const lines = scriptLines(doc.sections);
|
|
268
|
+
return {
|
|
269
|
+
id: row.id,
|
|
270
|
+
name: row.name,
|
|
271
|
+
cast: doc.cast.length,
|
|
272
|
+
lines: lines.length,
|
|
273
|
+
voiced: lines.filter((line) => lineStatus(line, effectiveVoice(line, doc.cast), {
|
|
274
|
+
currentTake,
|
|
275
|
+
needsVoicing
|
|
276
|
+
}) === "voiced").length,
|
|
277
|
+
timeline_id: row.timeline_id ?? undefined,
|
|
278
|
+
updated_at: row.updated_at
|
|
279
|
+
};
|
|
280
|
+
})
|
|
281
|
+
};
|
|
282
|
+
}
|
|
283
|
+
};
|
|
284
|
+
const createScript = {
|
|
285
|
+
spec: createScriptSpec,
|
|
286
|
+
impl: async (run, params) => {
|
|
287
|
+
const userId = run.context.userId;
|
|
288
|
+
if (!userId)
|
|
289
|
+
return { error: "No user is bound to this session." };
|
|
290
|
+
const name = params["name"];
|
|
291
|
+
if (!isNonBlankString(name)) {
|
|
292
|
+
return { error: "name is required and must be a non-empty string." };
|
|
293
|
+
}
|
|
294
|
+
const { Script, emptyScriptDocument } = await import("@nodetool-ai/models");
|
|
295
|
+
const requestedId = isNonBlankString(params["id"])
|
|
296
|
+
? params["id"].trim()
|
|
297
|
+
: undefined;
|
|
298
|
+
if (requestedId) {
|
|
299
|
+
const existing = await Script.findById(requestedId);
|
|
300
|
+
if (existing) {
|
|
301
|
+
// A script someone else owns reads as taken, not as theirs to read.
|
|
302
|
+
if (existing.user_id !== userId) {
|
|
303
|
+
return { error: `A script with id ${requestedId} already exists.` };
|
|
304
|
+
}
|
|
305
|
+
return {
|
|
306
|
+
ok: true,
|
|
307
|
+
script_id: existing.id,
|
|
308
|
+
name: existing.name,
|
|
309
|
+
project_id: existing.project_id,
|
|
310
|
+
updated_at: existing.updated_at
|
|
311
|
+
};
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
const fields = {
|
|
315
|
+
user_id: userId,
|
|
316
|
+
project_id: resolveProjectId(run, params),
|
|
317
|
+
name: name.trim(),
|
|
318
|
+
document: JSON.stringify(emptyScriptDocument())
|
|
319
|
+
};
|
|
320
|
+
if (requestedId)
|
|
321
|
+
fields.id = requestedId;
|
|
322
|
+
const script = new Script(fields);
|
|
323
|
+
await script.save();
|
|
324
|
+
return {
|
|
325
|
+
ok: true,
|
|
326
|
+
script_id: script.id,
|
|
327
|
+
name: script.name,
|
|
328
|
+
project_id: script.project_id,
|
|
329
|
+
updated_at: script.updated_at
|
|
330
|
+
};
|
|
331
|
+
}
|
|
332
|
+
};
|
|
333
|
+
const getScript = {
|
|
334
|
+
spec: getScriptSpec,
|
|
335
|
+
impl: async (run, params) => {
|
|
336
|
+
const handle = await loadScript(run, params["script_id"]);
|
|
337
|
+
if (isError(handle))
|
|
338
|
+
return handle;
|
|
339
|
+
const { row, doc } = handle;
|
|
340
|
+
const { currentTake, effectiveVoice, needsVoicing, scriptLines } = await import("@nodetool-ai/timeline");
|
|
341
|
+
const link = await storyboardLinkFor(run.context.userId, row.storyboard_id ?? null, row.id, doc);
|
|
342
|
+
const orphans = new Set(link.orphan_line_ids);
|
|
343
|
+
return {
|
|
344
|
+
id: row.id,
|
|
345
|
+
name: row.name,
|
|
346
|
+
timeline_id: row.timeline_id ?? undefined,
|
|
347
|
+
storyboard_id: link.storyboard_id,
|
|
348
|
+
storyboard_link: link,
|
|
349
|
+
cast: doc.cast.map((speaker) => ({
|
|
350
|
+
id: speaker.id,
|
|
351
|
+
name: speaker.name,
|
|
352
|
+
voice: speaker.voice ?? null,
|
|
353
|
+
entityId: speaker.entityId ?? null
|
|
354
|
+
})),
|
|
355
|
+
lines: scriptLines(doc.sections).map((line, index) => {
|
|
356
|
+
const voice = effectiveVoice(line, doc.cast);
|
|
357
|
+
return {
|
|
358
|
+
id: line.id,
|
|
359
|
+
index,
|
|
360
|
+
speaker_id: line.speakerId ?? null,
|
|
361
|
+
text: line.text,
|
|
362
|
+
direction: line.direction,
|
|
363
|
+
pause_after_ms: line.pauseAfterMs,
|
|
364
|
+
voice,
|
|
365
|
+
status: lineStatus(line, voice, { currentTake, needsVoicing }),
|
|
366
|
+
take_count: line.takes.length,
|
|
367
|
+
shot_id: link.shot_id_by_line_id[line.id] ?? null,
|
|
368
|
+
orphaned: link.linked && orphans.has(line.id)
|
|
369
|
+
};
|
|
370
|
+
})
|
|
371
|
+
};
|
|
372
|
+
}
|
|
373
|
+
};
|
|
374
|
+
// ---------------------------------------------------------------------------
|
|
375
|
+
// voice_script_lines
|
|
376
|
+
// ---------------------------------------------------------------------------
|
|
377
|
+
/** The call-level voice override, or null when the lines' own voices apply. */
|
|
378
|
+
function voiceOverrideFrom(rawParams) {
|
|
379
|
+
const params = flattenVoiceArg(rawParams);
|
|
380
|
+
const provider = params["provider"];
|
|
381
|
+
const model = params["model"];
|
|
382
|
+
const voice = params["voice"];
|
|
383
|
+
const any = [provider, model, voice].some((v) => isNonEmptyString(v));
|
|
384
|
+
if (!any)
|
|
385
|
+
return null;
|
|
386
|
+
if (!isNonEmptyString(provider) ||
|
|
387
|
+
!isNonEmptyString(model) ||
|
|
388
|
+
!isNonEmptyString(voice)) {
|
|
389
|
+
// A provider and a model with no voice is the shape a caller sends when
|
|
390
|
+
// it means "use this TTS endpoint for the whole script" — there is no
|
|
391
|
+
// such thing here, because the endpoint does not pick a voice. Naming the
|
|
392
|
+
// op that does say it saves the round trip the refusal used to cost.
|
|
393
|
+
return {
|
|
394
|
+
error: "A voice override needs all three of provider, model, and voice — " +
|
|
395
|
+
"`voice` is the voice's own name (e.g. \"Aoede\"), which find_model " +
|
|
396
|
+
"with capability=text_to_speech lists per model. To give the whole " +
|
|
397
|
+
'script one model, set each speaker\'s voice once with edit_script ' +
|
|
398
|
+
'{"op": "set_speaker_voice", "target": "<speaker>", "provider", ' +
|
|
399
|
+
'"model", "voice"} and call this with no override at all.'
|
|
400
|
+
};
|
|
401
|
+
}
|
|
402
|
+
return { provider, model, voice };
|
|
403
|
+
}
|
|
404
|
+
/**
|
|
405
|
+
* The lines a voicing call acts on: the explicit `targets` when given, else
|
|
406
|
+
* every line that needs voicing — the default that makes a whole script one
|
|
407
|
+
* call. An override applies to every named line, since the caller chose the
|
|
408
|
+
* voice; without one, staleness is measured against the line's own voice.
|
|
409
|
+
*/
|
|
410
|
+
function selectLines(lines, targets, override, doc, helpers) {
|
|
411
|
+
if (targets === undefined || targets === null) {
|
|
412
|
+
return lines
|
|
413
|
+
.map((line, index) => ({ line, index }))
|
|
414
|
+
.filter(({ line }) => {
|
|
415
|
+
const voice = override ?? helpers.effectiveVoice(line, doc.cast);
|
|
416
|
+
return (line.text.trim().length > 0 &&
|
|
417
|
+
!!voice &&
|
|
418
|
+
helpers.needsVoicing(line, voice));
|
|
419
|
+
});
|
|
420
|
+
}
|
|
421
|
+
const list = Array.isArray(targets) ? targets : [targets];
|
|
422
|
+
const selected = [];
|
|
423
|
+
for (const raw of list) {
|
|
424
|
+
const target = String(raw);
|
|
425
|
+
const line = findLine(lines, target);
|
|
426
|
+
if (!line) {
|
|
427
|
+
return {
|
|
428
|
+
error: `No line matches "${target}". Call get_script to list line ids and indexes.`
|
|
429
|
+
};
|
|
430
|
+
}
|
|
431
|
+
if (selected.some((s) => s.line.id === line.id))
|
|
432
|
+
continue;
|
|
433
|
+
selected.push({ line, index: lines.indexOf(line) });
|
|
434
|
+
}
|
|
435
|
+
return selected;
|
|
436
|
+
}
|
|
437
|
+
const voiceScriptLines = {
|
|
438
|
+
spec: voiceScriptLinesSpec,
|
|
439
|
+
impl: async (run, params) => {
|
|
440
|
+
const context = run.context;
|
|
441
|
+
const handle = await loadScript(run, params["script_id"]);
|
|
442
|
+
if (isError(handle))
|
|
443
|
+
return handle;
|
|
444
|
+
const { row, doc } = handle;
|
|
445
|
+
const override = voiceOverrideFrom(params);
|
|
446
|
+
if (isError(override))
|
|
447
|
+
return override;
|
|
448
|
+
const { effectiveVoice, needsVoicing, scriptLines } = await import("@nodetool-ai/timeline");
|
|
449
|
+
const lines = scriptLines(doc.sections);
|
|
450
|
+
const selected = selectLines(lines, params["targets"], override, doc, {
|
|
451
|
+
effectiveVoice,
|
|
452
|
+
needsVoicing
|
|
453
|
+
});
|
|
454
|
+
if (isError(selected))
|
|
455
|
+
return selected;
|
|
456
|
+
if (selected.length === 0) {
|
|
457
|
+
// "Every line with a voice is already up to date" was true of a script
|
|
458
|
+
// whose lines have no voice at all — vacuously, since there were none to
|
|
459
|
+
// be out of date. Read as written it says the work is done, and a chat
|
|
460
|
+
// that had just written eight unvoiced lines took it that way. The reason
|
|
461
|
+
// nothing was selected is the useful half, so it is the half reported.
|
|
462
|
+
const withText = lines.filter((line) => line.text.trim().length > 0);
|
|
463
|
+
const voiceless = withText.filter((line) => !(override ?? effectiveVoice(line, doc.cast)));
|
|
464
|
+
if (withText.length === 0) {
|
|
465
|
+
return {
|
|
466
|
+
voiced: 0,
|
|
467
|
+
results: [],
|
|
468
|
+
note: "This script has no line with text in it yet. Write lines with edit_script, then voice them."
|
|
469
|
+
};
|
|
470
|
+
}
|
|
471
|
+
if (voiceless.length > 0) {
|
|
472
|
+
return {
|
|
473
|
+
voiced: 0,
|
|
474
|
+
results: [],
|
|
475
|
+
skipped_without_voice: voiceless.length,
|
|
476
|
+
note: `${voiceless.length} of ${withText.length} lines have no voice, so nothing could be voiced` +
|
|
477
|
+
(voiceless.length < withText.length
|
|
478
|
+
? "; the rest are already up to date. "
|
|
479
|
+
: ". ") +
|
|
480
|
+
'Give each speaker a voice with edit_script {"op": "set_speaker_voice", "target": "<speaker>", provider, model, voice} — find_model with capability=text_to_speech resolves one — or pass provider, model and voice to this call to override them all.'
|
|
481
|
+
};
|
|
482
|
+
}
|
|
483
|
+
return {
|
|
484
|
+
voiced: 0,
|
|
485
|
+
results: [],
|
|
486
|
+
note: `All ${withText.length} lines are voiced and up to date. Name lines explicitly with \`targets\` to re-voice them.`
|
|
487
|
+
};
|
|
488
|
+
}
|
|
489
|
+
if (selected.length > MAX_LINES_PER_CALL) {
|
|
490
|
+
return {
|
|
491
|
+
error: `${selected.length} lines selected, over the ${MAX_LINES_PER_CALL}-line per-call limit. Pass targets in batches.`
|
|
492
|
+
};
|
|
493
|
+
}
|
|
494
|
+
// Synthesis stays with `generate_speech`: it is the one place that knows
|
|
495
|
+
// how to ask a provider for encoded audio, fall back to streaming PCM, and
|
|
496
|
+
// persist the result as an asset.
|
|
497
|
+
const { generateSpeech } = await import("./media.js");
|
|
498
|
+
const speechRun = createCapabilityRun({ context, gate: UNGATED });
|
|
499
|
+
const speed = isNumber(params["speed"]) ? params["speed"] : undefined;
|
|
500
|
+
const transcribe = params["transcribe"] !== false;
|
|
501
|
+
const asrProvider = isString(params["asr_provider"])
|
|
502
|
+
? params["asr_provider"]
|
|
503
|
+
: DEFAULT_ASR_PROVIDER;
|
|
504
|
+
const asrModel = isString(params["asr_model"])
|
|
505
|
+
? params["asr_model"]
|
|
506
|
+
: DEFAULT_ASR_MODEL;
|
|
507
|
+
const results = await mapWithConcurrency(selected, clampConcurrency(params["concurrency"]), async ({ line, index }) => {
|
|
508
|
+
const base = {
|
|
509
|
+
line_id: line.id,
|
|
510
|
+
index,
|
|
511
|
+
text: line.text,
|
|
512
|
+
ok: false
|
|
513
|
+
};
|
|
514
|
+
const text = line.text.trim();
|
|
515
|
+
if (!text)
|
|
516
|
+
return { ...base, error: "Line has no text to voice." };
|
|
517
|
+
const voice = override ?? effectiveVoice(line, doc.cast);
|
|
518
|
+
if (!voice) {
|
|
519
|
+
return {
|
|
520
|
+
...base,
|
|
521
|
+
error: "Line has no voice — give its speaker a voice, set a per-line override, or pass provider/model/voice to this call."
|
|
522
|
+
};
|
|
523
|
+
}
|
|
524
|
+
try {
|
|
525
|
+
const synthesized = (await generateSpeech.impl(speechRun, {
|
|
526
|
+
provider: voice.provider,
|
|
527
|
+
model: voice.model,
|
|
528
|
+
text,
|
|
529
|
+
voice: voice.voice,
|
|
530
|
+
speed
|
|
531
|
+
}));
|
|
532
|
+
if (synthesized.error)
|
|
533
|
+
return { ...base, error: synthesized.error };
|
|
534
|
+
if (!synthesized.asset_id) {
|
|
535
|
+
return {
|
|
536
|
+
...base,
|
|
537
|
+
error: "The take was synthesized but could not be saved as an asset, so it cannot be attached to the line. This host has no asset storage wired."
|
|
538
|
+
};
|
|
539
|
+
}
|
|
540
|
+
const { bytes } = await context.resolveAssetBytes(synthesized.asset_uri ?? synthesized.asset_id);
|
|
541
|
+
const audio = bytes ?? new Uint8Array();
|
|
542
|
+
const words = transcribe
|
|
543
|
+
? await transcribeWords(context, audio, asrProvider, asrModel)
|
|
544
|
+
: [];
|
|
545
|
+
const durationMs = await measureDurationMs(audio, words);
|
|
546
|
+
const { randomUUID } = await import("node:crypto");
|
|
547
|
+
const take = {
|
|
548
|
+
id: `take_${randomUUID()}`,
|
|
549
|
+
assetId: synthesized.asset_id,
|
|
550
|
+
durationMs,
|
|
551
|
+
words,
|
|
552
|
+
textSnapshot: line.text,
|
|
553
|
+
voiceSnapshot: voice,
|
|
554
|
+
createdAt: new Date().toISOString()
|
|
555
|
+
};
|
|
556
|
+
const saved = await appendTake(row.id, line.id, take);
|
|
557
|
+
if (isError(saved))
|
|
558
|
+
return { ...base, error: saved.error };
|
|
559
|
+
return {
|
|
560
|
+
...base,
|
|
561
|
+
ok: true,
|
|
562
|
+
take_id: take.id,
|
|
563
|
+
asset_id: take.assetId,
|
|
564
|
+
duration_ms: durationMs,
|
|
565
|
+
word_count: words.length
|
|
566
|
+
};
|
|
567
|
+
}
|
|
568
|
+
catch (e) {
|
|
569
|
+
return {
|
|
570
|
+
...base,
|
|
571
|
+
error: `text_to_speech failed: ${errorMessage(e)}`
|
|
572
|
+
};
|
|
573
|
+
}
|
|
574
|
+
});
|
|
575
|
+
return {
|
|
576
|
+
script_id: row.id,
|
|
577
|
+
voiced: results.filter((r) => r.ok).length,
|
|
578
|
+
failed: results.filter((r) => !r.ok).length,
|
|
579
|
+
results
|
|
580
|
+
};
|
|
581
|
+
}
|
|
582
|
+
};
|
|
583
|
+
const assembleScriptTimeline = {
|
|
584
|
+
spec: assembleScriptTimelineSpec,
|
|
585
|
+
impl: async (run, params) => {
|
|
586
|
+
const context = run.context;
|
|
587
|
+
const handle = await loadScript(run, params["script_id"]);
|
|
588
|
+
if (isError(handle))
|
|
589
|
+
return handle;
|
|
590
|
+
const { row, doc } = handle;
|
|
591
|
+
const { Script, TimelineSequence } = await import("@nodetool-ai/models");
|
|
592
|
+
const { buildScriptTimeline, foreignTimelineParts } = await import("@nodetool-ai/timeline");
|
|
593
|
+
const assembled = buildScriptTimeline({
|
|
594
|
+
scriptId: row.id,
|
|
595
|
+
cast: doc.cast,
|
|
596
|
+
sections: doc.sections
|
|
597
|
+
});
|
|
598
|
+
if (assembled.clips.length === 0) {
|
|
599
|
+
return {
|
|
600
|
+
error: "No line has a voiced take, so there is nothing to assemble. Run voice_script_lines first.",
|
|
601
|
+
skipped_line_ids: assembled.skippedLineIds
|
|
602
|
+
};
|
|
603
|
+
}
|
|
604
|
+
const fps = Math.max(1, Math.min(Number(params["fps"]) || 30, 120));
|
|
605
|
+
const name = isNonEmptyString(params["name"])
|
|
606
|
+
? params["name"]
|
|
607
|
+
: row.name;
|
|
608
|
+
const existing = row.timeline_id
|
|
609
|
+
? await TimelineSequence.findById(row.timeline_id)
|
|
610
|
+
: null;
|
|
611
|
+
const reuse = existing && existing.user_id === context.userId ? existing : null;
|
|
612
|
+
if (!reuse) {
|
|
613
|
+
const sequence = new TimelineSequence({
|
|
614
|
+
user_id: context.userId,
|
|
615
|
+
project_id: row.project_id,
|
|
616
|
+
name
|
|
617
|
+
});
|
|
618
|
+
sequence.name = name;
|
|
619
|
+
sequence.fps = fps;
|
|
620
|
+
sequence.duration_ms = assembled.durationMs;
|
|
621
|
+
sequence.fromDocument({
|
|
622
|
+
tracks: assembled.tracks,
|
|
623
|
+
clips: assembled.clips,
|
|
624
|
+
markers: []
|
|
625
|
+
});
|
|
626
|
+
await sequence.save();
|
|
627
|
+
if (row.timeline_id !== sequence.id) {
|
|
628
|
+
await Script.updateFieldsIfUnchanged(row.id, row.updated_at, { timeline_id: sequence.id }, { ops: [{ tool: "set_link", input: { timeline_id: sequence.id } }] });
|
|
629
|
+
}
|
|
630
|
+
return {
|
|
631
|
+
ok: true,
|
|
632
|
+
timeline_id: sequence.id,
|
|
633
|
+
name: sequence.name,
|
|
634
|
+
fps,
|
|
635
|
+
duration_ms: assembled.durationMs,
|
|
636
|
+
clip_count: assembled.clips.length,
|
|
637
|
+
track_count: assembled.tracks.length,
|
|
638
|
+
skipped_line_ids: assembled.skippedLineIds
|
|
639
|
+
};
|
|
640
|
+
}
|
|
641
|
+
// Re-assembling over an existing sequence is a CAS write carrying its
|
|
642
|
+
// ops (S2.1): the foreign parts are re-read per attempt, and an open
|
|
643
|
+
// editor merges the change instead of seeing the sequence as replaced.
|
|
644
|
+
for (let attempt = 0; attempt < CAS_ATTEMPTS; attempt++) {
|
|
645
|
+
const current = attempt === 0 ? reuse : await TimelineSequence.findById(reuse.id);
|
|
646
|
+
if (!current ||
|
|
647
|
+
current.user_id !== context.userId) {
|
|
648
|
+
return {
|
|
649
|
+
error: `Timeline ${reuse.id} was deleted while assembling; create a new timeline by calling this again.`
|
|
650
|
+
};
|
|
651
|
+
}
|
|
652
|
+
// Re-assembling replaces this script's voiceover track and clips, and
|
|
653
|
+
// leaves everything another surface put in the sequence alone.
|
|
654
|
+
const foreign = foreignTimelineParts(current.toDocument(), (clip) => clip.scriptId === row.id);
|
|
655
|
+
const tracks = [...assembled.tracks, ...foreign.tracks];
|
|
656
|
+
const clips = [...assembled.clips, ...foreign.clips];
|
|
657
|
+
const durationMs = clips.reduce((end, c) => Math.max(end, c.startMs + c.durationMs), 0);
|
|
658
|
+
const previous = current.toDocument();
|
|
659
|
+
const nextDocument = {
|
|
660
|
+
...previous,
|
|
661
|
+
tracks,
|
|
662
|
+
clips,
|
|
663
|
+
markers: previous.markers ?? []
|
|
664
|
+
};
|
|
665
|
+
const saved = await TimelineSequence.updateFieldsIfUnchanged(current.id, current.updated_at, {
|
|
666
|
+
name,
|
|
667
|
+
fps,
|
|
668
|
+
duration_ms: durationMs,
|
|
669
|
+
document: JSON.stringify(nextDocument)
|
|
670
|
+
}, {
|
|
671
|
+
ops: [
|
|
672
|
+
{
|
|
673
|
+
tool: "assemble_script_timeline",
|
|
674
|
+
input: { script_id: row.id }
|
|
675
|
+
}
|
|
676
|
+
]
|
|
677
|
+
});
|
|
678
|
+
if (!saved)
|
|
679
|
+
continue;
|
|
680
|
+
if (row.timeline_id !== current.id) {
|
|
681
|
+
await Script.updateFieldsIfUnchanged(row.id, row.updated_at, { timeline_id: current.id }, { ops: [{ tool: "set_link", input: { timeline_id: current.id } }] });
|
|
682
|
+
}
|
|
683
|
+
return {
|
|
684
|
+
ok: true,
|
|
685
|
+
timeline_id: current.id,
|
|
686
|
+
name,
|
|
687
|
+
fps,
|
|
688
|
+
duration_ms: durationMs,
|
|
689
|
+
clip_count: clips.length,
|
|
690
|
+
track_count: tracks.length,
|
|
691
|
+
skipped_line_ids: assembled.skippedLineIds
|
|
692
|
+
};
|
|
693
|
+
}
|
|
694
|
+
return {
|
|
695
|
+
error: `Timeline ${reuse.id} is being modified concurrently; the assembly finished but could not be saved. Retry the call.`
|
|
696
|
+
};
|
|
697
|
+
}
|
|
698
|
+
};
|
|
699
|
+
// ---------------------------------------------------------------------------
|
|
700
|
+
// edit_script
|
|
701
|
+
// ---------------------------------------------------------------------------
|
|
702
|
+
//
|
|
703
|
+
// The voicing capabilities above turn written lines into audio; this one writes
|
|
704
|
+
// the lines. Adding a speaker, adding or rewriting a line, assigning a voice —
|
|
705
|
+
// all of it was browser-only, since the `ui_script_*` tools round-trip into the
|
|
706
|
+
// open editor's store. An agent could voice a script it could not author.
|
|
707
|
+
/** Operations one call may apply, so a runaway script cannot rewrite a script. */
|
|
708
|
+
const MAX_SCRIPT_OPS = 80;
|
|
709
|
+
const SCRIPT_OPS = [
|
|
710
|
+
"set_setup",
|
|
711
|
+
"add_speaker",
|
|
712
|
+
"set_speaker",
|
|
713
|
+
"set_speaker_voice",
|
|
714
|
+
"remove_speaker",
|
|
715
|
+
"add_section",
|
|
716
|
+
"add_line",
|
|
717
|
+
"set_line_text",
|
|
718
|
+
"set_line_speaker",
|
|
719
|
+
"remove_line"
|
|
720
|
+
];
|
|
721
|
+
const isScriptOpName = (value) => SCRIPT_OPS.includes(value);
|
|
722
|
+
/**
|
|
723
|
+
* Every argument each op reads. An op used to take whatever object it was
|
|
724
|
+
* handed and read the keys it knew, so a key it did not know was dropped in
|
|
725
|
+
* silence: `add_line {text, speaker_id}` — the field name `get_script`
|
|
726
|
+
* *reports* a line's speaker under — added the line with no speaker at all and
|
|
727
|
+
* reported `ok`. A chat wrote eight lines that way, read them back unattributed,
|
|
728
|
+
* and spent the rest of the session rebuilding the script twice trying to
|
|
729
|
+
* work out which call had not taken. A key no op reads is now refused, by name.
|
|
730
|
+
*/
|
|
731
|
+
const OP_KEYS = {
|
|
732
|
+
set_setup: ["stage", "brief", "format", "length_seconds", "pace", "language"],
|
|
733
|
+
add_speaker: [
|
|
734
|
+
"name",
|
|
735
|
+
"color",
|
|
736
|
+
"provider",
|
|
737
|
+
"model",
|
|
738
|
+
"voice",
|
|
739
|
+
"settings",
|
|
740
|
+
"entityId",
|
|
741
|
+
"entity_id"
|
|
742
|
+
],
|
|
743
|
+
set_speaker: ["target", "name", "color", "entityId", "entity_id"],
|
|
744
|
+
set_speaker_voice: ["target", "provider", "model", "voice", "settings"],
|
|
745
|
+
remove_speaker: ["target"],
|
|
746
|
+
add_section: ["title"],
|
|
747
|
+
add_line: [
|
|
748
|
+
"text",
|
|
749
|
+
"speaker",
|
|
750
|
+
"section",
|
|
751
|
+
"direction",
|
|
752
|
+
"pause_after_ms",
|
|
753
|
+
"index"
|
|
754
|
+
],
|
|
755
|
+
set_line_text: ["target", "text"],
|
|
756
|
+
set_line_speaker: ["target", "speaker"],
|
|
757
|
+
remove_line: ["target"]
|
|
758
|
+
};
|
|
759
|
+
/**
|
|
760
|
+
* Spellings that mean one of an op's own keys. These are the names the rest of
|
|
761
|
+
* the surface already uses for the same thing: `get_script` answers with `id`,
|
|
762
|
+
* `speaker_id` and `line_id`, and reading a script then editing it by the
|
|
763
|
+
* field names it just reported is consistency, not a mistake. Translating them
|
|
764
|
+
* costs nothing; a spelling that would collide with a key already present is
|
|
765
|
+
* refused rather than guessed at.
|
|
766
|
+
*/
|
|
767
|
+
const OP_ALIASES = {
|
|
768
|
+
set_setup: { seconds: "length_seconds", length: "length_seconds" },
|
|
769
|
+
add_speaker: { speaker: "name", speaker_name: "name" },
|
|
770
|
+
set_speaker: { id: "target", speaker: "target", speaker_id: "target" },
|
|
771
|
+
set_speaker_voice: {
|
|
772
|
+
id: "target",
|
|
773
|
+
speaker: "target",
|
|
774
|
+
speaker_id: "target"
|
|
775
|
+
},
|
|
776
|
+
remove_speaker: { id: "target", speaker: "target", speaker_id: "target" },
|
|
777
|
+
add_section: { name: "title" },
|
|
778
|
+
add_line: { speaker_id: "speaker", section_id: "section" },
|
|
779
|
+
set_line_text: { id: "target", line: "target", line_id: "target" },
|
|
780
|
+
set_line_speaker: {
|
|
781
|
+
id: "target",
|
|
782
|
+
line: "target",
|
|
783
|
+
line_id: "target",
|
|
784
|
+
speaker_id: "speaker"
|
|
785
|
+
},
|
|
786
|
+
remove_line: { id: "target", line: "target", line_id: "target" }
|
|
787
|
+
};
|
|
788
|
+
/**
|
|
789
|
+
* One op's arguments, with the known aliases translated, or the reason it
|
|
790
|
+
* cannot be applied as written.
|
|
791
|
+
*/
|
|
792
|
+
function normalizeOpArgs(op, index, raw) {
|
|
793
|
+
const known = OP_KEYS[op];
|
|
794
|
+
const aliases = OP_ALIASES[op];
|
|
795
|
+
const args = {};
|
|
796
|
+
for (const [key, value] of Object.entries(raw)) {
|
|
797
|
+
if (known.includes(key)) {
|
|
798
|
+
args[key] = value;
|
|
799
|
+
continue;
|
|
800
|
+
}
|
|
801
|
+
const alias = aliases[key];
|
|
802
|
+
if (alias === undefined) {
|
|
803
|
+
return {
|
|
804
|
+
error: `ops[${index}] (${op}) has no argument "${key}"; it takes ${known.join(", ")}.`
|
|
805
|
+
};
|
|
806
|
+
}
|
|
807
|
+
if (raw[alias] !== undefined) {
|
|
808
|
+
return {
|
|
809
|
+
error: `ops[${index}] (${op}) passes both "${key}" and "${alias}", which mean the same argument. Pass one.`
|
|
810
|
+
};
|
|
811
|
+
}
|
|
812
|
+
args[alias] = value;
|
|
813
|
+
}
|
|
814
|
+
return args;
|
|
815
|
+
}
|
|
816
|
+
function parseScriptOps(raw) {
|
|
817
|
+
if (!Array.isArray(raw) || raw.length === 0) {
|
|
818
|
+
return {
|
|
819
|
+
// The ops are listed here as well as in the spec: a caller that reached
|
|
820
|
+
// this message was already guessing, and one that has to guess again
|
|
821
|
+
// spends a turn calling edit_script with a made-up op just to read the
|
|
822
|
+
// list off the rejection.
|
|
823
|
+
error: 'ops must be a non-empty array, e.g. [{"op": "add_line", "text": "Hello."}]. ' +
|
|
824
|
+
`The ops are: ${SCRIPT_OPS.join(", ")}.`
|
|
825
|
+
};
|
|
826
|
+
}
|
|
827
|
+
if (raw.length > MAX_SCRIPT_OPS) {
|
|
828
|
+
return {
|
|
829
|
+
error: `ops holds ${raw.length} entries; at most ${MAX_SCRIPT_OPS} per call.`
|
|
830
|
+
};
|
|
831
|
+
}
|
|
832
|
+
const parsed = [];
|
|
833
|
+
for (const [index, entry] of raw.entries()) {
|
|
834
|
+
if (!isRecord(entry)) {
|
|
835
|
+
return { error: `ops[${index}] must be an object.` };
|
|
836
|
+
}
|
|
837
|
+
const { op, ...rest } = entry;
|
|
838
|
+
if (!isString(op) || !isScriptOpName(op.trim())) {
|
|
839
|
+
return {
|
|
840
|
+
error: `ops[${index}] names "${String(op)}"; expected one of ${SCRIPT_OPS.join(", ")}.`
|
|
841
|
+
};
|
|
842
|
+
}
|
|
843
|
+
const name = op.trim();
|
|
844
|
+
const args = normalizeOpArgs(name, index, rest);
|
|
845
|
+
if (isError(args))
|
|
846
|
+
return args;
|
|
847
|
+
parsed.push({ op: name, args });
|
|
848
|
+
}
|
|
849
|
+
return parsed;
|
|
850
|
+
}
|
|
851
|
+
/** Resolve a speaker reference: id or name (case-insensitive). */
|
|
852
|
+
function findSpeakerIndex(doc, target) {
|
|
853
|
+
const raw = isString(target) ? target.trim() : "";
|
|
854
|
+
const byId = doc.cast.findIndex((speaker) => speaker.id === raw);
|
|
855
|
+
if (byId >= 0)
|
|
856
|
+
return byId;
|
|
857
|
+
const name = raw.toLowerCase();
|
|
858
|
+
return doc.cast.findIndex((speaker) => speaker.name.trim().toLowerCase() === name);
|
|
859
|
+
}
|
|
860
|
+
/**
|
|
861
|
+
* Why a speaker op found no speaker. A speaker op whose `target` is a line id
|
|
862
|
+
* is the same confusion twice over — the cast and the lines both answer to
|
|
863
|
+
* `target`, and `set_speaker` reads as "set this line's speaker" — so the one
|
|
864
|
+
* mistake worth naming is named.
|
|
865
|
+
*/
|
|
866
|
+
function noSpeaker(doc, target) {
|
|
867
|
+
const raw = isString(target) ? target.trim() : String(target);
|
|
868
|
+
const cast = doc.cast.map((speaker) => `${speaker.id} (${speaker.name})`);
|
|
869
|
+
const looksLikeLine = /^line[_-]?\d+$/i.test(raw);
|
|
870
|
+
return new Error(`No speaker matches "${raw}".` +
|
|
871
|
+
(looksLikeLine
|
|
872
|
+
? ' That is a line id — to give a line a speaker use {"op": "set_line_speaker", "target": "<line>", "speaker": "<speaker>"}.'
|
|
873
|
+
: "") +
|
|
874
|
+
(cast.length > 0
|
|
875
|
+
? ` The cast is: ${cast.join(", ")}.`
|
|
876
|
+
: " This script has no cast yet; add one with add_speaker."));
|
|
877
|
+
}
|
|
878
|
+
/** The section an op addresses: by id, else the last one, else a fresh one. */
|
|
879
|
+
function resolveSection(doc, target) {
|
|
880
|
+
if (isNonBlankString(target)) {
|
|
881
|
+
const found = doc.sections.find((section) => section.id === target.trim());
|
|
882
|
+
if (!found)
|
|
883
|
+
throw new Error(`No section matches "${target}".`);
|
|
884
|
+
return found;
|
|
885
|
+
}
|
|
886
|
+
if (doc.sections.length === 0) {
|
|
887
|
+
const section = { id: `section_1`, lines: [] };
|
|
888
|
+
doc.sections.push(section);
|
|
889
|
+
return section;
|
|
890
|
+
}
|
|
891
|
+
return doc.sections[doc.sections.length - 1];
|
|
892
|
+
}
|
|
893
|
+
function mintId(prefix, used) {
|
|
894
|
+
let n = used.size + 1;
|
|
895
|
+
while (used.has(`${prefix}_${n}`))
|
|
896
|
+
n += 1;
|
|
897
|
+
return `${prefix}_${n}`;
|
|
898
|
+
}
|
|
899
|
+
/**
|
|
900
|
+
* How the voice's own name is spelled inside a nested voice object, depending
|
|
901
|
+
* on which surface printed it. All five mean the same field.
|
|
902
|
+
*/
|
|
903
|
+
const VOICE_NAME_KEYS = ["voice", "voice_id", "voiceId", "id", "name"];
|
|
904
|
+
/**
|
|
905
|
+
* Flatten a voice sent as an object under `voice`.
|
|
906
|
+
*
|
|
907
|
+
* The binding is three sibling keys, but `get_script` *reports* a speaker's
|
|
908
|
+
* voice as one object, so `{op: "set_speaker_voice", target, voice: {provider,
|
|
909
|
+
* model, voice_id}}` is what a caller writes after reading the cast back — and
|
|
910
|
+
* it used to land as a `voice` that was not a string, fail the triple check,
|
|
911
|
+
* and be refused with a message listing the three keys it had just supplied.
|
|
912
|
+
*/
|
|
913
|
+
function flattenVoiceArg(args) {
|
|
914
|
+
const nested = args["voice"];
|
|
915
|
+
if (!isRecord(nested))
|
|
916
|
+
return args;
|
|
917
|
+
const { voice: _nested, ...rest } = args;
|
|
918
|
+
const flat = { ...rest };
|
|
919
|
+
for (const key of ["provider", "model", "settings"]) {
|
|
920
|
+
if (flat[key] === undefined && nested[key] !== undefined) {
|
|
921
|
+
flat[key] = nested[key];
|
|
922
|
+
}
|
|
923
|
+
}
|
|
924
|
+
const name = VOICE_NAME_KEYS.map((key) => nested[key]).find((v) => isString(v));
|
|
925
|
+
if (name !== undefined)
|
|
926
|
+
flat["voice"] = name;
|
|
927
|
+
return flat;
|
|
928
|
+
}
|
|
929
|
+
/** A provider/model/voice triple, all three or none — never a half-guess. */
|
|
930
|
+
function parseVoiceBinding(raw) {
|
|
931
|
+
const args = flattenVoiceArg(raw);
|
|
932
|
+
const provider = args["provider"];
|
|
933
|
+
const model = args["model"];
|
|
934
|
+
const voice = args["voice"];
|
|
935
|
+
const given = [provider, model, voice].filter((v) => isString(v));
|
|
936
|
+
if (given.length === 0)
|
|
937
|
+
return null;
|
|
938
|
+
if (given.length !== 3) {
|
|
939
|
+
const missing = [
|
|
940
|
+
["provider", provider],
|
|
941
|
+
["model", model],
|
|
942
|
+
["voice", voice]
|
|
943
|
+
]
|
|
944
|
+
.filter(([, value]) => !isString(value))
|
|
945
|
+
.map(([key]) => key);
|
|
946
|
+
throw new Error(`A voice needs provider, model and voice together; this one has no ${missing.join(" and no ")}. ` +
|
|
947
|
+
"`voice` is the voice's own name (e.g. \"Aoede\"), not a second model " +
|
|
948
|
+
"id — find_model with capability=text_to_speech lists the names a " +
|
|
949
|
+
"model takes.");
|
|
950
|
+
}
|
|
951
|
+
const binding = {
|
|
952
|
+
provider: String(provider),
|
|
953
|
+
model: String(model),
|
|
954
|
+
voice: String(voice)
|
|
955
|
+
};
|
|
956
|
+
if (isObjectLike(args["settings"])) {
|
|
957
|
+
binding.settings = args["settings"];
|
|
958
|
+
}
|
|
959
|
+
return binding;
|
|
960
|
+
}
|
|
961
|
+
/**
|
|
962
|
+
* The key an op's own vocabulary names its unit by. The editor's merge adapter
|
|
963
|
+
* reads `line_id` before `target` before `id`, so stamping every key on every
|
|
964
|
+
* op would file a speaker op under `section.lines`. One key per op, plus the
|
|
965
|
+
* canonical `id` every consumer can read.
|
|
966
|
+
*/
|
|
967
|
+
const UNIT_KEY_BY_OP = {
|
|
968
|
+
set_speaker: "target",
|
|
969
|
+
set_speaker_voice: "target",
|
|
970
|
+
remove_speaker: "target",
|
|
971
|
+
set_line_text: "line_id",
|
|
972
|
+
set_line_speaker: "line_id",
|
|
973
|
+
remove_line: "line_id"
|
|
974
|
+
};
|
|
975
|
+
/** Apply one script operation. Returns its summary, or throws with the reason. */
|
|
976
|
+
function applyScriptOp(doc, { op, args }, scriptLines) {
|
|
977
|
+
// entity linkage — accept `entityId` or `entity_id`, string to link, null/"" to clear
|
|
978
|
+
const entityIdArg = (a) => {
|
|
979
|
+
const raw = a["entityId"] ?? a["entity_id"];
|
|
980
|
+
if (raw === undefined)
|
|
981
|
+
return undefined;
|
|
982
|
+
if (raw === null)
|
|
983
|
+
return null;
|
|
984
|
+
if (isString(raw)) {
|
|
985
|
+
const v = raw.trim();
|
|
986
|
+
return v.length > 0 ? v : null;
|
|
987
|
+
}
|
|
988
|
+
throw new Error("entityId must be a string (asset id from list_entities) or null to clear.");
|
|
989
|
+
};
|
|
990
|
+
switch (op) {
|
|
991
|
+
case "set_setup": {
|
|
992
|
+
const setup = doc.setup ?? { stage: "idea", brief: "" };
|
|
993
|
+
if (args["stage"] !== undefined) {
|
|
994
|
+
const stage = String(args["stage"]);
|
|
995
|
+
if (!SETUP_STAGES.includes(stage)) {
|
|
996
|
+
throw new Error(`stage must be one of ${SETUP_STAGES.join(", ")}; got "${stage}".`);
|
|
997
|
+
}
|
|
998
|
+
setup.stage = stage;
|
|
999
|
+
}
|
|
1000
|
+
if (args["brief"] !== undefined)
|
|
1001
|
+
setup.brief = String(args["brief"]);
|
|
1002
|
+
if (args["format"] !== undefined)
|
|
1003
|
+
setup.format = String(args["format"]);
|
|
1004
|
+
if (args["length_seconds"] !== undefined) {
|
|
1005
|
+
const seconds = Number(args["length_seconds"]);
|
|
1006
|
+
if (!Number.isFinite(seconds) || seconds <= 0) {
|
|
1007
|
+
throw new Error("length_seconds must be a positive number of seconds.");
|
|
1008
|
+
}
|
|
1009
|
+
setup.length_seconds = Math.round(seconds);
|
|
1010
|
+
}
|
|
1011
|
+
if (args["pace"] !== undefined) {
|
|
1012
|
+
const pace = String(args["pace"]);
|
|
1013
|
+
if (!SETUP_PACES.includes(pace)) {
|
|
1014
|
+
throw new Error(`pace must be one of ${SETUP_PACES.join(", ")}; got "${pace}".`);
|
|
1015
|
+
}
|
|
1016
|
+
setup.pace = pace;
|
|
1017
|
+
}
|
|
1018
|
+
if (args["language"] !== undefined) {
|
|
1019
|
+
setup.language = String(args["language"]);
|
|
1020
|
+
}
|
|
1021
|
+
doc.setup = setup;
|
|
1022
|
+
return { ...setup };
|
|
1023
|
+
}
|
|
1024
|
+
case "add_speaker": {
|
|
1025
|
+
const name = args["name"];
|
|
1026
|
+
if (!isNonBlankString(name)) {
|
|
1027
|
+
throw new Error("add_speaker needs a non-empty `name`.");
|
|
1028
|
+
}
|
|
1029
|
+
const speaker = {
|
|
1030
|
+
id: mintId("speaker", new Set(doc.cast.map((s) => s.id))),
|
|
1031
|
+
name: name.trim(),
|
|
1032
|
+
voice: parseVoiceBinding(args)
|
|
1033
|
+
};
|
|
1034
|
+
if (isString(args["color"]))
|
|
1035
|
+
speaker.color = args["color"];
|
|
1036
|
+
const eid = entityIdArg(args);
|
|
1037
|
+
if (eid !== undefined)
|
|
1038
|
+
speaker.entityId = eid;
|
|
1039
|
+
doc.cast.push(speaker);
|
|
1040
|
+
return {
|
|
1041
|
+
id: speaker.id,
|
|
1042
|
+
name: speaker.name,
|
|
1043
|
+
has_voice: !!speaker.voice,
|
|
1044
|
+
entityId: speaker.entityId ?? null
|
|
1045
|
+
};
|
|
1046
|
+
}
|
|
1047
|
+
case "set_speaker": {
|
|
1048
|
+
const index = findSpeakerIndex(doc, args["target"]);
|
|
1049
|
+
if (index < 0)
|
|
1050
|
+
throw noSpeaker(doc, args["target"]);
|
|
1051
|
+
const speaker = { ...doc.cast[index] };
|
|
1052
|
+
if (args["name"] !== undefined)
|
|
1053
|
+
speaker.name = String(args["name"]);
|
|
1054
|
+
if (args["color"] !== undefined)
|
|
1055
|
+
speaker.color = String(args["color"]);
|
|
1056
|
+
const eid = entityIdArg(args);
|
|
1057
|
+
if (eid !== undefined)
|
|
1058
|
+
speaker.entityId = eid;
|
|
1059
|
+
doc.cast[index] = speaker;
|
|
1060
|
+
return { id: speaker.id, name: speaker.name, entityId: speaker.entityId ?? null };
|
|
1061
|
+
}
|
|
1062
|
+
case "set_speaker_voice": {
|
|
1063
|
+
const index = findSpeakerIndex(doc, args["target"]);
|
|
1064
|
+
if (index < 0)
|
|
1065
|
+
throw noSpeaker(doc, args["target"]);
|
|
1066
|
+
const voice = parseVoiceBinding(args);
|
|
1067
|
+
if (!voice) {
|
|
1068
|
+
throw new Error("set_speaker_voice needs provider, model and voice (use find_model to pick one).");
|
|
1069
|
+
}
|
|
1070
|
+
// Every take voiced with the old binding is now stale — `needsVoicing`
|
|
1071
|
+
// reads that off the take's own `voiceSnapshot`, so nothing to write.
|
|
1072
|
+
doc.cast[index] = { ...doc.cast[index], voice };
|
|
1073
|
+
return { id: doc.cast[index].id, voice };
|
|
1074
|
+
}
|
|
1075
|
+
case "remove_speaker": {
|
|
1076
|
+
const index = findSpeakerIndex(doc, args["target"]);
|
|
1077
|
+
if (index < 0)
|
|
1078
|
+
throw noSpeaker(doc, args["target"]);
|
|
1079
|
+
const [removed] = doc.cast.splice(index, 1);
|
|
1080
|
+
for (const section of doc.sections) {
|
|
1081
|
+
section.lines = section.lines.map((line) => line.speakerId === removed.id ? { ...line, speakerId: null } : line);
|
|
1082
|
+
}
|
|
1083
|
+
return { removed: removed.id };
|
|
1084
|
+
}
|
|
1085
|
+
case "add_section": {
|
|
1086
|
+
const section = {
|
|
1087
|
+
id: mintId("section", new Set(doc.sections.map((s) => s.id))),
|
|
1088
|
+
lines: []
|
|
1089
|
+
};
|
|
1090
|
+
if (isString(args["title"]))
|
|
1091
|
+
section.title = args["title"];
|
|
1092
|
+
doc.sections.push(section);
|
|
1093
|
+
return { id: section.id, title: section.title };
|
|
1094
|
+
}
|
|
1095
|
+
case "add_line": {
|
|
1096
|
+
const text = args["text"];
|
|
1097
|
+
if (!isNonBlankString(text)) {
|
|
1098
|
+
throw new Error("add_line needs a non-empty `text`.");
|
|
1099
|
+
}
|
|
1100
|
+
const section = resolveSection(doc, args["section"]);
|
|
1101
|
+
let speakerId = null;
|
|
1102
|
+
if (args["speaker"] !== undefined) {
|
|
1103
|
+
const index = findSpeakerIndex(doc, args["speaker"]);
|
|
1104
|
+
if (index < 0)
|
|
1105
|
+
throw noSpeaker(doc, args["speaker"]);
|
|
1106
|
+
speakerId = doc.cast[index].id;
|
|
1107
|
+
}
|
|
1108
|
+
const used = new Set(scriptLines(doc.sections).map((line) => line.id));
|
|
1109
|
+
const line = {
|
|
1110
|
+
id: mintId("line", used),
|
|
1111
|
+
speakerId,
|
|
1112
|
+
text,
|
|
1113
|
+
takes: []
|
|
1114
|
+
};
|
|
1115
|
+
if (isString(args["direction"])) {
|
|
1116
|
+
line.direction = args["direction"];
|
|
1117
|
+
}
|
|
1118
|
+
if (isNumber(args["pause_after_ms"])) {
|
|
1119
|
+
line.pauseAfterMs = args["pause_after_ms"];
|
|
1120
|
+
}
|
|
1121
|
+
const at = isNumber(args["index"])
|
|
1122
|
+
? Math.max(0, Math.min(Math.trunc(args["index"]), section.lines.length))
|
|
1123
|
+
: section.lines.length;
|
|
1124
|
+
section.lines.splice(at, 0, line);
|
|
1125
|
+
return { id: line.id, section_id: section.id, index: at };
|
|
1126
|
+
}
|
|
1127
|
+
case "set_line_text": {
|
|
1128
|
+
const target = String(args["target"] ?? "");
|
|
1129
|
+
const line = findLine(scriptLines(doc.sections), target);
|
|
1130
|
+
if (!line)
|
|
1131
|
+
throw new Error(`No line matches "${target}".`);
|
|
1132
|
+
const text = args["text"];
|
|
1133
|
+
if (!isNonBlankString(text)) {
|
|
1134
|
+
throw new Error("set_line_text needs a non-empty `text`.");
|
|
1135
|
+
}
|
|
1136
|
+
// The takes stay: each carries the text it was voiced from, so rewriting
|
|
1137
|
+
// the line makes them stale rather than gone, and `voice_script_lines`
|
|
1138
|
+
// re-records exactly those.
|
|
1139
|
+
line.text = text;
|
|
1140
|
+
return { id: line.id, text: line.text, status: "stale" };
|
|
1141
|
+
}
|
|
1142
|
+
case "set_line_speaker": {
|
|
1143
|
+
const target = String(args["target"] ?? "");
|
|
1144
|
+
const line = findLine(scriptLines(doc.sections), target);
|
|
1145
|
+
if (!line)
|
|
1146
|
+
throw new Error(`No line matches "${target}".`);
|
|
1147
|
+
const index = findSpeakerIndex(doc, args["speaker"]);
|
|
1148
|
+
if (index < 0)
|
|
1149
|
+
throw noSpeaker(doc, args["speaker"]);
|
|
1150
|
+
line.speakerId = doc.cast[index].id;
|
|
1151
|
+
return { id: line.id, speaker_id: line.speakerId };
|
|
1152
|
+
}
|
|
1153
|
+
case "remove_line": {
|
|
1154
|
+
const target = String(args["target"] ?? "");
|
|
1155
|
+
const line = findLine(scriptLines(doc.sections), target);
|
|
1156
|
+
if (!line)
|
|
1157
|
+
throw new Error(`No line matches "${target}".`);
|
|
1158
|
+
for (const section of doc.sections) {
|
|
1159
|
+
section.lines = section.lines.filter((l) => l.id !== line.id);
|
|
1160
|
+
}
|
|
1161
|
+
return { removed: line.id };
|
|
1162
|
+
}
|
|
1163
|
+
}
|
|
1164
|
+
}
|
|
1165
|
+
const editScript = {
|
|
1166
|
+
spec: editScriptSpec,
|
|
1167
|
+
impl: async (run, params) => {
|
|
1168
|
+
const ops = parseScriptOps(params["ops"]);
|
|
1169
|
+
if (isError(ops))
|
|
1170
|
+
return ops;
|
|
1171
|
+
const { Script } = await import("@nodetool-ai/models");
|
|
1172
|
+
const { scriptLines } = await import("@nodetool-ai/timeline");
|
|
1173
|
+
for (let attempt = 0; attempt < CAS_ATTEMPTS; attempt++) {
|
|
1174
|
+
const script = await loadScript(run, params["script_id"]);
|
|
1175
|
+
if (isError(script))
|
|
1176
|
+
return script;
|
|
1177
|
+
const { row, doc } = script;
|
|
1178
|
+
// A failing op is recorded and the script continues: stopping at the
|
|
1179
|
+
// first error hides every problem behind it.
|
|
1180
|
+
const records = [];
|
|
1181
|
+
const resolvedOps = [];
|
|
1182
|
+
for (const parsed of ops) {
|
|
1183
|
+
try {
|
|
1184
|
+
const result = applyScriptOp(doc, parsed, scriptLines);
|
|
1185
|
+
records.push({
|
|
1186
|
+
op: parsed.op,
|
|
1187
|
+
ok: true,
|
|
1188
|
+
result
|
|
1189
|
+
});
|
|
1190
|
+
const canonicalId = typeof result?.["id"] === "string"
|
|
1191
|
+
? result["id"]
|
|
1192
|
+
: typeof result?.["removed"] === "string"
|
|
1193
|
+
? result["removed"]
|
|
1194
|
+
: undefined;
|
|
1195
|
+
const key = UNIT_KEY_BY_OP[parsed.op];
|
|
1196
|
+
resolvedOps.push({
|
|
1197
|
+
tool: parsed.op,
|
|
1198
|
+
input: canonicalId && key
|
|
1199
|
+
? { ...parsed.args, [key]: canonicalId, id: canonicalId }
|
|
1200
|
+
: parsed.args
|
|
1201
|
+
});
|
|
1202
|
+
}
|
|
1203
|
+
catch (e) {
|
|
1204
|
+
records.push({ op: parsed.op, ok: false, error: errorMessage(e) });
|
|
1205
|
+
resolvedOps.push({ tool: parsed.op, input: parsed.args });
|
|
1206
|
+
}
|
|
1207
|
+
}
|
|
1208
|
+
const saved = await Script.updateFieldsIfUnchanged(row.id, row.updated_at, {
|
|
1209
|
+
document: JSON.stringify(doc)
|
|
1210
|
+
},
|
|
1211
|
+
// The ops ride on the write so an open editor merges this change per
|
|
1212
|
+
// merge unit instead of treating the script as replaced.
|
|
1213
|
+
{ ops: resolvedOps });
|
|
1214
|
+
if (!saved)
|
|
1215
|
+
continue;
|
|
1216
|
+
const failed = records.filter((record) => !record.ok);
|
|
1217
|
+
return {
|
|
1218
|
+
script_id: row.id,
|
|
1219
|
+
updated_at: saved.updated_at,
|
|
1220
|
+
applied: records.length - failed.length,
|
|
1221
|
+
failed: failed.length,
|
|
1222
|
+
ops: records,
|
|
1223
|
+
cast: doc.cast.map((speaker) => ({
|
|
1224
|
+
id: speaker.id,
|
|
1225
|
+
name: speaker.name,
|
|
1226
|
+
has_voice: !!speaker.voice,
|
|
1227
|
+
entityId: speaker.entityId ?? null
|
|
1228
|
+
})),
|
|
1229
|
+
lines: scriptLines(doc.sections).map((line, index) => ({
|
|
1230
|
+
id: line.id,
|
|
1231
|
+
index,
|
|
1232
|
+
speaker_id: line.speakerId ?? null,
|
|
1233
|
+
text: line.text,
|
|
1234
|
+
takes: line.takes.length
|
|
1235
|
+
}))
|
|
1236
|
+
};
|
|
1237
|
+
}
|
|
1238
|
+
return {
|
|
1239
|
+
error: `Script ${String(params["script_id"])} is being modified concurrently; nothing was saved. Retry the call.`
|
|
1240
|
+
};
|
|
1241
|
+
}
|
|
1242
|
+
};
|
|
1243
|
+
// ---------------------------------------------------------------------------
|
|
1244
|
+
// derive_storyboard_from_script
|
|
1245
|
+
// ---------------------------------------------------------------------------
|
|
1246
|
+
//
|
|
1247
|
+
// `deriveShotScaffold` pins linkage, order and the projected text
|
|
1248
|
+
// deterministically; shot *content* — action, slug, camera, motion — is the
|
|
1249
|
+
// director's job. The normalizer holds the line: a response that drops or
|
|
1250
|
+
// reassigns `script_line_ids` is refused and retried, and the scaffold is the
|
|
1251
|
+
// floor a failed director pass falls back to.
|
|
1252
|
+
/** Attempts at a director response that keeps every scaffold's line links. */
|
|
1253
|
+
const DIRECTOR_ATTEMPTS = 2;
|
|
1254
|
+
/**
|
|
1255
|
+
* The model the director pass runs on. Both fields absent means "no director" —
|
|
1256
|
+
* the scaffold ships as it is. One without the other is a mistake worth naming
|
|
1257
|
+
* rather than guessing at, the same posture the render tools take.
|
|
1258
|
+
*/
|
|
1259
|
+
function resolveDirectorModel(params) {
|
|
1260
|
+
const provider = isString(params["provider"]) ? params["provider"].trim() : "";
|
|
1261
|
+
const model = isString(params["model"]) ? params["model"].trim() : "";
|
|
1262
|
+
if (!provider && !model)
|
|
1263
|
+
return null;
|
|
1264
|
+
if (!provider || !model) {
|
|
1265
|
+
return {
|
|
1266
|
+
error: "The director pass needs provider and model together (use find_model with capability=text_generation). Omit both for the deterministic scaffold."
|
|
1267
|
+
};
|
|
1268
|
+
}
|
|
1269
|
+
return { provider, model };
|
|
1270
|
+
}
|
|
1271
|
+
const DIRECTOR_SHOTS_SCHEMA = {
|
|
1272
|
+
type: "object",
|
|
1273
|
+
additionalProperties: false,
|
|
1274
|
+
required: ["shots"],
|
|
1275
|
+
properties: {
|
|
1276
|
+
style: { type: "string" },
|
|
1277
|
+
shots: {
|
|
1278
|
+
type: "array",
|
|
1279
|
+
items: {
|
|
1280
|
+
type: "object",
|
|
1281
|
+
additionalProperties: false,
|
|
1282
|
+
required: ["script_line_ids", "action"],
|
|
1283
|
+
properties: {
|
|
1284
|
+
script_line_ids: { type: "array", items: { type: "string" } },
|
|
1285
|
+
action: { type: "string" },
|
|
1286
|
+
slug: { type: "string" },
|
|
1287
|
+
motion: { type: "string" },
|
|
1288
|
+
duration_seconds: { type: "number" },
|
|
1289
|
+
camera: {
|
|
1290
|
+
type: "object",
|
|
1291
|
+
additionalProperties: false,
|
|
1292
|
+
properties: {
|
|
1293
|
+
framing: { type: "string" },
|
|
1294
|
+
lens: { type: "string" },
|
|
1295
|
+
angle: { type: "string" },
|
|
1296
|
+
movement: { type: "string" }
|
|
1297
|
+
}
|
|
1298
|
+
}
|
|
1299
|
+
}
|
|
1300
|
+
}
|
|
1301
|
+
}
|
|
1302
|
+
}
|
|
1303
|
+
};
|
|
1304
|
+
const DIRECTOR_SYSTEM_PROMPT = [
|
|
1305
|
+
"You are a film director turning a written script into a shot list.",
|
|
1306
|
+
"Each shot below already covers a fixed set of script lines. Keep every",
|
|
1307
|
+
"shot's `script_line_ids` exactly as given — same ids, same order, one entry",
|
|
1308
|
+
"per shot — and write what the camera sees: a concrete visual `action`, plus",
|
|
1309
|
+
"`slug`, `camera` and `motion` where they help. Call the shots tool once."
|
|
1310
|
+
].join(" ");
|
|
1311
|
+
const optionalText = (value) => {
|
|
1312
|
+
const text = isString(value) ? value.trim() : "";
|
|
1313
|
+
return text.length > 0 ? text : undefined;
|
|
1314
|
+
};
|
|
1315
|
+
/**
|
|
1316
|
+
* Merge a director response onto the scaffold, or say why it cannot be trusted.
|
|
1317
|
+
* Shots are matched by the line ids they claim, so a response that drops a
|
|
1318
|
+
* shot, invents one, or moves a line between shots fails here rather than
|
|
1319
|
+
* producing a board whose links no longer describe the script.
|
|
1320
|
+
*/
|
|
1321
|
+
function normalizeDirectedShots(raw, scaffoldShots) {
|
|
1322
|
+
const shots = isObjectLike(raw)
|
|
1323
|
+
? raw.shots
|
|
1324
|
+
: undefined;
|
|
1325
|
+
if (!Array.isArray(shots)) {
|
|
1326
|
+
return { error: "the response carried no `shots` array" };
|
|
1327
|
+
}
|
|
1328
|
+
if (shots.length !== scaffoldShots.length) {
|
|
1329
|
+
return {
|
|
1330
|
+
error: `the response has ${shots.length} shots; the script's scaffold has ${scaffoldShots.length}`
|
|
1331
|
+
};
|
|
1332
|
+
}
|
|
1333
|
+
const key = (ids) => ids.join("\u0000");
|
|
1334
|
+
const byKey = new Map(scaffoldShots.map((shot) => [key(shot.script_line_ids ?? []), shot]));
|
|
1335
|
+
const directed = new Map();
|
|
1336
|
+
for (const [index, entry] of shots.entries()) {
|
|
1337
|
+
if (!isRecord(entry)) {
|
|
1338
|
+
return { error: `shots[${index}] is not an object` };
|
|
1339
|
+
}
|
|
1340
|
+
const args = entry;
|
|
1341
|
+
const lineIds = args["script_line_ids"];
|
|
1342
|
+
if (!Array.isArray(lineIds) || lineIds.some((id) => !isString(id))) {
|
|
1343
|
+
return { error: `shots[${index}] dropped its \`script_line_ids\`` };
|
|
1344
|
+
}
|
|
1345
|
+
const scaffold = byKey.get(key(lineIds));
|
|
1346
|
+
if (!scaffold) {
|
|
1347
|
+
return {
|
|
1348
|
+
error: `shots[${index}] reassigned its lines to [${lineIds.join(", ")}], which no scaffold shot covers`
|
|
1349
|
+
};
|
|
1350
|
+
}
|
|
1351
|
+
if (directed.has(scaffold.id)) {
|
|
1352
|
+
return {
|
|
1353
|
+
error: `shots[${index}] repeats the lines already covered by shot ${scaffold.id}`
|
|
1354
|
+
};
|
|
1355
|
+
}
|
|
1356
|
+
const action = optionalText(args["action"]);
|
|
1357
|
+
if (!action) {
|
|
1358
|
+
return { error: `shots[${index}] has no \`action\`` };
|
|
1359
|
+
}
|
|
1360
|
+
const shot = { ...scaffold, action };
|
|
1361
|
+
const slug = optionalText(args["slug"]);
|
|
1362
|
+
if (slug)
|
|
1363
|
+
shot.slug = slug;
|
|
1364
|
+
const motion = optionalText(args["motion"]);
|
|
1365
|
+
if (motion)
|
|
1366
|
+
shot.motion = motion;
|
|
1367
|
+
const camera = args["camera"];
|
|
1368
|
+
if (isRecord(camera)) {
|
|
1369
|
+
shot.camera = camera;
|
|
1370
|
+
}
|
|
1371
|
+
const seconds = Number(args["duration_seconds"]);
|
|
1372
|
+
if (Number.isFinite(seconds) && seconds > 0) {
|
|
1373
|
+
shot.duration_seconds = seconds;
|
|
1374
|
+
}
|
|
1375
|
+
directed.set(scaffold.id, shot);
|
|
1376
|
+
}
|
|
1377
|
+
const missing = scaffoldShots.filter((shot) => !directed.has(shot.id));
|
|
1378
|
+
if (missing.length > 0) {
|
|
1379
|
+
return {
|
|
1380
|
+
error: `the response covers no shot for lines [${(missing[0].script_line_ids ?? []).join(", ")}]`
|
|
1381
|
+
};
|
|
1382
|
+
}
|
|
1383
|
+
return scaffoldShots.map((shot) => directed.get(shot.id));
|
|
1384
|
+
}
|
|
1385
|
+
/** One director round-trip, returning whatever the provider answered with. */
|
|
1386
|
+
async function callDirector(context, model, userPrompt) {
|
|
1387
|
+
const provider = await context.getProvider(model.provider);
|
|
1388
|
+
const call = isFunction(provider.generateMessageTraced)
|
|
1389
|
+
? provider.generateMessageTraced.bind(provider)
|
|
1390
|
+
: provider.generateMessage.bind(provider);
|
|
1391
|
+
const result = await call({
|
|
1392
|
+
model: model.model,
|
|
1393
|
+
messages: [
|
|
1394
|
+
{ role: "system", content: DIRECTOR_SYSTEM_PROMPT },
|
|
1395
|
+
{ role: "user", content: userPrompt }
|
|
1396
|
+
],
|
|
1397
|
+
tools: [
|
|
1398
|
+
{
|
|
1399
|
+
name: "shots",
|
|
1400
|
+
description: "Submit the directed shots, one per scaffold entry, with the line ids unchanged.",
|
|
1401
|
+
inputSchema: DIRECTOR_SHOTS_SCHEMA
|
|
1402
|
+
}
|
|
1403
|
+
],
|
|
1404
|
+
toolChoice: "shots"
|
|
1405
|
+
});
|
|
1406
|
+
const call0 = result.toolCalls?.[0];
|
|
1407
|
+
return call0?.name === "shots" ? call0.args : null;
|
|
1408
|
+
}
|
|
1409
|
+
const deriveStoryboardFromScript = {
|
|
1410
|
+
spec: deriveStoryboardFromScriptSpec,
|
|
1411
|
+
impl: async (run, params) => {
|
|
1412
|
+
const context = run.context;
|
|
1413
|
+
const handle = await loadScript(run, params["script_id"]);
|
|
1414
|
+
if (isError(handle))
|
|
1415
|
+
return handle;
|
|
1416
|
+
const { row, doc } = handle;
|
|
1417
|
+
const model = resolveDirectorModel(params);
|
|
1418
|
+
if (isError(model))
|
|
1419
|
+
return model;
|
|
1420
|
+
const { deriveShotScaffold, joinLineTexts, validateScriptLink } = await import("@nodetool-ai/protocol");
|
|
1421
|
+
const scaffolds = deriveShotScaffold({
|
|
1422
|
+
id: row.id,
|
|
1423
|
+
cast: doc.cast,
|
|
1424
|
+
sections: doc.sections
|
|
1425
|
+
});
|
|
1426
|
+
if (scaffolds.length === 0) {
|
|
1427
|
+
return {
|
|
1428
|
+
error: `Script ${row.id} has no line with text, so there is nothing to storyboard. Write the lines with edit_script first.`
|
|
1429
|
+
};
|
|
1430
|
+
}
|
|
1431
|
+
const textByLineId = new Map(doc.sections.flatMap((section) => section.lines.map((line) => [line.id, line.text])));
|
|
1432
|
+
const stamp = Date.now().toString(36);
|
|
1433
|
+
const scaffoldShots = scaffolds.map((scaffold, index) => {
|
|
1434
|
+
const shot = {
|
|
1435
|
+
type: "shot",
|
|
1436
|
+
id: `shot_${index + 1}_${stamp}`,
|
|
1437
|
+
index,
|
|
1438
|
+
// The floor a failed director pass falls back to: the words the shot
|
|
1439
|
+
// covers, standing in for the visual nobody has described yet.
|
|
1440
|
+
action: scaffold.dialogue ?? scaffold.narration ?? "",
|
|
1441
|
+
status: "planned",
|
|
1442
|
+
script_line_ids: scaffold.script_line_ids,
|
|
1443
|
+
script_text_snapshot: joinLineTexts(scaffold.script_line_ids.map((id) => textByLineId.get(id) ?? ""))
|
|
1444
|
+
};
|
|
1445
|
+
if (scaffold.dialogue)
|
|
1446
|
+
shot.dialogue = scaffold.dialogue;
|
|
1447
|
+
if (scaffold.narration)
|
|
1448
|
+
shot.narration = scaffold.narration;
|
|
1449
|
+
return shot;
|
|
1450
|
+
});
|
|
1451
|
+
let shots = scaffoldShots;
|
|
1452
|
+
let directorRounds = 0;
|
|
1453
|
+
let directorNote;
|
|
1454
|
+
if (model) {
|
|
1455
|
+
const brief = scaffolds
|
|
1456
|
+
.map((scaffold, index) => `${index + 1}. script_line_ids=${JSON.stringify(scaffold.script_line_ids)} ` +
|
|
1457
|
+
`words=${JSON.stringify(scaffold.dialogue ?? scaffold.narration ?? "")}`)
|
|
1458
|
+
.join("\n");
|
|
1459
|
+
let complaint = "";
|
|
1460
|
+
for (let attempt = 0; attempt < DIRECTOR_ATTEMPTS; attempt++) {
|
|
1461
|
+
directorRounds += 1;
|
|
1462
|
+
let normalized;
|
|
1463
|
+
try {
|
|
1464
|
+
const raw = await callDirector(context, model, `Script: ${row.name}\n\nShots to direct, in order:\n${brief}` +
|
|
1465
|
+
(complaint ? `\n\nYour last answer was rejected: ${complaint}` : ""));
|
|
1466
|
+
normalized = normalizeDirectedShots(raw, scaffoldShots);
|
|
1467
|
+
}
|
|
1468
|
+
catch (e) {
|
|
1469
|
+
normalized = { error: errorMessage(e) };
|
|
1470
|
+
}
|
|
1471
|
+
if (!isError(normalized)) {
|
|
1472
|
+
shots = normalized;
|
|
1473
|
+
directorNote = undefined;
|
|
1474
|
+
break;
|
|
1475
|
+
}
|
|
1476
|
+
complaint = normalized.error;
|
|
1477
|
+
directorNote = `The director pass was refused after ${directorRounds} attempt(s) (${complaint}); the shots are the deterministic scaffold.`;
|
|
1478
|
+
}
|
|
1479
|
+
}
|
|
1480
|
+
const screenplay = {
|
|
1481
|
+
type: "screenplay",
|
|
1482
|
+
id: `sp_${stamp}`,
|
|
1483
|
+
title: row.name,
|
|
1484
|
+
shots,
|
|
1485
|
+
script_id: row.id
|
|
1486
|
+
};
|
|
1487
|
+
const validation = validateScriptLink(screenplay, { sections: doc.sections });
|
|
1488
|
+
if (validation.errors.length > 0) {
|
|
1489
|
+
return {
|
|
1490
|
+
error: `The derived board would not validate, so nothing was created: ${validation.errors
|
|
1491
|
+
.map((issue) => issue.message)
|
|
1492
|
+
.join(" ")}`
|
|
1493
|
+
};
|
|
1494
|
+
}
|
|
1495
|
+
// The board is created already carrying `script_id` and every shot's line
|
|
1496
|
+
// references, so the forward link needs no second write. The script's
|
|
1497
|
+
// back-pointer does, and it is stamped after — a board that exists without
|
|
1498
|
+
// the pointer is consistent and navigable from the board side, while a
|
|
1499
|
+
// pointer written first could name a board that was never created.
|
|
1500
|
+
// Bound as a namespace so the `Storyboard` row type imported at the top of
|
|
1501
|
+
// this file stays visible here.
|
|
1502
|
+
const models = await import("@nodetool-ai/models");
|
|
1503
|
+
const name = isString(params["name"]) && params["name"]
|
|
1504
|
+
? params["name"]
|
|
1505
|
+
: row.name;
|
|
1506
|
+
const board = await models.Storyboard.create({
|
|
1507
|
+
user_id: context.userId,
|
|
1508
|
+
project_id: row.project_id,
|
|
1509
|
+
name,
|
|
1510
|
+
document: JSON.stringify({
|
|
1511
|
+
screenplay,
|
|
1512
|
+
shots,
|
|
1513
|
+
brief: "",
|
|
1514
|
+
style: "",
|
|
1515
|
+
entityIds: [],
|
|
1516
|
+
aspectRatio: "16:9",
|
|
1517
|
+
directorModel: model
|
|
1518
|
+
? { type: "language_model", provider: model.provider, id: model.model }
|
|
1519
|
+
: null,
|
|
1520
|
+
imageModel: null,
|
|
1521
|
+
videoModel: null
|
|
1522
|
+
})
|
|
1523
|
+
});
|
|
1524
|
+
const stamped = await stampScriptStoryboardId(row.id, board.id, context.userId);
|
|
1525
|
+
if (isError(stamped)) {
|
|
1526
|
+
return {
|
|
1527
|
+
error: `Storyboard ${board.id} was created and links script ${row.id}, but the script's back-pointer could not be written: ${stamped.error} The board is valid; the script reads as unlinked until this is retried.`,
|
|
1528
|
+
storyboard_id: board.id,
|
|
1529
|
+
script_id: row.id
|
|
1530
|
+
};
|
|
1531
|
+
}
|
|
1532
|
+
return {
|
|
1533
|
+
ok: true,
|
|
1534
|
+
storyboard_id: board.id,
|
|
1535
|
+
script_id: row.id,
|
|
1536
|
+
name: board.name,
|
|
1537
|
+
shot_count: shots.length,
|
|
1538
|
+
directed: shots !== scaffoldShots,
|
|
1539
|
+
director_rounds: directorRounds,
|
|
1540
|
+
note: directorNote,
|
|
1541
|
+
warnings: validation.warnings.map((issue) => issue.message),
|
|
1542
|
+
shots: shots.map((shot) => ({
|
|
1543
|
+
id: shot.id,
|
|
1544
|
+
index: shot.index,
|
|
1545
|
+
slug: shot.slug,
|
|
1546
|
+
action: shot.action,
|
|
1547
|
+
status: shot.status,
|
|
1548
|
+
script_line_ids: shot.script_line_ids ?? []
|
|
1549
|
+
}))
|
|
1550
|
+
};
|
|
1551
|
+
}
|
|
1552
|
+
};
|
|
1553
|
+
// ---------------------------------------------------------------------------
|
|
1554
|
+
// write_script
|
|
1555
|
+
// ---------------------------------------------------------------------------
|
|
1556
|
+
/**
|
|
1557
|
+
* The writer, headless. The browser's `useWriteScript` runs the same protocol
|
|
1558
|
+
* functions; keeping the prompt, the schema and the parse in
|
|
1559
|
+
* `@nodetool-ai/protocol` is what makes a script written here and one written
|
|
1560
|
+
* in the flow the same artifact.
|
|
1561
|
+
*
|
|
1562
|
+
* Imported words never reach the writer's schema. They are split by
|
|
1563
|
+
* `splitImportedText` and attributed by a call whose schema has no text field,
|
|
1564
|
+
* and every line's words come from the split — so an agent handed a user's own
|
|
1565
|
+
* script cannot quietly improve it (PRD § 9.7 criterion 4).
|
|
1566
|
+
*/
|
|
1567
|
+
/**
|
|
1568
|
+
* Ids for one written script. `Date.now()` alone is not enough: two writes
|
|
1569
|
+
* inside the same millisecond mint the same prefix, so a rewrite's new line can
|
|
1570
|
+
* be handed the id of a line that rewrite dropped — and with it that line's
|
|
1571
|
+
* takes, which are paid-for audio of different words.
|
|
1572
|
+
*/
|
|
1573
|
+
let writeSequence = 0;
|
|
1574
|
+
const nextIdPrefix = () => `w${Date.now().toString(36)}${(writeSequence++).toString(36)}`;
|
|
1575
|
+
const writeScript = {
|
|
1576
|
+
spec: writeScriptSpec,
|
|
1577
|
+
impl: async (run, params) => {
|
|
1578
|
+
const script = await loadScript(run, params["script_id"]);
|
|
1579
|
+
if (isError(script))
|
|
1580
|
+
return script;
|
|
1581
|
+
const { row, doc } = script;
|
|
1582
|
+
const setup = doc.setup;
|
|
1583
|
+
const brief = setup?.brief.trim() ?? "";
|
|
1584
|
+
const imported = isNonBlankString(params["imported_text"])
|
|
1585
|
+
? params["imported_text"]
|
|
1586
|
+
: "";
|
|
1587
|
+
if (brief === "" && imported === "") {
|
|
1588
|
+
return {
|
|
1589
|
+
error: `Script ${row.id} has no brief, so there is nothing to write. Set one with edit_script's set_setup op, or pass imported_text.`
|
|
1590
|
+
};
|
|
1591
|
+
}
|
|
1592
|
+
const provider = isNonBlankString(params["provider"])
|
|
1593
|
+
? params["provider"]
|
|
1594
|
+
: "";
|
|
1595
|
+
const model = isNonBlankString(params["model"]) ? params["model"] : "";
|
|
1596
|
+
if (!provider || !model) {
|
|
1597
|
+
return {
|
|
1598
|
+
error: "write_script needs provider + model for the writer (use find_model with capability=generate_text)."
|
|
1599
|
+
};
|
|
1600
|
+
}
|
|
1601
|
+
const { ATTRIBUTION_SYSTEM_PROMPT, ATTRIBUTION_TOOL_DESCRIPTION, ATTRIBUTION_TOOL_NAME, SCRIPT_TOOL_DESCRIPTION, SCRIPT_TOOL_NAME, SCRIPT_WRITER_SYSTEM_PROMPT, applyAttribution, buildAttributionPrompt, buildAttributionSchema, buildScriptSchema, buildScriptWriterPrompt, fallbackScript, parseWrittenScript, scriptFormatById, splitImportedText } = await import("@nodetool-ai/protocol");
|
|
1602
|
+
const { generateStructured } = await import("@nodetool-ai/runtime");
|
|
1603
|
+
const format = setup?.format ?? "";
|
|
1604
|
+
const sectionTitle = scriptFormatById(format)?.sections[0] ?? "Script";
|
|
1605
|
+
const idPrefix = nextIdPrefix();
|
|
1606
|
+
const heldLineIds = doc.sections.flatMap((section) => section.lines.map((line) => line.id));
|
|
1607
|
+
const existingCast = doc.cast.map((speaker) => ({
|
|
1608
|
+
id: speaker.id,
|
|
1609
|
+
name: speaker.name
|
|
1610
|
+
}));
|
|
1611
|
+
const llm = await run.context.getProvider(provider);
|
|
1612
|
+
let written;
|
|
1613
|
+
if (imported !== "") {
|
|
1614
|
+
const texts = splitImportedText(imported);
|
|
1615
|
+
const answer = await generateStructured(llm, {
|
|
1616
|
+
model,
|
|
1617
|
+
maxTokens: MAX_WRITER_TOKENS,
|
|
1618
|
+
messages: [
|
|
1619
|
+
{ role: "system", content: ATTRIBUTION_SYSTEM_PROMPT },
|
|
1620
|
+
{
|
|
1621
|
+
role: "user",
|
|
1622
|
+
content: buildAttributionPrompt(texts, { brief, format })
|
|
1623
|
+
}
|
|
1624
|
+
],
|
|
1625
|
+
toolName: ATTRIBUTION_TOOL_NAME,
|
|
1626
|
+
toolDescription: ATTRIBUTION_TOOL_DESCRIPTION,
|
|
1627
|
+
schema: buildAttributionSchema(texts.length)
|
|
1628
|
+
});
|
|
1629
|
+
written = applyAttribution(texts, answer, {
|
|
1630
|
+
idPrefix,
|
|
1631
|
+
lineIds: heldLineIds,
|
|
1632
|
+
sectionTitle,
|
|
1633
|
+
existingCast
|
|
1634
|
+
});
|
|
1635
|
+
}
|
|
1636
|
+
else {
|
|
1637
|
+
const rewrite = params["rewrite"] === true;
|
|
1638
|
+
const input = {
|
|
1639
|
+
brief,
|
|
1640
|
+
format,
|
|
1641
|
+
lengthSeconds: setup?.length_seconds ?? DEFAULT_SCRIPT_SECONDS,
|
|
1642
|
+
pace: setup?.pace,
|
|
1643
|
+
language: setup?.language,
|
|
1644
|
+
existing: rewrite
|
|
1645
|
+
? {
|
|
1646
|
+
cast: existingCast,
|
|
1647
|
+
sections: doc.sections.map((section) => ({
|
|
1648
|
+
id: section.id,
|
|
1649
|
+
title: section.title ?? "",
|
|
1650
|
+
lines: section.lines.map((line) => ({
|
|
1651
|
+
id: line.id,
|
|
1652
|
+
speakerId: line.speakerId ?? null,
|
|
1653
|
+
text: line.text,
|
|
1654
|
+
direction: line.direction
|
|
1655
|
+
}))
|
|
1656
|
+
}))
|
|
1657
|
+
}
|
|
1658
|
+
: undefined
|
|
1659
|
+
};
|
|
1660
|
+
const answer = await generateStructured(llm, {
|
|
1661
|
+
model,
|
|
1662
|
+
maxTokens: MAX_WRITER_TOKENS,
|
|
1663
|
+
messages: [
|
|
1664
|
+
{ role: "system", content: SCRIPT_WRITER_SYSTEM_PROMPT },
|
|
1665
|
+
{ role: "user", content: buildScriptWriterPrompt(input) }
|
|
1666
|
+
],
|
|
1667
|
+
toolName: SCRIPT_TOOL_NAME,
|
|
1668
|
+
toolDescription: SCRIPT_TOOL_DESCRIPTION,
|
|
1669
|
+
schema: buildScriptSchema({ retainIds: heldLineIds })
|
|
1670
|
+
});
|
|
1671
|
+
const parseOptions = { idPrefix, retainIds: heldLineIds, existingCast };
|
|
1672
|
+
const parsed = parseWrittenScript(answer, parseOptions);
|
|
1673
|
+
// A provider without tool support — or the fake one — falls back to the
|
|
1674
|
+
// brief split into lines, the same rule the Director and the editor
|
|
1675
|
+
// apply. Only a provider failure throws.
|
|
1676
|
+
written =
|
|
1677
|
+
parsed.sections.length > 0
|
|
1678
|
+
? parsed
|
|
1679
|
+
: fallbackScript(input, parseOptions);
|
|
1680
|
+
}
|
|
1681
|
+
const { Script } = await import("@nodetool-ai/models");
|
|
1682
|
+
for (let attempt = 0; attempt < CAS_ATTEMPTS; attempt++) {
|
|
1683
|
+
const current = await loadScript(run, row.id);
|
|
1684
|
+
if (isError(current))
|
|
1685
|
+
return current;
|
|
1686
|
+
const next = current.doc;
|
|
1687
|
+
// A line that comes back with an id the script already carries keeps its
|
|
1688
|
+
// takes: re-voicing a line the writer did not touch would spend money to
|
|
1689
|
+
// produce the same audio.
|
|
1690
|
+
const heldLines = new Map(next.sections
|
|
1691
|
+
.flatMap((section) => section.lines)
|
|
1692
|
+
.map((line) => [line.id, line]));
|
|
1693
|
+
const heldSpeakers = new Map(next.cast.map((speaker) => [speaker.id, speaker]));
|
|
1694
|
+
next.cast = written.cast.map((speaker) => {
|
|
1695
|
+
const kept = heldSpeakers.get(speaker.id);
|
|
1696
|
+
return kept ? { ...kept, name: speaker.name } : { ...speaker };
|
|
1697
|
+
});
|
|
1698
|
+
next.sections = written.sections.map((section) => ({
|
|
1699
|
+
id: section.id,
|
|
1700
|
+
title: section.title,
|
|
1701
|
+
lines: section.lines.map((line) => {
|
|
1702
|
+
const kept = heldLines.get(line.id);
|
|
1703
|
+
const merged = {
|
|
1704
|
+
...kept,
|
|
1705
|
+
id: line.id,
|
|
1706
|
+
speakerId: line.speakerId,
|
|
1707
|
+
text: line.text,
|
|
1708
|
+
takes: kept?.takes ?? []
|
|
1709
|
+
};
|
|
1710
|
+
if (line.direction !== undefined)
|
|
1711
|
+
merged.direction = line.direction;
|
|
1712
|
+
if (line.targetDurationMs !== undefined) {
|
|
1713
|
+
merged.targetDurationMs = line.targetDurationMs;
|
|
1714
|
+
}
|
|
1715
|
+
return merged;
|
|
1716
|
+
})
|
|
1717
|
+
}));
|
|
1718
|
+
if (next.setup) {
|
|
1719
|
+
next.setup.stage = next.setup.stage === "format" ? "review" : next.setup.stage;
|
|
1720
|
+
}
|
|
1721
|
+
const saved = await Script.updateFieldsIfUnchanged(row.id, current.row.updated_at, {
|
|
1722
|
+
document: JSON.stringify(next)
|
|
1723
|
+
});
|
|
1724
|
+
if (!saved)
|
|
1725
|
+
continue;
|
|
1726
|
+
return {
|
|
1727
|
+
script_id: row.id,
|
|
1728
|
+
updated_at: saved.updated_at,
|
|
1729
|
+
rewritten: params["rewrite"] === true,
|
|
1730
|
+
imported: imported !== "",
|
|
1731
|
+
cast: next.cast.map((speaker) => ({
|
|
1732
|
+
id: speaker.id,
|
|
1733
|
+
name: speaker.name
|
|
1734
|
+
})),
|
|
1735
|
+
lines: next.sections.flatMap((section) => section.lines.map((line) => ({
|
|
1736
|
+
id: line.id,
|
|
1737
|
+
section_id: section.id,
|
|
1738
|
+
speaker_id: line.speakerId ?? null,
|
|
1739
|
+
text: line.text,
|
|
1740
|
+
direction: line.direction,
|
|
1741
|
+
take_count: line.takes.length
|
|
1742
|
+
})))
|
|
1743
|
+
};
|
|
1744
|
+
}
|
|
1745
|
+
return {
|
|
1746
|
+
error: `Script ${row.id} was modified while it was being written. Read it again and retry.`
|
|
1747
|
+
};
|
|
1748
|
+
}
|
|
1749
|
+
};
|
|
1750
|
+
/** Every script capability, in the order the tool file declared them. */
|
|
1751
|
+
/**
|
|
1752
|
+
* Delete a script the caller owns.
|
|
1753
|
+
*
|
|
1754
|
+
* The ownership check and the version cascade are `Script.deleteOwned`, the
|
|
1755
|
+
* same function the tRPC route calls — a delete is not a place for two copies
|
|
1756
|
+
* of one rule, and version rows outliving their document would be unreachable
|
|
1757
|
+
* garbage. Missing and not-yours are one answer.
|
|
1758
|
+
*/
|
|
1759
|
+
const deleteScript = {
|
|
1760
|
+
spec: deleteScriptSpec,
|
|
1761
|
+
impl: async (run, params) => {
|
|
1762
|
+
const userId = run.context.userId;
|
|
1763
|
+
if (!userId)
|
|
1764
|
+
return { error: "No user is bound to this session." };
|
|
1765
|
+
const { Script } = await import("@nodetool-ai/models");
|
|
1766
|
+
const id = String(params["script_id"]);
|
|
1767
|
+
const deleted = await Script.deleteOwned(userId, id);
|
|
1768
|
+
return deleted
|
|
1769
|
+
? { script_id: id, deleted: true }
|
|
1770
|
+
: { error: `Script ${id} was not found, or it is not yours.` };
|
|
1771
|
+
}
|
|
1772
|
+
};
|
|
1773
|
+
export const SCRIPT_CAPABILITIES = [
|
|
1774
|
+
listScripts,
|
|
1775
|
+
createScript,
|
|
1776
|
+
getScript,
|
|
1777
|
+
voiceScriptLines,
|
|
1778
|
+
assembleScriptTimeline,
|
|
1779
|
+
editScript,
|
|
1780
|
+
writeScript,
|
|
1781
|
+
deriveStoryboardFromScript,
|
|
1782
|
+
deleteScript
|
|
1783
|
+
];
|
|
1784
|
+
export const module = {
|
|
1785
|
+
module: "scripts",
|
|
1786
|
+
exports: SCRIPT_CAPABILITIES
|
|
1787
|
+
};
|
|
1788
|
+
export { listScripts, createScript, getScript, voiceScriptLines, assembleScriptTimeline, editScript, writeScript, deriveStoryboardFromScript, deleteScript };
|
|
1789
|
+
//# sourceMappingURL=scripts.js.map
|