@nodetool-ai/agents 0.7.0-rc.23 → 0.8.2
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 +224 -0
- package/dist/analysis/audio-dsp.d.ts.map +1 -0
- package/dist/analysis/audio-dsp.js +645 -0
- package/dist/analysis/audio-dsp.js.map +1 -0
- package/dist/analysis/media-decode.d.ts +98 -0
- package/dist/analysis/media-decode.d.ts.map +1 -0
- package/dist/analysis/media-decode.js +226 -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 +90 -0
- package/dist/author-graph.d.ts.map +1 -0
- package/dist/author-graph.js +317 -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/GamePublishRequest.d.ts +14 -0
- package/dist/capabilities/GamePublishRequest.d.ts.map +1 -0
- package/dist/capabilities/GamePublishRequest.js +2 -0
- package/dist/capabilities/GamePublishRequest.js.map +1 -0
- package/dist/capabilities/adapters.d.ts +27 -0
- package/dist/capabilities/adapters.d.ts.map +1 -0
- package/dist/capabilities/adapters.js +39 -0
- package/dist/capabilities/adapters.js.map +1 -0
- package/dist/capabilities/agent-activity.d.ts +27 -0
- package/dist/capabilities/agent-activity.d.ts.map +1 -0
- package/dist/capabilities/agent-activity.js +103 -0
- package/dist/capabilities/agent-activity.js.map +1 -0
- package/dist/capabilities/agentic-storyboard-finish.d.ts +67 -0
- package/dist/capabilities/agentic-storyboard-finish.d.ts.map +1 -0
- package/dist/capabilities/agentic-storyboard-finish.js +1321 -0
- package/dist/capabilities/agentic-storyboard-finish.js.map +1 -0
- package/dist/capabilities/agents.d.ts +81 -0
- package/dist/capabilities/agents.d.ts.map +1 -0
- package/dist/capabilities/agents.js +376 -0
- package/dist/capabilities/agents.js.map +1 -0
- package/dist/capabilities/agents.specs.d.ts +30 -0
- package/dist/capabilities/agents.specs.d.ts.map +1 -0
- package/dist/capabilities/agents.specs.js +313 -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 +823 -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 +415 -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 +62 -0
- package/dist/capabilities/args.d.ts.map +1 -0
- package/dist/capabilities/args.js +215 -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 +61 -0
- package/dist/capabilities/code.d.ts.map +1 -0
- package/dist/capabilities/code.js +366 -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/errors.d.ts +19 -0
- package/dist/capabilities/errors.d.ts.map +1 -0
- package/dist/capabilities/errors.js +109 -0
- package/dist/capabilities/errors.js.map +1 -0
- package/dist/capabilities/errors.specs.d.ts +11 -0
- package/dist/capabilities/errors.specs.d.ts.map +1 -0
- package/dist/capabilities/errors.specs.js +100 -0
- package/dist/capabilities/errors.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 +233 -0
- package/dist/capabilities/example-timelines.js.map +1 -0
- package/dist/capabilities/example-timelines.specs.d.ts +6 -0
- package/dist/capabilities/example-timelines.specs.d.ts.map +1 -0
- package/dist/capabilities/example-timelines.specs.js +71 -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/finish-storyboard.d.ts +5 -0
- package/dist/capabilities/finish-storyboard.d.ts.map +1 -0
- package/dist/capabilities/finish-storyboard.js +278 -0
- package/dist/capabilities/finish-storyboard.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 +24 -0
- package/dist/capabilities/game.d.ts.map +1 -0
- package/dist/capabilities/game.js +1432 -0
- package/dist/capabilities/game.js.map +1 -0
- package/dist/capabilities/game.specs.d.ts +5 -0
- package/dist/capabilities/game.specs.d.ts.map +1 -0
- package/dist/capabilities/game.specs.js +110 -0
- package/dist/capabilities/game.specs.js.map +1 -0
- package/dist/capabilities/game3d.d.ts +17 -0
- package/dist/capabilities/game3d.d.ts.map +1 -0
- package/dist/capabilities/game3d.js +433 -0
- package/dist/capabilities/game3d.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/generations.d.ts +81 -0
- package/dist/capabilities/generations.d.ts.map +1 -0
- package/dist/capabilities/generations.js +387 -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 +78 -0
- package/dist/capabilities/invoke.d.ts.map +1 -0
- package/dist/capabilities/invoke.js +251 -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 +167 -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 +105 -0
- package/dist/capabilities/jobs.specs.js.map +1 -0
- package/dist/capabilities/js-scripts.d.ts +108 -0
- package/dist/capabilities/js-scripts.d.ts.map +1 -0
- package/dist/capabilities/js-scripts.js +807 -0
- package/dist/capabilities/js-scripts.js.map +1 -0
- package/dist/capabilities/js-scripts.specs.d.ts +52 -0
- package/dist/capabilities/js-scripts.specs.d.ts.map +1 -0
- package/dist/capabilities/js-scripts.specs.js +394 -0
- package/dist/capabilities/js-scripts.specs.js.map +1 -0
- package/dist/capabilities/lazy-tool.d.ts +41 -0
- package/dist/capabilities/lazy-tool.d.ts.map +1 -0
- package/dist/capabilities/lazy-tool.js +82 -0
- package/dist/capabilities/lazy-tool.js.map +1 -0
- package/dist/capabilities/legacy-tools.d.ts +15 -0
- package/dist/capabilities/legacy-tools.d.ts.map +1 -0
- package/dist/capabilities/legacy-tools.js +98 -0
- package/dist/capabilities/legacy-tools.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 +112 -0
- package/dist/capabilities/media.d.ts.map +1 -0
- package/dist/capabilities/media.js +2258 -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 +805 -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 +111 -0
- package/dist/capabilities/registry.d.ts.map +1 -0
- package/dist/capabilities/registry.js +473 -0
- package/dist/capabilities/registry.js.map +1 -0
- package/dist/capabilities/run-agent.d.ts +19 -0
- package/dist/capabilities/run-agent.d.ts.map +1 -0
- package/dist/capabilities/run-agent.js +183 -0
- package/dist/capabilities/run-agent.js.map +1 -0
- package/dist/capabilities/runs.d.ts +9 -0
- package/dist/capabilities/runs.d.ts.map +1 -0
- package/dist/capabilities/runs.js +46 -0
- package/dist/capabilities/runs.js.map +1 -0
- package/dist/capabilities/runs.specs.d.ts +39 -0
- package/dist/capabilities/runs.specs.d.ts.map +1 -0
- package/dist/capabilities/runs.specs.js +52 -0
- package/dist/capabilities/runs.specs.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 +1795 -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 +1165 -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 +289 -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/storyboard-layout-check.d.ts +33 -0
- package/dist/capabilities/storyboard-layout-check.d.ts.map +1 -0
- package/dist/capabilities/storyboard-layout-check.js +229 -0
- package/dist/capabilities/storyboard-layout-check.js.map +1 -0
- package/dist/capabilities/storyboard-measured-sources.d.ts +10 -0
- package/dist/capabilities/storyboard-measured-sources.d.ts.map +1 -0
- package/dist/capabilities/storyboard-measured-sources.js +67 -0
- package/dist/capabilities/storyboard-measured-sources.js.map +1 -0
- package/dist/capabilities/storyboard-review-times.d.ts +4 -0
- package/dist/capabilities/storyboard-review-times.d.ts.map +1 -0
- package/dist/capabilities/storyboard-review-times.js +39 -0
- package/dist/capabilities/storyboard-review-times.js.map +1 -0
- package/dist/capabilities/storyboards.d.ts +52 -0
- package/dist/capabilities/storyboards.d.ts.map +1 -0
- package/dist/capabilities/storyboards.js +2467 -0
- package/dist/capabilities/storyboards.js.map +1 -0
- package/dist/capabilities/storyboards.specs.d.ts +45 -0
- package/dist/capabilities/storyboards.specs.d.ts.map +1 -0
- package/dist/capabilities/storyboards.specs.js +457 -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-bridge.d.ts +359 -0
- package/dist/capabilities/timeline-bridge.d.ts.map +1 -0
- package/dist/capabilities/timeline-bridge.js +1016 -0
- package/dist/capabilities/timeline-bridge.js.map +1 -0
- package/dist/capabilities/timeline-clip-frames.d.ts +17 -0
- package/dist/capabilities/timeline-clip-frames.d.ts.map +1 -0
- package/dist/capabilities/timeline-clip-frames.js +84 -0
- package/dist/capabilities/timeline-clip-frames.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-media-edit.d.ts +8 -0
- package/dist/capabilities/timeline-media-edit.d.ts.map +1 -0
- package/dist/capabilities/timeline-media-edit.js +94 -0
- package/dist/capabilities/timeline-media-edit.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 +960 -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 +250 -0
- package/dist/capabilities/timelines.d.ts.map +1 -0
- package/dist/capabilities/timelines.js +2825 -0
- package/dist/capabilities/timelines.js.map +1 -0
- package/dist/capabilities/timelines.specs.d.ts +142 -0
- package/dist/capabilities/timelines.specs.d.ts.map +1 -0
- package/dist/capabilities/timelines.specs.js +1527 -0
- package/dist/capabilities/timelines.specs.js.map +1 -0
- package/dist/capabilities/types.d.ts +199 -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 +150 -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 +1557 -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 +858 -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 +197 -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 +1184 -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 +81 -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 +407 -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 +1974 -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 +200 -0
- package/dist/codeact/tool-api.d.ts.map +1 -0
- package/dist/codeact/tool-api.js +452 -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 +31 -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-runs.d.ts +3 -0
- package/dist/evals/codeact-api-runs.d.ts.map +1 -0
- package/dist/evals/codeact-api-runs.js +33 -0
- package/dist/evals/codeact-api-runs.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 +126 -0
- package/dist/evals/surfaces/sketch.d.ts.map +1 -0
- package/dist/evals/surfaces/sketch.js +1306 -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 +63 -0
- package/dist/evals/surfaces/timeline.d.ts.map +1 -0
- package/dist/evals/surfaces/timeline.js +655 -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 +61 -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 +236 -0
- package/dist/evals/tool-loop-eval.d.ts.map +1 -0
- package/dist/evals/tool-loop-eval.js +378 -0
- package/dist/evals/tool-loop-eval.js.map +1 -0
- package/dist/evals/tool-loop-permission.d.ts +29 -0
- package/dist/evals/tool-loop-permission.d.ts.map +1 -0
- package/dist/evals/tool-loop-permission.js +58 -0
- package/dist/evals/tool-loop-permission.js.map +1 -0
- package/dist/game-authoring.d.ts +4737 -0
- package/dist/game-authoring.d.ts.map +1 -0
- package/dist/game-authoring.js +146 -0
- package/dist/game-authoring.js.map +1 -0
- package/dist/game-code-bake.d.ts +26 -0
- package/dist/game-code-bake.d.ts.map +1 -0
- package/dist/game-code-bake.js +98 -0
- package/dist/game-code-bake.js.map +1 -0
- package/dist/game-examples.d.ts +1303 -0
- package/dist/game-examples.d.ts.map +1 -0
- package/dist/game-examples.js +188 -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 +208 -60
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +163 -60
- package/dist/index.js.map +1 -1
- package/dist/js-sandbox-worker/engine.d.ts +4 -0
- package/dist/js-sandbox-worker/engine.d.ts.map +1 -0
- package/dist/js-sandbox-worker/engine.js +45 -0
- package/dist/js-sandbox-worker/engine.js.map +1 -0
- 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 +1293 -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 +308 -0
- package/dist/js-sandbox-worker/worker-entry.js.map +1 -0
- package/dist/js-sandbox.d.ts +457 -15
- package/dist/js-sandbox.d.ts.map +1 -1
- package/dist/js-sandbox.js +2008 -311
- package/dist/js-sandbox.js.map +1 -1
- package/dist/js-script-app-runner.d.ts +11 -0
- package/dist/js-script-app-runner.d.ts.map +1 -0
- package/dist/js-script-app-runner.js +54 -0
- package/dist/js-script-app-runner.js.map +1 -0
- package/dist/js-script-sandbox.d.ts +27 -0
- package/dist/js-script-sandbox.d.ts.map +1 -0
- package/dist/js-script-sandbox.js +36 -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 +120 -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-pack-resolution.d.ts +21 -0
- package/dist/sandbox-pack-resolution.d.ts.map +1 -0
- package/dist/sandbox-pack-resolution.js +42 -0
- package/dist/sandbox-pack-resolution.js.map +1 -0
- package/dist/sandbox-toolbelt.d.ts +15 -0
- package/dist/sandbox-toolbelt.d.ts.map +1 -0
- package/dist/sandbox-toolbelt.js +70 -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 +37 -0
- package/dist/skill-prompt.d.ts.map +1 -0
- package/dist/skill-prompt.js +72 -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 +74 -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-capture.d.ts +21 -0
- package/dist/timeline-capture.d.ts.map +1 -0
- package/dist/timeline-capture.js +564 -0
- package/dist/timeline-capture.js.map +1 -0
- package/dist/timeline-code-bake.d.ts +75 -0
- package/dist/timeline-code-bake.d.ts.map +1 -0
- package/dist/timeline-code-bake.js +327 -0
- package/dist/timeline-code-bake.js.map +1 -0
- 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 +193 -0
- package/dist/timeline-preview/frames.d.ts.map +1 -0
- package/dist/timeline-preview/frames.js +731 -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 +53 -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 +289 -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 +204 -0
- package/dist/tools/mcp-tool-support.d.ts.map +1 -0
- package/dist/tools/mcp-tool-support.js +537 -0
- package/dist/tools/mcp-tool-support.js.map +1 -0
- package/dist/tools/mcp-tools.d.ts +106 -390
- package/dist/tools/mcp-tools.d.ts.map +1 -1
- package/dist/tools/mcp-tools.js +132 -601
- 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/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 +114 -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,1432 @@
|
|
|
1
|
+
import { createHash, randomUUID } from "node:crypto";
|
|
2
|
+
import { mkdtemp, readFile, readdir, rm } from "node:fs/promises";
|
|
3
|
+
import { join } from "node:path";
|
|
4
|
+
import { createLogger, getManagedWorkspaceDir, managedWorkspaceKey, workspaceStorageKind } from "@nodetool-ai/config";
|
|
5
|
+
import { AmbiguousGameIdError, Asset, Game, Prediction, Project, Workspace } from "@nodetool-ai/models";
|
|
6
|
+
import { anyGameAssetBinding as gameAssetBinding, gameAssetBinding as legacyAssetBinding, gameAssetBinding3D, anyGameDocument as gameDocument, gameInputFrame, shortResourceId } from "@nodetool-ai/protocol";
|
|
7
|
+
import { autoplayNativeGame, MAX_GAME_ROUTE_TICKS, createScriptedGameSession, createTopDownRoomGame, createNative3DGame, decodePreparedGameCollider3D, validateAnyGame, trackGameAuthoringEdits, anyGameDocumentOp as gameDocumentOp, GameOpError } from "@nodetool-ai/game-runtime";
|
|
8
|
+
import { workspaceFromRow } from "@nodetool-ai/execution/service";
|
|
9
|
+
import { assetKeyCandidates, assetObjectKey } from "@nodetool-ai/storage";
|
|
10
|
+
import { gameOutline3D, inputFrames3D, playtestGame3D, captureFrames3D, colliderBinding3D, stageModelGameAsset3D } from "./game3d.js";
|
|
11
|
+
import { gameSpecs } from "./game.specs.js";
|
|
12
|
+
import { persistOutput } from "../tools/asset-persist.js";
|
|
13
|
+
import { getExampleGameBundle, installExampleGameAssets, listExampleGames } from "../game-examples.js";
|
|
14
|
+
import { previewGameAuthoring, applyGameAuthoring } from "../game-authoring.js";
|
|
15
|
+
import { gameDocumentDigest } from "../game-code-bake.js";
|
|
16
|
+
import { previewGameAuthoringSpec, applyGameAuthoringSpec } from "./game.specs.js";
|
|
17
|
+
const log = createLogger("capabilities.game");
|
|
18
|
+
const MAX_PLAYTEST_TICKS = MAX_GAME_ROUTE_TICKS;
|
|
19
|
+
const MAX_CAPTURE_FRAMES = 8;
|
|
20
|
+
const MAX_BUILD_ASSETS = 128;
|
|
21
|
+
const MAX_BUILD_ASSET_BYTES = 64 * 1024 * 1024;
|
|
22
|
+
const MAX_BUILD_BYTES = 256 * 1024 * 1024;
|
|
23
|
+
const MAX_BUILD_FILES = 256;
|
|
24
|
+
const MEDIA_EXTENSIONS = {
|
|
25
|
+
"image/png": "png",
|
|
26
|
+
"image/jpeg": "jpg",
|
|
27
|
+
"image/webp": "webp",
|
|
28
|
+
"audio/wav": "wav",
|
|
29
|
+
"audio/ogg": "ogg",
|
|
30
|
+
"audio/mpeg": "mp3",
|
|
31
|
+
"font/ttf": "ttf",
|
|
32
|
+
"font/otf": "otf",
|
|
33
|
+
"model/gltf-binary": "glb",
|
|
34
|
+
"application/json": "json"
|
|
35
|
+
};
|
|
36
|
+
function userId(run) {
|
|
37
|
+
return run.context.userId ?? null;
|
|
38
|
+
}
|
|
39
|
+
async function ownedGame(user, id) {
|
|
40
|
+
try {
|
|
41
|
+
const game = await Game.findOwned(user, id);
|
|
42
|
+
return game && (await Project.findOwned(user, game.project_id)) ? game : null;
|
|
43
|
+
}
|
|
44
|
+
catch (error) {
|
|
45
|
+
if (error instanceof AmbiguousGameIdError)
|
|
46
|
+
return null;
|
|
47
|
+
throw error;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
function openWorkspace(row) {
|
|
51
|
+
return workspaceFromRow(row);
|
|
52
|
+
}
|
|
53
|
+
async function workspaceOf(user, game) {
|
|
54
|
+
const row = await Workspace.find(user, game.workspace_id);
|
|
55
|
+
return row && row.project_id === game.project_id ? openWorkspace(row) : null;
|
|
56
|
+
}
|
|
57
|
+
async function projectWorkspace(user, projectId) {
|
|
58
|
+
const existing = (await Workspace.listByProject(user, projectId))
|
|
59
|
+
.find((row) => row.isAccessible() && (process.env["NODETOOL_ENV"] !== "production" || row.isManaged()));
|
|
60
|
+
if (existing)
|
|
61
|
+
return existing;
|
|
62
|
+
const defaultRow = await Workspace.ensureDefault(user);
|
|
63
|
+
const managedPath = workspaceStorageKind() === "cloud"
|
|
64
|
+
? managedWorkspaceKey(user)
|
|
65
|
+
: getManagedWorkspaceDir(user);
|
|
66
|
+
const rootRow = defaultRow.isManaged() ? defaultRow : new Workspace({
|
|
67
|
+
user_id: user,
|
|
68
|
+
name: "Managed workspace",
|
|
69
|
+
path: managedPath,
|
|
70
|
+
is_default: false
|
|
71
|
+
});
|
|
72
|
+
const root = openWorkspace(rootRow);
|
|
73
|
+
if (!root)
|
|
74
|
+
return null;
|
|
75
|
+
const segment = createHash("sha256").update(projectId).digest("hex");
|
|
76
|
+
await root.mkdir(`projects/${segment}`);
|
|
77
|
+
const path = rootRow.isVirtual()
|
|
78
|
+
? `${rootRow.path}/projects/${segment}`
|
|
79
|
+
: join(rootRow.path, "projects", segment);
|
|
80
|
+
return (await Workspace.create({
|
|
81
|
+
user_id: user,
|
|
82
|
+
project_id: projectId,
|
|
83
|
+
name: "Game workspace",
|
|
84
|
+
path,
|
|
85
|
+
is_default: false
|
|
86
|
+
}));
|
|
87
|
+
}
|
|
88
|
+
function revisionPath(game, revision) {
|
|
89
|
+
return `${game.source_root}/revisions/${revision}/game.json`;
|
|
90
|
+
}
|
|
91
|
+
async function readDocument(workspace, game, revision) {
|
|
92
|
+
if (!/^[a-f0-9]{32}$/.test(revision))
|
|
93
|
+
return null;
|
|
94
|
+
const raw = await workspace.readText(revisionPath(game, revision));
|
|
95
|
+
if (raw === null)
|
|
96
|
+
return null;
|
|
97
|
+
const parsed = gameDocument.safeParse(JSON.parse(raw));
|
|
98
|
+
return parsed.success && parsed.data.id === game.id && parsed.data.revision === revision
|
|
99
|
+
? parsed.data
|
|
100
|
+
: null;
|
|
101
|
+
}
|
|
102
|
+
async function readSource(workspace, game, source, revision) {
|
|
103
|
+
if (source !== undefined && source !== "draft" && source !== "revision")
|
|
104
|
+
return null;
|
|
105
|
+
if (source === "revision" || revision !== undefined) {
|
|
106
|
+
return readDocument(workspace, game, typeof revision === "string" ? revision : game.current_revision);
|
|
107
|
+
}
|
|
108
|
+
const draft = await Game.readDraft(game.user_id, game.id, workspace);
|
|
109
|
+
return draft?.document ?? null;
|
|
110
|
+
}
|
|
111
|
+
function outline(document) {
|
|
112
|
+
if (document.schemaVersion === 3) {
|
|
113
|
+
return gameOutline3D(document);
|
|
114
|
+
}
|
|
115
|
+
return {
|
|
116
|
+
settings: {
|
|
117
|
+
schemaVersion: document.schemaVersion,
|
|
118
|
+
entrySceneId: document.entrySceneId,
|
|
119
|
+
pixelsPerUnit: document.pixelsPerUnit,
|
|
120
|
+
tickRate: document.tickRate,
|
|
121
|
+
inputActions: document.inputActions,
|
|
122
|
+
collisionLayers: document.collisionLayers,
|
|
123
|
+
renderEffects: document.renderEffects,
|
|
124
|
+
hudEffectOrder: document.hudEffectOrder
|
|
125
|
+
},
|
|
126
|
+
scenes: document.scenes.map((scene) => ({
|
|
127
|
+
id: scene.id,
|
|
128
|
+
name: scene.name,
|
|
129
|
+
music: scene.music,
|
|
130
|
+
lighting: scene.lighting,
|
|
131
|
+
backgrounds: scene.backgrounds,
|
|
132
|
+
entities: scene.entities.map((entity) => ({
|
|
133
|
+
id: entity.id,
|
|
134
|
+
name: entity.name,
|
|
135
|
+
parentId: entity.parentId,
|
|
136
|
+
components: Object.keys(entity).filter((key) => !["id", "name", "parentId", "behaviors", "templateOnly"].includes(key)),
|
|
137
|
+
behaviorKinds: entity.behaviors.map((behavior) => behavior.kind),
|
|
138
|
+
scriptBytes: entity.behaviors.reduce((total, behavior) => total + (behavior.kind === "script" ? Buffer.byteLength(behavior.source) : 0), 0)
|
|
139
|
+
}))
|
|
140
|
+
})),
|
|
141
|
+
assets: Object.fromEntries(Object.entries(document.assets).map(([slot, asset]) => [slot, { mediaKind: asset.mediaKind, width: asset.width, height: asset.height, assetId: asset.assetId }]))
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
function inputFrames(value, requiredTicks = 0) {
|
|
145
|
+
if (value === undefined)
|
|
146
|
+
value = [];
|
|
147
|
+
if (!Array.isArray(value))
|
|
148
|
+
return { error: "inputs must be an array" };
|
|
149
|
+
const frames = [];
|
|
150
|
+
for (const item of value) {
|
|
151
|
+
const parsed = gameInputFrame.safeParse(item);
|
|
152
|
+
if (!parsed.success)
|
|
153
|
+
return { error: "Invalid input frame" };
|
|
154
|
+
const repeats = typeof item === "object" && item !== null && "ticks" in item ? item.ticks : 1;
|
|
155
|
+
if (!Number.isSafeInteger(repeats) || typeof repeats !== "number" || repeats < 1 || frames.length + repeats > MAX_PLAYTEST_TICKS) {
|
|
156
|
+
return { error: `inputs must total at most ${MAX_PLAYTEST_TICKS} ticks` };
|
|
157
|
+
}
|
|
158
|
+
for (let index = 0; index < repeats; index += 1) {
|
|
159
|
+
frames.push({ pressed: parsed.data.pressed, justPressed: index === 0 ? parsed.data.justPressed : [] });
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
if (requiredTicks > MAX_PLAYTEST_TICKS)
|
|
163
|
+
return { error: `inputs must total at most ${MAX_PLAYTEST_TICKS} ticks` };
|
|
164
|
+
while (frames.length < requiredTicks)
|
|
165
|
+
frames.push({ pressed: [], justPressed: [] });
|
|
166
|
+
return frames;
|
|
167
|
+
}
|
|
168
|
+
function captureTicks(value, fallback) {
|
|
169
|
+
const ticks = value === undefined ? fallback : value;
|
|
170
|
+
if (!Array.isArray(ticks) || ticks.length > MAX_CAPTURE_FRAMES || ticks.some((tick) => !Number.isSafeInteger(tick) || tick < 0 || tick > MAX_PLAYTEST_TICKS)) {
|
|
171
|
+
return { error: `ticks must contain at most ${MAX_CAPTURE_FRAMES} values between 0 and ${MAX_PLAYTEST_TICKS}` };
|
|
172
|
+
}
|
|
173
|
+
return [...new Set(ticks)].sort((a, b) => a - b);
|
|
174
|
+
}
|
|
175
|
+
async function captureFrames(run, user, document, ticks, inputs, seed, options) {
|
|
176
|
+
const started = Date.now();
|
|
177
|
+
const deadlineAt = options.deadlineAt ?? started + 15_000;
|
|
178
|
+
let cancelled = false;
|
|
179
|
+
let wallTimeLimited = false;
|
|
180
|
+
let simulatedTicks = 0;
|
|
181
|
+
const budgetReached = () => {
|
|
182
|
+
cancelled = run.context.signal?.aborted === true;
|
|
183
|
+
wallTimeLimited = Date.now() >= deadlineAt;
|
|
184
|
+
return cancelled || wallTimeLimited;
|
|
185
|
+
};
|
|
186
|
+
const { captureGameFrame } = await import("@nodetool-ai/game-renderer/node");
|
|
187
|
+
const diagnostics = [];
|
|
188
|
+
const storage = run.context.assetStorage;
|
|
189
|
+
const assetCache = new Map();
|
|
190
|
+
const resolveAsset = async (slot) => {
|
|
191
|
+
const binding = document.assets[slot];
|
|
192
|
+
const assetId = binding?.assetId;
|
|
193
|
+
if (!assetId || !/^[a-f0-9]{32}$/.test(assetId) || !storage)
|
|
194
|
+
return null;
|
|
195
|
+
if (assetCache.has(assetId))
|
|
196
|
+
return assetCache.get(assetId) ?? null;
|
|
197
|
+
const asset = await Asset.find(user, assetId);
|
|
198
|
+
const extension = asset && MEDIA_EXTENSIONS[asset.content_type];
|
|
199
|
+
let bytes = null;
|
|
200
|
+
if (extension) {
|
|
201
|
+
for (const key of assetKeyCandidates(user, `${assetId}.${extension}`)) {
|
|
202
|
+
bytes = await storage.retrieve(storage.uriForKey(key));
|
|
203
|
+
if (bytes)
|
|
204
|
+
break;
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
assetCache.set(assetId, bytes);
|
|
208
|
+
return bytes;
|
|
209
|
+
};
|
|
210
|
+
const session = await createScriptedGameSession(document, seed);
|
|
211
|
+
const entries = [];
|
|
212
|
+
try {
|
|
213
|
+
for (const tick of ticks) {
|
|
214
|
+
if (budgetReached()) {
|
|
215
|
+
break;
|
|
216
|
+
}
|
|
217
|
+
while (simulatedTicks < tick) {
|
|
218
|
+
if (simulatedTicks % 240 === 0) {
|
|
219
|
+
await new Promise((resolve) => setTimeout(resolve, 0));
|
|
220
|
+
}
|
|
221
|
+
if (budgetReached()) {
|
|
222
|
+
break;
|
|
223
|
+
}
|
|
224
|
+
simulatedTicks = session.step(inputs[simulatedTicks] ?? { pressed: [], justPressed: [] }).tick;
|
|
225
|
+
}
|
|
226
|
+
if (budgetReached()) {
|
|
227
|
+
break;
|
|
228
|
+
}
|
|
229
|
+
let frame = session.frame();
|
|
230
|
+
const camera = options.camera;
|
|
231
|
+
if (camera && typeof camera === "object") {
|
|
232
|
+
const c = camera;
|
|
233
|
+
if ([c.x, c.y, c.zoom].every((value) => typeof value === "number" && Number.isFinite(value)) && c.zoom > 0) {
|
|
234
|
+
frame = { ...frame, camera: { x: c.x, y: c.y, zoom: c.zoom } };
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
const scale = typeof options.scale === "number" && Number.isFinite(options.scale) && options.scale > 0 && options.scale <= 4 ? options.scale : 1;
|
|
238
|
+
const start = diagnostics.length;
|
|
239
|
+
let png;
|
|
240
|
+
try {
|
|
241
|
+
png = await captureGameFrame(frame, { resolveAsset, scale, effects: document.renderEffects, hudEffectOrder: document.hudEffectOrder, backend: document.renderEffects?.length ? "webgpu" : "canvas2d", onDiagnostic: (message) => diagnostics.push(message) });
|
|
242
|
+
}
|
|
243
|
+
catch (error) {
|
|
244
|
+
diagnostics.push(`WebGPU capture failed: ${error instanceof Error ? error.message : String(error)}`);
|
|
245
|
+
png = await captureGameFrame(frame, { resolveAsset, scale, backend: "canvas2d", onDiagnostic: (message) => diagnostics.push(message) });
|
|
246
|
+
}
|
|
247
|
+
if (budgetReached()) {
|
|
248
|
+
break;
|
|
249
|
+
}
|
|
250
|
+
const pixelScale = frame.pixelsPerUnit * frame.camera.zoom * scale;
|
|
251
|
+
const overlays = Array.isArray(options.overlays) ? options.overlays.filter((value) => typeof value === "string") : [];
|
|
252
|
+
if (overlays.length > 0) {
|
|
253
|
+
const { createCanvas, loadImage } = await import("@napi-rs/canvas");
|
|
254
|
+
const source = await loadImage(Buffer.from(png));
|
|
255
|
+
const canvas = createCanvas(source.width, source.height);
|
|
256
|
+
const context = canvas.getContext("2d");
|
|
257
|
+
context.drawImage(source, 0, 0);
|
|
258
|
+
context.lineWidth = 2;
|
|
259
|
+
context.strokeStyle = "#ffcc00";
|
|
260
|
+
context.fillStyle = "#ffcc00";
|
|
261
|
+
context.font = "14px sans-serif";
|
|
262
|
+
const sx = (x) => canvas.width / 2 + (x - frame.camera.x) * pixelScale;
|
|
263
|
+
const sy = (y) => canvas.height / 2 - (y - frame.camera.y) * pixelScale;
|
|
264
|
+
const definitions = new Map(document.scenes.flatMap((scene) => scene.entities.map((entity) => [entity.id, entity])));
|
|
265
|
+
for (const sprite of frame.sprites) {
|
|
266
|
+
const entity = definitions.get(sprite.entityId);
|
|
267
|
+
if (overlays.includes("ids"))
|
|
268
|
+
context.fillText(sprite.entityId, sx(sprite.x), sy(sprite.y));
|
|
269
|
+
if (overlays.includes("colliders") && entity?.collider2d) {
|
|
270
|
+
const collider = entity.collider2d;
|
|
271
|
+
context.strokeRect(sx(sprite.x - collider.width / 2), sy(sprite.y + collider.height / 2), collider.width * pixelScale, collider.height * pixelScale);
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
if (overlays.includes("lights") && frame.lighting) {
|
|
275
|
+
for (const light of frame.lighting.points) {
|
|
276
|
+
context.beginPath();
|
|
277
|
+
context.arc(sx(light.x), sy(light.y), light.radius * pixelScale, 0, Math.PI * 2);
|
|
278
|
+
context.stroke();
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
if (overlays.includes("camera_bounds"))
|
|
282
|
+
context.strokeRect(0, 0, canvas.width, canvas.height);
|
|
283
|
+
png = canvas.toBuffer("image/png");
|
|
284
|
+
}
|
|
285
|
+
entries.push({ tick, png, visible_entities: frame.sprites.map((sprite) => ({
|
|
286
|
+
id: sprite.entityId,
|
|
287
|
+
x: Math.round(frame.width * frame.pixelsPerUnit * scale / 2 + (sprite.x - frame.camera.x) * pixelScale),
|
|
288
|
+
y: Math.round(frame.height * frame.pixelsPerUnit * scale / 2 - (sprite.y - frame.camera.y) * pixelScale),
|
|
289
|
+
width: Math.round(sprite.width * sprite.scaleX * pixelScale),
|
|
290
|
+
height: Math.round(sprite.height * sprite.scaleY * pixelScale)
|
|
291
|
+
})), hud_texts: frame.hud.map((label) => label.text), diagnostics: diagnostics.slice(start) });
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
finally {
|
|
295
|
+
session.dispose();
|
|
296
|
+
}
|
|
297
|
+
const outcome = {
|
|
298
|
+
ticks: simulatedTicks,
|
|
299
|
+
cancelled,
|
|
300
|
+
wall_time_limited: wallTimeLimited,
|
|
301
|
+
route_complete: !cancelled && !wallTimeLimited && entries.length === ticks.length,
|
|
302
|
+
wall_time_ms: Date.now() - started
|
|
303
|
+
};
|
|
304
|
+
if (options.sheet && entries.length > 1) {
|
|
305
|
+
const { composeContactSheet } = await import("../timeline-preview/sheet.js");
|
|
306
|
+
const sheet = await composeContactSheet(entries.map((entry) => ({ label: `Tick ${entry.tick}`, png: entry.png })));
|
|
307
|
+
const saved = await persistOutput(run.context, sheet.png, { namePrefix: `game-${document.id}-sheet`, mime: "image/png" });
|
|
308
|
+
return { ...outcome, image: { type: "image", asset_id: saved.asset_id, uri: saved.asset_uri ?? saved.path, path: saved.path, mime_type: saved.mime_type }, frames: entries.map(({ tick, visible_entities, hud_texts, diagnostics }) => ({ tick, visible_entities, hud_texts, diagnostics })) };
|
|
309
|
+
}
|
|
310
|
+
const frames = [];
|
|
311
|
+
for (const entry of entries) {
|
|
312
|
+
const saved = await persistOutput(run.context, entry.png, { namePrefix: `game-${document.id}-tick-${entry.tick}`, mime: "image/png" });
|
|
313
|
+
frames.push({ tick: entry.tick, image: { type: "image", asset_id: saved.asset_id, uri: saved.asset_uri ?? saved.path, path: saved.path, mime_type: saved.mime_type }, visible_entities: entry.visible_entities, hud_texts: entry.hud_texts, diagnostics: entry.diagnostics });
|
|
314
|
+
}
|
|
315
|
+
return { ...outcome, frames };
|
|
316
|
+
}
|
|
317
|
+
function validateSource(source, gameId, revision) {
|
|
318
|
+
const parsed = gameDocument.safeParse(source);
|
|
319
|
+
if (!parsed.success)
|
|
320
|
+
return { error: parsed.error.message };
|
|
321
|
+
const result = validateAnyGame({ ...parsed.data, id: gameId, revision });
|
|
322
|
+
return result.valid ? result.document : { error: result.diagnostics.map((issue) => `${issue.code} ${issue.path.join(".")}: ${issue.message}`).join("; ") };
|
|
323
|
+
}
|
|
324
|
+
function summary(game) {
|
|
325
|
+
return {
|
|
326
|
+
id: game.id,
|
|
327
|
+
name: game.name,
|
|
328
|
+
revision: game.current_revision,
|
|
329
|
+
workspace_id: game.workspace_id
|
|
330
|
+
};
|
|
331
|
+
}
|
|
332
|
+
async function publish(user, game, request) {
|
|
333
|
+
const baseRevision = request.base_revision;
|
|
334
|
+
if (game.current_revision !== baseRevision)
|
|
335
|
+
return { error: "Game was modified concurrently", current_revision: game.current_revision };
|
|
336
|
+
const revision = randomUUID().replace(/-/g, "");
|
|
337
|
+
const workspace = await workspaceOf(user, game);
|
|
338
|
+
if (!workspace)
|
|
339
|
+
return { error: "Game workspace is unavailable" };
|
|
340
|
+
const draft = await Game.readDraft(user, game.id, workspace);
|
|
341
|
+
if (!draft)
|
|
342
|
+
return { error: "Game draft not found" };
|
|
343
|
+
const draftToken = request.document ? request.base_updated_at : draft.game.draft_updated_at;
|
|
344
|
+
if (draftToken !== draft.game.draft_updated_at) {
|
|
345
|
+
return { error: "Game draft was modified concurrently" };
|
|
346
|
+
}
|
|
347
|
+
let document = validateSource(request.document ?? draft.document, game.id, revision);
|
|
348
|
+
if ("error" in document)
|
|
349
|
+
return document;
|
|
350
|
+
if ((document.schemaVersion === 3) !== (draft.document.schemaVersion === 3)) {
|
|
351
|
+
return { error: "A game cannot change dimension" };
|
|
352
|
+
}
|
|
353
|
+
if (gameDocumentDigest(document.authoring) !== gameDocumentDigest(draft.document.authoring)) {
|
|
354
|
+
return { error: "Retained authoring metadata must be updated through construction preview and apply" };
|
|
355
|
+
}
|
|
356
|
+
document = trackGameAuthoringEdits(draft.document, document);
|
|
357
|
+
const checked = validateAnyGame(document);
|
|
358
|
+
if (!checked.valid) {
|
|
359
|
+
return { error: "Game publication rejected", diagnostics: checked.diagnostics };
|
|
360
|
+
}
|
|
361
|
+
await workspace.write(revisionPath(game, revision), JSON.stringify(document), "application/json");
|
|
362
|
+
const updated = await Game.publish(user, game.id, baseRevision, revision, draftToken, workspace, request.message);
|
|
363
|
+
if (!updated) {
|
|
364
|
+
try {
|
|
365
|
+
await workspace.delete(revisionPath(game, revision));
|
|
366
|
+
}
|
|
367
|
+
catch (error) {
|
|
368
|
+
log.error("Losing game publication revision cleanup failed", { gameId: game.id, revision, error: String(error) });
|
|
369
|
+
}
|
|
370
|
+
return { error: "Game was modified concurrently" };
|
|
371
|
+
}
|
|
372
|
+
try {
|
|
373
|
+
await Game.pruneRevisionFiles(user, game.id, workspace);
|
|
374
|
+
}
|
|
375
|
+
catch (error) {
|
|
376
|
+
log.error("Game publication revision cleanup failed", { gameId: game.id, error: String(error) });
|
|
377
|
+
}
|
|
378
|
+
return { game: summary(updated), document };
|
|
379
|
+
}
|
|
380
|
+
const create = {
|
|
381
|
+
spec: gameSpecs[0],
|
|
382
|
+
impl: async (run, args) => {
|
|
383
|
+
const user = userId(run);
|
|
384
|
+
const projectId = args["project_id"];
|
|
385
|
+
const name = args["name"];
|
|
386
|
+
if (!user || typeof projectId !== "string" || typeof name !== "string" || !name.trim()) {
|
|
387
|
+
return { error: "project_id and name are required in a user session" };
|
|
388
|
+
}
|
|
389
|
+
const dimension = args["dimension"];
|
|
390
|
+
if (dimension !== undefined && dimension !== "2d" && dimension !== "3d") {
|
|
391
|
+
return { error: "dimension must be 2d or 3d" };
|
|
392
|
+
}
|
|
393
|
+
if (args["template"] !== undefined && args["template"] !== "exploration" && args["template"] !== "topdown") {
|
|
394
|
+
return { error: "Unknown native game template" };
|
|
395
|
+
}
|
|
396
|
+
if (args["template"] !== undefined && args["template"] !== (dimension === "3d" ? "exploration" : "topdown")) {
|
|
397
|
+
return { error: "Template does not match the requested dimension" };
|
|
398
|
+
}
|
|
399
|
+
const created = await createNativeGame(user, projectId, name.trim(), undefined, dimension ?? "2d");
|
|
400
|
+
return "error" in created
|
|
401
|
+
? created
|
|
402
|
+
: { game: summary(created.game), document: created.document };
|
|
403
|
+
}
|
|
404
|
+
};
|
|
405
|
+
export async function createNativeGame(user, projectId, name, source, dimension = "2d") {
|
|
406
|
+
if (source?.authoring) {
|
|
407
|
+
return { error: "Attach retained construction through preview and apply after creating the game" };
|
|
408
|
+
}
|
|
409
|
+
const project = await Project.findOwned(user, projectId);
|
|
410
|
+
if (!project)
|
|
411
|
+
return { error: "Project not found" };
|
|
412
|
+
const workspaceRow = await projectWorkspace(user, project.id);
|
|
413
|
+
const workspace = workspaceRow && openWorkspace(workspaceRow);
|
|
414
|
+
if (!workspace || !workspaceRow)
|
|
415
|
+
return { error: "Project workspace is unavailable" };
|
|
416
|
+
const id = randomUUID().replace(/-/g, "");
|
|
417
|
+
const revision = randomUUID().replace(/-/g, "");
|
|
418
|
+
const document = validateSource(source ?? (dimension === "3d" ? createNative3DGame(id) : { ...createTopDownRoomGame(id), schemaVersion: 2 }), id, revision);
|
|
419
|
+
if ("error" in document)
|
|
420
|
+
return document;
|
|
421
|
+
if (source && ((document.schemaVersion === 3) !== (dimension === "3d"))) {
|
|
422
|
+
return { error: "Supplied document does not match the requested dimension" };
|
|
423
|
+
}
|
|
424
|
+
const game = new Game({
|
|
425
|
+
id,
|
|
426
|
+
user_id: user,
|
|
427
|
+
project_id: project.id,
|
|
428
|
+
workspace_id: workspaceRow.id,
|
|
429
|
+
name: name.trim(),
|
|
430
|
+
current_revision: revision
|
|
431
|
+
});
|
|
432
|
+
await workspace.write(revisionPath(game, revision), JSON.stringify(document), "application/json");
|
|
433
|
+
const inserted = await Game.insertNew({
|
|
434
|
+
id,
|
|
435
|
+
userId: user,
|
|
436
|
+
projectId: project.id,
|
|
437
|
+
workspaceId: workspaceRow.id,
|
|
438
|
+
name: name.trim(),
|
|
439
|
+
revision
|
|
440
|
+
});
|
|
441
|
+
return inserted ? { game: inserted, document } : { error: "Game id collision" };
|
|
442
|
+
}
|
|
443
|
+
const get = {
|
|
444
|
+
spec: gameSpecs[1],
|
|
445
|
+
impl: async (run, args) => {
|
|
446
|
+
const user = userId(run);
|
|
447
|
+
const id = args["game_id"];
|
|
448
|
+
if (!user || typeof id !== "string")
|
|
449
|
+
return { error: "game_id is required in a user session" };
|
|
450
|
+
let game = await ownedGame(user, id);
|
|
451
|
+
if (!game)
|
|
452
|
+
return { error: "Game not found" };
|
|
453
|
+
const workspace = await workspaceOf(user, game);
|
|
454
|
+
if (!workspace)
|
|
455
|
+
return { error: "Game workspace is unavailable" };
|
|
456
|
+
const readsDraft = (args["source"] === undefined || args["source"] === "draft") && args["revision"] === undefined;
|
|
457
|
+
const draft = readsDraft ? await Game.readDraft(user, game.id, workspace) : null;
|
|
458
|
+
const document = readsDraft ? draft?.document : await readSource(workspace, game, args["source"], args["revision"]);
|
|
459
|
+
if (draft) {
|
|
460
|
+
game = draft.game;
|
|
461
|
+
}
|
|
462
|
+
if (!document)
|
|
463
|
+
return { error: "Game source not found" };
|
|
464
|
+
const view = args["view"] ?? "outline";
|
|
465
|
+
if (view === "full")
|
|
466
|
+
return { game: summary(game), draft_updated_at: game.draft_updated_at, document };
|
|
467
|
+
if (view === "outline")
|
|
468
|
+
return { game: summary(game), draft_updated_at: game.draft_updated_at, outline: outline(document) };
|
|
469
|
+
if (view === "entity") {
|
|
470
|
+
const entityId = args["entity_id"];
|
|
471
|
+
if (typeof entityId !== "string")
|
|
472
|
+
return { error: "entity_id is required for entity view" };
|
|
473
|
+
const matches = document.scenes.flatMap((scene) => scene.entities.filter((entity) => entity.id === entityId).map((entity) => ({ scene_id: scene.id, entity })));
|
|
474
|
+
return matches.length ? { game: summary(game), draft_updated_at: game.draft_updated_at, matches } : { error: "Entity not found" };
|
|
475
|
+
}
|
|
476
|
+
return { error: "Unknown game view" };
|
|
477
|
+
}
|
|
478
|
+
};
|
|
479
|
+
const save = {
|
|
480
|
+
spec: gameSpecs[2],
|
|
481
|
+
impl: async (run, args) => {
|
|
482
|
+
const user = userId(run);
|
|
483
|
+
const id = args["game_id"];
|
|
484
|
+
const base = args["base_revision"];
|
|
485
|
+
if (!user || typeof id !== "string" || typeof base !== "string")
|
|
486
|
+
return { error: "game_id and base_revision are required" };
|
|
487
|
+
const game = await ownedGame(user, id);
|
|
488
|
+
if (!game)
|
|
489
|
+
return { error: "Game not found" };
|
|
490
|
+
const request = { game_id: id, base_revision: base, message: typeof args["message"] === "string" ? args["message"] : undefined };
|
|
491
|
+
if (args["document"] !== undefined) {
|
|
492
|
+
const token = args["base_updated_at"];
|
|
493
|
+
if (typeof token !== "string" || !token) {
|
|
494
|
+
return { error: "base_updated_at is required with an explicit document" };
|
|
495
|
+
}
|
|
496
|
+
const parsed = gameDocument.safeParse(args["document"]);
|
|
497
|
+
if (!parsed.success) {
|
|
498
|
+
return { error: parsed.error.message };
|
|
499
|
+
}
|
|
500
|
+
return publish(user, game, { ...request, document: parsed.data, base_updated_at: token });
|
|
501
|
+
}
|
|
502
|
+
return publish(user, game, request);
|
|
503
|
+
}
|
|
504
|
+
};
|
|
505
|
+
const edit = {
|
|
506
|
+
spec: gameSpecs[6],
|
|
507
|
+
impl: async (run, args) => {
|
|
508
|
+
const user = userId(run);
|
|
509
|
+
const id = args["game_id"];
|
|
510
|
+
if (!user || typeof id !== "string")
|
|
511
|
+
return { error: "game_id is required in a user session" };
|
|
512
|
+
const game = await ownedGame(user, id);
|
|
513
|
+
if (!game)
|
|
514
|
+
return { error: "Game not found" };
|
|
515
|
+
const workspace = await workspaceOf(user, game);
|
|
516
|
+
if (!workspace)
|
|
517
|
+
return { error: "Game workspace is unavailable" };
|
|
518
|
+
const parsed = gameDocumentOp.array().min(1).safeParse(args["ops"]);
|
|
519
|
+
if (!parsed.success)
|
|
520
|
+
return { error: "Invalid game ops", issues: parsed.error.issues.map((issue) => ({ op_index: typeof issue.path[0] === "number" ? issue.path[0] : 0, path: issue.path, message: issue.message })) };
|
|
521
|
+
const base = args["base_updated_at"];
|
|
522
|
+
if (base !== undefined && typeof base !== "string")
|
|
523
|
+
return { error: "base_updated_at must be a string" };
|
|
524
|
+
for (let attempt = 0; attempt < (base ? 1 : 2); attempt += 1) {
|
|
525
|
+
const fresh = attempt === 0 ? game : await ownedGame(user, id);
|
|
526
|
+
if (!fresh)
|
|
527
|
+
return { error: "Game not found" };
|
|
528
|
+
try {
|
|
529
|
+
const updated = await Game.updateDraft(user, fresh.id, base ?? fresh.draft_updated_at, parsed.data, workspace, { actor: "agent", threadId: run.context.threadId ?? undefined, messageId: run.context.get?.("chat_message_id") ?? undefined });
|
|
530
|
+
if (updated)
|
|
531
|
+
return { game: summary(updated.game), draft_updated_at: updated.game.draft_updated_at, document: updated.document };
|
|
532
|
+
}
|
|
533
|
+
catch (error) {
|
|
534
|
+
if (error instanceof GameOpError)
|
|
535
|
+
return { error: "Game edit rejected", issues: error.issues.map((issue) => ({ op_index: issue.opIndex, path: issue.path, message: issue.message })) };
|
|
536
|
+
throw error;
|
|
537
|
+
}
|
|
538
|
+
}
|
|
539
|
+
return { error: "Game draft was modified concurrently", draft_updated_at: (await ownedGame(user, id))?.draft_updated_at };
|
|
540
|
+
}
|
|
541
|
+
};
|
|
542
|
+
const install = {
|
|
543
|
+
spec: gameSpecs[3],
|
|
544
|
+
impl: async (run, args) => {
|
|
545
|
+
const user = userId(run);
|
|
546
|
+
const id = args["game_id"];
|
|
547
|
+
const base = args["base_revision"];
|
|
548
|
+
const slot = args["slot"];
|
|
549
|
+
if (!user || typeof id !== "string" || typeof slot !== "string" || !slot) {
|
|
550
|
+
return { error: "game_id and slot are required" };
|
|
551
|
+
}
|
|
552
|
+
const game = await ownedGame(user, id);
|
|
553
|
+
if (!game)
|
|
554
|
+
return { error: "Game not found" };
|
|
555
|
+
const parsed = gameAssetBinding.safeParse(args["binding"]);
|
|
556
|
+
if (!parsed.success || !/^[a-f0-9]{64}$/.test(parsed.data.digest)) {
|
|
557
|
+
return { error: "Invalid asset binding or digest" };
|
|
558
|
+
}
|
|
559
|
+
if (parsed.data.mediaKind === "font" && !parsed.data.fontFormat) {
|
|
560
|
+
return { error: "Font binding needs a TrueType or OpenType format" };
|
|
561
|
+
}
|
|
562
|
+
const workspace = await workspaceOf(user, game);
|
|
563
|
+
if (!workspace)
|
|
564
|
+
return { error: "Game workspace is unavailable" };
|
|
565
|
+
const candidateId = args["candidate_workspace_id"];
|
|
566
|
+
let candidateWorkspace = workspace;
|
|
567
|
+
if (candidateId !== undefined) {
|
|
568
|
+
if (typeof candidateId !== "string")
|
|
569
|
+
return { error: "candidate_workspace_id must be a string" };
|
|
570
|
+
const row = await Workspace.find(user, candidateId);
|
|
571
|
+
if (!row || row.project_id !== game.project_id)
|
|
572
|
+
return { error: "Candidate workspace not found" };
|
|
573
|
+
const resolved = openWorkspace(row);
|
|
574
|
+
if (!resolved)
|
|
575
|
+
return { error: "Candidate workspace is unavailable" };
|
|
576
|
+
candidateWorkspace = resolved;
|
|
577
|
+
}
|
|
578
|
+
const formats = parsed.data.mediaKind === "model" ? [["glb", "model/gltf-binary"]]
|
|
579
|
+
: parsed.data.mediaKind === "collider" ? [["json", "application/json"]]
|
|
580
|
+
: parsed.data.mediaKind === "audio"
|
|
581
|
+
? [["wav", "audio/wav"], ["mp3", "audio/mpeg"], ["ogg", "audio/ogg"]]
|
|
582
|
+
: parsed.data.mediaKind === "font"
|
|
583
|
+
? [[parsed.data.fontFormat, `font/${parsed.data.fontFormat}`]]
|
|
584
|
+
: [["png", "image/png"], ["jpg", "image/jpeg"], ["webp", "image/webp"]];
|
|
585
|
+
let candidate = null;
|
|
586
|
+
for (const [extension, contentType] of formats) {
|
|
587
|
+
if (!extension)
|
|
588
|
+
continue;
|
|
589
|
+
const path = `${game.source_root}/assets/${parsed.data.digest}.${extension}`;
|
|
590
|
+
const bytes = await candidateWorkspace.read(path);
|
|
591
|
+
if (bytes) {
|
|
592
|
+
candidate = { path, extension, contentType: contentType ?? "application/octet-stream", bytes };
|
|
593
|
+
break;
|
|
594
|
+
}
|
|
595
|
+
}
|
|
596
|
+
if (!candidate || createHash("sha256").update(candidate.bytes).digest("hex") !== parsed.data.digest) {
|
|
597
|
+
return { error: "Candidate asset is missing or changed" };
|
|
598
|
+
}
|
|
599
|
+
const { path, extension, contentType, bytes } = candidate;
|
|
600
|
+
if (base !== undefined && base !== game.current_revision)
|
|
601
|
+
return { error: "Game was modified concurrently" };
|
|
602
|
+
const draft = await Game.readDraft(user, game.id, workspace);
|
|
603
|
+
if (!draft)
|
|
604
|
+
return { error: "Game draft is missing" };
|
|
605
|
+
const expectedUpdatedAt = typeof args["base_updated_at"] === "string" ? args["base_updated_at"] : draft.game.draft_updated_at;
|
|
606
|
+
let binding = parsed.data;
|
|
607
|
+
try {
|
|
608
|
+
if (binding.mediaKind === "model") {
|
|
609
|
+
const { prepareGameModelBinding3D } = await import("@nodetool-ai/game-renderer/preparation3d");
|
|
610
|
+
const prepared = await prepareGameModelBinding3D(bytes, { assetId: binding.assetId, expectedDigest: binding.digest, signal: run.context.signal });
|
|
611
|
+
if (!prepared.ok) {
|
|
612
|
+
return { error: "Model preparation failed", diagnostics: prepared.diagnostics };
|
|
613
|
+
}
|
|
614
|
+
const sourceAsset = binding.sourceAssetId ? await Asset.find(user, binding.sourceAssetId) : null;
|
|
615
|
+
if (binding.sourceAssetId && !sourceAsset) {
|
|
616
|
+
return { error: "Model source asset is not owned" };
|
|
617
|
+
}
|
|
618
|
+
const canonical = { ...prepared.binding, required: binding.required };
|
|
619
|
+
if (binding.provenance) {
|
|
620
|
+
canonical.provenance = binding.provenance;
|
|
621
|
+
}
|
|
622
|
+
if (binding.importSettings) {
|
|
623
|
+
canonical.importSettings = binding.importSettings;
|
|
624
|
+
}
|
|
625
|
+
if (binding.sourceDigest) {
|
|
626
|
+
canonical.sourceDigest = binding.sourceDigest;
|
|
627
|
+
}
|
|
628
|
+
if (sourceAsset) {
|
|
629
|
+
canonical.sourceAssetId = sourceAsset.id;
|
|
630
|
+
}
|
|
631
|
+
binding = canonical;
|
|
632
|
+
}
|
|
633
|
+
else if (binding.mediaKind === "collider") {
|
|
634
|
+
binding = colliderBinding3D(bytes, binding);
|
|
635
|
+
await decodePreparedGameCollider3D(bytes, gameAssetBinding3D.options[1].parse(binding));
|
|
636
|
+
}
|
|
637
|
+
}
|
|
638
|
+
catch (error) {
|
|
639
|
+
return { error: error instanceof Error ? error.message : String(error) };
|
|
640
|
+
}
|
|
641
|
+
const targetBinding = draft.document.schemaVersion === 3 ? gameAssetBinding3D.safeParse(binding) : legacyAssetBinding.safeParse(binding);
|
|
642
|
+
if (!targetBinding.success) {
|
|
643
|
+
return { error: "Asset binding does not match the game dimension" };
|
|
644
|
+
}
|
|
645
|
+
const storage = run.context.assetStorage;
|
|
646
|
+
if (!storage)
|
|
647
|
+
return { error: "Asset storage is unavailable" };
|
|
648
|
+
if (candidateWorkspace !== workspace)
|
|
649
|
+
await workspace.write(path, bytes, contentType);
|
|
650
|
+
const installed = await Asset.create({
|
|
651
|
+
user_id: user,
|
|
652
|
+
project_id: game.project_id,
|
|
653
|
+
parent_id: user,
|
|
654
|
+
name: `${slot}.${extension}`,
|
|
655
|
+
content_type: contentType,
|
|
656
|
+
size: bytes.byteLength,
|
|
657
|
+
metadata: { game_source_asset_id: parsed.data.assetId, game_digest: parsed.data.digest }
|
|
658
|
+
});
|
|
659
|
+
if (!(installed instanceof Asset))
|
|
660
|
+
return { error: "Failed to create installed asset" };
|
|
661
|
+
const key = assetObjectKey(user, `${installed.id}.${extension}`);
|
|
662
|
+
let uri = null;
|
|
663
|
+
try {
|
|
664
|
+
uri = await storage.store(key, bytes, contentType);
|
|
665
|
+
let result;
|
|
666
|
+
try {
|
|
667
|
+
const op = gameDocumentOp.parse({ op: "bind_asset", slot, binding: { ...targetBinding.data, assetId: installed.id } });
|
|
668
|
+
const updated = await Game.updateDraft(user, game.id, expectedUpdatedAt, [op], workspace, { actor: "agent", threadId: run.context.threadId ?? undefined, messageId: run.context.get?.("chat_message_id") ?? undefined });
|
|
669
|
+
result = updated ? { game: summary(updated.game), draft_updated_at: updated.game.draft_updated_at, document: updated.document } : { error: "Game draft was modified concurrently" };
|
|
670
|
+
}
|
|
671
|
+
catch (error) {
|
|
672
|
+
if (error instanceof GameOpError)
|
|
673
|
+
result = { error: error.message, op_index: error.opIndex, path: error.path };
|
|
674
|
+
else
|
|
675
|
+
throw error;
|
|
676
|
+
}
|
|
677
|
+
if (typeof result === "object" && result !== null && "error" in result) {
|
|
678
|
+
await storage.delete(uri);
|
|
679
|
+
await installed.delete();
|
|
680
|
+
}
|
|
681
|
+
return result;
|
|
682
|
+
}
|
|
683
|
+
catch (error) {
|
|
684
|
+
if (uri)
|
|
685
|
+
await storage.delete(uri);
|
|
686
|
+
await installed.delete();
|
|
687
|
+
throw error;
|
|
688
|
+
}
|
|
689
|
+
}
|
|
690
|
+
};
|
|
691
|
+
const playtest = {
|
|
692
|
+
spec: gameSpecs[4],
|
|
693
|
+
impl: async (run, args) => {
|
|
694
|
+
const user = userId(run);
|
|
695
|
+
const id = args["game_id"];
|
|
696
|
+
if (!user || typeof id !== "string")
|
|
697
|
+
return { error: "game_id is required in a user session" };
|
|
698
|
+
const game = await ownedGame(user, id);
|
|
699
|
+
if (!game)
|
|
700
|
+
return { error: "Game not found" };
|
|
701
|
+
const workspace = await workspaceOf(user, game);
|
|
702
|
+
if (!workspace)
|
|
703
|
+
return { error: "Game workspace is unavailable" };
|
|
704
|
+
const document = await readSource(workspace, game, args["source"], args["revision"]);
|
|
705
|
+
if (!document)
|
|
706
|
+
return { error: "Game source not found" };
|
|
707
|
+
if (document.schemaVersion === 3) {
|
|
708
|
+
try {
|
|
709
|
+
return await playtestGame3D(run, user, document, args);
|
|
710
|
+
}
|
|
711
|
+
catch (error) {
|
|
712
|
+
run.context.signal?.throwIfAborted();
|
|
713
|
+
return { error: error instanceof Error ? error.message : String(error), code: "game3d_preparation_failed" };
|
|
714
|
+
}
|
|
715
|
+
}
|
|
716
|
+
const captures = captureTicks(args["capture_ticks"], []);
|
|
717
|
+
if ("error" in captures)
|
|
718
|
+
return captures;
|
|
719
|
+
const assertions = Array.isArray(args["assertions"]) ? args["assertions"] : [];
|
|
720
|
+
const assertionHorizon = assertions.reduce((maximum, item) => {
|
|
721
|
+
if (!item || typeof item !== "object")
|
|
722
|
+
return maximum;
|
|
723
|
+
const assertion = item;
|
|
724
|
+
const tick = assertion.at_tick ?? assertion.before_tick;
|
|
725
|
+
return typeof tick === "number" && Number.isSafeInteger(tick) && tick >= 0 ? Math.max(maximum, tick) : maximum;
|
|
726
|
+
}, 0);
|
|
727
|
+
const inputs = inputFrames(args["inputs"], Math.max(0, ...captures, assertionHorizon));
|
|
728
|
+
if ("error" in inputs)
|
|
729
|
+
return inputs;
|
|
730
|
+
const seed = typeof args["seed"] === "number" && Number.isSafeInteger(args["seed"])
|
|
731
|
+
? args["seed"]
|
|
732
|
+
: 1;
|
|
733
|
+
const session = await createScriptedGameSession(document, seed);
|
|
734
|
+
const events = [];
|
|
735
|
+
const contacts = new Map();
|
|
736
|
+
const inspectionTicks = new Set(assertions.flatMap((item) => {
|
|
737
|
+
if (!item || typeof item !== "object" || !("at_tick" in item))
|
|
738
|
+
return [];
|
|
739
|
+
return typeof item.at_tick === "number" ? [item.at_tick] : [];
|
|
740
|
+
}));
|
|
741
|
+
let state = session.inspect();
|
|
742
|
+
const inspections = new Map([[0, state]]);
|
|
743
|
+
const started = Date.now();
|
|
744
|
+
let wallTimeLimited = false;
|
|
745
|
+
let cancelled = false;
|
|
746
|
+
let scriptError = null;
|
|
747
|
+
try {
|
|
748
|
+
for (const input of inputs) {
|
|
749
|
+
if (state.tick % 240 === 0)
|
|
750
|
+
await new Promise((resolve) => setTimeout(resolve, 0));
|
|
751
|
+
if (run.context.signal?.aborted) {
|
|
752
|
+
cancelled = true;
|
|
753
|
+
break;
|
|
754
|
+
}
|
|
755
|
+
if (Date.now() - started > 15_000) {
|
|
756
|
+
wallTimeLimited = true;
|
|
757
|
+
break;
|
|
758
|
+
}
|
|
759
|
+
let result;
|
|
760
|
+
try {
|
|
761
|
+
result = session.step(input);
|
|
762
|
+
}
|
|
763
|
+
catch (error) {
|
|
764
|
+
scriptError = { tick: state.tick + 1, message: error instanceof Error ? error.message : String(error) };
|
|
765
|
+
break;
|
|
766
|
+
}
|
|
767
|
+
state = session.inspect();
|
|
768
|
+
if (inspectionTicks.has(result.tick))
|
|
769
|
+
inspections.set(result.tick, state);
|
|
770
|
+
for (const event of result.events) {
|
|
771
|
+
if (event.kind === "contact") {
|
|
772
|
+
const pair = [event.entityId, event.otherId].sort().join("|");
|
|
773
|
+
const key = `${pair}:${event.phase ?? "stay"}`;
|
|
774
|
+
contacts.set(key, (contacts.get(key) ?? 0) + 1);
|
|
775
|
+
}
|
|
776
|
+
else {
|
|
777
|
+
events.push({ tick: result.tick, ...event });
|
|
778
|
+
}
|
|
779
|
+
}
|
|
780
|
+
}
|
|
781
|
+
const assertion_results = assertions.map((item) => {
|
|
782
|
+
if (!item || typeof item !== "object")
|
|
783
|
+
return { passed: false, error: "Invalid assertion" };
|
|
784
|
+
const assertion = item;
|
|
785
|
+
if (assertion.no_script_errors === true)
|
|
786
|
+
return { passed: scriptError === null, assertion, observed: scriptError };
|
|
787
|
+
if (typeof assertion.event === "string") {
|
|
788
|
+
const observed = events.find((event) => {
|
|
789
|
+
if (typeof event !== "object" || event === null || !("kind" in event))
|
|
790
|
+
return false;
|
|
791
|
+
if (event.kind === assertion.event)
|
|
792
|
+
return true;
|
|
793
|
+
return event.kind === "trigger" && "event" in event && (event.event === assertion.event || assertion.event === "win" && event.event === "victory");
|
|
794
|
+
});
|
|
795
|
+
const tick = typeof observed === "object" && observed !== null && "tick" in observed && typeof observed.tick === "number" ? observed.tick : Infinity;
|
|
796
|
+
return { passed: observed !== undefined && (typeof assertion.before_tick !== "number" || tick <= assertion.before_tick), assertion, observed: observed ?? null };
|
|
797
|
+
}
|
|
798
|
+
if (typeof assertion.entity_id === "string" && assertion.near && typeof assertion.near === "object") {
|
|
799
|
+
const near = assertion.near;
|
|
800
|
+
const observed = typeof assertion.at_tick === "number" ? inspections.get(assertion.at_tick) : state;
|
|
801
|
+
const entity = observed?.entities.find((candidate) => candidate.id === assertion.entity_id);
|
|
802
|
+
const tolerance = typeof near.tolerance === "number" ? near.tolerance : 0;
|
|
803
|
+
const passed = !!entity && typeof near.x === "number" && typeof near.y === "number" && Math.hypot(entity.x - near.x, entity.y - near.y) <= tolerance;
|
|
804
|
+
return { passed, assertion, observed: entity ?? null };
|
|
805
|
+
}
|
|
806
|
+
return { passed: false, assertion, error: "Unsupported assertion" };
|
|
807
|
+
});
|
|
808
|
+
const images = captures.length && scriptError === null && !cancelled && !wallTimeLimited && state.tick === inputs.length
|
|
809
|
+
? await captureFrames(run, user, document, captures, inputs, seed, { sheet: true, deadlineAt: started + 15_000 })
|
|
810
|
+
: undefined;
|
|
811
|
+
return {
|
|
812
|
+
game_id: shortResourceId(game.id),
|
|
813
|
+
revision: document.revision,
|
|
814
|
+
ticks: state.tick,
|
|
815
|
+
state,
|
|
816
|
+
events,
|
|
817
|
+
contacts: [...contacts].map(([pair_phase, count]) => ({ pair_phase, count })),
|
|
818
|
+
assertion_results,
|
|
819
|
+
wall_time_limited: wallTimeLimited,
|
|
820
|
+
cancelled,
|
|
821
|
+
route_complete: state.tick === inputs.length,
|
|
822
|
+
wall_time_ms: Date.now() - started,
|
|
823
|
+
script_error: scriptError,
|
|
824
|
+
captures: images
|
|
825
|
+
};
|
|
826
|
+
}
|
|
827
|
+
finally {
|
|
828
|
+
session.dispose();
|
|
829
|
+
}
|
|
830
|
+
}
|
|
831
|
+
};
|
|
832
|
+
const capture = {
|
|
833
|
+
spec: gameSpecs[7],
|
|
834
|
+
impl: async (run, args) => {
|
|
835
|
+
const user = userId(run);
|
|
836
|
+
const id = args["game_id"];
|
|
837
|
+
if (!user || typeof id !== "string")
|
|
838
|
+
return { error: "game_id is required in a user session" };
|
|
839
|
+
const game = await ownedGame(user, id);
|
|
840
|
+
if (!game)
|
|
841
|
+
return { error: "Game not found" };
|
|
842
|
+
const workspace = await workspaceOf(user, game);
|
|
843
|
+
if (!workspace)
|
|
844
|
+
return { error: "Game workspace is unavailable" };
|
|
845
|
+
const document = await readSource(workspace, game, args["source"], args["revision"]);
|
|
846
|
+
if (!document)
|
|
847
|
+
return { error: "Game source not found" };
|
|
848
|
+
const ticks = captureTicks(args["ticks"], [0]);
|
|
849
|
+
if ("error" in ticks)
|
|
850
|
+
return ticks;
|
|
851
|
+
if (document.schemaVersion === 3) {
|
|
852
|
+
const inputs = inputFrames3D(args["inputs"], Math.max(0, ...ticks));
|
|
853
|
+
if ("error" in inputs) {
|
|
854
|
+
return inputs;
|
|
855
|
+
}
|
|
856
|
+
const seed = typeof args["seed"] === "number" && Number.isSafeInteger(args["seed"]) ? args["seed"] : 1;
|
|
857
|
+
try {
|
|
858
|
+
return await captureFrames3D(run, user, document, ticks, inputs, seed, args);
|
|
859
|
+
}
|
|
860
|
+
catch (error) {
|
|
861
|
+
run.context.signal?.throwIfAborted();
|
|
862
|
+
return { error: error instanceof Error ? error.message : String(error), code: "game3d_capture_failed" };
|
|
863
|
+
}
|
|
864
|
+
}
|
|
865
|
+
const inputs = inputFrames(args["inputs"], Math.max(0, ...ticks));
|
|
866
|
+
if ("error" in inputs)
|
|
867
|
+
return inputs;
|
|
868
|
+
const seed = typeof args["seed"] === "number" && Number.isSafeInteger(args["seed"]) ? args["seed"] : 1;
|
|
869
|
+
const options = {};
|
|
870
|
+
for (const key of ["camera", "scale", "sheet", "overlays"]) {
|
|
871
|
+
if (args[key] !== undefined) {
|
|
872
|
+
options[key] = args[key];
|
|
873
|
+
}
|
|
874
|
+
}
|
|
875
|
+
return captureFrames(run, user, document, ticks, inputs, seed, options);
|
|
876
|
+
}
|
|
877
|
+
};
|
|
878
|
+
const generateAsset = {
|
|
879
|
+
spec: gameSpecs[8],
|
|
880
|
+
impl: async (run, args) => {
|
|
881
|
+
const user = userId(run);
|
|
882
|
+
const id = args["game_id"];
|
|
883
|
+
const slot = args["slot"];
|
|
884
|
+
const kind = args["kind"];
|
|
885
|
+
const prompt = args["prompt"];
|
|
886
|
+
const inputFile = args["input_file"];
|
|
887
|
+
if (!user || typeof id !== "string" || typeof slot !== "string" || !slot || !["image", "audio", "music", "sfx", "font", "model", "collider"].includes(String(kind))) {
|
|
888
|
+
return { error: "game_id, slot, and kind are required" };
|
|
889
|
+
}
|
|
890
|
+
if (inputFile !== undefined && (typeof inputFile !== "string" || !inputFile.trim())) {
|
|
891
|
+
return { error: "input_file must be a nonempty string" };
|
|
892
|
+
}
|
|
893
|
+
const game = await ownedGame(user, id);
|
|
894
|
+
if (!game) {
|
|
895
|
+
return { error: "Game not found" };
|
|
896
|
+
}
|
|
897
|
+
const workspace = await workspaceOf(user, game);
|
|
898
|
+
if (!workspace) {
|
|
899
|
+
return { error: "Game workspace is unavailable" };
|
|
900
|
+
}
|
|
901
|
+
const draft = await Game.readDraft(user, game.id, workspace);
|
|
902
|
+
if (!draft) {
|
|
903
|
+
return { error: "Game draft not found" };
|
|
904
|
+
}
|
|
905
|
+
if (kind === "model" || kind === "collider") {
|
|
906
|
+
if (draft.document.schemaVersion !== 3) {
|
|
907
|
+
return { error: "Model and collider assets require a 3D game" };
|
|
908
|
+
}
|
|
909
|
+
try {
|
|
910
|
+
return await stageModelGameAsset3D(run, game, workspace, draft.document, args);
|
|
911
|
+
}
|
|
912
|
+
catch (error) {
|
|
913
|
+
run.context.signal?.throwIfAborted();
|
|
914
|
+
return { error: error instanceof Error ? error.message : String(error) };
|
|
915
|
+
}
|
|
916
|
+
}
|
|
917
|
+
if (draft.document.schemaVersion === 3 && kind === "image") {
|
|
918
|
+
return { error: "3D games use model assets with embedded textures" };
|
|
919
|
+
}
|
|
920
|
+
const reference = typeof args["reference_slot"] === "string" ? draft.document.assets[args["reference_slot"]] : undefined;
|
|
921
|
+
if (args["reference_slot"] !== undefined && !reference) {
|
|
922
|
+
return { error: "reference_slot is not bound" };
|
|
923
|
+
}
|
|
924
|
+
if (reference && kind !== "image") {
|
|
925
|
+
return { error: "reference_slot requires kind image" };
|
|
926
|
+
}
|
|
927
|
+
const { imagePreparationSettings, prepareGameImage, imagePreparationMetadata, gameFontFormat } = await import("@nodetool-ai/game-nodes");
|
|
928
|
+
const settings = kind === "image" ? imagePreparationSettings.safeParse(args["preparation"] ?? {}) : null;
|
|
929
|
+
if (settings && !settings.success) {
|
|
930
|
+
return { error: "Invalid image preparation", issues: settings.error.issues };
|
|
931
|
+
}
|
|
932
|
+
if (kind !== "image" && args["preparation"] !== undefined) {
|
|
933
|
+
return { error: "preparation requires kind image" };
|
|
934
|
+
}
|
|
935
|
+
const { readGameAssetInput, generateGameSoundEffect, gameGenerationResult, gameModelResult } = await import("./game-asset-source.js");
|
|
936
|
+
let provider = args["provider"];
|
|
937
|
+
let model = args["model"];
|
|
938
|
+
let generated = {};
|
|
939
|
+
let sourceBytes;
|
|
940
|
+
const makeLut = settings?.success && settings.data.lut !== undefined;
|
|
941
|
+
if (makeLut && (inputFile !== undefined || reference || args["generation_id"] !== undefined)) {
|
|
942
|
+
return { error: "LUT preparation creates a color cube directly and cannot use input_file, reference_slot or generation_id" };
|
|
943
|
+
}
|
|
944
|
+
if (makeLut) {
|
|
945
|
+
sourceBytes = new Uint8Array();
|
|
946
|
+
}
|
|
947
|
+
else if (typeof inputFile === "string") {
|
|
948
|
+
if (args["generation_id"] !== undefined) {
|
|
949
|
+
return { error: "input_file and generation_id cannot be combined" };
|
|
950
|
+
}
|
|
951
|
+
try {
|
|
952
|
+
sourceBytes = await readGameAssetInput(run, workspace, inputFile);
|
|
953
|
+
}
|
|
954
|
+
catch (error) {
|
|
955
|
+
return { error: error instanceof Error ? error.message : String(error) };
|
|
956
|
+
}
|
|
957
|
+
if (!sourceBytes) {
|
|
958
|
+
return { error: "input_file is unavailable in this user's assets or workspace" };
|
|
959
|
+
}
|
|
960
|
+
}
|
|
961
|
+
else if (kind === "font") {
|
|
962
|
+
return { error: "Font assets require input_file naming an owned TTF or OTF asset or workspace file" };
|
|
963
|
+
}
|
|
964
|
+
else if (kind === "sfx") {
|
|
965
|
+
const sound = await generateGameSoundEffect(run, args);
|
|
966
|
+
if ("error" in sound) {
|
|
967
|
+
return sound;
|
|
968
|
+
}
|
|
969
|
+
sourceBytes = sound.bytes;
|
|
970
|
+
generated.mime_type = sound.mime_type;
|
|
971
|
+
}
|
|
972
|
+
else {
|
|
973
|
+
if (typeof prompt !== "string" || !prompt.trim()) {
|
|
974
|
+
return { error: "prompt is required for generation" };
|
|
975
|
+
}
|
|
976
|
+
const capability = kind === "image" ? reference ? "image_to_image" : "text_to_image" : kind === "music" ? "text_to_music" : "text_to_speech";
|
|
977
|
+
const resumedId = args["generation_id"];
|
|
978
|
+
if (typeof resumedId === "string") {
|
|
979
|
+
const row = await Prediction.findForUser(user, resumedId);
|
|
980
|
+
if (!row || row.capability !== capability) {
|
|
981
|
+
return { error: "Generation not found for this game asset kind" };
|
|
982
|
+
}
|
|
983
|
+
const { generationRecord } = await import("./generations.js");
|
|
984
|
+
const record = generationRecord(row);
|
|
985
|
+
if (record.status !== "completed") {
|
|
986
|
+
return { generation_id: resumedId, status: record.status, error: record.generation_error ?? undefined };
|
|
987
|
+
}
|
|
988
|
+
const assetId = record.asset_ids[0];
|
|
989
|
+
if (!assetId) {
|
|
990
|
+
return { error: "Generation completed without an asset", generation_id: resumedId };
|
|
991
|
+
}
|
|
992
|
+
const asset = await Asset.find(user, assetId);
|
|
993
|
+
if (!asset) {
|
|
994
|
+
return { error: "Generated asset is unavailable", generation_id: resumedId };
|
|
995
|
+
}
|
|
996
|
+
generated = { asset_uri: `asset://${assetId}`, generation_id: resumedId, mime_type: asset.content_type };
|
|
997
|
+
provider = row.provider;
|
|
998
|
+
model = row.model;
|
|
999
|
+
}
|
|
1000
|
+
else {
|
|
1001
|
+
if (typeof provider !== "string" || typeof model !== "string") {
|
|
1002
|
+
const { findModel } = await import("./models.js");
|
|
1003
|
+
const found = gameModelResult.safeParse(await findModel.impl(run, { capability }));
|
|
1004
|
+
provider = found.success ? found.data.ref?.provider : undefined;
|
|
1005
|
+
model = found.success ? found.data.ref?.id : undefined;
|
|
1006
|
+
}
|
|
1007
|
+
if (typeof provider !== "string" || typeof model !== "string") {
|
|
1008
|
+
return { error: `No ${capability} model is available; pass provider and model` };
|
|
1009
|
+
}
|
|
1010
|
+
const media = await import("./media.js");
|
|
1011
|
+
const generator = kind === "music" ? media.generateMusic : kind === "audio" ? media.generateSpeech : reference ? media.editImage : media.generateImage;
|
|
1012
|
+
const generationArgs = { provider, model, prompt };
|
|
1013
|
+
if (kind === "audio") {
|
|
1014
|
+
generationArgs["text"] = prompt;
|
|
1015
|
+
}
|
|
1016
|
+
if (args["background"] === true) {
|
|
1017
|
+
generationArgs["background"] = true;
|
|
1018
|
+
}
|
|
1019
|
+
if (reference) {
|
|
1020
|
+
const referenceAsset = await Asset.find(user, reference.assetId);
|
|
1021
|
+
const suffix = referenceAsset && MEDIA_EXTENSIONS[referenceAsset.content_type];
|
|
1022
|
+
if (!suffix) {
|
|
1023
|
+
return { error: "Reference asset is unavailable" };
|
|
1024
|
+
}
|
|
1025
|
+
generationArgs["input_file"] = `asset://${reference.assetId}.${suffix}`;
|
|
1026
|
+
}
|
|
1027
|
+
const result = gameGenerationResult.safeParse(await generator.impl(run, generationArgs));
|
|
1028
|
+
if (!result.success) {
|
|
1029
|
+
return { error: "Generation returned an invalid asset result" };
|
|
1030
|
+
}
|
|
1031
|
+
generated = result.data;
|
|
1032
|
+
}
|
|
1033
|
+
if (generated.error) {
|
|
1034
|
+
return generated;
|
|
1035
|
+
}
|
|
1036
|
+
if (generated.background) {
|
|
1037
|
+
return { ...generated, next: "Call await_generation, then call generate_game_asset again with generation_id and the same game_id, slot, kind, prompt, and preparation." };
|
|
1038
|
+
}
|
|
1039
|
+
const handle = generated.asset_uri ?? generated.path;
|
|
1040
|
+
if (!handle) {
|
|
1041
|
+
return { error: "Generation returned no readable asset", generation_id: generated.generation_id };
|
|
1042
|
+
}
|
|
1043
|
+
sourceBytes = handle.startsWith("asset://") ? (await run.context.resolveAssetBytes(handle)).bytes : await run.context.workspace?.read(handle) ?? null;
|
|
1044
|
+
if (!sourceBytes) {
|
|
1045
|
+
return { error: "Generated asset bytes are unavailable", generation_id: generated.generation_id };
|
|
1046
|
+
}
|
|
1047
|
+
}
|
|
1048
|
+
if (sourceBytes.byteLength > MAX_BUILD_ASSET_BYTES) {
|
|
1049
|
+
return { error: "Game asset exceeds the supported asset size" };
|
|
1050
|
+
}
|
|
1051
|
+
let bytes = sourceBytes;
|
|
1052
|
+
let width = 1;
|
|
1053
|
+
let height = 1;
|
|
1054
|
+
const previous = draft.document.assets[slot];
|
|
1055
|
+
const binding = {
|
|
1056
|
+
width, height, pivot: previous && "pivot" in previous ? previous.pivot : { x: 0.5, y: 0.5 }, sampling: previous && "sampling" in previous ? previous.sampling : "nearest"
|
|
1057
|
+
};
|
|
1058
|
+
let frames;
|
|
1059
|
+
let tiles;
|
|
1060
|
+
let lutSize;
|
|
1061
|
+
let extension;
|
|
1062
|
+
let contentType;
|
|
1063
|
+
if (kind === "image" && settings?.success) {
|
|
1064
|
+
let prepared;
|
|
1065
|
+
try {
|
|
1066
|
+
prepared = await prepareGameImage(bytes, settings.data);
|
|
1067
|
+
}
|
|
1068
|
+
catch (error) {
|
|
1069
|
+
return { error: `Image preparation failed: ${error instanceof Error ? error.message : String(error)}` };
|
|
1070
|
+
}
|
|
1071
|
+
bytes = prepared.bytes;
|
|
1072
|
+
width = prepared.width;
|
|
1073
|
+
height = prepared.height;
|
|
1074
|
+
extension = "png";
|
|
1075
|
+
contentType = "image/png";
|
|
1076
|
+
binding.mediaKind = "image";
|
|
1077
|
+
binding.pivot = settings.data.pivot;
|
|
1078
|
+
binding.sampling = settings.data.sampling;
|
|
1079
|
+
frames = prepared.frames;
|
|
1080
|
+
tiles = prepared.tiles;
|
|
1081
|
+
lutSize = prepared.lutSize;
|
|
1082
|
+
if (frames?.[0]) {
|
|
1083
|
+
binding.frame = frames[0];
|
|
1084
|
+
}
|
|
1085
|
+
if (prepared.baseline !== undefined && frames?.[0]) {
|
|
1086
|
+
binding.pivot = { x: 0.5, y: (prepared.baseline + 1) / frames[0].height };
|
|
1087
|
+
}
|
|
1088
|
+
if (draft.document.schemaVersion === 2) {
|
|
1089
|
+
binding.preparation = imagePreparationMetadata(settings.data);
|
|
1090
|
+
binding.originalDimensions = { width: prepared.originalWidth, height: prepared.originalHeight };
|
|
1091
|
+
if (prepared.trim) {
|
|
1092
|
+
binding.trim = prepared.trim;
|
|
1093
|
+
}
|
|
1094
|
+
if (reference) {
|
|
1095
|
+
binding.referenceAssetId = reference.assetId;
|
|
1096
|
+
}
|
|
1097
|
+
}
|
|
1098
|
+
}
|
|
1099
|
+
else if (kind === "font") {
|
|
1100
|
+
const format = gameFontFormat(bytes);
|
|
1101
|
+
if (!format) {
|
|
1102
|
+
return { error: "input_file must contain a valid TrueType or OpenType font" };
|
|
1103
|
+
}
|
|
1104
|
+
extension = format;
|
|
1105
|
+
contentType = `font/${format}`;
|
|
1106
|
+
binding.mediaKind = "font";
|
|
1107
|
+
binding.fontFormat = format;
|
|
1108
|
+
}
|
|
1109
|
+
else {
|
|
1110
|
+
const { sniffAudioMimeOrNull } = await import("@nodetool-ai/runtime");
|
|
1111
|
+
const mime = generated.mime_type ?? sniffAudioMimeOrNull(bytes);
|
|
1112
|
+
extension = mime === "audio/wav" || mime === "audio/x-wav" ? "wav" : mime === "audio/ogg" ? "ogg"
|
|
1113
|
+
: mime === "audio/mpeg" || mime === "audio/mp3" ? "mp3" : "";
|
|
1114
|
+
if (!extension) {
|
|
1115
|
+
return { error: "Audio assets must be encoded WAV, Ogg or MP3" };
|
|
1116
|
+
}
|
|
1117
|
+
contentType = extension === "wav" ? "audio/wav" : extension === "ogg" ? "audio/ogg" : "audio/mpeg";
|
|
1118
|
+
binding.mediaKind = "audio";
|
|
1119
|
+
}
|
|
1120
|
+
const digest = createHash("sha256").update(bytes).digest("hex");
|
|
1121
|
+
await workspace.write(`${game.source_root}/assets/${digest}.${extension}`, bytes, contentType);
|
|
1122
|
+
binding.assetId = `generated:${digest}`;
|
|
1123
|
+
binding.digest = digest;
|
|
1124
|
+
binding.width = width;
|
|
1125
|
+
binding.height = height;
|
|
1126
|
+
if (draft.document.schemaVersion === 2) {
|
|
1127
|
+
binding.provenance = typeof inputFile === "string" ? `import:${inputFile}`
|
|
1128
|
+
: makeLut ? "generated:color-cube" : kind === "sfx" ? `node:${args["node_type"]}` : `${provider}:${model}:${generated.generation_id ?? ""}`;
|
|
1129
|
+
}
|
|
1130
|
+
if (draft.document.schemaVersion === 3) {
|
|
1131
|
+
delete binding.width;
|
|
1132
|
+
delete binding.height;
|
|
1133
|
+
delete binding.pivot;
|
|
1134
|
+
delete binding.sampling;
|
|
1135
|
+
const parsedBinding = gameAssetBinding3D.safeParse(binding);
|
|
1136
|
+
if (!parsedBinding.success) {
|
|
1137
|
+
return { error: "Invalid 3D asset binding", diagnostics: parsedBinding.error.issues };
|
|
1138
|
+
}
|
|
1139
|
+
return { game_id: shortResourceId(game.id), slot, binding: parsedBinding.data, candidate_workspace_id: game.workspace_id,
|
|
1140
|
+
draft_updated_at: draft.game.draft_updated_at, installed: false, next: "Call install_native_game_asset with this binding to install the candidate." };
|
|
1141
|
+
}
|
|
1142
|
+
const installed = await install.impl(run, { game_id: game.id, slot, binding, base_updated_at: draft.game.draft_updated_at });
|
|
1143
|
+
if (typeof installed !== "object" || installed === null) {
|
|
1144
|
+
return { generation_id: generated.generation_id, result: installed };
|
|
1145
|
+
}
|
|
1146
|
+
const extras = {};
|
|
1147
|
+
if (!("error" in installed) && "document" in installed) {
|
|
1148
|
+
const parsedDocument = gameDocument.safeParse(installed.document);
|
|
1149
|
+
const asset = parsedDocument.success ? parsedDocument.data.assets[slot] : undefined;
|
|
1150
|
+
if (asset && (frames || tiles)) {
|
|
1151
|
+
extras.bindings = Object.fromEntries(frames ? frames.map((frame, index) => [`${slot}.frame.${index}`, { ...asset, frame }])
|
|
1152
|
+
: (tiles ?? []).map((tile) => [`${slot}.tile.${tile.mask}`, { ...asset, frame: tile.frame }]));
|
|
1153
|
+
extras.next = "Bind the returned atlas frame bindings with one edit_native_game ops array or registerAssets in the game builder.";
|
|
1154
|
+
}
|
|
1155
|
+
}
|
|
1156
|
+
if (frames) {
|
|
1157
|
+
extras.frames = frames;
|
|
1158
|
+
}
|
|
1159
|
+
if (tiles) {
|
|
1160
|
+
extras.tiles = tiles;
|
|
1161
|
+
}
|
|
1162
|
+
if (lutSize) {
|
|
1163
|
+
extras.lut_size = lutSize;
|
|
1164
|
+
}
|
|
1165
|
+
return { generation_id: generated.generation_id, ...installed, ...extras };
|
|
1166
|
+
}
|
|
1167
|
+
};
|
|
1168
|
+
const buildGame = {
|
|
1169
|
+
spec: gameSpecs[5],
|
|
1170
|
+
impl: async (run, args) => {
|
|
1171
|
+
const user = userId(run);
|
|
1172
|
+
const id = args["game_id"];
|
|
1173
|
+
if (!user || typeof id !== "string")
|
|
1174
|
+
return { error: "game_id is required in a user session" };
|
|
1175
|
+
const game = await ownedGame(user, id);
|
|
1176
|
+
if (!game)
|
|
1177
|
+
return { error: "Game not found" };
|
|
1178
|
+
const workspace = await workspaceOf(user, game);
|
|
1179
|
+
if (!workspace)
|
|
1180
|
+
return { error: "Game workspace is unavailable" };
|
|
1181
|
+
const revision = typeof args["revision"] === "string" ? args["revision"] : game.current_revision;
|
|
1182
|
+
const document = await readDocument(workspace, game, revision);
|
|
1183
|
+
if (!document)
|
|
1184
|
+
return { error: "Game revision not found" };
|
|
1185
|
+
if (Object.keys(document.assets).length > MAX_BUILD_ASSETS) {
|
|
1186
|
+
return { error: `A standalone build supports at most ${MAX_BUILD_ASSETS} assets` };
|
|
1187
|
+
}
|
|
1188
|
+
const expectedDigests = new Map();
|
|
1189
|
+
for (const binding of Object.values(document.assets)) {
|
|
1190
|
+
if (binding.assetId.startsWith("builtin:"))
|
|
1191
|
+
continue;
|
|
1192
|
+
const digests = expectedDigests.get(binding.assetId) ?? new Set();
|
|
1193
|
+
digests.add(binding.digest);
|
|
1194
|
+
expectedDigests.set(binding.assetId, digests);
|
|
1195
|
+
}
|
|
1196
|
+
if ([...expectedDigests.values()].some((digests) => digests.size !== 1)) {
|
|
1197
|
+
return { error: "One source asset has conflicting digests in this revision" };
|
|
1198
|
+
}
|
|
1199
|
+
const buildPath = `game-builds/${game.id}/${revision}`;
|
|
1200
|
+
const indexPath = `${buildPath}/index.html`;
|
|
1201
|
+
if (await workspace.exists(indexPath)) {
|
|
1202
|
+
return { game_id: game.id, revision, build_path: buildPath, entry_path: indexPath, cached: true };
|
|
1203
|
+
}
|
|
1204
|
+
const storage = run.context.assetStorage;
|
|
1205
|
+
const cache = new Map();
|
|
1206
|
+
let totalAssetBytes = 0;
|
|
1207
|
+
const resolveAsset = async (assetId) => {
|
|
1208
|
+
const cached = cache.get(assetId);
|
|
1209
|
+
if (cached)
|
|
1210
|
+
return cached;
|
|
1211
|
+
if (!/^[a-f0-9]{32}$/.test(assetId))
|
|
1212
|
+
return null;
|
|
1213
|
+
const asset = await Asset.find(user, assetId);
|
|
1214
|
+
if (!asset || !storage)
|
|
1215
|
+
return null;
|
|
1216
|
+
const extension = MEDIA_EXTENSIONS[asset.content_type];
|
|
1217
|
+
if (!extension || (asset.size !== null && asset.size > MAX_BUILD_ASSET_BYTES))
|
|
1218
|
+
return null;
|
|
1219
|
+
const keys = assetKeyCandidates(user, `${asset.id}.${extension}`);
|
|
1220
|
+
let bytes = null;
|
|
1221
|
+
for (const key of keys) {
|
|
1222
|
+
bytes = await storage.retrieve(storage.uriForKey(key));
|
|
1223
|
+
if (bytes)
|
|
1224
|
+
break;
|
|
1225
|
+
}
|
|
1226
|
+
if (!bytes || bytes.byteLength > MAX_BUILD_ASSET_BYTES)
|
|
1227
|
+
return null;
|
|
1228
|
+
const digest = createHash("sha256").update(bytes).digest("hex");
|
|
1229
|
+
if (!expectedDigests.get(assetId)?.has(digest)) {
|
|
1230
|
+
throw new Error(`Asset digest changed for ${assetId}`);
|
|
1231
|
+
}
|
|
1232
|
+
totalAssetBytes += bytes.byteLength;
|
|
1233
|
+
if (totalAssetBytes > MAX_BUILD_BYTES) {
|
|
1234
|
+
throw new Error(`A standalone build supports at most ${MAX_BUILD_BYTES} asset bytes`);
|
|
1235
|
+
}
|
|
1236
|
+
const resolved = { bytes, mimeType: asset.content_type };
|
|
1237
|
+
cache.set(assetId, resolved);
|
|
1238
|
+
return resolved;
|
|
1239
|
+
};
|
|
1240
|
+
const scratch = await workspace.scratchDir();
|
|
1241
|
+
const staging = await mkdtemp(join(scratch, ".native-game-build-"));
|
|
1242
|
+
try {
|
|
1243
|
+
if (document.schemaVersion === 3) {
|
|
1244
|
+
const { buildStandaloneGame3D } = await import("@nodetool-ai/game-renderer/build3d");
|
|
1245
|
+
await buildStandaloneGame3D({ document, outputDir: join(staging, "player"), resolveAsset, signal: run.context.signal });
|
|
1246
|
+
}
|
|
1247
|
+
else {
|
|
1248
|
+
const { buildStandaloneGame } = await import("@nodetool-ai/game-renderer/build");
|
|
1249
|
+
await buildStandaloneGame({ document, outputDir: join(staging, "player"), resolveAsset });
|
|
1250
|
+
}
|
|
1251
|
+
const files = [];
|
|
1252
|
+
const pending = [""];
|
|
1253
|
+
let totalBytes = 0;
|
|
1254
|
+
while (pending.length > 0) {
|
|
1255
|
+
const directory = pending.pop() ?? "";
|
|
1256
|
+
for (const entry of await readdir(join(staging, "player", directory), { withFileTypes: true })) {
|
|
1257
|
+
const path = directory ? `${directory}/${entry.name}` : entry.name;
|
|
1258
|
+
if (entry.isDirectory()) {
|
|
1259
|
+
pending.push(path);
|
|
1260
|
+
}
|
|
1261
|
+
else if (entry.isFile()) {
|
|
1262
|
+
const bytes = await readFile(join(staging, "player", path));
|
|
1263
|
+
totalBytes += bytes.byteLength;
|
|
1264
|
+
if (files.length >= MAX_BUILD_FILES || totalBytes > MAX_BUILD_BYTES) {
|
|
1265
|
+
throw new Error("Standalone build exceeds file or byte limits");
|
|
1266
|
+
}
|
|
1267
|
+
files.push({ path, bytes });
|
|
1268
|
+
}
|
|
1269
|
+
}
|
|
1270
|
+
}
|
|
1271
|
+
if (!files.some((file) => file.path === "index.html")) {
|
|
1272
|
+
throw new Error("Standalone player entry is missing");
|
|
1273
|
+
}
|
|
1274
|
+
for (const file of files.filter((item) => item.path !== "index.html")) {
|
|
1275
|
+
const contentType = file.path.endsWith(".js") ? "text/javascript"
|
|
1276
|
+
: file.path.endsWith(".css") ? "text/css"
|
|
1277
|
+
: file.path.endsWith(".json") ? "application/json"
|
|
1278
|
+
: file.path.endsWith(".png") ? "image/png"
|
|
1279
|
+
: file.path.endsWith(".jpg") ? "image/jpeg"
|
|
1280
|
+
: file.path.endsWith(".webp") ? "image/webp"
|
|
1281
|
+
: file.path.endsWith(".wav") ? "audio/wav"
|
|
1282
|
+
: file.path.endsWith(".ogg") ? "audio/ogg"
|
|
1283
|
+
: file.path.endsWith(".mp3") ? "audio/mpeg"
|
|
1284
|
+
: file.path.endsWith(".ttf") ? "font/ttf"
|
|
1285
|
+
: file.path.endsWith(".otf") ? "font/otf"
|
|
1286
|
+
: file.path.endsWith(".glb") ? "model/gltf-binary"
|
|
1287
|
+
: file.path.endsWith(".wasm") ? "application/wasm"
|
|
1288
|
+
: "application/octet-stream";
|
|
1289
|
+
await workspace.write(`${buildPath}/${file.path}`, file.bytes, contentType);
|
|
1290
|
+
}
|
|
1291
|
+
const index = files.find((file) => file.path === "index.html");
|
|
1292
|
+
if (!index)
|
|
1293
|
+
throw new Error("Standalone player entry is missing");
|
|
1294
|
+
await workspace.write(indexPath, index.bytes, "text/html");
|
|
1295
|
+
return { game_id: game.id, revision, build_path: buildPath, entry_path: indexPath, cached: false };
|
|
1296
|
+
}
|
|
1297
|
+
catch (error) {
|
|
1298
|
+
return { error: error instanceof Error ? error.message : String(error) };
|
|
1299
|
+
}
|
|
1300
|
+
finally {
|
|
1301
|
+
await rm(staging, { recursive: true, force: true });
|
|
1302
|
+
}
|
|
1303
|
+
}
|
|
1304
|
+
};
|
|
1305
|
+
const listExamples = {
|
|
1306
|
+
spec: gameSpecs[9],
|
|
1307
|
+
impl: async (_run, args) => {
|
|
1308
|
+
const query = args["query"];
|
|
1309
|
+
const limit = args["limit"] ?? 20;
|
|
1310
|
+
if (query !== undefined && typeof query !== "string")
|
|
1311
|
+
return { error: "query must be a string" };
|
|
1312
|
+
if (typeof limit !== "number" || !Number.isSafeInteger(limit) || limit < 1 || limit > 100)
|
|
1313
|
+
return { error: "limit must be between 1 and 100" };
|
|
1314
|
+
const needle = typeof query === "string" ? query.toLowerCase().trim() : "";
|
|
1315
|
+
return { examples: listExampleGames({}).filter((example) => !needle || `${example.slug} ${example.name} ${example.description}`.toLowerCase().includes(needle)).slice(0, limit) };
|
|
1316
|
+
}
|
|
1317
|
+
};
|
|
1318
|
+
const getExample = {
|
|
1319
|
+
spec: gameSpecs[10],
|
|
1320
|
+
impl: async (_run, args) => {
|
|
1321
|
+
const slug = args["slug"];
|
|
1322
|
+
if (typeof slug !== "string")
|
|
1323
|
+
return { error: "slug is required" };
|
|
1324
|
+
const bundle = getExampleGameBundle({}, slug);
|
|
1325
|
+
if (!bundle)
|
|
1326
|
+
return { error: "Example game not found" };
|
|
1327
|
+
const { document, ...metadata } = bundle;
|
|
1328
|
+
const view = args["view"] ?? "outline";
|
|
1329
|
+
if (view === "full")
|
|
1330
|
+
return { slug, ...metadata, document };
|
|
1331
|
+
if (view === "entity") {
|
|
1332
|
+
const entityId = args["entity_id"];
|
|
1333
|
+
if (typeof entityId !== "string")
|
|
1334
|
+
return { error: "entity_id is required for entity view" };
|
|
1335
|
+
const matches = document.scenes.flatMap((scene) => scene.entities.filter((entity) => entity.id === entityId).map((entity) => ({ scene_id: scene.id, entity })));
|
|
1336
|
+
return matches.length ? { slug, ...metadata, matches } : { error: "Entity not found" };
|
|
1337
|
+
}
|
|
1338
|
+
return view === "outline" ? { slug, ...metadata, outline: outline(document) } : { error: "Unknown example game view" };
|
|
1339
|
+
}
|
|
1340
|
+
};
|
|
1341
|
+
const installExample = {
|
|
1342
|
+
spec: gameSpecs[11],
|
|
1343
|
+
impl: async (run, args) => {
|
|
1344
|
+
const user = userId(run);
|
|
1345
|
+
const projectId = args["project_id"];
|
|
1346
|
+
const slug = args["slug"];
|
|
1347
|
+
const name = args["name"];
|
|
1348
|
+
if (!user || typeof projectId !== "string" || typeof slug !== "string")
|
|
1349
|
+
return { error: "project_id and slug are required in a user session" };
|
|
1350
|
+
if (name !== undefined && (typeof name !== "string" || !name.trim()))
|
|
1351
|
+
return { error: "name must be a nonempty string" };
|
|
1352
|
+
if (!(await Project.findOwned(user, projectId)))
|
|
1353
|
+
return { error: "Project not found" };
|
|
1354
|
+
const storage = run.context.assetStorage;
|
|
1355
|
+
if (!storage)
|
|
1356
|
+
return { error: "Asset storage is unavailable" };
|
|
1357
|
+
if (!getExampleGameBundle({}, slug))
|
|
1358
|
+
return { error: "Example game not found" };
|
|
1359
|
+
const installed = await installExampleGameAssets(user, projectId, {}, slug, storage);
|
|
1360
|
+
try {
|
|
1361
|
+
const created = await createNativeGame(user, projectId, typeof name === "string" ? name.trim() : installed.bundle.name, installed.document, installed.document.schemaVersion === 3 ? "3d" : "2d");
|
|
1362
|
+
if ("error" in created) {
|
|
1363
|
+
await installed.rollback();
|
|
1364
|
+
return created;
|
|
1365
|
+
}
|
|
1366
|
+
return { game: summary(created.game), document: created.document };
|
|
1367
|
+
}
|
|
1368
|
+
catch (error) {
|
|
1369
|
+
await installed.rollback();
|
|
1370
|
+
throw error;
|
|
1371
|
+
}
|
|
1372
|
+
}
|
|
1373
|
+
};
|
|
1374
|
+
const autoplay = {
|
|
1375
|
+
spec: gameSpecs[12],
|
|
1376
|
+
impl: async (run, args) => {
|
|
1377
|
+
const user = userId(run);
|
|
1378
|
+
const id = args["game_id"];
|
|
1379
|
+
if (!user || typeof id !== "string")
|
|
1380
|
+
return { error: "game_id is required in a user session" };
|
|
1381
|
+
const game = await ownedGame(user, id);
|
|
1382
|
+
if (!game)
|
|
1383
|
+
return { error: "Game not found" };
|
|
1384
|
+
const workspace = await workspaceOf(user, game);
|
|
1385
|
+
if (!workspace)
|
|
1386
|
+
return { error: "Game workspace is unavailable" };
|
|
1387
|
+
const document = await readSource(workspace, game, args["source"], args["revision"]);
|
|
1388
|
+
if (!document)
|
|
1389
|
+
return { error: "Game source not found" };
|
|
1390
|
+
if (document.schemaVersion === 3) {
|
|
1391
|
+
return { status: "unsupported", dimension: "3d", code: "autoplay_3d_unsupported", message: "Use playtest_native_game with a recorded 3D route" };
|
|
1392
|
+
}
|
|
1393
|
+
const targetPrefix = args["target_prefix"];
|
|
1394
|
+
const playerId = args["player_id"];
|
|
1395
|
+
const win = args["win"];
|
|
1396
|
+
const maxTicks = args["max_ticks"];
|
|
1397
|
+
const seed = args["seed"];
|
|
1398
|
+
if (targetPrefix !== undefined && (typeof targetPrefix !== "string" || !targetPrefix.trim()))
|
|
1399
|
+
return { error: "target_prefix must be a nonempty string" };
|
|
1400
|
+
if (playerId !== undefined && typeof playerId !== "string")
|
|
1401
|
+
return { error: "player_id must be a string" };
|
|
1402
|
+
if (win !== undefined && typeof win !== "boolean")
|
|
1403
|
+
return { error: "win must be a boolean" };
|
|
1404
|
+
if (targetPrefix !== undefined && win === true)
|
|
1405
|
+
return { error: "Choose target_prefix or win, not both" };
|
|
1406
|
+
if (maxTicks !== undefined && (typeof maxTicks !== "number" || !Number.isSafeInteger(maxTicks) || maxTicks < 1 || maxTicks > MAX_PLAYTEST_TICKS))
|
|
1407
|
+
return { error: `max_ticks must be between 1 and ${MAX_PLAYTEST_TICKS}` };
|
|
1408
|
+
if (seed !== undefined && (typeof seed !== "number" || !Number.isSafeInteger(seed)))
|
|
1409
|
+
return { error: "seed must be an integer" };
|
|
1410
|
+
const options = { signal: run.context.signal };
|
|
1411
|
+
if (typeof targetPrefix === "string")
|
|
1412
|
+
options.targetPrefix = targetPrefix;
|
|
1413
|
+
else
|
|
1414
|
+
options.win = true;
|
|
1415
|
+
if (typeof playerId === "string")
|
|
1416
|
+
options.playerId = playerId;
|
|
1417
|
+
if (typeof seed === "number")
|
|
1418
|
+
options.seed = seed;
|
|
1419
|
+
if (typeof maxTicks === "number")
|
|
1420
|
+
options.maxTicks = maxTicks;
|
|
1421
|
+
const result = await autoplayNativeGame(document, options);
|
|
1422
|
+
const { winTick, reachedTargets, levelStats, snapshot, ...route } = result;
|
|
1423
|
+
return { game_id: shortResourceId(game.id), revision: document.revision, ...route, win_tick: winTick, reached_targets: reachedTargets, level_stats: levelStats, state: snapshot };
|
|
1424
|
+
}
|
|
1425
|
+
};
|
|
1426
|
+
export const module = {
|
|
1427
|
+
module: "game",
|
|
1428
|
+
exports: [create, get, save, install, playtest, buildGame, edit, capture, generateAsset, listExamples, getExample, installExample, autoplay,
|
|
1429
|
+
{ spec: previewGameAuthoringSpec, impl: previewGameAuthoring },
|
|
1430
|
+
{ spec: applyGameAuthoringSpec, impl: applyGameAuthoring }]
|
|
1431
|
+
};
|
|
1432
|
+
//# sourceMappingURL=game.js.map
|