@nodetool-ai/agents 0.7.0-rc.22 → 0.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +35 -0
- package/dist/.nodetool-build-stamp +1 -0
- package/dist/analysis/audio-dsp.d.ts +223 -0
- package/dist/analysis/audio-dsp.d.ts.map +1 -0
- package/dist/analysis/audio-dsp.js +642 -0
- package/dist/analysis/audio-dsp.js.map +1 -0
- package/dist/analysis/media-decode.d.ts +85 -0
- package/dist/analysis/media-decode.d.ts.map +1 -0
- package/dist/analysis/media-decode.js +199 -0
- package/dist/analysis/media-decode.js.map +1 -0
- package/dist/analysis/mediabunny-runtime.d.ts +15 -0
- package/dist/analysis/mediabunny-runtime.d.ts.map +1 -0
- package/dist/analysis/mediabunny-runtime.js +30 -0
- package/dist/analysis/mediabunny-runtime.js.map +1 -0
- package/dist/analysis/video-frames.d.ts +120 -0
- package/dist/analysis/video-frames.d.ts.map +1 -0
- package/dist/analysis/video-frames.js +288 -0
- package/dist/analysis/video-frames.js.map +1 -0
- package/dist/apify/assets.d.ts +80 -0
- package/dist/apify/assets.d.ts.map +1 -0
- package/dist/apify/assets.js +192 -0
- package/dist/apify/assets.js.map +1 -0
- package/dist/apify/catalog.d.ts +44 -0
- package/dist/apify/catalog.d.ts.map +1 -0
- package/dist/apify/catalog.js +108 -0
- package/dist/apify/catalog.js.map +1 -0
- package/dist/apify/client.d.ts +137 -0
- package/dist/apify/client.d.ts.map +1 -0
- package/dist/apify/client.js +346 -0
- package/dist/apify/client.js.map +1 -0
- package/dist/apify/errors.d.ts +85 -0
- package/dist/apify/errors.d.ts.map +1 -0
- package/dist/apify/errors.js +90 -0
- package/dist/apify/errors.js.map +1 -0
- package/dist/apify/normalize.d.ts +131 -0
- package/dist/apify/normalize.d.ts.map +1 -0
- package/dist/apify/normalize.js +202 -0
- package/dist/apify/normalize.js.map +1 -0
- package/dist/apify/policy.d.ts +136 -0
- package/dist/apify/policy.d.ts.map +1 -0
- package/dist/apify/policy.js +223 -0
- package/dist/apify/policy.js.map +1 -0
- package/dist/apify/run.d.ts +86 -0
- package/dist/apify/run.d.ts.map +1 -0
- package/dist/apify/run.js +158 -0
- package/dist/apify/run.js.map +1 -0
- package/dist/app-build/author.d.ts +67 -0
- package/dist/app-build/author.d.ts.map +1 -0
- package/dist/app-build/author.js +231 -0
- package/dist/app-build/author.js.map +1 -0
- package/dist/app-build/bridge.d.ts +130 -0
- package/dist/app-build/bridge.d.ts.map +1 -0
- package/dist/app-build/bridge.js +647 -0
- package/dist/app-build/bridge.js.map +1 -0
- package/dist/app-build/build-service.d.ts +66 -0
- package/dist/app-build/build-service.d.ts.map +1 -0
- package/dist/app-build/build-service.js +249 -0
- package/dist/app-build/build-service.js.map +1 -0
- package/dist/app-build/build.d.ts +115 -0
- package/dist/app-build/build.d.ts.map +1 -0
- package/dist/app-build/build.js +901 -0
- package/dist/app-build/build.js.map +1 -0
- package/dist/app-build/interactions.d.ts +20 -0
- package/dist/app-build/interactions.d.ts.map +1 -0
- package/dist/app-build/interactions.js +121 -0
- package/dist/app-build/interactions.js.map +1 -0
- package/dist/app-build/judge.d.ts +113 -0
- package/dist/app-build/judge.d.ts.map +1 -0
- package/dist/app-build/judge.js +318 -0
- package/dist/app-build/judge.js.map +1 -0
- package/dist/app-build/markdown.d.ts +10 -0
- package/dist/app-build/markdown.d.ts.map +1 -0
- package/dist/app-build/markdown.js +65 -0
- package/dist/app-build/markdown.js.map +1 -0
- package/dist/app-build/spec.d.ts +228 -0
- package/dist/app-build/spec.d.ts.map +1 -0
- package/dist/app-build/spec.js +651 -0
- package/dist/app-build/spec.js.map +1 -0
- package/dist/app-build/tool-loop.d.ts +84 -0
- package/dist/app-build/tool-loop.d.ts.map +1 -0
- package/dist/app-build/tool-loop.js +113 -0
- package/dist/app-build/tool-loop.js.map +1 -0
- package/dist/app-build/types.d.ts +215 -0
- package/dist/app-build/types.d.ts.map +1 -0
- package/dist/app-build/types.js +28 -0
- package/dist/app-build/types.js.map +1 -0
- package/dist/author-graph.d.ts +91 -0
- package/dist/author-graph.d.ts.map +1 -0
- package/dist/author-graph.js +319 -0
- package/dist/author-graph.js.map +1 -0
- package/dist/background-subtasks.d.ts +79 -0
- package/dist/background-subtasks.d.ts.map +1 -0
- package/dist/background-subtasks.js +139 -0
- package/dist/background-subtasks.js.map +1 -0
- package/dist/blender-gate.d.ts +21 -0
- package/dist/blender-gate.d.ts.map +1 -0
- package/dist/blender-gate.js +27 -0
- package/dist/blender-gate.js.map +1 -0
- package/dist/browser-gate.d.ts +28 -0
- package/dist/browser-gate.d.ts.map +1 -0
- package/dist/browser-gate.js +34 -0
- package/dist/browser-gate.js.map +1 -0
- package/dist/capabilities/adapters.d.ts +36 -0
- package/dist/capabilities/adapters.d.ts.map +1 -0
- package/dist/capabilities/adapters.js +44 -0
- package/dist/capabilities/adapters.js.map +1 -0
- package/dist/capabilities/agents.d.ts +78 -0
- package/dist/capabilities/agents.d.ts.map +1 -0
- package/dist/capabilities/agents.js +366 -0
- package/dist/capabilities/agents.js.map +1 -0
- package/dist/capabilities/agents.specs.d.ts +27 -0
- package/dist/capabilities/agents.specs.d.ts.map +1 -0
- package/dist/capabilities/agents.specs.js +243 -0
- package/dist/capabilities/agents.specs.js.map +1 -0
- package/dist/capabilities/analysis.d.ts +93 -0
- package/dist/capabilities/analysis.d.ts.map +1 -0
- package/dist/capabilities/analysis.js +812 -0
- package/dist/capabilities/analysis.js.map +1 -0
- package/dist/capabilities/analysis.specs.d.ts +39 -0
- package/dist/capabilities/analysis.specs.d.ts.map +1 -0
- package/dist/capabilities/analysis.specs.js +217 -0
- package/dist/capabilities/analysis.specs.js.map +1 -0
- package/dist/capabilities/apify.d.ts +34 -0
- package/dist/capabilities/apify.d.ts.map +1 -0
- package/dist/capabilities/apify.js +449 -0
- package/dist/capabilities/apify.js.map +1 -0
- package/dist/capabilities/apify.specs.d.ts +28 -0
- package/dist/capabilities/apify.specs.d.ts.map +1 -0
- package/dist/capabilities/apify.specs.js +232 -0
- package/dist/capabilities/apify.specs.js.map +1 -0
- package/dist/capabilities/apps.d.ts +40 -0
- package/dist/capabilities/apps.d.ts.map +1 -0
- package/dist/capabilities/apps.js +413 -0
- package/dist/capabilities/apps.js.map +1 -0
- package/dist/capabilities/apps.specs.d.ts +23 -0
- package/dist/capabilities/apps.specs.d.ts.map +1 -0
- package/dist/capabilities/apps.specs.js +236 -0
- package/dist/capabilities/apps.specs.js.map +1 -0
- package/dist/capabilities/args.d.ts +65 -0
- package/dist/capabilities/args.d.ts.map +1 -0
- package/dist/capabilities/args.js +218 -0
- package/dist/capabilities/args.js.map +1 -0
- package/dist/capabilities/assets.d.ts +45 -0
- package/dist/capabilities/assets.d.ts.map +1 -0
- package/dist/capabilities/assets.js +952 -0
- package/dist/capabilities/assets.js.map +1 -0
- package/dist/capabilities/assets.specs.d.ts +54 -0
- package/dist/capabilities/assets.specs.d.ts.map +1 -0
- package/dist/capabilities/assets.specs.js +291 -0
- package/dist/capabilities/assets.specs.js.map +1 -0
- package/dist/capabilities/background-generation.d.ts +14 -0
- package/dist/capabilities/background-generation.d.ts.map +1 -0
- package/dist/capabilities/background-generation.js +29 -0
- package/dist/capabilities/background-generation.js.map +1 -0
- package/dist/capabilities/browser.d.ts +30 -0
- package/dist/capabilities/browser.d.ts.map +1 -0
- package/dist/capabilities/browser.js +250 -0
- package/dist/capabilities/browser.js.map +1 -0
- package/dist/capabilities/browser.specs.d.ts +37 -0
- package/dist/capabilities/browser.specs.d.ts.map +1 -0
- package/dist/capabilities/browser.specs.js +173 -0
- package/dist/capabilities/browser.specs.js.map +1 -0
- package/dist/capabilities/code-grading.d.ts +68 -0
- package/dist/capabilities/code-grading.d.ts.map +1 -0
- package/dist/capabilities/code-grading.js +75 -0
- package/dist/capabilities/code-grading.js.map +1 -0
- package/dist/capabilities/code.d.ts +56 -0
- package/dist/capabilities/code.d.ts.map +1 -0
- package/dist/capabilities/code.js +327 -0
- package/dist/capabilities/code.js.map +1 -0
- package/dist/capabilities/code.specs.d.ts +22 -0
- package/dist/capabilities/code.specs.d.ts.map +1 -0
- package/dist/capabilities/code.specs.js +175 -0
- package/dist/capabilities/code.specs.js.map +1 -0
- package/dist/capabilities/collections.d.ts +44 -0
- package/dist/capabilities/collections.d.ts.map +1 -0
- package/dist/capabilities/collections.js +432 -0
- package/dist/capabilities/collections.js.map +1 -0
- package/dist/capabilities/collections.specs.d.ts +25 -0
- package/dist/capabilities/collections.specs.d.ts.map +1 -0
- package/dist/capabilities/collections.specs.js +299 -0
- package/dist/capabilities/collections.specs.js.map +1 -0
- package/dist/capabilities/compositions.d.ts +57 -0
- package/dist/capabilities/compositions.d.ts.map +1 -0
- package/dist/capabilities/compositions.js +384 -0
- package/dist/capabilities/compositions.js.map +1 -0
- package/dist/capabilities/compositions.specs.d.ts +22 -0
- package/dist/capabilities/compositions.specs.d.ts.map +1 -0
- package/dist/capabilities/compositions.specs.js +126 -0
- package/dist/capabilities/compositions.specs.js.map +1 -0
- package/dist/capabilities/concurrency.d.ts +12 -0
- package/dist/capabilities/concurrency.d.ts.map +1 -0
- package/dist/capabilities/concurrency.js +30 -0
- package/dist/capabilities/concurrency.js.map +1 -0
- package/dist/capabilities/costs.d.ts +20 -0
- package/dist/capabilities/costs.d.ts.map +1 -0
- package/dist/capabilities/costs.js +40 -0
- package/dist/capabilities/costs.js.map +1 -0
- package/dist/capabilities/costs.specs.d.ts +12 -0
- package/dist/capabilities/costs.specs.d.ts.map +1 -0
- package/dist/capabilities/costs.specs.js +35 -0
- package/dist/capabilities/costs.specs.js.map +1 -0
- package/dist/capabilities/dispatcher.d.ts +57 -0
- package/dist/capabilities/dispatcher.d.ts.map +1 -0
- package/dist/capabilities/dispatcher.js +117 -0
- package/dist/capabilities/dispatcher.js.map +1 -0
- package/dist/capabilities/documents.d.ts +25 -0
- package/dist/capabilities/documents.d.ts.map +1 -0
- package/dist/capabilities/documents.js +278 -0
- package/dist/capabilities/documents.js.map +1 -0
- package/dist/capabilities/documents.specs.d.ts +18 -0
- package/dist/capabilities/documents.specs.d.ts.map +1 -0
- package/dist/capabilities/documents.specs.js +201 -0
- package/dist/capabilities/documents.specs.js.map +1 -0
- package/dist/capabilities/email.d.ts +23 -0
- package/dist/capabilities/email.d.ts.map +1 -0
- package/dist/capabilities/email.js +226 -0
- package/dist/capabilities/email.js.map +1 -0
- package/dist/capabilities/email.specs.d.ts +16 -0
- package/dist/capabilities/email.specs.d.ts.map +1 -0
- package/dist/capabilities/email.specs.js +102 -0
- package/dist/capabilities/email.specs.js.map +1 -0
- package/dist/capabilities/entities.d.ts +52 -0
- package/dist/capabilities/entities.d.ts.map +1 -0
- package/dist/capabilities/entities.js +478 -0
- package/dist/capabilities/entities.js.map +1 -0
- package/dist/capabilities/entities.specs.d.ts +25 -0
- package/dist/capabilities/entities.specs.d.ts.map +1 -0
- package/dist/capabilities/entities.specs.js +247 -0
- package/dist/capabilities/entities.specs.js.map +1 -0
- package/dist/capabilities/example-timelines.d.ts +3 -0
- package/dist/capabilities/example-timelines.d.ts.map +1 -0
- package/dist/capabilities/example-timelines.js +191 -0
- package/dist/capabilities/example-timelines.js.map +1 -0
- package/dist/capabilities/example-timelines.specs.d.ts +5 -0
- package/dist/capabilities/example-timelines.specs.d.ts.map +1 -0
- package/dist/capabilities/example-timelines.specs.js +53 -0
- package/dist/capabilities/example-timelines.specs.js.map +1 -0
- package/dist/capabilities/files.d.ts +53 -0
- package/dist/capabilities/files.d.ts.map +1 -0
- package/dist/capabilities/files.js +1172 -0
- package/dist/capabilities/files.js.map +1 -0
- package/dist/capabilities/files.specs.d.ts +28 -0
- package/dist/capabilities/files.specs.d.ts.map +1 -0
- package/dist/capabilities/files.specs.js +259 -0
- package/dist/capabilities/files.specs.js.map +1 -0
- package/dist/capabilities/flow.d.ts +93 -0
- package/dist/capabilities/flow.d.ts.map +1 -0
- package/dist/capabilities/flow.js +285 -0
- package/dist/capabilities/flow.js.map +1 -0
- package/dist/capabilities/flow.specs.d.ts +25 -0
- package/dist/capabilities/flow.specs.d.ts.map +1 -0
- package/dist/capabilities/flow.specs.js +114 -0
- package/dist/capabilities/flow.specs.js.map +1 -0
- package/dist/capabilities/game-asset-source.d.ts +31 -0
- package/dist/capabilities/game-asset-source.d.ts.map +1 -0
- package/dist/capabilities/game-asset-source.js +81 -0
- package/dist/capabilities/game-asset-source.js.map +1 -0
- package/dist/capabilities/game.d.ts +12 -0
- package/dist/capabilities/game.d.ts.map +1 -0
- package/dist/capabilities/game.js +1262 -0
- package/dist/capabilities/game.js.map +1 -0
- package/dist/capabilities/game.specs.d.ts +3 -0
- package/dist/capabilities/game.specs.d.ts.map +1 -0
- package/dist/capabilities/game.specs.js +96 -0
- package/dist/capabilities/game.specs.js.map +1 -0
- package/dist/capabilities/gate-from-context.d.ts +39 -0
- package/dist/capabilities/gate-from-context.d.ts.map +1 -0
- package/dist/capabilities/gate-from-context.js +97 -0
- package/dist/capabilities/gate-from-context.js.map +1 -0
- package/dist/capabilities/gate-tools.d.ts +18 -0
- package/dist/capabilities/gate-tools.d.ts.map +1 -0
- package/dist/capabilities/gate-tools.js +66 -0
- package/dist/capabilities/gate-tools.js.map +1 -0
- package/dist/capabilities/generations.d.ts +79 -0
- package/dist/capabilities/generations.d.ts.map +1 -0
- package/dist/capabilities/generations.js +382 -0
- package/dist/capabilities/generations.js.map +1 -0
- package/dist/capabilities/generations.specs.d.ts +62 -0
- package/dist/capabilities/generations.specs.d.ts.map +1 -0
- package/dist/capabilities/generations.specs.js +230 -0
- package/dist/capabilities/generations.specs.js.map +1 -0
- package/dist/capabilities/google.d.ts +50 -0
- package/dist/capabilities/google.d.ts.map +1 -0
- package/dist/capabilities/google.js +246 -0
- package/dist/capabilities/google.js.map +1 -0
- package/dist/capabilities/google.specs.d.ts +52 -0
- package/dist/capabilities/google.specs.d.ts.map +1 -0
- package/dist/capabilities/google.specs.js +391 -0
- package/dist/capabilities/google.specs.js.map +1 -0
- package/dist/capabilities/html-text.d.ts +28 -0
- package/dist/capabilities/html-text.d.ts.map +1 -0
- package/dist/capabilities/html-text.js +76 -0
- package/dist/capabilities/html-text.js.map +1 -0
- package/dist/capabilities/index.d.ts +19 -0
- package/dist/capabilities/index.d.ts.map +1 -0
- package/dist/capabilities/index.js +14 -0
- package/dist/capabilities/index.js.map +1 -0
- package/dist/capabilities/invoke.d.ts +89 -0
- package/dist/capabilities/invoke.d.ts.map +1 -0
- package/dist/capabilities/invoke.js +214 -0
- package/dist/capabilities/invoke.js.map +1 -0
- package/dist/capabilities/jobs.d.ts +32 -0
- package/dist/capabilities/jobs.d.ts.map +1 -0
- package/dist/capabilities/jobs.js +123 -0
- package/dist/capabilities/jobs.js.map +1 -0
- package/dist/capabilities/jobs.specs.d.ts +20 -0
- package/dist/capabilities/jobs.specs.d.ts.map +1 -0
- package/dist/capabilities/jobs.specs.js +103 -0
- package/dist/capabilities/jobs.specs.js.map +1 -0
- package/dist/capabilities/js-scripts.d.ts +90 -0
- package/dist/capabilities/js-scripts.d.ts.map +1 -0
- package/dist/capabilities/js-scripts.js +700 -0
- package/dist/capabilities/js-scripts.js.map +1 -0
- package/dist/capabilities/js-scripts.specs.d.ts +50 -0
- package/dist/capabilities/js-scripts.specs.d.ts.map +1 -0
- package/dist/capabilities/js-scripts.specs.js +344 -0
- package/dist/capabilities/js-scripts.specs.js.map +1 -0
- package/dist/capabilities/lazy-tool.d.ts +42 -0
- package/dist/capabilities/lazy-tool.d.ts.map +1 -0
- package/dist/capabilities/lazy-tool.js +88 -0
- package/dist/capabilities/lazy-tool.js.map +1 -0
- package/dist/capabilities/local-browser.d.ts +24 -0
- package/dist/capabilities/local-browser.d.ts.map +1 -0
- package/dist/capabilities/local-browser.js +105 -0
- package/dist/capabilities/local-browser.js.map +1 -0
- package/dist/capabilities/media.d.ts +121 -0
- package/dist/capabilities/media.d.ts.map +1 -0
- package/dist/capabilities/media.js +2217 -0
- package/dist/capabilities/media.js.map +1 -0
- package/dist/capabilities/media.specs.d.ts +65 -0
- package/dist/capabilities/media.specs.d.ts.map +1 -0
- package/dist/capabilities/media.specs.js +779 -0
- package/dist/capabilities/media.specs.js.map +1 -0
- package/dist/capabilities/memory.d.ts +31 -0
- package/dist/capabilities/memory.d.ts.map +1 -0
- package/dist/capabilities/memory.js +403 -0
- package/dist/capabilities/memory.js.map +1 -0
- package/dist/capabilities/memory.specs.d.ts +55 -0
- package/dist/capabilities/memory.specs.d.ts.map +1 -0
- package/dist/capabilities/memory.specs.js +208 -0
- package/dist/capabilities/memory.specs.js.map +1 -0
- package/dist/capabilities/model3d.d.ts +29 -0
- package/dist/capabilities/model3d.d.ts.map +1 -0
- package/dist/capabilities/model3d.js +482 -0
- package/dist/capabilities/model3d.js.map +1 -0
- package/dist/capabilities/model3d.specs.d.ts +28 -0
- package/dist/capabilities/model3d.specs.d.ts.map +1 -0
- package/dist/capabilities/model3d.specs.js +305 -0
- package/dist/capabilities/model3d.specs.js.map +1 -0
- package/dist/capabilities/models.d.ts +138 -0
- package/dist/capabilities/models.d.ts.map +1 -0
- package/dist/capabilities/models.js +803 -0
- package/dist/capabilities/models.js.map +1 -0
- package/dist/capabilities/models.specs.d.ts +21 -0
- package/dist/capabilities/models.specs.d.ts.map +1 -0
- package/dist/capabilities/models.specs.js +141 -0
- package/dist/capabilities/models.specs.js.map +1 -0
- package/dist/capabilities/nodes.d.ts +26 -0
- package/dist/capabilities/nodes.d.ts.map +1 -0
- package/dist/capabilities/nodes.js +266 -0
- package/dist/capabilities/nodes.js.map +1 -0
- package/dist/capabilities/nodes.specs.d.ts +20 -0
- package/dist/capabilities/nodes.specs.d.ts.map +1 -0
- package/dist/capabilities/nodes.specs.js +106 -0
- package/dist/capabilities/nodes.specs.js.map +1 -0
- package/dist/capabilities/packs.d.ts +69 -0
- package/dist/capabilities/packs.d.ts.map +1 -0
- package/dist/capabilities/packs.js +246 -0
- package/dist/capabilities/packs.js.map +1 -0
- package/dist/capabilities/packs.specs.d.ts +27 -0
- package/dist/capabilities/packs.specs.d.ts.map +1 -0
- package/dist/capabilities/packs.specs.js +64 -0
- package/dist/capabilities/packs.specs.js.map +1 -0
- package/dist/capabilities/project-scope.d.ts +12 -0
- package/dist/capabilities/project-scope.d.ts.map +1 -0
- package/dist/capabilities/project-scope.js +19 -0
- package/dist/capabilities/project-scope.js.map +1 -0
- package/dist/capabilities/projects.d.ts +23 -0
- package/dist/capabilities/projects.d.ts.map +1 -0
- package/dist/capabilities/projects.js +206 -0
- package/dist/capabilities/projects.js.map +1 -0
- package/dist/capabilities/projects.specs.d.ts +23 -0
- package/dist/capabilities/projects.specs.d.ts.map +1 -0
- package/dist/capabilities/projects.specs.js +118 -0
- package/dist/capabilities/projects.specs.js.map +1 -0
- package/dist/capabilities/registry.d.ts +109 -0
- package/dist/capabilities/registry.d.ts.map +1 -0
- package/dist/capabilities/registry.js +445 -0
- package/dist/capabilities/registry.js.map +1 -0
- package/dist/capabilities/script-link.d.ts +22 -0
- package/dist/capabilities/script-link.d.ts.map +1 -0
- package/dist/capabilities/script-link.js +35 -0
- package/dist/capabilities/script-link.js.map +1 -0
- package/dist/capabilities/scripts.d.ts +43 -0
- package/dist/capabilities/scripts.d.ts.map +1 -0
- package/dist/capabilities/scripts.js +1789 -0
- package/dist/capabilities/scripts.js.map +1 -0
- package/dist/capabilities/scripts.specs.d.ts +40 -0
- package/dist/capabilities/scripts.specs.d.ts.map +1 -0
- package/dist/capabilities/scripts.specs.js +319 -0
- package/dist/capabilities/scripts.specs.js.map +1 -0
- package/dist/capabilities/serpapi.d.ts +42 -0
- package/dist/capabilities/serpapi.d.ts.map +1 -0
- package/dist/capabilities/serpapi.js +262 -0
- package/dist/capabilities/serpapi.js.map +1 -0
- package/dist/capabilities/serpapi.specs.d.ts +24 -0
- package/dist/capabilities/serpapi.specs.d.ts.map +1 -0
- package/dist/capabilities/serpapi.specs.js +174 -0
- package/dist/capabilities/serpapi.specs.js.map +1 -0
- package/dist/capabilities/settings.d.ts +48 -0
- package/dist/capabilities/settings.d.ts.map +1 -0
- package/dist/capabilities/settings.js +226 -0
- package/dist/capabilities/settings.js.map +1 -0
- package/dist/capabilities/settings.specs.d.ts +42 -0
- package/dist/capabilities/settings.specs.d.ts.map +1 -0
- package/dist/capabilities/settings.specs.js +126 -0
- package/dist/capabilities/settings.specs.js.map +1 -0
- package/dist/capabilities/shared.d.ts +35 -0
- package/dist/capabilities/shared.d.ts.map +1 -0
- package/dist/capabilities/shared.js +165 -0
- package/dist/capabilities/shared.js.map +1 -0
- package/dist/capabilities/shared.specs.d.ts +19 -0
- package/dist/capabilities/shared.specs.d.ts.map +1 -0
- package/dist/capabilities/shared.specs.js +134 -0
- package/dist/capabilities/shared.specs.js.map +1 -0
- package/dist/capabilities/sketches.d.ts +52 -0
- package/dist/capabilities/sketches.d.ts.map +1 -0
- package/dist/capabilities/sketches.js +1163 -0
- package/dist/capabilities/sketches.js.map +1 -0
- package/dist/capabilities/sketches.specs.d.ts +44 -0
- package/dist/capabilities/sketches.specs.d.ts.map +1 -0
- package/dist/capabilities/sketches.specs.js +392 -0
- package/dist/capabilities/sketches.specs.js.map +1 -0
- package/dist/capabilities/skills.d.ts +28 -0
- package/dist/capabilities/skills.d.ts.map +1 -0
- package/dist/capabilities/skills.js +269 -0
- package/dist/capabilities/skills.js.map +1 -0
- package/dist/capabilities/skills.specs.d.ts +17 -0
- package/dist/capabilities/skills.specs.d.ts.map +1 -0
- package/dist/capabilities/skills.specs.js +108 -0
- package/dist/capabilities/skills.specs.js.map +1 -0
- package/dist/capabilities/storyboards.d.ts +68 -0
- package/dist/capabilities/storyboards.d.ts.map +1 -0
- package/dist/capabilities/storyboards.js +2246 -0
- package/dist/capabilities/storyboards.js.map +1 -0
- package/dist/capabilities/storyboards.specs.d.ts +42 -0
- package/dist/capabilities/storyboards.specs.d.ts.map +1 -0
- package/dist/capabilities/storyboards.specs.js +418 -0
- package/dist/capabilities/storyboards.specs.js.map +1 -0
- package/dist/capabilities/threads.d.ts +25 -0
- package/dist/capabilities/threads.d.ts.map +1 -0
- package/dist/capabilities/threads.js +240 -0
- package/dist/capabilities/threads.js.map +1 -0
- package/dist/capabilities/threads.specs.d.ts +26 -0
- package/dist/capabilities/threads.specs.d.ts.map +1 -0
- package/dist/capabilities/threads.specs.js +108 -0
- package/dist/capabilities/threads.specs.js.map +1 -0
- package/dist/capabilities/timeline-audio-bake.d.ts +114 -0
- package/dist/capabilities/timeline-audio-bake.d.ts.map +1 -0
- package/dist/capabilities/timeline-audio-bake.js +188 -0
- package/dist/capabilities/timeline-audio-bake.js.map +1 -0
- package/dist/capabilities/timeline-bake.d.ts +21 -0
- package/dist/capabilities/timeline-bake.d.ts.map +1 -0
- package/dist/capabilities/timeline-bake.js +118 -0
- package/dist/capabilities/timeline-bake.js.map +1 -0
- package/dist/capabilities/timeline-isolate-subject.d.ts +157 -0
- package/dist/capabilities/timeline-isolate-subject.d.ts.map +1 -0
- package/dist/capabilities/timeline-isolate-subject.js +293 -0
- package/dist/capabilities/timeline-isolate-subject.js.map +1 -0
- package/dist/capabilities/timeline-native-media.d.ts +4 -0
- package/dist/capabilities/timeline-native-media.d.ts.map +1 -0
- package/dist/capabilities/timeline-native-media.js +920 -0
- package/dist/capabilities/timeline-native-media.js.map +1 -0
- package/dist/capabilities/timeline-track-object.d.ts +83 -0
- package/dist/capabilities/timeline-track-object.d.ts.map +1 -0
- package/dist/capabilities/timeline-track-object.js +195 -0
- package/dist/capabilities/timeline-track-object.js.map +1 -0
- package/dist/capabilities/timelines.d.ts +190 -0
- package/dist/capabilities/timelines.d.ts.map +1 -0
- package/dist/capabilities/timelines.js +2326 -0
- package/dist/capabilities/timelines.js.map +1 -0
- package/dist/capabilities/timelines.specs.d.ts +134 -0
- package/dist/capabilities/timelines.specs.d.ts.map +1 -0
- package/dist/capabilities/timelines.specs.js +1362 -0
- package/dist/capabilities/timelines.specs.js.map +1 -0
- package/dist/capabilities/types.d.ts +197 -0
- package/dist/capabilities/types.d.ts.map +1 -0
- package/dist/capabilities/types.js +19 -0
- package/dist/capabilities/types.js.map +1 -0
- package/dist/capabilities/ui.d.ts +38 -0
- package/dist/capabilities/ui.d.ts.map +1 -0
- package/dist/capabilities/ui.js +128 -0
- package/dist/capabilities/ui.js.map +1 -0
- package/dist/capabilities/ui.specs.d.ts +22 -0
- package/dist/capabilities/ui.specs.d.ts.map +1 -0
- package/dist/capabilities/ui.specs.js +59 -0
- package/dist/capabilities/ui.specs.js.map +1 -0
- package/dist/capabilities/video-production-acceptance.d.ts +27 -0
- package/dist/capabilities/video-production-acceptance.d.ts.map +1 -0
- package/dist/capabilities/video-production-acceptance.js +41 -0
- package/dist/capabilities/video-production-acceptance.js.map +1 -0
- package/dist/capabilities/video-production.d.ts +179 -0
- package/dist/capabilities/video-production.d.ts.map +1 -0
- package/dist/capabilities/video-production.js +1492 -0
- package/dist/capabilities/video-production.js.map +1 -0
- package/dist/capabilities/video-production.specs.d.ts +13 -0
- package/dist/capabilities/video-production.specs.d.ts.map +1 -0
- package/dist/capabilities/video-production.specs.js +256 -0
- package/dist/capabilities/video-production.specs.js.map +1 -0
- package/dist/capabilities/web.d.ts +86 -0
- package/dist/capabilities/web.d.ts.map +1 -0
- package/dist/capabilities/web.js +850 -0
- package/dist/capabilities/web.js.map +1 -0
- package/dist/capabilities/web.specs.d.ts +33 -0
- package/dist/capabilities/web.specs.d.ts.map +1 -0
- package/dist/capabilities/web.specs.js +286 -0
- package/dist/capabilities/web.specs.js.map +1 -0
- package/dist/capabilities/workflows.d.ts +58 -0
- package/dist/capabilities/workflows.d.ts.map +1 -0
- package/dist/capabilities/workflows.js +1530 -0
- package/dist/capabilities/workflows.js.map +1 -0
- package/dist/capabilities/workflows.specs.d.ts +63 -0
- package/dist/capabilities/workflows.specs.d.ts.map +1 -0
- package/dist/capabilities/workflows.specs.js +852 -0
- package/dist/capabilities/workflows.specs.js.map +1 -0
- package/dist/code-gen/analyze.d.ts +26 -0
- package/dist/code-gen/analyze.d.ts.map +1 -0
- package/dist/code-gen/analyze.js +79 -0
- package/dist/code-gen/analyze.js.map +1 -0
- package/dist/code-gen/port-types.d.ts +58 -0
- package/dist/code-gen/port-types.d.ts.map +1 -0
- package/dist/code-gen/port-types.js +115 -0
- package/dist/code-gen/port-types.js.map +1 -0
- package/dist/code-gen/prompt.d.ts +37 -0
- package/dist/code-gen/prompt.d.ts.map +1 -0
- package/dist/code-gen/prompt.js +129 -0
- package/dist/code-gen/prompt.js.map +1 -0
- package/dist/code-gen/sandbox-manifest.d.ts +120 -0
- package/dist/code-gen/sandbox-manifest.d.ts.map +1 -0
- package/dist/code-gen/sandbox-manifest.js +1023 -0
- package/dist/code-gen/sandbox-manifest.js.map +1 -0
- package/dist/code-gen/sandbox-prompt.d.ts +26 -0
- package/dist/code-gen/sandbox-prompt.d.ts.map +1 -0
- package/dist/code-gen/sandbox-prompt.js +126 -0
- package/dist/code-gen/sandbox-prompt.js.map +1 -0
- package/dist/code-planner.d.ts +72 -0
- package/dist/code-planner.d.ts.map +1 -0
- package/dist/code-planner.js +271 -0
- package/dist/code-planner.js.map +1 -0
- package/dist/codeact/action-diagnostics.d.ts +35 -0
- package/dist/codeact/action-diagnostics.d.ts.map +1 -0
- package/dist/codeact/action-diagnostics.js +147 -0
- package/dist/codeact/action-diagnostics.js.map +1 -0
- package/dist/codeact/capability-modules.d.ts +66 -0
- package/dist/codeact/capability-modules.d.ts.map +1 -0
- package/dist/codeact/capability-modules.js +278 -0
- package/dist/codeact/capability-modules.js.map +1 -0
- package/dist/codeact/chat-codeact.d.ts +104 -0
- package/dist/codeact/chat-codeact.d.ts.map +1 -0
- package/dist/codeact/chat-codeact.js +424 -0
- package/dist/codeact/chat-codeact.js.map +1 -0
- package/dist/codeact/codeact-executor.d.ts +247 -0
- package/dist/codeact/codeact-executor.d.ts.map +1 -0
- package/dist/codeact/codeact-executor.js +1176 -0
- package/dist/codeact/codeact-executor.js.map +1 -0
- package/dist/codeact/compact-ids.d.ts +28 -0
- package/dist/codeact/compact-ids.d.ts.map +1 -0
- package/dist/codeact/compact-ids.js +77 -0
- package/dist/codeact/compact-ids.js.map +1 -0
- package/dist/codeact/execute-code-contract.d.ts +97 -0
- package/dist/codeact/execute-code-contract.d.ts.map +1 -0
- package/dist/codeact/execute-code-contract.js +225 -0
- package/dist/codeact/execute-code-contract.js.map +1 -0
- package/dist/codeact/fabric-package.d.ts +29 -0
- package/dist/codeact/fabric-package.d.ts.map +1 -0
- package/dist/codeact/fabric-package.js +62 -0
- package/dist/codeact/fabric-package.js.map +1 -0
- package/dist/codeact/flow-package.d.ts +31 -0
- package/dist/codeact/flow-package.d.ts.map +1 -0
- package/dist/codeact/flow-package.js +80 -0
- package/dist/codeact/flow-package.js.map +1 -0
- package/dist/codeact/graph-dsl-package.d.ts +42 -0
- package/dist/codeact/graph-dsl-package.d.ts.map +1 -0
- package/dist/codeact/graph-dsl-package.js +100 -0
- package/dist/codeact/graph-dsl-package.js.map +1 -0
- package/dist/codeact/graph-model.d.ts +30 -0
- package/dist/codeact/graph-model.d.ts.map +1 -0
- package/dist/codeact/graph-model.js +408 -0
- package/dist/codeact/graph-model.js.map +1 -0
- package/dist/codeact/mcp-guest-contract.d.ts +66 -0
- package/dist/codeact/mcp-guest-contract.d.ts.map +1 -0
- package/dist/codeact/mcp-guest-contract.js +108 -0
- package/dist/codeact/mcp-guest-contract.js.map +1 -0
- package/dist/codeact/nodetool-api.d.ts +60 -0
- package/dist/codeact/nodetool-api.d.ts.map +1 -0
- package/dist/codeact/nodetool-api.js +2056 -0
- package/dist/codeact/nodetool-api.js.map +1 -0
- package/dist/codeact/prompt.d.ts +88 -0
- package/dist/codeact/prompt.d.ts.map +1 -0
- package/dist/codeact/prompt.js +326 -0
- package/dist/codeact/prompt.js.map +1 -0
- package/dist/codeact/sandbox-package-docs.d.ts +48 -0
- package/dist/codeact/sandbox-package-docs.d.ts.map +1 -0
- package/dist/codeact/sandbox-package-docs.js +55 -0
- package/dist/codeact/sandbox-package-docs.js.map +1 -0
- package/dist/codeact/sandbox-package-listing.d.ts +81 -0
- package/dist/codeact/sandbox-package-listing.d.ts.map +1 -0
- package/dist/codeact/sandbox-package-listing.js +101 -0
- package/dist/codeact/sandbox-package-listing.js.map +1 -0
- package/dist/codeact/sandbox-packages.d.ts +72 -0
- package/dist/codeact/sandbox-packages.d.ts.map +1 -0
- package/dist/codeact/sandbox-packages.js +230 -0
- package/dist/codeact/sandbox-packages.js.map +1 -0
- package/dist/codeact/timeline-package.d.ts +5 -0
- package/dist/codeact/timeline-package.d.ts.map +1 -0
- package/dist/codeact/timeline-package.js +10 -0
- package/dist/codeact/timeline-package.js.map +1 -0
- package/dist/codeact/tool-api.d.ts +197 -0
- package/dist/codeact/tool-api.d.ts.map +1 -0
- package/dist/codeact/tool-api.js +445 -0
- package/dist/codeact/tool-api.js.map +1 -0
- package/dist/codeact/tools-prelude.d.ts +32 -0
- package/dist/codeact/tools-prelude.d.ts.map +1 -0
- package/dist/codeact/tools-prelude.js +65 -0
- package/dist/codeact/tools-prelude.js.map +1 -0
- package/dist/constants.d.ts +47 -2
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +64 -2
- package/dist/constants.js.map +1 -1
- package/dist/custom-animation-bake.d.ts +57 -0
- package/dist/custom-animation-bake.d.ts.map +1 -0
- package/dist/custom-animation-bake.js +88 -0
- package/dist/custom-animation-bake.js.map +1 -0
- package/dist/dynamic-slots.d.ts +72 -0
- package/dist/dynamic-slots.d.ts.map +1 -0
- package/dist/dynamic-slots.js +0 -0
- package/dist/dynamic-slots.js.map +1 -0
- package/dist/evals/app-build-cases.d.ts +35 -0
- package/dist/evals/app-build-cases.d.ts.map +1 -0
- package/dist/evals/app-build-cases.js +722 -0
- package/dist/evals/app-build-cases.js.map +1 -0
- package/dist/evals/app-build-eval.d.ts +208 -0
- package/dist/evals/app-build-eval.d.ts.map +1 -0
- package/dist/evals/app-build-eval.js +518 -0
- package/dist/evals/app-build-eval.js.map +1 -0
- package/dist/evals/app-build-plan.d.ts +76 -0
- package/dist/evals/app-build-plan.d.ts.map +1 -0
- package/dist/evals/app-build-plan.js +140 -0
- package/dist/evals/app-build-plan.js.map +1 -0
- package/dist/evals/code-gen-cases.d.ts +13 -0
- package/dist/evals/code-gen-cases.d.ts.map +1 -0
- package/dist/evals/code-gen-cases.js +124 -0
- package/dist/evals/code-gen-cases.js.map +1 -0
- package/dist/evals/code-gen-eval.d.ts +109 -0
- package/dist/evals/code-gen-eval.d.ts.map +1 -0
- package/dist/evals/code-gen-eval.js +299 -0
- package/dist/evals/code-gen-eval.js.map +1 -0
- package/dist/evals/codeact-api-cases.d.ts +14 -0
- package/dist/evals/codeact-api-cases.d.ts.map +1 -0
- package/dist/evals/codeact-api-cases.js +29 -0
- package/dist/evals/codeact-api-cases.js.map +1 -0
- package/dist/evals/codeact-api-core.d.ts +23 -0
- package/dist/evals/codeact-api-core.d.ts.map +1 -0
- package/dist/evals/codeact-api-core.js +1411 -0
- package/dist/evals/codeact-api-core.js.map +1 -0
- package/dist/evals/codeact-api-surfaces.d.ts +25 -0
- package/dist/evals/codeact-api-surfaces.d.ts.map +1 -0
- package/dist/evals/codeact-api-surfaces.js +2191 -0
- package/dist/evals/codeact-api-surfaces.js.map +1 -0
- package/dist/evals/codeact-cases.d.ts +76 -0
- package/dist/evals/codeact-cases.d.ts.map +1 -0
- package/dist/evals/codeact-cases.js +151 -0
- package/dist/evals/codeact-cases.js.map +1 -0
- package/dist/evals/codeact-eval.d.ts +66 -0
- package/dist/evals/codeact-eval.d.ts.map +1 -0
- package/dist/evals/codeact-eval.js +250 -0
- package/dist/evals/codeact-eval.js.map +1 -0
- package/dist/evals/codeact-sandbox-pack-cases.d.ts +31 -0
- package/dist/evals/codeact-sandbox-pack-cases.d.ts.map +1 -0
- package/dist/evals/codeact-sandbox-pack-cases.js +219 -0
- package/dist/evals/codeact-sandbox-pack-cases.js.map +1 -0
- package/dist/evals/escalation-cases.d.ts +22 -0
- package/dist/evals/escalation-cases.d.ts.map +1 -0
- package/dist/evals/escalation-cases.js +343 -0
- package/dist/evals/escalation-cases.js.map +1 -0
- package/dist/evals/escalation.d.ts +92 -0
- package/dist/evals/escalation.d.ts.map +1 -0
- package/dist/evals/escalation.js +152 -0
- package/dist/evals/escalation.js.map +1 -0
- package/dist/evals/goal-judge.d.ts +51 -0
- package/dist/evals/goal-judge.d.ts.map +1 -0
- package/dist/evals/goal-judge.js +152 -0
- package/dist/evals/goal-judge.js.map +1 -0
- package/dist/evals/graph-e2e-cases.d.ts +21 -0
- package/dist/evals/graph-e2e-cases.d.ts.map +1 -0
- package/dist/evals/graph-e2e-cases.js +262 -0
- package/dist/evals/graph-e2e-cases.js.map +1 -0
- package/dist/evals/graph-e2e-eval.d.ts +202 -0
- package/dist/evals/graph-e2e-eval.d.ts.map +1 -0
- package/dist/evals/graph-e2e-eval.js +438 -0
- package/dist/evals/graph-e2e-eval.js.map +1 -0
- package/dist/evals/graph-planner-cases.d.ts +12 -0
- package/dist/evals/graph-planner-cases.d.ts.map +1 -0
- package/dist/evals/graph-planner-cases.js +256 -0
- package/dist/evals/graph-planner-cases.js.map +1 -0
- package/dist/evals/graph-planner-eval.d.ts +178 -0
- package/dist/evals/graph-planner-eval.d.ts.map +1 -0
- package/dist/evals/graph-planner-eval.js +495 -0
- package/dist/evals/graph-planner-eval.js.map +1 -0
- package/dist/evals/planner-tools.d.ts +21 -0
- package/dist/evals/planner-tools.d.ts.map +1 -0
- package/dist/evals/planner-tools.js +66 -0
- package/dist/evals/planner-tools.js.map +1 -0
- package/dist/evals/subtask-cases.d.ts +88 -0
- package/dist/evals/subtask-cases.d.ts.map +1 -0
- package/dist/evals/subtask-cases.js +322 -0
- package/dist/evals/subtask-cases.js.map +1 -0
- package/dist/evals/subtask-eval.d.ts +129 -0
- package/dist/evals/subtask-eval.d.ts.map +1 -0
- package/dist/evals/subtask-eval.js +397 -0
- package/dist/evals/subtask-eval.js.map +1 -0
- package/dist/evals/surfaces/app.d.ts +19 -0
- package/dist/evals/surfaces/app.d.ts.map +1 -0
- package/dist/evals/surfaces/app.js +341 -0
- package/dist/evals/surfaces/app.js.map +1 -0
- package/dist/evals/surfaces/creative-pipeline.d.ts +203 -0
- package/dist/evals/surfaces/creative-pipeline.d.ts.map +1 -0
- package/dist/evals/surfaces/creative-pipeline.js +909 -0
- package/dist/evals/surfaces/creative-pipeline.js.map +1 -0
- package/dist/evals/surfaces/game.d.ts +5 -0
- package/dist/evals/surfaces/game.d.ts.map +1 -0
- package/dist/evals/surfaces/game.js +42 -0
- package/dist/evals/surfaces/game.js.map +1 -0
- package/dist/evals/surfaces/js-script.d.ts +66 -0
- package/dist/evals/surfaces/js-script.d.ts.map +1 -0
- package/dist/evals/surfaces/js-script.js +407 -0
- package/dist/evals/surfaces/js-script.js.map +1 -0
- package/dist/evals/surfaces/memory.d.ts +34 -0
- package/dist/evals/surfaces/memory.d.ts.map +1 -0
- package/dist/evals/surfaces/memory.js +264 -0
- package/dist/evals/surfaces/memory.js.map +1 -0
- package/dist/evals/surfaces/model3d.d.ts +45 -0
- package/dist/evals/surfaces/model3d.d.ts.map +1 -0
- package/dist/evals/surfaces/model3d.js +346 -0
- package/dist/evals/surfaces/model3d.js.map +1 -0
- package/dist/evals/surfaces/script.d.ts +96 -0
- package/dist/evals/surfaces/script.d.ts.map +1 -0
- package/dist/evals/surfaces/script.js +709 -0
- package/dist/evals/surfaces/script.js.map +1 -0
- package/dist/evals/surfaces/sketch.d.ts +124 -0
- package/dist/evals/surfaces/sketch.d.ts.map +1 -0
- package/dist/evals/surfaces/sketch.js +1298 -0
- package/dist/evals/surfaces/sketch.js.map +1 -0
- package/dist/evals/surfaces/storyboard.d.ts +97 -0
- package/dist/evals/surfaces/storyboard.d.ts.map +1 -0
- package/dist/evals/surfaces/storyboard.js +693 -0
- package/dist/evals/surfaces/storyboard.js.map +1 -0
- package/dist/evals/surfaces/timeline.d.ts +416 -0
- package/dist/evals/surfaces/timeline.d.ts.map +1 -0
- package/dist/evals/surfaces/timeline.js +3267 -0
- package/dist/evals/surfaces/timeline.js.map +1 -0
- package/dist/evals/task-planner-cases.d.ts +57 -0
- package/dist/evals/task-planner-cases.d.ts.map +1 -0
- package/dist/evals/task-planner-cases.js +117 -0
- package/dist/evals/task-planner-cases.js.map +1 -0
- package/dist/evals/task-planner-eval.d.ts +101 -0
- package/dist/evals/task-planner-eval.d.ts.map +1 -0
- package/dist/evals/task-planner-eval.js +380 -0
- package/dist/evals/task-planner-eval.js.map +1 -0
- package/dist/evals/tool-loop-bridge.d.ts +57 -0
- package/dist/evals/tool-loop-bridge.d.ts.map +1 -0
- package/dist/evals/tool-loop-bridge.js +129 -0
- package/dist/evals/tool-loop-bridge.js.map +1 -0
- package/dist/evals/tool-loop-cases.d.ts +21 -0
- package/dist/evals/tool-loop-cases.d.ts.map +1 -0
- package/dist/evals/tool-loop-cases.js +401 -0
- package/dist/evals/tool-loop-cases.js.map +1 -0
- package/dist/evals/tool-loop-eval.d.ts +234 -0
- package/dist/evals/tool-loop-eval.d.ts.map +1 -0
- package/dist/evals/tool-loop-eval.js +373 -0
- package/dist/evals/tool-loop-eval.js.map +1 -0
- package/dist/evals/tool-loop-permission.d.ts +43 -0
- package/dist/evals/tool-loop-permission.d.ts.map +1 -0
- package/dist/evals/tool-loop-permission.js +76 -0
- package/dist/evals/tool-loop-permission.js.map +1 -0
- package/dist/game-examples.d.ts +447 -0
- package/dist/game-examples.d.ts.map +1 -0
- package/dist/game-examples.js +187 -0
- package/dist/game-examples.js.map +1 -0
- package/dist/graph-builder.d.ts +55 -3
- package/dist/graph-builder.d.ts.map +1 -1
- package/dist/graph-builder.js +159 -4
- package/dist/graph-builder.js.map +1 -1
- package/dist/graph-dsl-core.d.ts +25 -0
- package/dist/graph-dsl-core.d.ts.map +1 -0
- package/dist/graph-dsl-core.js +312 -0
- package/dist/graph-dsl-core.js.map +1 -0
- package/dist/graph-dsl.d.ts +30 -0
- package/dist/graph-dsl.d.ts.map +1 -0
- package/dist/graph-dsl.js +116 -0
- package/dist/graph-dsl.js.map +1 -0
- package/dist/host-binaries.d.ts +6 -0
- package/dist/host-binaries.d.ts.map +1 -0
- package/dist/host-binaries.js +6 -0
- package/dist/host-binaries.js.map +1 -0
- package/dist/host-binary-guard.d.ts +100 -0
- package/dist/host-binary-guard.d.ts.map +1 -0
- package/dist/host-binary-guard.js +205 -0
- package/dist/host-binary-guard.js.map +1 -0
- package/dist/host-modules/aws.d.ts +57 -0
- package/dist/host-modules/aws.d.ts.map +1 -0
- package/dist/host-modules/aws.js +309 -0
- package/dist/host-modules/aws.js.map +1 -0
- package/dist/host-modules/chrono.d.ts +15 -0
- package/dist/host-modules/chrono.d.ts.map +1 -0
- package/dist/host-modules/chrono.js +35 -0
- package/dist/host-modules/chrono.js.map +1 -0
- package/dist/host-modules/csv.d.ts +17 -0
- package/dist/host-modules/csv.d.ts.map +1 -0
- package/dist/host-modules/csv.js +64 -0
- package/dist/host-modules/csv.js.map +1 -0
- package/dist/host-modules/diff.d.ts +9 -0
- package/dist/host-modules/diff.d.ts.map +1 -0
- package/dist/host-modules/diff.js +26 -0
- package/dist/host-modules/diff.js.map +1 -0
- package/dist/host-modules/dispatcher.d.ts +41 -0
- package/dist/host-modules/dispatcher.d.ts.map +1 -0
- package/dist/host-modules/dispatcher.js +99 -0
- package/dist/host-modules/dispatcher.js.map +1 -0
- package/dist/host-modules/docx.d.ts +19 -0
- package/dist/host-modules/docx.d.ts.map +1 -0
- package/dist/host-modules/docx.js +120 -0
- package/dist/host-modules/docx.js.map +1 -0
- package/dist/host-modules/epub.d.ts +48 -0
- package/dist/host-modules/epub.d.ts.map +1 -0
- package/dist/host-modules/epub.js +100 -0
- package/dist/host-modules/epub.js.map +1 -0
- package/dist/host-modules/exif.d.ts +8 -0
- package/dist/host-modules/exif.d.ts.map +1 -0
- package/dist/host-modules/exif.js +19 -0
- package/dist/host-modules/exif.js.map +1 -0
- package/dist/host-modules/expr.d.ts +16 -0
- package/dist/host-modules/expr.d.ts.map +1 -0
- package/dist/host-modules/expr.js +18 -0
- package/dist/host-modules/expr.js.map +1 -0
- package/dist/host-modules/fabric.d.ts +46 -0
- package/dist/host-modules/fabric.d.ts.map +1 -0
- package/dist/host-modules/fabric.js +178 -0
- package/dist/host-modules/fabric.js.map +1 -0
- package/dist/host-modules/html.d.ts +51 -0
- package/dist/host-modules/html.d.ts.map +1 -0
- package/dist/host-modules/html.js +198 -0
- package/dist/host-modules/html.js.map +1 -0
- package/dist/host-modules/ics.d.ts +9 -0
- package/dist/host-modules/ics.d.ts.map +1 -0
- package/dist/host-modules/ics.js +35 -0
- package/dist/host-modules/ics.js.map +1 -0
- package/dist/host-modules/limits.d.ts +41 -0
- package/dist/host-modules/limits.d.ts.map +1 -0
- package/dist/host-modules/limits.js +76 -0
- package/dist/host-modules/limits.js.map +1 -0
- package/dist/host-modules/mammoth.d.ts +11 -0
- package/dist/host-modules/mammoth.d.ts.map +1 -0
- package/dist/host-modules/mammoth.js +29 -0
- package/dist/host-modules/mammoth.js.map +1 -0
- package/dist/host-modules/notion.d.ts +45 -0
- package/dist/host-modules/notion.d.ts.map +1 -0
- package/dist/host-modules/notion.js +128 -0
- package/dist/host-modules/notion.js.map +1 -0
- package/dist/host-modules/ocr.d.ts +25 -0
- package/dist/host-modules/ocr.d.ts.map +1 -0
- package/dist/host-modules/ocr.js +74 -0
- package/dist/host-modules/ocr.js.map +1 -0
- package/dist/host-modules/pdf.d.ts +21 -0
- package/dist/host-modules/pdf.d.ts.map +1 -0
- package/dist/host-modules/pdf.js +53 -0
- package/dist/host-modules/pdf.js.map +1 -0
- package/dist/host-modules/pdflib.d.ts +17 -0
- package/dist/host-modules/pdflib.d.ts.map +1 -0
- package/dist/host-modules/pdflib.js +138 -0
- package/dist/host-modules/pdflib.js.map +1 -0
- package/dist/host-modules/pptx.d.ts +19 -0
- package/dist/host-modules/pptx.d.ts.map +1 -0
- package/dist/host-modules/pptx.js +67 -0
- package/dist/host-modules/pptx.js.map +1 -0
- package/dist/host-modules/pptxgen.d.ts +13 -0
- package/dist/host-modules/pptxgen.d.ts.map +1 -0
- package/dist/host-modules/pptxgen.js +98 -0
- package/dist/host-modules/pptxgen.js.map +1 -0
- package/dist/host-modules/prepared-request.d.ts +41 -0
- package/dist/host-modules/prepared-request.d.ts.map +1 -0
- package/dist/host-modules/prepared-request.js +104 -0
- package/dist/host-modules/prepared-request.js.map +1 -0
- package/dist/host-modules/registry.d.ts +31 -0
- package/dist/host-modules/registry.d.ts.map +1 -0
- package/dist/host-modules/registry.js +193 -0
- package/dist/host-modules/registry.js.map +1 -0
- package/dist/host-modules/subtitle.d.ts +15 -0
- package/dist/host-modules/subtitle.d.ts.map +1 -0
- package/dist/host-modules/subtitle.js +45 -0
- package/dist/host-modules/subtitle.js.map +1 -0
- package/dist/host-modules/supabase.d.ts +42 -0
- package/dist/host-modules/supabase.d.ts.map +1 -0
- package/dist/host-modules/supabase.js +141 -0
- package/dist/host-modules/supabase.js.map +1 -0
- package/dist/host-modules/tfjs.d.ts +42 -0
- package/dist/host-modules/tfjs.d.ts.map +1 -0
- package/dist/host-modules/tfjs.js +186 -0
- package/dist/host-modules/tfjs.js.map +1 -0
- package/dist/host-modules/tokens.d.ts +17 -0
- package/dist/host-modules/tokens.d.ts.map +1 -0
- package/dist/host-modules/tokens.js +74 -0
- package/dist/host-modules/tokens.js.map +1 -0
- package/dist/host-modules/twilio.d.ts +34 -0
- package/dist/host-modules/twilio.d.ts.map +1 -0
- package/dist/host-modules/twilio.js +67 -0
- package/dist/host-modules/twilio.js.map +1 -0
- package/dist/host-modules/xlsx.d.ts +26 -0
- package/dist/host-modules/xlsx.d.ts.map +1 -0
- package/dist/host-modules/xlsx.js +323 -0
- package/dist/host-modules/xlsx.js.map +1 -0
- package/dist/host-modules/xml.d.ts +23 -0
- package/dist/host-modules/xml.d.ts.map +1 -0
- package/dist/host-modules/xml.js +38 -0
- package/dist/host-modules/xml.js.map +1 -0
- package/dist/host-modules/zip.d.ts +24 -0
- package/dist/host-modules/zip.d.ts.map +1 -0
- package/dist/host-modules/zip.js +70 -0
- package/dist/host-modules/zip.js.map +1 -0
- package/dist/index.d.ts +197 -60
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +153 -60
- package/dist/index.js.map +1 -1
- package/dist/js-sandbox-worker/host.d.ts +136 -0
- package/dist/js-sandbox-worker/host.d.ts.map +1 -0
- package/dist/js-sandbox-worker/host.js +482 -0
- package/dist/js-sandbox-worker/host.js.map +1 -0
- package/dist/js-sandbox-worker/interpreter.d.ts +276 -0
- package/dist/js-sandbox-worker/interpreter.d.ts.map +1 -0
- package/dist/js-sandbox-worker/interpreter.js +1201 -0
- package/dist/js-sandbox-worker/interpreter.js.map +1 -0
- package/dist/js-sandbox-worker/protocol.d.ts +168 -0
- package/dist/js-sandbox-worker/protocol.d.ts.map +1 -0
- package/dist/js-sandbox-worker/protocol.js +217 -0
- package/dist/js-sandbox-worker/protocol.js.map +1 -0
- package/dist/js-sandbox-worker/worker-entry.d.ts +26 -0
- package/dist/js-sandbox-worker/worker-entry.d.ts.map +1 -0
- package/dist/js-sandbox-worker/worker-entry.js +307 -0
- package/dist/js-sandbox-worker/worker-entry.js.map +1 -0
- package/dist/js-sandbox.d.ts +455 -15
- package/dist/js-sandbox.d.ts.map +1 -1
- package/dist/js-sandbox.js +1961 -309
- package/dist/js-sandbox.js.map +1 -1
- package/dist/js-script-app-runner.d.ts +9 -0
- package/dist/js-script-app-runner.d.ts.map +1 -0
- package/dist/js-script-app-runner.js +49 -0
- package/dist/js-script-app-runner.js.map +1 -0
- package/dist/js-script-sandbox.d.ts +33 -0
- package/dist/js-script-sandbox.d.ts.map +1 -0
- package/dist/js-script-sandbox.js +82 -0
- package/dist/js-script-sandbox.js.map +1 -0
- package/dist/jtbd/friction.d.ts +26 -0
- package/dist/jtbd/friction.d.ts.map +1 -0
- package/dist/jtbd/friction.js +169 -0
- package/dist/jtbd/friction.js.map +1 -0
- package/dist/jtbd/index.d.ts +6 -0
- package/dist/jtbd/index.d.ts.map +1 -0
- package/dist/jtbd/index.js +6 -0
- package/dist/jtbd/index.js.map +1 -0
- package/dist/jtbd/optimize.d.ts +71 -0
- package/dist/jtbd/optimize.d.ts.map +1 -0
- package/dist/jtbd/optimize.js +176 -0
- package/dist/jtbd/optimize.js.map +1 -0
- package/dist/jtbd/registry.d.ts +29 -0
- package/dist/jtbd/registry.d.ts.map +1 -0
- package/dist/jtbd/registry.js +451 -0
- package/dist/jtbd/registry.js.map +1 -0
- package/dist/jtbd/run.d.ts +70 -0
- package/dist/jtbd/run.d.ts.map +1 -0
- package/dist/jtbd/run.js +177 -0
- package/dist/jtbd/run.js.map +1 -0
- package/dist/jtbd/types.d.ts +141 -0
- package/dist/jtbd/types.d.ts.map +1 -0
- package/dist/jtbd/types.js +25 -0
- package/dist/jtbd/types.js.map +1 -0
- package/dist/model-prompting-skills.d.ts +45 -0
- package/dist/model-prompting-skills.d.ts.map +1 -0
- package/dist/model-prompting-skills.js +116 -0
- package/dist/model-prompting-skills.js.map +1 -0
- package/dist/network-guard.d.ts +50 -0
- package/dist/network-guard.d.ts.map +1 -0
- package/dist/network-guard.js +106 -0
- package/dist/network-guard.js.map +1 -0
- package/dist/normalize-model-properties.d.ts +26 -0
- package/dist/normalize-model-properties.d.ts.map +1 -0
- package/dist/normalize-model-properties.js +58 -0
- package/dist/normalize-model-properties.js.map +1 -0
- package/dist/output-format.d.ts +5 -1
- package/dist/output-format.d.ts.map +1 -1
- package/dist/output-format.js.map +1 -1
- package/dist/parallel-task-executor.d.ts +68 -37
- package/dist/parallel-task-executor.d.ts.map +1 -1
- package/dist/parallel-task-executor.js +234 -203
- package/dist/parallel-task-executor.js.map +1 -1
- package/dist/prompts/background-subtask-prompt.d.ts +14 -0
- package/dist/prompts/background-subtask-prompt.d.ts.map +1 -0
- package/dist/prompts/background-subtask-prompt.js +64 -0
- package/dist/prompts/background-subtask-prompt.js.map +1 -0
- package/dist/prompts/product-knowledge.d.ts +3 -0
- package/dist/prompts/product-knowledge.d.ts.map +1 -0
- package/dist/prompts/product-knowledge.js +79 -0
- package/dist/prompts/product-knowledge.js.map +1 -0
- package/dist/prompts/read-only-search-prompt.d.ts +33 -0
- package/dist/prompts/read-only-search-prompt.d.ts.map +1 -0
- package/dist/prompts/read-only-search-prompt.js +109 -0
- package/dist/prompts/read-only-search-prompt.js.map +1 -0
- package/dist/prompts/sandbox-pack-catalog.d.ts +23 -0
- package/dist/prompts/sandbox-pack-catalog.d.ts.map +1 -0
- package/dist/prompts/sandbox-pack-catalog.js +40 -0
- package/dist/prompts/sandbox-pack-catalog.js.map +1 -0
- package/dist/prompts/security-monitor-prompt.d.ts +32 -0
- package/dist/prompts/security-monitor-prompt.d.ts.map +1 -0
- package/dist/prompts/security-monitor-prompt.js +99 -0
- package/dist/prompts/security-monitor-prompt.js.map +1 -0
- package/dist/prompts/workflow-authoring-knowledge.d.ts +77 -0
- package/dist/prompts/workflow-authoring-knowledge.d.ts.map +1 -0
- package/dist/prompts/workflow-authoring-knowledge.js +319 -0
- package/dist/prompts/workflow-authoring-knowledge.js.map +1 -0
- package/dist/run-policy.d.ts +25 -0
- package/dist/run-policy.d.ts.map +1 -0
- package/dist/run-policy.js +54 -0
- package/dist/run-policy.js.map +1 -0
- package/dist/sandbox-av-media.d.ts +33 -0
- package/dist/sandbox-av-media.d.ts.map +1 -0
- package/dist/sandbox-av-media.js +666 -0
- package/dist/sandbox-av-media.js.map +1 -0
- package/dist/sandbox-bootstrap-modules.d.ts +54 -0
- package/dist/sandbox-bootstrap-modules.d.ts.map +1 -0
- package/dist/sandbox-bootstrap-modules.js +104 -0
- package/dist/sandbox-bootstrap-modules.js.map +1 -0
- package/dist/sandbox-bytes.d.ts +43 -0
- package/dist/sandbox-bytes.d.ts.map +1 -0
- package/dist/sandbox-bytes.js +61 -0
- package/dist/sandbox-bytes.js.map +1 -0
- package/dist/sandbox-canvas-api.d.ts +30 -0
- package/dist/sandbox-canvas-api.d.ts.map +1 -0
- package/dist/sandbox-canvas-api.js +81 -0
- package/dist/sandbox-canvas-api.js.map +1 -0
- package/dist/sandbox-constants.d.ts +5 -0
- package/dist/sandbox-constants.d.ts.map +1 -0
- package/dist/sandbox-constants.js +13 -0
- package/dist/sandbox-constants.js.map +1 -0
- package/dist/sandbox-json-transport.d.ts +107 -0
- package/dist/sandbox-json-transport.d.ts.map +1 -0
- package/dist/sandbox-json-transport.js +324 -0
- package/dist/sandbox-json-transport.js.map +1 -0
- package/dist/sandbox-media-handle.d.ts +78 -0
- package/dist/sandbox-media-handle.d.ts.map +1 -0
- package/dist/sandbox-media-handle.js +114 -0
- package/dist/sandbox-media-handle.js.map +1 -0
- package/dist/sandbox-media-ref.d.ts +134 -0
- package/dist/sandbox-media-ref.d.ts.map +1 -0
- package/dist/sandbox-media-ref.js +442 -0
- package/dist/sandbox-media-ref.js.map +1 -0
- package/dist/sandbox-media.d.ts +177 -0
- package/dist/sandbox-media.d.ts.map +1 -0
- package/dist/sandbox-media.js +963 -0
- package/dist/sandbox-media.js.map +1 -0
- package/dist/sandbox-module-fixtures.d.ts +445 -0
- package/dist/sandbox-module-fixtures.d.ts.map +1 -0
- package/dist/sandbox-module-fixtures.js +214 -0
- package/dist/sandbox-module-fixtures.js.map +1 -0
- package/dist/sandbox-toolbelt.d.ts +13 -0
- package/dist/sandbox-toolbelt.d.ts.map +1 -0
- package/dist/sandbox-toolbelt.js +64 -0
- package/dist/sandbox-toolbelt.js.map +1 -0
- package/dist/security-monitor.d.ts +89 -0
- package/dist/security-monitor.d.ts.map +1 -0
- package/dist/security-monitor.js +307 -0
- package/dist/security-monitor.js.map +1 -0
- package/dist/serpapi/catalog.d.ts +101 -0
- package/dist/serpapi/catalog.d.ts.map +1 -0
- package/dist/serpapi/catalog.js +246 -0
- package/dist/serpapi/catalog.js.map +1 -0
- package/dist/serpapi/client.d.ts +81 -0
- package/dist/serpapi/client.d.ts.map +1 -0
- package/dist/serpapi/client.js +228 -0
- package/dist/serpapi/client.js.map +1 -0
- package/dist/serpapi/errors.d.ts +49 -0
- package/dist/serpapi/errors.d.ts.map +1 -0
- package/dist/serpapi/errors.js +64 -0
- package/dist/serpapi/errors.js.map +1 -0
- package/dist/serpapi/normalize.d.ts +58 -0
- package/dist/serpapi/normalize.d.ts.map +1 -0
- package/dist/serpapi/normalize.js +140 -0
- package/dist/serpapi/normalize.js.map +1 -0
- package/dist/skill-prompt.d.ts +27 -0
- package/dist/skill-prompt.d.ts.map +1 -0
- package/dist/skill-prompt.js +61 -0
- package/dist/skill-prompt.js.map +1 -0
- package/dist/step-executor.d.ts +90 -77
- package/dist/step-executor.d.ts.map +1 -1
- package/dist/step-executor.js +384 -690
- package/dist/step-executor.js.map +1 -1
- package/dist/subagent.d.ts +275 -0
- package/dist/subagent.d.ts.map +1 -0
- package/dist/subagent.js +444 -0
- package/dist/subagent.js.map +1 -0
- package/dist/supervisor/prompt.d.ts +12 -0
- package/dist/supervisor/prompt.d.ts.map +1 -0
- package/dist/supervisor/prompt.js +51 -0
- package/dist/supervisor/prompt.js.map +1 -0
- package/dist/supervisor/supervisor-agent.d.ts +72 -0
- package/dist/supervisor/supervisor-agent.d.ts.map +1 -0
- package/dist/supervisor/supervisor-agent.js +185 -0
- package/dist/supervisor/supervisor-agent.js.map +1 -0
- package/dist/supervisor/tools.d.ts +56 -0
- package/dist/supervisor/tools.d.ts.map +1 -0
- package/dist/supervisor/tools.js +83 -0
- package/dist/supervisor/tools.js.map +1 -0
- package/dist/supervisor/verdict-schema.d.ts +18 -0
- package/dist/supervisor/verdict-schema.d.ts.map +1 -0
- package/dist/supervisor/verdict-schema.js +58 -0
- package/dist/supervisor/verdict-schema.js.map +1 -0
- package/dist/system-skills.d.ts +68 -0
- package/dist/system-skills.d.ts.map +1 -0
- package/dist/system-skills.js +168 -0
- package/dist/system-skills.js.map +1 -0
- package/dist/task-executor.d.ts +90 -40
- package/dist/task-executor.d.ts.map +1 -1
- package/dist/task-executor.js +259 -282
- package/dist/task-executor.js.map +1 -1
- package/dist/task-planner.d.ts +18 -12
- package/dist/task-planner.d.ts.map +1 -1
- package/dist/task-planner.js +342 -328
- package/dist/task-planner.js.map +1 -1
- package/dist/timeline-preview/compare.d.ts +27 -0
- package/dist/timeline-preview/compare.d.ts.map +1 -0
- package/dist/timeline-preview/compare.js +71 -0
- package/dist/timeline-preview/compare.js.map +1 -0
- package/dist/timeline-preview/frames.d.ts +167 -0
- package/dist/timeline-preview/frames.d.ts.map +1 -0
- package/dist/timeline-preview/frames.js +646 -0
- package/dist/timeline-preview/frames.js.map +1 -0
- package/dist/timeline-preview/model3d.d.ts +67 -0
- package/dist/timeline-preview/model3d.d.ts.map +1 -0
- package/dist/timeline-preview/model3d.js +165 -0
- package/dist/timeline-preview/model3d.js.map +1 -0
- package/dist/timeline-preview/rasterize.d.ts +33 -0
- package/dist/timeline-preview/rasterize.d.ts.map +1 -0
- package/dist/timeline-preview/rasterize.js +83 -0
- package/dist/timeline-preview/rasterize.js.map +1 -0
- package/dist/timeline-preview/sheet.d.ts +38 -0
- package/dist/timeline-preview/sheet.d.ts.map +1 -0
- package/dist/timeline-preview/sheet.js +72 -0
- package/dist/timeline-preview/sheet.js.map +1 -0
- package/dist/tools/asset-persist.d.ts +29 -0
- package/dist/tools/asset-persist.d.ts.map +1 -0
- package/dist/tools/asset-persist.js +78 -0
- package/dist/tools/asset-persist.js.map +1 -0
- package/dist/tools/base-tool.d.ts +52 -5
- package/dist/tools/base-tool.d.ts.map +1 -1
- package/dist/tools/base-tool.js +180 -3
- package/dist/tools/base-tool.js.map +1 -1
- package/dist/tools/binary-output.d.ts +54 -0
- package/dist/tools/binary-output.d.ts.map +1 -0
- package/dist/tools/binary-output.js +127 -0
- package/dist/tools/binary-output.js.map +1 -0
- package/dist/tools/browser-tools.d.ts +5 -29
- package/dist/tools/browser-tools.d.ts.map +1 -1
- package/dist/tools/browser-tools.js +5 -205
- package/dist/tools/browser-tools.js.map +1 -1
- package/dist/tools/builtin-tools.d.ts +52 -0
- package/dist/tools/builtin-tools.d.ts.map +1 -0
- package/dist/tools/builtin-tools.js +276 -0
- package/dist/tools/builtin-tools.js.map +1 -0
- package/dist/tools/control-tool.d.ts +2 -5
- package/dist/tools/control-tool.d.ts.map +1 -1
- package/dist/tools/control-tool.js +18 -15
- package/dist/tools/control-tool.js.map +1 -1
- package/dist/tools/dataseo-tools.d.ts +34 -32
- package/dist/tools/dataseo-tools.d.ts.map +1 -1
- package/dist/tools/dataseo-tools.js +148 -233
- package/dist/tools/dataseo-tools.js.map +1 -1
- package/dist/tools/external-capability-tools.d.ts +36 -0
- package/dist/tools/external-capability-tools.d.ts.map +1 -0
- package/dist/tools/external-capability-tools.js +41 -0
- package/dist/tools/external-capability-tools.js.map +1 -0
- package/dist/tools/external-mcp-tools.d.ts +139 -0
- package/dist/tools/external-mcp-tools.d.ts.map +1 -0
- package/dist/tools/external-mcp-tools.js +552 -0
- package/dist/tools/external-mcp-tools.js.map +1 -0
- package/dist/tools/finish-step-tool.d.ts +1 -1
- package/dist/tools/finish-step-tool.d.ts.map +1 -1
- package/dist/tools/finish-step-tool.js +3 -3
- package/dist/tools/finish-step-tool.js.map +1 -1
- package/dist/tools/google-tools.d.ts +28 -39
- package/dist/tools/google-tools.d.ts.map +1 -1
- package/dist/tools/google-tools.js +51 -164
- package/dist/tools/google-tools.js.map +1 -1
- package/dist/tools/google-workspace-tools.d.ts +23 -0
- package/dist/tools/google-workspace-tools.d.ts.map +1 -0
- package/dist/tools/google-workspace-tools.js +26 -0
- package/dist/tools/google-workspace-tools.js.map +1 -0
- package/dist/tools/graph-validation-registry.d.ts +33 -0
- package/dist/tools/graph-validation-registry.d.ts.map +1 -0
- package/dist/tools/graph-validation-registry.js +54 -0
- package/dist/tools/graph-validation-registry.js.map +1 -0
- package/dist/tools/http-tools.d.ts +5 -53
- package/dist/tools/http-tools.d.ts.map +1 -1
- package/dist/tools/http-tools.js +5 -177
- package/dist/tools/http-tools.js.map +1 -1
- package/dist/tools/image-injection.d.ts +51 -0
- package/dist/tools/image-injection.d.ts.map +1 -0
- package/dist/tools/image-injection.js +85 -0
- package/dist/tools/image-injection.js.map +1 -0
- package/dist/tools/mcp-tool-support.d.ts +203 -0
- package/dist/tools/mcp-tool-support.d.ts.map +1 -0
- package/dist/tools/mcp-tool-support.js +536 -0
- package/dist/tools/mcp-tool-support.js.map +1 -0
- package/dist/tools/mcp-tools.d.ts +104 -390
- package/dist/tools/mcp-tools.d.ts.map +1 -1
- package/dist/tools/mcp-tools.js +128 -600
- package/dist/tools/mcp-tools.js.map +1 -1
- package/dist/tools/media-tools.d.ts +9 -272
- package/dist/tools/media-tools.d.ts.map +1 -1
- package/dist/tools/media-tools.js +11 -676
- package/dist/tools/media-tools.js.map +1 -1
- package/dist/tools/memory-tools.d.ts +36 -0
- package/dist/tools/memory-tools.d.ts.map +1 -0
- package/dist/tools/memory-tools.js +52 -0
- package/dist/tools/memory-tools.js.map +1 -0
- package/dist/tools/openai-tools.d.ts +28 -68
- package/dist/tools/openai-tools.d.ts.map +1 -1
- package/dist/tools/openai-tools.js +51 -181
- package/dist/tools/openai-tools.js.map +1 -1
- package/dist/tools/plan-builder-tools.d.ts +141 -7
- package/dist/tools/plan-builder-tools.d.ts.map +1 -1
- package/dist/tools/plan-builder-tools.js +159 -86
- package/dist/tools/plan-builder-tools.js.map +1 -1
- package/dist/tools/run-search-tool.d.ts +82 -0
- package/dist/tools/run-search-tool.d.ts.map +1 -0
- package/dist/tools/run-search-tool.js +121 -0
- package/dist/tools/run-search-tool.js.map +1 -0
- package/dist/tools/run-subtask-tool.d.ts +49 -0
- package/dist/tools/run-subtask-tool.d.ts.map +1 -0
- package/dist/tools/run-subtask-tool.js +88 -0
- package/dist/tools/run-subtask-tool.js.map +1 -0
- package/dist/tools/search-tools.d.ts +5 -36
- package/dist/tools/search-tools.d.ts.map +1 -1
- package/dist/tools/search-tools.js +5 -215
- package/dist/tools/search-tools.js.map +1 -1
- package/dist/tools/serp-providers/apify-provider.d.ts +18 -0
- package/dist/tools/serp-providers/apify-provider.d.ts.map +1 -0
- package/dist/tools/serp-providers/apify-provider.js +93 -0
- package/dist/tools/serp-providers/apify-provider.js.map +1 -0
- package/dist/tools/serp-providers/brave-provider.d.ts +34 -0
- package/dist/tools/serp-providers/brave-provider.d.ts.map +1 -0
- package/dist/tools/serp-providers/brave-provider.js +86 -0
- package/dist/tools/serp-providers/brave-provider.js.map +1 -0
- package/dist/tools/serp-providers/dataforseo-provider.d.ts +14 -1
- package/dist/tools/serp-providers/dataforseo-provider.d.ts.map +1 -1
- package/dist/tools/serp-providers/dataforseo-provider.js +0 -9
- package/dist/tools/serp-providers/dataforseo-provider.js.map +1 -1
- package/dist/tools/serp-providers/gemini-provider.d.ts +45 -0
- package/dist/tools/serp-providers/gemini-provider.d.ts.map +1 -0
- package/dist/tools/serp-providers/gemini-provider.js +148 -0
- package/dist/tools/serp-providers/gemini-provider.js.map +1 -0
- package/dist/tools/serp-providers/index.d.ts +61 -0
- package/dist/tools/serp-providers/index.d.ts.map +1 -1
- package/dist/tools/serp-providers/index.js +119 -3
- package/dist/tools/serp-providers/index.js.map +1 -1
- package/dist/tools/serp-providers/openai-provider.d.ts +58 -0
- package/dist/tools/serp-providers/openai-provider.d.ts.map +1 -0
- package/dist/tools/serp-providers/openai-provider.js +113 -0
- package/dist/tools/serp-providers/openai-provider.js.map +1 -0
- package/dist/tools/serp-providers/serpapi-provider.d.ts +9 -5
- package/dist/tools/serp-providers/serpapi-provider.d.ts.map +1 -1
- package/dist/tools/serp-providers/serpapi-provider.js +26 -44
- package/dist/tools/serp-providers/serpapi-provider.js.map +1 -1
- package/dist/tools/serp-tool-factory.d.ts +27 -0
- package/dist/tools/serp-tool-factory.d.ts.map +1 -0
- package/dist/tools/serp-tool-factory.js +56 -0
- package/dist/tools/serp-tool-factory.js.map +1 -0
- package/dist/tools/shared-tools.d.ts +33 -0
- package/dist/tools/shared-tools.d.ts.map +1 -0
- package/dist/tools/shared-tools.js +39 -0
- package/dist/tools/shared-tools.js.map +1 -0
- package/dist/tools/start-subtask-tool.d.ts +51 -0
- package/dist/tools/start-subtask-tool.d.ts.map +1 -0
- package/dist/tools/start-subtask-tool.js +189 -0
- package/dist/tools/start-subtask-tool.js.map +1 -0
- package/dist/tools/submit-code-tool.d.ts +159 -0
- package/dist/tools/submit-code-tool.d.ts.map +1 -0
- package/dist/tools/submit-code-tool.js +209 -0
- package/dist/tools/submit-code-tool.js.map +1 -0
- package/dist/tools/subtask-fields.d.ts +11 -0
- package/dist/tools/subtask-fields.d.ts.map +1 -0
- package/dist/tools/subtask-fields.js +11 -0
- package/dist/tools/subtask-fields.js.map +1 -0
- package/dist/tools/todo-tools.d.ts +15 -0
- package/dist/tools/todo-tools.d.ts.map +1 -0
- package/dist/tools/todo-tools.js +15 -0
- package/dist/tools/todo-tools.js.map +1 -0
- package/dist/tools/tool-permissions.d.ts +40 -0
- package/dist/tools/tool-permissions.d.ts.map +1 -0
- package/dist/tools/tool-permissions.js +52 -0
- package/dist/tools/tool-permissions.js.map +1 -0
- package/dist/tools/tool-search.d.ts +39 -0
- package/dist/tools/tool-search.d.ts.map +1 -0
- package/dist/tools/tool-search.js +108 -0
- package/dist/tools/tool-search.js.map +1 -0
- package/dist/tools/vector-tool-support.d.ts +15 -0
- package/dist/tools/vector-tool-support.d.ts.map +1 -0
- package/dist/tools/vector-tool-support.js +133 -0
- package/dist/tools/vector-tool-support.js.map +1 -0
- package/dist/tools/vector-tools.d.ts +13 -220
- package/dist/tools/vector-tools.d.ts.map +1 -1
- package/dist/tools/vector-tools.js +7 -578
- package/dist/tools/vector-tools.js.map +1 -1
- package/dist/tools/wait-subtasks-tool.d.ts +27 -0
- package/dist/tools/wait-subtasks-tool.d.ts.map +1 -0
- package/dist/tools/wait-subtasks-tool.js +66 -0
- package/dist/tools/wait-subtasks-tool.js.map +1 -0
- package/dist/tsconfig.tests.tmp.tsbuildinfo +1 -0
- package/dist/types.d.ts +16 -31
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +8 -1
- package/dist/types.js.map +1 -1
- package/dist/utils/dag-scheduler.d.ts +85 -0
- package/dist/utils/dag-scheduler.d.ts.map +1 -0
- package/dist/utils/dag-scheduler.js +180 -0
- package/dist/utils/dag-scheduler.js.map +1 -0
- package/dist/utils/json-parser.d.ts +32 -1
- package/dist/utils/json-parser.d.ts.map +1 -1
- package/dist/utils/json-parser.js +145 -10
- package/dist/utils/json-parser.js.map +1 -1
- package/dist/utils/json-schema-validate.d.ts +29 -0
- package/dist/utils/json-schema-validate.d.ts.map +1 -0
- package/dist/utils/json-schema-validate.js +228 -0
- package/dist/utils/json-schema-validate.js.map +1 -0
- package/dist/utils/link-abort.d.ts +13 -0
- package/dist/utils/link-abort.d.ts.map +1 -0
- package/dist/utils/link-abort.js +23 -0
- package/dist/utils/link-abort.js.map +1 -0
- package/dist/utils/merge-generators.d.ts +58 -0
- package/dist/utils/merge-generators.d.ts.map +1 -0
- package/dist/utils/merge-generators.js +148 -0
- package/dist/utils/merge-generators.js.map +1 -0
- package/dist/utils/remove-base64-images.d.ts +0 -5
- package/dist/utils/remove-base64-images.d.ts.map +1 -1
- package/dist/utils/remove-base64-images.js.map +1 -1
- package/dist/utils/step-failure.d.ts +20 -0
- package/dist/utils/step-failure.d.ts.map +1 -0
- package/dist/utils/step-failure.js +43 -0
- package/dist/utils/step-failure.js.map +1 -0
- package/dist/utils/think-tags.d.ts +16 -0
- package/dist/utils/think-tags.d.ts.map +1 -0
- package/dist/utils/think-tags.js +23 -0
- package/dist/utils/think-tags.js.map +1 -0
- package/dist/utils/type-guards.d.ts +26 -0
- package/dist/utils/type-guards.d.ts.map +1 -0
- package/dist/utils/type-guards.js +44 -0
- package/dist/utils/type-guards.js.map +1 -0
- package/dist/utils/ui-event-buffer.d.ts +18 -0
- package/dist/utils/ui-event-buffer.d.ts.map +1 -0
- package/dist/utils/ui-event-buffer.js +18 -0
- package/dist/utils/ui-event-buffer.js.map +1 -0
- package/dist/utils/wrap-generators-parallel.d.ts +0 -5
- package/dist/utils/wrap-generators-parallel.d.ts.map +1 -1
- package/dist/utils/wrap-generators-parallel.js +3 -6
- package/dist/utils/wrap-generators-parallel.js.map +1 -1
- package/dist/wasm-sandbox/host.d.ts +106 -0
- package/dist/wasm-sandbox/host.d.ts.map +1 -0
- package/dist/wasm-sandbox/host.js +409 -0
- package/dist/wasm-sandbox/host.js.map +1 -0
- package/dist/wasm-sandbox/workers.d.ts +43 -0
- package/dist/wasm-sandbox/workers.d.ts.map +1 -0
- package/dist/wasm-sandbox/workers.js +150 -0
- package/dist/wasm-sandbox/workers.js.map +1 -0
- package/dist/workspace-paths.d.ts +40 -0
- package/dist/workspace-paths.d.ts.map +1 -0
- package/dist/workspace-paths.js +102 -0
- package/dist/workspace-paths.js.map +1 -0
- package/dist/yt-dlp-gate.d.ts +19 -0
- package/dist/yt-dlp-gate.d.ts.map +1 -0
- package/dist/yt-dlp-gate.js +22 -0
- package/dist/yt-dlp-gate.js.map +1 -0
- package/package.json +112 -14
- package/dist/agent-executor.d.ts +0 -62
- package/dist/agent-executor.d.ts.map +0 -1
- package/dist/agent-executor.js +0 -324
- package/dist/agent-executor.js.map +0 -1
- package/dist/agent-step-executor.d.ts +0 -28
- package/dist/agent-step-executor.d.ts.map +0 -1
- package/dist/agent-step-executor.js +0 -99
- package/dist/agent-step-executor.js.map +0 -1
- package/dist/agent-workflow-runner.d.ts +0 -31
- package/dist/agent-workflow-runner.d.ts.map +0 -1
- package/dist/agent-workflow-runner.js +0 -124
- package/dist/agent-workflow-runner.js.map +0 -1
- package/dist/agent.d.ts +0 -115
- package/dist/agent.d.ts.map +0 -1
- package/dist/agent.js +0 -587
- package/dist/agent.js.map +0 -1
- package/dist/base-agent.d.ts +0 -42
- package/dist/base-agent.d.ts.map +0 -1
- package/dist/base-agent.js +0 -29
- package/dist/base-agent.js.map +0 -1
- package/dist/graph-planner.d.ts +0 -56
- package/dist/graph-planner.d.ts.map +0 -1
- package/dist/graph-planner.js +0 -311
- package/dist/graph-planner.js.map +0 -1
- package/dist/multi-mode-agent.d.ts +0 -86
- package/dist/multi-mode-agent.d.ts.map +0 -1
- package/dist/multi-mode-agent.js +0 -476
- package/dist/multi-mode-agent.js.map +0 -1
- package/dist/prompts/graph-planner-prompt.d.ts +0 -48
- package/dist/prompts/graph-planner-prompt.d.ts.map +0 -1
- package/dist/prompts/graph-planner-prompt.js +0 -180
- package/dist/prompts/graph-planner-prompt.js.map +0 -1
- package/dist/reject-agentic-provider.d.ts +0 -21
- package/dist/reject-agentic-provider.d.ts.map +0 -1
- package/dist/reject-agentic-provider.js +0 -32
- package/dist/reject-agentic-provider.js.map +0 -1
- package/dist/simple-agent.d.ts +0 -29
- package/dist/simple-agent.d.ts.map +0 -1
- package/dist/simple-agent.js +0 -54
- package/dist/simple-agent.js.map +0 -1
- package/dist/sub-agent-planner.d.ts +0 -33
- package/dist/sub-agent-planner.d.ts.map +0 -1
- package/dist/sub-agent-planner.js +0 -203
- package/dist/sub-agent-planner.js.map +0 -1
- package/dist/team/db-task-board.d.ts +0 -54
- package/dist/team/db-task-board.d.ts.map +0 -1
- package/dist/team/db-task-board.js +0 -361
- package/dist/team/db-task-board.js.map +0 -1
- package/dist/team/edge-message-bus.d.ts +0 -51
- package/dist/team/edge-message-bus.d.ts.map +0 -1
- package/dist/team/edge-message-bus.js +0 -169
- package/dist/team/edge-message-bus.js.map +0 -1
- package/dist/team/edge-task-board.d.ts +0 -77
- package/dist/team/edge-task-board.d.ts.map +0 -1
- package/dist/team/edge-task-board.js +0 -140
- package/dist/team/edge-task-board.js.map +0 -1
- package/dist/team/index.d.ts +0 -16
- package/dist/team/index.d.ts.map +0 -1
- package/dist/team/index.js +0 -17
- package/dist/team/index.js.map +0 -1
- package/dist/team/message-bus.d.ts +0 -58
- package/dist/team/message-bus.d.ts.map +0 -1
- package/dist/team/message-bus.js +0 -151
- package/dist/team/message-bus.js.map +0 -1
- package/dist/team/task-board.d.ts +0 -106
- package/dist/team/task-board.d.ts.map +0 -1
- package/dist/team/task-board.js +0 -370
- package/dist/team/task-board.js.map +0 -1
- package/dist/team/team-executor.d.ts +0 -72
- package/dist/team/team-executor.d.ts.map +0 -1
- package/dist/team/team-executor.js +0 -466
- package/dist/team/team-executor.js.map +0 -1
- package/dist/team/team-tools.d.ts +0 -252
- package/dist/team/team-tools.d.ts.map +0 -1
- package/dist/team/team-tools.js +0 -412
- package/dist/team/team-tools.js.map +0 -1
- package/dist/team/types.d.ts +0 -198
- package/dist/team/types.d.ts.map +0 -1
- package/dist/team/types.js +0 -8
- package/dist/team/types.js.map +0 -1
- package/dist/tools/add-edge-tool.d.ts +0 -18
- package/dist/tools/add-edge-tool.d.ts.map +0 -1
- package/dist/tools/add-edge-tool.js +0 -92
- package/dist/tools/add-edge-tool.js.map +0 -1
- package/dist/tools/add-node-tool.d.ts +0 -22
- package/dist/tools/add-node-tool.d.ts.map +0 -1
- package/dist/tools/add-node-tool.js +0 -128
- package/dist/tools/add-node-tool.js.map +0 -1
- package/dist/tools/asset-tools.d.ts +0 -58
- package/dist/tools/asset-tools.d.ts.map +0 -1
- package/dist/tools/asset-tools.js +0 -191
- package/dist/tools/asset-tools.js.map +0 -1
- package/dist/tools/calculator-tool.d.ts +0 -24
- package/dist/tools/calculator-tool.d.ts.map +0 -1
- package/dist/tools/calculator-tool.js +0 -64
- package/dist/tools/calculator-tool.js.map +0 -1
- package/dist/tools/claude-code-tools.d.ts +0 -96
- package/dist/tools/claude-code-tools.d.ts.map +0 -1
- package/dist/tools/claude-code-tools.js +0 -463
- package/dist/tools/claude-code-tools.js.map +0 -1
- package/dist/tools/code-tools.d.ts +0 -26
- package/dist/tools/code-tools.d.ts.map +0 -1
- package/dist/tools/code-tools.js +0 -82
- package/dist/tools/code-tools.js.map +0 -1
- package/dist/tools/create-plan-tool.d.ts +0 -29
- package/dist/tools/create-plan-tool.d.ts.map +0 -1
- package/dist/tools/create-plan-tool.js +0 -355
- package/dist/tools/create-plan-tool.js.map +0 -1
- package/dist/tools/create-task-tool.d.ts +0 -28
- package/dist/tools/create-task-tool.d.ts.map +0 -1
- package/dist/tools/create-task-tool.js +0 -254
- package/dist/tools/create-task-tool.js.map +0 -1
- package/dist/tools/email-tools.d.ts +0 -76
- package/dist/tools/email-tools.d.ts.map +0 -1
- package/dist/tools/email-tools.js +0 -259
- package/dist/tools/email-tools.js.map +0 -1
- package/dist/tools/filesystem-tools.d.ts +0 -77
- package/dist/tools/filesystem-tools.d.ts.map +0 -1
- package/dist/tools/filesystem-tools.js +0 -334
- package/dist/tools/filesystem-tools.js.map +0 -1
- package/dist/tools/find-model-tool.d.ts +0 -25
- package/dist/tools/find-model-tool.d.ts.map +0 -1
- package/dist/tools/find-model-tool.js +0 -236
- package/dist/tools/find-model-tool.js.map +0 -1
- package/dist/tools/finish-graph-tool.d.ts +0 -23
- package/dist/tools/finish-graph-tool.d.ts.map +0 -1
- package/dist/tools/finish-graph-tool.js +0 -46
- package/dist/tools/finish-graph-tool.js.map +0 -1
- package/dist/tools/js-code-tool.d.ts +0 -30
- package/dist/tools/js-code-tool.d.ts.map +0 -1
- package/dist/tools/js-code-tool.js +0 -98
- package/dist/tools/js-code-tool.js.map +0 -1
- package/dist/tools/local-get-node-info-tool.d.ts +0 -19
- package/dist/tools/local-get-node-info-tool.d.ts.map +0 -1
- package/dist/tools/local-get-node-info-tool.js +0 -75
- package/dist/tools/local-get-node-info-tool.js.map +0 -1
- package/dist/tools/local-list-nodes-tool.d.ts +0 -19
- package/dist/tools/local-list-nodes-tool.d.ts.map +0 -1
- package/dist/tools/local-list-nodes-tool.js +0 -69
- package/dist/tools/local-list-nodes-tool.js.map +0 -1
- package/dist/tools/local-search-nodes-tool.d.ts +0 -21
- package/dist/tools/local-search-nodes-tool.d.ts.map +0 -1
- package/dist/tools/local-search-nodes-tool.js +0 -111
- package/dist/tools/local-search-nodes-tool.js.map +0 -1
- package/dist/tools/math-tools.d.ts +0 -156
- package/dist/tools/math-tools.d.ts.map +0 -1
- package/dist/tools/math-tools.js +0 -422
- package/dist/tools/math-tools.js.map +0 -1
- package/dist/tools/model-tools.d.ts +0 -25
- package/dist/tools/model-tools.d.ts.map +0 -1
- package/dist/tools/model-tools.js +0 -48
- package/dist/tools/model-tools.js.map +0 -1
- package/dist/tools/pdf-tools.d.ts +0 -152
- package/dist/tools/pdf-tools.d.ts.map +0 -1
- package/dist/tools/pdf-tools.js +0 -339
- package/dist/tools/pdf-tools.js.map +0 -1
- package/dist/tools/tool-registry.d.ts +0 -9
- package/dist/tools/tool-registry.d.ts.map +0 -1
- package/dist/tools/tool-registry.js +0 -17
- package/dist/tools/tool-registry.js.map +0 -1
- package/dist/tools/workspace-tools.d.ts +0 -58
- package/dist/tools/workspace-tools.d.ts.map +0 -1
- package/dist/tools/workspace-tools.js +0 -152
- package/dist/tools/workspace-tools.js.map +0 -1
|
@@ -0,0 +1,2191 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CodeAct eval cases for the `nodetool.*` object model — data and creative
|
|
3
|
+
* namespaces: collections, memory, shared, web, documents, email, apps,
|
|
4
|
+
* games, timelines, sketches, scripts, storyboards.
|
|
5
|
+
*
|
|
6
|
+
* The fakes here are named EXACTLY like the belt tools those namespaces wrap
|
|
7
|
+
* (`NODETOOL_API_NAMESPACE_TOOLS`), so the real guest prelude loads and every
|
|
8
|
+
* `nodetool.<ns>.<method>()` call lands on one of them with the argument names
|
|
9
|
+
* the prelude sends. The world behind them is small, in-memory, deterministic
|
|
10
|
+
* and internally consistent: an indexed chunk becomes findable, a voiced line
|
|
11
|
+
* becomes assemblable, a rendered still unblocks a clip, a planted validation
|
|
12
|
+
* issue is fixable by an edit. Cases score the outcome, never one working
|
|
13
|
+
* order.
|
|
14
|
+
*/
|
|
15
|
+
import { applyGameOps, createTopDownRoomGame, gameDocumentOp } from "@nodetool-ai/game-runtime";
|
|
16
|
+
import { RecordingTool } from "./codeact-cases.js";
|
|
17
|
+
import { isFiniteNumber, isNumber, isRecord, isString } from "../utils/type-guards.js";
|
|
18
|
+
// ---------------------------------------------------------------------------
|
|
19
|
+
// param coercion
|
|
20
|
+
// ---------------------------------------------------------------------------
|
|
21
|
+
const str = (value, fallback = "") => isString(value) ? value : fallback;
|
|
22
|
+
const num = (value, fallback) => isFiniteNumber(value) ? value : fallback;
|
|
23
|
+
const rec = (value) => isRecord(value)
|
|
24
|
+
? value
|
|
25
|
+
: {};
|
|
26
|
+
const recList = (value) => Array.isArray(value) ? value.map(rec) : [];
|
|
27
|
+
const strList = (value) => {
|
|
28
|
+
if (isString(value))
|
|
29
|
+
return [value];
|
|
30
|
+
if (!Array.isArray(value))
|
|
31
|
+
return [];
|
|
32
|
+
return value.filter((entry) => typeof entry === "string");
|
|
33
|
+
};
|
|
34
|
+
/** Words, with a dotted run kept whole so "4.2" and "example.dev" survive. */
|
|
35
|
+
const words = (text) => text.toLowerCase().match(/[a-z0-9]+(?:\.[a-z0-9]+)*/g) ?? [];
|
|
36
|
+
/** Fake relevance: how many distinct query words the text repeats. */
|
|
37
|
+
const overlap = (query, text) => {
|
|
38
|
+
const haystack = new Set(words(text));
|
|
39
|
+
let score = 0;
|
|
40
|
+
for (const word of new Set(words(query))) {
|
|
41
|
+
if (haystack.has(word))
|
|
42
|
+
score++;
|
|
43
|
+
}
|
|
44
|
+
return score;
|
|
45
|
+
};
|
|
46
|
+
const clone = (value) => JSON.parse(JSON.stringify(value));
|
|
47
|
+
const obj = (properties, required = []) => required.length > 0
|
|
48
|
+
? { type: "object", properties, required }
|
|
49
|
+
: { type: "object", properties };
|
|
50
|
+
const S = { type: "string" };
|
|
51
|
+
const N = { type: "number" };
|
|
52
|
+
const B = { type: "boolean" };
|
|
53
|
+
const ANY_ARRAY = { type: "array" };
|
|
54
|
+
const HANDBOOK = [
|
|
55
|
+
{
|
|
56
|
+
id: "policy-refunds",
|
|
57
|
+
text: "The refund window is 30 days. A refund is issued to the original card."
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
id: "policy-shipping",
|
|
61
|
+
text: "Standard shipping takes 5 business days after dispatch."
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
id: "policy-warranty",
|
|
65
|
+
text: "Hardware carries a 24 month warranty against manufacturing defects."
|
|
66
|
+
}
|
|
67
|
+
];
|
|
68
|
+
const WEB_PAGES = [
|
|
69
|
+
{
|
|
70
|
+
url: "https://example.dev/nodetool/release-notes",
|
|
71
|
+
title: "NodeTool 4.2 release notes",
|
|
72
|
+
snippet: "Everything that shipped in the NodeTool 4.2 release.",
|
|
73
|
+
text: "NodeTool 4.2 release notes. Agent actions now run inside a QuickJS " +
|
|
74
|
+
"sandbox. The release ships 58 packages and one desktop app."
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
url: "https://example.dev/nodetool/pricing",
|
|
78
|
+
title: "NodeTool pricing",
|
|
79
|
+
snippet: "Plans and per-seat prices.",
|
|
80
|
+
text: "The team plan costs 20 euro per seat per month."
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
url: "https://example.dev/blog/codeact",
|
|
84
|
+
title: "Why CodeAct",
|
|
85
|
+
snippet: "Acting by writing code instead of JSON tool calls.",
|
|
86
|
+
text: "CodeAct lets one action chain many tool calls in a loop."
|
|
87
|
+
}
|
|
88
|
+
];
|
|
89
|
+
const PDF_TEXT = "Q3 revenue reached 4.2 million euro across 1,280 accounts. " +
|
|
90
|
+
"Churn held at 1.1 percent.";
|
|
91
|
+
/** Fresh, isolated world state — one per `createSurfaceApiTools` call. */
|
|
92
|
+
function createWorld() {
|
|
93
|
+
return {
|
|
94
|
+
indexed: [],
|
|
95
|
+
memories: [
|
|
96
|
+
{
|
|
97
|
+
memory_id: "mem_seed_1",
|
|
98
|
+
title: "workspace layout",
|
|
99
|
+
content: "Reports live under reports/ in the workspace.",
|
|
100
|
+
kind: "note",
|
|
101
|
+
resources: []
|
|
102
|
+
}
|
|
103
|
+
],
|
|
104
|
+
memorySeq: 1,
|
|
105
|
+
// Two past conversations. What was actually generated is only in a tool
|
|
106
|
+
// call's arguments, which the thread listing summarizes away — so the
|
|
107
|
+
// case has to read the message itself rather than the transcript.
|
|
108
|
+
threads: [
|
|
109
|
+
{
|
|
110
|
+
id: "th_banner",
|
|
111
|
+
title: "Launch banner images",
|
|
112
|
+
updated_at: "2026-02-10T09:00:00.000Z"
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
id: "th_refunds",
|
|
116
|
+
title: "Refund policy wording",
|
|
117
|
+
updated_at: "2026-01-05T09:00:00.000Z"
|
|
118
|
+
}
|
|
119
|
+
],
|
|
120
|
+
chatMessages: [
|
|
121
|
+
{
|
|
122
|
+
id: "msg_refunds_1",
|
|
123
|
+
thread_id: "th_refunds",
|
|
124
|
+
role: "user",
|
|
125
|
+
text: "How long is the refund window?",
|
|
126
|
+
created_at: "2026-01-05T08:59:00.000Z"
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
id: "msg_refunds_2",
|
|
130
|
+
thread_id: "th_refunds",
|
|
131
|
+
role: "assistant",
|
|
132
|
+
text: "Thirty days from delivery.",
|
|
133
|
+
created_at: "2026-01-05T09:00:00.000Z"
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
id: "msg_banner_1",
|
|
137
|
+
thread_id: "th_banner",
|
|
138
|
+
role: "user",
|
|
139
|
+
text: "Make the launch banner.",
|
|
140
|
+
created_at: "2026-02-10T08:59:00.000Z"
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
id: "msg_banner_2",
|
|
144
|
+
thread_id: "th_banner",
|
|
145
|
+
role: "assistant",
|
|
146
|
+
text: "Generated the banner.",
|
|
147
|
+
created_at: "2026-02-10T09:00:00.000Z",
|
|
148
|
+
tool_calls: [
|
|
149
|
+
{
|
|
150
|
+
id: "call_1",
|
|
151
|
+
name: "generate_image",
|
|
152
|
+
args: { model: "fal_ai/flux/dev", prompt: "launch banner" }
|
|
153
|
+
}
|
|
154
|
+
]
|
|
155
|
+
}
|
|
156
|
+
],
|
|
157
|
+
// Run-scoped agent memory, seeded with what upstream steps left behind:
|
|
158
|
+
// the numbers are only here, so the case has to read them.
|
|
159
|
+
shared: [
|
|
160
|
+
{
|
|
161
|
+
key: "task:pricing",
|
|
162
|
+
kind: "task_result",
|
|
163
|
+
title: "Pricing research",
|
|
164
|
+
value: { tier: "pro", monthly_usd: 49 }
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
key: "step:draft",
|
|
168
|
+
kind: "step_result",
|
|
169
|
+
title: "Announcement draft",
|
|
170
|
+
value: "The pro tier is our best value."
|
|
171
|
+
}
|
|
172
|
+
],
|
|
173
|
+
emails: [
|
|
174
|
+
{
|
|
175
|
+
message_id: "msg_1",
|
|
176
|
+
subject: "Invoice 8841 due",
|
|
177
|
+
from: "billing@vendor.example",
|
|
178
|
+
hours_ago: 3,
|
|
179
|
+
labels: [],
|
|
180
|
+
archived: false
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
message_id: "msg_2",
|
|
184
|
+
subject: "Invoice 8842 due",
|
|
185
|
+
from: "billing@vendor.example",
|
|
186
|
+
hours_ago: 11,
|
|
187
|
+
labels: [],
|
|
188
|
+
archived: false
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
message_id: "msg_3",
|
|
192
|
+
subject: "Team lunch on Friday",
|
|
193
|
+
from: "office@acme.example",
|
|
194
|
+
hours_ago: 5,
|
|
195
|
+
labels: [],
|
|
196
|
+
archived: false
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
message_id: "msg_4",
|
|
200
|
+
subject: "Invoice 8840 paid",
|
|
201
|
+
from: "billing@vendor.example",
|
|
202
|
+
hours_ago: 100,
|
|
203
|
+
labels: [],
|
|
204
|
+
archived: false
|
|
205
|
+
}
|
|
206
|
+
],
|
|
207
|
+
apps: new Set(["app_notes"]),
|
|
208
|
+
timelines: new Map([
|
|
209
|
+
[
|
|
210
|
+
"tl_promo",
|
|
211
|
+
{
|
|
212
|
+
id: "tl_promo",
|
|
213
|
+
name: "Promo cut",
|
|
214
|
+
tracks: [{ id: "track_video", type: "video", name: "Video" }],
|
|
215
|
+
clips: [
|
|
216
|
+
{
|
|
217
|
+
id: "clip_shot",
|
|
218
|
+
trackId: "track_video",
|
|
219
|
+
name: "shot",
|
|
220
|
+
startMs: 0,
|
|
221
|
+
durationMs: 6000,
|
|
222
|
+
animations: []
|
|
223
|
+
},
|
|
224
|
+
// Planted: this clip names a track the document does not have.
|
|
225
|
+
{
|
|
226
|
+
id: "clip_title",
|
|
227
|
+
trackId: "track_text",
|
|
228
|
+
name: "Title",
|
|
229
|
+
startMs: 0,
|
|
230
|
+
durationMs: 2000,
|
|
231
|
+
animations: []
|
|
232
|
+
}
|
|
233
|
+
]
|
|
234
|
+
}
|
|
235
|
+
]
|
|
236
|
+
]),
|
|
237
|
+
sketches: new Map([
|
|
238
|
+
[
|
|
239
|
+
"img_cover",
|
|
240
|
+
{
|
|
241
|
+
id: "img_cover",
|
|
242
|
+
name: "Cover",
|
|
243
|
+
layers: [
|
|
244
|
+
{
|
|
245
|
+
id: "layer_bg",
|
|
246
|
+
name: "Background",
|
|
247
|
+
opacity: 1,
|
|
248
|
+
blendMode: "normal",
|
|
249
|
+
visible: true
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
id: "layer_art",
|
|
253
|
+
name: "Art",
|
|
254
|
+
opacity: 0.9,
|
|
255
|
+
blendMode: "normal",
|
|
256
|
+
visible: true
|
|
257
|
+
}
|
|
258
|
+
],
|
|
259
|
+
// Planted: no layer carries this id.
|
|
260
|
+
activeLayerId: "layer_ghost"
|
|
261
|
+
}
|
|
262
|
+
]
|
|
263
|
+
]),
|
|
264
|
+
versions: new Map(),
|
|
265
|
+
scripts: new Map([
|
|
266
|
+
[
|
|
267
|
+
"scr_intro",
|
|
268
|
+
{
|
|
269
|
+
script_id: "scr_intro",
|
|
270
|
+
name: "Intro voiceover",
|
|
271
|
+
cast: [
|
|
272
|
+
{
|
|
273
|
+
name: "Narrator",
|
|
274
|
+
provider: "openai",
|
|
275
|
+
model: "tts-1",
|
|
276
|
+
voice: "alloy"
|
|
277
|
+
}
|
|
278
|
+
],
|
|
279
|
+
lines: [
|
|
280
|
+
{
|
|
281
|
+
id: "line_1",
|
|
282
|
+
speaker: "Narrator",
|
|
283
|
+
text: "Welcome to NodeTool.",
|
|
284
|
+
status: "voiced",
|
|
285
|
+
take: "asset://take_line_1",
|
|
286
|
+
duration_seconds: 2
|
|
287
|
+
},
|
|
288
|
+
{
|
|
289
|
+
id: "line_2",
|
|
290
|
+
speaker: "Narrator",
|
|
291
|
+
text: "Everything here is a graph.",
|
|
292
|
+
status: "draft",
|
|
293
|
+
take: null,
|
|
294
|
+
duration_seconds: 0
|
|
295
|
+
},
|
|
296
|
+
{
|
|
297
|
+
id: "line_3",
|
|
298
|
+
speaker: "Narrator",
|
|
299
|
+
text: "Let us begin.",
|
|
300
|
+
status: "stale",
|
|
301
|
+
take: "asset://take_line_3_old",
|
|
302
|
+
duration_seconds: 2
|
|
303
|
+
}
|
|
304
|
+
]
|
|
305
|
+
}
|
|
306
|
+
]
|
|
307
|
+
]),
|
|
308
|
+
storyboards: new Map([
|
|
309
|
+
[
|
|
310
|
+
"sb_lighthouse",
|
|
311
|
+
{
|
|
312
|
+
storyboard_id: "sb_lighthouse",
|
|
313
|
+
name: "Lighthouse",
|
|
314
|
+
image_model: { provider: "fal_ai", model: "fal-ai/flux/schnell" },
|
|
315
|
+
video_model: { provider: "fal_ai", model: "fal-ai/ltx" },
|
|
316
|
+
shots: [
|
|
317
|
+
{
|
|
318
|
+
id: "shot_1",
|
|
319
|
+
slug: "wide-lighthouse",
|
|
320
|
+
action: "Wide of the lighthouse at dusk",
|
|
321
|
+
duration_seconds: 4,
|
|
322
|
+
duration_source: "manual",
|
|
323
|
+
still: "asset://still_shot_1",
|
|
324
|
+
clip: null,
|
|
325
|
+
revision: 1
|
|
326
|
+
},
|
|
327
|
+
{
|
|
328
|
+
id: "shot_2",
|
|
329
|
+
slug: "keeper-door",
|
|
330
|
+
action: "The keeper closes the door",
|
|
331
|
+
duration_seconds: 3,
|
|
332
|
+
duration_source: "manual",
|
|
333
|
+
still: null,
|
|
334
|
+
clip: null,
|
|
335
|
+
revision: 1
|
|
336
|
+
},
|
|
337
|
+
{
|
|
338
|
+
id: "shot_3",
|
|
339
|
+
slug: "beam-sweep",
|
|
340
|
+
action: "The beam sweeps across the water",
|
|
341
|
+
duration_seconds: 5,
|
|
342
|
+
duration_source: "manual",
|
|
343
|
+
still: null,
|
|
344
|
+
clip: null,
|
|
345
|
+
revision: 1
|
|
346
|
+
}
|
|
347
|
+
]
|
|
348
|
+
}
|
|
349
|
+
]
|
|
350
|
+
]),
|
|
351
|
+
// NodeTool's own configuration. A setting has a declared shape; a secret
|
|
352
|
+
// has only a name and whether it exists — which is the whole point of the
|
|
353
|
+
// split the `settings` capabilities enforce.
|
|
354
|
+
settingCatalog: [
|
|
355
|
+
{
|
|
356
|
+
key: "AUTOSAVE_ENABLED",
|
|
357
|
+
group: "Autosave",
|
|
358
|
+
description: "Save workflow versions automatically.",
|
|
359
|
+
allowed_values: ["true", "false"]
|
|
360
|
+
},
|
|
361
|
+
{
|
|
362
|
+
key: "AUTOSAVE_INTERVAL_MINUTES",
|
|
363
|
+
group: "Autosave",
|
|
364
|
+
description: "Minutes between autosaves.",
|
|
365
|
+
allowed_values: null
|
|
366
|
+
},
|
|
367
|
+
{
|
|
368
|
+
key: "FONT_PATH",
|
|
369
|
+
group: "Folders",
|
|
370
|
+
description: "Where image nodes look for fonts.",
|
|
371
|
+
allowed_values: null
|
|
372
|
+
}
|
|
373
|
+
],
|
|
374
|
+
settingValues: new Map([["AUTOSAVE_ENABLED", "true"]]),
|
|
375
|
+
secretCatalog: [
|
|
376
|
+
{ key: "OPENAI_API_KEY", description: "OpenAI API key." },
|
|
377
|
+
{ key: "STRIPE_API_KEY", description: "Stripe API key." }
|
|
378
|
+
],
|
|
379
|
+
configuredSecrets: new Set(["OPENAI_API_KEY"]),
|
|
380
|
+
/** What `request_secret` was asked for, so a case can score the ask. */
|
|
381
|
+
secretRequests: []
|
|
382
|
+
};
|
|
383
|
+
}
|
|
384
|
+
// ---------------------------------------------------------------------------
|
|
385
|
+
// document helpers
|
|
386
|
+
// ---------------------------------------------------------------------------
|
|
387
|
+
const ANIMATION_PRESETS = ["fade", "slide", "zoom", "wipe"];
|
|
388
|
+
const BLEND_MODES = ["normal", "multiply", "screen", "overlay", "add"];
|
|
389
|
+
const slug = (text) => text
|
|
390
|
+
.toLowerCase()
|
|
391
|
+
.replace(/[^a-z0-9]+/g, "_")
|
|
392
|
+
.replace(/^_|_$/g, "") || "item";
|
|
393
|
+
function needTimeline(world, id) {
|
|
394
|
+
const doc = world.timelines.get(id);
|
|
395
|
+
if (!doc)
|
|
396
|
+
throw new Error(`no timeline sequence with id "${id}"`);
|
|
397
|
+
return doc;
|
|
398
|
+
}
|
|
399
|
+
function needSketch(world, id) {
|
|
400
|
+
const doc = world.sketches.get(id);
|
|
401
|
+
if (!doc)
|
|
402
|
+
throw new Error(`no image document with id "${id}"`);
|
|
403
|
+
return doc;
|
|
404
|
+
}
|
|
405
|
+
function timelineIssues(doc) {
|
|
406
|
+
const issues = [];
|
|
407
|
+
const trackIds = new Set(doc.tracks.map((t) => t.id));
|
|
408
|
+
for (const clip of doc.clips) {
|
|
409
|
+
if (!trackIds.has(clip.trackId)) {
|
|
410
|
+
issues.push({
|
|
411
|
+
severity: "error",
|
|
412
|
+
code: "missing_track",
|
|
413
|
+
message: `clip "${clip.name}" sits on track "${clip.trackId}", which the document does not have`,
|
|
414
|
+
clip: clip.id,
|
|
415
|
+
track: clip.trackId
|
|
416
|
+
});
|
|
417
|
+
}
|
|
418
|
+
if (clip.durationMs <= 0) {
|
|
419
|
+
issues.push({
|
|
420
|
+
severity: "error",
|
|
421
|
+
code: "zero_duration",
|
|
422
|
+
message: `clip "${clip.name}" has no duration`,
|
|
423
|
+
clip: clip.id
|
|
424
|
+
});
|
|
425
|
+
}
|
|
426
|
+
for (const animation of clip.animations) {
|
|
427
|
+
if (!ANIMATION_PRESETS.includes(animation.preset)) {
|
|
428
|
+
issues.push({
|
|
429
|
+
severity: "error",
|
|
430
|
+
code: "unknown_preset",
|
|
431
|
+
message: `clip "${clip.name}" uses animation preset "${animation.preset}", which does not exist`,
|
|
432
|
+
clip: clip.id
|
|
433
|
+
});
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
return issues;
|
|
438
|
+
}
|
|
439
|
+
function sketchIssues(doc) {
|
|
440
|
+
const issues = [];
|
|
441
|
+
const layerIds = new Set(doc.layers.map((l) => l.id));
|
|
442
|
+
if (!layerIds.has(doc.activeLayerId)) {
|
|
443
|
+
issues.push({
|
|
444
|
+
severity: "error",
|
|
445
|
+
code: "dangling_active_layer",
|
|
446
|
+
message: `activeLayerId "${doc.activeLayerId}" names no layer in this document`,
|
|
447
|
+
layer: doc.activeLayerId
|
|
448
|
+
});
|
|
449
|
+
}
|
|
450
|
+
if (layerIds.size !== doc.layers.length) {
|
|
451
|
+
issues.push({
|
|
452
|
+
severity: "error",
|
|
453
|
+
code: "duplicate_layer_id",
|
|
454
|
+
message: "two layers share one id"
|
|
455
|
+
});
|
|
456
|
+
}
|
|
457
|
+
for (const layer of doc.layers) {
|
|
458
|
+
if (layer.opacity < 0 || layer.opacity > 1) {
|
|
459
|
+
issues.push({
|
|
460
|
+
severity: "error",
|
|
461
|
+
code: "opacity_out_of_range",
|
|
462
|
+
message: `layer "${layer.name}" has opacity ${layer.opacity}`,
|
|
463
|
+
layer: layer.id
|
|
464
|
+
});
|
|
465
|
+
}
|
|
466
|
+
if (!BLEND_MODES.includes(layer.blendMode)) {
|
|
467
|
+
issues.push({
|
|
468
|
+
severity: "error",
|
|
469
|
+
code: "unknown_blend_mode",
|
|
470
|
+
message: `layer "${layer.name}" uses blend mode "${layer.blendMode}", which no compositor ships`,
|
|
471
|
+
layer: layer.id
|
|
472
|
+
});
|
|
473
|
+
}
|
|
474
|
+
}
|
|
475
|
+
return issues;
|
|
476
|
+
}
|
|
477
|
+
function snapshotVersion(world, key, name, saveType, document) {
|
|
478
|
+
const list = world.versions.get(key) ?? [];
|
|
479
|
+
const entry = {
|
|
480
|
+
version: list.length + 1,
|
|
481
|
+
name,
|
|
482
|
+
save_type: saveType,
|
|
483
|
+
document: clone(document)
|
|
484
|
+
};
|
|
485
|
+
list.push(entry);
|
|
486
|
+
world.versions.set(key, list);
|
|
487
|
+
return entry;
|
|
488
|
+
}
|
|
489
|
+
function findClip(doc, target) {
|
|
490
|
+
const found = doc.clips.find((c) => c.id === target || c.name === target);
|
|
491
|
+
if (!found) {
|
|
492
|
+
throw new Error(`no clip matching "${target}" (have ${doc.clips.map((c) => c.id).join(", ")})`);
|
|
493
|
+
}
|
|
494
|
+
return found;
|
|
495
|
+
}
|
|
496
|
+
function findLayer(doc, target) {
|
|
497
|
+
const found = doc.layers.find((l) => l.id === target || l.name === target);
|
|
498
|
+
if (!found) {
|
|
499
|
+
throw new Error(`no layer matching "${target}" (have ${doc.layers.map((l) => l.id).join(", ")})`);
|
|
500
|
+
}
|
|
501
|
+
return found;
|
|
502
|
+
}
|
|
503
|
+
/** Apply one timeline edit op; throws with the op named when it cannot. */
|
|
504
|
+
function applyTimelineOp(doc, op) {
|
|
505
|
+
const kind = str(op["op"]);
|
|
506
|
+
switch (kind) {
|
|
507
|
+
case "get_state":
|
|
508
|
+
return;
|
|
509
|
+
case "add_track": {
|
|
510
|
+
const type = str(op["type"], "video");
|
|
511
|
+
let id = str(op["id"]) || `track_${type}`;
|
|
512
|
+
let n = 2;
|
|
513
|
+
while (doc.tracks.some((t) => t.id === id))
|
|
514
|
+
id = `track_${type}_${n++}`;
|
|
515
|
+
doc.tracks.push({ id, type, name: str(op["name"], type) });
|
|
516
|
+
return;
|
|
517
|
+
}
|
|
518
|
+
case "add_text_clip": {
|
|
519
|
+
const track = doc.tracks.find((t) => t.type === "text");
|
|
520
|
+
if (!track)
|
|
521
|
+
throw new Error("the document has no text track to add to");
|
|
522
|
+
const text = str(op["text"], "Text");
|
|
523
|
+
doc.clips.push({
|
|
524
|
+
id: `clip_${slug(text)}`,
|
|
525
|
+
trackId: track.id,
|
|
526
|
+
name: text,
|
|
527
|
+
startMs: num(op["startMs"], 0),
|
|
528
|
+
durationMs: num(op["durationMs"], 2000),
|
|
529
|
+
animations: []
|
|
530
|
+
});
|
|
531
|
+
return;
|
|
532
|
+
}
|
|
533
|
+
case "split_clip": {
|
|
534
|
+
const clip = findClip(doc, str(op["target"]));
|
|
535
|
+
const atMs = num(op["atMs"], Math.round(clip.durationMs / 2));
|
|
536
|
+
const offset = atMs - clip.startMs;
|
|
537
|
+
if (offset <= 0 || offset >= clip.durationMs) {
|
|
538
|
+
throw new Error(`atMs ${atMs} is outside clip "${clip.id}"`);
|
|
539
|
+
}
|
|
540
|
+
const tail = {
|
|
541
|
+
id: `${clip.id}_b`,
|
|
542
|
+
trackId: clip.trackId,
|
|
543
|
+
name: `${clip.name} (b)`,
|
|
544
|
+
startMs: atMs,
|
|
545
|
+
durationMs: clip.durationMs - offset,
|
|
546
|
+
animations: []
|
|
547
|
+
};
|
|
548
|
+
clip.durationMs = offset;
|
|
549
|
+
doc.clips.push(tail);
|
|
550
|
+
return;
|
|
551
|
+
}
|
|
552
|
+
case "animate_clip": {
|
|
553
|
+
const clip = findClip(doc, str(op["target"]));
|
|
554
|
+
clip.animations = recList(op["animations"]).map((a) => ({
|
|
555
|
+
role: str(a["role"], "in"),
|
|
556
|
+
preset: str(a["preset"], "fade")
|
|
557
|
+
}));
|
|
558
|
+
return;
|
|
559
|
+
}
|
|
560
|
+
case "move_clip": {
|
|
561
|
+
const clip = findClip(doc, str(op["target"]));
|
|
562
|
+
clip.startMs = num(op["startMs"], clip.startMs);
|
|
563
|
+
return;
|
|
564
|
+
}
|
|
565
|
+
case "remove_clip": {
|
|
566
|
+
const clip = findClip(doc, str(op["target"]));
|
|
567
|
+
doc.clips = doc.clips.filter((c) => c.id !== clip.id);
|
|
568
|
+
return;
|
|
569
|
+
}
|
|
570
|
+
default:
|
|
571
|
+
throw new Error(`unknown op "${kind}" — try get_state, add_track, add_text_clip, ` +
|
|
572
|
+
"split_clip, animate_clip, move_clip, remove_clip");
|
|
573
|
+
}
|
|
574
|
+
}
|
|
575
|
+
function applySketchOp(doc, op) {
|
|
576
|
+
const kind = str(op["op"]);
|
|
577
|
+
switch (kind) {
|
|
578
|
+
case "get_state":
|
|
579
|
+
return;
|
|
580
|
+
case "add_layer": {
|
|
581
|
+
const name = str(op["name"], "Layer");
|
|
582
|
+
let id = str(op["id"]) || `layer_${slug(name)}`;
|
|
583
|
+
let n = 2;
|
|
584
|
+
while (doc.layers.some((l) => l.id === id))
|
|
585
|
+
id = `layer_${slug(name)}_${n++}`;
|
|
586
|
+
doc.layers.push({
|
|
587
|
+
id,
|
|
588
|
+
name,
|
|
589
|
+
opacity: num(op["opacity"], 1),
|
|
590
|
+
blendMode: str(op["blendMode"], "normal"),
|
|
591
|
+
visible: true
|
|
592
|
+
});
|
|
593
|
+
return;
|
|
594
|
+
}
|
|
595
|
+
case "set_layer_props": {
|
|
596
|
+
const layer = findLayer(doc, str(op["target"]));
|
|
597
|
+
if (op["opacity"] !== undefined)
|
|
598
|
+
layer.opacity = num(op["opacity"], layer.opacity);
|
|
599
|
+
if (op["blendMode"] !== undefined)
|
|
600
|
+
layer.blendMode = str(op["blendMode"], layer.blendMode);
|
|
601
|
+
if (op["visible"] !== undefined)
|
|
602
|
+
layer.visible = op["visible"] !== false;
|
|
603
|
+
if (op["name"] !== undefined)
|
|
604
|
+
layer.name = str(op["name"], layer.name);
|
|
605
|
+
return;
|
|
606
|
+
}
|
|
607
|
+
case "set_active_layer": {
|
|
608
|
+
const layer = findLayer(doc, str(op["target"]));
|
|
609
|
+
doc.activeLayerId = layer.id;
|
|
610
|
+
return;
|
|
611
|
+
}
|
|
612
|
+
case "remove_layer": {
|
|
613
|
+
const layer = findLayer(doc, str(op["target"]));
|
|
614
|
+
doc.layers = doc.layers.filter((l) => l.id !== layer.id);
|
|
615
|
+
return;
|
|
616
|
+
}
|
|
617
|
+
default:
|
|
618
|
+
throw new Error(`unknown op "${kind}" — try get_state, add_layer, set_layer_props, ` +
|
|
619
|
+
"set_active_layer, remove_layer");
|
|
620
|
+
}
|
|
621
|
+
}
|
|
622
|
+
function applyScriptOp(doc, op) {
|
|
623
|
+
const kind = str(op["op"]);
|
|
624
|
+
switch (kind) {
|
|
625
|
+
case "get_state":
|
|
626
|
+
return;
|
|
627
|
+
case "add_speaker": {
|
|
628
|
+
const name = str(op["name"], "Speaker");
|
|
629
|
+
doc.cast.push({
|
|
630
|
+
name,
|
|
631
|
+
provider: str(op["provider"], "openai"),
|
|
632
|
+
model: str(op["model"], "tts-1"),
|
|
633
|
+
voice: str(op["voice"], "alloy")
|
|
634
|
+
});
|
|
635
|
+
return;
|
|
636
|
+
}
|
|
637
|
+
case "add_line": {
|
|
638
|
+
doc.lines.push({
|
|
639
|
+
id: `line_${doc.lines.length + 1}`,
|
|
640
|
+
speaker: str(op["speaker"], doc.cast[0]?.name ?? "Narrator"),
|
|
641
|
+
text: str(op["text"]),
|
|
642
|
+
status: "draft",
|
|
643
|
+
take: null,
|
|
644
|
+
duration_seconds: 0
|
|
645
|
+
});
|
|
646
|
+
return;
|
|
647
|
+
}
|
|
648
|
+
case "set_line_text": {
|
|
649
|
+
const target = str(op["target"]);
|
|
650
|
+
const line = doc.lines.find((l) => l.id === target);
|
|
651
|
+
if (!line)
|
|
652
|
+
throw new Error(`no line with id "${target}"`);
|
|
653
|
+
line.text = str(op["text"], line.text);
|
|
654
|
+
if (line.status === "voiced")
|
|
655
|
+
line.status = "stale";
|
|
656
|
+
return;
|
|
657
|
+
}
|
|
658
|
+
default:
|
|
659
|
+
throw new Error(`unknown op "${kind}" — try get_state, add_speaker, add_line, set_line_text`);
|
|
660
|
+
}
|
|
661
|
+
}
|
|
662
|
+
/** The two sources a shot's duration may come from; anything else is an error. */
|
|
663
|
+
function durationSource(value, fallback) {
|
|
664
|
+
if (value === undefined && fallback !== undefined)
|
|
665
|
+
return fallback;
|
|
666
|
+
if (value === "audio" || value === "manual")
|
|
667
|
+
return value;
|
|
668
|
+
throw new Error('duration_source must be "audio" or "manual"');
|
|
669
|
+
}
|
|
670
|
+
function applyStoryboardOp(doc, op) {
|
|
671
|
+
const kind = str(op["op"]);
|
|
672
|
+
switch (kind) {
|
|
673
|
+
case "get_state":
|
|
674
|
+
return;
|
|
675
|
+
case "add_shot": {
|
|
676
|
+
const action = str(op["action"], "Shot");
|
|
677
|
+
doc.shots.push({
|
|
678
|
+
id: `shot_${doc.shots.length + 1}`,
|
|
679
|
+
slug: slug(action).slice(0, 24),
|
|
680
|
+
action,
|
|
681
|
+
duration_seconds: num(op["duration_seconds"], 3),
|
|
682
|
+
duration_source: durationSource(op["duration_source"], "manual"),
|
|
683
|
+
still: null,
|
|
684
|
+
clip: null,
|
|
685
|
+
revision: 1
|
|
686
|
+
});
|
|
687
|
+
return;
|
|
688
|
+
}
|
|
689
|
+
case "reorder_shot": {
|
|
690
|
+
const target = str(op["target"]);
|
|
691
|
+
const from = doc.shots.findIndex((s) => s.id === target || s.slug === target);
|
|
692
|
+
if (from < 0)
|
|
693
|
+
throw new Error(`no shot matching "${target}"`);
|
|
694
|
+
const [shot] = doc.shots.splice(from, 1);
|
|
695
|
+
doc.shots.splice(Math.max(0, num(op["index"], 0)), 0, shot);
|
|
696
|
+
return;
|
|
697
|
+
}
|
|
698
|
+
case "update_shot": {
|
|
699
|
+
const target = str(op["target"]);
|
|
700
|
+
const shot = doc.shots.find((s) => s.id === target || s.slug === target);
|
|
701
|
+
if (!shot)
|
|
702
|
+
throw new Error(`no shot matching "${target}"`);
|
|
703
|
+
if (op["action"] !== undefined)
|
|
704
|
+
shot.action = str(op["action"], shot.action);
|
|
705
|
+
if (op["duration_seconds"] !== undefined) {
|
|
706
|
+
shot.duration_seconds = num(op["duration_seconds"], shot.duration_seconds);
|
|
707
|
+
}
|
|
708
|
+
if (op["duration_source"] !== undefined) {
|
|
709
|
+
shot.duration_source = durationSource(op["duration_source"]);
|
|
710
|
+
}
|
|
711
|
+
return;
|
|
712
|
+
}
|
|
713
|
+
case "remove_shot": {
|
|
714
|
+
const target = str(op["target"]);
|
|
715
|
+
const at = doc.shots.findIndex((s) => s.id === target || s.slug === target);
|
|
716
|
+
if (at < 0)
|
|
717
|
+
throw new Error(`no shot matching "${target}"`);
|
|
718
|
+
doc.shots.splice(at, 1);
|
|
719
|
+
return;
|
|
720
|
+
}
|
|
721
|
+
default:
|
|
722
|
+
throw new Error(`unknown op "${kind}" — try get_state, add_shot, update_shot, ` +
|
|
723
|
+
"remove_shot, reorder_shot");
|
|
724
|
+
}
|
|
725
|
+
}
|
|
726
|
+
/** Resolve `targets` (ids, slugs, or indexes) against a shot list. */
|
|
727
|
+
function resolveShots(doc, targets) {
|
|
728
|
+
const wanted = Array.isArray(targets) ? targets : [];
|
|
729
|
+
if (wanted.length === 0)
|
|
730
|
+
return [];
|
|
731
|
+
return wanted.map((entry) => {
|
|
732
|
+
if (isNumber(entry)) {
|
|
733
|
+
const shot = doc.shots[entry];
|
|
734
|
+
if (!shot)
|
|
735
|
+
throw new Error(`no shot at index ${entry}`);
|
|
736
|
+
return shot;
|
|
737
|
+
}
|
|
738
|
+
const key = String(entry);
|
|
739
|
+
const shot = doc.shots.find((s) => s.id === key || s.slug === key);
|
|
740
|
+
if (!shot)
|
|
741
|
+
throw new Error(`no shot matching "${key}"`);
|
|
742
|
+
return shot;
|
|
743
|
+
});
|
|
744
|
+
}
|
|
745
|
+
// ---------------------------------------------------------------------------
|
|
746
|
+
// the belt
|
|
747
|
+
// ---------------------------------------------------------------------------
|
|
748
|
+
/**
|
|
749
|
+
* Instrumented fakes for the data + creative belt tools, over a fresh world.
|
|
750
|
+
* `web_search` is the one search entry point — the real tool routes across
|
|
751
|
+
* its configured backends host-side, so the belt carries no per-provider
|
|
752
|
+
* search duplicates.
|
|
753
|
+
*/
|
|
754
|
+
export function createSurfaceApiTools(recorder) {
|
|
755
|
+
const world = createWorld();
|
|
756
|
+
const games = new Map();
|
|
757
|
+
const tool = (name, description, schema, impl) => new RecordingTool(name, description, schema, recorder, impl);
|
|
758
|
+
return [
|
|
759
|
+
// -- collections ------------------------------------------------------
|
|
760
|
+
tool("list_collections", "List vector collections.", obj({}), () => ({
|
|
761
|
+
collections: [
|
|
762
|
+
{ name: "handbook", count: HANDBOOK.length },
|
|
763
|
+
{ name: "scratch", count: 0 }
|
|
764
|
+
]
|
|
765
|
+
})),
|
|
766
|
+
tool("query_collection", "Semantic search over a named collection.", obj({ collection: S, query: S, n_results: N }, ["collection"]), (params) => {
|
|
767
|
+
const name = str(params["collection"]);
|
|
768
|
+
if (name !== "handbook") {
|
|
769
|
+
throw new Error(`no collection named "${name}" — try handbook`);
|
|
770
|
+
}
|
|
771
|
+
const query = str(params["query"]);
|
|
772
|
+
const limit = num(params["n_results"], 5);
|
|
773
|
+
const ranked = HANDBOOK.map((doc) => ({
|
|
774
|
+
id: doc.id,
|
|
775
|
+
text: doc.text,
|
|
776
|
+
score: overlap(query, doc.text)
|
|
777
|
+
})).sort((a, b) => b.score - a.score || a.id.localeCompare(b.id));
|
|
778
|
+
return { collection: name, results: ranked.slice(0, limit) };
|
|
779
|
+
}),
|
|
780
|
+
tool("vector_index", "Index one chunk of text under a source id.", obj({ text: S, source_id: S, metadata: obj({}) }, ["text", "source_id"]), (params) => {
|
|
781
|
+
const sourceId = str(params["source_id"]);
|
|
782
|
+
const text = str(params["text"]);
|
|
783
|
+
if (!sourceId || !text) {
|
|
784
|
+
throw new Error("vector_index needs both text and source_id");
|
|
785
|
+
}
|
|
786
|
+
world.indexed = world.indexed.filter((c) => c.source_id !== sourceId);
|
|
787
|
+
world.indexed.push({
|
|
788
|
+
source_id: sourceId,
|
|
789
|
+
text,
|
|
790
|
+
metadata: rec(params["metadata"])
|
|
791
|
+
});
|
|
792
|
+
return { indexed: 1, source_id: sourceId, total: world.indexed.length };
|
|
793
|
+
}),
|
|
794
|
+
tool("vector_batch_index", "Index many chunks at once.", obj({ chunks: ANY_ARRAY, base_metadata: obj({}) }, ["chunks"]), (params) => {
|
|
795
|
+
const chunks = recList(params["chunks"]);
|
|
796
|
+
for (const chunk of chunks) {
|
|
797
|
+
const sourceId = str(chunk["source_id"]);
|
|
798
|
+
if (!sourceId)
|
|
799
|
+
throw new Error("every chunk needs a source_id");
|
|
800
|
+
world.indexed = world.indexed.filter((c) => c.source_id !== sourceId);
|
|
801
|
+
world.indexed.push({
|
|
802
|
+
source_id: sourceId,
|
|
803
|
+
text: str(chunk["text"]),
|
|
804
|
+
metadata: {
|
|
805
|
+
...rec(params["base_metadata"]),
|
|
806
|
+
...rec(chunk["metadata"])
|
|
807
|
+
}
|
|
808
|
+
});
|
|
809
|
+
}
|
|
810
|
+
return { indexed: chunks.length, total: world.indexed.length };
|
|
811
|
+
}),
|
|
812
|
+
tool("vector_text_search", "Semantic search over the indexed chunks.", obj({ text: S, n_results: N }, ["text"]), (params) => {
|
|
813
|
+
const query = str(params["text"]);
|
|
814
|
+
const limit = num(params["n_results"], 5);
|
|
815
|
+
const ranked = world.indexed
|
|
816
|
+
.map((chunk) => ({
|
|
817
|
+
source_id: chunk.source_id,
|
|
818
|
+
text: chunk.text,
|
|
819
|
+
metadata: chunk.metadata,
|
|
820
|
+
score: overlap(query, chunk.text)
|
|
821
|
+
}))
|
|
822
|
+
.filter((hit) => hit.score > 0)
|
|
823
|
+
.sort((a, b) => b.score - a.score || a.source_id.localeCompare(b.source_id));
|
|
824
|
+
return { query, results: ranked.slice(0, limit) };
|
|
825
|
+
}),
|
|
826
|
+
tool("vector_hybrid_search", "Semantic + keyword search fused by reciprocal rank.", obj({ text: S, n_results: N, k_constant: N }, ["text"]), (params) => {
|
|
827
|
+
const query = str(params["text"]);
|
|
828
|
+
const limit = num(params["n_results"], 5);
|
|
829
|
+
const ranked = world.indexed
|
|
830
|
+
.map((chunk) => ({
|
|
831
|
+
source_id: chunk.source_id,
|
|
832
|
+
text: chunk.text,
|
|
833
|
+
// Keyword half nudges exact-substring hits up.
|
|
834
|
+
score: overlap(query, chunk.text) +
|
|
835
|
+
(chunk.text.toLowerCase().includes(query.toLowerCase()) ? 1 : 0)
|
|
836
|
+
}))
|
|
837
|
+
.filter((hit) => hit.score > 0)
|
|
838
|
+
.sort((a, b) => b.score - a.score || a.source_id.localeCompare(b.source_id));
|
|
839
|
+
return { query, results: ranked.slice(0, limit) };
|
|
840
|
+
}),
|
|
841
|
+
// -- memory -----------------------------------------------------------
|
|
842
|
+
tool("memory_save", "Remember something durably in this conversation.", obj({ content: S, title: S, kind: S, resources: ANY_ARRAY }, ["content"]), (params) => {
|
|
843
|
+
const content = str(params["content"]);
|
|
844
|
+
if (!content)
|
|
845
|
+
throw new Error("memory_save needs content");
|
|
846
|
+
const entry = {
|
|
847
|
+
memory_id: `mem_${++world.memorySeq}`,
|
|
848
|
+
title: str(params["title"], content.slice(0, 40)),
|
|
849
|
+
content,
|
|
850
|
+
kind: str(params["kind"], "note"),
|
|
851
|
+
resources: Array.isArray(params["resources"])
|
|
852
|
+
? params["resources"]
|
|
853
|
+
: []
|
|
854
|
+
};
|
|
855
|
+
world.memories.push(entry);
|
|
856
|
+
return { saved: true, memory_id: entry.memory_id };
|
|
857
|
+
}),
|
|
858
|
+
tool("memory_list", "List this conversation's memories.", obj({ limit: N }), (params) => ({
|
|
859
|
+
memories: world.memories.slice(0, num(params["limit"], 50)).map(clone)
|
|
860
|
+
})),
|
|
861
|
+
tool("memory_update", "Update a memory by id.", obj({ memory_id: S, content: S, title: S, resources: ANY_ARRAY }, [
|
|
862
|
+
"memory_id"
|
|
863
|
+
]), (params) => {
|
|
864
|
+
const id = str(params["memory_id"]);
|
|
865
|
+
const entry = world.memories.find((m) => m.memory_id === id);
|
|
866
|
+
if (!entry)
|
|
867
|
+
throw new Error(`no memory with id "${id}"`);
|
|
868
|
+
if (params["content"] !== undefined)
|
|
869
|
+
entry.content = str(params["content"], entry.content);
|
|
870
|
+
if (params["title"] !== undefined)
|
|
871
|
+
entry.title = str(params["title"], entry.title);
|
|
872
|
+
if (Array.isArray(params["resources"]))
|
|
873
|
+
entry.resources = params["resources"];
|
|
874
|
+
return { updated: true, memory_id: id };
|
|
875
|
+
}),
|
|
876
|
+
tool("memory_delete", "Delete a memory by id.", obj({ memory_id: S }, ["memory_id"]), (params) => {
|
|
877
|
+
const id = str(params["memory_id"]);
|
|
878
|
+
const before = world.memories.length;
|
|
879
|
+
world.memories = world.memories.filter((m) => m.memory_id !== id);
|
|
880
|
+
if (world.memories.length === before) {
|
|
881
|
+
throw new Error(`no memory with id "${id}"`);
|
|
882
|
+
}
|
|
883
|
+
return { deleted: true, memory_id: id };
|
|
884
|
+
}),
|
|
885
|
+
// -- threads ----------------------------------------------------------
|
|
886
|
+
tool("list_threads", "List past chat threads, most recently updated first.", obj({ limit: N, workflow_id: S, cursor: S, preview: B }), (params) => {
|
|
887
|
+
const wanted = num(params["limit"], 20);
|
|
888
|
+
const rows = [...world.threads]
|
|
889
|
+
.sort((a, b) => (a.updated_at < b.updated_at ? 1 : -1))
|
|
890
|
+
.slice(0, wanted);
|
|
891
|
+
return {
|
|
892
|
+
threads: rows.map((thread) => {
|
|
893
|
+
const last = [...world.chatMessages]
|
|
894
|
+
.filter((m) => m.thread_id === thread.id)
|
|
895
|
+
.sort((a, b) => (a.created_at < b.created_at ? 1 : -1))[0];
|
|
896
|
+
return {
|
|
897
|
+
...clone(thread),
|
|
898
|
+
last_message: params["preview"] === false || !last
|
|
899
|
+
? undefined
|
|
900
|
+
: { id: last.id, role: last.role, text: last.text }
|
|
901
|
+
};
|
|
902
|
+
})
|
|
903
|
+
};
|
|
904
|
+
}),
|
|
905
|
+
tool("get_thread", "Read one thread and a page of its messages.", obj({
|
|
906
|
+
thread_id: S,
|
|
907
|
+
limit: N,
|
|
908
|
+
newest_first: B,
|
|
909
|
+
cursor: S,
|
|
910
|
+
max_chars: N
|
|
911
|
+
}, ["thread_id"]), (params) => {
|
|
912
|
+
const id = str(params["thread_id"]);
|
|
913
|
+
const thread = world.threads.find((t) => t.id === id);
|
|
914
|
+
if (!thread)
|
|
915
|
+
throw new Error(`no thread with id "${id}"`);
|
|
916
|
+
const ordered = world.chatMessages
|
|
917
|
+
.filter((m) => m.thread_id === id)
|
|
918
|
+
.sort((a, b) => (a.created_at < b.created_at ? -1 : 1));
|
|
919
|
+
const rows = params["newest_first"] === true ? ordered.reverse() : ordered;
|
|
920
|
+
return {
|
|
921
|
+
...clone(thread),
|
|
922
|
+
// Tool calls come back named but without their arguments — the
|
|
923
|
+
// summary the real capability returns.
|
|
924
|
+
messages: rows.slice(0, num(params["limit"], 50)).map((m) => ({
|
|
925
|
+
id: m.id,
|
|
926
|
+
role: m.role,
|
|
927
|
+
text: m.text,
|
|
928
|
+
created_at: m.created_at,
|
|
929
|
+
tool_calls: m.tool_calls?.map((c) => ({ id: c.id, name: c.name }))
|
|
930
|
+
}))
|
|
931
|
+
};
|
|
932
|
+
}),
|
|
933
|
+
tool("get_message", "Read one chat message in full, arguments and all.", obj({ message_id: S }, ["message_id"]), (params) => {
|
|
934
|
+
const id = str(params["message_id"]);
|
|
935
|
+
const message = world.chatMessages.find((m) => m.id === id);
|
|
936
|
+
if (!message)
|
|
937
|
+
throw new Error(`no message with id "${id}"`);
|
|
938
|
+
return clone(message);
|
|
939
|
+
}),
|
|
940
|
+
// -- shared -----------------------------------------------------------
|
|
941
|
+
tool("list_shared", "List entries in shared agent memory (metadata only).", obj({ kind: ANY_ARRAY, key_prefix: S, sources: ANY_ARRAY }), (params) => {
|
|
942
|
+
const kinds = strList(params["kind"]);
|
|
943
|
+
const prefix = str(params["key_prefix"]);
|
|
944
|
+
const entries = world.shared
|
|
945
|
+
.filter((e) => kinds.length === 0 || kinds.includes(e.kind))
|
|
946
|
+
.filter((e) => !prefix || e.key.startsWith(prefix))
|
|
947
|
+
.map((e) => ({
|
|
948
|
+
key: e.key,
|
|
949
|
+
kind: e.kind,
|
|
950
|
+
title: e.title,
|
|
951
|
+
valueBytes: JSON.stringify(e.value).length
|
|
952
|
+
}));
|
|
953
|
+
return { total: entries.length, returned: entries.length, entries };
|
|
954
|
+
}),
|
|
955
|
+
tool("read_shared", "Read full values from shared agent memory by key.", obj({ keys: ANY_ARRAY }, ["keys"]), (params) => {
|
|
956
|
+
const entries = {};
|
|
957
|
+
const missing = [];
|
|
958
|
+
for (const key of strList(params["keys"])) {
|
|
959
|
+
// A bare suffix falls back to the `shared:` namespace, the way the
|
|
960
|
+
// real capability does.
|
|
961
|
+
const hit = world.shared.find((e) => e.key === key) ??
|
|
962
|
+
(key.includes(":")
|
|
963
|
+
? undefined
|
|
964
|
+
: world.shared.find((e) => e.key === `shared:${key}`));
|
|
965
|
+
if (hit)
|
|
966
|
+
entries[key] = clone(hit);
|
|
967
|
+
else
|
|
968
|
+
missing.push(key);
|
|
969
|
+
}
|
|
970
|
+
return { entries, missing };
|
|
971
|
+
}),
|
|
972
|
+
tool("share_result", "Publish a value under the `shared:` namespace.", obj({ key: S, value: {}, title: S, description: S }, ["key", "value"]), (params) => {
|
|
973
|
+
const raw = str(params["key"]);
|
|
974
|
+
if (!raw)
|
|
975
|
+
throw new Error("share_result needs a key");
|
|
976
|
+
const suffix = raw.startsWith("shared:")
|
|
977
|
+
? raw.slice("shared:".length)
|
|
978
|
+
: raw;
|
|
979
|
+
const key = `shared:${suffix}`;
|
|
980
|
+
const entry = {
|
|
981
|
+
key,
|
|
982
|
+
kind: "shared",
|
|
983
|
+
title: str(params["title"], suffix),
|
|
984
|
+
value: params["value"]
|
|
985
|
+
};
|
|
986
|
+
const existing = world.shared.findIndex((e) => e.key === key);
|
|
987
|
+
if (existing >= 0)
|
|
988
|
+
world.shared[existing] = entry;
|
|
989
|
+
else
|
|
990
|
+
world.shared.push(entry);
|
|
991
|
+
return { ok: true, key, kind: "shared" };
|
|
992
|
+
}),
|
|
993
|
+
// -- web --------------------------------------------------------------
|
|
994
|
+
tool("web_search", "Search the web (routes across configured backends host-side). " +
|
|
995
|
+
"search_type picks web, news, or images.", obj({ query: S, backend: S, search_type: S, max_results: N }, ["query"]), (params) => {
|
|
996
|
+
const query = str(params["query"]);
|
|
997
|
+
// One tool, three search types — the shape the real capability has
|
|
998
|
+
// since the google_news / google_images wrappers folded into it.
|
|
999
|
+
if (str(params["search_type"]) === "news") {
|
|
1000
|
+
return {
|
|
1001
|
+
query,
|
|
1002
|
+
results: [
|
|
1003
|
+
{
|
|
1004
|
+
title: "NodeTool 4.2 lands the CodeAct sandbox",
|
|
1005
|
+
url: "https://news.example.dev/nodetool-4-2",
|
|
1006
|
+
published: "2026-07-02"
|
|
1007
|
+
}
|
|
1008
|
+
]
|
|
1009
|
+
};
|
|
1010
|
+
}
|
|
1011
|
+
const ranked = WEB_PAGES.map((page) => ({
|
|
1012
|
+
title: page.title,
|
|
1013
|
+
url: page.url,
|
|
1014
|
+
snippet: page.snippet,
|
|
1015
|
+
score: overlap(query, `${page.title} ${page.snippet} ${page.url}`)
|
|
1016
|
+
}))
|
|
1017
|
+
.sort((a, b) => b.score - a.score || a.url.localeCompare(b.url))
|
|
1018
|
+
.slice(0, num(params["max_results"], 5));
|
|
1019
|
+
return { query, results: ranked };
|
|
1020
|
+
}),
|
|
1021
|
+
tool("http_request", "One HTTP request; returns the body as text.", obj({ url: S, method: S, headers: obj({}), body: S }, ["url"]), (params) => {
|
|
1022
|
+
const url = str(params["url"]);
|
|
1023
|
+
const page = WEB_PAGES.find((p) => p.url === url);
|
|
1024
|
+
return page
|
|
1025
|
+
? { status: 200, url, body: page.text }
|
|
1026
|
+
: { status: 404, url, body: "" };
|
|
1027
|
+
}),
|
|
1028
|
+
tool("browser", "Fetch a page and return its readable text.", obj({ url: S }, ["url"]), (params) => {
|
|
1029
|
+
const url = str(params["url"]);
|
|
1030
|
+
const page = WEB_PAGES.find((p) => p.url === url);
|
|
1031
|
+
if (!page)
|
|
1032
|
+
throw new Error(`nothing served at ${url}`);
|
|
1033
|
+
return { url, title: page.title, text: page.text };
|
|
1034
|
+
}),
|
|
1035
|
+
tool("download_file", "Save a URL's bytes into the workspace.", obj({ url: S, output_file: S }, ["url", "output_file"]), (params) => {
|
|
1036
|
+
const url = str(params["url"]);
|
|
1037
|
+
const page = WEB_PAGES.find((p) => p.url === url);
|
|
1038
|
+
if (!page)
|
|
1039
|
+
throw new Error(`nothing served at ${url}`);
|
|
1040
|
+
return {
|
|
1041
|
+
output_file: str(params["output_file"]),
|
|
1042
|
+
bytes: page.text.length
|
|
1043
|
+
};
|
|
1044
|
+
}),
|
|
1045
|
+
// -- documents --------------------------------------------------------
|
|
1046
|
+
tool("extract_pdf_text", "Extract text from a PDF in the workspace.", obj({ path: S, start_page: N, end_page: N }, ["path"]), (params) => {
|
|
1047
|
+
const path = str(params["path"]);
|
|
1048
|
+
if (path !== "reports/q3.pdf") {
|
|
1049
|
+
throw new Error(`no such file: ${path} (the workspace has reports/q3.pdf)`);
|
|
1050
|
+
}
|
|
1051
|
+
return { path, pages: 1, text: PDF_TEXT };
|
|
1052
|
+
}),
|
|
1053
|
+
tool("extract_pdf_tables", "Extract a PDF's tables to a JSON file.", obj({ path: S, output_file: S }, ["path", "output_file"]), (params) => {
|
|
1054
|
+
const path = str(params["path"]);
|
|
1055
|
+
if (path !== "reports/q3.pdf")
|
|
1056
|
+
throw new Error(`no such file: ${path}`);
|
|
1057
|
+
return {
|
|
1058
|
+
path,
|
|
1059
|
+
output_file: str(params["output_file"], "tables.json"),
|
|
1060
|
+
tables: 1,
|
|
1061
|
+
rows: 3
|
|
1062
|
+
};
|
|
1063
|
+
}),
|
|
1064
|
+
tool("convert_pdf_to_markdown", "Convert a PDF to markdown.", obj({ input_file: S, output_file: S }, ["input_file", "output_file"]), (params) => {
|
|
1065
|
+
const input = str(params["input_file"]);
|
|
1066
|
+
if (input !== "reports/q3.pdf")
|
|
1067
|
+
throw new Error(`no such file: ${input}`);
|
|
1068
|
+
const output = str(params["output_file"], "out.md");
|
|
1069
|
+
return { output_file: output, characters: PDF_TEXT.length + 8 };
|
|
1070
|
+
}),
|
|
1071
|
+
tool("convert_markdown_to_pdf", "Convert markdown to a PDF.", obj({ input_file: S, output_file: S }, ["input_file", "output_file"]), (params) => ({
|
|
1072
|
+
output_file: str(params["output_file"], "out.pdf"),
|
|
1073
|
+
pages: 1
|
|
1074
|
+
})),
|
|
1075
|
+
tool("convert_document", "Convert a document from one format to another.", obj({
|
|
1076
|
+
input_file: S,
|
|
1077
|
+
output_file: S,
|
|
1078
|
+
from_format: S,
|
|
1079
|
+
to_format: S,
|
|
1080
|
+
extra_args: ANY_ARRAY
|
|
1081
|
+
}, ["input_file", "output_file"]), (params) => ({
|
|
1082
|
+
input_file: str(params["input_file"]),
|
|
1083
|
+
output_file: str(params["output_file"]),
|
|
1084
|
+
converted: true
|
|
1085
|
+
})),
|
|
1086
|
+
// -- settings ---------------------------------------------------------
|
|
1087
|
+
tool("list_settings", "List NodeTool's configuration settings.", obj({ group: S }), (params) => {
|
|
1088
|
+
const group = str(params["group"]).toLowerCase();
|
|
1089
|
+
const settings = world.settingCatalog
|
|
1090
|
+
.filter((def) => !group || def.group.toLowerCase() === group)
|
|
1091
|
+
.map((def) => ({
|
|
1092
|
+
...def,
|
|
1093
|
+
value: world.settingValues.get(def.key) ?? null
|
|
1094
|
+
}));
|
|
1095
|
+
return { settings };
|
|
1096
|
+
}),
|
|
1097
|
+
tool("get_setting", "Read one setting's value.", obj({ key: S }, ["key"]), (params) => {
|
|
1098
|
+
const key = str(params["key"]);
|
|
1099
|
+
const def = world.settingCatalog.find((d) => d.key === key);
|
|
1100
|
+
if (!def) {
|
|
1101
|
+
return {
|
|
1102
|
+
ok: false,
|
|
1103
|
+
error: `no setting named "${key}"`,
|
|
1104
|
+
error_kind: "unknown_setting"
|
|
1105
|
+
};
|
|
1106
|
+
}
|
|
1107
|
+
return { ...def, value: world.settingValues.get(key) ?? null };
|
|
1108
|
+
}),
|
|
1109
|
+
tool("set_setting", "Change one setting.", obj({ key: S, value: S }, ["key", "value"]), (params) => {
|
|
1110
|
+
const key = str(params["key"]);
|
|
1111
|
+
const value = str(params["value"]);
|
|
1112
|
+
if (world.secretCatalog.some((sec) => sec.key === key)) {
|
|
1113
|
+
return {
|
|
1114
|
+
ok: false,
|
|
1115
|
+
error: `${key} holds a credential — call request_secret instead`,
|
|
1116
|
+
error_kind: "is_secret"
|
|
1117
|
+
};
|
|
1118
|
+
}
|
|
1119
|
+
const def = world.settingCatalog.find((d) => d.key === key);
|
|
1120
|
+
if (!def) {
|
|
1121
|
+
return {
|
|
1122
|
+
ok: false,
|
|
1123
|
+
error: `no setting named "${key}"`,
|
|
1124
|
+
error_kind: "unknown_setting"
|
|
1125
|
+
};
|
|
1126
|
+
}
|
|
1127
|
+
if (def.allowed_values && !def.allowed_values.includes(value)) {
|
|
1128
|
+
return {
|
|
1129
|
+
ok: false,
|
|
1130
|
+
error: `${key} accepts only: ${def.allowed_values.join(", ")}`,
|
|
1131
|
+
error_kind: "invalid_value"
|
|
1132
|
+
};
|
|
1133
|
+
}
|
|
1134
|
+
world.settingValues.set(key, value);
|
|
1135
|
+
return { ok: true, key, value };
|
|
1136
|
+
}),
|
|
1137
|
+
tool("list_secrets", "Which credentials this install holds. Never their values.", obj({}), () => ({
|
|
1138
|
+
secrets: world.secretCatalog.map((sec) => ({
|
|
1139
|
+
...sec,
|
|
1140
|
+
configured: world.configuredSecrets.has(sec.key)
|
|
1141
|
+
}))
|
|
1142
|
+
})),
|
|
1143
|
+
tool("request_secret", "Ask the user to enter a credential in a dialog. Takes no value.", obj({ key: S, reason: S, help_url: S }, ["key"]), (params) => {
|
|
1144
|
+
const key = str(params["key"]);
|
|
1145
|
+
// The fake user always saves. What is worth scoring is that the model
|
|
1146
|
+
// asked rather than trying to write the value itself — there is no
|
|
1147
|
+
// parameter here it could have written it into.
|
|
1148
|
+
world.secretRequests.push({ key, reason: str(params["reason"]) });
|
|
1149
|
+
world.configuredSecrets.add(key);
|
|
1150
|
+
return { ok: true, key, configured: true };
|
|
1151
|
+
}),
|
|
1152
|
+
// -- email ------------------------------------------------------------
|
|
1153
|
+
tool("search_email", "Search the mailbox.", obj({
|
|
1154
|
+
subject: S,
|
|
1155
|
+
text: S,
|
|
1156
|
+
from: S,
|
|
1157
|
+
since_hours_ago: N,
|
|
1158
|
+
max_results: N,
|
|
1159
|
+
include_archived: B
|
|
1160
|
+
}), (params) => {
|
|
1161
|
+
const subject = str(params["subject"]).toLowerCase();
|
|
1162
|
+
const text = str(params["text"]).toLowerCase();
|
|
1163
|
+
const from = str(params["from"]).toLowerCase();
|
|
1164
|
+
const since = num(params["since_hours_ago"], Number.POSITIVE_INFINITY);
|
|
1165
|
+
const includeArchived = params["include_archived"] === true;
|
|
1166
|
+
const matched = world.emails.filter((message) => {
|
|
1167
|
+
if (!includeArchived && message.archived)
|
|
1168
|
+
return false;
|
|
1169
|
+
if (message.hours_ago > since)
|
|
1170
|
+
return false;
|
|
1171
|
+
const haystack = `${message.subject} ${message.from}`.toLowerCase();
|
|
1172
|
+
if (subject && !message.subject.toLowerCase().includes(subject))
|
|
1173
|
+
return false;
|
|
1174
|
+
if (from && !message.from.toLowerCase().includes(from))
|
|
1175
|
+
return false;
|
|
1176
|
+
if (text && !haystack.includes(text))
|
|
1177
|
+
return false;
|
|
1178
|
+
return true;
|
|
1179
|
+
});
|
|
1180
|
+
return {
|
|
1181
|
+
messages: matched
|
|
1182
|
+
.slice(0, num(params["max_results"], 25))
|
|
1183
|
+
.map((message) => ({
|
|
1184
|
+
message_id: message.message_id,
|
|
1185
|
+
subject: message.subject,
|
|
1186
|
+
from: message.from,
|
|
1187
|
+
hours_ago: message.hours_ago,
|
|
1188
|
+
labels: [...message.labels]
|
|
1189
|
+
}))
|
|
1190
|
+
};
|
|
1191
|
+
}),
|
|
1192
|
+
tool("add_label_to_email", "Add one label to one message.", obj({ message_id: S, label: S }, ["message_id", "label"]), (params) => {
|
|
1193
|
+
const id = str(params["message_id"]);
|
|
1194
|
+
const label = str(params["label"]);
|
|
1195
|
+
const message = world.emails.find((m) => m.message_id === id);
|
|
1196
|
+
if (!message)
|
|
1197
|
+
throw new Error(`no message with id "${id}"`);
|
|
1198
|
+
if (!label)
|
|
1199
|
+
throw new Error("add_label_to_email needs a label");
|
|
1200
|
+
if (!message.labels.includes(label))
|
|
1201
|
+
message.labels.push(label);
|
|
1202
|
+
return { message_id: id, labels: [...message.labels] };
|
|
1203
|
+
}),
|
|
1204
|
+
tool("archive_email", "Archive messages by id.", obj({ message_ids: ANY_ARRAY }, ["message_ids"]), (params) => {
|
|
1205
|
+
const ids = strList(params["message_ids"]);
|
|
1206
|
+
let archived = 0;
|
|
1207
|
+
for (const id of ids) {
|
|
1208
|
+
const message = world.emails.find((m) => m.message_id === id);
|
|
1209
|
+
if (!message)
|
|
1210
|
+
throw new Error(`no message with id "${id}"`);
|
|
1211
|
+
if (!message.archived) {
|
|
1212
|
+
message.archived = true;
|
|
1213
|
+
archived++;
|
|
1214
|
+
}
|
|
1215
|
+
}
|
|
1216
|
+
return { archived, message_ids: ids };
|
|
1217
|
+
}),
|
|
1218
|
+
// -- apps -------------------------------------------------------------
|
|
1219
|
+
tool("debug_app", "Validate and simulate a saved app.", obj({ application_id: S, params: obj({}), interact: ANY_ARRAY, run: B }, [
|
|
1220
|
+
"application_id"
|
|
1221
|
+
]), (params) => {
|
|
1222
|
+
const id = str(params["application_id"]);
|
|
1223
|
+
if (!world.apps.has(id))
|
|
1224
|
+
throw new Error(`no application with id "${id}"`);
|
|
1225
|
+
return {
|
|
1226
|
+
application_id: id,
|
|
1227
|
+
verdict: { ok: true, issues: [] },
|
|
1228
|
+
ran: params["run"] !== false,
|
|
1229
|
+
widgets: [
|
|
1230
|
+
{ id: "Input-1", type: "TextInput" },
|
|
1231
|
+
{ id: "Button-1", type: "Button" },
|
|
1232
|
+
{ id: "Text-1", type: "Text" }
|
|
1233
|
+
]
|
|
1234
|
+
};
|
|
1235
|
+
}),
|
|
1236
|
+
// -- games ------------------------------------------------------------
|
|
1237
|
+
tool("create_native_game", "Create a native game draft.", obj({ name: S }, ["name"]), (params) => {
|
|
1238
|
+
const id = `game_${games.size + 1}`;
|
|
1239
|
+
const saved = { name: str(params["name"]), document: createTopDownRoomGame(id), draft_updated_at: "draft_0" };
|
|
1240
|
+
games.set(id, saved);
|
|
1241
|
+
return { game: { id, name: saved.name, revision: saved.document.revision }, document: clone(saved.document), draft_updated_at: saved.draft_updated_at };
|
|
1242
|
+
}),
|
|
1243
|
+
tool("edit_native_game", "Apply validated game document operations atomically.", obj({ game_id: S, ops: ANY_ARRAY, base_updated_at: S }, ["game_id", "ops"]), (params) => {
|
|
1244
|
+
const id = str(params["game_id"]);
|
|
1245
|
+
const saved = games.get(id);
|
|
1246
|
+
if (!saved) {
|
|
1247
|
+
throw new Error(`no game with id "${id}"`);
|
|
1248
|
+
}
|
|
1249
|
+
if (params["base_updated_at"] !== undefined && params["base_updated_at"] !== saved.draft_updated_at) {
|
|
1250
|
+
return { error: "conflict", message: "Game draft was modified concurrently" };
|
|
1251
|
+
}
|
|
1252
|
+
const ops = recList(params["ops"]).map((op) => gameDocumentOp.parse(op));
|
|
1253
|
+
saved.document = applyGameOps(saved.document, ops);
|
|
1254
|
+
saved.draft_updated_at = `draft_${Number(saved.draft_updated_at.slice(6)) + 1}`;
|
|
1255
|
+
return { game: { id, name: saved.name, revision: saved.document.revision }, document: clone(saved.document), draft_updated_at: saved.draft_updated_at };
|
|
1256
|
+
}),
|
|
1257
|
+
tool("get_native_game", "Read a native game draft.", obj({ game_id: S, view: S }, ["game_id"]), (params) => {
|
|
1258
|
+
const id = str(params["game_id"]);
|
|
1259
|
+
const saved = games.get(id);
|
|
1260
|
+
if (!saved) {
|
|
1261
|
+
throw new Error(`no game with id "${id}"`);
|
|
1262
|
+
}
|
|
1263
|
+
return { game: { id, name: saved.name, revision: saved.document.revision }, document: clone(saved.document), draft_updated_at: saved.draft_updated_at };
|
|
1264
|
+
}),
|
|
1265
|
+
// -- timelines --------------------------------------------------------
|
|
1266
|
+
tool("list_timelines", "List saved timeline sequences.", obj({ limit: N }), () => ({
|
|
1267
|
+
timelines: [...world.timelines.values()].map((doc) => ({
|
|
1268
|
+
timeline_id: doc.id,
|
|
1269
|
+
name: doc.name,
|
|
1270
|
+
tracks: doc.tracks.length,
|
|
1271
|
+
clips: doc.clips.length
|
|
1272
|
+
}))
|
|
1273
|
+
})),
|
|
1274
|
+
tool("validate_timeline", "Statically check a timeline sequence.", obj({ timeline_id: S, document: obj({}) }), (params) => {
|
|
1275
|
+
const id = str(params["timeline_id"]);
|
|
1276
|
+
const inline = rec(params["document"]);
|
|
1277
|
+
const doc = id
|
|
1278
|
+
? needTimeline(world, id)
|
|
1279
|
+
: {
|
|
1280
|
+
id: str(inline["id"], "inline"),
|
|
1281
|
+
name: str(inline["name"], "inline"),
|
|
1282
|
+
tracks: recList(inline["tracks"]).map((track) => ({
|
|
1283
|
+
id: str(track["id"]),
|
|
1284
|
+
type: str(track["type"]),
|
|
1285
|
+
name: str(track["name"])
|
|
1286
|
+
})),
|
|
1287
|
+
clips: recList(inline["clips"]).map((clip) => ({
|
|
1288
|
+
id: str(clip["id"]),
|
|
1289
|
+
trackId: str(clip["trackId"]),
|
|
1290
|
+
name: str(clip["name"]),
|
|
1291
|
+
startMs: num(clip["startMs"], 0),
|
|
1292
|
+
durationMs: num(clip["durationMs"], 0),
|
|
1293
|
+
animations: recList(clip["animations"]).map((animation) => ({
|
|
1294
|
+
role: str(animation["role"]),
|
|
1295
|
+
preset: str(animation["preset"])
|
|
1296
|
+
}))
|
|
1297
|
+
}))
|
|
1298
|
+
};
|
|
1299
|
+
const issues = timelineIssues(doc);
|
|
1300
|
+
return { ok: issues.length === 0, issues, warnings: [] };
|
|
1301
|
+
}),
|
|
1302
|
+
tool("edit_timeline", "Apply document edits to a saved sequence.", obj({ timeline_id: S, ops: ANY_ARRAY }, ["timeline_id", "ops"]), (params) => {
|
|
1303
|
+
const doc = needTimeline(world, str(params["timeline_id"]));
|
|
1304
|
+
const ops = recList(params["ops"]);
|
|
1305
|
+
if (ops.length === 0)
|
|
1306
|
+
throw new Error("edit_timeline needs at least one op");
|
|
1307
|
+
ops.forEach((op, index) => {
|
|
1308
|
+
try {
|
|
1309
|
+
applyTimelineOp(doc, op);
|
|
1310
|
+
}
|
|
1311
|
+
catch (e) {
|
|
1312
|
+
throw new Error(`edit_timeline: op ${index + 1} (${str(op["op"], "?")}): ` +
|
|
1313
|
+
(e instanceof Error ? e.message : String(e)));
|
|
1314
|
+
}
|
|
1315
|
+
});
|
|
1316
|
+
return { ok: true, applied: ops.length, document: clone(doc) };
|
|
1317
|
+
}),
|
|
1318
|
+
tool("list_timeline_versions", "List a sequence's snapshot history.", obj({ timeline_id: S, save_type: S, limit: N }, ["timeline_id"]), (params) => {
|
|
1319
|
+
const id = str(params["timeline_id"]);
|
|
1320
|
+
needTimeline(world, id);
|
|
1321
|
+
return {
|
|
1322
|
+
timeline_id: id,
|
|
1323
|
+
versions: (world.versions.get(`timeline:${id}`) ?? []).map((v) => ({
|
|
1324
|
+
version: v.version,
|
|
1325
|
+
name: v.name,
|
|
1326
|
+
save_type: v.save_type
|
|
1327
|
+
}))
|
|
1328
|
+
};
|
|
1329
|
+
}),
|
|
1330
|
+
tool("get_timeline_version", "Read one snapshot without restoring it.", obj({ timeline_id: S, version: N }, ["timeline_id", "version"]), (params) => {
|
|
1331
|
+
const id = str(params["timeline_id"]);
|
|
1332
|
+
const version = num(params["version"], 0);
|
|
1333
|
+
const found = (world.versions.get(`timeline:${id}`) ?? []).find((v) => v.version === version);
|
|
1334
|
+
if (!found)
|
|
1335
|
+
throw new Error(`no version ${version} for timeline "${id}"`);
|
|
1336
|
+
return { timeline_id: id, version, document: clone(found.document) };
|
|
1337
|
+
}),
|
|
1338
|
+
tool("create_timeline_version", "Snapshot a sequence's current document.", obj({ timeline_id: S, name: S }, ["timeline_id"]), (params) => {
|
|
1339
|
+
const id = str(params["timeline_id"]);
|
|
1340
|
+
const doc = needTimeline(world, id);
|
|
1341
|
+
const entry = snapshotVersion(world, `timeline:${id}`, str(params["name"], "manual save"), "manual", doc);
|
|
1342
|
+
return { timeline_id: id, version: entry.version, name: entry.name };
|
|
1343
|
+
}),
|
|
1344
|
+
tool("restore_timeline_version", "Restore a snapshot, snapshotting the current state first.", obj({ timeline_id: S, version: N }, ["timeline_id", "version"]), (params) => {
|
|
1345
|
+
const id = str(params["timeline_id"]);
|
|
1346
|
+
const doc = needTimeline(world, id);
|
|
1347
|
+
const version = num(params["version"], 0);
|
|
1348
|
+
const found = (world.versions.get(`timeline:${id}`) ?? []).find((v) => v.version === version);
|
|
1349
|
+
if (!found)
|
|
1350
|
+
throw new Error(`no version ${version} for timeline "${id}"`);
|
|
1351
|
+
snapshotVersion(world, `timeline:${id}`, "before restore", "restore", doc);
|
|
1352
|
+
const restored = clone(found.document);
|
|
1353
|
+
world.timelines.set(id, restored);
|
|
1354
|
+
const issues = timelineIssues(restored);
|
|
1355
|
+
return {
|
|
1356
|
+
timeline_id: id,
|
|
1357
|
+
restored: version,
|
|
1358
|
+
validation: { ok: issues.length === 0, issues }
|
|
1359
|
+
};
|
|
1360
|
+
}),
|
|
1361
|
+
tool("delete_timeline_version", "Delete one snapshot. The live sequence is not changed.", obj({ timeline_id: S, version: N }, ["timeline_id", "version"]), (params) => {
|
|
1362
|
+
const id = str(params["timeline_id"]);
|
|
1363
|
+
needTimeline(world, id);
|
|
1364
|
+
const version = num(params["version"], 0);
|
|
1365
|
+
const list = world.versions.get(`timeline:${id}`) ?? [];
|
|
1366
|
+
const idx = list.findIndex((v) => v.version === version);
|
|
1367
|
+
if (idx < 0)
|
|
1368
|
+
throw new Error(`no version ${version} for timeline "${id}"`);
|
|
1369
|
+
list.splice(idx, 1);
|
|
1370
|
+
world.versions.set(`timeline:${id}`, list);
|
|
1371
|
+
return { ok: true, timeline_id: id, deleted_version: version };
|
|
1372
|
+
}),
|
|
1373
|
+
// -- sketches ---------------------------------------------------------
|
|
1374
|
+
tool("list_sketches", "List saved image documents.", obj({ limit: N }), () => ({
|
|
1375
|
+
sketches: [...world.sketches.values()].map((doc) => ({
|
|
1376
|
+
image_document_id: doc.id,
|
|
1377
|
+
name: doc.name,
|
|
1378
|
+
layers: doc.layers.length
|
|
1379
|
+
}))
|
|
1380
|
+
})),
|
|
1381
|
+
tool("create_sketch", "Create a blank sketch (image document).", obj({ name: S, width: N, height: N, id: S }, ["name"]), (params) => {
|
|
1382
|
+
const id = str(params["id"], `sketch_${world.sketches.size + 1}`);
|
|
1383
|
+
if (world.sketches.has(id)) {
|
|
1384
|
+
const existing = world.sketches.get(id);
|
|
1385
|
+
return {
|
|
1386
|
+
ok: true,
|
|
1387
|
+
image_document_id: existing.id,
|
|
1388
|
+
name: existing.name
|
|
1389
|
+
};
|
|
1390
|
+
}
|
|
1391
|
+
const layerId = "layer_1";
|
|
1392
|
+
const doc = {
|
|
1393
|
+
id,
|
|
1394
|
+
name: str(params["name"], "Untitled"),
|
|
1395
|
+
layers: [
|
|
1396
|
+
{
|
|
1397
|
+
id: layerId,
|
|
1398
|
+
name: "Layer 1",
|
|
1399
|
+
opacity: 1,
|
|
1400
|
+
blendMode: "normal",
|
|
1401
|
+
visible: true
|
|
1402
|
+
}
|
|
1403
|
+
],
|
|
1404
|
+
activeLayerId: layerId
|
|
1405
|
+
};
|
|
1406
|
+
world.sketches.set(id, doc);
|
|
1407
|
+
return { ok: true, image_document_id: id, name: doc.name };
|
|
1408
|
+
}),
|
|
1409
|
+
tool("validate_sketch", "Statically check an image document.", obj({ image_document_id: S, document: obj({}) }), (params) => {
|
|
1410
|
+
const id = str(params["image_document_id"]);
|
|
1411
|
+
const inline = rec(params["document"]);
|
|
1412
|
+
const raw = id
|
|
1413
|
+
? needSketch(world, id)
|
|
1414
|
+
: {
|
|
1415
|
+
id: str(inline["id"], "inline"),
|
|
1416
|
+
name: str(inline["name"], "inline"),
|
|
1417
|
+
layers: recList(inline["layers"]).map((layer) => ({
|
|
1418
|
+
id: str(layer["id"]),
|
|
1419
|
+
name: str(layer["name"]),
|
|
1420
|
+
opacity: num(layer["opacity"], 1),
|
|
1421
|
+
blendMode: str(layer["blendMode"], "normal"),
|
|
1422
|
+
visible: layer["visible"] !== false
|
|
1423
|
+
})),
|
|
1424
|
+
activeLayerId: str(inline["activeLayerId"])
|
|
1425
|
+
};
|
|
1426
|
+
const issues = sketchIssues(raw);
|
|
1427
|
+
return { ok: issues.length === 0, issues, warnings: [] };
|
|
1428
|
+
}),
|
|
1429
|
+
tool("edit_sketch", "Apply layer-structure edits to a saved sketch.", obj({ image_document_id: S, ops: ANY_ARRAY }, [
|
|
1430
|
+
"image_document_id",
|
|
1431
|
+
"ops"
|
|
1432
|
+
]), (params) => {
|
|
1433
|
+
const doc = needSketch(world, str(params["image_document_id"]));
|
|
1434
|
+
const ops = recList(params["ops"]);
|
|
1435
|
+
if (ops.length === 0)
|
|
1436
|
+
throw new Error("edit_sketch needs at least one op");
|
|
1437
|
+
ops.forEach((op, index) => {
|
|
1438
|
+
try {
|
|
1439
|
+
applySketchOp(doc, op);
|
|
1440
|
+
}
|
|
1441
|
+
catch (e) {
|
|
1442
|
+
throw new Error(`edit_sketch: op ${index + 1} (${str(op["op"], "?")}): ` +
|
|
1443
|
+
(e instanceof Error ? e.message : String(e)));
|
|
1444
|
+
}
|
|
1445
|
+
});
|
|
1446
|
+
return { ok: true, applied: ops.length, document: clone(doc) };
|
|
1447
|
+
}),
|
|
1448
|
+
tool("list_sketch_versions", "List an image document's snapshot history.", obj({ image_document_id: S, limit: N }, ["image_document_id"]), (params) => {
|
|
1449
|
+
const id = str(params["image_document_id"]);
|
|
1450
|
+
needSketch(world, id);
|
|
1451
|
+
return {
|
|
1452
|
+
image_document_id: id,
|
|
1453
|
+
versions: (world.versions.get(`sketch:${id}`) ?? []).map((v) => ({
|
|
1454
|
+
version: v.version,
|
|
1455
|
+
name: v.name,
|
|
1456
|
+
save_type: v.save_type
|
|
1457
|
+
}))
|
|
1458
|
+
};
|
|
1459
|
+
}),
|
|
1460
|
+
tool("get_sketch_version", "Read one sketch snapshot without restoring it.", obj({ image_document_id: S, version: N }, [
|
|
1461
|
+
"image_document_id",
|
|
1462
|
+
"version"
|
|
1463
|
+
]), (params) => {
|
|
1464
|
+
const id = str(params["image_document_id"]);
|
|
1465
|
+
const version = num(params["version"], 0);
|
|
1466
|
+
const found = (world.versions.get(`sketch:${id}`) ?? []).find((v) => v.version === version);
|
|
1467
|
+
if (!found)
|
|
1468
|
+
throw new Error(`no version ${version} for sketch "${id}"`);
|
|
1469
|
+
return {
|
|
1470
|
+
image_document_id: id,
|
|
1471
|
+
version,
|
|
1472
|
+
document: clone(found.document)
|
|
1473
|
+
};
|
|
1474
|
+
}),
|
|
1475
|
+
tool("create_sketch_version", "Snapshot a sketch's current document.", obj({ image_document_id: S, name: S }, ["image_document_id"]), (params) => {
|
|
1476
|
+
const id = str(params["image_document_id"]);
|
|
1477
|
+
const doc = needSketch(world, id);
|
|
1478
|
+
const entry = snapshotVersion(world, `sketch:${id}`, str(params["name"], "manual save"), "manual", doc);
|
|
1479
|
+
return {
|
|
1480
|
+
image_document_id: id,
|
|
1481
|
+
version: entry.version,
|
|
1482
|
+
name: entry.name
|
|
1483
|
+
};
|
|
1484
|
+
}),
|
|
1485
|
+
tool("restore_sketch_version", "Restore a sketch snapshot, snapshotting the current state first.", obj({ image_document_id: S, version: N }, [
|
|
1486
|
+
"image_document_id",
|
|
1487
|
+
"version"
|
|
1488
|
+
]), (params) => {
|
|
1489
|
+
const id = str(params["image_document_id"]);
|
|
1490
|
+
const doc = needSketch(world, id);
|
|
1491
|
+
const version = num(params["version"], 0);
|
|
1492
|
+
const found = (world.versions.get(`sketch:${id}`) ?? []).find((v) => v.version === version);
|
|
1493
|
+
if (!found)
|
|
1494
|
+
throw new Error(`no version ${version} for sketch "${id}"`);
|
|
1495
|
+
snapshotVersion(world, `sketch:${id}`, "before restore", "restore", doc);
|
|
1496
|
+
const restored = clone(found.document);
|
|
1497
|
+
world.sketches.set(id, restored);
|
|
1498
|
+
const issues = sketchIssues(restored);
|
|
1499
|
+
return {
|
|
1500
|
+
image_document_id: id,
|
|
1501
|
+
restored: version,
|
|
1502
|
+
validation: { ok: issues.length === 0, issues }
|
|
1503
|
+
};
|
|
1504
|
+
}),
|
|
1505
|
+
tool("delete_sketch_version", "Delete one snapshot. The live document is not changed.", obj({ image_document_id: S, version: N }, [
|
|
1506
|
+
"image_document_id",
|
|
1507
|
+
"version"
|
|
1508
|
+
]), (params) => {
|
|
1509
|
+
const id = str(params["image_document_id"]);
|
|
1510
|
+
needSketch(world, id);
|
|
1511
|
+
const version = num(params["version"], 0);
|
|
1512
|
+
const list = world.versions.get(`sketch:${id}`) ?? [];
|
|
1513
|
+
const idx = list.findIndex((v) => v.version === version);
|
|
1514
|
+
if (idx < 0)
|
|
1515
|
+
throw new Error(`no version ${version} for sketch "${id}"`);
|
|
1516
|
+
list.splice(idx, 1);
|
|
1517
|
+
world.versions.set(`sketch:${id}`, list);
|
|
1518
|
+
return { ok: true, image_document_id: id, deleted_version: version };
|
|
1519
|
+
}),
|
|
1520
|
+
// -- scripts ----------------------------------------------------------
|
|
1521
|
+
tool("list_scripts", "List saved scripts.", obj({ limit: N }), () => ({
|
|
1522
|
+
scripts: [...world.scripts.values()].map((doc) => ({
|
|
1523
|
+
script_id: doc.script_id,
|
|
1524
|
+
name: doc.name,
|
|
1525
|
+
lines: doc.lines.length,
|
|
1526
|
+
voiced: doc.lines.filter((l) => l.status === "voiced").length
|
|
1527
|
+
}))
|
|
1528
|
+
})),
|
|
1529
|
+
tool("get_script", "One script: cast, lines, and each line's voicing status.", obj({ script_id: S }, ["script_id"]), (params) => {
|
|
1530
|
+
const id = str(params["script_id"]);
|
|
1531
|
+
const doc = world.scripts.get(id);
|
|
1532
|
+
if (!doc)
|
|
1533
|
+
throw new Error(`no script with id "${id}"`);
|
|
1534
|
+
return clone(doc);
|
|
1535
|
+
}),
|
|
1536
|
+
tool("voice_script_lines", "Synthesize a take per line; defaults to every draft or stale line.", obj({
|
|
1537
|
+
script_id: S,
|
|
1538
|
+
targets: ANY_ARRAY,
|
|
1539
|
+
provider: S,
|
|
1540
|
+
model: S,
|
|
1541
|
+
voice: S,
|
|
1542
|
+
transcribe: B
|
|
1543
|
+
}, ["script_id"]), (params) => {
|
|
1544
|
+
const id = str(params["script_id"]);
|
|
1545
|
+
const doc = world.scripts.get(id);
|
|
1546
|
+
if (!doc)
|
|
1547
|
+
throw new Error(`no script with id "${id}"`);
|
|
1548
|
+
const requested = strList(params["targets"]);
|
|
1549
|
+
const targets = requested.length > 0
|
|
1550
|
+
? requested.map((target) => {
|
|
1551
|
+
const line = doc.lines.find((l) => l.id === target);
|
|
1552
|
+
if (!line)
|
|
1553
|
+
throw new Error(`no line with id "${target}"`);
|
|
1554
|
+
return line;
|
|
1555
|
+
})
|
|
1556
|
+
: doc.lines.filter((l) => l.status !== "voiced");
|
|
1557
|
+
const voiced = [];
|
|
1558
|
+
const skipped = [];
|
|
1559
|
+
for (const line of targets) {
|
|
1560
|
+
if (line.status === "voiced" && requested.length === 0) {
|
|
1561
|
+
skipped.push(line.id);
|
|
1562
|
+
continue;
|
|
1563
|
+
}
|
|
1564
|
+
line.status = "voiced";
|
|
1565
|
+
line.take = `asset://take_${line.id}`;
|
|
1566
|
+
line.duration_seconds = Math.max(1, Math.round(line.text.length / 10));
|
|
1567
|
+
voiced.push(line.id);
|
|
1568
|
+
}
|
|
1569
|
+
return { script_id: id, voiced, skipped };
|
|
1570
|
+
}),
|
|
1571
|
+
tool("assemble_script_timeline", "Lay the voiced takes end to end into a saved timeline sequence.", obj({ script_id: S, name: S }, ["script_id"]), (params) => {
|
|
1572
|
+
const id = str(params["script_id"]);
|
|
1573
|
+
const doc = world.scripts.get(id);
|
|
1574
|
+
if (!doc)
|
|
1575
|
+
throw new Error(`no script with id "${id}"`);
|
|
1576
|
+
const voiced = doc.lines.filter((l) => l.status === "voiced");
|
|
1577
|
+
if (voiced.length === 0) {
|
|
1578
|
+
throw new Error(`script "${id}" has no voiced takes to assemble`);
|
|
1579
|
+
}
|
|
1580
|
+
const timelineId = `tl_${id}`;
|
|
1581
|
+
let startMs = 0;
|
|
1582
|
+
const clips = voiced.map((line) => {
|
|
1583
|
+
const clip = {
|
|
1584
|
+
id: `clip_${line.id}`,
|
|
1585
|
+
trackId: "track_voiceover",
|
|
1586
|
+
name: line.text.slice(0, 24),
|
|
1587
|
+
startMs,
|
|
1588
|
+
durationMs: line.duration_seconds * 1000,
|
|
1589
|
+
animations: []
|
|
1590
|
+
};
|
|
1591
|
+
startMs += clip.durationMs;
|
|
1592
|
+
return clip;
|
|
1593
|
+
});
|
|
1594
|
+
world.timelines.set(timelineId, {
|
|
1595
|
+
id: timelineId,
|
|
1596
|
+
name: `${doc.name} voiceover`,
|
|
1597
|
+
tracks: [{ id: "track_voiceover", type: "audio", name: "Voiceover" }],
|
|
1598
|
+
clips
|
|
1599
|
+
});
|
|
1600
|
+
return {
|
|
1601
|
+
timeline_id: timelineId,
|
|
1602
|
+
clips: clips.length,
|
|
1603
|
+
skipped: doc.lines.length - voiced.length,
|
|
1604
|
+
duration_seconds: startMs / 1000
|
|
1605
|
+
};
|
|
1606
|
+
}),
|
|
1607
|
+
tool("edit_script", "Apply cast/line edits to a saved script.", obj({ script_id: S, ops: ANY_ARRAY }, ["script_id", "ops"]), (params) => {
|
|
1608
|
+
const id = str(params["script_id"]);
|
|
1609
|
+
const doc = world.scripts.get(id);
|
|
1610
|
+
if (!doc)
|
|
1611
|
+
throw new Error(`no script with id "${id}"`);
|
|
1612
|
+
const ops = recList(params["ops"]);
|
|
1613
|
+
if (ops.length === 0)
|
|
1614
|
+
throw new Error("edit_script needs at least one op");
|
|
1615
|
+
ops.forEach((op, index) => {
|
|
1616
|
+
try {
|
|
1617
|
+
applyScriptOp(doc, op);
|
|
1618
|
+
}
|
|
1619
|
+
catch (e) {
|
|
1620
|
+
throw new Error(`edit_script: op ${index + 1} (${str(op["op"], "?")}): ` +
|
|
1621
|
+
(e instanceof Error ? e.message : String(e)));
|
|
1622
|
+
}
|
|
1623
|
+
});
|
|
1624
|
+
return { ok: true, applied: ops.length, document: clone(doc) };
|
|
1625
|
+
}),
|
|
1626
|
+
// -- storyboards ------------------------------------------------------
|
|
1627
|
+
tool("list_storyboards", "List saved storyboards.", obj({ limit: N }), () => ({
|
|
1628
|
+
storyboards: [...world.storyboards.values()].map((doc) => ({
|
|
1629
|
+
storyboard_id: doc.storyboard_id,
|
|
1630
|
+
name: doc.name,
|
|
1631
|
+
shots: doc.shots.length,
|
|
1632
|
+
stills: doc.shots.filter((s) => s.still !== null).length,
|
|
1633
|
+
clips: doc.shots.filter((s) => s.clip !== null).length
|
|
1634
|
+
}))
|
|
1635
|
+
})),
|
|
1636
|
+
tool("create_storyboard", "Create a blank storyboard.", obj({ name: S, brief: S, style: S, aspect_ratio: S, id: S }, ["name"]), (params) => {
|
|
1637
|
+
const id = str(params["id"], `sb_${world.storyboards.size + 1}`);
|
|
1638
|
+
if (world.storyboards.has(id)) {
|
|
1639
|
+
const existing = world.storyboards.get(id);
|
|
1640
|
+
return {
|
|
1641
|
+
ok: true,
|
|
1642
|
+
storyboard_id: existing.storyboard_id,
|
|
1643
|
+
name: existing.name
|
|
1644
|
+
};
|
|
1645
|
+
}
|
|
1646
|
+
const name = str(params["name"], "Untitled");
|
|
1647
|
+
const doc = {
|
|
1648
|
+
storyboard_id: id,
|
|
1649
|
+
name,
|
|
1650
|
+
image_model: { provider: "fal_ai", model: "fal-ai/flux/schnell" },
|
|
1651
|
+
video_model: { provider: "fal_ai", model: "fal-ai/ltx" },
|
|
1652
|
+
shots: []
|
|
1653
|
+
};
|
|
1654
|
+
world.storyboards.set(id, doc);
|
|
1655
|
+
return { ok: true, storyboard_id: id, name, shots: 0 };
|
|
1656
|
+
}),
|
|
1657
|
+
tool("get_storyboard", "One board: its shots, their status, and its models.", obj({ storyboard_id: S }, ["storyboard_id"]), (params) => {
|
|
1658
|
+
const id = str(params["storyboard_id"]);
|
|
1659
|
+
const doc = world.storyboards.get(id);
|
|
1660
|
+
if (!doc)
|
|
1661
|
+
throw new Error(`no storyboard with id "${id}"`);
|
|
1662
|
+
return {
|
|
1663
|
+
storyboard_id: doc.storyboard_id,
|
|
1664
|
+
name: doc.name,
|
|
1665
|
+
image_model: doc.image_model,
|
|
1666
|
+
video_model: doc.video_model,
|
|
1667
|
+
shots: doc.shots.map((shot) => ({
|
|
1668
|
+
id: shot.id,
|
|
1669
|
+
slug: shot.slug,
|
|
1670
|
+
action: shot.action,
|
|
1671
|
+
duration_seconds: shot.duration_seconds,
|
|
1672
|
+
duration_source: shot.duration_source,
|
|
1673
|
+
has_still: shot.still !== null,
|
|
1674
|
+
has_clip: shot.clip !== null,
|
|
1675
|
+
revision: shot.revision
|
|
1676
|
+
}))
|
|
1677
|
+
};
|
|
1678
|
+
}),
|
|
1679
|
+
tool("render_storyboard_stills", "Render a keyframe per shot; defaults to every shot without one.", obj({ storyboard_id: S, targets: ANY_ARRAY, provider: S, model: S }, [
|
|
1680
|
+
"storyboard_id"
|
|
1681
|
+
]), (params) => {
|
|
1682
|
+
const id = str(params["storyboard_id"]);
|
|
1683
|
+
const doc = world.storyboards.get(id);
|
|
1684
|
+
if (!doc)
|
|
1685
|
+
throw new Error(`no storyboard with id "${id}"`);
|
|
1686
|
+
const requested = resolveShots(doc, params["targets"]);
|
|
1687
|
+
const targets = requested.length > 0
|
|
1688
|
+
? requested
|
|
1689
|
+
: doc.shots.filter((s) => s.still === null);
|
|
1690
|
+
const rendered = [];
|
|
1691
|
+
for (const shot of targets) {
|
|
1692
|
+
shot.still = `asset://still_${shot.id}`;
|
|
1693
|
+
rendered.push(shot.id);
|
|
1694
|
+
}
|
|
1695
|
+
return {
|
|
1696
|
+
storyboard_id: id,
|
|
1697
|
+
rendered,
|
|
1698
|
+
model: str(params["model"], doc.image_model.model)
|
|
1699
|
+
};
|
|
1700
|
+
}),
|
|
1701
|
+
tool("render_storyboard_clips", "Animate each shot's keyframe into a clip; a shot without a still is skipped.", obj({ storyboard_id: S, targets: ANY_ARRAY, provider: S, model: S }, [
|
|
1702
|
+
"storyboard_id"
|
|
1703
|
+
]), (params) => {
|
|
1704
|
+
const id = str(params["storyboard_id"]);
|
|
1705
|
+
const doc = world.storyboards.get(id);
|
|
1706
|
+
if (!doc)
|
|
1707
|
+
throw new Error(`no storyboard with id "${id}"`);
|
|
1708
|
+
const requested = resolveShots(doc, params["targets"]);
|
|
1709
|
+
const targets = requested.length > 0
|
|
1710
|
+
? requested
|
|
1711
|
+
: doc.shots.filter((s) => s.clip === null);
|
|
1712
|
+
const rendered = [];
|
|
1713
|
+
const skipped = [];
|
|
1714
|
+
for (const shot of targets) {
|
|
1715
|
+
if (shot.still === null) {
|
|
1716
|
+
skipped.push({
|
|
1717
|
+
id: shot.id,
|
|
1718
|
+
reason: "no keyframe — render its still first"
|
|
1719
|
+
});
|
|
1720
|
+
continue;
|
|
1721
|
+
}
|
|
1722
|
+
shot.clip = `asset://clip_${shot.id}`;
|
|
1723
|
+
rendered.push(shot.id);
|
|
1724
|
+
}
|
|
1725
|
+
return {
|
|
1726
|
+
storyboard_id: id,
|
|
1727
|
+
rendered,
|
|
1728
|
+
skipped,
|
|
1729
|
+
model: str(params["model"], doc.video_model.model)
|
|
1730
|
+
};
|
|
1731
|
+
}),
|
|
1732
|
+
tool("revise_storyboard_clip", "Revise one shot's clip.", obj({ storyboard_id: S, target: S, instruction: S }, [
|
|
1733
|
+
"storyboard_id",
|
|
1734
|
+
"target",
|
|
1735
|
+
"instruction"
|
|
1736
|
+
]), (params) => {
|
|
1737
|
+
const id = str(params["storyboard_id"]);
|
|
1738
|
+
const doc = world.storyboards.get(id);
|
|
1739
|
+
if (!doc)
|
|
1740
|
+
throw new Error(`no storyboard with id "${id}"`);
|
|
1741
|
+
const [shot] = resolveShots(doc, [str(params["target"])]);
|
|
1742
|
+
if (shot.clip === null)
|
|
1743
|
+
throw new Error(`shot "${shot.id}" has no clip to revise`);
|
|
1744
|
+
shot.revision++;
|
|
1745
|
+
shot.clip = `asset://clip_${shot.id}_r${shot.revision}`;
|
|
1746
|
+
return { storyboard_id: id, revised: shot.id, revision: shot.revision };
|
|
1747
|
+
}),
|
|
1748
|
+
tool("assemble_storyboard_timeline", "Lay the rendered clips into a saved timeline sequence.", obj({ storyboard_id: S, name: S }, ["storyboard_id"]), (params) => {
|
|
1749
|
+
const id = str(params["storyboard_id"]);
|
|
1750
|
+
const doc = world.storyboards.get(id);
|
|
1751
|
+
if (!doc)
|
|
1752
|
+
throw new Error(`no storyboard with id "${id}"`);
|
|
1753
|
+
const shots = doc.shots.filter((s) => s.clip !== null);
|
|
1754
|
+
if (shots.length === 0) {
|
|
1755
|
+
throw new Error(`board "${id}" has no rendered clips to assemble`);
|
|
1756
|
+
}
|
|
1757
|
+
const timelineId = `tl_${id}`;
|
|
1758
|
+
let startMs = 0;
|
|
1759
|
+
const clips = shots.map((shot) => {
|
|
1760
|
+
const clip = {
|
|
1761
|
+
id: `clip_${shot.id}`,
|
|
1762
|
+
trackId: "track_video",
|
|
1763
|
+
name: shot.slug,
|
|
1764
|
+
startMs,
|
|
1765
|
+
durationMs: shot.duration_seconds * 1000,
|
|
1766
|
+
animations: []
|
|
1767
|
+
};
|
|
1768
|
+
startMs += clip.durationMs;
|
|
1769
|
+
return clip;
|
|
1770
|
+
});
|
|
1771
|
+
world.timelines.set(timelineId, {
|
|
1772
|
+
id: timelineId,
|
|
1773
|
+
name: `${doc.name} cut`,
|
|
1774
|
+
tracks: [{ id: "track_video", type: "video", name: "Video" }],
|
|
1775
|
+
clips
|
|
1776
|
+
});
|
|
1777
|
+
return {
|
|
1778
|
+
timeline_id: timelineId,
|
|
1779
|
+
clips: clips.length,
|
|
1780
|
+
skipped: doc.shots.length - shots.length,
|
|
1781
|
+
duration_seconds: startMs / 1000
|
|
1782
|
+
};
|
|
1783
|
+
}),
|
|
1784
|
+
tool("edit_storyboard", "Apply shot-list edits to a saved board.", obj({ storyboard_id: S, ops: ANY_ARRAY }, ["storyboard_id", "ops"]), (params) => {
|
|
1785
|
+
const id = str(params["storyboard_id"]);
|
|
1786
|
+
const doc = world.storyboards.get(id);
|
|
1787
|
+
if (!doc)
|
|
1788
|
+
throw new Error(`no storyboard with id "${id}"`);
|
|
1789
|
+
const ops = recList(params["ops"]);
|
|
1790
|
+
if (ops.length === 0)
|
|
1791
|
+
throw new Error("edit_storyboard needs at least one op");
|
|
1792
|
+
ops.forEach((op, index) => {
|
|
1793
|
+
try {
|
|
1794
|
+
applyStoryboardOp(doc, op);
|
|
1795
|
+
}
|
|
1796
|
+
catch (e) {
|
|
1797
|
+
throw new Error(`edit_storyboard: op ${index + 1} (${str(op["op"], "?")}): ` +
|
|
1798
|
+
(e instanceof Error ? e.message : String(e)));
|
|
1799
|
+
}
|
|
1800
|
+
});
|
|
1801
|
+
return { ok: true, applied: ops.length, document: clone(doc) };
|
|
1802
|
+
})
|
|
1803
|
+
];
|
|
1804
|
+
}
|
|
1805
|
+
// ---------------------------------------------------------------------------
|
|
1806
|
+
// cases
|
|
1807
|
+
// ---------------------------------------------------------------------------
|
|
1808
|
+
const field = (result, key) => rec(result)[key];
|
|
1809
|
+
const asNumber = (value) => isNumber(value) ? value : Number.NaN;
|
|
1810
|
+
const asString = (value) => isString(value) ? value : "";
|
|
1811
|
+
export const CODEACT_API_SURFACE_CASES = [
|
|
1812
|
+
{
|
|
1813
|
+
id: "game-whole-document-save",
|
|
1814
|
+
description: "Write and read a complete game level in one atomic edit",
|
|
1815
|
+
namespaces: ["games"],
|
|
1816
|
+
objective: 'Create a native game named "Long Level". Replace its entire draft ' +
|
|
1817
|
+
"in one set_document operation with schema version 2 and a scene named level containing " +
|
|
1818
|
+
"117 entities: one camera, one solid terrain tilemap using the built-in " +
|
|
1819
|
+
"wall asset, and 115 entities named item-0 through item-114. The terrain " +
|
|
1820
|
+
"must have 3,446 tiles. Use the created draft timestamp as the edit guard. " +
|
|
1821
|
+
"Read the saved document back. Finish with {gameId, entityCount, tileCount, " +
|
|
1822
|
+
"entrySceneId, preservedIdentity}, where preservedIdentity confirms the " +
|
|
1823
|
+
"saved document kept the created game id and revision.",
|
|
1824
|
+
outputSchema: obj({ gameId: S, entityCount: N, tileCount: N, entrySceneId: S, preservedIdentity: B }, [
|
|
1825
|
+
"gameId", "entityCount", "tileCount", "entrySceneId", "preservedIdentity"
|
|
1826
|
+
]),
|
|
1827
|
+
expect: {
|
|
1828
|
+
requiredTools: ["create_native_game", "edit_native_game", "get_native_game"],
|
|
1829
|
+
maxActions: 3,
|
|
1830
|
+
minToolCalls: 3,
|
|
1831
|
+
maxToolCalls: 3,
|
|
1832
|
+
resultCheck: (r) => asString(field(r, "gameId")) === "game_1" &&
|
|
1833
|
+
asNumber(field(r, "entityCount")) === 117 &&
|
|
1834
|
+
asNumber(field(r, "tileCount")) === 3446 &&
|
|
1835
|
+
asString(field(r, "entrySceneId")) === "level" &&
|
|
1836
|
+
field(r, "preservedIdentity") === true,
|
|
1837
|
+
resultCheckLabel: "one whole-document save preserves identity and 117 entities / 3446 tiles"
|
|
1838
|
+
}
|
|
1839
|
+
},
|
|
1840
|
+
{
|
|
1841
|
+
id: "rag-index-and-answer",
|
|
1842
|
+
description: "Index a collection's documents, then answer from vector search",
|
|
1843
|
+
namespaces: ["collections"],
|
|
1844
|
+
objective: "The `handbook` collection holds our support policy, one document per " +
|
|
1845
|
+
"topic. Put those documents into the vector index — each under its own " +
|
|
1846
|
+
"document id as the source id — then use vector search to find how many " +
|
|
1847
|
+
"days the refund window is. Finish with {sourceId, days}: the source id " +
|
|
1848
|
+
"of the chunk that answered it, and the number of days as a number.",
|
|
1849
|
+
outputSchema: obj({ sourceId: S, days: N }, ["sourceId", "days"]),
|
|
1850
|
+
expect: {
|
|
1851
|
+
requiredTools: ["query_collection", "vector_text_search"],
|
|
1852
|
+
maxActions: 5,
|
|
1853
|
+
resultCheck: (r) => asString(field(r, "sourceId")) === "policy-refunds" &&
|
|
1854
|
+
asNumber(field(r, "days")) === 30,
|
|
1855
|
+
resultCheckLabel: "sourceId=policy-refunds days=30"
|
|
1856
|
+
}
|
|
1857
|
+
},
|
|
1858
|
+
{
|
|
1859
|
+
id: "memory-lifecycle",
|
|
1860
|
+
description: "Save a memory, correct it in place, and read it back",
|
|
1861
|
+
namespaces: ["memory"],
|
|
1862
|
+
objective: 'Remember for this conversation, under the title "preferred image ' +
|
|
1863
|
+
'model", that the house image model is fal_ai/flux/schnell. Then the ' +
|
|
1864
|
+
"user corrects you: it is really fal_ai/flux/dev. Update the note you " +
|
|
1865
|
+
"just saved in place — do not delete it or add a second one. Finish " +
|
|
1866
|
+
"with {memoryId, content, " +
|
|
1867
|
+
"total} — the id of that note, its content as the memory list now " +
|
|
1868
|
+
"reports it, and the FULL count of memories the list holds, unrelated " +
|
|
1869
|
+
"notes included.",
|
|
1870
|
+
outputSchema: obj({ memoryId: S, content: S, total: N }, [
|
|
1871
|
+
"memoryId",
|
|
1872
|
+
"content",
|
|
1873
|
+
"total"
|
|
1874
|
+
]),
|
|
1875
|
+
expect: {
|
|
1876
|
+
requiredTools: [
|
|
1877
|
+
"memory_save",
|
|
1878
|
+
"memory_update",
|
|
1879
|
+
"memory_list"
|
|
1880
|
+
],
|
|
1881
|
+
maxActions: 4,
|
|
1882
|
+
resultCheck: (r) => {
|
|
1883
|
+
const content = asString(field(r, "content"));
|
|
1884
|
+
return (asString(field(r, "memoryId")).startsWith("mem_") &&
|
|
1885
|
+
content.includes("flux/dev") &&
|
|
1886
|
+
!content.includes("schnell") &&
|
|
1887
|
+
asNumber(field(r, "total")) === 2);
|
|
1888
|
+
},
|
|
1889
|
+
resultCheckLabel: "corrected note, 2 memories total"
|
|
1890
|
+
}
|
|
1891
|
+
},
|
|
1892
|
+
{
|
|
1893
|
+
id: "threads-recall",
|
|
1894
|
+
description: "Find a past conversation and read what it actually did",
|
|
1895
|
+
namespaces: ["threads"],
|
|
1896
|
+
objective: "In an earlier conversation we made the launch banner. Find that " +
|
|
1897
|
+
"thread among the past ones, read it, and report which image model the " +
|
|
1898
|
+
"banner was really generated with — the model id is in the arguments " +
|
|
1899
|
+
"of the tool call that made it, not in the text, so read that message " +
|
|
1900
|
+
"in full rather than guessing from the transcript. Finish with " +
|
|
1901
|
+
"{threadId, model}.",
|
|
1902
|
+
outputSchema: obj({ threadId: S, model: S }, ["threadId", "model"]),
|
|
1903
|
+
expect: {
|
|
1904
|
+
requiredTools: ["list_threads", "get_thread", "get_message"],
|
|
1905
|
+
maxActions: 4,
|
|
1906
|
+
resultCheck: (r) => asString(field(r, "threadId")) === "th_banner" &&
|
|
1907
|
+
asString(field(r, "model")) === "fal_ai/flux/dev",
|
|
1908
|
+
resultCheckLabel: "th_banner generated with fal_ai/flux/dev"
|
|
1909
|
+
}
|
|
1910
|
+
},
|
|
1911
|
+
{
|
|
1912
|
+
id: "shared-handoff",
|
|
1913
|
+
description: "Read what upstream steps shared, then publish a derived value",
|
|
1914
|
+
namespaces: ["shared"],
|
|
1915
|
+
objective: "Earlier steps of this run left their results in shared memory. Find " +
|
|
1916
|
+
"the pricing result among them and read it — the numbers are only " +
|
|
1917
|
+
"there, so do not invent them. Work out the annual price at twelve " +
|
|
1918
|
+
"times the monthly one, and publish it into shared memory under the " +
|
|
1919
|
+
'key "annual_price" so later steps can use it. Finish with ' +
|
|
1920
|
+
"{monthlyUsd, annualUsd, publishedKey} — the monthly price you read, " +
|
|
1921
|
+
"the annual price you worked out, and the FULL key the publish call " +
|
|
1922
|
+
"reported back.",
|
|
1923
|
+
outputSchema: obj({ monthlyUsd: N, annualUsd: N, publishedKey: S }, [
|
|
1924
|
+
"monthlyUsd",
|
|
1925
|
+
"annualUsd",
|
|
1926
|
+
"publishedKey"
|
|
1927
|
+
]),
|
|
1928
|
+
expect: {
|
|
1929
|
+
requiredTools: ["list_shared", "read_shared", "share_result"],
|
|
1930
|
+
maxActions: 4,
|
|
1931
|
+
resultCheck: (r) => asNumber(field(r, "monthlyUsd")) === 49 &&
|
|
1932
|
+
asNumber(field(r, "annualUsd")) === 588 &&
|
|
1933
|
+
asString(field(r, "publishedKey")) === "shared:annual_price",
|
|
1934
|
+
resultCheckLabel: "49/588 published as shared:annual_price"
|
|
1935
|
+
}
|
|
1936
|
+
},
|
|
1937
|
+
{
|
|
1938
|
+
id: "web-research-brief",
|
|
1939
|
+
description: "Search the web, open the page, and report facts only the page carries",
|
|
1940
|
+
namespaces: ["web"],
|
|
1941
|
+
objective: "Find our NodeTool 4.2 release-notes page on the web and read it. " +
|
|
1942
|
+
"Finish with {url, version, sandbox}: the page's URL, the release " +
|
|
1943
|
+
"version, and the name of the JavaScript engine the release runs agent " +
|
|
1944
|
+
"actions in. The engine is not in the search snippet — you have to open " +
|
|
1945
|
+
"the page.",
|
|
1946
|
+
outputSchema: obj({ url: S, version: S, sandbox: S }, [
|
|
1947
|
+
"url",
|
|
1948
|
+
"version",
|
|
1949
|
+
"sandbox"
|
|
1950
|
+
]),
|
|
1951
|
+
expect: {
|
|
1952
|
+
requiredTools: ["web_search"],
|
|
1953
|
+
maxActions: 4,
|
|
1954
|
+
resultCheck: (r) => asString(field(r, "url")) ===
|
|
1955
|
+
"https://example.dev/nodetool/release-notes" &&
|
|
1956
|
+
String(field(r, "version")) === "4.2" &&
|
|
1957
|
+
asString(field(r, "sandbox")).toLowerCase().includes("quickjs"),
|
|
1958
|
+
resultCheckLabel: "release-notes url, 4.2, QuickJS"
|
|
1959
|
+
}
|
|
1960
|
+
},
|
|
1961
|
+
{
|
|
1962
|
+
id: "document-extraction-pipeline",
|
|
1963
|
+
description: "PDF → text, tables, and markdown in one pass",
|
|
1964
|
+
namespaces: ["documents"],
|
|
1965
|
+
objective: "The workspace holds reports/q3.pdf. Pull its tables out to " +
|
|
1966
|
+
"reports/q3-tables.json, convert the PDF itself to markdown at " +
|
|
1967
|
+
"reports/q3.md, and read the report's text. Finish with {accounts, " +
|
|
1968
|
+
"tableRows, markdownFile}: how many accounts the quarter's revenue " +
|
|
1969
|
+
"spanned (a number, no separators), how many table rows were " +
|
|
1970
|
+
"extracted, and the markdown file you wrote.",
|
|
1971
|
+
outputSchema: obj({ accounts: N, tableRows: N, markdownFile: S }, [
|
|
1972
|
+
"accounts",
|
|
1973
|
+
"tableRows",
|
|
1974
|
+
"markdownFile"
|
|
1975
|
+
]),
|
|
1976
|
+
expect: {
|
|
1977
|
+
requiredTools: [
|
|
1978
|
+
"extract_pdf_text",
|
|
1979
|
+
"extract_pdf_tables",
|
|
1980
|
+
"convert_pdf_to_markdown"
|
|
1981
|
+
],
|
|
1982
|
+
maxActions: 4,
|
|
1983
|
+
resultCheck: (r) => asNumber(field(r, "accounts")) === 1280 &&
|
|
1984
|
+
asNumber(field(r, "tableRows")) === 3 &&
|
|
1985
|
+
asString(field(r, "markdownFile")) === "reports/q3.md",
|
|
1986
|
+
resultCheckLabel: "accounts=1280 rows=3 reports/q3.md"
|
|
1987
|
+
}
|
|
1988
|
+
},
|
|
1989
|
+
{
|
|
1990
|
+
id: "timeline-fix-and-validate",
|
|
1991
|
+
description: "Snapshot, repair a failing timeline, and re-validate clean",
|
|
1992
|
+
namespaces: ["timelines"],
|
|
1993
|
+
objective: "The timeline sequence tl_promo does not pass validation. Snapshot it " +
|
|
1994
|
+
"first so the repair is undoable, then fix what validation complains " +
|
|
1995
|
+
"about with a document edit, and check it again. Finish with " +
|
|
1996
|
+
"{issuesBefore, issuesAfter, trackCount, snapshotVersion}: the issue " +
|
|
1997
|
+
"counts before and after your edit, how many tracks the document ends " +
|
|
1998
|
+
"up with, and the version number your snapshot got.",
|
|
1999
|
+
outputSchema: obj({ issuesBefore: N, issuesAfter: N, trackCount: N, snapshotVersion: N }, ["issuesBefore", "issuesAfter", "trackCount", "snapshotVersion"]),
|
|
2000
|
+
expect: {
|
|
2001
|
+
requiredTools: [
|
|
2002
|
+
"validate_timeline",
|
|
2003
|
+
"create_timeline_version",
|
|
2004
|
+
"edit_timeline"
|
|
2005
|
+
],
|
|
2006
|
+
maxActions: 5,
|
|
2007
|
+
resultCheck: (r) => asNumber(field(r, "issuesBefore")) === 1 &&
|
|
2008
|
+
asNumber(field(r, "issuesAfter")) === 0 &&
|
|
2009
|
+
asNumber(field(r, "trackCount")) === 2 &&
|
|
2010
|
+
asNumber(field(r, "snapshotVersion")) === 1,
|
|
2011
|
+
resultCheckLabel: "1 issue → 0, 2 tracks, snapshot v1"
|
|
2012
|
+
}
|
|
2013
|
+
},
|
|
2014
|
+
{
|
|
2015
|
+
id: "sketch-layer-repair",
|
|
2016
|
+
description: "Fix a dangling active layer and add a styled layer",
|
|
2017
|
+
namespaces: ["sketches"],
|
|
2018
|
+
objective: "The image document img_cover does not pass validation. Fix it, and " +
|
|
2019
|
+
'while you are in there add a layer named "Glow" at 0.4 opacity in the ' +
|
|
2020
|
+
"multiply blend mode and leave it as the document's active layer. " +
|
|
2021
|
+
"Finish with {issuesBefore, issuesAfter, layerCount, glowOpacity, " +
|
|
2022
|
+
"activeLayerId} read back from the document.",
|
|
2023
|
+
outputSchema: obj({
|
|
2024
|
+
issuesBefore: N,
|
|
2025
|
+
issuesAfter: N,
|
|
2026
|
+
layerCount: N,
|
|
2027
|
+
glowOpacity: N,
|
|
2028
|
+
activeLayerId: S
|
|
2029
|
+
}, [
|
|
2030
|
+
"issuesBefore",
|
|
2031
|
+
"issuesAfter",
|
|
2032
|
+
"layerCount",
|
|
2033
|
+
"glowOpacity",
|
|
2034
|
+
"activeLayerId"
|
|
2035
|
+
]),
|
|
2036
|
+
expect: {
|
|
2037
|
+
requiredTools: ["validate_sketch", "edit_sketch"],
|
|
2038
|
+
maxActions: 5,
|
|
2039
|
+
resultCheck: (r) => asNumber(field(r, "issuesBefore")) === 1 &&
|
|
2040
|
+
asNumber(field(r, "issuesAfter")) === 0 &&
|
|
2041
|
+
asNumber(field(r, "layerCount")) === 3 &&
|
|
2042
|
+
asNumber(field(r, "glowOpacity")) === 0.4 &&
|
|
2043
|
+
asString(field(r, "activeLayerId")).length > 0 &&
|
|
2044
|
+
asString(field(r, "activeLayerId")) !== "layer_ghost",
|
|
2045
|
+
resultCheckLabel: "1 issue → 0, 3 layers, glow active at 0.4"
|
|
2046
|
+
}
|
|
2047
|
+
},
|
|
2048
|
+
{
|
|
2049
|
+
id: "script-voice-and-assemble",
|
|
2050
|
+
description: "Voice only the lines that need it, then assemble the voiceover",
|
|
2051
|
+
namespaces: ["scripts", "timelines"],
|
|
2052
|
+
objective: "Script scr_intro has lines that still need recording. Record exactly " +
|
|
2053
|
+
"those — leave the ones already voiced alone — then assemble the " +
|
|
2054
|
+
"voiceover timeline. Finish with {voiced, clips, timelineId}: the ids " +
|
|
2055
|
+
"you recorded (sorted), how many clips the assembled sequence holds, " +
|
|
2056
|
+
"and its timeline id.",
|
|
2057
|
+
outputSchema: obj({ voiced: ANY_ARRAY, clips: N, timelineId: S }, [
|
|
2058
|
+
"voiced",
|
|
2059
|
+
"clips",
|
|
2060
|
+
"timelineId"
|
|
2061
|
+
]),
|
|
2062
|
+
expect: {
|
|
2063
|
+
requiredTools: ["voice_script_lines", "assemble_script_timeline"],
|
|
2064
|
+
maxActions: 4,
|
|
2065
|
+
resultCheck: (r) => {
|
|
2066
|
+
const voiced = strList(field(r, "voiced")).slice().sort().join(",");
|
|
2067
|
+
return (voiced === "line_2,line_3" &&
|
|
2068
|
+
asNumber(field(r, "clips")) === 3 &&
|
|
2069
|
+
asString(field(r, "timelineId")) === "tl_scr_intro");
|
|
2070
|
+
},
|
|
2071
|
+
resultCheckLabel: "voiced line_2,line_3; 3 clips in tl_scr_intro"
|
|
2072
|
+
}
|
|
2073
|
+
},
|
|
2074
|
+
{
|
|
2075
|
+
id: "storyboard-direct-shots",
|
|
2076
|
+
description: "Direct a board's shot list headlessly, before anything renders",
|
|
2077
|
+
namespaces: ["storyboards"],
|
|
2078
|
+
objective: "Board sb_lighthouse needs one more beat. Add a closing shot — the " +
|
|
2079
|
+
"lamp goes dark — as the last shot, 2 seconds long, timed off its " +
|
|
2080
|
+
"audio rather than a fixed length, and drop the shot showing the " +
|
|
2081
|
+
"keeper closing the door. Change nothing else and render nothing. " +
|
|
2082
|
+
"Finish with {shots, lastAction, lastDurationSource} read back from " +
|
|
2083
|
+
"the board.",
|
|
2084
|
+
outputSchema: obj({ shots: N, lastAction: S, lastDurationSource: S }, ["shots", "lastAction", "lastDurationSource"]),
|
|
2085
|
+
expect: {
|
|
2086
|
+
requiredTools: ["edit_storyboard", "get_storyboard"],
|
|
2087
|
+
forbiddenTools: ["render_storyboard_stills", "render_storyboard_clips"],
|
|
2088
|
+
maxActions: 4,
|
|
2089
|
+
resultCheck: (r) => asNumber(field(r, "shots")) === 3 &&
|
|
2090
|
+
/lamp/i.test(asString(field(r, "lastAction"))) &&
|
|
2091
|
+
asString(field(r, "lastDurationSource")) === "audio",
|
|
2092
|
+
resultCheckLabel: "3 shots, closing lamp shot timed off audio"
|
|
2093
|
+
}
|
|
2094
|
+
},
|
|
2095
|
+
{
|
|
2096
|
+
id: "storyboard-render-and-assemble",
|
|
2097
|
+
description: "Stills, then clips, then a cut — in the order the board allows",
|
|
2098
|
+
namespaces: ["storyboards", "timelines"],
|
|
2099
|
+
objective: "Board sb_lighthouse is directed but unfinished. Every shot needs a " +
|
|
2100
|
+
"still and then a clip, and a clip can only be animated from a shot's " +
|
|
2101
|
+
"still. Get all three shots to a clip and assemble the cut. Finish " +
|
|
2102
|
+
"with {shotsWithClips, timelineId, durationSeconds} read back from the " +
|
|
2103
|
+
"board and the assembled sequence.",
|
|
2104
|
+
outputSchema: obj({ shotsWithClips: N, timelineId: S, durationSeconds: N }, ["shotsWithClips", "timelineId", "durationSeconds"]),
|
|
2105
|
+
expect: {
|
|
2106
|
+
requiredTools: [
|
|
2107
|
+
"render_storyboard_stills",
|
|
2108
|
+
"render_storyboard_clips",
|
|
2109
|
+
"assemble_storyboard_timeline"
|
|
2110
|
+
],
|
|
2111
|
+
maxActions: 5,
|
|
2112
|
+
resultCheck: (r) => asNumber(field(r, "shotsWithClips")) === 3 &&
|
|
2113
|
+
asString(field(r, "timelineId")) === "tl_sb_lighthouse" &&
|
|
2114
|
+
asNumber(field(r, "durationSeconds")) === 12,
|
|
2115
|
+
resultCheckLabel: "3 clips, tl_sb_lighthouse, 12s"
|
|
2116
|
+
}
|
|
2117
|
+
},
|
|
2118
|
+
{
|
|
2119
|
+
id: "settings-and-credentials",
|
|
2120
|
+
description: "Change a setting, and ask the user for the credential you cannot set",
|
|
2121
|
+
namespaces: ["settings"],
|
|
2122
|
+
objective: "Prepare this install for billing work. Turn autosave off, and make " +
|
|
2123
|
+
"sure the Stripe credential is available — you cannot write a " +
|
|
2124
|
+
"credential yourself, so ask the user for it and say why. Finish with " +
|
|
2125
|
+
"{autosave, missingBefore, stripeReady}: the value autosave now holds, " +
|
|
2126
|
+
"the names of the credentials that were NOT configured before you " +
|
|
2127
|
+
"started, and whether Stripe is configured afterwards.",
|
|
2128
|
+
outputSchema: obj({ autosave: S, missingBefore: ANY_ARRAY, stripeReady: B }, [
|
|
2129
|
+
"autosave",
|
|
2130
|
+
"missingBefore",
|
|
2131
|
+
"stripeReady"
|
|
2132
|
+
]),
|
|
2133
|
+
expect: {
|
|
2134
|
+
requiredTools: ["list_secrets", "request_secret", "set_setting"],
|
|
2135
|
+
maxActions: 4,
|
|
2136
|
+
resultCheck: (r) => asString(field(r, "autosave")) === "false" &&
|
|
2137
|
+
strList(field(r, "missingBefore")).join(",") === "STRIPE_API_KEY" &&
|
|
2138
|
+
field(r, "stripeReady") === true,
|
|
2139
|
+
resultCheckLabel: "autosave off, Stripe asked for and now configured"
|
|
2140
|
+
}
|
|
2141
|
+
},
|
|
2142
|
+
{
|
|
2143
|
+
id: "email-triage",
|
|
2144
|
+
description: "Search, label, and archive the matching messages",
|
|
2145
|
+
namespaces: ["email"],
|
|
2146
|
+
objective: "Triage the mailbox: every message from the last 48 hours whose " +
|
|
2147
|
+
'subject mentions an invoice gets the label "billing" and is then ' +
|
|
2148
|
+
"archived. Finish with {labeled, archived, remaining}: the ids you " +
|
|
2149
|
+
"labeled (sorted), how many messages you archived, and how many " +
|
|
2150
|
+
"matching messages are still sitting in the inbox afterwards.",
|
|
2151
|
+
outputSchema: obj({ labeled: ANY_ARRAY, archived: N, remaining: N }, [
|
|
2152
|
+
"labeled",
|
|
2153
|
+
"archived",
|
|
2154
|
+
"remaining"
|
|
2155
|
+
]),
|
|
2156
|
+
expect: {
|
|
2157
|
+
requiredTools: ["search_email", "add_label_to_email", "archive_email"],
|
|
2158
|
+
maxActions: 4,
|
|
2159
|
+
resultCheck: (r) => {
|
|
2160
|
+
const labeled = strList(field(r, "labeled")).slice().sort().join(",");
|
|
2161
|
+
return (labeled === "msg_1,msg_2" &&
|
|
2162
|
+
asNumber(field(r, "archived")) === 2 &&
|
|
2163
|
+
asNumber(field(r, "remaining")) === 0);
|
|
2164
|
+
},
|
|
2165
|
+
resultCheckLabel: "msg_1+msg_2 labeled and archived, inbox clear"
|
|
2166
|
+
}
|
|
2167
|
+
},
|
|
2168
|
+
{
|
|
2169
|
+
id: "app-wiring-check",
|
|
2170
|
+
description: "Check a saved app's wiring for free",
|
|
2171
|
+
namespaces: ["apps"],
|
|
2172
|
+
objective: 'The app "app_notes" drafts a short note from a prompt. Run the FREE ' +
|
|
2173
|
+
"wiring check on that app — no run, it costs nothing and spends " +
|
|
2174
|
+
"nothing. Finish with {verdictOk, ran, widgets} — the check's verdict, " +
|
|
2175
|
+
"whether it executed the app, and how many widgets it reported.",
|
|
2176
|
+
outputSchema: obj({ verdictOk: B, ran: B, widgets: N }, [
|
|
2177
|
+
"verdictOk",
|
|
2178
|
+
"ran",
|
|
2179
|
+
"widgets"
|
|
2180
|
+
]),
|
|
2181
|
+
expect: {
|
|
2182
|
+
requiredTools: ["debug_app"],
|
|
2183
|
+
maxActions: 5,
|
|
2184
|
+
resultCheck: (r) => field(r, "verdictOk") === true &&
|
|
2185
|
+
field(r, "ran") === false &&
|
|
2186
|
+
asNumber(field(r, "widgets")) === 3,
|
|
2187
|
+
resultCheckLabel: "free check ran, 3 widgets"
|
|
2188
|
+
}
|
|
2189
|
+
}
|
|
2190
|
+
].map((entry) => ({ ...entry, createTools: createSurfaceApiTools }));
|
|
2191
|
+
//# sourceMappingURL=codeact-api-surfaces.js.map
|