@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,1165 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `sketches` capability module.
|
|
3
|
+
*
|
|
4
|
+
* Sketch capabilities: list and create, the five version tools, the headless
|
|
5
|
+
* layer editor, validate, and delete. The version tools used to be
|
|
6
|
+
* `../tools/sketch-version-tools.ts`; the editor was `sketch-edit-tools.ts`;
|
|
7
|
+
* `validate_sketch` lived beside the workflow tools in `../tools/mcp-tools.ts`.
|
|
8
|
+
*
|
|
9
|
+
* Wire names, descriptions and schemas are unchanged from the old classes.
|
|
10
|
+
*
|
|
11
|
+
* The tRPC-only sketch loader `validate_sketch` took as a constructor argument
|
|
12
|
+
* is `run.loaders?.sketch`. Every heavy dependency (`@nodetool-ai/models`, the
|
|
13
|
+
* sketch validator, the eval surface's blend-mode table) is imported inside the
|
|
14
|
+
* implementation that needs it.
|
|
15
|
+
*
|
|
16
|
+
* Design: docs/tool-class-retirement-design.md § "Migration".
|
|
17
|
+
*/
|
|
18
|
+
import { isShortResourceId } from "@nodetool-ai/protocol";
|
|
19
|
+
import { listSketchesSpec, createSketchSpec, getSketchSpec, listSketchVersionsSpec, getSketchVersionSpec, createSketchVersionSpec, restoreSketchVersionSpec, deleteSketchVersionSpec, editSketchSpec, refineImageBriefSpec, validateSketchSpec, DEFAULT_VERSION_LIMIT, MAX_VERSION_LIMIT, deleteSketchSpec } from "./sketches.specs.js";
|
|
20
|
+
import { isFiniteNumber, isNonBlankString, isNumber, isRecord, isString } from "../utils/type-guards.js";
|
|
21
|
+
import { resolveProjectId } from "./project-scope.js";
|
|
22
|
+
import { encodeSketchLayerData, findImageUseCase, IMAGE_USE_CASES } from "@nodetool-ai/protocol/api-schemas/sketch.js";
|
|
23
|
+
const isError = (value) => !!value &&
|
|
24
|
+
typeof value === "object" &&
|
|
25
|
+
typeof value.error === "string";
|
|
26
|
+
async function loadSketch(run, sketchId) {
|
|
27
|
+
if (!isString(sketchId) || !sketchId) {
|
|
28
|
+
return {
|
|
29
|
+
error: "image_document_id is required (use list_sketches to find one)."
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
const { ImageDocument } = await import("@nodetool-ai/models");
|
|
33
|
+
const doc = await ImageDocument.findById(sketchId);
|
|
34
|
+
// A sketch owned by someone else reads as missing — the same rule the tRPC
|
|
35
|
+
// router's ownership check applies.
|
|
36
|
+
if (!doc || doc.user_id !== run.context.userId) {
|
|
37
|
+
return { error: `Sketch ${sketchId} was not found.` };
|
|
38
|
+
}
|
|
39
|
+
return doc;
|
|
40
|
+
}
|
|
41
|
+
/** The list-item shape the tRPC router returns for a snapshot. */
|
|
42
|
+
function toVersionListItem(version) {
|
|
43
|
+
return {
|
|
44
|
+
id: version.id,
|
|
45
|
+
version: version.version,
|
|
46
|
+
name: version.name,
|
|
47
|
+
saveType: version.save_type,
|
|
48
|
+
width: version.width,
|
|
49
|
+
height: version.height,
|
|
50
|
+
backgroundColor: version.background_color,
|
|
51
|
+
createdAt: version.created_at
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* A snapshot's document is JSON text on SQLite and an object on Postgres, so
|
|
56
|
+
* parse only when it is a string. A row that is neither is corrupt, and saying
|
|
57
|
+
* so beats handing back a string the caller will treat as a document.
|
|
58
|
+
*/
|
|
59
|
+
function parseVersionDocument(raw) {
|
|
60
|
+
if (!isString(raw))
|
|
61
|
+
return raw;
|
|
62
|
+
try {
|
|
63
|
+
return JSON.parse(raw);
|
|
64
|
+
}
|
|
65
|
+
catch {
|
|
66
|
+
return { error: "The stored version document is not valid JSON." };
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
/** One-line count of what a validation found. */
|
|
70
|
+
function validationSummary(validation) {
|
|
71
|
+
const errors = validation.errors.length;
|
|
72
|
+
const warnings = validation.warnings.length;
|
|
73
|
+
if (errors === 0 && warnings === 0)
|
|
74
|
+
return "No issues found.";
|
|
75
|
+
const parts = [];
|
|
76
|
+
if (errors > 0)
|
|
77
|
+
parts.push(`${errors} error${errors === 1 ? "" : "s"}`);
|
|
78
|
+
if (warnings > 0)
|
|
79
|
+
parts.push(`${warnings} warning${warnings === 1 ? "" : "s"}`);
|
|
80
|
+
return parts.join(", ");
|
|
81
|
+
}
|
|
82
|
+
function versionNumber(value) {
|
|
83
|
+
const n = Number(value);
|
|
84
|
+
if (!Number.isInteger(n) || n < 1) {
|
|
85
|
+
return {
|
|
86
|
+
error: "version must be a positive integer (use list_sketch_versions to see the available ones)."
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
return n;
|
|
90
|
+
}
|
|
91
|
+
const DEFAULT_CANVAS_SIZE = 1024;
|
|
92
|
+
const DEFAULT_BACKGROUND = "#ffffff";
|
|
93
|
+
/** A blank raster document matching `sketch.create` on the tRPC router. */
|
|
94
|
+
function emptySketchDocument(width, height, backgroundColor) {
|
|
95
|
+
const layerId = crypto.randomUUID();
|
|
96
|
+
const now = new Date().toISOString();
|
|
97
|
+
return {
|
|
98
|
+
sketch: {
|
|
99
|
+
version: 3,
|
|
100
|
+
canvas: { width, height, backgroundColor },
|
|
101
|
+
layers: [
|
|
102
|
+
{
|
|
103
|
+
id: layerId,
|
|
104
|
+
name: "Layer 1",
|
|
105
|
+
type: "raster",
|
|
106
|
+
visible: true,
|
|
107
|
+
opacity: 1,
|
|
108
|
+
locked: false,
|
|
109
|
+
alphaLock: false,
|
|
110
|
+
blendMode: "normal",
|
|
111
|
+
data: null,
|
|
112
|
+
transform: { x: 0, y: 0 },
|
|
113
|
+
contentBounds: { x: 0, y: 0, width, height },
|
|
114
|
+
effects: []
|
|
115
|
+
}
|
|
116
|
+
],
|
|
117
|
+
activeLayerId: layerId,
|
|
118
|
+
maskLayerId: null,
|
|
119
|
+
activeTool: "brush",
|
|
120
|
+
viewport: { zoom: 1, pan: { x: 0, y: 0 } },
|
|
121
|
+
history: [],
|
|
122
|
+
historyIndex: -1,
|
|
123
|
+
metadata: { createdAt: now, updatedAt: now }
|
|
124
|
+
},
|
|
125
|
+
layerBindings: []
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
function canvasSize(value, fallback) {
|
|
129
|
+
if (value === undefined || value === null) {
|
|
130
|
+
return fallback;
|
|
131
|
+
}
|
|
132
|
+
if (!isFiniteNumber(value) || !Number.isInteger(value) || value < 1) {
|
|
133
|
+
return { error: "width and height must be positive integers." };
|
|
134
|
+
}
|
|
135
|
+
return value;
|
|
136
|
+
}
|
|
137
|
+
const createSketch = {
|
|
138
|
+
spec: createSketchSpec,
|
|
139
|
+
impl: async (run, params) => {
|
|
140
|
+
const userId = run.context.userId;
|
|
141
|
+
if (!userId)
|
|
142
|
+
return { error: "No user is bound to this session." };
|
|
143
|
+
const name = params["name"];
|
|
144
|
+
if (!isNonBlankString(name)) {
|
|
145
|
+
return { error: "name is required and must be a non-empty string." };
|
|
146
|
+
}
|
|
147
|
+
const width = canvasSize(params["width"], DEFAULT_CANVAS_SIZE);
|
|
148
|
+
if (isError(width))
|
|
149
|
+
return width;
|
|
150
|
+
const height = canvasSize(params["height"], DEFAULT_CANVAS_SIZE);
|
|
151
|
+
if (isError(height))
|
|
152
|
+
return height;
|
|
153
|
+
const backgroundColor = isNonBlankString(params["background_color"])
|
|
154
|
+
? params["background_color"].trim()
|
|
155
|
+
: DEFAULT_BACKGROUND;
|
|
156
|
+
const projectId = resolveProjectId(run, params);
|
|
157
|
+
const requestedId = isNonBlankString(params["id"])
|
|
158
|
+
? params["id"].trim()
|
|
159
|
+
: undefined;
|
|
160
|
+
const { ImageDocument } = await import("@nodetool-ai/models");
|
|
161
|
+
if (requestedId) {
|
|
162
|
+
const existing = await ImageDocument.findById(requestedId);
|
|
163
|
+
if (existing) {
|
|
164
|
+
if (existing.user_id !== userId) {
|
|
165
|
+
return { error: `A sketch with id ${requestedId} already exists.` };
|
|
166
|
+
}
|
|
167
|
+
return {
|
|
168
|
+
ok: true,
|
|
169
|
+
image_document_id: existing.id,
|
|
170
|
+
name: existing.name,
|
|
171
|
+
width: existing.width,
|
|
172
|
+
height: existing.height,
|
|
173
|
+
project_id: existing.project_id,
|
|
174
|
+
updated_at: existing.updated_at
|
|
175
|
+
};
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
const now = new Date().toISOString();
|
|
179
|
+
const document = emptySketchDocument(width, height, backgroundColor);
|
|
180
|
+
const fields = {
|
|
181
|
+
user_id: userId,
|
|
182
|
+
project_id: projectId,
|
|
183
|
+
name: name.trim(),
|
|
184
|
+
width,
|
|
185
|
+
height,
|
|
186
|
+
background_color: backgroundColor,
|
|
187
|
+
document: JSON.stringify(document),
|
|
188
|
+
created_at: now,
|
|
189
|
+
updated_at: now
|
|
190
|
+
};
|
|
191
|
+
if (requestedId) {
|
|
192
|
+
fields.id = requestedId;
|
|
193
|
+
}
|
|
194
|
+
const doc = new ImageDocument(fields);
|
|
195
|
+
await doc.save();
|
|
196
|
+
return {
|
|
197
|
+
ok: true,
|
|
198
|
+
image_document_id: doc.id,
|
|
199
|
+
name: doc.name,
|
|
200
|
+
width: doc.width,
|
|
201
|
+
height: doc.height,
|
|
202
|
+
project_id: doc.project_id,
|
|
203
|
+
updated_at: doc.updated_at
|
|
204
|
+
};
|
|
205
|
+
}
|
|
206
|
+
};
|
|
207
|
+
const listSketches = {
|
|
208
|
+
spec: listSketchesSpec,
|
|
209
|
+
impl: async (run, params) => {
|
|
210
|
+
const userId = run.context.userId;
|
|
211
|
+
if (!userId)
|
|
212
|
+
return { error: "No user is bound to this session." };
|
|
213
|
+
const { ImageDocument } = await import("@nodetool-ai/models");
|
|
214
|
+
const limit = Math.max(1, Math.min(Number(params["limit"]) || 20, 100));
|
|
215
|
+
const query = isString(params["query"])
|
|
216
|
+
? params["query"].trim().toLowerCase()
|
|
217
|
+
: "";
|
|
218
|
+
// Filter after the read: the name filter is not indexed, and the per-user
|
|
219
|
+
// limit is what bounds the scan.
|
|
220
|
+
const rows = await ImageDocument.listByUser(userId, 100);
|
|
221
|
+
const matching = query
|
|
222
|
+
? rows.filter((row) => row.name.toLowerCase().includes(query))
|
|
223
|
+
: rows;
|
|
224
|
+
return {
|
|
225
|
+
sketches: matching.slice(0, limit).map((row) => ({
|
|
226
|
+
id: row.id,
|
|
227
|
+
name: row.name,
|
|
228
|
+
width: row.width,
|
|
229
|
+
height: row.height,
|
|
230
|
+
updated_at: row.updated_at
|
|
231
|
+
}))
|
|
232
|
+
};
|
|
233
|
+
}
|
|
234
|
+
};
|
|
235
|
+
const getSketch = {
|
|
236
|
+
spec: getSketchSpec,
|
|
237
|
+
impl: async (run, params) => {
|
|
238
|
+
const doc = await loadSketch(run, params["image_document_id"]);
|
|
239
|
+
if (isError(doc))
|
|
240
|
+
return doc;
|
|
241
|
+
return { sketch: doc.toResponse() };
|
|
242
|
+
}
|
|
243
|
+
};
|
|
244
|
+
const listSketchVersions = {
|
|
245
|
+
spec: listSketchVersionsSpec,
|
|
246
|
+
impl: async (run, params) => {
|
|
247
|
+
const doc = await loadSketch(run, params["image_document_id"]);
|
|
248
|
+
if (isError(doc))
|
|
249
|
+
return doc;
|
|
250
|
+
const { ImageDocumentVersion } = await import("@nodetool-ai/models");
|
|
251
|
+
const limit = Math.max(1, Math.min(Number(params["limit"]) || DEFAULT_VERSION_LIMIT, MAX_VERSION_LIMIT));
|
|
252
|
+
const saveType = isString(params["save_type"])
|
|
253
|
+
? params["save_type"]
|
|
254
|
+
: undefined;
|
|
255
|
+
const versions = await ImageDocumentVersion.listForDocument(doc.id, {
|
|
256
|
+
limit,
|
|
257
|
+
saveType
|
|
258
|
+
});
|
|
259
|
+
return {
|
|
260
|
+
image_document_id: doc.id,
|
|
261
|
+
name: doc.name,
|
|
262
|
+
versions: versions.map(toVersionListItem)
|
|
263
|
+
};
|
|
264
|
+
}
|
|
265
|
+
};
|
|
266
|
+
const getSketchVersion = {
|
|
267
|
+
spec: getSketchVersionSpec,
|
|
268
|
+
impl: async (run, params) => {
|
|
269
|
+
const doc = await loadSketch(run, params["image_document_id"]);
|
|
270
|
+
if (isError(doc))
|
|
271
|
+
return doc;
|
|
272
|
+
const number = versionNumber(params["version"]);
|
|
273
|
+
if (isError(number))
|
|
274
|
+
return number;
|
|
275
|
+
const { ImageDocumentVersion } = await import("@nodetool-ai/models");
|
|
276
|
+
const version = await ImageDocumentVersion.findByVersion(doc.id, number);
|
|
277
|
+
if (!version) {
|
|
278
|
+
return {
|
|
279
|
+
error: `Sketch ${doc.id} has no version ${number}. Call list_sketch_versions to see the available ones.`
|
|
280
|
+
};
|
|
281
|
+
}
|
|
282
|
+
const document = parseVersionDocument(version.document);
|
|
283
|
+
if (isError(document))
|
|
284
|
+
return document;
|
|
285
|
+
return {
|
|
286
|
+
image_document_id: doc.id,
|
|
287
|
+
...toVersionListItem(version),
|
|
288
|
+
document
|
|
289
|
+
};
|
|
290
|
+
}
|
|
291
|
+
};
|
|
292
|
+
const createSketchVersion = {
|
|
293
|
+
spec: createSketchVersionSpec,
|
|
294
|
+
impl: async (run, params) => {
|
|
295
|
+
const doc = await loadSketch(run, params["image_document_id"]);
|
|
296
|
+
if (isError(doc))
|
|
297
|
+
return doc;
|
|
298
|
+
const { ImageDocumentVersion } = await import("@nodetool-ai/models");
|
|
299
|
+
const name = isString(params["name"]) && params["name"]
|
|
300
|
+
? params["name"]
|
|
301
|
+
: null;
|
|
302
|
+
const version = await ImageDocumentVersion.snapshot(doc, {
|
|
303
|
+
saveType: "manual",
|
|
304
|
+
name
|
|
305
|
+
});
|
|
306
|
+
return {
|
|
307
|
+
ok: true,
|
|
308
|
+
image_document_id: doc.id,
|
|
309
|
+
...toVersionListItem(version)
|
|
310
|
+
};
|
|
311
|
+
}
|
|
312
|
+
};
|
|
313
|
+
const restoreSketchVersion = {
|
|
314
|
+
spec: restoreSketchVersionSpec,
|
|
315
|
+
impl: async (run, params) => {
|
|
316
|
+
const doc = await loadSketch(run, params["image_document_id"]);
|
|
317
|
+
if (isError(doc))
|
|
318
|
+
return doc;
|
|
319
|
+
const number = versionNumber(params["version"]);
|
|
320
|
+
if (isError(number))
|
|
321
|
+
return number;
|
|
322
|
+
const { ImageDocument, ImageDocumentVersion } = await import("@nodetool-ai/models");
|
|
323
|
+
const version = await ImageDocumentVersion.findByVersion(doc.id, number);
|
|
324
|
+
if (!version) {
|
|
325
|
+
return {
|
|
326
|
+
error: `Sketch ${doc.id} has no version ${number}. Call list_sketch_versions to see the available ones.`
|
|
327
|
+
};
|
|
328
|
+
}
|
|
329
|
+
const document = parseVersionDocument(version.document);
|
|
330
|
+
if (isError(document))
|
|
331
|
+
return document;
|
|
332
|
+
// Snapshot what is about to be overwritten first, so a restore is itself
|
|
333
|
+
// undoable.
|
|
334
|
+
const undo = await ImageDocumentVersion.snapshot(doc, {
|
|
335
|
+
saveType: "restore",
|
|
336
|
+
name: `Before restore to v${number}`
|
|
337
|
+
});
|
|
338
|
+
const updated = await ImageDocument.updateFieldsIfUnchanged(doc.id, doc.updated_at, {
|
|
339
|
+
document: JSON.stringify(document),
|
|
340
|
+
width: version.width,
|
|
341
|
+
height: version.height,
|
|
342
|
+
background_color: version.background_color
|
|
343
|
+
});
|
|
344
|
+
if (!updated) {
|
|
345
|
+
return {
|
|
346
|
+
error: `Sketch ${doc.id} was modified since it was read (optimistic concurrency conflict); nothing was restored. Retry the call.`,
|
|
347
|
+
undo_version: undo.version
|
|
348
|
+
};
|
|
349
|
+
}
|
|
350
|
+
const { validateSketchDocument } = await import("@nodetool-ai/execution/sketch-debug");
|
|
351
|
+
const validation = validateSketchDocument(document, {
|
|
352
|
+
width: version.width,
|
|
353
|
+
height: version.height,
|
|
354
|
+
backgroundColor: version.background_color
|
|
355
|
+
});
|
|
356
|
+
return {
|
|
357
|
+
ok: true,
|
|
358
|
+
image_document_id: doc.id,
|
|
359
|
+
restored_version: number,
|
|
360
|
+
undo_version: undo.version,
|
|
361
|
+
width: updated.width,
|
|
362
|
+
height: updated.height,
|
|
363
|
+
backgroundColor: updated.background_color,
|
|
364
|
+
updated_at: updated.updated_at,
|
|
365
|
+
validation,
|
|
366
|
+
summary: validationSummary(validation)
|
|
367
|
+
};
|
|
368
|
+
}
|
|
369
|
+
};
|
|
370
|
+
const deleteSketchVersion = {
|
|
371
|
+
spec: deleteSketchVersionSpec,
|
|
372
|
+
impl: async (run, params) => {
|
|
373
|
+
const doc = await loadSketch(run, params["image_document_id"]);
|
|
374
|
+
if (isError(doc))
|
|
375
|
+
return doc;
|
|
376
|
+
const number = versionNumber(params["version"]);
|
|
377
|
+
if (isError(number))
|
|
378
|
+
return number;
|
|
379
|
+
const { ImageDocumentVersion } = await import("@nodetool-ai/models");
|
|
380
|
+
const version = await ImageDocumentVersion.findByVersion(doc.id, number);
|
|
381
|
+
if (!version) {
|
|
382
|
+
return {
|
|
383
|
+
error: `Sketch ${doc.id} has no version ${number}. Call list_sketch_versions to see the available ones.`
|
|
384
|
+
};
|
|
385
|
+
}
|
|
386
|
+
await version.delete();
|
|
387
|
+
return {
|
|
388
|
+
ok: true,
|
|
389
|
+
image_document_id: doc.id,
|
|
390
|
+
deleted_version: number
|
|
391
|
+
};
|
|
392
|
+
}
|
|
393
|
+
};
|
|
394
|
+
/** Operations one call may apply, so a runaway script cannot rewrite a sketch. */
|
|
395
|
+
const MAX_OPS = 60;
|
|
396
|
+
/** Stages the guided image flow can resume at (PRD § 10.5). */
|
|
397
|
+
const SETUP_STAGES = [
|
|
398
|
+
"idea",
|
|
399
|
+
"useCase",
|
|
400
|
+
"review",
|
|
401
|
+
"look",
|
|
402
|
+
"done"
|
|
403
|
+
];
|
|
404
|
+
const OPS = [
|
|
405
|
+
"add_layer",
|
|
406
|
+
"remove_layer",
|
|
407
|
+
"rename_layer",
|
|
408
|
+
"set_layer_props",
|
|
409
|
+
"reorder_layer",
|
|
410
|
+
"duplicate_layer",
|
|
411
|
+
"select_layer",
|
|
412
|
+
"resize_canvas",
|
|
413
|
+
"set_layer_image",
|
|
414
|
+
"set_setup"
|
|
415
|
+
];
|
|
416
|
+
const isOpName = (value) => OPS.includes(value);
|
|
417
|
+
function parseOps(raw) {
|
|
418
|
+
if (!Array.isArray(raw) || raw.length === 0) {
|
|
419
|
+
return {
|
|
420
|
+
error: 'ops must be a non-empty array, e.g. [{"op": "add_layer", "name": "Shadow"}].'
|
|
421
|
+
};
|
|
422
|
+
}
|
|
423
|
+
if (raw.length > MAX_OPS) {
|
|
424
|
+
return {
|
|
425
|
+
error: `ops holds ${raw.length} entries; at most ${MAX_OPS} per call.`
|
|
426
|
+
};
|
|
427
|
+
}
|
|
428
|
+
const parsed = [];
|
|
429
|
+
for (const [index, entry] of raw.entries()) {
|
|
430
|
+
if (!isRecord(entry)) {
|
|
431
|
+
return { error: `ops[${index}] must be an object.` };
|
|
432
|
+
}
|
|
433
|
+
const { op, ...args } = entry;
|
|
434
|
+
if (!isString(op) || !isOpName(op.trim())) {
|
|
435
|
+
return {
|
|
436
|
+
error: `ops[${index}] names "${String(op)}"; expected one of ${OPS.join(", ")}.`
|
|
437
|
+
};
|
|
438
|
+
}
|
|
439
|
+
parsed.push({ op: op.trim(), args });
|
|
440
|
+
}
|
|
441
|
+
return parsed;
|
|
442
|
+
}
|
|
443
|
+
/** Resolve a layer reference: id, name (case-insensitive), or "active". */
|
|
444
|
+
function findLayerIndex(layers, activeLayerId, target) {
|
|
445
|
+
const raw = isString(target) ? target.trim() : "";
|
|
446
|
+
if (raw === "" || raw === "active") {
|
|
447
|
+
return layers.findIndex((layer) => layer.id === activeLayerId);
|
|
448
|
+
}
|
|
449
|
+
const byId = layers.findIndex((layer) => layer.id === raw);
|
|
450
|
+
if (byId >= 0)
|
|
451
|
+
return byId;
|
|
452
|
+
const name = raw.toLowerCase();
|
|
453
|
+
return layers.findIndex((layer) => layer.name.trim().toLowerCase() === name);
|
|
454
|
+
}
|
|
455
|
+
/** A fresh, empty layer — no bitmap, sized to the canvas. */
|
|
456
|
+
function makeLayer(id, name, type, width, height) {
|
|
457
|
+
return {
|
|
458
|
+
id,
|
|
459
|
+
name,
|
|
460
|
+
type,
|
|
461
|
+
visible: true,
|
|
462
|
+
locked: false,
|
|
463
|
+
opacity: 1,
|
|
464
|
+
alphaLock: false,
|
|
465
|
+
blendMode: "normal",
|
|
466
|
+
data: null,
|
|
467
|
+
transform: { x: 0, y: 0 },
|
|
468
|
+
contentBounds: { x: 0, y: 0, width, height },
|
|
469
|
+
effects: []
|
|
470
|
+
};
|
|
471
|
+
}
|
|
472
|
+
function mintLayerId(layers) {
|
|
473
|
+
const used = new Set(layers.map((layer) => layer.id));
|
|
474
|
+
let n = layers.length + 1;
|
|
475
|
+
while (used.has(`layer-${n}`))
|
|
476
|
+
n += 1;
|
|
477
|
+
return `layer-${n}`;
|
|
478
|
+
}
|
|
479
|
+
/**
|
|
480
|
+
* The layer image references a caller may name. An asset id and an
|
|
481
|
+
* `asset://` locator both resolve through the asset's own `get_url` when the
|
|
482
|
+
* editor loads the layer; a data URL and an http(s) URL load directly.
|
|
483
|
+
*/
|
|
484
|
+
const IMAGE_URI_SCHEMES = ["asset://", "data:", "http://", "https://"];
|
|
485
|
+
/**
|
|
486
|
+
* Normalize what a caller passed as an image into a locator the editor's
|
|
487
|
+
* canvas runtime resolves. A bare id becomes `asset://<id>`, which is how
|
|
488
|
+
* every other sketch surface stores a reference to a stored image.
|
|
489
|
+
*/
|
|
490
|
+
function normalizeImageReference(value) {
|
|
491
|
+
if (!isNonBlankString(value)) {
|
|
492
|
+
return {
|
|
493
|
+
error: "set_layer_image needs an `image`: an asset id, an asset:// locator, a data: URL, or an http(s) URL."
|
|
494
|
+
};
|
|
495
|
+
}
|
|
496
|
+
const image = value.trim();
|
|
497
|
+
if (IMAGE_URI_SCHEMES.some((scheme) => image.startsWith(scheme))) {
|
|
498
|
+
return image;
|
|
499
|
+
}
|
|
500
|
+
if (image.includes("://")) {
|
|
501
|
+
return {
|
|
502
|
+
error: `image "${image}" uses a scheme the sketch canvas cannot load. Use an asset id, asset://, data:, or http(s)://.`
|
|
503
|
+
};
|
|
504
|
+
}
|
|
505
|
+
return `asset://${image}`;
|
|
506
|
+
}
|
|
507
|
+
/** The asset id an `asset://` locator names, ignoring any file extension. */
|
|
508
|
+
function assetIdOfReference(image) {
|
|
509
|
+
if (!image.startsWith("asset://"))
|
|
510
|
+
return null;
|
|
511
|
+
const rest = image.slice("asset://".length).split(/[?#]/)[0];
|
|
512
|
+
const last = rest.includes("/") ? rest.slice(rest.lastIndexOf("/") + 1) : rest;
|
|
513
|
+
return last.replace(/\.[^.]+$/, "") || null;
|
|
514
|
+
}
|
|
515
|
+
/**
|
|
516
|
+
* Point a layer at an image. The bitmap is not inlined: `data` holds the
|
|
517
|
+
* locator plus the bounds it occupies, and the editor's canvas runtime
|
|
518
|
+
* resolves and draws it on load. That is the same shape a sketch seeded from
|
|
519
|
+
* an asset carries, so a layer written here opens exactly like one the editor
|
|
520
|
+
* itself produced.
|
|
521
|
+
*
|
|
522
|
+
* Bounds default to the whole canvas. The image is drawn at its natural size
|
|
523
|
+
* anchored at the bounds' top-left, so a caller that knows the image's
|
|
524
|
+
* dimensions should pass them rather than leave the layer canvas oversized.
|
|
525
|
+
*/
|
|
526
|
+
function setLayerImage(layer, args, canvasWidth, canvasHeight) {
|
|
527
|
+
const image = normalizeImageReference(args["image"]);
|
|
528
|
+
if (isError(image)) {
|
|
529
|
+
throw new Error(image.error);
|
|
530
|
+
}
|
|
531
|
+
const dimension = (value, fallback, name) => {
|
|
532
|
+
if (value === undefined || value === null)
|
|
533
|
+
return fallback;
|
|
534
|
+
const n = Number(value);
|
|
535
|
+
if (!Number.isFinite(n) || !Number.isInteger(n) || n < 1) {
|
|
536
|
+
throw new Error(`set_layer_image needs a positive integer \`${name}\`.`);
|
|
537
|
+
}
|
|
538
|
+
return n;
|
|
539
|
+
};
|
|
540
|
+
const offset = (value, name) => {
|
|
541
|
+
if (value === undefined || value === null)
|
|
542
|
+
return 0;
|
|
543
|
+
const n = Number(value);
|
|
544
|
+
if (!Number.isFinite(n) || !Number.isInteger(n)) {
|
|
545
|
+
throw new Error(`set_layer_image needs an integer \`${name}\`.`);
|
|
546
|
+
}
|
|
547
|
+
return n;
|
|
548
|
+
};
|
|
549
|
+
const bounds = {
|
|
550
|
+
x: offset(args["x"], "x"),
|
|
551
|
+
y: offset(args["y"], "y"),
|
|
552
|
+
width: dimension(args["width"], canvasWidth, "width"),
|
|
553
|
+
height: dimension(args["height"], canvasHeight, "height")
|
|
554
|
+
};
|
|
555
|
+
return {
|
|
556
|
+
layer: {
|
|
557
|
+
...layer,
|
|
558
|
+
data: encodeSketchLayerData(image, bounds),
|
|
559
|
+
contentBounds: bounds
|
|
560
|
+
},
|
|
561
|
+
image,
|
|
562
|
+
bounds
|
|
563
|
+
};
|
|
564
|
+
}
|
|
565
|
+
/** Apply one operation. Returns the result summary, or throws with the reason. */
|
|
566
|
+
function applyOp(state, { op, args }, blendModes) {
|
|
567
|
+
const { layers } = state;
|
|
568
|
+
switch (op) {
|
|
569
|
+
case "add_layer": {
|
|
570
|
+
const name = isNonBlankString(args["name"])
|
|
571
|
+
? args["name"].trim()
|
|
572
|
+
: `Layer ${layers.length + 1}`;
|
|
573
|
+
const type = args["type"] === "mask" ? "mask" : "raster";
|
|
574
|
+
let layer = makeLayer(mintLayerId(layers), name, type, state.canvas.width, state.canvas.height);
|
|
575
|
+
// An `image` makes this one op instead of add_layer + set_layer_image,
|
|
576
|
+
// which is how a caller places a picture on a fresh layer.
|
|
577
|
+
const placed = args["image"] === undefined
|
|
578
|
+
? null
|
|
579
|
+
: setLayerImage(layer, args, state.canvas.width, state.canvas.height);
|
|
580
|
+
if (placed)
|
|
581
|
+
layer = placed.layer;
|
|
582
|
+
// Layers are ordered bottom-to-top, so a new one goes on top unless the
|
|
583
|
+
// caller pins an index.
|
|
584
|
+
const at = isNumber(args["index"])
|
|
585
|
+
? Math.max(0, Math.min(Math.trunc(args["index"]), layers.length))
|
|
586
|
+
: layers.length;
|
|
587
|
+
layers.splice(at, 0, layer);
|
|
588
|
+
state.activeLayerId = layer.id;
|
|
589
|
+
const summary = { id: layer.id, name: layer.name, index: at };
|
|
590
|
+
if (placed) {
|
|
591
|
+
summary.image = placed.image;
|
|
592
|
+
summary.bounds = placed.bounds;
|
|
593
|
+
}
|
|
594
|
+
return summary;
|
|
595
|
+
}
|
|
596
|
+
case "remove_layer": {
|
|
597
|
+
if (layers.length <= 1) {
|
|
598
|
+
throw new Error("A sketch must keep at least one layer.");
|
|
599
|
+
}
|
|
600
|
+
const index = findLayerIndex(layers, state.activeLayerId, args["target"]);
|
|
601
|
+
if (index < 0)
|
|
602
|
+
throw new Error(`No layer matches "${String(args["target"])}".`);
|
|
603
|
+
const [removed] = layers.splice(index, 1);
|
|
604
|
+
state.bindings = state.bindings.filter((binding) => binding.layerId !== removed.id);
|
|
605
|
+
if (state.activeLayerId === removed.id) {
|
|
606
|
+
state.activeLayerId = layers[Math.min(index, layers.length - 1)].id;
|
|
607
|
+
}
|
|
608
|
+
return { removed: removed.id };
|
|
609
|
+
}
|
|
610
|
+
case "rename_layer": {
|
|
611
|
+
const index = findLayerIndex(layers, state.activeLayerId, args["target"]);
|
|
612
|
+
if (index < 0)
|
|
613
|
+
throw new Error(`No layer matches "${String(args["target"])}".`);
|
|
614
|
+
const name = args["name"];
|
|
615
|
+
if (!isString(name) || name.trim() === "") {
|
|
616
|
+
throw new Error("rename_layer needs a non-empty `name`.");
|
|
617
|
+
}
|
|
618
|
+
layers[index] = { ...layers[index], name: name.trim() };
|
|
619
|
+
return { id: layers[index].id, name: layers[index].name };
|
|
620
|
+
}
|
|
621
|
+
case "set_layer_props": {
|
|
622
|
+
const index = findLayerIndex(layers, state.activeLayerId, args["target"]);
|
|
623
|
+
if (index < 0)
|
|
624
|
+
throw new Error(`No layer matches "${String(args["target"])}".`);
|
|
625
|
+
const next = { ...layers[index] };
|
|
626
|
+
if (args["visible"] !== undefined)
|
|
627
|
+
next.visible = !!args["visible"];
|
|
628
|
+
if (args["locked"] !== undefined)
|
|
629
|
+
next.locked = !!args["locked"];
|
|
630
|
+
if (args["opacity"] !== undefined) {
|
|
631
|
+
const opacity = Number(args["opacity"]);
|
|
632
|
+
if (!Number.isFinite(opacity) || opacity < 0 || opacity > 1) {
|
|
633
|
+
throw new Error("opacity must be a number in [0, 1].");
|
|
634
|
+
}
|
|
635
|
+
next.opacity = opacity;
|
|
636
|
+
}
|
|
637
|
+
if (args["blendMode"] !== undefined) {
|
|
638
|
+
const blendMode = String(args["blendMode"]);
|
|
639
|
+
if (!blendModes.includes(blendMode)) {
|
|
640
|
+
throw new Error(`blendMode "${blendMode}" is not one the compositor ships. Use one of: ${blendModes.join(", ")}.`);
|
|
641
|
+
}
|
|
642
|
+
next.blendMode = blendMode;
|
|
643
|
+
}
|
|
644
|
+
layers[index] = next;
|
|
645
|
+
return {
|
|
646
|
+
id: next.id,
|
|
647
|
+
visible: next.visible,
|
|
648
|
+
locked: next.locked,
|
|
649
|
+
opacity: next.opacity,
|
|
650
|
+
blendMode: next.blendMode
|
|
651
|
+
};
|
|
652
|
+
}
|
|
653
|
+
case "reorder_layer": {
|
|
654
|
+
const index = findLayerIndex(layers, state.activeLayerId, args["target"]);
|
|
655
|
+
if (index < 0)
|
|
656
|
+
throw new Error(`No layer matches "${String(args["target"])}".`);
|
|
657
|
+
const to = Number(args["index"]);
|
|
658
|
+
if (!Number.isInteger(to) || to < 0 || to >= layers.length) {
|
|
659
|
+
throw new Error(`reorder_layer needs an \`index\` in [0, ${layers.length - 1}] (0 is the bottom layer).`);
|
|
660
|
+
}
|
|
661
|
+
const [moved] = layers.splice(index, 1);
|
|
662
|
+
layers.splice(to, 0, moved);
|
|
663
|
+
return { id: moved.id, index: to };
|
|
664
|
+
}
|
|
665
|
+
case "duplicate_layer": {
|
|
666
|
+
const index = findLayerIndex(layers, state.activeLayerId, args["target"]);
|
|
667
|
+
if (index < 0)
|
|
668
|
+
throw new Error(`No layer matches "${String(args["target"])}".`);
|
|
669
|
+
const source = layers[index];
|
|
670
|
+
// The bitmap is copied by reference to the same data URL — the copy is a
|
|
671
|
+
// duplicate, not a fork, and nothing here decodes pixels.
|
|
672
|
+
const copy = {
|
|
673
|
+
...source,
|
|
674
|
+
id: mintLayerId(layers),
|
|
675
|
+
name: `${source.name} copy`
|
|
676
|
+
};
|
|
677
|
+
layers.splice(index + 1, 0, copy);
|
|
678
|
+
state.activeLayerId = copy.id;
|
|
679
|
+
return { id: copy.id, name: copy.name, index: index + 1 };
|
|
680
|
+
}
|
|
681
|
+
case "select_layer": {
|
|
682
|
+
const index = findLayerIndex(layers, state.activeLayerId, args["target"]);
|
|
683
|
+
if (index < 0)
|
|
684
|
+
throw new Error(`No layer matches "${String(args["target"])}".`);
|
|
685
|
+
state.activeLayerId = layers[index].id;
|
|
686
|
+
return { activeLayerId: state.activeLayerId };
|
|
687
|
+
}
|
|
688
|
+
case "set_layer_image": {
|
|
689
|
+
const index = findLayerIndex(layers, state.activeLayerId, args["target"]);
|
|
690
|
+
if (index < 0)
|
|
691
|
+
throw new Error(`No layer matches "${String(args["target"])}".`);
|
|
692
|
+
const applied = setLayerImage(layers[index], args, state.canvas.width, state.canvas.height);
|
|
693
|
+
layers[index] = applied.layer;
|
|
694
|
+
return {
|
|
695
|
+
id: applied.layer.id,
|
|
696
|
+
name: applied.layer.name,
|
|
697
|
+
image: applied.image,
|
|
698
|
+
bounds: applied.bounds
|
|
699
|
+
};
|
|
700
|
+
}
|
|
701
|
+
case "resize_canvas": {
|
|
702
|
+
const width = Number(args["width"] ?? state.canvas.width);
|
|
703
|
+
const height = Number(args["height"] ?? state.canvas.height);
|
|
704
|
+
if (!Number.isInteger(width) ||
|
|
705
|
+
!Number.isInteger(height) ||
|
|
706
|
+
width < 1 ||
|
|
707
|
+
height < 1) {
|
|
708
|
+
throw new Error("resize_canvas needs positive integer width/height.");
|
|
709
|
+
}
|
|
710
|
+
state.canvas = { ...state.canvas, width, height };
|
|
711
|
+
return { width, height };
|
|
712
|
+
}
|
|
713
|
+
case "set_setup": {
|
|
714
|
+
const current = state.setup ?? { stage: "done", brief: "" };
|
|
715
|
+
const next = { ...current };
|
|
716
|
+
if (args["brief"] !== undefined) {
|
|
717
|
+
if (!isString(args["brief"])) {
|
|
718
|
+
throw new Error("set_setup's `brief` must be a string.");
|
|
719
|
+
}
|
|
720
|
+
next.brief = args["brief"];
|
|
721
|
+
}
|
|
722
|
+
if (args["use_case"] !== undefined) {
|
|
723
|
+
const useCase = findImageUseCase(isString(args["use_case"]) ? args["use_case"] : null);
|
|
724
|
+
if (!useCase) {
|
|
725
|
+
throw new Error(`set_setup's \`use_case\` must be one of ${IMAGE_USE_CASES.map((entry) => entry.id).join(", ")}.`);
|
|
726
|
+
}
|
|
727
|
+
next.use_case = useCase.id;
|
|
728
|
+
// The card writes the same two defaults in the editor, so a headless
|
|
729
|
+
// caller that picks a use case gets the same document.
|
|
730
|
+
next.variations ??= useCase.defaultVariations;
|
|
731
|
+
state.canvas = {
|
|
732
|
+
...state.canvas,
|
|
733
|
+
width: useCase.defaultSize.width,
|
|
734
|
+
height: useCase.defaultSize.height
|
|
735
|
+
};
|
|
736
|
+
}
|
|
737
|
+
if (args["variations"] !== undefined) {
|
|
738
|
+
const variations = Number(args["variations"]);
|
|
739
|
+
if (!Number.isInteger(variations) || variations < 1 || variations > 8) {
|
|
740
|
+
throw new Error("set_setup's `variations` must be 1..8.");
|
|
741
|
+
}
|
|
742
|
+
next.variations = variations;
|
|
743
|
+
}
|
|
744
|
+
if (args["stage"] !== undefined) {
|
|
745
|
+
const stage = isString(args["stage"]) ? args["stage"].trim() : "";
|
|
746
|
+
if (!SETUP_STAGES.includes(stage)) {
|
|
747
|
+
throw new Error(`set_setup's \`stage\` must be one of ${SETUP_STAGES.join(", ")}.`);
|
|
748
|
+
}
|
|
749
|
+
next.stage = stage;
|
|
750
|
+
}
|
|
751
|
+
state.setup = next;
|
|
752
|
+
return next;
|
|
753
|
+
}
|
|
754
|
+
default:
|
|
755
|
+
throw new Error(`Unknown operation "${op}".`);
|
|
756
|
+
}
|
|
757
|
+
}
|
|
758
|
+
const LAYER_TARGET_OPS = new Set([
|
|
759
|
+
"set_layer_props",
|
|
760
|
+
"set_layer_image",
|
|
761
|
+
"rename_layer",
|
|
762
|
+
"duplicate_layer",
|
|
763
|
+
"remove_layer",
|
|
764
|
+
"reorder_layer",
|
|
765
|
+
"select_layer"
|
|
766
|
+
]);
|
|
767
|
+
/** Resolve a layer target against the state at this point in the batch. */
|
|
768
|
+
function resolveSketchOp(state, parsed) {
|
|
769
|
+
const rawTarget = parsed.args["target"];
|
|
770
|
+
if (typeof rawTarget === "string" && LAYER_TARGET_OPS.has(parsed.op)) {
|
|
771
|
+
const index = findLayerIndex(state.layers, state.activeLayerId, rawTarget);
|
|
772
|
+
if (index >= 0) {
|
|
773
|
+
const canonical = state.layers[index].id;
|
|
774
|
+
return {
|
|
775
|
+
tool: parsed.op,
|
|
776
|
+
input: { ...parsed.args, target: canonical, id: canonical }
|
|
777
|
+
};
|
|
778
|
+
}
|
|
779
|
+
}
|
|
780
|
+
return { tool: parsed.op, input: parsed.args };
|
|
781
|
+
}
|
|
782
|
+
/**
|
|
783
|
+
* Asset ids named by an op's `image` that this user has no asset for. Reading
|
|
784
|
+
* them up front turns "the layer is empty" into a message naming the id.
|
|
785
|
+
*/
|
|
786
|
+
async function resolveSketchAssetReferences(run, ops) {
|
|
787
|
+
const ids = new Set();
|
|
788
|
+
for (const { op, args } of ops) {
|
|
789
|
+
if (op !== "set_layer_image" && op !== "add_layer")
|
|
790
|
+
continue;
|
|
791
|
+
const image = normalizeImageReference(args["image"]);
|
|
792
|
+
if (isError(image))
|
|
793
|
+
continue;
|
|
794
|
+
const assetId = assetIdOfReference(image);
|
|
795
|
+
if (assetId)
|
|
796
|
+
ids.add(assetId);
|
|
797
|
+
}
|
|
798
|
+
if (ids.size === 0)
|
|
799
|
+
return [];
|
|
800
|
+
const userId = run.context.userId;
|
|
801
|
+
if (!userId)
|
|
802
|
+
return [...ids];
|
|
803
|
+
// `findMany` is user-scoped, so another user's asset reads as missing — the
|
|
804
|
+
// same rule the rest of this module applies to sketches.
|
|
805
|
+
const { Asset } = await import("@nodetool-ai/models");
|
|
806
|
+
const fullIds = [...ids].filter((id) => !isShortResourceId(id));
|
|
807
|
+
const found = new Set((await Asset.findMany(userId, fullIds)).map((asset) => asset.id));
|
|
808
|
+
const resolved = new Map();
|
|
809
|
+
for (const id of ids) {
|
|
810
|
+
if (!isShortResourceId(id))
|
|
811
|
+
continue;
|
|
812
|
+
const asset = await Asset.find(userId, id);
|
|
813
|
+
if (asset)
|
|
814
|
+
resolved.set(id, asset.id);
|
|
815
|
+
}
|
|
816
|
+
for (const parsed of ops) {
|
|
817
|
+
if (parsed.op !== "set_layer_image" && parsed.op !== "add_layer")
|
|
818
|
+
continue;
|
|
819
|
+
const image = normalizeImageReference(parsed.args["image"]);
|
|
820
|
+
if (isError(image))
|
|
821
|
+
continue;
|
|
822
|
+
const id = assetIdOfReference(image);
|
|
823
|
+
const fullId = id ? resolved.get(id) : undefined;
|
|
824
|
+
if (fullId) {
|
|
825
|
+
parsed.args["image"] = `asset://${fullId}`;
|
|
826
|
+
}
|
|
827
|
+
}
|
|
828
|
+
return [...ids].filter((id) => !found.has(id) && !resolved.has(id));
|
|
829
|
+
}
|
|
830
|
+
const editSketch = {
|
|
831
|
+
spec: editSketchSpec,
|
|
832
|
+
impl: async (run, params) => {
|
|
833
|
+
const sketchId = params["image_document_id"];
|
|
834
|
+
if (!isString(sketchId) || !sketchId) {
|
|
835
|
+
return {
|
|
836
|
+
error: "image_document_id is required (use list_sketches to find one)."
|
|
837
|
+
};
|
|
838
|
+
}
|
|
839
|
+
const ops = parseOps(params["ops"]);
|
|
840
|
+
if (isError(ops))
|
|
841
|
+
return ops;
|
|
842
|
+
const { ImageDocument, ImageDocumentConflictError } = await import("@nodetool-ai/models");
|
|
843
|
+
const { SKETCH_BLEND_MODES } = await import("../evals/surfaces/sketch.js");
|
|
844
|
+
const existing = await ImageDocument.findById(sketchId);
|
|
845
|
+
// A sketch owned by someone else reads as missing — the rule the tRPC
|
|
846
|
+
// router's ownership check applies.
|
|
847
|
+
if (!existing || existing.user_id !== run.context.userId) {
|
|
848
|
+
return { error: `Sketch ${sketchId} was not found.` };
|
|
849
|
+
}
|
|
850
|
+
// Verify every referenced asset before writing. An id that resolves to
|
|
851
|
+
// nothing would otherwise be stored happily and show up as an empty layer
|
|
852
|
+
// in the editor — the failure this reports instead.
|
|
853
|
+
let missing;
|
|
854
|
+
try {
|
|
855
|
+
missing = await resolveSketchAssetReferences(run, ops);
|
|
856
|
+
}
|
|
857
|
+
catch (e) {
|
|
858
|
+
return { error: e instanceof Error ? e.message : String(e) };
|
|
859
|
+
}
|
|
860
|
+
if (missing.length > 0) {
|
|
861
|
+
return {
|
|
862
|
+
error: `No asset matches ${missing.map((id) => `"${id}"`).join(", ")}. ` +
|
|
863
|
+
"Use list_assets to find one, and pass its id as `image`."
|
|
864
|
+
};
|
|
865
|
+
}
|
|
866
|
+
try {
|
|
867
|
+
// Write by the resolved id: `sketchId` may be a 12-character prefix,
|
|
868
|
+
// and the CAS write matches the full id exactly.
|
|
869
|
+
const mutated = await ImageDocument.mutateDocumentData(existing.id, (data) => {
|
|
870
|
+
const sketch = data.sketch;
|
|
871
|
+
const state = {
|
|
872
|
+
layers: [...sketch.layers],
|
|
873
|
+
activeLayerId: sketch.activeLayerId,
|
|
874
|
+
canvas: { ...sketch.canvas },
|
|
875
|
+
bindings: [...data.layerBindings],
|
|
876
|
+
setup: sketch.setup
|
|
877
|
+
};
|
|
878
|
+
// A failing op is recorded and the script continues: stopping at the
|
|
879
|
+
// first error hides every problem behind it.
|
|
880
|
+
const applied = [];
|
|
881
|
+
const resolvedOps = [];
|
|
882
|
+
for (const parsed of ops) {
|
|
883
|
+
try {
|
|
884
|
+
const resolved = resolveSketchOp(state, parsed);
|
|
885
|
+
const result = applyOp(state, parsed, SKETCH_BLEND_MODES);
|
|
886
|
+
applied.push({
|
|
887
|
+
op: parsed.op,
|
|
888
|
+
ok: true,
|
|
889
|
+
result
|
|
890
|
+
});
|
|
891
|
+
// Only successful operations touched the document. Resolve each
|
|
892
|
+
// target from the state immediately before that operation, so a
|
|
893
|
+
// prior select_layer or add/rename changes what "active" means.
|
|
894
|
+
resolvedOps.push(resolved);
|
|
895
|
+
}
|
|
896
|
+
catch (e) {
|
|
897
|
+
applied.push({
|
|
898
|
+
op: parsed.op,
|
|
899
|
+
ok: false,
|
|
900
|
+
error: e instanceof Error ? e.message : String(e)
|
|
901
|
+
});
|
|
902
|
+
}
|
|
903
|
+
}
|
|
904
|
+
data.sketch = {
|
|
905
|
+
...sketch,
|
|
906
|
+
canvas: state.canvas,
|
|
907
|
+
layers: state.layers,
|
|
908
|
+
activeLayerId: state.activeLayerId,
|
|
909
|
+
setup: state.setup
|
|
910
|
+
};
|
|
911
|
+
data.layerBindings = state.bindings;
|
|
912
|
+
const layerSummary = state.layers.map((layer, index) => ({
|
|
913
|
+
id: layer.id,
|
|
914
|
+
name: layer.name,
|
|
915
|
+
index
|
|
916
|
+
}));
|
|
917
|
+
return {
|
|
918
|
+
records: applied,
|
|
919
|
+
layerSummary,
|
|
920
|
+
activeLayerId: state.activeLayerId,
|
|
921
|
+
ops: resolvedOps
|
|
922
|
+
};
|
|
923
|
+
},
|
|
924
|
+
// The ops ride on the write so an open editor merges this change per
|
|
925
|
+
// layer instead of treating the sketch as replaced.
|
|
926
|
+
undefined, (mutation) => ({ ops: mutation.ops }));
|
|
927
|
+
if (!mutated)
|
|
928
|
+
return { error: `Sketch ${sketchId} was not found.` };
|
|
929
|
+
const { records, layerSummary, activeLayerId } = mutated.result;
|
|
930
|
+
const failed = records.filter((record) => !record.ok);
|
|
931
|
+
return {
|
|
932
|
+
image_document_id: existing.id,
|
|
933
|
+
updated_at: mutated.document.updated_at,
|
|
934
|
+
applied: records.length - failed.length,
|
|
935
|
+
failed: failed.length,
|
|
936
|
+
ops: records,
|
|
937
|
+
active_layer_id: activeLayerId,
|
|
938
|
+
layers: layerSummary
|
|
939
|
+
};
|
|
940
|
+
}
|
|
941
|
+
catch (e) {
|
|
942
|
+
if (e instanceof ImageDocumentConflictError) {
|
|
943
|
+
return {
|
|
944
|
+
error: `Sketch ${sketchId} is being modified concurrently; nothing was saved. Retry the call.`
|
|
945
|
+
};
|
|
946
|
+
}
|
|
947
|
+
throw e;
|
|
948
|
+
}
|
|
949
|
+
}
|
|
950
|
+
};
|
|
951
|
+
// ---------------------------------------------------------------------------
|
|
952
|
+
// refine_image_brief
|
|
953
|
+
// ---------------------------------------------------------------------------
|
|
954
|
+
/**
|
|
955
|
+
* The brief expansion, headless. The browser sends the same prompt and schema
|
|
956
|
+
* from `@nodetool-ai/protocol` through `generate_text`; keeping both halves on
|
|
957
|
+
* one module is what makes a brief refined here and one refined in the editor
|
|
958
|
+
* the same artifact.
|
|
959
|
+
*
|
|
960
|
+
* D4: one language-model call and one document write. No layer is added and no
|
|
961
|
+
* generation is started.
|
|
962
|
+
*/
|
|
963
|
+
const refineImageBrief = {
|
|
964
|
+
spec: refineImageBriefSpec,
|
|
965
|
+
impl: async (run, params) => {
|
|
966
|
+
const doc = await loadSketch(run, params["image_document_id"]);
|
|
967
|
+
if (isError(doc))
|
|
968
|
+
return doc;
|
|
969
|
+
const data = doc.toDocumentData();
|
|
970
|
+
const setup = data.sketch.setup;
|
|
971
|
+
const brief = setup?.brief?.trim() ?? "";
|
|
972
|
+
if (!brief) {
|
|
973
|
+
return {
|
|
974
|
+
error: `Sketch ${doc.id} has no brief, so there is nothing to refine. Write one with edit_sketch's set_setup op.`
|
|
975
|
+
};
|
|
976
|
+
}
|
|
977
|
+
const provider = isNonBlankString(params["provider"])
|
|
978
|
+
? params["provider"].trim()
|
|
979
|
+
: "";
|
|
980
|
+
const model = isNonBlankString(params["model"])
|
|
981
|
+
? params["model"].trim()
|
|
982
|
+
: "";
|
|
983
|
+
if (!provider || !model) {
|
|
984
|
+
return {
|
|
985
|
+
error: "Pass provider + model for the language model that expands the brief (use find_model with capability=generate_text)."
|
|
986
|
+
};
|
|
987
|
+
}
|
|
988
|
+
const { REFINE_BRIEF_SCHEMA, REFINE_BRIEF_SYSTEM_PROMPT, REFINE_BRIEF_TOOL_DESCRIPTION, REFINE_BRIEF_TOOL_NAME, buildRefineBriefPrompt, parseRefinedBrief } = await import("@nodetool-ai/protocol/api-schemas/sketch.js");
|
|
989
|
+
const { generateStructured } = await import("@nodetool-ai/runtime");
|
|
990
|
+
const languageProvider = await run.context.getProvider(provider);
|
|
991
|
+
const raw = await generateStructured(languageProvider, {
|
|
992
|
+
model,
|
|
993
|
+
maxTokens: 2048,
|
|
994
|
+
messages: [
|
|
995
|
+
{ role: "system", content: REFINE_BRIEF_SYSTEM_PROMPT },
|
|
996
|
+
{
|
|
997
|
+
role: "user",
|
|
998
|
+
content: buildRefineBriefPrompt(brief, setup?.use_case)
|
|
999
|
+
}
|
|
1000
|
+
],
|
|
1001
|
+
toolName: REFINE_BRIEF_TOOL_NAME,
|
|
1002
|
+
toolDescription: REFINE_BRIEF_TOOL_DESCRIPTION,
|
|
1003
|
+
schema: REFINE_BRIEF_SCHEMA
|
|
1004
|
+
});
|
|
1005
|
+
const refined = raw ? parseRefinedBrief(raw) : null;
|
|
1006
|
+
if (!refined) {
|
|
1007
|
+
return {
|
|
1008
|
+
error: `${model} returned no usable brief. Try again, or pass a model that supports structured output.`
|
|
1009
|
+
};
|
|
1010
|
+
}
|
|
1011
|
+
const { ImageDocument } = await import("@nodetool-ai/models");
|
|
1012
|
+
const mutated = await ImageDocument.mutateDocumentData(doc.id, (current) => {
|
|
1013
|
+
current.sketch = {
|
|
1014
|
+
...current.sketch,
|
|
1015
|
+
setup: {
|
|
1016
|
+
brief,
|
|
1017
|
+
...current.sketch.setup,
|
|
1018
|
+
refined,
|
|
1019
|
+
// The flow's next step is the review, whatever stage the caller was
|
|
1020
|
+
// on when it asked (PRD § 10.2).
|
|
1021
|
+
stage: "review"
|
|
1022
|
+
}
|
|
1023
|
+
};
|
|
1024
|
+
return refined;
|
|
1025
|
+
});
|
|
1026
|
+
if (!mutated) {
|
|
1027
|
+
return { error: `Sketch ${doc.id} was not found.` };
|
|
1028
|
+
}
|
|
1029
|
+
return {
|
|
1030
|
+
image_document_id: doc.id,
|
|
1031
|
+
stage: "review",
|
|
1032
|
+
refined,
|
|
1033
|
+
updated_at: mutated.document.updated_at
|
|
1034
|
+
};
|
|
1035
|
+
}
|
|
1036
|
+
};
|
|
1037
|
+
// ---------------------------------------------------------------------------
|
|
1038
|
+
// validate_sketch
|
|
1039
|
+
// ---------------------------------------------------------------------------
|
|
1040
|
+
/** A positive finite number from a tool param, or undefined. */
|
|
1041
|
+
function numberParam(value) {
|
|
1042
|
+
return isFiniteNumber(value) && value > 0
|
|
1043
|
+
? value
|
|
1044
|
+
: undefined;
|
|
1045
|
+
}
|
|
1046
|
+
/** Unwrap a stored document that may still be JSON text. */
|
|
1047
|
+
function parseStoredDocument(document) {
|
|
1048
|
+
if (!isString(document))
|
|
1049
|
+
return document;
|
|
1050
|
+
try {
|
|
1051
|
+
return JSON.parse(document);
|
|
1052
|
+
}
|
|
1053
|
+
catch {
|
|
1054
|
+
return undefined;
|
|
1055
|
+
}
|
|
1056
|
+
}
|
|
1057
|
+
const validateSketch = {
|
|
1058
|
+
spec: validateSketchSpec,
|
|
1059
|
+
// The sketch API is tRPC-only, so there is no REST route to fall back on. A
|
|
1060
|
+
// host may put a loader on the run — the MCP server does, to apply its own
|
|
1061
|
+
// ownership rule — and without one the row is read the way every other
|
|
1062
|
+
// capability in this module reads it. The "no loader" refusal this replaced
|
|
1063
|
+
// meant a chat belt could edit a sketch it could not then validate.
|
|
1064
|
+
impl: async (run, params) => {
|
|
1065
|
+
const inline = params["document"];
|
|
1066
|
+
const sketchId = params["image_document_id"];
|
|
1067
|
+
let document = inline;
|
|
1068
|
+
// An inline document carries no stored canvas settings, so the caller
|
|
1069
|
+
// supplies them; the image_document_id path overwrites these from the row.
|
|
1070
|
+
let meta = {
|
|
1071
|
+
width: numberParam(params["width"]),
|
|
1072
|
+
height: numberParam(params["height"]),
|
|
1073
|
+
backgroundColor: isString(params["background_color"])
|
|
1074
|
+
? params["background_color"]
|
|
1075
|
+
: undefined
|
|
1076
|
+
};
|
|
1077
|
+
let name;
|
|
1078
|
+
if (document === undefined && sketchId) {
|
|
1079
|
+
const loadRow = run.loaders?.sketch;
|
|
1080
|
+
const record = loadRow
|
|
1081
|
+
? await loadRow(run.context, sketchId)
|
|
1082
|
+
: await (async () => {
|
|
1083
|
+
const doc = await loadSketch(run, sketchId);
|
|
1084
|
+
if (isError(doc))
|
|
1085
|
+
return null;
|
|
1086
|
+
return {
|
|
1087
|
+
document: doc.document,
|
|
1088
|
+
width: doc.width,
|
|
1089
|
+
height: doc.height,
|
|
1090
|
+
backgroundColor: doc.background_color,
|
|
1091
|
+
name: doc.name
|
|
1092
|
+
};
|
|
1093
|
+
})();
|
|
1094
|
+
if (!record) {
|
|
1095
|
+
return {
|
|
1096
|
+
error: `Sketch ${sketchId} was not found.`,
|
|
1097
|
+
validated: false
|
|
1098
|
+
};
|
|
1099
|
+
}
|
|
1100
|
+
document = parseStoredDocument(record.document);
|
|
1101
|
+
meta = {
|
|
1102
|
+
width: record.width,
|
|
1103
|
+
height: record.height,
|
|
1104
|
+
backgroundColor: record.backgroundColor
|
|
1105
|
+
};
|
|
1106
|
+
name = record.name;
|
|
1107
|
+
}
|
|
1108
|
+
if (document === undefined || document === null) {
|
|
1109
|
+
return {
|
|
1110
|
+
error: "No sketch to validate — pass an inline `document` ({sketch, layerBindings}) or a valid `image_document_id`."
|
|
1111
|
+
};
|
|
1112
|
+
}
|
|
1113
|
+
const { validateSketchDocument } = await import("@nodetool-ai/execution/sketch-debug");
|
|
1114
|
+
const validation = validateSketchDocument(document, meta);
|
|
1115
|
+
const report = { ...validation, summary: validationSummary(validation) };
|
|
1116
|
+
if (sketchId)
|
|
1117
|
+
report.image_document_id = sketchId;
|
|
1118
|
+
if (name)
|
|
1119
|
+
report.name = name;
|
|
1120
|
+
return report;
|
|
1121
|
+
}
|
|
1122
|
+
};
|
|
1123
|
+
/** Every sketch capability, in the order the tool files declared them. */
|
|
1124
|
+
/**
|
|
1125
|
+
* Delete a sketch the caller owns.
|
|
1126
|
+
*
|
|
1127
|
+
* The ownership check and the version cascade are `ImageDocument.deleteOwned`, the
|
|
1128
|
+
* same function the tRPC route calls — a delete is not a place for two copies
|
|
1129
|
+
* of one rule, and version rows outliving their document would be unreachable
|
|
1130
|
+
* garbage. Missing and not-yours are one answer.
|
|
1131
|
+
*/
|
|
1132
|
+
const deleteSketch = {
|
|
1133
|
+
spec: deleteSketchSpec,
|
|
1134
|
+
impl: async (run, params) => {
|
|
1135
|
+
const userId = run.context.userId;
|
|
1136
|
+
if (!userId)
|
|
1137
|
+
return { error: "No user is bound to this session." };
|
|
1138
|
+
const { ImageDocument } = await import("@nodetool-ai/models");
|
|
1139
|
+
const id = String(params["image_document_id"]);
|
|
1140
|
+
const deleted = await ImageDocument.deleteOwned(userId, id);
|
|
1141
|
+
return deleted
|
|
1142
|
+
? { image_document_id: id, deleted: true }
|
|
1143
|
+
: { error: `Sketch ${id} was not found, or it is not yours.` };
|
|
1144
|
+
}
|
|
1145
|
+
};
|
|
1146
|
+
export const SKETCH_CAPABILITIES = [
|
|
1147
|
+
listSketches,
|
|
1148
|
+
createSketch,
|
|
1149
|
+
getSketch,
|
|
1150
|
+
listSketchVersions,
|
|
1151
|
+
getSketchVersion,
|
|
1152
|
+
createSketchVersion,
|
|
1153
|
+
restoreSketchVersion,
|
|
1154
|
+
deleteSketchVersion,
|
|
1155
|
+
editSketch,
|
|
1156
|
+
refineImageBrief,
|
|
1157
|
+
validateSketch,
|
|
1158
|
+
deleteSketch
|
|
1159
|
+
];
|
|
1160
|
+
export const module = {
|
|
1161
|
+
module: "sketches",
|
|
1162
|
+
exports: SKETCH_CAPABILITIES
|
|
1163
|
+
};
|
|
1164
|
+
export { listSketches, createSketch, getSketch, listSketchVersions, getSketchVersion, createSketchVersion, restoreSketchVersion, deleteSketchVersion, editSketch, refineImageBrief, validateSketch, deleteSketch };
|
|
1165
|
+
//# sourceMappingURL=sketches.js.map
|