@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,1974 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `nodetool` object model — the agent-facing JS API for the CodeAct
|
|
3
|
+
* sandbox. Where an imported capability is the raw RPC surface, `nodetool.*` is the
|
|
4
|
+
* platform as objects: workflows, models, assets,
|
|
5
|
+
* jobs, collections, games, timelines, sketches, scripts, and storyboards, plus a
|
|
6
|
+
* bounded-concurrency `batch()` for fan-out (run a workflow once per CSV row,
|
|
7
|
+
* validate every timeline, render all boards).
|
|
8
|
+
*
|
|
9
|
+
* Every method is a thin wrapper over an existing belt tool, so permission
|
|
10
|
+
* gating, routing, and validation stay where they are. A method whose backing
|
|
11
|
+
* tool is missing from the belt throws a message naming the tool instead of a
|
|
12
|
+
* TypeError. The prelude assumes `CODEACT_PRELUDE` ran first (it uses
|
|
13
|
+
* the belt); `nodetool.workflows.open()` additionally uses `openWorkflow`
|
|
14
|
+
* from the graph-model prelude when that is loaded.
|
|
15
|
+
*/
|
|
16
|
+
import { GRAPH_JSON_PRELUDE } from "../graph-dsl-core.js";
|
|
17
|
+
import { GRAPH_DSL_PACKAGE, GRAPH_DSL_PROMPT_SECTION } from "./graph-dsl-package.js";
|
|
18
|
+
import { FLOW_PACKAGE, FLOW_PROMPT_SECTION } from "./flow-package.js";
|
|
19
|
+
/** Namespace → the belt tools that light it up (any one is enough). */
|
|
20
|
+
export const NODETOOL_API_NAMESPACE_TOOLS = {
|
|
21
|
+
workflows: [
|
|
22
|
+
"list_workflows",
|
|
23
|
+
"get_workflow",
|
|
24
|
+
"create_workflow",
|
|
25
|
+
"list_workflow_versions",
|
|
26
|
+
"get_workflow_version",
|
|
27
|
+
"create_workflow_version",
|
|
28
|
+
"restore_workflow_version",
|
|
29
|
+
"delete_workflow_version",
|
|
30
|
+
"run_workflow",
|
|
31
|
+
"start_background_job",
|
|
32
|
+
"debug_workflow",
|
|
33
|
+
"validate_workflow",
|
|
34
|
+
"resolve_workflow_escalation",
|
|
35
|
+
"get_example_workflow"
|
|
36
|
+
],
|
|
37
|
+
// Documented in the sandbox-packages section rather than in the namespace
|
|
38
|
+
// list, but covered here so the two discovery tools are not also catalogued
|
|
39
|
+
// as raw catalog signatures.
|
|
40
|
+
packs: ["list_sandbox_packages", "get_sandbox_package_docs"],
|
|
41
|
+
nodes: ["search_nodes", "get_node_info", "list_nodes", "run_node"],
|
|
42
|
+
agents: ["run_subtask", "start_subtask", "wait_subtasks"],
|
|
43
|
+
models: [
|
|
44
|
+
"find_model",
|
|
45
|
+
"list_models",
|
|
46
|
+
"list_provider_models",
|
|
47
|
+
"generate_text"
|
|
48
|
+
],
|
|
49
|
+
media: [
|
|
50
|
+
"generate_image",
|
|
51
|
+
"edit_image",
|
|
52
|
+
"generate_video",
|
|
53
|
+
"animate_image",
|
|
54
|
+
"generate_video_from_references",
|
|
55
|
+
"generate_speech",
|
|
56
|
+
"generate_music",
|
|
57
|
+
"transcribe_audio",
|
|
58
|
+
"embed_text",
|
|
59
|
+
"critique_image",
|
|
60
|
+
"compare_images",
|
|
61
|
+
"score_image_adherence",
|
|
62
|
+
"understand_video",
|
|
63
|
+
"ffmpeg",
|
|
64
|
+
"ffprobe",
|
|
65
|
+
"yt_dlp"
|
|
66
|
+
],
|
|
67
|
+
documents: [
|
|
68
|
+
"convert_document",
|
|
69
|
+
"extract_pdf_text",
|
|
70
|
+
"extract_pdf_tables",
|
|
71
|
+
"convert_markdown_to_pdf",
|
|
72
|
+
"convert_pdf_to_markdown"
|
|
73
|
+
],
|
|
74
|
+
web: [
|
|
75
|
+
"web_search",
|
|
76
|
+
"image_search",
|
|
77
|
+
"http_request",
|
|
78
|
+
"download_file",
|
|
79
|
+
"browser",
|
|
80
|
+
"take_screenshot"
|
|
81
|
+
],
|
|
82
|
+
memory: [
|
|
83
|
+
"memory_save",
|
|
84
|
+
"memory_list",
|
|
85
|
+
"memory_search",
|
|
86
|
+
"memory_update",
|
|
87
|
+
"memory_delete"
|
|
88
|
+
],
|
|
89
|
+
shared: ["list_shared", "read_shared", "share_result"],
|
|
90
|
+
threads: ["list_threads", "get_thread", "get_message"],
|
|
91
|
+
email: ["search_email", "archive_email", "add_label_to_email"],
|
|
92
|
+
settings: [
|
|
93
|
+
"list_settings",
|
|
94
|
+
"get_setting",
|
|
95
|
+
"set_setting",
|
|
96
|
+
"list_secrets",
|
|
97
|
+
"request_secret"
|
|
98
|
+
],
|
|
99
|
+
assets: [
|
|
100
|
+
"list_assets",
|
|
101
|
+
"get_asset",
|
|
102
|
+
"asset_search",
|
|
103
|
+
"save_asset",
|
|
104
|
+
"read_asset",
|
|
105
|
+
"list_images"
|
|
106
|
+
],
|
|
107
|
+
jobs: ["list_jobs", "get_job", "get_job_logs"],
|
|
108
|
+
runs: ["list_runs", "get_run", "get_run_trace", "get_run_logs", "await_run"],
|
|
109
|
+
generations: [
|
|
110
|
+
"list_generations",
|
|
111
|
+
"get_generation",
|
|
112
|
+
"await_generation",
|
|
113
|
+
"cancel_generation",
|
|
114
|
+
"reconcile_generation",
|
|
115
|
+
"list_provider_generations",
|
|
116
|
+
"get_provider_generation"
|
|
117
|
+
],
|
|
118
|
+
collections: [
|
|
119
|
+
"list_collections",
|
|
120
|
+
"query_collection",
|
|
121
|
+
"vector_index",
|
|
122
|
+
"vector_batch_index",
|
|
123
|
+
"vector_text_search",
|
|
124
|
+
"vector_hybrid_search"
|
|
125
|
+
],
|
|
126
|
+
apps: ["list_apps", "get_app", "create_app", "edit_app", "debug_app"],
|
|
127
|
+
games: [
|
|
128
|
+
"create_native_game", "get_native_game", "edit_native_game", "publish_native_game",
|
|
129
|
+
"install_native_game_asset", "playtest_native_game", "capture_native_game_frame",
|
|
130
|
+
"generate_game_asset", "build_native_game", "list_example_games", "get_example_game",
|
|
131
|
+
"install_example_game", "autoplay_native_game", "preview_native_game_authoring", "apply_native_game_authoring"
|
|
132
|
+
],
|
|
133
|
+
timelines: [
|
|
134
|
+
"list_timelines",
|
|
135
|
+
"list_example_timelines",
|
|
136
|
+
"get_example_timeline",
|
|
137
|
+
"get_example_timeline_source",
|
|
138
|
+
"create_timeline",
|
|
139
|
+
"get_timeline",
|
|
140
|
+
"list_timeline_versions",
|
|
141
|
+
"get_timeline_version",
|
|
142
|
+
"create_timeline_version",
|
|
143
|
+
"restore_timeline_version",
|
|
144
|
+
"delete_timeline_version",
|
|
145
|
+
"validate_timeline",
|
|
146
|
+
"preview_timeline_frame",
|
|
147
|
+
"compare_timeline_frames",
|
|
148
|
+
"edit_timeline",
|
|
149
|
+
"set_timeline_document",
|
|
150
|
+
"bake_audio_animation",
|
|
151
|
+
"render_timeline",
|
|
152
|
+
"list_compositions",
|
|
153
|
+
"get_composition",
|
|
154
|
+
"save_composition",
|
|
155
|
+
"delete_composition",
|
|
156
|
+
"get_timeline_code",
|
|
157
|
+
"set_timeline_code",
|
|
158
|
+
"edit_timeline_code",
|
|
159
|
+
"rebake_timeline_code",
|
|
160
|
+
"detach_timeline_code"
|
|
161
|
+
],
|
|
162
|
+
sketches: [
|
|
163
|
+
"list_sketches",
|
|
164
|
+
"create_sketch",
|
|
165
|
+
"get_sketch",
|
|
166
|
+
"list_sketch_versions",
|
|
167
|
+
"get_sketch_version",
|
|
168
|
+
"create_sketch_version",
|
|
169
|
+
"restore_sketch_version",
|
|
170
|
+
"delete_sketch_version",
|
|
171
|
+
"validate_sketch",
|
|
172
|
+
"edit_sketch"
|
|
173
|
+
],
|
|
174
|
+
scripts: [
|
|
175
|
+
"list_scripts",
|
|
176
|
+
"create_script",
|
|
177
|
+
"get_script",
|
|
178
|
+
"voice_script_lines",
|
|
179
|
+
"assemble_script_timeline",
|
|
180
|
+
"edit_script"
|
|
181
|
+
],
|
|
182
|
+
storyboards: [
|
|
183
|
+
"list_storyboards",
|
|
184
|
+
"create_storyboard",
|
|
185
|
+
"get_storyboard",
|
|
186
|
+
"render_storyboard_stills",
|
|
187
|
+
"render_storyboard_clips",
|
|
188
|
+
"revise_storyboard_clip",
|
|
189
|
+
"assemble_storyboard_timeline",
|
|
190
|
+
"finish_storyboard",
|
|
191
|
+
"preview_storyboard_design",
|
|
192
|
+
"edit_storyboard"
|
|
193
|
+
]
|
|
194
|
+
};
|
|
195
|
+
/** Whether a belt carries anything the `nodetool` object model can drive. */
|
|
196
|
+
export function hasNodetoolApiTools(toolNames) {
|
|
197
|
+
const names = new Set(toolNames);
|
|
198
|
+
for (const group of Object.values(NODETOOL_API_NAMESPACE_TOOLS)) {
|
|
199
|
+
if (group.some((name) => names.has(name)))
|
|
200
|
+
return true;
|
|
201
|
+
}
|
|
202
|
+
return false;
|
|
203
|
+
}
|
|
204
|
+
/**
|
|
205
|
+
* The belt tools the object model wraps — the ones the prompt should NOT
|
|
206
|
+
* also document as raw catalog signatures. One surface per capability: wrapped
|
|
207
|
+
* tools stay callable through the bridge, but the catalog documents only the
|
|
208
|
+
* `nodetool.*` form.
|
|
209
|
+
*/
|
|
210
|
+
export function nodetoolApiCoveredToolNames(toolNames) {
|
|
211
|
+
const names = new Set(toolNames);
|
|
212
|
+
const covered = new Set();
|
|
213
|
+
for (const group of Object.values(NODETOOL_API_NAMESPACE_TOOLS)) {
|
|
214
|
+
for (const name of group) {
|
|
215
|
+
if (names.has(name))
|
|
216
|
+
covered.add(name);
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
return covered;
|
|
220
|
+
}
|
|
221
|
+
/**
|
|
222
|
+
* Guest-side prelude defining the global `nodetool`. Plain QuickJS-safe JS —
|
|
223
|
+
* no host bridges of its own; every effect goes through `__callBeltTool`.
|
|
224
|
+
*/
|
|
225
|
+
export const NODETOOL_API_PRELUDE = `
|
|
226
|
+
const nodetool = (() => {
|
|
227
|
+
// \`__toolNames\` is the belt, and the object model calls it through
|
|
228
|
+
// \`__callBeltTool\` rather than through a global belt object — there is no
|
|
229
|
+
// longer one for it to read.
|
|
230
|
+
const __belt = new Set(__toolNames);
|
|
231
|
+
const __has = (name) => __belt.has(name);
|
|
232
|
+
const __need = (name) => {
|
|
233
|
+
if (!__belt.has(name)) {
|
|
234
|
+
throw new Error(
|
|
235
|
+
'nodetool: tool "' + name + '" is not in this toolbelt, so this ' +
|
|
236
|
+
"method is unavailable here. nodetool.searchTools() lists what is."
|
|
237
|
+
);
|
|
238
|
+
}
|
|
239
|
+
return __callBeltTool(name);
|
|
240
|
+
};
|
|
241
|
+
const __merge = (a, b) => Object.assign({}, a || {}, b || {});
|
|
242
|
+
|
|
243
|
+
/**
|
|
244
|
+
* A \`create(name, opts)\` call's arguments, however the caller spelled them.
|
|
245
|
+
* The documented form passes the name first, but a caller holding an options
|
|
246
|
+
* bag reaches for \`create({name, ...})\` — and that used to arrive at the tool
|
|
247
|
+
* as \`name: {name: "..."}\`, refused as "name is required and must be a
|
|
248
|
+
* non-empty string". The message described the argument, not the call, so
|
|
249
|
+
* there was nothing to correct against: a chat retried the same object shape
|
|
250
|
+
* three times before falling back to the positional form by accident. Both
|
|
251
|
+
* spellings are the same call, so both are accepted, and a name that is
|
|
252
|
+
* genuinely missing is named as the caller's own argument.
|
|
253
|
+
*/
|
|
254
|
+
const __named = (nameOrOpts, opts, method) => {
|
|
255
|
+
const args =
|
|
256
|
+
nameOrOpts && typeof nameOrOpts === "object"
|
|
257
|
+
? __merge(nameOrOpts, opts)
|
|
258
|
+
: __merge(opts, { name: nameOrOpts });
|
|
259
|
+
if (typeof args.name !== "string" || args.name.trim() === "") {
|
|
260
|
+
throw new Error(
|
|
261
|
+
"nodetool." + method + ": a name is required. Pass it first — " +
|
|
262
|
+
'nodetool.' + method + '("My name", {...}) — or in the options ' +
|
|
263
|
+
'object as {name: "My name"}.'
|
|
264
|
+
);
|
|
265
|
+
}
|
|
266
|
+
return args;
|
|
267
|
+
};
|
|
268
|
+
|
|
269
|
+
/**
|
|
270
|
+
* A job id from either an id or a job/receipt object. \`start()\` answers with
|
|
271
|
+
* a record, and reaching for the wrong field on it used to reach the tool as
|
|
272
|
+
* \`job_id: undefined\`, which came back as "Job undefined was not found" —
|
|
273
|
+
* a message about a job rather than about the call that asked for it.
|
|
274
|
+
*/
|
|
275
|
+
const __jobId = (idOrJob, method) => {
|
|
276
|
+
if (typeof idOrJob === "string" && idOrJob) return idOrJob;
|
|
277
|
+
if (idOrJob && typeof idOrJob === "object") {
|
|
278
|
+
const id = idOrJob.job_id || idOrJob.id;
|
|
279
|
+
if (typeof id === "string" && id) return id;
|
|
280
|
+
}
|
|
281
|
+
throw new Error(
|
|
282
|
+
"nodetool.jobs." + method + ": no job id. Pass the id string, or the " +
|
|
283
|
+
"record nodetool.workflows.start() returned (its id is job_id)."
|
|
284
|
+
);
|
|
285
|
+
};
|
|
286
|
+
|
|
287
|
+
/** A generation id, or the record a generation capability answered with. */
|
|
288
|
+
const __generationId = (idOrRecord, method) => {
|
|
289
|
+
if (typeof idOrRecord === "string" && idOrRecord) return idOrRecord;
|
|
290
|
+
if (idOrRecord && typeof idOrRecord === "object") {
|
|
291
|
+
const id = idOrRecord.generation_id;
|
|
292
|
+
if (typeof id === "string" && id) return id;
|
|
293
|
+
}
|
|
294
|
+
throw new Error(
|
|
295
|
+
"nodetool.generations." + method + ": no generation id. Pass the id " +
|
|
296
|
+
"string, or the record a generate* call returned (its id is generation_id)."
|
|
297
|
+
);
|
|
298
|
+
};
|
|
299
|
+
|
|
300
|
+
/**
|
|
301
|
+
* Accept a GraphBuilder, a bare {nodes, edges}, or a workflow record —
|
|
302
|
+
* the shared graph DSL core's normalizer.
|
|
303
|
+
*/
|
|
304
|
+
const __graphJson = __graphJsonOf;
|
|
305
|
+
|
|
306
|
+
/**
|
|
307
|
+
* Build the args for a routed web-search tool. The tool routes across the
|
|
308
|
+
* configured backends host-side; \`opts.provider\` maps onto its \`backend\`
|
|
309
|
+
* pin (\`aliases\` translates the old guest names — "default", "google" —
|
|
310
|
+
* onto the tool's backend enum; other values pass through).
|
|
311
|
+
*/
|
|
312
|
+
const __webArgs = (opts, aliases, field, query) => {
|
|
313
|
+
const args = __merge(opts);
|
|
314
|
+
const provider = args.provider;
|
|
315
|
+
delete args.provider;
|
|
316
|
+
if (provider !== undefined) args.backend = aliases[provider] || provider;
|
|
317
|
+
args[field] = String(query === undefined || query === null ? "" : query);
|
|
318
|
+
return args;
|
|
319
|
+
};
|
|
320
|
+
|
|
321
|
+
/**
|
|
322
|
+
* Normalize a model reference to the {provider, model} pair the media
|
|
323
|
+
* tools take. Accepts a find/pick result ({provider, model_id}), a bare
|
|
324
|
+
* {provider, model|id}, or a "provider/model_id" string (split on the
|
|
325
|
+
* FIRST slash, so fal ids like "fal_ai/fal-ai/flux/schnell" work).
|
|
326
|
+
*/
|
|
327
|
+
const __model = (m) => {
|
|
328
|
+
if (m && typeof m === "object") {
|
|
329
|
+
const id = m.model_id || m.model || m.id;
|
|
330
|
+
if (m.provider && id) return { provider: m.provider, model: id };
|
|
331
|
+
}
|
|
332
|
+
if (typeof m === "string" && m.indexOf("/") > 0) {
|
|
333
|
+
return {
|
|
334
|
+
provider: m.slice(0, m.indexOf("/")),
|
|
335
|
+
model: m.slice(m.indexOf("/") + 1)
|
|
336
|
+
};
|
|
337
|
+
}
|
|
338
|
+
throw new Error(
|
|
339
|
+
"nodetool: a model is required — pass a nodetool.models.find/pick " +
|
|
340
|
+
'result, {provider, model_id}, or "provider/model_id". Use ' +
|
|
341
|
+
'await nodetool.models.pick("<capability>") to resolve one.'
|
|
342
|
+
);
|
|
343
|
+
};
|
|
344
|
+
|
|
345
|
+
const api = {
|
|
346
|
+
/**
|
|
347
|
+
* Credentials, through the one bridge that has them.
|
|
348
|
+
*
|
|
349
|
+
* \`getSecret\` answers \`undefined\` for a secret nobody configured, which
|
|
350
|
+
* turns a missing key into a 401 three calls later. These throw at the
|
|
351
|
+
* point the credential was needed and name it.
|
|
352
|
+
*/
|
|
353
|
+
secrets: {
|
|
354
|
+
/** A secret's value, or an error naming the one that is not set. */
|
|
355
|
+
async get(name) {
|
|
356
|
+
if (typeof name !== "string" || name === "") {
|
|
357
|
+
throw new Error("nodetool.secrets.get: a secret name is required");
|
|
358
|
+
}
|
|
359
|
+
if (typeof getSecret !== "function") {
|
|
360
|
+
throw new Error(
|
|
361
|
+
'nodetool.secrets.get("' + name + '"): this run has no secret store'
|
|
362
|
+
);
|
|
363
|
+
}
|
|
364
|
+
const value = await getSecret(name);
|
|
365
|
+
if (value === undefined || value === null || value === "") {
|
|
366
|
+
throw new Error(
|
|
367
|
+
'nodetool.secrets.get("' + name + '"): not set. Add it under ' +
|
|
368
|
+
"Settings > Secrets, or on the node's secret scope."
|
|
369
|
+
);
|
|
370
|
+
}
|
|
371
|
+
return value;
|
|
372
|
+
},
|
|
373
|
+
/** The value, or undefined — for a credential that is genuinely optional. */
|
|
374
|
+
async tryGet(name) {
|
|
375
|
+
if (typeof getSecret !== "function") return undefined;
|
|
376
|
+
const value = await getSecret(name);
|
|
377
|
+
return value === null || value === "" ? undefined : value;
|
|
378
|
+
},
|
|
379
|
+
/**
|
|
380
|
+
* The names this node declared, or null when it declared no scope and
|
|
381
|
+
* may read the whole store. Reading this is not the check: a name
|
|
382
|
+
* outside the scope is refused by the bridge, not by this list.
|
|
383
|
+
*/
|
|
384
|
+
list() {
|
|
385
|
+
return typeof __secretScope === "undefined" || __secretScope === null
|
|
386
|
+
? null
|
|
387
|
+
: __secretScope.slice();
|
|
388
|
+
}
|
|
389
|
+
},
|
|
390
|
+
|
|
391
|
+
/**
|
|
392
|
+
* NodeTool's own configuration, and the one way to get a credential set.
|
|
393
|
+
*
|
|
394
|
+
* \`secrets\` above reads; this asks. \`requestSecret\` sends no value and
|
|
395
|
+
* receives none — it opens a dialog where the user types the key, and
|
|
396
|
+
* answers only whether they saved one.
|
|
397
|
+
*/
|
|
398
|
+
settings: {
|
|
399
|
+
/** Every non-secret setting, or one group's worth. */
|
|
400
|
+
list: (opts) => __need("list_settings")(__merge(opts)),
|
|
401
|
+
/** One setting's value, resolved from this user then the environment. */
|
|
402
|
+
get: (key) => __need("get_setting")({ key: key }),
|
|
403
|
+
/** Change one setting. Refuses a secret and anything undeclared. */
|
|
404
|
+
set: (key, value) => __need("set_setting")({ key: key, value: value }),
|
|
405
|
+
/** Which credentials exist, never what they are. */
|
|
406
|
+
secrets: () => __need("list_secrets")({}),
|
|
407
|
+
/** Ask the user to enter one, in a dialog you never see the contents of. */
|
|
408
|
+
requestSecret: (key, opts) =>
|
|
409
|
+
__need("request_secret")(__merge(opts, { key: key }))
|
|
410
|
+
},
|
|
411
|
+
|
|
412
|
+
/**
|
|
413
|
+
* Find a tool the prompt lists by name only, or does not list at all.
|
|
414
|
+
* Takes the ToolSearch grammar ("select:a,b" for exact names, "+term" to
|
|
415
|
+
* require one) and returns each match's name, signature and description.
|
|
416
|
+
* Call it before calling a tool whose arguments you have not seen.
|
|
417
|
+
*/
|
|
418
|
+
async searchTools(query, maxResults) {
|
|
419
|
+
if (typeof __searchTools !== "function") {
|
|
420
|
+
throw new Error(
|
|
421
|
+
"nodetool.searchTools: this run has no tool catalog to search."
|
|
422
|
+
);
|
|
423
|
+
}
|
|
424
|
+
const r = await __searchTools(
|
|
425
|
+
String(query === undefined || query === null ? "" : query),
|
|
426
|
+
maxResults === undefined ? 5 : maxResults
|
|
427
|
+
);
|
|
428
|
+
if (!r || r.ok !== true) {
|
|
429
|
+
throw new Error(r && r.error ? r.error : "nodetool.searchTools failed");
|
|
430
|
+
}
|
|
431
|
+
return r.result;
|
|
432
|
+
},
|
|
433
|
+
|
|
434
|
+
/**
|
|
435
|
+
* What this action can import: the sandbox packs installed here, the
|
|
436
|
+
* modules each declares, the functions those export, and each pack's own
|
|
437
|
+
* documentation. A pack marked allowed:false is installed but off this
|
|
438
|
+
* session's allowlist — importing it is refused.
|
|
439
|
+
*/
|
|
440
|
+
packs: (() => {
|
|
441
|
+
let cached = null;
|
|
442
|
+
const load = async (refresh) => {
|
|
443
|
+
if (cached === null || refresh === true) {
|
|
444
|
+
cached = await __need("list_sandbox_packages")({});
|
|
445
|
+
}
|
|
446
|
+
return cached;
|
|
447
|
+
};
|
|
448
|
+
const packOf = (entry) => entry.packName;
|
|
449
|
+
return {
|
|
450
|
+
/**
|
|
451
|
+
* One entry per pack: {packName, description, allowed, kinds,
|
|
452
|
+
* specifiers}. Pass {refresh: true} to re-read the catalog.
|
|
453
|
+
*/
|
|
454
|
+
async list(opts) {
|
|
455
|
+
const listing = await load(opts && opts.refresh);
|
|
456
|
+
const byPack = {};
|
|
457
|
+
const order = [];
|
|
458
|
+
for (const entry of listing.packages) {
|
|
459
|
+
const name = packOf(entry);
|
|
460
|
+
if (byPack[name] === undefined) {
|
|
461
|
+
byPack[name] = {
|
|
462
|
+
packName: name,
|
|
463
|
+
packVersion: entry.packVersion,
|
|
464
|
+
description: entry.description || "",
|
|
465
|
+
allowed: false,
|
|
466
|
+
kinds: [],
|
|
467
|
+
specifiers: []
|
|
468
|
+
};
|
|
469
|
+
order.push(name);
|
|
470
|
+
}
|
|
471
|
+
const pack = byPack[name];
|
|
472
|
+
if (!pack.description && entry.description) {
|
|
473
|
+
pack.description = entry.description;
|
|
474
|
+
}
|
|
475
|
+
if (entry.allowed) pack.allowed = true;
|
|
476
|
+
if (pack.kinds.indexOf(entry.kind) < 0) pack.kinds.push(entry.kind);
|
|
477
|
+
pack.specifiers.push(entry.specifier);
|
|
478
|
+
}
|
|
479
|
+
const packs = order.map((name) => byPack[name]);
|
|
480
|
+
if (listing.platform && listing.platform.length > 0) {
|
|
481
|
+
packs.push({
|
|
482
|
+
packName: "@nodetool-ai/sandbox-nodetool",
|
|
483
|
+
description:
|
|
484
|
+
"NodeTool's own surface — the same gated calls as nodetool.*.",
|
|
485
|
+
allowed: true,
|
|
486
|
+
kinds: ["platform"],
|
|
487
|
+
specifiers: listing.platform.map((entry) => entry.specifier)
|
|
488
|
+
});
|
|
489
|
+
}
|
|
490
|
+
return packs;
|
|
491
|
+
},
|
|
492
|
+
/**
|
|
493
|
+
* The importable module specifiers of one pack, each with its kind and
|
|
494
|
+
* whether this session allows it. Takes a pack name or any specifier
|
|
495
|
+
* inside the pack.
|
|
496
|
+
*/
|
|
497
|
+
async modules(pack, opts) {
|
|
498
|
+
const listing = await load(opts && opts.refresh);
|
|
499
|
+
const name = String(pack === undefined || pack === null ? "" : pack);
|
|
500
|
+
const platform = (listing.platform || []).filter(
|
|
501
|
+
(entry) => entry.specifier === name || entry.specifier.indexOf(name) === 0
|
|
502
|
+
);
|
|
503
|
+
if (platform.length > 0) {
|
|
504
|
+
return platform.map((entry) => ({
|
|
505
|
+
specifier: entry.specifier,
|
|
506
|
+
kind: "platform",
|
|
507
|
+
allowed: true
|
|
508
|
+
}));
|
|
509
|
+
}
|
|
510
|
+
return listing.packages
|
|
511
|
+
.filter(
|
|
512
|
+
(entry) =>
|
|
513
|
+
packOf(entry) === name ||
|
|
514
|
+
entry.specifier === name ||
|
|
515
|
+
entry.specifier.indexOf(name + "/") === 0
|
|
516
|
+
)
|
|
517
|
+
.map((entry) => ({
|
|
518
|
+
specifier: entry.specifier,
|
|
519
|
+
kind: entry.kind,
|
|
520
|
+
description: entry.description,
|
|
521
|
+
allowed: entry.allowed
|
|
522
|
+
}));
|
|
523
|
+
},
|
|
524
|
+
/**
|
|
525
|
+
* The function names one module exports: {specifier, kind, exports,
|
|
526
|
+
* complete, note?}. A module whose exports cannot be read answers
|
|
527
|
+
* exports:null with the reason in note — read docs() instead of
|
|
528
|
+
* guessing.
|
|
529
|
+
*/
|
|
530
|
+
exports(specifier) {
|
|
531
|
+
return __need("list_sandbox_packages")({
|
|
532
|
+
specifier: String(specifier === undefined ? "" : specifier)
|
|
533
|
+
});
|
|
534
|
+
},
|
|
535
|
+
/** Returns a pack's SKILL.md as a markdown string. Untrusted docs retain their warning wrapper. */
|
|
536
|
+
async docs(specifier) {
|
|
537
|
+
const result = await __need("get_sandbox_package_docs")({
|
|
538
|
+
specifier: String(specifier === undefined ? "" : specifier)
|
|
539
|
+
});
|
|
540
|
+
return result.documentation;
|
|
541
|
+
}
|
|
542
|
+
};
|
|
543
|
+
})(),
|
|
544
|
+
|
|
545
|
+
/** What this belt supports, namespace by namespace. */
|
|
546
|
+
capabilities() {
|
|
547
|
+
const caps = {};
|
|
548
|
+
const groups = __NT_NAMESPACE_TOOLS;
|
|
549
|
+
for (const ns of Object.keys(groups)) {
|
|
550
|
+
const present = groups[ns].filter(__has);
|
|
551
|
+
if (present.length > 0) caps[ns] = present;
|
|
552
|
+
}
|
|
553
|
+
return caps;
|
|
554
|
+
},
|
|
555
|
+
|
|
556
|
+
/**
|
|
557
|
+
* Bounded-concurrency map. Returns one settled entry per item:
|
|
558
|
+
* { ok, index, item, value | error }. Never throws; failures are entries.
|
|
559
|
+
* Respect the per-action tool-call budget: chunk large item lists across
|
|
560
|
+
* actions, persisting partial progress with \`nodetool.memory.save\`.
|
|
561
|
+
*/
|
|
562
|
+
async batch(items, fn, opts) {
|
|
563
|
+
const list = Array.from(items);
|
|
564
|
+
const width = Math.max(
|
|
565
|
+
1,
|
|
566
|
+
Math.min(8, (opts && opts.concurrency) || 4)
|
|
567
|
+
);
|
|
568
|
+
const stopOnError = !!(opts && opts.stopOnError);
|
|
569
|
+
const results = new Array(list.length);
|
|
570
|
+
let next = 0;
|
|
571
|
+
let stopped = false;
|
|
572
|
+
const worker = async () => {
|
|
573
|
+
while (next < list.length && !stopped) {
|
|
574
|
+
const i = next++;
|
|
575
|
+
try {
|
|
576
|
+
results[i] = {
|
|
577
|
+
ok: true,
|
|
578
|
+
index: i,
|
|
579
|
+
item: list[i],
|
|
580
|
+
value: await fn(list[i], i)
|
|
581
|
+
};
|
|
582
|
+
} catch (e) {
|
|
583
|
+
results[i] = {
|
|
584
|
+
ok: false,
|
|
585
|
+
index: i,
|
|
586
|
+
item: list[i],
|
|
587
|
+
error: e && e.message ? e.message : String(e)
|
|
588
|
+
};
|
|
589
|
+
if (stopOnError) stopped = true;
|
|
590
|
+
}
|
|
591
|
+
}
|
|
592
|
+
};
|
|
593
|
+
const workers = [];
|
|
594
|
+
for (let w = 0; w < Math.min(width, list.length); w++) {
|
|
595
|
+
workers.push(worker());
|
|
596
|
+
}
|
|
597
|
+
await Promise.all(workers);
|
|
598
|
+
return results.filter((entry) => entry !== undefined);
|
|
599
|
+
},
|
|
600
|
+
|
|
601
|
+
nodes: {
|
|
602
|
+
/**
|
|
603
|
+
* Search the node catalog. \`query\` takes a string or an array of
|
|
604
|
+
* strings; \`opts\` passes n_results / input_type / output_type through.
|
|
605
|
+
* Answers { total, results }; a result's node type is on "type".
|
|
606
|
+
*/
|
|
607
|
+
search: (query, opts) =>
|
|
608
|
+
__need("search_nodes")(
|
|
609
|
+
__merge(opts, {
|
|
610
|
+
query: Array.isArray(query) ? query : [String(query)]
|
|
611
|
+
})
|
|
612
|
+
),
|
|
613
|
+
/** Full metadata for ONE node type: properties, inputs, outputs. */
|
|
614
|
+
info: (type) => __need("get_node_info")({ node_type: type }),
|
|
615
|
+
list: (opts) => __need("list_nodes")(__merge(opts)),
|
|
616
|
+
/**
|
|
617
|
+
* The single-node harness: run ONE node by type with a property bag,
|
|
618
|
+
* no workflow needed. The cheap way to probe what a node does before
|
|
619
|
+
* wiring it into a graph.
|
|
620
|
+
*/
|
|
621
|
+
run: (type, inputs) =>
|
|
622
|
+
__need("run_node")({ node_type: type, inputs: inputs || {} })
|
|
623
|
+
},
|
|
624
|
+
|
|
625
|
+
agents: {
|
|
626
|
+
/**
|
|
627
|
+
* Run a sub-agent on a self-contained prompt and return its result.
|
|
628
|
+
* The child inherits this belt's tools but sees NONE of this
|
|
629
|
+
* conversation — put everything it needs into the prompt, and ask for
|
|
630
|
+
* JSON there when you want structure. Runs take real time and money;
|
|
631
|
+
* delegate work that benefits from a fresh focused context, not
|
|
632
|
+
* one-tool errands. Blocks until the child finishes; fan out with
|
|
633
|
+
* \`Promise.all\` or \`nodetool.batch\`.
|
|
634
|
+
*/
|
|
635
|
+
run(prompt, opts) {
|
|
636
|
+
const text = String(prompt === undefined || prompt === null ? "" : prompt);
|
|
637
|
+
const description =
|
|
638
|
+
(opts && opts.description) ||
|
|
639
|
+
text.split(/\\s+/).slice(0, 6).join(" ") ||
|
|
640
|
+
"Subtask";
|
|
641
|
+
return __need("run_subtask")({ description: description, prompt: text });
|
|
642
|
+
},
|
|
643
|
+
/**
|
|
644
|
+
* Start a sub-agent WITHOUT blocking: returns
|
|
645
|
+
* \`{subtask_id, status: "running"}\` right away while the child works.
|
|
646
|
+
* Collect results later in the same action with \`wait()\` — results of
|
|
647
|
+
* subtasks you never wait for are lost to the turn.
|
|
648
|
+
*/
|
|
649
|
+
start(prompt, opts) {
|
|
650
|
+
const text = String(prompt === undefined || prompt === null ? "" : prompt);
|
|
651
|
+
const description =
|
|
652
|
+
(opts && opts.description) ||
|
|
653
|
+
text.split(/\\s+/).slice(0, 6).join(" ") ||
|
|
654
|
+
"Subtask";
|
|
655
|
+
return __need("start_subtask")({ description: description, prompt: text });
|
|
656
|
+
},
|
|
657
|
+
/**
|
|
658
|
+
* Wait for background subagents started with \`start()\`. Pass
|
|
659
|
+
* \`{ids: [...], timeoutMs}\` to bound the block. Resolves with rows:
|
|
660
|
+
* \`{subtask_id, status, result | error}\`. Never end an action with
|
|
661
|
+
* unwaited subtasks whose results you still need.
|
|
662
|
+
*/
|
|
663
|
+
wait(opts) {
|
|
664
|
+
return __need("wait_subtasks")(
|
|
665
|
+
opts
|
|
666
|
+
? {
|
|
667
|
+
ids: opts.ids,
|
|
668
|
+
timeout_ms: opts.timeoutMs
|
|
669
|
+
}
|
|
670
|
+
: {}
|
|
671
|
+
);
|
|
672
|
+
}
|
|
673
|
+
},
|
|
674
|
+
|
|
675
|
+
workflows: {
|
|
676
|
+
list: (opts) => __need("list_workflows")(__merge(opts)),
|
|
677
|
+
get: (id) => __need("get_workflow")({ workflow_id: id }),
|
|
678
|
+
create: (name, graph, opts) =>
|
|
679
|
+
__need("create_workflow")(
|
|
680
|
+
__merge(__named(name, opts, "workflows.create"), {
|
|
681
|
+
graph: __graphJson(
|
|
682
|
+
graph === undefined && name && typeof name === "object"
|
|
683
|
+
? name.graph
|
|
684
|
+
: graph
|
|
685
|
+
)
|
|
686
|
+
})
|
|
687
|
+
),
|
|
688
|
+
versions: (id, opts) =>
|
|
689
|
+
__need("list_workflow_versions")(__merge(opts, { workflow_id: id })),
|
|
690
|
+
getVersion: (id, version) =>
|
|
691
|
+
__need("get_workflow_version")({ workflow_id: id, version: version }),
|
|
692
|
+
snapshot: (id, opts) =>
|
|
693
|
+
__need("create_workflow_version")(__merge(opts, { workflow_id: id })),
|
|
694
|
+
restore: (id, version) =>
|
|
695
|
+
__need("restore_workflow_version")({
|
|
696
|
+
workflow_id: id,
|
|
697
|
+
version: version
|
|
698
|
+
}),
|
|
699
|
+
deleteVersion: (id, version) =>
|
|
700
|
+
__need("delete_workflow_version")({
|
|
701
|
+
workflow_id: id,
|
|
702
|
+
version: version
|
|
703
|
+
}),
|
|
704
|
+
run: (id, params, opts) =>
|
|
705
|
+
__need("run_workflow")(
|
|
706
|
+
__merge(opts, { workflow_id: id, params: params || {} })
|
|
707
|
+
),
|
|
708
|
+
/**
|
|
709
|
+
* Start a run and return a receipt — {job_id, id, status: "running"} —
|
|
710
|
+
* without waiting for it. Pass it to nodetool.jobs.wait() and read the
|
|
711
|
+
* settled job's outputs.
|
|
712
|
+
*/
|
|
713
|
+
start: (id, params) =>
|
|
714
|
+
__need("start_background_job")({
|
|
715
|
+
workflow_id: id,
|
|
716
|
+
params: params || {}
|
|
717
|
+
}),
|
|
718
|
+
debug: (id, params, opts) =>
|
|
719
|
+
__need("debug_workflow")(
|
|
720
|
+
__merge(opts, { workflow_id: id, params: params || {} })
|
|
721
|
+
),
|
|
722
|
+
async validate(target) {
|
|
723
|
+
const report = await (typeof target === "string"
|
|
724
|
+
? __need("validate_workflow")({ workflow_id: target })
|
|
725
|
+
: __need("validate_workflow")({ graph: __graphJson(target) }));
|
|
726
|
+
// A report with errors is a refusal, not data: throw so a caller
|
|
727
|
+
// that forgets to check report.ok cannot carry a broken graph into a
|
|
728
|
+
// paid run.
|
|
729
|
+
if (report && report.ok === false && Array.isArray(report.issues)) {
|
|
730
|
+
// report.ok is decided by the errors alone, so the throw lists the
|
|
731
|
+
// errors alone. Mixing in warnings and the "untyped dynamic slot"
|
|
732
|
+
// info notes buried one real problem under seven non-problems, and
|
|
733
|
+
// a model reading eight bullets rewrites eight things.
|
|
734
|
+
const errors = report.issues.filter(function (i) {
|
|
735
|
+
return i && i.severity === "error" && i.message;
|
|
736
|
+
});
|
|
737
|
+
const other = report.issues.length - errors.length;
|
|
738
|
+
const messages = (errors.length > 0 ? errors : report.issues)
|
|
739
|
+
.map(function (i) {
|
|
740
|
+
return i && i.message;
|
|
741
|
+
})
|
|
742
|
+
.filter(Boolean);
|
|
743
|
+
throw new Error(
|
|
744
|
+
"Graph validation failed:\\n- " +
|
|
745
|
+
messages.slice(0, 8).join("\\n- ") +
|
|
746
|
+
(errors.length > 0 && other > 0
|
|
747
|
+
? "\\n(" +
|
|
748
|
+
other +
|
|
749
|
+
" warning/info issue(s) not blocking; read report.issues" +
|
|
750
|
+
" for them.)"
|
|
751
|
+
: "")
|
|
752
|
+
);
|
|
753
|
+
}
|
|
754
|
+
return report;
|
|
755
|
+
},
|
|
756
|
+
/**
|
|
757
|
+
* Answer an escalation from an interactive run/debug. Action is one of
|
|
758
|
+
* the escalation's allowedActions; pass {outputs} with "substitute",
|
|
759
|
+
* {reason} with "fail", {apply_to: "signature"} to resolve every later
|
|
760
|
+
* failure with the same signature. Returns the NEXT escalation (answer
|
|
761
|
+
* it the same way) or the run's final report.
|
|
762
|
+
*/
|
|
763
|
+
resolve: (sessionId, escalationId, action, opts) =>
|
|
764
|
+
__need("resolve_workflow_escalation")(
|
|
765
|
+
__merge(opts, {
|
|
766
|
+
session_id: sessionId,
|
|
767
|
+
escalation_id: escalationId,
|
|
768
|
+
action: action
|
|
769
|
+
})
|
|
770
|
+
),
|
|
771
|
+
/**
|
|
772
|
+
* One example workflow, graph included — a worked graph to read before
|
|
773
|
+
* authoring one. Name is "<package>/<example>", or pass the package
|
|
774
|
+
* separately as {package}.
|
|
775
|
+
*/
|
|
776
|
+
example(name, opts) {
|
|
777
|
+
const explicit = (opts && (opts.package || opts.package_name)) || "";
|
|
778
|
+
let pkg = explicit;
|
|
779
|
+
let example = String(name || "");
|
|
780
|
+
if (!explicit) {
|
|
781
|
+
const slash = example.indexOf("/");
|
|
782
|
+
if (slash > 0) {
|
|
783
|
+
pkg = example.slice(0, slash);
|
|
784
|
+
example = example.slice(slash + 1);
|
|
785
|
+
} else {
|
|
786
|
+
pkg = "nodetool-base";
|
|
787
|
+
}
|
|
788
|
+
}
|
|
789
|
+
if (!example) {
|
|
790
|
+
throw new Error(
|
|
791
|
+
"nodetool.workflows.example: name an example — " +
|
|
792
|
+
'"<package>/<example>", or (example, {package}). ' +
|
|
793
|
+
'nodetool.workflows.list({workflow_type: "example"}) lists them.'
|
|
794
|
+
);
|
|
795
|
+
}
|
|
796
|
+
return __need("get_example_workflow")({
|
|
797
|
+
package_name: pkg,
|
|
798
|
+
example_name: example
|
|
799
|
+
});
|
|
800
|
+
},
|
|
801
|
+
open(id) {
|
|
802
|
+
if (typeof openWorkflow !== "function") {
|
|
803
|
+
// Thrown synchronously: a caller without await still sees it.
|
|
804
|
+
throw new Error(
|
|
805
|
+
"nodetool.workflows.open: the graph editing tools (ui_*) are " +
|
|
806
|
+
"not in this toolbelt. Author a graph with the sandbox DSL " +
|
|
807
|
+
"package instead, then create() it."
|
|
808
|
+
);
|
|
809
|
+
}
|
|
810
|
+
return openWorkflow(id).catch((e) => {
|
|
811
|
+
const msg = e && e.message ? e.message : String(e);
|
|
812
|
+
// A browser bridge that is gone (window reloaded before the editor
|
|
813
|
+
// panel re-registered) used to surface as this bare sentence, which
|
|
814
|
+
// left one agent retrying the identical call for several turns.
|
|
815
|
+
if (/Frontend tool runtime state is not initialized/i.test(msg)) {
|
|
816
|
+
throw new Error(
|
|
817
|
+
"nodetool.workflows.open: " + msg +
|
|
818
|
+
" The browser bridge answers nothing right now. Ask the user to " +
|
|
819
|
+
"open (or reload) the NodeTool workspace window and retry once " +
|
|
820
|
+
"the editor has loaded; meanwhile get_workflow still reads saved " +
|
|
821
|
+
"graphs and create_workflow saves new ones."
|
|
822
|
+
);
|
|
823
|
+
}
|
|
824
|
+
throw e;
|
|
825
|
+
});
|
|
826
|
+
}
|
|
827
|
+
},
|
|
828
|
+
|
|
829
|
+
models: {
|
|
830
|
+
find: (capability, opts) =>
|
|
831
|
+
__need("find_model")(__merge(opts, { capability: capability })),
|
|
832
|
+
/**
|
|
833
|
+
* Resolve ONE model for a capability — the leaderboard's best for that
|
|
834
|
+
* task, ready to pass to nodetool.media.*. To put it in a node's model
|
|
835
|
+
* property, assign the result's "ref" field verbatim (the flat fields use
|
|
836
|
+
* "model_id"; the property wants "id"). Throws when no configured
|
|
837
|
+
* provider offers the capability.
|
|
838
|
+
*/
|
|
839
|
+
async pick(capability, opts) {
|
|
840
|
+
const found = await __need("find_model")(
|
|
841
|
+
__merge(opts, { capability: capability, limit: 1 })
|
|
842
|
+
);
|
|
843
|
+
const results = (found && found.results) || [];
|
|
844
|
+
if (results.length === 0) {
|
|
845
|
+
throw new Error(
|
|
846
|
+
'nodetool.models.pick: no configured model offers "' +
|
|
847
|
+
capability +
|
|
848
|
+
'"' +
|
|
849
|
+
(found && found.note ? " — " + found.note : "")
|
|
850
|
+
);
|
|
851
|
+
}
|
|
852
|
+
// A missed search must not resolve to an unrelated model — the caller
|
|
853
|
+
// asked for a named one.
|
|
854
|
+
if (found && found.query_matched === false) {
|
|
855
|
+
throw new Error(
|
|
856
|
+
"nodetool.models.pick: no model matches " +
|
|
857
|
+
JSON.stringify(opts && opts.query) +
|
|
858
|
+
" for " +
|
|
859
|
+
capability +
|
|
860
|
+
'. Call nodetool.models.find("' +
|
|
861
|
+
capability +
|
|
862
|
+
'") to see what is configured.'
|
|
863
|
+
);
|
|
864
|
+
}
|
|
865
|
+
return results[0];
|
|
866
|
+
},
|
|
867
|
+
list: (opts) => __need("list_models")(__merge(opts)),
|
|
868
|
+
/** One provider's own catalog. */
|
|
869
|
+
forProvider: (provider, opts) =>
|
|
870
|
+
__need("list_provider_models")(__merge(opts, { provider: provider })),
|
|
871
|
+
/** One language-model roundtrip, with optional image references. */
|
|
872
|
+
generate: (prompt, model, opts) =>
|
|
873
|
+
__need("generate_text")(
|
|
874
|
+
__merge(opts, __merge(__model(model), { prompt: prompt }))
|
|
875
|
+
)
|
|
876
|
+
},
|
|
877
|
+
|
|
878
|
+
media: {
|
|
879
|
+
generateImage: (prompt, model, opts) =>
|
|
880
|
+
__need("generate_image")(
|
|
881
|
+
__merge(opts, __merge(__model(model), { prompt: prompt }))
|
|
882
|
+
),
|
|
883
|
+
editImage: (inputFile, prompt, model, opts) =>
|
|
884
|
+
__need("edit_image")(
|
|
885
|
+
__merge(
|
|
886
|
+
opts,
|
|
887
|
+
__merge(__model(model), { input_file: inputFile, prompt: prompt })
|
|
888
|
+
)
|
|
889
|
+
),
|
|
890
|
+
/**
|
|
891
|
+
* Promote an image handle (or a generation result) to a durable asset.
|
|
892
|
+
* Bytes stay on the host; the guest only sees the asset:// ref.
|
|
893
|
+
*/
|
|
894
|
+
toImage: (src, opts) => image.toAsset(src, opts),
|
|
895
|
+
/** Promote an audio handle to a durable asset. */
|
|
896
|
+
toAudio: (src, opts) => audio.toAsset(src, opts),
|
|
897
|
+
/** Promote a video handle to a durable asset. */
|
|
898
|
+
toVideo: (src, opts) => video.toAsset(src, opts),
|
|
899
|
+
generateVideo: (prompt, model, opts) =>
|
|
900
|
+
__need("generate_video")(
|
|
901
|
+
__merge(opts, __merge(__model(model), { prompt: prompt }))
|
|
902
|
+
),
|
|
903
|
+
animateImage: (inputFile, model, opts) =>
|
|
904
|
+
__need("animate_image")(
|
|
905
|
+
__merge(opts, __merge(__model(model), { input_file: inputFile }))
|
|
906
|
+
),
|
|
907
|
+
videoFromReferences: (referenceFiles, model, opts) =>
|
|
908
|
+
__need("generate_video_from_references")(
|
|
909
|
+
__merge(
|
|
910
|
+
opts,
|
|
911
|
+
__merge(__model(model), { reference_files: referenceFiles })
|
|
912
|
+
)
|
|
913
|
+
),
|
|
914
|
+
speak: (text, model, opts) =>
|
|
915
|
+
__need("generate_speech")(
|
|
916
|
+
__merge(opts, __merge(__model(model), { text: text }))
|
|
917
|
+
),
|
|
918
|
+
/** Music from a prompt — the counterpart of speak(). */
|
|
919
|
+
generateMusic: (prompt, model, opts) =>
|
|
920
|
+
__need("generate_music")(
|
|
921
|
+
__merge(opts, __merge(__model(model), { prompt: prompt }))
|
|
922
|
+
),
|
|
923
|
+
transcribe: (inputFile, model, opts) =>
|
|
924
|
+
__need("transcribe_audio")(
|
|
925
|
+
__merge(opts, __merge(__model(model), { input_file: inputFile }))
|
|
926
|
+
),
|
|
927
|
+
embed: (text, model, opts) =>
|
|
928
|
+
__need("embed_text")(
|
|
929
|
+
__merge(opts, __merge(__model(model), { text: text }))
|
|
930
|
+
),
|
|
931
|
+
/**
|
|
932
|
+
* Judge one image against the brief with a VISION chat model (pick
|
|
933
|
+
* "generate_message" on a vision-capable model). Returns a verdict plus
|
|
934
|
+
* directional defects — feed the fixes back into generateImage.
|
|
935
|
+
*/
|
|
936
|
+
critique: (image, brief, model, opts) =>
|
|
937
|
+
__need("critique_image")(
|
|
938
|
+
__merge(
|
|
939
|
+
opts,
|
|
940
|
+
__merge(__model(model), { image: image, brief: brief })
|
|
941
|
+
)
|
|
942
|
+
),
|
|
943
|
+
/** Pick the best of 2-8 candidates by pairwise knockout. */
|
|
944
|
+
compare: (images, brief, model, opts) =>
|
|
945
|
+
__need("compare_images")(
|
|
946
|
+
__merge(
|
|
947
|
+
opts,
|
|
948
|
+
__merge(__model(model), { images: images, brief: brief })
|
|
949
|
+
)
|
|
950
|
+
),
|
|
951
|
+
/** Explainable adherence score: the brief as binary yes/no checks. */
|
|
952
|
+
scoreAdherence: (image, brief, model, opts) =>
|
|
953
|
+
__need("score_image_adherence")(
|
|
954
|
+
__merge(
|
|
955
|
+
opts,
|
|
956
|
+
__merge(__model(model), { image: image, brief: brief })
|
|
957
|
+
)
|
|
958
|
+
),
|
|
959
|
+
/**
|
|
960
|
+
* Read a video with a multimodal chat model (Gemini reads video
|
|
961
|
+
* natively). Returns \`{text}\` — the model's answer to \`prompt\`.
|
|
962
|
+
*/
|
|
963
|
+
understandVideo: (video, prompt, model, opts) =>
|
|
964
|
+
__need("understand_video")(
|
|
965
|
+
__merge(
|
|
966
|
+
opts,
|
|
967
|
+
__merge(__model(model), { video: video, prompt: prompt })
|
|
968
|
+
)
|
|
969
|
+
),
|
|
970
|
+
/** Run ffmpeg on workspace files. \`args\` is argv after the binary name. */
|
|
971
|
+
ffmpeg: (args, opts) => __need("ffmpeg")(__merge(opts, { args: args })),
|
|
972
|
+
/** Read a media file's format and streams with ffprobe. */
|
|
973
|
+
ffprobe: (path, opts) => __need("ffprobe")(__merge(opts, { path: path })),
|
|
974
|
+
/** Download a video with yt-dlp. */
|
|
975
|
+
downloadVideo: (url, outputFile, opts) =>
|
|
976
|
+
__need("yt_dlp")(__merge(opts, { url: url, output_file: outputFile }))
|
|
977
|
+
},
|
|
978
|
+
|
|
979
|
+
documents: {
|
|
980
|
+
convert: (inputFile, outputFile, opts) =>
|
|
981
|
+
__need("convert_document")(
|
|
982
|
+
__merge(opts, { input_file: inputFile, output_file: outputFile })
|
|
983
|
+
),
|
|
984
|
+
extractText: (inputFile, opts) =>
|
|
985
|
+
__need("extract_pdf_text")(__merge(opts, { path: inputFile })),
|
|
986
|
+
extractTables: (inputFile, outputFile, opts) =>
|
|
987
|
+
__need("extract_pdf_tables")(
|
|
988
|
+
__merge(opts, { path: inputFile, output_file: outputFile })
|
|
989
|
+
),
|
|
990
|
+
markdownToPdf: (inputFile, outputFile, opts) =>
|
|
991
|
+
__need("convert_markdown_to_pdf")(
|
|
992
|
+
__merge(opts, { input_file: inputFile, output_file: outputFile })
|
|
993
|
+
),
|
|
994
|
+
pdfToMarkdown: (inputFile, outputFile, opts) =>
|
|
995
|
+
__need("convert_pdf_to_markdown")(
|
|
996
|
+
__merge(opts, { input_file: inputFile, output_file: outputFile })
|
|
997
|
+
)
|
|
998
|
+
},
|
|
999
|
+
|
|
1000
|
+
web: {
|
|
1001
|
+
/**
|
|
1002
|
+
* Search the web. \`web_search\` routes across the configured backends
|
|
1003
|
+
* host-side; \`opts.provider\` pins one — "default", "serpapi",
|
|
1004
|
+
* "dataforseo", "brave", "apify", "openai", "google" (grounded/Gemini).
|
|
1005
|
+
*/
|
|
1006
|
+
search: (query, opts) =>
|
|
1007
|
+
__need("web_search")(
|
|
1008
|
+
__webArgs(opts, { google: "gemini" }, "query", query)
|
|
1009
|
+
),
|
|
1010
|
+
/** News articles. One \`web_search\` with search_type: "news". */
|
|
1011
|
+
news: (query, opts) =>
|
|
1012
|
+
__need("web_search")(
|
|
1013
|
+
__merge(__webArgs(opts, { google: "serpapi" }, "query", query), {
|
|
1014
|
+
search_type: "news"
|
|
1015
|
+
})
|
|
1016
|
+
),
|
|
1017
|
+
/**
|
|
1018
|
+
* Image results: title, page link, original image URL, thumbnail URL.
|
|
1019
|
+
* Routes across the same backends as \`search\`/\`news\`, minus the two
|
|
1020
|
+
* that answer with prose instead of results (openai, google/gemini).
|
|
1021
|
+
*/
|
|
1022
|
+
images: (query, opts) =>
|
|
1023
|
+
__need("image_search")(__webArgs(opts, {}, "query", query)),
|
|
1024
|
+
/** One HTTP request; returns the response body as text. */
|
|
1025
|
+
fetch: (url, opts) => __need("http_request")(__merge(opts, { url: url })),
|
|
1026
|
+
/** Fetch a page and get its readable text (HTML stripped). */
|
|
1027
|
+
browse: (url) => __need("browser")({ url: url }),
|
|
1028
|
+
/** Save a URL's bytes into the workspace. */
|
|
1029
|
+
download: (url, outputFile) =>
|
|
1030
|
+
__need("download_file")({ url: url, output_file: outputFile }),
|
|
1031
|
+
/** Render a page in a remote browser and save the PNG. */
|
|
1032
|
+
screenshot: (url, outputFile) =>
|
|
1033
|
+
__need("take_screenshot")({
|
|
1034
|
+
url: url,
|
|
1035
|
+
output_file: outputFile || "screenshot.png"
|
|
1036
|
+
})
|
|
1037
|
+
},
|
|
1038
|
+
|
|
1039
|
+
memory: {
|
|
1040
|
+
/** Remember something durably. Readable from every conversation. */
|
|
1041
|
+
save: (content, opts) =>
|
|
1042
|
+
__need("memory_save")(__merge(opts, { content: content })),
|
|
1043
|
+
list: (opts) => __need("memory_list")(__merge(opts)),
|
|
1044
|
+
/** Find memories by keyword. Every word must appear. */
|
|
1045
|
+
search: (query, opts) =>
|
|
1046
|
+
__need("memory_search")(__merge(opts, { query: query })),
|
|
1047
|
+
update: (memoryId, fields) =>
|
|
1048
|
+
__need("memory_update")(
|
|
1049
|
+
__merge(fields, { memory_id: memoryId })
|
|
1050
|
+
),
|
|
1051
|
+
remove: (memoryId) =>
|
|
1052
|
+
__need("memory_delete")({ memory_id: memoryId })
|
|
1053
|
+
},
|
|
1054
|
+
|
|
1055
|
+
threads: {
|
|
1056
|
+
/** Past conversations, most recently updated first. */
|
|
1057
|
+
list: (opts) => __need("list_threads")(__merge(opts)),
|
|
1058
|
+
/** One thread and a page of its messages. */
|
|
1059
|
+
get: (threadId, opts) =>
|
|
1060
|
+
__need("get_thread")(__merge(opts, { thread_id: threadId })),
|
|
1061
|
+
/** The newest message in a thread, or undefined when it has none. */
|
|
1062
|
+
last: (threadId) =>
|
|
1063
|
+
__need("get_thread")({
|
|
1064
|
+
thread_id: threadId,
|
|
1065
|
+
limit: 1,
|
|
1066
|
+
newest_first: true
|
|
1067
|
+
}).then((t) => (t && t.messages ? t.messages[0] : undefined)),
|
|
1068
|
+
/** One message in full — untruncated content and every tool call. */
|
|
1069
|
+
message: (messageId) =>
|
|
1070
|
+
__need("get_message")({ message_id: messageId })
|
|
1071
|
+
},
|
|
1072
|
+
|
|
1073
|
+
shared: {
|
|
1074
|
+
/** Metadata for every entry this run shares — no values. */
|
|
1075
|
+
list: (opts) => __need("list_shared")(__merge(opts)),
|
|
1076
|
+
/** Full values for the keys you name; misses come back in \`missing\`. */
|
|
1077
|
+
read: (keys) =>
|
|
1078
|
+
__need("read_shared")({
|
|
1079
|
+
keys: Array.isArray(keys) ? keys : [keys]
|
|
1080
|
+
}),
|
|
1081
|
+
/** Publish under \`shared:<key>\` for the rest of this run to find. */
|
|
1082
|
+
publish: (key, value, opts) =>
|
|
1083
|
+
__need("share_result")(__merge(opts, { key: key, value: value }))
|
|
1084
|
+
},
|
|
1085
|
+
|
|
1086
|
+
email: {
|
|
1087
|
+
search: (opts) => __need("search_email")(__merge(opts)),
|
|
1088
|
+
archive: (messageIds) =>
|
|
1089
|
+
__need("archive_email")({
|
|
1090
|
+
message_ids: Array.isArray(messageIds) ? messageIds : [messageIds]
|
|
1091
|
+
}),
|
|
1092
|
+
label: (messageId, label) =>
|
|
1093
|
+
__need("add_label_to_email")({ message_id: messageId, label: label })
|
|
1094
|
+
},
|
|
1095
|
+
|
|
1096
|
+
assets: {
|
|
1097
|
+
list: (opts) => __need("list_assets")(__merge(opts)),
|
|
1098
|
+
/** Image assets as lightweight handles — feed an id to view_image. */
|
|
1099
|
+
images: (opts) => __need("list_images")(__merge(opts)),
|
|
1100
|
+
search: (query, opts) =>
|
|
1101
|
+
__need("asset_search")(__merge(opts, { query: query })),
|
|
1102
|
+
get: (id) => __need("get_asset")({ asset_id: id }),
|
|
1103
|
+
save: (name, opts) => __need("save_asset")(__merge(opts, { name: name })),
|
|
1104
|
+
read: (name, opts) => __need("read_asset")(__merge(opts, { name: name }))
|
|
1105
|
+
},
|
|
1106
|
+
|
|
1107
|
+
jobs: {
|
|
1108
|
+
list: (opts) => __need("list_jobs")(__merge(opts)),
|
|
1109
|
+
/** The job row, including the run's outputs once it has settled. */
|
|
1110
|
+
get: (id) => __need("get_job")({ job_id: __jobId(id, "get") }),
|
|
1111
|
+
logs: (id, opts) =>
|
|
1112
|
+
__need("get_job_logs")(__merge(opts, { job_id: __jobId(id, "logs") })),
|
|
1113
|
+
/**
|
|
1114
|
+
* Poll a background job until it settles, then return the job record.
|
|
1115
|
+
* Terminal statuses are completed / failed / cancelled / error (the
|
|
1116
|
+
* jobs API's own terminal set). Throws after timeoutMs, naming the job
|
|
1117
|
+
* and the last status seen.
|
|
1118
|
+
*/
|
|
1119
|
+
async wait(id, opts) {
|
|
1120
|
+
const jobId = __jobId(id, "wait");
|
|
1121
|
+
const pollMs = Math.max(1000, (opts && opts.pollMs) || 3000);
|
|
1122
|
+
const timeoutMs = (opts && opts.timeoutMs) || 600000;
|
|
1123
|
+
const terminal = ["completed", "failed", "cancelled", "error"];
|
|
1124
|
+
const deadline = Date.now() + timeoutMs;
|
|
1125
|
+
let status = "unknown";
|
|
1126
|
+
for (;;) {
|
|
1127
|
+
const job = await api.jobs.get(jobId);
|
|
1128
|
+
status = (job && (job.status || job.state)) || "unknown";
|
|
1129
|
+
if (terminal.indexOf(status) >= 0) return job;
|
|
1130
|
+
if (Date.now() >= deadline) {
|
|
1131
|
+
throw new Error(
|
|
1132
|
+
"nodetool.jobs.wait: job " + jobId + " did not finish within " +
|
|
1133
|
+
timeoutMs + "ms (last status: " + status + "). Poll it with " +
|
|
1134
|
+
"nodetool.jobs.get(id) or read nodetool.jobs.logs(id)."
|
|
1135
|
+
);
|
|
1136
|
+
}
|
|
1137
|
+
await sleep(pollMs);
|
|
1138
|
+
}
|
|
1139
|
+
}
|
|
1140
|
+
},
|
|
1141
|
+
|
|
1142
|
+
runs: {
|
|
1143
|
+
list: (opts) => __need("list_runs")(__merge(opts)),
|
|
1144
|
+
get: (id, opts) => __need("get_run")(__merge(opts, { run_id: id })),
|
|
1145
|
+
trace: (id, opts) => __need("get_run_trace")(__merge(opts, { run_id: id })),
|
|
1146
|
+
logs: (id, opts) => __need("get_run_logs")(__merge(opts, { run_id: id })),
|
|
1147
|
+
wait: (id, opts) => __need("await_run")(__merge(opts, { run_id: id }))
|
|
1148
|
+
},
|
|
1149
|
+
|
|
1150
|
+
generations: {
|
|
1151
|
+
/** The record of every media generation: status, cost, assets. */
|
|
1152
|
+
list: (opts) => __need("list_generations")(__merge(opts)),
|
|
1153
|
+
get: (id) =>
|
|
1154
|
+
__need("get_generation")({ generation_id: __generationId(id, "get") }),
|
|
1155
|
+
/**
|
|
1156
|
+
* Wait for a generation started with background: true to settle and
|
|
1157
|
+
* return its record — cost and asset ids included.
|
|
1158
|
+
*/
|
|
1159
|
+
wait: (id, opts) =>
|
|
1160
|
+
__need("await_generation")(
|
|
1161
|
+
__merge(opts, { generation_id: __generationId(id, "wait") })
|
|
1162
|
+
),
|
|
1163
|
+
cancel: (id) =>
|
|
1164
|
+
__need("cancel_generation")({
|
|
1165
|
+
generation_id: __generationId(id, "cancel")
|
|
1166
|
+
}),
|
|
1167
|
+
/** Ask the provider what it billed, by request id, and update the row. */
|
|
1168
|
+
reconcile: (id) =>
|
|
1169
|
+
__need("reconcile_generation")({
|
|
1170
|
+
generation_id: __generationId(id, "reconcile")
|
|
1171
|
+
}),
|
|
1172
|
+
/**
|
|
1173
|
+
* The provider's own record instead of this installation's: what it ran
|
|
1174
|
+
* from any machine, at the price it billed. Not every provider keeps one.
|
|
1175
|
+
*/
|
|
1176
|
+
fromProvider: (provider, opts) =>
|
|
1177
|
+
__need("list_provider_generations")(__merge(opts, { provider: provider })),
|
|
1178
|
+
/** One provider-side generation by the provider's own request id. */
|
|
1179
|
+
getFromProvider: (provider, requestId, opts) =>
|
|
1180
|
+
__need("get_provider_generation")(
|
|
1181
|
+
__merge(opts, { provider: provider, request_id: requestId })
|
|
1182
|
+
)
|
|
1183
|
+
},
|
|
1184
|
+
|
|
1185
|
+
collections: {
|
|
1186
|
+
list: () => __need("list_collections")({}),
|
|
1187
|
+
query: (collection, query, opts) =>
|
|
1188
|
+
__need("query_collection")(
|
|
1189
|
+
__merge(opts, { collection: collection, query: query })
|
|
1190
|
+
),
|
|
1191
|
+
/** Index one chunk under a source id (re-indexing the same id updates it). */
|
|
1192
|
+
index: (text, sourceId, opts) =>
|
|
1193
|
+
__need("vector_index")(
|
|
1194
|
+
__merge(opts, { text: text, source_id: sourceId })
|
|
1195
|
+
),
|
|
1196
|
+
/** Index many at once: [{text, source_id, metadata?}, ...]. */
|
|
1197
|
+
indexBatch: (chunks, opts) =>
|
|
1198
|
+
__need("vector_batch_index")(__merge(opts, { chunks: chunks })),
|
|
1199
|
+
/** Semantic search over the indexed chunks. */
|
|
1200
|
+
search: (text, opts) =>
|
|
1201
|
+
__need("vector_text_search")(__merge(opts, { text: text })),
|
|
1202
|
+
/** Semantic + keyword search fused by reciprocal rank. */
|
|
1203
|
+
hybridSearch: (text, opts) =>
|
|
1204
|
+
__need("vector_hybrid_search")(__merge(opts, { text: text }))
|
|
1205
|
+
},
|
|
1206
|
+
|
|
1207
|
+
apps: {
|
|
1208
|
+
list: (opts) => __need("list_apps")(__merge(opts)),
|
|
1209
|
+
get: (id) => __need("get_app")({ application_id: id }),
|
|
1210
|
+
/** Create an empty app and get its id back. */
|
|
1211
|
+
create: (name, opts) =>
|
|
1212
|
+
__need("create_app")(__named(name, opts, "apps.create")),
|
|
1213
|
+
/** Apply App Builder steps to a saved app, then save it. */
|
|
1214
|
+
edit: (id, steps, opts) =>
|
|
1215
|
+
__need("edit_app")(
|
|
1216
|
+
__merge(opts, { application_id: id, steps: steps })
|
|
1217
|
+
),
|
|
1218
|
+
/** Validate + simulate a saved app. {run: false} is the free check. */
|
|
1219
|
+
debug: (id, opts) =>
|
|
1220
|
+
__need("debug_app")(__merge(opts, { application_id: id }))
|
|
1221
|
+
},
|
|
1222
|
+
|
|
1223
|
+
games: {
|
|
1224
|
+
create: (name, opts) =>
|
|
1225
|
+
__need("create_native_game")(__named(name, opts, "games.create")),
|
|
1226
|
+
get: (id, opts) => __need("get_native_game")(__merge(opts, { game_id: id })),
|
|
1227
|
+
edit: (id, ops, opts) => __need("edit_native_game")(__merge(opts, { game_id: id, ops })),
|
|
1228
|
+
setDocument: (id, document, opts) =>
|
|
1229
|
+
__need("edit_native_game")(__merge(opts, { game_id: id, ops: [{ op: "set_document", document }] })),
|
|
1230
|
+
previewAuthoring: (id, opts) => __need("preview_native_game_authoring")(__merge(opts, { game_id: id })),
|
|
1231
|
+
applyAuthoring: (id, candidate) => __need("apply_native_game_authoring")({ game_id: id, candidate }),
|
|
1232
|
+
publish: (id, opts) => __need("publish_native_game")(__merge(opts, { game_id: id })),
|
|
1233
|
+
installAsset: (id, slot, binding, opts) =>
|
|
1234
|
+
__need("install_native_game_asset")(__merge(opts, { game_id: id, slot, binding })),
|
|
1235
|
+
playtest: (id, opts) => __need("playtest_native_game")(__merge(opts, { game_id: id })),
|
|
1236
|
+
capture: (id, opts) => __need("capture_native_game_frame")(__merge(opts, { game_id: id })),
|
|
1237
|
+
generateAsset: (id, slot, kind, prompt, opts) =>
|
|
1238
|
+
__need("generate_game_asset")(__merge(opts, { game_id: id, slot, kind, prompt })),
|
|
1239
|
+
build: (id, opts) => __need("build_native_game")(__merge(opts, { game_id: id })),
|
|
1240
|
+
listExamples: (opts) => __need("list_example_games")(__merge(opts)),
|
|
1241
|
+
getExample: (slug) => __need("get_example_game")({ slug }),
|
|
1242
|
+
installExample: (slug, opts) => __need("install_example_game")(__merge(opts, { slug })),
|
|
1243
|
+
autoplay: (id, opts) => __need("autoplay_native_game")(__merge(opts, { game_id: id }))
|
|
1244
|
+
},
|
|
1245
|
+
|
|
1246
|
+
timelines: {
|
|
1247
|
+
list: (opts) => __need("list_timelines")(__merge(opts)),
|
|
1248
|
+
examples: {
|
|
1249
|
+
list: (opts) => __need("list_example_timelines")(__merge(opts)),
|
|
1250
|
+
get: (slug, opts) =>
|
|
1251
|
+
__need("get_example_timeline")(__merge(opts, { slug: slug })),
|
|
1252
|
+
source: (slug) =>
|
|
1253
|
+
__need("get_example_timeline_source")({ slug: slug })
|
|
1254
|
+
},
|
|
1255
|
+
create: (name, opts) =>
|
|
1256
|
+
__need("create_timeline")(__named(name, opts, "timelines.create")),
|
|
1257
|
+
get: (id) => __need("get_timeline")({ timeline_id: id }),
|
|
1258
|
+
versions: (id, opts) =>
|
|
1259
|
+
__need("list_timeline_versions")(__merge(opts, { timeline_id: id })),
|
|
1260
|
+
getVersion: (id, version) =>
|
|
1261
|
+
__need("get_timeline_version")({ timeline_id: id, version: version }),
|
|
1262
|
+
/** Save the current state as a version. Options: {name}. */
|
|
1263
|
+
snapshot: (id, opts) =>
|
|
1264
|
+
__need("create_timeline_version")(__merge(opts, { timeline_id: id })),
|
|
1265
|
+
/** Alias of snapshot(), named after the create_timeline_version tool. */
|
|
1266
|
+
createVersion: (id, opts) =>
|
|
1267
|
+
__need("create_timeline_version")(__merge(opts, { timeline_id: id })),
|
|
1268
|
+
restore: (id, version) =>
|
|
1269
|
+
__need("restore_timeline_version")({
|
|
1270
|
+
timeline_id: id,
|
|
1271
|
+
version: version
|
|
1272
|
+
}),
|
|
1273
|
+
deleteVersion: (id, version) =>
|
|
1274
|
+
__need("delete_timeline_version")({
|
|
1275
|
+
timeline_id: id,
|
|
1276
|
+
version: version
|
|
1277
|
+
}),
|
|
1278
|
+
/** Options: {fps, width, height, tier, normalize}. normalize:true preflights authoring defaults for an inline document. */
|
|
1279
|
+
validate: (target, opts) =>
|
|
1280
|
+
typeof target === "string"
|
|
1281
|
+
? __need("validate_timeline")(__merge(opts, { timeline_id: target }))
|
|
1282
|
+
: __need("validate_timeline")(__merge(opts, { document: target })),
|
|
1283
|
+
/**
|
|
1284
|
+
* Composited frames at chosen timecodes — the finished picture, with
|
|
1285
|
+
* every track layered, animations sampled mid-flight and transitions
|
|
1286
|
+
* part way through. Takes an id or an inline document, like validate().
|
|
1287
|
+
* Options: {times_ms, count, width}.
|
|
1288
|
+
*/
|
|
1289
|
+
preview: (target, opts) =>
|
|
1290
|
+
typeof target === "string"
|
|
1291
|
+
? __need("preview_timeline_frame")(
|
|
1292
|
+
__merge(opts, { timeline_id: target })
|
|
1293
|
+
)
|
|
1294
|
+
: __need("preview_timeline_frame")(
|
|
1295
|
+
__merge(opts, { document: target })
|
|
1296
|
+
),
|
|
1297
|
+
/**
|
|
1298
|
+
* Per-frame pixel difference between two timelines, plus a side-by-side
|
|
1299
|
+
* sheet. Each side is an id, {timeline_id, version} or a document.
|
|
1300
|
+
* Options: {times_ms, range, width}.
|
|
1301
|
+
*/
|
|
1302
|
+
compare: (a, b, opts) =>
|
|
1303
|
+
__need("compare_timeline_frames")(__merge(opts, { a: a, b: b })),
|
|
1304
|
+
/** Apply document edits to a saved sequence, server-side. */
|
|
1305
|
+
edit: (id, ops) => __need("edit_timeline")({ timeline_id: id, ops: ops }),
|
|
1306
|
+
/**
|
|
1307
|
+
* Write a whole document at once. The document replaces the stored one,
|
|
1308
|
+
* so send back what get() returned, changed. Validated before anything
|
|
1309
|
+
* is written and snapshotted first, so a bad document is refused and a
|
|
1310
|
+
* good one is undoable. Options: {fps, width, height,
|
|
1311
|
+
* expected_updated_at, snapshot_name}.
|
|
1312
|
+
*
|
|
1313
|
+
* Bookkeeping you leave out is filled in rather than refused: a track's
|
|
1314
|
+
* index (its position in the array), visible: true and locked: false; a
|
|
1315
|
+
* clip's sourceType (generated when it names a prompt, workflow or
|
|
1316
|
+
* binding, else imported), status "generated", locked: false and
|
|
1317
|
+
* versions: []; animation ids (anim_1, anim_2, …), clip and track
|
|
1318
|
+
* effect ids (effect_1, effect_2, …) and enabled: true; missing clip
|
|
1319
|
+
* tracks inferred from mediaType; and markers: [].
|
|
1320
|
+
* Anything you do send is kept as sent. fps/width/height on the document
|
|
1321
|
+
* itself are read as the sequence's settings when the options omit them.
|
|
1322
|
+
*/
|
|
1323
|
+
setDocument: (id, document, opts) =>
|
|
1324
|
+
__need("set_timeline_document")(
|
|
1325
|
+
__merge(opts, { timeline_id: id, document: document })
|
|
1326
|
+
),
|
|
1327
|
+
/**
|
|
1328
|
+
* Drive a clip's motion from a piece of audio: measure the audio clip
|
|
1329
|
+
* (id, name, or "selected") and write the result as keyframes onto
|
|
1330
|
+
* targetClipId's own property, additive with anything hand-keyframed
|
|
1331
|
+
* there. Options: {mode: "envelope"|"beats", output_range: [quiet,
|
|
1332
|
+
* loud], sensitivity, attack_ms, release_ms, offset_ms, tolerance,
|
|
1333
|
+
* max_points, frame_ms, max_seconds, replace}. property and
|
|
1334
|
+
* output_range are required.
|
|
1335
|
+
*/
|
|
1336
|
+
bakeAudioAnimation: (id, audioClipId, targetClipId, opts) =>
|
|
1337
|
+
__need("bake_audio_animation")(
|
|
1338
|
+
__merge(opts, {
|
|
1339
|
+
timeline_id: id,
|
|
1340
|
+
audio_clip_id: audioClipId,
|
|
1341
|
+
target_clip_id: targetClipId
|
|
1342
|
+
})
|
|
1343
|
+
),
|
|
1344
|
+
/**
|
|
1345
|
+
* Render the finished cut as a job. Returns {job_id} immediately;
|
|
1346
|
+
* {wait: true} blocks and returns the rendered asset. Options:
|
|
1347
|
+
* {format, alpha, video_codec, bitrate, motion_blur_samples,
|
|
1348
|
+
* shutter_angle, preview_scale, include_audio, wait, timeout_ms}.
|
|
1349
|
+
*/
|
|
1350
|
+
render: (id, opts) =>
|
|
1351
|
+
__need("render_timeline")(__merge(opts, { timeline_id: id })),
|
|
1352
|
+
/**
|
|
1353
|
+
* Reusable templates — a group of clips with named parameters. The ones
|
|
1354
|
+
* NodeTool ships and the ones this user saved, both listed by list().
|
|
1355
|
+
* Insert one with edit(id, [{op: "insert_composition", composition_id,
|
|
1356
|
+
* startMs, params}]).
|
|
1357
|
+
*/
|
|
1358
|
+
compositions: {
|
|
1359
|
+
/** Options: {source: "shipped" | "user", query, limit}. */
|
|
1360
|
+
list: (opts) => __need("list_compositions")(__merge(opts)),
|
|
1361
|
+
get: (id) => __need("get_composition")({ composition_id: id }),
|
|
1362
|
+
/**
|
|
1363
|
+
* Save a group on a timeline as a template. params names what varies:
|
|
1364
|
+
* {"<name>": {type, default, path}}.
|
|
1365
|
+
*/
|
|
1366
|
+
save: (timelineId, groupTarget, name, params, opts) =>
|
|
1367
|
+
__need("save_composition")(
|
|
1368
|
+
__merge(opts, {
|
|
1369
|
+
timeline_id: timelineId,
|
|
1370
|
+
group_target: groupTarget,
|
|
1371
|
+
name: name,
|
|
1372
|
+
params: params
|
|
1373
|
+
})
|
|
1374
|
+
),
|
|
1375
|
+
remove: (id) => __need("delete_composition")({ composition_id: id })
|
|
1376
|
+
},
|
|
1377
|
+
/**
|
|
1378
|
+
* A timeline's authoring code — edit the script, not the JSON. \`set\`
|
|
1379
|
+
* bakes \`code\` and merges the result into the document scene by
|
|
1380
|
+
* scene: an untouched scene is replaced, a hand-edited one is kept and
|
|
1381
|
+
* reported in \`conflicts\` unless \`opts.force\` overwrites it (\`true\`
|
|
1382
|
+
* for every scene, or an array of scene names). \`edit\` applies
|
|
1383
|
+
* exact-match string replacements to the stored code first (each
|
|
1384
|
+
* \`old\` must match exactly once), then bakes and merges the same way.
|
|
1385
|
+
* \`rebake\` reruns the stored code unchanged. \`detach(id, names |
|
|
1386
|
+
* "all")\` stops tracking scenes — a later rebake never touches them
|
|
1387
|
+
* again.
|
|
1388
|
+
*/
|
|
1389
|
+
code: {
|
|
1390
|
+
/** \`{code, baked_at, scenes: [{name, group_id, edited}]}\`. \`code\`
|
|
1391
|
+
* is null when the timeline carries none. */
|
|
1392
|
+
get: (id) => __need("get_timeline_code")({ timeline_id: id }),
|
|
1393
|
+
set: (id, code, opts) =>
|
|
1394
|
+
__need("set_timeline_code")(
|
|
1395
|
+
__merge(opts, { timeline_id: id, code: code })
|
|
1396
|
+
),
|
|
1397
|
+
edit: (id, edits, opts) =>
|
|
1398
|
+
__need("edit_timeline_code")(
|
|
1399
|
+
__merge(opts, { timeline_id: id, edits: edits })
|
|
1400
|
+
),
|
|
1401
|
+
rebake: (id, opts) =>
|
|
1402
|
+
__need("rebake_timeline_code")(__merge(opts, { timeline_id: id })),
|
|
1403
|
+
detach: (id, scenes) =>
|
|
1404
|
+
__need("detach_timeline_code")({ timeline_id: id, scenes: scenes })
|
|
1405
|
+
}
|
|
1406
|
+
},
|
|
1407
|
+
|
|
1408
|
+
sketches: {
|
|
1409
|
+
list: (opts) => __need("list_sketches")(__merge(opts)),
|
|
1410
|
+
/** Create a blank sketch. Pass {width, height} for the canvas size. */
|
|
1411
|
+
create: (name, opts) =>
|
|
1412
|
+
__need("create_sketch")(__named(name, opts, "sketches.create")),
|
|
1413
|
+
get: (id) => __need("get_sketch")({ image_document_id: id }),
|
|
1414
|
+
versions: (id, opts) =>
|
|
1415
|
+
__need("list_sketch_versions")(
|
|
1416
|
+
__merge(opts, { image_document_id: id })
|
|
1417
|
+
),
|
|
1418
|
+
getVersion: (id, version) =>
|
|
1419
|
+
__need("get_sketch_version")({
|
|
1420
|
+
image_document_id: id,
|
|
1421
|
+
version: version
|
|
1422
|
+
}),
|
|
1423
|
+
snapshot: (id, opts) =>
|
|
1424
|
+
__need("create_sketch_version")(
|
|
1425
|
+
__merge(opts, { image_document_id: id })
|
|
1426
|
+
),
|
|
1427
|
+
restore: (id, version) =>
|
|
1428
|
+
__need("restore_sketch_version")({
|
|
1429
|
+
image_document_id: id,
|
|
1430
|
+
version: version
|
|
1431
|
+
}),
|
|
1432
|
+
deleteVersion: (id, version) =>
|
|
1433
|
+
__need("delete_sketch_version")({
|
|
1434
|
+
image_document_id: id,
|
|
1435
|
+
version: version
|
|
1436
|
+
}),
|
|
1437
|
+
validate: (target) =>
|
|
1438
|
+
typeof target === "string"
|
|
1439
|
+
? __need("validate_sketch")({ image_document_id: target })
|
|
1440
|
+
: __need("validate_sketch")({ document: target }),
|
|
1441
|
+
/** Apply layer-structure edits to a saved sketch, server-side. */
|
|
1442
|
+
edit: (id, ops) =>
|
|
1443
|
+
__need("edit_sketch")({ image_document_id: id, ops: ops })
|
|
1444
|
+
},
|
|
1445
|
+
|
|
1446
|
+
scripts: {
|
|
1447
|
+
list: (opts) => __need("list_scripts")(__merge(opts)),
|
|
1448
|
+
/** Create an empty script. Pass {project_id} to place it. */
|
|
1449
|
+
create: (name, opts) =>
|
|
1450
|
+
__need("create_script")(__named(name, opts, "scripts.create")),
|
|
1451
|
+
get: (id) => __need("get_script")({ script_id: id }),
|
|
1452
|
+
voice: (id, opts) =>
|
|
1453
|
+
__need("voice_script_lines")(__merge(opts, { script_id: id })),
|
|
1454
|
+
finish: (args) => __need("finish_storyboard")(args),
|
|
1455
|
+
previewDesign: (args) => __need("preview_storyboard_design")(args),
|
|
1456
|
+
assembleTimeline: (id, opts) =>
|
|
1457
|
+
__need("assemble_script_timeline")(__merge(opts, { script_id: id })),
|
|
1458
|
+
/** Apply cast/line edits to a saved script, server-side. */
|
|
1459
|
+
edit: (id, ops) => __need("edit_script")({ script_id: id, ops: ops })
|
|
1460
|
+
},
|
|
1461
|
+
|
|
1462
|
+
storyboards: {
|
|
1463
|
+
list: (opts) => __need("list_storyboards")(__merge(opts)),
|
|
1464
|
+
/** Create a blank storyboard. Pass {brief, style, aspect_ratio} for board settings. */
|
|
1465
|
+
create: (name, opts) =>
|
|
1466
|
+
__need("create_storyboard")(__named(name, opts, "storyboards.create")),
|
|
1467
|
+
get: (id) => __need("get_storyboard")({ storyboard_id: id }),
|
|
1468
|
+
renderStills: (id, opts) =>
|
|
1469
|
+
__need("render_storyboard_stills")(
|
|
1470
|
+
__merge(opts, { storyboard_id: id })
|
|
1471
|
+
),
|
|
1472
|
+
renderClips: (id, opts) =>
|
|
1473
|
+
__need("render_storyboard_clips")(__merge(opts, { storyboard_id: id })),
|
|
1474
|
+
reviseClip: (id, target, instruction, opts) =>
|
|
1475
|
+
__need("revise_storyboard_clip")(
|
|
1476
|
+
__merge(opts, {
|
|
1477
|
+
storyboard_id: id,
|
|
1478
|
+
target: target,
|
|
1479
|
+
instruction: instruction
|
|
1480
|
+
})
|
|
1481
|
+
),
|
|
1482
|
+
finish: (args) => __need("finish_storyboard")(args),
|
|
1483
|
+
previewDesign: (args) => __need("preview_storyboard_design")(args),
|
|
1484
|
+
assembleTimeline: (id, opts) =>
|
|
1485
|
+
__need("assemble_storyboard_timeline")(
|
|
1486
|
+
__merge(opts, { storyboard_id: id })
|
|
1487
|
+
),
|
|
1488
|
+
/** Apply shot-list edits to a saved board, server-side. */
|
|
1489
|
+
edit: (id, ops) => __need("edit_storyboard")({ storyboard_id: id, ops: ops })
|
|
1490
|
+
}
|
|
1491
|
+
};
|
|
1492
|
+
|
|
1493
|
+
/**
|
|
1494
|
+
* Guest globals a caller reaches for under \`nodetool.\` — the namespaces that
|
|
1495
|
+
* live at the top level of the sandbox rather than on the object model. Each
|
|
1496
|
+
* value is the one sentence that sends the caller to the right place.
|
|
1497
|
+
*/
|
|
1498
|
+
const __GUEST_GLOBALS = {
|
|
1499
|
+
image: "Probing and editing pixels is \`image.*\`; generating a picture is \`nodetool.media.generateImage\`.",
|
|
1500
|
+
audio: "Sample-level work is \`audio.*\`; generating speech or music is \`nodetool.media.generateSpeech\`/\`generateMusic\`.",
|
|
1501
|
+
video: "Frame and container work is \`video.*\`; generating a clip is \`nodetool.media.generateVideo\`, and probing or encoding a file with a host binary is \`nodetool.media.ffprobe\`/\`ffmpeg\`.",
|
|
1502
|
+
canvas: "Drawing is \`canvas.*\`.",
|
|
1503
|
+
media: "The bare \`media.*\` global holds byte helpers; the tools are \`nodetool.media.*\`.",
|
|
1504
|
+
format: "Text and table formatting is \`format.*\`.",
|
|
1505
|
+
workspace: "Run files are \`workspace.*\`; the library is \`nodetool.assets.*\`.",
|
|
1506
|
+
fetch: "The network is the \`fetch\` global, or \`nodetool.web.fetch\`."
|
|
1507
|
+
};
|
|
1508
|
+
|
|
1509
|
+
/**
|
|
1510
|
+
* What a member that does not exist answers with: callable, and a namespace
|
|
1511
|
+
* all the way down, so \`nodetool.script.list()\` reports the typo in
|
|
1512
|
+
* \`script\` rather than bottoming out one hop later as
|
|
1513
|
+
* \`TypeError: not a function\` — the message the whole guard exists to
|
|
1514
|
+
* replace.
|
|
1515
|
+
*/
|
|
1516
|
+
const __missing = (message) =>
|
|
1517
|
+
new Proxy(function () {}, {
|
|
1518
|
+
apply() {
|
|
1519
|
+
throw new Error(message);
|
|
1520
|
+
},
|
|
1521
|
+
get(target, prop) {
|
|
1522
|
+
if (typeof prop !== "string" || prop === "then") return target[prop];
|
|
1523
|
+
return __missing(message);
|
|
1524
|
+
}
|
|
1525
|
+
});
|
|
1526
|
+
|
|
1527
|
+
/**
|
|
1528
|
+
* The nearest member name to one that does not exist, comparing on letters
|
|
1529
|
+
* and digits alone: \`find_model\` finds \`find\`, \`assemble_timeline\` finds
|
|
1530
|
+
* \`assembleTimeline\`, \`create_script\` finds \`create\`.
|
|
1531
|
+
*/
|
|
1532
|
+
const __nearest = (prop, names) => {
|
|
1533
|
+
const flatten = (s) => s.toLowerCase().replace(/[^a-z0-9]/g, "");
|
|
1534
|
+
const want = flatten(prop);
|
|
1535
|
+
let best = null;
|
|
1536
|
+
for (const name of names) {
|
|
1537
|
+
const have = flatten(name);
|
|
1538
|
+
if (have === want) return name;
|
|
1539
|
+
if (have.length === 0) continue;
|
|
1540
|
+
const near = want.indexOf(have) === 0 || have.indexOf(want) === 0;
|
|
1541
|
+
if (near && (best === null || have.length > flatten(best).length)) {
|
|
1542
|
+
best = name;
|
|
1543
|
+
}
|
|
1544
|
+
}
|
|
1545
|
+
return best;
|
|
1546
|
+
};
|
|
1547
|
+
|
|
1548
|
+
/**
|
|
1549
|
+
* Every namespace is guarded, so a member that does not exist answers with
|
|
1550
|
+
* its own name instead of QuickJS's \`TypeError: not a function\`.
|
|
1551
|
+
*
|
|
1552
|
+
* The name a capability has on the belt is not the name it has here — the
|
|
1553
|
+
* object model curates: \`find_model\` is \`nodetool.models.find\`,
|
|
1554
|
+
* \`create_script\` is \`nodetool.scripts.create\`. A caller reaching for the
|
|
1555
|
+
* belt spelling got a message that named neither the call it made nor the
|
|
1556
|
+
* one it meant, and a bare \`TypeError\` reads like the sandbox is broken
|
|
1557
|
+
* rather than like a typo: one chat took it as "models are unavailable here"
|
|
1558
|
+
* and abandoned the namespace. An unknown member answers with a thrower
|
|
1559
|
+
* rather than \`undefined\` — the shape \`tools.<name>\` already uses — so the
|
|
1560
|
+
* report lands at the call, where the mistake is, and reads the same whether
|
|
1561
|
+
* the missing half is the method or the namespace.
|
|
1562
|
+
*/
|
|
1563
|
+
const __guard = (path, obj) =>
|
|
1564
|
+
new Proxy(obj, {
|
|
1565
|
+
get(target, prop) {
|
|
1566
|
+
// Symbols, everything that really is there, and the handful of names
|
|
1567
|
+
// the language itself reaches for pass straight through: \`then\` so
|
|
1568
|
+
// awaiting a namespace cannot mistake it for a thenable, \`toJSON\` and
|
|
1569
|
+
// \`inspect\` so logging one still prints it instead of throwing.
|
|
1570
|
+
if (
|
|
1571
|
+
typeof prop !== "string" ||
|
|
1572
|
+
prop === "then" ||
|
|
1573
|
+
prop === "toJSON" ||
|
|
1574
|
+
prop === "inspect" ||
|
|
1575
|
+
prop in target
|
|
1576
|
+
) {
|
|
1577
|
+
return target[prop];
|
|
1578
|
+
}
|
|
1579
|
+
const names = Object.keys(target).sort();
|
|
1580
|
+
const nearest = __nearest(prop, names);
|
|
1581
|
+
// A name that is a *global* here reads as a missing namespace: the
|
|
1582
|
+
// pixel and sample ops are \`image.*\`/\`audio.*\`/\`video.*\`, not
|
|
1583
|
+
// \`nodetool.video.*\`, and a chat that took the miss at face value
|
|
1584
|
+
// gave up on the operation instead of dropping the prefix.
|
|
1585
|
+
const global = path === "nodetool" ? __GUEST_GLOBALS[prop] : undefined;
|
|
1586
|
+
return __missing(
|
|
1587
|
+
path + "." + prop + " does not exist" +
|
|
1588
|
+
(global
|
|
1589
|
+
? ". \`" + prop + "\` is a global in this sandbox — call \`" +
|
|
1590
|
+
prop + ".*\` with no \`nodetool.\` prefix. " + global
|
|
1591
|
+
: nearest
|
|
1592
|
+
? ". Did you mean " + path + "." + nearest + "?"
|
|
1593
|
+
: ".") +
|
|
1594
|
+
" " + path + " has: " + names.join(", ") + "." +
|
|
1595
|
+
(path === "nodetool"
|
|
1596
|
+
? ""
|
|
1597
|
+
: ' nodetool.searchTools("' + prop + '") finds the tool ' +
|
|
1598
|
+
"behind a name if it is one.")
|
|
1599
|
+
);
|
|
1600
|
+
}
|
|
1601
|
+
});
|
|
1602
|
+
|
|
1603
|
+
for (const key of Object.keys(api)) {
|
|
1604
|
+
const value = api[key];
|
|
1605
|
+
if (value && typeof value === "object") {
|
|
1606
|
+
api[key] = __guard("nodetool." + key, value);
|
|
1607
|
+
}
|
|
1608
|
+
}
|
|
1609
|
+
return __guard("nodetool", api);
|
|
1610
|
+
})();
|
|
1611
|
+
`;
|
|
1612
|
+
/** The namespace→tools map, serialized once for the guest's capabilities(). */
|
|
1613
|
+
const NAMESPACE_TOOLS_LITERAL = `const __NT_NAMESPACE_TOOLS = ${JSON.stringify(NODETOOL_API_NAMESPACE_TOOLS)};`;
|
|
1614
|
+
/** The full prelude: namespace map, graph normalizer, API definition. */
|
|
1615
|
+
export const NODETOOL_API_PRELUDE_FULL = `${NAMESPACE_TOOLS_LITERAL}\n${GRAPH_JSON_PRELUDE}\n${NODETOOL_API_PRELUDE}`;
|
|
1616
|
+
/** Guest names {@link NODETOOL_API_PRELUDE_FULL} defines. */
|
|
1617
|
+
export const NODETOOL_API_GLOBALS = [
|
|
1618
|
+
"nodetool",
|
|
1619
|
+
"__NT_NAMESPACE_TOOLS",
|
|
1620
|
+
"__graphJsonOf"
|
|
1621
|
+
];
|
|
1622
|
+
const NAMESPACE_DOCS = [
|
|
1623
|
+
{
|
|
1624
|
+
namespace: "workflows",
|
|
1625
|
+
skill: "api-workflows",
|
|
1626
|
+
doc: `- \`nodetool.workflows\` — saved graphs and their runs: \`list()\` (→
|
|
1627
|
+
\`{workflows}\`, an envelope), \`get(id)\`, \`create(name, graph)\`,
|
|
1628
|
+
\`validate(idOrGraph)\` (throws on errors), \`run(id, params)\`,
|
|
1629
|
+
\`start(id, params)\` (→ job receipt), \`debug(id, params)\`,
|
|
1630
|
+
\`resolve(sessionId, escalationId, action)\`, \`example("<package>/<name>")\`,
|
|
1631
|
+
\`versions\`, \`getVersion\`, \`snapshot\`, \`restore\`, \`deleteVersion\`,
|
|
1632
|
+
\`open(id?)\`. Saving a graph does not run it.`
|
|
1633
|
+
},
|
|
1634
|
+
{
|
|
1635
|
+
namespace: "settings",
|
|
1636
|
+
skill: "api-settings",
|
|
1637
|
+
doc: `- \`nodetool.settings\` — \`list({group})\`, \`get(key)\`, \`set(key, value)\`,
|
|
1638
|
+
\`secrets()\` (names only), \`requestSecret(key, {reason, help_url})\`. A secret
|
|
1639
|
+
is never set from code: \`requestSecret\` opens a dialog for the user.`
|
|
1640
|
+
},
|
|
1641
|
+
{
|
|
1642
|
+
namespace: "nodes",
|
|
1643
|
+
skill: "api-workflows",
|
|
1644
|
+
doc: `- \`nodetool.nodes\` — \`search(query)\` (→ \`{total, results}\`, the type is on
|
|
1645
|
+
\`type\`), \`info(type)\`, \`list({namespace})\`, \`run(type, inputs)\` (one node,
|
|
1646
|
+
no graph). NEVER guess a node type: search, then \`info\`.`
|
|
1647
|
+
},
|
|
1648
|
+
{
|
|
1649
|
+
namespace: "agents",
|
|
1650
|
+
skill: "api-agents",
|
|
1651
|
+
doc: `- \`nodetool.agents\` — \`run(prompt)\`, \`start(prompt)\` (→ \`{subtask_id}\`),
|
|
1652
|
+
\`wait({ids})\`. A sub-agent has your tools and a FRESH context, so the
|
|
1653
|
+
prompt must be self-contained.`
|
|
1654
|
+
},
|
|
1655
|
+
{
|
|
1656
|
+
namespace: "models",
|
|
1657
|
+
skill: "api-models",
|
|
1658
|
+
doc: `- \`nodetool.models\` — \`pick(capability, {query})\` (→ one model),
|
|
1659
|
+
\`find(capability)\` (→ \`{results}\`), \`list()\`, \`forProvider(provider)\`,
|
|
1660
|
+
\`generate(prompt, model)\`. Never guess a model id. A node's model property
|
|
1661
|
+
takes the result's \`ref\` verbatim.`
|
|
1662
|
+
},
|
|
1663
|
+
{
|
|
1664
|
+
namespace: "media",
|
|
1665
|
+
skill: "api-media",
|
|
1666
|
+
doc: `- \`nodetool.media\` — one generation with a picked model, saved as an asset:
|
|
1667
|
+
\`generateImage(prompt, model)\`, \`editImage(inputFile, prompt, model)\`,
|
|
1668
|
+
\`generateVideo(prompt, model)\`, \`animateImage(inputFile, model)\`,
|
|
1669
|
+
\`videoFromReferences(files, model)\`, \`speak(text, model)\`,
|
|
1670
|
+
\`generateMusic(prompt, model)\`, \`transcribe(inputFile, model)\`,
|
|
1671
|
+
\`embed(text, model)\`; judges \`critique(\`, \`compare(\`, \`scoreAdherence(\`,
|
|
1672
|
+
\`understandVideo(\`; \`ffmpeg(args)\`, \`ffprobe(path)\`, \`downloadVideo(url)\`;
|
|
1673
|
+
\`toImage/toAudio/toVideo(handle)\` saves a handle.
|
|
1674
|
+
Hold each result in a local variable and feed it straight into the next
|
|
1675
|
+
call; record the uris a later action or turn will need with
|
|
1676
|
+
\`nodetool.memory.save\` — never re-run generation for something already saved.`
|
|
1677
|
+
},
|
|
1678
|
+
{
|
|
1679
|
+
namespace: "documents",
|
|
1680
|
+
skill: "api-assets",
|
|
1681
|
+
doc: `- \`nodetool.documents\` — workspace file conversion: \`convert(inputFile,
|
|
1682
|
+
outputFile)\`, \`extractText(pdfPath)\`, \`extractTables(pdfPath, outFile)\`,
|
|
1683
|
+
\`markdownToPdf(inputFile, outputFile)\`, \`pdfToMarkdown(inputFile, outputFile)\`.`
|
|
1684
|
+
},
|
|
1685
|
+
{
|
|
1686
|
+
namespace: "web",
|
|
1687
|
+
skill: "api-web",
|
|
1688
|
+
doc: `- \`nodetool.web\` — \`search(query)\`, \`news(query)\`, \`images(query)\`,
|
|
1689
|
+
\`browse(url)\` (readable text), \`fetch(url, {method, headers, body})\`,
|
|
1690
|
+
\`download(url, outputFile)\`, \`screenshot(url, outputFile)\`.`
|
|
1691
|
+
},
|
|
1692
|
+
{
|
|
1693
|
+
namespace: "memory",
|
|
1694
|
+
skill: "api-memory",
|
|
1695
|
+
doc: `- \`nodetool.memory\` — durable notes across conversations: \`save(content,
|
|
1696
|
+
{title, kind, resources})\`, \`search(query)\`, \`list()\`, \`update(id, fields)\`,
|
|
1697
|
+
\`remove(id)\`. Put what you produce in \`resources\`.`
|
|
1698
|
+
},
|
|
1699
|
+
{
|
|
1700
|
+
namespace: "threads",
|
|
1701
|
+
skill: "api-memory",
|
|
1702
|
+
doc: `- \`nodetool.threads\` — chat history, read-only: \`list()\`, \`get(threadId)\`,
|
|
1703
|
+
\`last(threadId)\`, \`message(messageId)\`.`
|
|
1704
|
+
},
|
|
1705
|
+
{
|
|
1706
|
+
namespace: "shared",
|
|
1707
|
+
skill: "api-memory",
|
|
1708
|
+
doc: `- \`nodetool.shared\` — the scratchpad of THIS run: \`list()\` (metadata
|
|
1709
|
+
only), \`read(keys)\`, \`publish(key, value)\`. Earlier step and task results
|
|
1710
|
+
land here.`
|
|
1711
|
+
},
|
|
1712
|
+
{
|
|
1713
|
+
namespace: "email",
|
|
1714
|
+
skill: "api-web",
|
|
1715
|
+
doc: `- \`nodetool.email\` — \`search({subject, text, since_hours_ago})\`,
|
|
1716
|
+
\`archive(messageIds)\`, \`label(messageId, label)\`.`
|
|
1717
|
+
},
|
|
1718
|
+
{
|
|
1719
|
+
namespace: "assets",
|
|
1720
|
+
skill: "api-assets",
|
|
1721
|
+
doc: `- \`nodetool.assets\` — the library: \`list()\`, \`search(query)\`,
|
|
1722
|
+
\`images()\` (handles for \`view_image\`), \`get(id)\`, \`read(nameOrUri)\`,
|
|
1723
|
+
\`save(name, {content | content_base64 | source})\`. Keep a file another tool
|
|
1724
|
+
stored by passing it as \`source\`, never by reading it to base64.`
|
|
1725
|
+
},
|
|
1726
|
+
{
|
|
1727
|
+
namespace: "jobs",
|
|
1728
|
+
skill: "api-workflows",
|
|
1729
|
+
doc: `- \`nodetool.jobs\` — \`list()\`, \`get(id)\`, \`logs(id)\`,
|
|
1730
|
+
\`wait(idOrReceipt, {timeoutMs})\` (polls until the job settles).`
|
|
1731
|
+
},
|
|
1732
|
+
{
|
|
1733
|
+
namespace: "runs",
|
|
1734
|
+
skill: "nodetool-troubleshooter",
|
|
1735
|
+
doc: `- \`nodetool.runs\` — app, workflow and chat runs: \`list(opts)\`,
|
|
1736
|
+
\`get(id)\` (summary first), \`get(id, {include_content: true})\` (saved app inputs and outputs),
|
|
1737
|
+
\`trace(id, {focus_span_id, depth, include_content})\`,
|
|
1738
|
+
\`logs(id, {level, source, span_id, include_content})\`, \`wait(id, {timeout_ms})\`.
|
|
1739
|
+
Resource ids accept their 12-character prefixes. Trace and span ids stay full.`
|
|
1740
|
+
},
|
|
1741
|
+
{
|
|
1742
|
+
namespace: "generations",
|
|
1743
|
+
skill: "api-media",
|
|
1744
|
+
doc: `- \`nodetool.generations\` — status and cost of every media generation:
|
|
1745
|
+
\`list()\`, \`get(id)\`, \`wait(id)\` (for \`background: true\`), \`cancel(id)\`,
|
|
1746
|
+
\`reconcile(id)\`, \`fromProvider(provider)\`, \`getFromProvider(provider, requestId)\`.`
|
|
1747
|
+
},
|
|
1748
|
+
{
|
|
1749
|
+
namespace: "collections",
|
|
1750
|
+
skill: "api-collections",
|
|
1751
|
+
doc: `- \`nodetool.collections\` — vector search: \`list()\`, \`query(collection,
|
|
1752
|
+
text)\`, \`index(text, sourceId)\`, \`indexBatch(chunks)\`, \`search(text)\`,
|
|
1753
|
+
\`hybridSearch(text)\`.`
|
|
1754
|
+
},
|
|
1755
|
+
{
|
|
1756
|
+
namespace: "apps",
|
|
1757
|
+
skill: "api-apps",
|
|
1758
|
+
doc: `- \`nodetool.apps\` — mini apps: \`list()\`, \`get(id)\`, \`create(name)\`,
|
|
1759
|
+
\`edit(id, steps)\` (\`edit(id, [])\` lists the App Builder tools),
|
|
1760
|
+
\`debug(id, {run: false})\` (the free wiring check).`
|
|
1761
|
+
},
|
|
1762
|
+
{
|
|
1763
|
+
namespace: "games",
|
|
1764
|
+
skill: "api-games",
|
|
1765
|
+
doc: `- \`nodetool.games\` — built-in games: \`create(name, {project_id})\`,
|
|
1766
|
+
\`get(id)\`, \`edit(id, ops)\`, \`setDocument(id, document)\`,
|
|
1767
|
+
\`previewAuthoring(id, {program})\`, \`applyAuthoring(id, candidate)\`,
|
|
1768
|
+
\`generateAsset(id, slot, kind, prompt)\`, \`installAsset\`, \`playtest(id)\`,
|
|
1769
|
+
\`autoplay(id, {win})\`, \`capture(id)\`, \`publish(id)\`, \`build(id)\`,
|
|
1770
|
+
\`listExamples()\`, \`getExample(slug)\`, \`installExample(slug)\`.`
|
|
1771
|
+
},
|
|
1772
|
+
{
|
|
1773
|
+
namespace: "timelines",
|
|
1774
|
+
skill: "api-timelines",
|
|
1775
|
+
doc: `- \`nodetool.timelines\` — \`list()\` (→ \`{timelines}\`), \`create(name, {fps,
|
|
1776
|
+
width, height})\`, \`get(id)\`, \`edit(id, ops)\`, \`setDocument(id, document)\`,
|
|
1777
|
+
\`validate(idOrDocument, {tier: "showcase"})\`, \`preview(idOrDocument,
|
|
1778
|
+
{times_ms, range, sheet})\`, \`compare(a, b)\`, \`render(id)\`,
|
|
1779
|
+
\`bakeAudioAnimation(id, audioClipId, targetClipId, opts)\` (drive a
|
|
1780
|
+
property from measured audio), versions, \`examples.list/get/source\`,
|
|
1781
|
+
\`compositions.*\`. Build a motion-graphics piece in
|
|
1782
|
+
code with \`@nodetool-ai/sandbox-timeline\`, and look at previewed frames
|
|
1783
|
+
before you call it done.`
|
|
1784
|
+
},
|
|
1785
|
+
{
|
|
1786
|
+
namespace: "sketches",
|
|
1787
|
+
skill: "api-sketches",
|
|
1788
|
+
doc: `- \`nodetool.sketches\` — layered image documents: \`list()\`,
|
|
1789
|
+
\`create(name, {width, height})\`, \`get(id)\`, \`edit(id, ops)\`,
|
|
1790
|
+
\`validate(idOrDocument)\`, versions. Layers only; pixels stay with an editor
|
|
1791
|
+
or a workflow run.`
|
|
1792
|
+
},
|
|
1793
|
+
{
|
|
1794
|
+
namespace: "scripts",
|
|
1795
|
+
skill: "api-scripts",
|
|
1796
|
+
doc: `- \`nodetool.scripts\` — voice scripts: \`list()\`, \`create(name)\`,
|
|
1797
|
+
\`get(id)\`, \`edit(id, ops)\`, \`voice(id)\`, \`assembleTimeline(id)\`.`
|
|
1798
|
+
},
|
|
1799
|
+
{
|
|
1800
|
+
namespace: "storyboards",
|
|
1801
|
+
skill: "api-storyboards",
|
|
1802
|
+
doc: `- \`nodetool.storyboards\` — shot lists: \`list()\`, \`create(name, {brief,
|
|
1803
|
+
style, aspect_ratio})\`, \`get(id)\`, \`edit(id, ops)\`, \`renderStills(id)\`
|
|
1804
|
+
(cheap), \`renderClips(id)\` (expensive), \`reviseClip(id, target,
|
|
1805
|
+
instruction)\`, \`assembleTimeline(id)\`.`
|
|
1806
|
+
}
|
|
1807
|
+
];
|
|
1808
|
+
const BATCH_EXAMPLE = `Batching turns one workflow into a dynamic pipeline — loops, joins, and
|
|
1809
|
+
per-item parameters live in your code:
|
|
1810
|
+
|
|
1811
|
+
\`\`\`js
|
|
1812
|
+
const rows = JSON.parse(await workspace.read("products.json"));
|
|
1813
|
+
const runs = await nodetool.batch(rows, (row) =>
|
|
1814
|
+
nodetool.workflows.run(wfId, { image_url: row.image_url, title: row.title }),
|
|
1815
|
+
{ concurrency: 3 });
|
|
1816
|
+
const failed = runs.filter((r) => !r.ok);
|
|
1817
|
+
if (failed.length) {
|
|
1818
|
+
await nodetool.memory.save("failed rows: " + failed.map((r) => r.index).join(","), { title: "Batch failures" });
|
|
1819
|
+
}
|
|
1820
|
+
return { ok: runs.filter((r) => r.ok).length, failed: failed.length };
|
|
1821
|
+
\`\`\`
|
|
1822
|
+
|
|
1823
|
+
\`nodetool.batch(items, fn, {concurrency, stopOnError})\` never throws — each
|
|
1824
|
+
entry settles as \`{ok, index, item, value | error}\`. A handful of items is one
|
|
1825
|
+
\`batch\` call in one action; only lists big enough to threaten the sandbox
|
|
1826
|
+
limits get chunked across actions, persisting partial progress with
|
|
1827
|
+
\`nodetool.memory.save\`.`;
|
|
1828
|
+
const MEDIA_EXAMPLE = `Pick a model, then generate — batching included. Every result
|
|
1829
|
+
is already a saved asset; return the uris and record the ones you will need
|
|
1830
|
+
after this action:
|
|
1831
|
+
|
|
1832
|
+
\`\`\`js
|
|
1833
|
+
const model = await nodetool.models.pick("text_to_image");
|
|
1834
|
+
const shots = ["a red fox in snow", "a fox by a river"];
|
|
1835
|
+
const images = await nodetool.batch(shots, (prompt) =>
|
|
1836
|
+
nodetool.media.generateImage(prompt, model), { concurrency: 2 });
|
|
1837
|
+
const uris = images.map((r) => (r.ok ? r.value.asset_uri : null)).filter(Boolean);
|
|
1838
|
+
await nodetool.memory.save(uris.join("\\n"), { title: "Fox stills" });
|
|
1839
|
+
return uris;
|
|
1840
|
+
\`\`\``;
|
|
1841
|
+
/**
|
|
1842
|
+
* The `nodetool` API section for codeact system prompts, documenting only the
|
|
1843
|
+
* namespaces this belt can actually serve. Empty string when none can.
|
|
1844
|
+
*/
|
|
1845
|
+
/** Client tool families that address a document open in the user's browser. */
|
|
1846
|
+
const DOCUMENT_UI_TOOL_PREFIXES = [
|
|
1847
|
+
"ui_timeline_",
|
|
1848
|
+
"ui_sketch_",
|
|
1849
|
+
"ui_script_",
|
|
1850
|
+
"ui_storyboard_"
|
|
1851
|
+
];
|
|
1852
|
+
const DOCUMENT_SURFACE_GUIDANCE = `# Editing documents: server-side first
|
|
1853
|
+
|
|
1854
|
+
A timeline, sketch, script, or storyboard that has an id is editable
|
|
1855
|
+
server-side through \`nodetool.<surface>.edit(id, ops)\`. Prefer it. The edit
|
|
1856
|
+
lands on the stored document under a compare-and-swap, works whether or not the
|
|
1857
|
+
user has that document open, and an open editor picks the change up live — so
|
|
1858
|
+
one path covers both cases.
|
|
1859
|
+
|
|
1860
|
+
Reach for a \`ui_*\` tool only for what a server-side edit cannot do:
|
|
1861
|
+
|
|
1862
|
+
- \`ui_sketch_get_layer_image\`, \`ui_sketch_render_to_asset\` — real pixels off
|
|
1863
|
+
the canvas.
|
|
1864
|
+
- \`ui_timeline_get_clip_frames\` — rendered video frames.
|
|
1865
|
+
- \`ui_sketch_generate\`, \`ui_timeline_generate_clip\`,
|
|
1866
|
+
\`ui_storyboard_generate_*\`, \`ui_script_voice_*\` — generation the browser
|
|
1867
|
+
drives. Headlessly these are \`nodetool.storyboards.renderStills/renderClips\`,
|
|
1868
|
+
\`nodetool.scripts.voice\`, \`nodetool.media.*\`, or a workflow run.
|
|
1869
|
+
- Moving the user's view: selection, playhead, active tool.
|
|
1870
|
+
|
|
1871
|
+
If you do not know the document's id, find it with \`list()\` on the namespace.`;
|
|
1872
|
+
/**
|
|
1873
|
+
* Heading of the prompt section {@link buildNodetoolApiPromptSection} renders.
|
|
1874
|
+
* `buildCodeActSystemPrompt` keys on it to know the `nodetool` object model is
|
|
1875
|
+
* loaded — and then documents `nodetool.batch` as THE fan-out primitive
|
|
1876
|
+
* instead of the bare-sandbox `parallelMap` helper.
|
|
1877
|
+
*/
|
|
1878
|
+
export const NODETOOL_API_SECTION_HEADER = "# The `nodetool` object model";
|
|
1879
|
+
/**
|
|
1880
|
+
* The rule for choosing between the three ways a turn makes node work happen.
|
|
1881
|
+
* Rendered only for the surfaces this session actually has, so it never sends
|
|
1882
|
+
* the model at a pack that is not installed.
|
|
1883
|
+
*
|
|
1884
|
+
* It exists because the surfaces answer different questions and a model that
|
|
1885
|
+
* knows all three still picks by habit: a chat turn asked to "run a pipeline
|
|
1886
|
+
* that generates an image and removes its background" authored a graph, saved
|
|
1887
|
+
* it, never ran it, and then — asked to do it "without a graph" — bent
|
|
1888
|
+
* `media.editImage` into a background remover instead of calling the
|
|
1889
|
+
* `RemoveBackground` node it had already found.
|
|
1890
|
+
*/
|
|
1891
|
+
function surfaceChoiceSection(options, names) {
|
|
1892
|
+
if (!options.nativeFlow && !options.graphDsl)
|
|
1893
|
+
return "";
|
|
1894
|
+
const bullets = [];
|
|
1895
|
+
if (names.has("generate_image")) {
|
|
1896
|
+
bullets.push(`- \`nodetool.media.*\` — ONE generation with a picked model: an image, a
|
|
1897
|
+
video, speech, a transcript. The short path when a verb there does exactly
|
|
1898
|
+
what was asked. It has no verb for most node work, and stretching one to
|
|
1899
|
+
cover a node — an edit prompt in place of a background remover, an
|
|
1900
|
+
upscaler, a converter — produces something other than the node the user
|
|
1901
|
+
meant.`);
|
|
1902
|
+
}
|
|
1903
|
+
if (options.nativeFlow) {
|
|
1904
|
+
bullets.push(`- **Native flow** (\`${FLOW_PACKAGE}\`) — the user wants the RESULT:
|
|
1905
|
+
"run", "generate", "then", "for each". Any node in the registry, several in
|
|
1906
|
+
a row, in this action. Nothing is saved and nothing opens in the editor.`);
|
|
1907
|
+
}
|
|
1908
|
+
if (options.graphDsl) {
|
|
1909
|
+
bullets.push(`- **Graph DSL** (\`${GRAPH_DSL_PACKAGE}\`) — the user wants the WORKFLOW:
|
|
1910
|
+
something saved, opened in the editor, re-run later, or handed to someone
|
|
1911
|
+
else. Authoring it does not run it — \`nodetool.workflows.run(id, params)\`
|
|
1912
|
+
does.`);
|
|
1913
|
+
}
|
|
1914
|
+
const closer = options.nativeFlow
|
|
1915
|
+
? `
|
|
1916
|
+
|
|
1917
|
+
When the ask is to do the work and the user never mentioned a workflow, run
|
|
1918
|
+
the nodes and report what came out. Reaching for a graph there leaves the
|
|
1919
|
+
user with an artifact they did not ask for and the work still undone.`
|
|
1920
|
+
: "";
|
|
1921
|
+
return `# Which surface runs the work
|
|
1922
|
+
|
|
1923
|
+
Pick by what the user asked for, not by what the last turn used.
|
|
1924
|
+
|
|
1925
|
+
${bullets.join("\n")}${closer}`;
|
|
1926
|
+
}
|
|
1927
|
+
export function buildNodetoolApiPromptSection(toolNames, options = {}) {
|
|
1928
|
+
const names = new Set(toolNames);
|
|
1929
|
+
const active = NAMESPACE_DOCS.filter((entry) => NODETOOL_API_NAMESPACE_TOOLS[entry.namespace].some((tool) => names.has(tool)));
|
|
1930
|
+
if (active.length === 0)
|
|
1931
|
+
return "";
|
|
1932
|
+
const sections = [
|
|
1933
|
+
NODETOOL_API_SECTION_HEADER,
|
|
1934
|
+
`Platform objects — workflows, models, media, documents — are
|
|
1935
|
+
driven through \`nodetool.*\`, not through the raw imported calls. The backing
|
|
1936
|
+
tools are deliberately absent from the tool catalog above; this object model
|
|
1937
|
+
is their one documented surface. \`nodetool.capabilities()\` reports what is
|
|
1938
|
+
available. A method whose backing tool is missing throws and names the tool.`,
|
|
1939
|
+
`The same capabilities are also importable, one module per namespace:
|
|
1940
|
+
\`import { list_workflows } from "@nodetool-ai/sandbox-nodetool/workflows"\`, or
|
|
1941
|
+
\`import workflows from "@nodetool-ai/sandbox-nodetool/workflows"\` for the whole
|
|
1942
|
+
namespace. Each export takes the one arguments object its tool takes. This is
|
|
1943
|
+
the same gated implementation \`nodetool.*\` calls — \`nodetool.*\` stays
|
|
1944
|
+
available, and the two cannot disagree. A module this session does not mount
|
|
1945
|
+
fails the action by name, before any code runs.`
|
|
1946
|
+
];
|
|
1947
|
+
// A skill is only worth naming when this belt can load it.
|
|
1948
|
+
const skills = names.has("load_skill");
|
|
1949
|
+
if (skills) {
|
|
1950
|
+
sections.push(`Each line below is a summary. Its skill (\`load_skill\`) holds every
|
|
1951
|
+
option, return shape and example: load it before the first call into that
|
|
1952
|
+
namespace.`);
|
|
1953
|
+
}
|
|
1954
|
+
sections.push(active
|
|
1955
|
+
.map((entry) => skills ? `${entry.doc} Skill: \`${entry.skill}\`.` : entry.doc)
|
|
1956
|
+
.join("\n"));
|
|
1957
|
+
const choice = surfaceChoiceSection(options, names);
|
|
1958
|
+
if (choice)
|
|
1959
|
+
sections.push(choice);
|
|
1960
|
+
if (options.graphDsl)
|
|
1961
|
+
sections.push(GRAPH_DSL_PROMPT_SECTION);
|
|
1962
|
+
if (options.nativeFlow)
|
|
1963
|
+
sections.push(FLOW_PROMPT_SECTION);
|
|
1964
|
+
if (names.has("find_model") && names.has("generate_image")) {
|
|
1965
|
+
sections.push(MEDIA_EXAMPLE);
|
|
1966
|
+
}
|
|
1967
|
+
if (names.has("run_workflow"))
|
|
1968
|
+
sections.push(BATCH_EXAMPLE);
|
|
1969
|
+
if ([...names].some((name) => DOCUMENT_UI_TOOL_PREFIXES.some((p) => name.startsWith(p)))) {
|
|
1970
|
+
sections.push(DOCUMENT_SURFACE_GUIDANCE);
|
|
1971
|
+
}
|
|
1972
|
+
return sections.join("\n\n");
|
|
1973
|
+
}
|
|
1974
|
+
//# sourceMappingURL=nodetool-api.js.map
|