@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,850 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `web` capability module — everything the agent reaches over the network.
|
|
3
|
+
*
|
|
4
|
+
* Seven capabilities that used to be seven `Tool` subclasses across three
|
|
5
|
+
* files: the three search tools, the two browser tools, and the two HTTP
|
|
6
|
+
* tools. Wire names, descriptions and schemas are unchanged; a belt builds
|
|
7
|
+
* all seven from `web.specs.ts` by name.
|
|
8
|
+
*
|
|
9
|
+
* The provider-specific backends are plain functions, not tools. They have no
|
|
10
|
+
* wire name of their own: the single `web_search` capability chooses one
|
|
11
|
+
* host-side, so a model picks a capability and the host picks the provider
|
|
12
|
+
* behind it.
|
|
13
|
+
*
|
|
14
|
+
* `htmlToText` and `requestSignal` live here rather than in the tool files
|
|
15
|
+
* they came from, because those files now import *from* this module; the old
|
|
16
|
+
* homes re-export them so every caller keeps its import path.
|
|
17
|
+
*
|
|
18
|
+
* Design: docs/tool-class-retirement-design.md § "PRs 4–9 — remaining
|
|
19
|
+
* namespaces".
|
|
20
|
+
*/
|
|
21
|
+
import { WEB_SEARCH_TOOL_NAME, loadMediaRefBytes, safeFetch, isSafePublicHttpsUrl } from "@nodetool-ai/runtime";
|
|
22
|
+
import { isAuthEnforced } from "@nodetool-ai/config";
|
|
23
|
+
import { mimeForPath } from "../sandbox-media-ref.js";
|
|
24
|
+
import { SERP_PROVIDER_SEARCH_TYPES, createSerpProvider, serpProviderConfigured } from "../tools/serp-providers/index.js";
|
|
25
|
+
import { stripElement, stripTags, stripToFixpoint } from "./html-text.js";
|
|
26
|
+
import { webSearchSpec, imageSearchSpec, browserSpec, takeScreenshotSpec, downloadFileSpec, httpRequestSpec } from "./web.specs.js";
|
|
27
|
+
import { isFunction, isNumber, isObjectLike, isString } from "../utils/type-guards.js";
|
|
28
|
+
// ---------------------------------------------------------------------------
|
|
29
|
+
// Shared plumbing
|
|
30
|
+
// ---------------------------------------------------------------------------
|
|
31
|
+
/**
|
|
32
|
+
* A per-request timeout that also honors the run's cancellation. A tool that
|
|
33
|
+
* watches only its own timer keeps a 60-second request alive after the user
|
|
34
|
+
* pressed Stop; a tool that watches only the run signal never times out.
|
|
35
|
+
*/
|
|
36
|
+
export function requestSignal(context, timeoutMs) {
|
|
37
|
+
const timeout = AbortSignal.timeout(timeoutMs);
|
|
38
|
+
const runSignal = context?.signal;
|
|
39
|
+
return runSignal ? AbortSignal.any([timeout, runSignal]) : timeout;
|
|
40
|
+
}
|
|
41
|
+
const DEFAULT_HEADERS = {
|
|
42
|
+
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36",
|
|
43
|
+
Accept: "*/*",
|
|
44
|
+
"Accept-Language": "en-US,en;q=0.9"
|
|
45
|
+
};
|
|
46
|
+
async function getSerpApiKey(context) {
|
|
47
|
+
const fromCtx = await context.getSecret("SERPAPI_API_KEY");
|
|
48
|
+
if (fromCtx)
|
|
49
|
+
return fromCtx;
|
|
50
|
+
const fromEnv = process.env.SERPAPI_API_KEY;
|
|
51
|
+
if (fromEnv)
|
|
52
|
+
return fromEnv;
|
|
53
|
+
throw new Error("SERPAPI_API_KEY is not configured. Set it as an environment variable or via the secret resolver.");
|
|
54
|
+
}
|
|
55
|
+
/** Whether the SerpAPI backend is usable: its key is in the store or env. */
|
|
56
|
+
export async function serpApiConfigured(context) {
|
|
57
|
+
const fromCtx = isFunction(context?.getSecret)
|
|
58
|
+
? await context.getSecret("SERPAPI_API_KEY")
|
|
59
|
+
: null;
|
|
60
|
+
return Boolean(fromCtx ?? process.env.SERPAPI_API_KEY);
|
|
61
|
+
}
|
|
62
|
+
/** Parse the `search_type` argument, defaulting to `web`. */
|
|
63
|
+
function readSearchType(value) {
|
|
64
|
+
if (value === undefined || value === null || value === "")
|
|
65
|
+
return "web";
|
|
66
|
+
const text = String(value);
|
|
67
|
+
return text === "web" || text === "news" || text === "images"
|
|
68
|
+
? text
|
|
69
|
+
: undefined;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Run the first configured backend, or the pinned one. Unconfigured backends
|
|
73
|
+
* are skipped up front; once a backend runs, its failure is the call's
|
|
74
|
+
* failure — a real error never falls through to the next backend.
|
|
75
|
+
*/
|
|
76
|
+
async function runFirstConfiguredBackend(toolName, context, backends, pinnedRaw, searchType = "web") {
|
|
77
|
+
// A backend that cannot answer this kind of search is not a candidate. Doing
|
|
78
|
+
// this first means the "nothing is configured" message lists only backends
|
|
79
|
+
// that could have served the call, instead of telling someone searching for
|
|
80
|
+
// images to go and set a key that would not have helped.
|
|
81
|
+
const capable = backends.filter((b) => b.supports.has(searchType));
|
|
82
|
+
// `default` always means the tool's own first backend.
|
|
83
|
+
const pinned = pinnedRaw === undefined || pinnedRaw === null || pinnedRaw === ""
|
|
84
|
+
? undefined
|
|
85
|
+
: String(pinnedRaw) === "default"
|
|
86
|
+
? capable[0]?.name
|
|
87
|
+
: String(pinnedRaw);
|
|
88
|
+
if (pinned !== undefined) {
|
|
89
|
+
const backend = capable.find((b) => b.name === pinned);
|
|
90
|
+
if (!backend) {
|
|
91
|
+
const known = backends.find((b) => b.name === pinned);
|
|
92
|
+
if (known) {
|
|
93
|
+
throw new Error(`${toolName}: backend "${pinned}" does not support ` +
|
|
94
|
+
`search_type "${searchType}" — use one of ` +
|
|
95
|
+
capable.map((b) => b.name).join(", ") +
|
|
96
|
+
".");
|
|
97
|
+
}
|
|
98
|
+
throw new Error(`${toolName}: unknown backend "${pinned}" — one of ` +
|
|
99
|
+
backends.map((b) => b.name).join(", ") +
|
|
100
|
+
".");
|
|
101
|
+
}
|
|
102
|
+
if (!(await backend.isConfigured(context))) {
|
|
103
|
+
throw new Error(`${toolName}: backend "${backend.name}" is not configured — set ` +
|
|
104
|
+
`${backend.requires}.`);
|
|
105
|
+
}
|
|
106
|
+
return backend.run(context);
|
|
107
|
+
}
|
|
108
|
+
const unconfigured = [];
|
|
109
|
+
for (const backend of capable) {
|
|
110
|
+
if (await backend.isConfigured(context))
|
|
111
|
+
return backend.run(context);
|
|
112
|
+
unconfigured.push(`${backend.name} needs ${backend.requires}`);
|
|
113
|
+
}
|
|
114
|
+
throw new Error(`${toolName}: no search backend is configured for search_type ` +
|
|
115
|
+
`"${searchType}" — ` +
|
|
116
|
+
unconfigured.join("; ") +
|
|
117
|
+
".");
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* The delegated tools report failures as `{error}` objects; on this routed
|
|
121
|
+
* path the backend was verified configured first, so an `{error}` is a real
|
|
122
|
+
* failure and must fail the call, not fall through.
|
|
123
|
+
*/
|
|
124
|
+
function unwrapBackendResult(result) {
|
|
125
|
+
if (isObjectLike(result)) {
|
|
126
|
+
const record = result;
|
|
127
|
+
if (isString(record.error))
|
|
128
|
+
throw new Error(record.error);
|
|
129
|
+
return record;
|
|
130
|
+
}
|
|
131
|
+
throw new Error(`Unexpected search backend result: ${String(result)}`);
|
|
132
|
+
}
|
|
133
|
+
const DATAFORSEO_REQUIRES = "DATA_FOR_SEO_LOGIN and DATA_FOR_SEO_PASSWORD";
|
|
134
|
+
async function serpApiFetch(params) {
|
|
135
|
+
const url = new URL("https://serpapi.com/search");
|
|
136
|
+
for (const [k, v] of Object.entries(params)) {
|
|
137
|
+
if (v !== undefined)
|
|
138
|
+
url.searchParams.set(k, String(v));
|
|
139
|
+
}
|
|
140
|
+
const res = await fetch(url.toString());
|
|
141
|
+
if (!res.ok) {
|
|
142
|
+
const text = await res.text();
|
|
143
|
+
throw new Error(`SerpAPI request failed (${res.status}): ${text}`);
|
|
144
|
+
}
|
|
145
|
+
return res.json();
|
|
146
|
+
}
|
|
147
|
+
function formatSearchResults(results) {
|
|
148
|
+
if (results.length === 0)
|
|
149
|
+
return "No results.";
|
|
150
|
+
return results
|
|
151
|
+
.map((r, i) => {
|
|
152
|
+
const title = r.title ?? "(untitled)";
|
|
153
|
+
const link = r.link ?? "";
|
|
154
|
+
const snippet = r.snippet ?? "";
|
|
155
|
+
return `${i + 1}. ${title}\n ${link}${snippet ? `\n ${snippet}` : ""}`;
|
|
156
|
+
})
|
|
157
|
+
.join("\n\n");
|
|
158
|
+
}
|
|
159
|
+
function domainOf(link) {
|
|
160
|
+
if (!link)
|
|
161
|
+
return "";
|
|
162
|
+
try {
|
|
163
|
+
return new URL(link).hostname.replace(/^www\./, "").toLowerCase();
|
|
164
|
+
}
|
|
165
|
+
catch {
|
|
166
|
+
return "";
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* Web, news, and image search over every configured backend.
|
|
171
|
+
*
|
|
172
|
+
* This is the whole search surface. It used to be three capabilities —
|
|
173
|
+
* `web_search`, `google_news`, `google_images` — which was three wire names,
|
|
174
|
+
* three schemas and three routing tables for one question with a parameter on
|
|
175
|
+
* it, and it left two of the four SERP providers (Brave, Apify) reachable from
|
|
176
|
+
* no tool at all. `search_type` replaced the split, and the backend list is now
|
|
177
|
+
* the full set, so anything the SERP factory can build is reachable from an
|
|
178
|
+
* agent and from sandbox code.
|
|
179
|
+
*
|
|
180
|
+
* Result shapes are preserved across that merge on purpose: `web` returns the
|
|
181
|
+
* formatted string it always did, `news` and `images` return the
|
|
182
|
+
* `{success, results}` records they always did. The consumers — the chat UI's
|
|
183
|
+
* result parser most of all — read shapes, not tool names.
|
|
184
|
+
*
|
|
185
|
+
* Not every backend serves every type. A backend that cannot is skipped while
|
|
186
|
+
* routing and named as the reason when it was pinned, rather than quietly
|
|
187
|
+
* answering an image search with web results.
|
|
188
|
+
*
|
|
189
|
+
* The optional `provider` is the SERP client `createSearchTool` injects; with
|
|
190
|
+
* none, the SerpAPI backend calls the HTTP endpoint directly.
|
|
191
|
+
*/
|
|
192
|
+
export function webSearchImpl(provider) {
|
|
193
|
+
return async (run, params) => {
|
|
194
|
+
const context = run.context;
|
|
195
|
+
// Accept the canonical `query` field, tolerate older `keyword`/`num_results`.
|
|
196
|
+
const query = params.query ??
|
|
197
|
+
params.keyword;
|
|
198
|
+
if (!query)
|
|
199
|
+
return "Error: query is required";
|
|
200
|
+
const searchType = readSearchType(params.search_type);
|
|
201
|
+
if (searchType === undefined) {
|
|
202
|
+
return `Error: unknown search_type "${String(params.search_type)}" — one of web, news, images.`;
|
|
203
|
+
}
|
|
204
|
+
const numResults = params.num_results ??
|
|
205
|
+
(searchType === "images" ? 20 : 10);
|
|
206
|
+
const allowed = params.allowed_domains ?? [];
|
|
207
|
+
const blocked = params.blocked_domains ?? [];
|
|
208
|
+
// `allowed_domains` is pushed into the query itself so the engine narrows
|
|
209
|
+
// server-side; `blocked_domains` is applied to the returned results.
|
|
210
|
+
const allowedClause = allowed.length
|
|
211
|
+
? " " + allowed.map((d) => `site:${d}`).join(" OR ")
|
|
212
|
+
: "";
|
|
213
|
+
const effectiveQuery = `${query}${allowedClause}`;
|
|
214
|
+
const norm = (list) => list.map((d) => d.replace(/^www\./, "").toLowerCase());
|
|
215
|
+
const blockedSet = new Set(norm(blocked));
|
|
216
|
+
const allowedSet = new Set(norm(allowed));
|
|
217
|
+
// Match on a real label boundary, not a bare suffix: `host.endsWith("bank.com")`
|
|
218
|
+
// also matches "fakebank.com", so a bare endsWith would leak look-alike
|
|
219
|
+
// domains past an allowlist (and over-block on a blocklist).
|
|
220
|
+
const hostMatches = (host, d) => host === d || host.endsWith("." + d);
|
|
221
|
+
const keep = (link) => {
|
|
222
|
+
const host = domainOf(link);
|
|
223
|
+
if (blockedSet.size && [...blockedSet].some((d) => hostMatches(host, d)))
|
|
224
|
+
return false;
|
|
225
|
+
if (allowedSet.size && ![...allowedSet].some((d) => hostMatches(host, d)))
|
|
226
|
+
return false;
|
|
227
|
+
return true;
|
|
228
|
+
};
|
|
229
|
+
const formatFiltered = (raw) => formatSearchResults(raw.filter((r) => keep(r.link)));
|
|
230
|
+
/** Filter a news/image record list on the same domain rules. */
|
|
231
|
+
const keepRecords = (records) => records.filter((r) => keep(r.link ?? null));
|
|
232
|
+
/**
|
|
233
|
+
* Append a model-backed backend's citations to its prose answer.
|
|
234
|
+
*
|
|
235
|
+
* OpenAI and Gemini answer a search with an argument rather than a result
|
|
236
|
+
* list, and the pages behind it are the only way a reader can check one.
|
|
237
|
+
* Both are read into the same `{title, url}` shape by their provider, so
|
|
238
|
+
* one formatter serves them and the domain filters still apply.
|
|
239
|
+
*/
|
|
240
|
+
const withSources = (text, raw) => {
|
|
241
|
+
const sources = (Array.isArray(raw) ? raw : []).filter((s) => keep(s.url));
|
|
242
|
+
if (sources.length === 0)
|
|
243
|
+
return text;
|
|
244
|
+
const lines = sources
|
|
245
|
+
.map((s, i) => `${i + 1}. ${s.title}\n ${s.url}`)
|
|
246
|
+
.join("\n\n");
|
|
247
|
+
return `${text}\n\nSources:\n\n${lines}`;
|
|
248
|
+
};
|
|
249
|
+
/** A SERP-factory backend: build the client, search, format. */
|
|
250
|
+
const serpFactoryBackend = (name, requires) => ({
|
|
251
|
+
name,
|
|
252
|
+
requires,
|
|
253
|
+
supports: new Set(SERP_PROVIDER_SEARCH_TYPES[name]),
|
|
254
|
+
isConfigured: (ctx) => serpProviderConfigured(name, ctx),
|
|
255
|
+
run: async (ctx) => {
|
|
256
|
+
const client = await createSerpProvider(name, ctx);
|
|
257
|
+
if (searchType === "images") {
|
|
258
|
+
// Routing only offers this backend for images when the table says
|
|
259
|
+
// its client implements searchImages, so a missing method here is a
|
|
260
|
+
// table that drifted from the class — say which, rather than
|
|
261
|
+
// answering an image search with pages.
|
|
262
|
+
if (!client.searchImages) {
|
|
263
|
+
throw new Error(`${WEB_SEARCH_TOOL_NAME}: backend "${name}" declares image ` +
|
|
264
|
+
"search but its client implements none.");
|
|
265
|
+
}
|
|
266
|
+
const images = await client.searchImages(effectiveQuery, {
|
|
267
|
+
numResults
|
|
268
|
+
});
|
|
269
|
+
return {
|
|
270
|
+
success: true,
|
|
271
|
+
results: keepRecords(images.map((r) => ({
|
|
272
|
+
title: r.title,
|
|
273
|
+
link: r.link,
|
|
274
|
+
original: r.original,
|
|
275
|
+
thumbnail: r.thumbnail
|
|
276
|
+
})))
|
|
277
|
+
};
|
|
278
|
+
}
|
|
279
|
+
const results = await client.search(effectiveQuery, { numResults });
|
|
280
|
+
return formatFiltered(results.map((r) => ({
|
|
281
|
+
title: r.title ?? null,
|
|
282
|
+
link: r.url ?? null,
|
|
283
|
+
snippet: r.snippet ?? null
|
|
284
|
+
})));
|
|
285
|
+
}
|
|
286
|
+
});
|
|
287
|
+
const backends = [
|
|
288
|
+
{
|
|
289
|
+
name: "serpapi",
|
|
290
|
+
requires: "SERPAPI_API_KEY",
|
|
291
|
+
supports: new Set(["web", "news", "images"]),
|
|
292
|
+
// The injected client is only consulted on the web path below, and it
|
|
293
|
+
// is whatever SERP_PROVIDER names — possibly not SerpAPI at all. On
|
|
294
|
+
// news and images this backend calls serpapi.com directly, so only a
|
|
295
|
+
// real key makes it configured; otherwise a Brave-backed install
|
|
296
|
+
// answered an image search with "SERPAPI_API_KEY is not configured"
|
|
297
|
+
// instead of routing on to Brave.
|
|
298
|
+
isConfigured: async (ctx) => (provider !== undefined && searchType === "web") ||
|
|
299
|
+
serpApiConfigured(ctx),
|
|
300
|
+
run: async (ctx) => {
|
|
301
|
+
if (searchType === "news") {
|
|
302
|
+
const data = (await serpApiFetch({
|
|
303
|
+
engine: "google_news",
|
|
304
|
+
q: effectiveQuery,
|
|
305
|
+
api_key: await getSerpApiKey(ctx),
|
|
306
|
+
num: numResults
|
|
307
|
+
}));
|
|
308
|
+
const newsResults = (data.news_results ?? []);
|
|
309
|
+
return {
|
|
310
|
+
success: true,
|
|
311
|
+
results: keepRecords(newsResults.map((r) => ({
|
|
312
|
+
title: r.title ?? null,
|
|
313
|
+
link: r.link ?? null,
|
|
314
|
+
snippet: r.snippet ?? null,
|
|
315
|
+
date: r.date ?? null,
|
|
316
|
+
source: r.source?.name ?? null
|
|
317
|
+
})))
|
|
318
|
+
};
|
|
319
|
+
}
|
|
320
|
+
if (searchType === "images") {
|
|
321
|
+
const data = (await serpApiFetch({
|
|
322
|
+
engine: "google_images",
|
|
323
|
+
q: effectiveQuery,
|
|
324
|
+
api_key: await getSerpApiKey(ctx),
|
|
325
|
+
num: numResults
|
|
326
|
+
}));
|
|
327
|
+
const imagesResults = (data.images_results ?? []);
|
|
328
|
+
return {
|
|
329
|
+
success: true,
|
|
330
|
+
results: keepRecords(imagesResults.map((r) => ({
|
|
331
|
+
title: r.title ?? null,
|
|
332
|
+
link: r.link ?? null,
|
|
333
|
+
original: r.original ?? null,
|
|
334
|
+
thumbnail: r.thumbnail ?? null
|
|
335
|
+
})))
|
|
336
|
+
};
|
|
337
|
+
}
|
|
338
|
+
let raw;
|
|
339
|
+
if (provider) {
|
|
340
|
+
const results = await provider.search(effectiveQuery, {
|
|
341
|
+
numResults
|
|
342
|
+
});
|
|
343
|
+
raw = results.map((r) => ({
|
|
344
|
+
title: r.title ?? null,
|
|
345
|
+
link: r.url ?? null,
|
|
346
|
+
snippet: r.snippet ?? null
|
|
347
|
+
}));
|
|
348
|
+
}
|
|
349
|
+
else {
|
|
350
|
+
const apiKey = await getSerpApiKey(ctx);
|
|
351
|
+
const data = (await serpApiFetch({
|
|
352
|
+
engine: "google",
|
|
353
|
+
q: effectiveQuery,
|
|
354
|
+
api_key: apiKey,
|
|
355
|
+
num: numResults
|
|
356
|
+
}));
|
|
357
|
+
const organicResults = (data.organic_results ?? []);
|
|
358
|
+
raw = organicResults.map((r) => ({
|
|
359
|
+
title: r.title ?? null,
|
|
360
|
+
link: r.link ?? null,
|
|
361
|
+
snippet: r.snippet ?? null
|
|
362
|
+
}));
|
|
363
|
+
}
|
|
364
|
+
return formatFiltered(raw);
|
|
365
|
+
}
|
|
366
|
+
},
|
|
367
|
+
{
|
|
368
|
+
name: "dataforseo",
|
|
369
|
+
requires: DATAFORSEO_REQUIRES,
|
|
370
|
+
supports: new Set(["web", "news", "images"]),
|
|
371
|
+
isConfigured: async (ctx) => {
|
|
372
|
+
const { dataForSeoConfigured } = await import("../tools/dataseo-tools.js");
|
|
373
|
+
return dataForSeoConfigured(ctx);
|
|
374
|
+
},
|
|
375
|
+
run: async (ctx) => {
|
|
376
|
+
if (searchType === "news") {
|
|
377
|
+
const { dataForSeoNews } = await import("../tools/dataseo-tools.js");
|
|
378
|
+
const result = unwrapBackendResult(await dataForSeoNews(ctx, { keyword: effectiveQuery, num_results: numResults }));
|
|
379
|
+
const items = (result.results ?? []);
|
|
380
|
+
return {
|
|
381
|
+
success: true,
|
|
382
|
+
results: keepRecords(items.map((r) => ({
|
|
383
|
+
title: r.title ?? null,
|
|
384
|
+
link: r.url ?? null,
|
|
385
|
+
snippet: r.snippet ?? null,
|
|
386
|
+
date: r.published_at ?? null,
|
|
387
|
+
source: r.source ?? null
|
|
388
|
+
})))
|
|
389
|
+
};
|
|
390
|
+
}
|
|
391
|
+
if (searchType === "images") {
|
|
392
|
+
const { dataForSeoImages } = await import("../tools/dataseo-tools.js");
|
|
393
|
+
const result = unwrapBackendResult(await dataForSeoImages(ctx, { keyword: effectiveQuery, num_results: numResults }));
|
|
394
|
+
const items = (result.results ?? []);
|
|
395
|
+
return {
|
|
396
|
+
success: true,
|
|
397
|
+
results: keepRecords(items.map((r) => ({
|
|
398
|
+
title: r.title ?? null,
|
|
399
|
+
link: r.source_url ?? null,
|
|
400
|
+
original: r.image_url ?? null,
|
|
401
|
+
thumbnail: null
|
|
402
|
+
})))
|
|
403
|
+
};
|
|
404
|
+
}
|
|
405
|
+
const { dataForSeoSearch } = await import("../tools/dataseo-tools.js");
|
|
406
|
+
const result = unwrapBackendResult(await dataForSeoSearch(ctx, {
|
|
407
|
+
keyword: effectiveQuery,
|
|
408
|
+
num_results: numResults
|
|
409
|
+
}));
|
|
410
|
+
const results = (result.results ?? []);
|
|
411
|
+
return formatFiltered(results.map((r) => ({
|
|
412
|
+
title: r.title ?? null,
|
|
413
|
+
link: r.url ?? null,
|
|
414
|
+
snippet: r.snippet ?? null
|
|
415
|
+
})));
|
|
416
|
+
}
|
|
417
|
+
},
|
|
418
|
+
serpFactoryBackend("brave", "BRAVE_API_KEY"),
|
|
419
|
+
serpFactoryBackend("apify", "APIFY_API_TOKEN"),
|
|
420
|
+
{
|
|
421
|
+
name: "openai",
|
|
422
|
+
requires: "OPENAI_API_KEY",
|
|
423
|
+
supports: new Set(["web"]),
|
|
424
|
+
isConfigured: async (ctx) => {
|
|
425
|
+
const { openAiSearchConfigured } = await import("../tools/openai-tools.js");
|
|
426
|
+
return openAiSearchConfigured(ctx);
|
|
427
|
+
},
|
|
428
|
+
run: async (ctx) => {
|
|
429
|
+
const { openAiWebSearch } = await import("../tools/openai-tools.js");
|
|
430
|
+
const result = unwrapBackendResult(await openAiWebSearch(ctx, { query: effectiveQuery }));
|
|
431
|
+
return withSources(String(result.results ?? ""), result.sources);
|
|
432
|
+
}
|
|
433
|
+
},
|
|
434
|
+
{
|
|
435
|
+
name: "gemini",
|
|
436
|
+
requires: "GEMINI_API_KEY",
|
|
437
|
+
supports: new Set(["web"]),
|
|
438
|
+
isConfigured: async (ctx) => {
|
|
439
|
+
const { geminiSearchConfigured } = await import("../tools/google-tools.js");
|
|
440
|
+
return geminiSearchConfigured(ctx);
|
|
441
|
+
},
|
|
442
|
+
run: async (ctx) => {
|
|
443
|
+
const { googleGroundedSearch } = await import("../tools/google-tools.js");
|
|
444
|
+
const result = unwrapBackendResult(await googleGroundedSearch(ctx, { query: effectiveQuery }));
|
|
445
|
+
const text = Array.isArray(result.results)
|
|
446
|
+
? result.results.join("\n\n")
|
|
447
|
+
: String(result.results ?? "");
|
|
448
|
+
return withSources(text, result.sources);
|
|
449
|
+
}
|
|
450
|
+
}
|
|
451
|
+
];
|
|
452
|
+
return runFirstConfiguredBackend(WEB_SEARCH_TOOL_NAME, context, backends, params.backend, searchType);
|
|
453
|
+
};
|
|
454
|
+
}
|
|
455
|
+
const webSearch = {
|
|
456
|
+
spec: webSearchSpec,
|
|
457
|
+
impl: webSearchImpl()
|
|
458
|
+
};
|
|
459
|
+
// ---------------------------------------------------------------------------
|
|
460
|
+
// image_search
|
|
461
|
+
// ---------------------------------------------------------------------------
|
|
462
|
+
/**
|
|
463
|
+
* Image search, split out from `web_search`'s `search_type` into its own
|
|
464
|
+
* function. The routing, backend list, and result shape are unchanged — this
|
|
465
|
+
* is `webSearchImpl` with `search_type` pinned to `"images"` — so a caller
|
|
466
|
+
* gets its own name and schema without a second routing table to keep in
|
|
467
|
+
* step with the first.
|
|
468
|
+
*/
|
|
469
|
+
export function imageSearchImpl(provider) {
|
|
470
|
+
const search = webSearchImpl(provider);
|
|
471
|
+
return (run, params) => search(run, { ...params, search_type: "images" });
|
|
472
|
+
}
|
|
473
|
+
const imageSearch = {
|
|
474
|
+
spec: imageSearchSpec,
|
|
475
|
+
impl: imageSearchImpl()
|
|
476
|
+
};
|
|
477
|
+
// ---------------------------------------------------------------------------
|
|
478
|
+
// browser
|
|
479
|
+
// ---------------------------------------------------------------------------
|
|
480
|
+
const ENTITY_MAP = {
|
|
481
|
+
"&": "&",
|
|
482
|
+
"<": "<",
|
|
483
|
+
">": ">",
|
|
484
|
+
""": '"',
|
|
485
|
+
"'": "'",
|
|
486
|
+
"'": "'",
|
|
487
|
+
" ": " "
|
|
488
|
+
};
|
|
489
|
+
const ENTITY_RE = new RegExp(Object.keys(ENTITY_MAP).join("|"), "gi");
|
|
490
|
+
// Numeric character references: { or 
|
|
491
|
+
const NUMERIC_ENTITY_RE = /&#(?:x([0-9a-fA-F]+)|(\d+));/g;
|
|
492
|
+
/**
|
|
493
|
+
* Convert raw HTML to readable plain text.
|
|
494
|
+
*
|
|
495
|
+
* - Strips `<script>` and `<style>` blocks
|
|
496
|
+
* - Removes remaining HTML tags
|
|
497
|
+
* - Decodes common HTML entities and numeric character references
|
|
498
|
+
* - Collapses whitespace
|
|
499
|
+
* - Truncates to `maxLength` characters
|
|
500
|
+
*/
|
|
501
|
+
export function htmlToText(html, maxLength = 50_000) {
|
|
502
|
+
let text = html;
|
|
503
|
+
text = stripToFixpoint(text, (t) => stripElement(t, "script"));
|
|
504
|
+
text = stripToFixpoint(text, (t) => stripElement(t, "style"));
|
|
505
|
+
// Turn block boundaries into newlines before stripping tags.
|
|
506
|
+
text = text.replace(/<(?:br|\/p|\/div|\/li|\/tr|\/h[1-6])\s*\/?>/gi, "\n");
|
|
507
|
+
text = stripToFixpoint(text, stripTags);
|
|
508
|
+
text = text.replace(ENTITY_RE, (match) => ENTITY_MAP[match.toLowerCase()] ?? match);
|
|
509
|
+
text = text.replace(NUMERIC_ENTITY_RE, (match, hex, dec) => {
|
|
510
|
+
const code = hex ? parseInt(hex, 16) : parseInt(dec, 10);
|
|
511
|
+
if (!Number.isFinite(code) ||
|
|
512
|
+
code < 0 ||
|
|
513
|
+
code > 0x10ffff ||
|
|
514
|
+
(code >= 0xd800 && code <= 0xdfff)) {
|
|
515
|
+
return match;
|
|
516
|
+
}
|
|
517
|
+
return String.fromCodePoint(code);
|
|
518
|
+
});
|
|
519
|
+
// Collapse runs of non-newline whitespace, preserving line breaks.
|
|
520
|
+
text = text.replace(/[^\S\n]+/g, " ");
|
|
521
|
+
text = text.replace(/\n{3,}/g, "\n\n");
|
|
522
|
+
text = text.trim();
|
|
523
|
+
if (text.length > maxLength) {
|
|
524
|
+
text = text.slice(0, maxLength);
|
|
525
|
+
}
|
|
526
|
+
return text;
|
|
527
|
+
}
|
|
528
|
+
// Search-engine hosts whose result pages are blocked from direct browsing.
|
|
529
|
+
const SEARCH_ENGINE_HOSTS = [
|
|
530
|
+
"google.",
|
|
531
|
+
"bing.",
|
|
532
|
+
"search.yahoo",
|
|
533
|
+
"duckduckgo",
|
|
534
|
+
"yandex",
|
|
535
|
+
"baidu",
|
|
536
|
+
"ask.",
|
|
537
|
+
"jina.ai"
|
|
538
|
+
];
|
|
539
|
+
function isSearchEngine(hostname) {
|
|
540
|
+
const lower = hostname.toLowerCase();
|
|
541
|
+
return SEARCH_ENGINE_HOSTS.some((h) => lower.includes(h));
|
|
542
|
+
}
|
|
543
|
+
const browser = {
|
|
544
|
+
spec: browserSpec,
|
|
545
|
+
impl: async (run, params) => {
|
|
546
|
+
const context = run.context;
|
|
547
|
+
const url = params.url;
|
|
548
|
+
if (!url) {
|
|
549
|
+
return "Error: url is required";
|
|
550
|
+
}
|
|
551
|
+
try {
|
|
552
|
+
const hostname = new URL(url).hostname;
|
|
553
|
+
if (isSearchEngine(hostname)) {
|
|
554
|
+
return "Error: Direct browsing of search engine result pages is disabled. Use google_search instead.";
|
|
555
|
+
}
|
|
556
|
+
}
|
|
557
|
+
catch {
|
|
558
|
+
return `Error: Invalid URL: ${url}`;
|
|
559
|
+
}
|
|
560
|
+
try {
|
|
561
|
+
// The URL comes from the model and is therefore attacker-influenceable
|
|
562
|
+
// via prompt injection. safeFetch gates it and every redirect hop against
|
|
563
|
+
// SSRF, exactly as the HTTP tools do — a plain fetch here reached the
|
|
564
|
+
// host's metadata service and internal APIs.
|
|
565
|
+
const response = await safeFetch(url, {
|
|
566
|
+
headers: {
|
|
567
|
+
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.93 Safari/537.36",
|
|
568
|
+
Accept: "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",
|
|
569
|
+
"Accept-Language": "en-US,en;q=0.5"
|
|
570
|
+
},
|
|
571
|
+
signal: requestSignal(context, 30_000)
|
|
572
|
+
});
|
|
573
|
+
if (!response.ok) {
|
|
574
|
+
return `Error: HTTP ${response.status} ${response.statusText} fetching ${url}`;
|
|
575
|
+
}
|
|
576
|
+
const html = await response.text();
|
|
577
|
+
return htmlToText(html);
|
|
578
|
+
}
|
|
579
|
+
catch (e) {
|
|
580
|
+
const message = e instanceof Error ? e.message : String(e);
|
|
581
|
+
return `Error: ${message}`;
|
|
582
|
+
}
|
|
583
|
+
}
|
|
584
|
+
};
|
|
585
|
+
// ---------------------------------------------------------------------------
|
|
586
|
+
// take_screenshot
|
|
587
|
+
// ---------------------------------------------------------------------------
|
|
588
|
+
const takeScreenshot = {
|
|
589
|
+
spec: takeScreenshotSpec,
|
|
590
|
+
impl: async (run, params) => {
|
|
591
|
+
const context = run.context;
|
|
592
|
+
const url = params.url;
|
|
593
|
+
if (!url) {
|
|
594
|
+
return { error: "URL is required for taking a screenshot" };
|
|
595
|
+
}
|
|
596
|
+
const outputFile = params.output_file ?? "screenshot.png";
|
|
597
|
+
const browserUrl = process.env.BROWSER_URL;
|
|
598
|
+
if (browserUrl) {
|
|
599
|
+
try {
|
|
600
|
+
// BROWSER_URL is operator-configured, not model-controlled, so it stays
|
|
601
|
+
// a plain fetch (it is usually an internal service safeFetch would
|
|
602
|
+
// block) — but it still has to observe the run's cancellation.
|
|
603
|
+
const response = await fetch(browserUrl, {
|
|
604
|
+
method: "POST",
|
|
605
|
+
headers: { "Content-Type": "application/json" },
|
|
606
|
+
body: JSON.stringify({ url, output_file: outputFile }),
|
|
607
|
+
signal: requestSignal(context, 30_000)
|
|
608
|
+
});
|
|
609
|
+
if (!response.ok) {
|
|
610
|
+
return {
|
|
611
|
+
error: `Browser service returned HTTP ${response.status}: ${response.statusText}`,
|
|
612
|
+
url
|
|
613
|
+
};
|
|
614
|
+
}
|
|
615
|
+
const result = (await response.json());
|
|
616
|
+
return { success: true, ...result };
|
|
617
|
+
}
|
|
618
|
+
catch (e) {
|
|
619
|
+
const message = e instanceof Error ? e.message : String(e);
|
|
620
|
+
return { error: `Error taking screenshot: ${message}` };
|
|
621
|
+
}
|
|
622
|
+
}
|
|
623
|
+
let scheme;
|
|
624
|
+
try {
|
|
625
|
+
scheme = new URL(url).protocol;
|
|
626
|
+
}
|
|
627
|
+
catch {
|
|
628
|
+
return { error: `Invalid URL: ${url}`, url };
|
|
629
|
+
}
|
|
630
|
+
if (scheme !== "http:" && scheme !== "https:") {
|
|
631
|
+
return { error: `Only http and https URLs can be screenshotted: ${url}`, url };
|
|
632
|
+
}
|
|
633
|
+
// The URL comes from the model, so on a shared deployment it gets the same
|
|
634
|
+
// SSRF policy safeFetch applies — a real browser would otherwise render the
|
|
635
|
+
// host's metadata service and hand the picture back. A local install
|
|
636
|
+
// trusts loopback already, and screenshotting the app on localhost is the
|
|
637
|
+
// main reason to take one.
|
|
638
|
+
if (isAuthEnforced() && !isSafePublicHttpsUrl(url)) {
|
|
639
|
+
return {
|
|
640
|
+
error: `Refusing to screenshot an unsafe URL (must be https to a public host): ${url}`,
|
|
641
|
+
url
|
|
642
|
+
};
|
|
643
|
+
}
|
|
644
|
+
try {
|
|
645
|
+
const { captureScreenshot } = await import("./local-browser.js");
|
|
646
|
+
const bytes = await captureScreenshot(url, {
|
|
647
|
+
fullPage: params.full_page === true,
|
|
648
|
+
timeoutMs: 30_000
|
|
649
|
+
});
|
|
650
|
+
const { persistBinaryOutput } = await import("../tools/binary-output.js");
|
|
651
|
+
const persisted = await persistBinaryOutput(context, bytes, {
|
|
652
|
+
outputFile,
|
|
653
|
+
contentType: "image/png",
|
|
654
|
+
uiPrefix: "screenshots"
|
|
655
|
+
});
|
|
656
|
+
return { success: true, url, file_size_bytes: bytes.byteLength, ...persisted };
|
|
657
|
+
}
|
|
658
|
+
catch (e) {
|
|
659
|
+
const message = e instanceof Error ? e.message : String(e);
|
|
660
|
+
// chrome-launcher says "No Chrome installations found" — on its own that
|
|
661
|
+
// reads like a NodeTool bug rather than a missing browser.
|
|
662
|
+
const hint = /chrome installation/i.test(message)
|
|
663
|
+
? " Install Chrome, set CHROME_PATH to a Chromium binary, or set BROWSER_URL to a remote browser service."
|
|
664
|
+
: "";
|
|
665
|
+
return { error: `Error taking screenshot: ${message}${hint}`, url };
|
|
666
|
+
}
|
|
667
|
+
}
|
|
668
|
+
};
|
|
669
|
+
// ---------------------------------------------------------------------------
|
|
670
|
+
// download_file
|
|
671
|
+
// ---------------------------------------------------------------------------
|
|
672
|
+
/**
|
|
673
|
+
* A ref NodeTool resolves itself, rather than a URL to fetch. `asset://` is a
|
|
674
|
+
* stored identifier — on the cloud backends the bytes sit behind a signed URL
|
|
675
|
+
* only the server can mint — so `safeFetch` can only ever refuse it, and did:
|
|
676
|
+
* a session holding three generated clips was told they were "unsafe URLs" and
|
|
677
|
+
* had no way to put them in the workspace at all.
|
|
678
|
+
*/
|
|
679
|
+
function isStoredRef(url) {
|
|
680
|
+
const value = url.trim();
|
|
681
|
+
return (value.startsWith("asset://") ||
|
|
682
|
+
value.startsWith("package://") ||
|
|
683
|
+
value.startsWith("data:") ||
|
|
684
|
+
value.startsWith("/api/storage/"));
|
|
685
|
+
}
|
|
686
|
+
/** Resolve a stored ref host-side and write the bytes into the workspace. */
|
|
687
|
+
async function copyStoredRef(context, url, outputFile) {
|
|
688
|
+
const ref = url.trim();
|
|
689
|
+
let bytes = null;
|
|
690
|
+
try {
|
|
691
|
+
bytes = await loadMediaRefBytes({ uri: ref }, context);
|
|
692
|
+
}
|
|
693
|
+
catch (e) {
|
|
694
|
+
return {
|
|
695
|
+
url: ref,
|
|
696
|
+
output_file: outputFile,
|
|
697
|
+
success: false,
|
|
698
|
+
error: `Could not read ${ref}: ${e instanceof Error ? e.message : String(e)}`
|
|
699
|
+
};
|
|
700
|
+
}
|
|
701
|
+
// Zero bytes is a failed read wearing a buffer — writing it would leave a
|
|
702
|
+
// file that fails later, somewhere with less context than here.
|
|
703
|
+
if (!bytes || bytes.byteLength === 0) {
|
|
704
|
+
return {
|
|
705
|
+
url: ref,
|
|
706
|
+
output_file: outputFile,
|
|
707
|
+
success: false,
|
|
708
|
+
error: `${ref} resolved to no bytes.`
|
|
709
|
+
};
|
|
710
|
+
}
|
|
711
|
+
const declared = /^data:([^;,]+)[;,]/.exec(ref)?.[1];
|
|
712
|
+
const contentType = declared ?? mimeForPath(ref) ?? mimeForPath(outputFile) ?? "application/octet-stream";
|
|
713
|
+
const { persistBinaryOutput } = await import("../tools/binary-output.js");
|
|
714
|
+
const persisted = await persistBinaryOutput(context, bytes, {
|
|
715
|
+
outputFile,
|
|
716
|
+
contentType,
|
|
717
|
+
uiPrefix: "downloads"
|
|
718
|
+
});
|
|
719
|
+
return {
|
|
720
|
+
url: ref,
|
|
721
|
+
success: true,
|
|
722
|
+
content_type: contentType,
|
|
723
|
+
file_size_bytes: bytes.byteLength,
|
|
724
|
+
...persisted
|
|
725
|
+
};
|
|
726
|
+
}
|
|
727
|
+
const downloadFile = {
|
|
728
|
+
spec: downloadFileSpec,
|
|
729
|
+
impl: async (run, params) => {
|
|
730
|
+
const context = run.context;
|
|
731
|
+
try {
|
|
732
|
+
const url = params["url"];
|
|
733
|
+
const outputFile = params["output_file"];
|
|
734
|
+
if (!isString(url) || !url) {
|
|
735
|
+
return { error: "URL is required" };
|
|
736
|
+
}
|
|
737
|
+
if (!isString(outputFile) || !outputFile) {
|
|
738
|
+
return { error: "Output file is required" };
|
|
739
|
+
}
|
|
740
|
+
if (isStoredRef(url)) {
|
|
741
|
+
return await copyStoredRef(context, url, outputFile);
|
|
742
|
+
}
|
|
743
|
+
const customHeaders = isObjectLike(params["headers"])
|
|
744
|
+
? params["headers"]
|
|
745
|
+
: {};
|
|
746
|
+
const mergedHeaders = { ...DEFAULT_HEADERS, ...customHeaders };
|
|
747
|
+
const timeoutMs = isNumber(params["timeout"])
|
|
748
|
+
? params["timeout"] * 1000
|
|
749
|
+
: 60_000;
|
|
750
|
+
// safeFetch gates the URL (and every redirect hop) against SSRF: no
|
|
751
|
+
// http:// downgrade, no loopback/link-local/RFC1918 targets. The URL is
|
|
752
|
+
// model/attacker-influenceable via prompt injection, so it must not be
|
|
753
|
+
// able to reach the host's metadata service or internal APIs.
|
|
754
|
+
const response = await safeFetch(url, {
|
|
755
|
+
headers: mergedHeaders,
|
|
756
|
+
signal: requestSignal(context, timeoutMs)
|
|
757
|
+
});
|
|
758
|
+
if (!response.ok) {
|
|
759
|
+
return {
|
|
760
|
+
url,
|
|
761
|
+
output_file: outputFile,
|
|
762
|
+
success: false,
|
|
763
|
+
error: `HTTP request failed with status ${response.status}`,
|
|
764
|
+
status_code: response.status
|
|
765
|
+
};
|
|
766
|
+
}
|
|
767
|
+
const contentType = response.headers.get("Content-Type") ?? "unknown";
|
|
768
|
+
const contentLength = response.headers.get("Content-Length");
|
|
769
|
+
const parsedLength = contentLength ? parseInt(contentLength, 10) : NaN;
|
|
770
|
+
const fileSizeBytes = Number.isFinite(parsedLength) ? parsedLength : null;
|
|
771
|
+
const bytes = new Uint8Array(await response.arrayBuffer());
|
|
772
|
+
const { persistBinaryOutput } = await import("../tools/binary-output.js");
|
|
773
|
+
const persisted = await persistBinaryOutput(context, bytes, {
|
|
774
|
+
outputFile,
|
|
775
|
+
contentType,
|
|
776
|
+
uiPrefix: "downloads"
|
|
777
|
+
});
|
|
778
|
+
return {
|
|
779
|
+
url,
|
|
780
|
+
success: true,
|
|
781
|
+
content_type: contentType,
|
|
782
|
+
file_size_bytes: fileSizeBytes,
|
|
783
|
+
...persisted
|
|
784
|
+
};
|
|
785
|
+
}
|
|
786
|
+
catch (e) {
|
|
787
|
+
return { error: `Error in download process: ${String(e)}` };
|
|
788
|
+
}
|
|
789
|
+
}
|
|
790
|
+
};
|
|
791
|
+
// ---------------------------------------------------------------------------
|
|
792
|
+
// http_request
|
|
793
|
+
// ---------------------------------------------------------------------------
|
|
794
|
+
const httpRequest = {
|
|
795
|
+
spec: httpRequestSpec,
|
|
796
|
+
impl: async (run, params) => {
|
|
797
|
+
const context = run.context;
|
|
798
|
+
try {
|
|
799
|
+
const url = params["url"];
|
|
800
|
+
if (!isString(url) || !url) {
|
|
801
|
+
return { error: "URL is required" };
|
|
802
|
+
}
|
|
803
|
+
const method = (isString(params["method"]) ? params["method"] : "GET").toUpperCase();
|
|
804
|
+
const customHeaders = isObjectLike(params["headers"])
|
|
805
|
+
? params["headers"]
|
|
806
|
+
: {};
|
|
807
|
+
const mergedHeaders = { ...DEFAULT_HEADERS, ...customHeaders };
|
|
808
|
+
const body = isString(params["body"]) ? params["body"] : undefined;
|
|
809
|
+
const timeoutMs = isNumber(params["timeout"])
|
|
810
|
+
? params["timeout"] * 1000
|
|
811
|
+
: 60_000;
|
|
812
|
+
// safeFetch gates the URL (and redirects) against SSRF — the URL is
|
|
813
|
+
// model/attacker-influenceable via prompt injection, so it must not be
|
|
814
|
+
// able to reach loopback/link-local/internal hosts or downgrade to http.
|
|
815
|
+
const response = await safeFetch(url, {
|
|
816
|
+
method,
|
|
817
|
+
headers: mergedHeaders,
|
|
818
|
+
body: ["POST", "PUT", "PATCH"].includes(method) ? body : undefined,
|
|
819
|
+
signal: requestSignal(context, timeoutMs)
|
|
820
|
+
});
|
|
821
|
+
const contentType = response.headers.get("Content-Type") ?? "unknown";
|
|
822
|
+
const text = await response.text();
|
|
823
|
+
return {
|
|
824
|
+
url,
|
|
825
|
+
status_code: response.status,
|
|
826
|
+
success: response.ok,
|
|
827
|
+
content_type: contentType,
|
|
828
|
+
body: text
|
|
829
|
+
};
|
|
830
|
+
}
|
|
831
|
+
catch (e) {
|
|
832
|
+
return { error: `Error in HTTP request: ${String(e)}` };
|
|
833
|
+
}
|
|
834
|
+
}
|
|
835
|
+
};
|
|
836
|
+
/** Every web capability, in the order the tool files declared them. */
|
|
837
|
+
export const WEB_CAPABILITIES = [
|
|
838
|
+
webSearch,
|
|
839
|
+
imageSearch,
|
|
840
|
+
browser,
|
|
841
|
+
takeScreenshot,
|
|
842
|
+
httpRequest,
|
|
843
|
+
downloadFile
|
|
844
|
+
];
|
|
845
|
+
export const module = {
|
|
846
|
+
module: "web",
|
|
847
|
+
exports: WEB_CAPABILITIES
|
|
848
|
+
};
|
|
849
|
+
export { webSearch, imageSearch, browser, takeScreenshot, httpRequest, downloadFile };
|
|
850
|
+
//# sourceMappingURL=web.js.map
|