@nodetool-ai/protocol 0.7.0-rc.23 → 0.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +56 -0
- package/dist/.nodetool-build-stamp +1 -0
- package/dist/ai-video-production.d.ts +276 -0
- package/dist/ai-video-production.d.ts.map +1 -0
- package/dist/ai-video-production.js +131 -0
- package/dist/ai-video-production.js.map +1 -0
- package/dist/api-schemas/agent-access.d.ts +134 -0
- package/dist/api-schemas/agent-access.d.ts.map +1 -0
- package/dist/api-schemas/agent-access.js +93 -0
- package/dist/api-schemas/agent-access.js.map +1 -0
- package/dist/api-schemas/api-error-code.d.ts +11 -1
- package/dist/api-schemas/api-error-code.d.ts.map +1 -1
- package/dist/api-schemas/api-error-code.js +10 -0
- package/dist/api-schemas/api-error-code.js.map +1 -1
- package/dist/api-schemas/app-runs.d.ts +1410 -0
- package/dist/api-schemas/app-runs.d.ts.map +1 -0
- package/dist/api-schemas/app-runs.js +105 -0
- package/dist/api-schemas/app-runs.js.map +1 -0
- package/dist/api-schemas/applications.d.ts +3216 -0
- package/dist/api-schemas/applications.d.ts.map +1 -0
- package/dist/api-schemas/applications.js +487 -0
- package/dist/api-schemas/applications.js.map +1 -0
- package/dist/api-schemas/assets.d.ts +239 -0
- package/dist/api-schemas/assets.d.ts.map +1 -1
- package/dist/api-schemas/assets.js +136 -5
- package/dist/api-schemas/assets.js.map +1 -1
- package/dist/api-schemas/bug-reports.d.ts +38 -0
- package/dist/api-schemas/bug-reports.d.ts.map +1 -0
- package/dist/api-schemas/bug-reports.js +34 -0
- package/dist/api-schemas/bug-reports.js.map +1 -0
- package/dist/api-schemas/code-gen.d.ts +176 -0
- package/dist/api-schemas/code-gen.d.ts.map +1 -0
- package/dist/api-schemas/code-gen.js +205 -0
- package/dist/api-schemas/code-gen.js.map +1 -0
- package/dist/api-schemas/collections.d.ts.map +1 -1
- package/dist/api-schemas/collections.js +3 -4
- package/dist/api-schemas/collections.js.map +1 -1
- package/dist/api-schemas/costs.d.ts +179 -0
- package/dist/api-schemas/costs.d.ts.map +1 -1
- package/dist/api-schemas/costs.js +100 -4
- package/dist/api-schemas/costs.js.map +1 -1
- package/dist/api-schemas/credits.d.ts +42 -0
- package/dist/api-schemas/credits.d.ts.map +1 -0
- package/dist/api-schemas/credits.js +43 -0
- package/dist/api-schemas/credits.js.map +1 -0
- package/dist/api-schemas/documents.d.ts +163 -0
- package/dist/api-schemas/documents.d.ts.map +1 -0
- package/dist/api-schemas/documents.js +75 -0
- package/dist/api-schemas/documents.js.map +1 -0
- package/dist/api-schemas/error-traces.d.ts +249 -0
- package/dist/api-schemas/error-traces.d.ts.map +1 -0
- package/dist/api-schemas/error-traces.js +112 -0
- package/dist/api-schemas/error-traces.js.map +1 -0
- package/dist/api-schemas/files.d.ts +13 -0
- package/dist/api-schemas/files.d.ts.map +1 -1
- package/dist/api-schemas/files.js +8 -0
- package/dist/api-schemas/files.js.map +1 -1
- package/dist/api-schemas/fonts.d.ts +17 -1
- package/dist/api-schemas/fonts.d.ts.map +1 -1
- package/dist/api-schemas/fonts.js +19 -3
- package/dist/api-schemas/fonts.js.map +1 -1
- package/dist/api-schemas/index.d.ts +27 -1
- package/dist/api-schemas/index.d.ts.map +1 -1
- package/dist/api-schemas/index.js +27 -1
- package/dist/api-schemas/index.js.map +1 -1
- package/dist/api-schemas/jobs.d.ts +44 -0
- package/dist/api-schemas/jobs.d.ts.map +1 -1
- package/dist/api-schemas/jobs.js +26 -2
- package/dist/api-schemas/jobs.js.map +1 -1
- package/dist/api-schemas/js-scripts.d.ts +367 -0
- package/dist/api-schemas/js-scripts.d.ts.map +1 -0
- package/dist/api-schemas/js-scripts.js +341 -0
- package/dist/api-schemas/js-scripts.js.map +1 -0
- package/dist/api-schemas/mcp-config.d.ts +4 -1
- package/dist/api-schemas/mcp-config.d.ts.map +1 -1
- package/dist/api-schemas/mcp-config.js +10 -3
- package/dist/api-schemas/mcp-config.js.map +1 -1
- package/dist/api-schemas/memories.d.ts +84 -0
- package/dist/api-schemas/memories.d.ts.map +1 -0
- package/dist/api-schemas/memories.js +54 -0
- package/dist/api-schemas/memories.js.map +1 -0
- package/dist/api-schemas/messages.d.ts +1 -0
- package/dist/api-schemas/messages.d.ts.map +1 -1
- package/dist/api-schemas/messages.js +4 -4
- package/dist/api-schemas/messages.js.map +1 -1
- package/dist/api-schemas/models.d.ts +164 -0
- package/dist/api-schemas/models.d.ts.map +1 -1
- package/dist/api-schemas/models.js +53 -6
- package/dist/api-schemas/models.js.map +1 -1
- package/dist/api-schemas/nodes.d.ts +97 -0
- package/dist/api-schemas/nodes.d.ts.map +1 -1
- package/dist/api-schemas/nodes.js +89 -0
- package/dist/api-schemas/nodes.js.map +1 -1
- package/dist/api-schemas/projects.d.ts +427 -0
- package/dist/api-schemas/projects.d.ts.map +1 -0
- package/dist/api-schemas/projects.js +224 -0
- package/dist/api-schemas/projects.js.map +1 -0
- package/dist/api-schemas/recipes.d.ts +172 -0
- package/dist/api-schemas/recipes.d.ts.map +1 -0
- package/dist/api-schemas/recipes.js +144 -0
- package/dist/api-schemas/recipes.js.map +1 -0
- package/dist/api-schemas/resources.d.ts +112 -0
- package/dist/api-schemas/resources.d.ts.map +1 -0
- package/dist/api-schemas/resources.js +44 -0
- package/dist/api-schemas/resources.js.map +1 -0
- package/dist/api-schemas/runs.d.ts +6 -0
- package/dist/api-schemas/runs.d.ts.map +1 -0
- package/dist/api-schemas/runs.js +4 -0
- package/dist/api-schemas/runs.js.map +1 -0
- package/dist/api-schemas/scripts.d.ts +1571 -0
- package/dist/api-schemas/scripts.d.ts.map +1 -0
- package/dist/api-schemas/scripts.js +153 -0
- package/dist/api-schemas/scripts.js.map +1 -0
- package/dist/api-schemas/sdk-execution-v1.d.ts +468 -0
- package/dist/api-schemas/sdk-execution-v1.d.ts.map +1 -0
- package/dist/api-schemas/sdk-execution-v1.js +115 -0
- package/dist/api-schemas/sdk-execution-v1.js.map +1 -0
- package/dist/api-schemas/sdk-lifecycle-v1.d.ts +217 -0
- package/dist/api-schemas/sdk-lifecycle-v1.d.ts.map +1 -0
- package/dist/api-schemas/sdk-lifecycle-v1.js +117 -0
- package/dist/api-schemas/sdk-lifecycle-v1.js.map +1 -0
- package/dist/api-schemas/sdk-models-v1.d.ts +181 -0
- package/dist/api-schemas/sdk-models-v1.d.ts.map +1 -0
- package/dist/api-schemas/sdk-models-v1.js +108 -0
- package/dist/api-schemas/sdk-models-v1.js.map +1 -0
- package/dist/api-schemas/sdk-v1-http-operations.d.ts +941 -0
- package/dist/api-schemas/sdk-v1-http-operations.d.ts.map +1 -0
- package/dist/api-schemas/sdk-v1-http-operations.js +465 -0
- package/dist/api-schemas/sdk-v1-http-operations.js.map +1 -0
- package/dist/api-schemas/sdk-v1-operations.d.ts +151 -0
- package/dist/api-schemas/sdk-v1-operations.d.ts.map +1 -0
- package/dist/api-schemas/sdk-v1-operations.js +97 -0
- package/dist/api-schemas/sdk-v1-operations.js.map +1 -0
- package/dist/api-schemas/sdk-v1-websocket-operations.d.ts +97 -0
- package/dist/api-schemas/sdk-v1-websocket-operations.d.ts.map +1 -0
- package/dist/api-schemas/sdk-v1-websocket-operations.js +96 -0
- package/dist/api-schemas/sdk-v1-websocket-operations.js.map +1 -0
- package/dist/api-schemas/sdk-v1.d.ts +15 -0
- package/dist/api-schemas/sdk-v1.d.ts.map +1 -0
- package/dist/api-schemas/sdk-v1.js +22 -0
- package/dist/api-schemas/sdk-v1.js.map +1 -0
- package/dist/api-schemas/segmentation.d.ts +75 -0
- package/dist/api-schemas/segmentation.d.ts.map +1 -0
- package/dist/api-schemas/segmentation.js +54 -0
- package/dist/api-schemas/segmentation.js.map +1 -0
- package/dist/api-schemas/settings.d.ts +162 -0
- package/dist/api-schemas/settings.d.ts.map +1 -1
- package/dist/api-schemas/settings.js +71 -0
- package/dist/api-schemas/settings.js.map +1 -1
- package/dist/api-schemas/sketch.d.ts +858 -0
- package/dist/api-schemas/sketch.d.ts.map +1 -0
- package/dist/api-schemas/sketch.js +546 -0
- package/dist/api-schemas/sketch.js.map +1 -0
- package/dist/api-schemas/skills.d.ts +27 -14
- package/dist/api-schemas/skills.d.ts.map +1 -1
- package/dist/api-schemas/skills.js +64 -11
- package/dist/api-schemas/skills.js.map +1 -1
- package/dist/api-schemas/storage.d.ts +8 -0
- package/dist/api-schemas/storage.d.ts.map +1 -1
- package/dist/api-schemas/storage.js +7 -0
- package/dist/api-schemas/storage.js.map +1 -1
- package/dist/api-schemas/storyboards.d.ts +8595 -0
- package/dist/api-schemas/storyboards.d.ts.map +1 -0
- package/dist/api-schemas/storyboards.js +524 -0
- package/dist/api-schemas/storyboards.js.map +1 -0
- package/dist/api-schemas/threads.d.ts +12 -4
- package/dist/api-schemas/threads.d.ts.map +1 -1
- package/dist/api-schemas/threads.js +12 -4
- package/dist/api-schemas/threads.js.map +1 -1
- package/dist/api-schemas/timeline-tool-contracts.d.ts +1687 -0
- package/dist/api-schemas/timeline-tool-contracts.d.ts.map +1 -0
- package/dist/api-schemas/timeline-tool-contracts.js +725 -0
- package/dist/api-schemas/timeline-tool-contracts.js.map +1 -0
- package/dist/api-schemas/timeline-tool-params.d.ts +1270 -0
- package/dist/api-schemas/timeline-tool-params.d.ts.map +1 -0
- package/dist/api-schemas/timeline-tool-params.js +1529 -0
- package/dist/api-schemas/timeline-tool-params.js.map +1 -0
- package/dist/api-schemas/timeline.d.ts +13740 -0
- package/dist/api-schemas/timeline.d.ts.map +1 -0
- package/dist/api-schemas/timeline.js +1928 -0
- package/dist/api-schemas/timeline.js.map +1 -0
- package/dist/api-schemas/ui-tool-contract.d.ts +35 -0
- package/dist/api-schemas/ui-tool-contract.d.ts.map +1 -0
- package/dist/api-schemas/ui-tool-contract.js +31 -0
- package/dist/api-schemas/ui-tool-contract.js.map +1 -0
- package/dist/api-schemas/workflows.d.ts +904 -18
- package/dist/api-schemas/workflows.d.ts.map +1 -1
- package/dist/api-schemas/workflows.js +507 -6
- package/dist/api-schemas/workflows.js.map +1 -1
- package/dist/api-schemas/workspace.d.ts +45 -0
- package/dist/api-schemas/workspace.d.ts.map +1 -1
- package/dist/api-schemas/workspace.js +47 -1
- package/dist/api-schemas/workspace.js.map +1 -1
- package/dist/api-types.d.ts +651 -27
- package/dist/api-types.d.ts.map +1 -1
- package/dist/api-types.js +252 -1
- package/dist/api-types.js.map +1 -1
- package/dist/app-deployment.d.ts +37 -0
- package/dist/app-deployment.d.ts.map +1 -0
- package/dist/app-deployment.js +42 -0
- package/dist/app-deployment.js.map +1 -0
- package/dist/asset-file-name.d.ts +15 -0
- package/dist/asset-file-name.d.ts.map +1 -0
- package/dist/asset-file-name.js +61 -0
- package/dist/asset-file-name.js.map +1 -0
- package/dist/asset-generation.d.ts +58 -0
- package/dist/asset-generation.d.ts.map +1 -0
- package/dist/asset-generation.js +147 -0
- package/dist/asset-generation.js.map +1 -0
- package/dist/blend-modes.d.ts +20 -0
- package/dist/blend-modes.d.ts.map +1 -0
- package/dist/blend-modes.js +33 -0
- package/dist/blend-modes.js.map +1 -0
- package/dist/bridge-frames.d.ts +654 -0
- package/dist/bridge-frames.d.ts.map +1 -0
- package/dist/bridge-frames.js +448 -0
- package/dist/bridge-frames.js.map +1 -0
- package/dist/bridge-frames.schema.json +862 -0
- package/dist/bridge-protocol.d.ts +57 -20
- package/dist/bridge-protocol.d.ts.map +1 -1
- package/dist/bridge-protocol.js +57 -20
- package/dist/bridge-protocol.js.map +1 -1
- package/dist/browser-run-traces.d.ts +102 -0
- package/dist/browser-run-traces.d.ts.map +1 -0
- package/dist/browser-run-traces.js +30 -0
- package/dist/browser-run-traces.js.map +1 -0
- package/dist/builtin-packs.d.ts +45 -0
- package/dist/builtin-packs.d.ts.map +1 -0
- package/dist/builtin-packs.js +121 -0
- package/dist/builtin-packs.js.map +1 -0
- package/dist/caption-word.d.ts +15 -0
- package/dist/caption-word.d.ts.map +1 -0
- package/dist/caption-word.js +10 -0
- package/dist/caption-word.js.map +1 -0
- package/dist/cloud-profile.d.ts +187 -0
- package/dist/cloud-profile.d.ts.map +1 -0
- package/dist/cloud-profile.js +286 -0
- package/dist/cloud-profile.js.map +1 -0
- package/dist/creative.d.ts +580 -0
- package/dist/creative.d.ts.map +1 -0
- package/dist/creative.js +274 -0
- package/dist/creative.js.map +1 -0
- package/dist/custom-providers.d.ts +70 -0
- package/dist/custom-providers.d.ts.map +1 -0
- package/dist/custom-providers.js +125 -0
- package/dist/custom-providers.js.map +1 -0
- package/dist/document-ops.d.ts +15 -0
- package/dist/document-ops.d.ts.map +1 -0
- package/dist/document-ops.js +2 -0
- package/dist/document-ops.js.map +1 -0
- package/dist/game-assets.d.ts +344 -0
- package/dist/game-assets.d.ts.map +1 -0
- package/dist/game-assets.js +297 -0
- package/dist/game-assets.js.map +1 -0
- package/dist/game-authoring.d.ts +113 -0
- package/dist/game-authoring.d.ts.map +1 -0
- package/dist/game-authoring.js +37 -0
- package/dist/game-authoring.js.map +1 -0
- package/dist/game-design.d.ts +90 -0
- package/dist/game-design.d.ts.map +1 -0
- package/dist/game-design.js +417 -0
- package/dist/game-design.js.map +1 -0
- package/dist/game-flow-prompt.d.ts +68 -0
- package/dist/game-flow-prompt.d.ts.map +1 -0
- package/dist/game-flow-prompt.js +121 -0
- package/dist/game-flow-prompt.js.map +1 -0
- package/dist/game-graph.d.ts +96 -0
- package/dist/game-graph.d.ts.map +1 -0
- package/dist/game-graph.js +481 -0
- package/dist/game-graph.js.map +1 -0
- package/dist/game-migration.d.ts +4 -0
- package/dist/game-migration.d.ts.map +1 -0
- package/dist/game-migration.js +6 -0
- package/dist/game-migration.js.map +1 -0
- package/dist/game-slot-prompt.d.ts +90 -0
- package/dist/game-slot-prompt.d.ts.map +1 -0
- package/dist/game-slot-prompt.js +237 -0
- package/dist/game-slot-prompt.js.map +1 -0
- package/dist/game-step.d.ts +10 -0
- package/dist/game-step.d.ts.map +1 -0
- package/dist/game-step.js +2 -0
- package/dist/game-step.js.map +1 -0
- package/dist/game.d.ts +2 -0
- package/dist/game.d.ts.map +1 -0
- package/dist/game.js +2 -0
- package/dist/game.js.map +1 -0
- package/dist/game2d/components/animator.d.ts +22 -0
- package/dist/game2d/components/animator.d.ts.map +1 -0
- package/dist/game2d/components/animator.js +6 -0
- package/dist/game2d/components/animator.js.map +1 -0
- package/dist/game2d/components/assets.d.ts +132 -0
- package/dist/game2d/components/assets.d.ts.map +1 -0
- package/dist/game2d/components/assets.js +52 -0
- package/dist/game2d/components/assets.js.map +1 -0
- package/dist/game2d/components/audioSource.d.ts +7 -0
- package/dist/game2d/components/audioSource.d.ts.map +1 -0
- package/dist/game2d/components/audioSource.js +4 -0
- package/dist/game2d/components/audioSource.js.map +1 -0
- package/dist/game2d/components/background.d.ts +38 -0
- package/dist/game2d/components/background.d.ts.map +1 -0
- package/dist/game2d/components/background.js +10 -0
- package/dist/game2d/components/background.js.map +1 -0
- package/dist/game2d/components/behaviors.d.ts +50 -0
- package/dist/game2d/components/behaviors.d.ts.map +1 -0
- package/dist/game2d/components/behaviors.js +15 -0
- package/dist/game2d/components/behaviors.js.map +1 -0
- package/dist/game2d/components/body2d.d.ts +13 -0
- package/dist/game2d/components/body2d.d.ts.map +1 -0
- package/dist/game2d/components/body2d.js +4 -0
- package/dist/game2d/components/body2d.js.map +1 -0
- package/dist/game2d/components/camera2d.d.ts +7 -0
- package/dist/game2d/components/camera2d.d.ts.map +1 -0
- package/dist/game2d/components/camera2d.js +4 -0
- package/dist/game2d/components/camera2d.js.map +1 -0
- package/dist/game2d/components/collider2d.d.ts +10 -0
- package/dist/game2d/components/collider2d.d.ts.map +1 -0
- package/dist/game2d/components/collider2d.js +5 -0
- package/dist/game2d/components/collider2d.js.map +1 -0
- package/dist/game2d/components/common.d.ts +16 -0
- package/dist/game2d/components/common.d.ts.map +1 -0
- package/dist/game2d/components/common.js +13 -0
- package/dist/game2d/components/common.js.map +1 -0
- package/dist/game2d/components/entity-components.d.ts +181 -0
- package/dist/game2d/components/entity-components.d.ts.map +1 -0
- package/dist/game2d/components/entity-components.js +21 -0
- package/dist/game2d/components/entity-components.js.map +1 -0
- package/dist/game2d/components/light2d.d.ts +12 -0
- package/dist/game2d/components/light2d.d.ts.map +1 -0
- package/dist/game2d/components/light2d.js +5 -0
- package/dist/game2d/components/light2d.js.map +1 -0
- package/dist/game2d/components/lighting.d.ts +17 -0
- package/dist/game2d/components/lighting.d.ts.map +1 -0
- package/dist/game2d/components/lighting.js +6 -0
- package/dist/game2d/components/lighting.js.map +1 -0
- package/dist/game2d/components/music.d.ts +8 -0
- package/dist/game2d/components/music.d.ts.map +1 -0
- package/dist/game2d/components/music.js +4 -0
- package/dist/game2d/components/music.js.map +1 -0
- package/dist/game2d/components/sprite.d.ts +26 -0
- package/dist/game2d/components/sprite.d.ts.map +1 -0
- package/dist/game2d/components/sprite.js +6 -0
- package/dist/game2d/components/sprite.js.map +1 -0
- package/dist/game2d/components/tilemap.d.ts +23 -0
- package/dist/game2d/components/tilemap.d.ts.map +1 -0
- package/dist/game2d/components/tilemap.js +6 -0
- package/dist/game2d/components/tilemap.js.map +1 -0
- package/dist/game2d/components/transform.d.ts +10 -0
- package/dist/game2d/components/transform.d.ts.map +1 -0
- package/dist/game2d/components/transform.js +10 -0
- package/dist/game2d/components/transform.js.map +1 -0
- package/dist/game2d/components/visual-animation.d.ts +148 -0
- package/dist/game2d/components/visual-animation.d.ts.map +1 -0
- package/dist/game2d/components/visual-animation.js +10 -0
- package/dist/game2d/components/visual-animation.js.map +1 -0
- package/dist/game2d/index.d.ts +1426 -0
- package/dist/game2d/index.d.ts.map +1 -0
- package/dist/game2d/index.js +135 -0
- package/dist/game2d/index.js.map +1 -0
- package/dist/game3d/components/animator.d.ts +9 -0
- package/dist/game3d/components/animator.d.ts.map +1 -0
- package/dist/game3d/components/animator.js +7 -0
- package/dist/game3d/components/animator.js.map +1 -0
- package/dist/game3d/components/assets.d.ts +261 -0
- package/dist/game3d/components/assets.d.ts.map +1 -0
- package/dist/game3d/components/assets.js +21 -0
- package/dist/game3d/components/assets.js.map +1 -0
- package/dist/game3d/components/behaviors.d.ts +66 -0
- package/dist/game3d/components/behaviors.d.ts.map +1 -0
- package/dist/game3d/components/behaviors.js +9 -0
- package/dist/game3d/components/behaviors.js.map +1 -0
- package/dist/game3d/components/body.d.ts +53 -0
- package/dist/game3d/components/body.d.ts.map +1 -0
- package/dist/game3d/components/body.js +15 -0
- package/dist/game3d/components/body.js.map +1 -0
- package/dist/game3d/components/camera.d.ts +49 -0
- package/dist/game3d/components/camera.d.ts.map +1 -0
- package/dist/game3d/components/camera.js +20 -0
- package/dist/game3d/components/camera.js.map +1 -0
- package/dist/game3d/components/character.d.ts +16 -0
- package/dist/game3d/components/character.d.ts.map +1 -0
- package/dist/game3d/components/character.js +10 -0
- package/dist/game3d/components/character.js.map +1 -0
- package/dist/game3d/components/collider-geometry.d.ts +7 -0
- package/dist/game3d/components/collider-geometry.d.ts.map +1 -0
- package/dist/game3d/components/collider-geometry.js +13 -0
- package/dist/game3d/components/collider-geometry.js.map +1 -0
- package/dist/game3d/components/collider.d.ts +79 -0
- package/dist/game3d/components/collider.d.ts.map +1 -0
- package/dist/game3d/components/collider.js +16 -0
- package/dist/game3d/components/collider.js.map +1 -0
- package/dist/game3d/components/common.d.ts +8 -0
- package/dist/game3d/components/common.d.ts.map +1 -0
- package/dist/game3d/components/common.js +8 -0
- package/dist/game3d/components/common.js.map +1 -0
- package/dist/game3d/components/environment.d.ts +20 -0
- package/dist/game3d/components/environment.d.ts.map +1 -0
- package/dist/game3d/components/environment.js +8 -0
- package/dist/game3d/components/environment.js.map +1 -0
- package/dist/game3d/components/interaction-actor.d.ts +6 -0
- package/dist/game3d/components/interaction-actor.d.ts.map +1 -0
- package/dist/game3d/components/interaction-actor.js +3 -0
- package/dist/game3d/components/interaction-actor.js.map +1 -0
- package/dist/game3d/components/light.d.ts +23 -0
- package/dist/game3d/components/light.d.ts.map +1 -0
- package/dist/game3d/components/light.js +9 -0
- package/dist/game3d/components/light.js.map +1 -0
- package/dist/game3d/components/material.d.ts +15 -0
- package/dist/game3d/components/material.d.ts.map +1 -0
- package/dist/game3d/components/material.js +9 -0
- package/dist/game3d/components/material.js.map +1 -0
- package/dist/game3d/components/model.d.ts +22 -0
- package/dist/game3d/components/model.d.ts.map +1 -0
- package/dist/game3d/components/model.js +8 -0
- package/dist/game3d/components/model.js.map +1 -0
- package/dist/game3d/components/primitive.d.ts +31 -0
- package/dist/game3d/components/primitive.d.ts.map +1 -0
- package/dist/game3d/components/primitive.js +10 -0
- package/dist/game3d/components/primitive.js.map +1 -0
- package/dist/game3d/components/transform.d.ts +24 -0
- package/dist/game3d/components/transform.d.ts.map +1 -0
- package/dist/game3d/components/transform.js +10 -0
- package/dist/game3d/components/transform.js.map +1 -0
- package/dist/game3d/index.d.ts +4045 -0
- package/dist/game3d/index.d.ts.map +1 -0
- package/dist/game3d/index.js +159 -0
- package/dist/game3d/index.js.map +1 -0
- package/dist/game3d.d.ts +2 -0
- package/dist/game3d.d.ts.map +1 -0
- package/dist/game3d.js +2 -0
- package/dist/game3d.js.map +1 -0
- package/dist/graph.d.ts +192 -5
- package/dist/graph.d.ts.map +1 -1
- package/dist/graph.js +515 -0
- package/dist/graph.js.map +1 -1
- package/dist/index.d.ts +59 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +57 -2
- package/dist/index.js.map +1 -1
- package/dist/loop.d.ts +38 -0
- package/dist/loop.d.ts.map +1 -0
- package/dist/loop.js +69 -0
- package/dist/loop.js.map +1 -0
- package/dist/mcp-server-config.d.ts +113 -0
- package/dist/mcp-server-config.d.ts.map +1 -0
- package/dist/mcp-server-config.js +147 -0
- package/dist/mcp-server-config.js.map +1 -0
- package/dist/messages.d.ts +1577 -243
- package/dist/messages.d.ts.map +1 -1
- package/dist/messages.js +718 -22
- package/dist/messages.js.map +1 -1
- package/dist/missing-runtime-package.d.ts +23 -0
- package/dist/missing-runtime-package.d.ts.map +1 -0
- package/dist/missing-runtime-package.js +34 -0
- package/dist/missing-runtime-package.js.map +1 -0
- package/dist/model-selection.d.ts +20 -0
- package/dist/model-selection.d.ts.map +1 -0
- package/dist/model-selection.js +27 -0
- package/dist/model-selection.js.map +1 -0
- package/dist/nodetool-models.d.ts +71 -0
- package/dist/nodetool-models.d.ts.map +1 -0
- package/dist/nodetool-models.js +138 -0
- package/dist/nodetool-models.js.map +1 -0
- package/dist/package-assets.d.ts +39 -0
- package/dist/package-assets.d.ts.map +1 -0
- package/dist/package-assets.js +63 -0
- package/dist/package-assets.js.map +1 -0
- package/dist/platform.d.ts +66 -0
- package/dist/platform.d.ts.map +1 -0
- package/dist/platform.js +68 -0
- package/dist/platform.js.map +1 -0
- package/dist/predicates.d.ts +43 -0
- package/dist/predicates.d.ts.map +1 -0
- package/dist/predicates.js +65 -0
- package/dist/predicates.js.map +1 -0
- package/dist/processing-messages.schema.json +2545 -0
- package/dist/production-authoring.d.ts +931 -0
- package/dist/production-authoring.d.ts.map +1 -0
- package/dist/production-authoring.js +931 -0
- package/dist/production-authoring.js.map +1 -0
- package/dist/python-packs.d.ts +25 -0
- package/dist/python-packs.d.ts.map +1 -0
- package/dist/python-packs.js +51 -0
- package/dist/python-packs.js.map +1 -0
- package/dist/render-record.d.ts +228 -0
- package/dist/render-record.d.ts.map +1 -0
- package/dist/render-record.js +212 -0
- package/dist/render-record.js.map +1 -0
- package/dist/resource-id.d.ts +22 -0
- package/dist/resource-id.d.ts.map +1 -0
- package/dist/resource-id.js +32 -0
- package/dist/resource-id.js.map +1 -0
- package/dist/resource-uri.d.ts +15 -0
- package/dist/resource-uri.d.ts.map +1 -0
- package/dist/resource-uri.js +91 -0
- package/dist/resource-uri.js.map +1 -0
- package/dist/run-readers.d.ts +760 -0
- package/dist/run-readers.d.ts.map +1 -0
- package/dist/run-readers.js +153 -0
- package/dist/run-readers.js.map +1 -0
- package/dist/run-trace.d.ts +206 -0
- package/dist/run-trace.d.ts.map +1 -0
- package/dist/run-trace.js +177 -0
- package/dist/run-trace.js.map +1 -0
- package/dist/sandbox-capability.d.ts +86 -0
- package/dist/sandbox-capability.d.ts.map +1 -0
- package/dist/sandbox-capability.js +106 -0
- package/dist/sandbox-capability.js.map +1 -0
- package/dist/sandbox-host.d.ts +98 -0
- package/dist/sandbox-host.d.ts.map +1 -0
- package/dist/sandbox-host.js +311 -0
- package/dist/sandbox-host.js.map +1 -0
- package/dist/sandbox-package.d.ts +674 -0
- package/dist/sandbox-package.d.ts.map +1 -0
- package/dist/sandbox-package.js +622 -0
- package/dist/sandbox-package.js.map +1 -0
- package/dist/sandbox-wasm.d.ts +84 -0
- package/dist/sandbox-wasm.d.ts.map +1 -0
- package/dist/sandbox-wasm.js +139 -0
- package/dist/sandbox-wasm.js.map +1 -0
- package/dist/screenplay-authoring.d.ts +69 -0
- package/dist/screenplay-authoring.d.ts.map +1 -0
- package/dist/screenplay-authoring.js +352 -0
- package/dist/screenplay-authoring.js.map +1 -0
- package/dist/script-authoring.d.ts +161 -0
- package/dist/script-authoring.d.ts.map +1 -0
- package/dist/script-authoring.js +503 -0
- package/dist/script-authoring.js.map +1 -0
- package/dist/script-fill.d.ts +39 -0
- package/dist/script-fill.d.ts.map +1 -0
- package/dist/script-fill.js +67 -0
- package/dist/script-fill.js.map +1 -0
- package/dist/script-link.d.ts +110 -0
- package/dist/script-link.d.ts.map +1 -0
- package/dist/script-link.js +252 -0
- package/dist/script-link.js.map +1 -0
- package/dist/script-pace.d.ts +4 -0
- package/dist/script-pace.d.ts.map +1 -0
- package/dist/script-pace.js +11 -0
- package/dist/script-pace.js.map +1 -0
- package/dist/sha256.d.ts +11 -0
- package/dist/sha256.d.ts.map +1 -0
- package/dist/sha256.js +110 -0
- package/dist/sha256.js.map +1 -0
- package/dist/shot-prompt.d.ts +78 -0
- package/dist/shot-prompt.d.ts.map +1 -0
- package/dist/shot-prompt.js +120 -0
- package/dist/shot-prompt.js.map +1 -0
- package/dist/skill-document.d.ts +36 -0
- package/dist/skill-document.d.ts.map +1 -0
- package/dist/skill-document.js +140 -0
- package/dist/skill-document.js.map +1 -0
- package/dist/storyboard-render-spec.d.ts +4 -0
- package/dist/storyboard-render-spec.d.ts.map +1 -0
- package/dist/storyboard-render-spec.js +4 -0
- package/dist/storyboard-render-spec.js.map +1 -0
- package/dist/style-presets.d.ts +73 -0
- package/dist/style-presets.d.ts.map +1 -0
- package/dist/style-presets.js +147 -0
- package/dist/style-presets.js.map +1 -0
- package/dist/supervisor.d.ts +227 -0
- package/dist/supervisor.d.ts.map +1 -0
- package/dist/supervisor.js +116 -0
- package/dist/supervisor.js.map +1 -0
- package/dist/token-providers.d.ts +31 -0
- package/dist/token-providers.d.ts.map +1 -0
- package/dist/token-providers.js +52 -0
- package/dist/token-providers.js.map +1 -0
- package/dist/toolSchemas.d.ts +18 -14
- package/dist/toolSchemas.d.ts.map +1 -1
- package/dist/toolSchemas.js +30 -31
- package/dist/toolSchemas.js.map +1 -1
- package/dist/triggers.d.ts +41 -0
- package/dist/triggers.d.ts.map +1 -0
- package/dist/triggers.js +50 -0
- package/dist/triggers.js.map +1 -0
- package/dist/trpc-policy.d.ts +3 -0
- package/dist/trpc-policy.d.ts.map +1 -0
- package/dist/trpc-policy.js +3 -0
- package/dist/trpc-policy.js.map +1 -0
- package/dist/type-metadata.d.ts +5 -0
- package/dist/type-metadata.d.ts.map +1 -1
- package/dist/type-metadata.js +17 -8
- package/dist/type-metadata.js.map +1 -1
- package/dist/typecheck.d.ts.map +1 -1
- package/dist/typecheck.js +5 -4
- package/dist/typecheck.js.map +1 -1
- package/dist/wasm-binary.d.ts +61 -0
- package/dist/wasm-binary.d.ts.map +1 -0
- package/dist/wasm-binary.js +215 -0
- package/dist/wasm-binary.js.map +1 -0
- package/dist/workflow-document-revision.d.ts +4 -0
- package/dist/workflow-document-revision.d.ts.map +1 -0
- package/dist/workflow-document-revision.js +111 -0
- package/dist/workflow-document-revision.js.map +1 -0
- package/dist/workflow-plan.d.ts +274 -0
- package/dist/workflow-plan.d.ts.map +1 -0
- package/dist/workflow-plan.js +667 -0
- package/dist/workflow-plan.js.map +1 -0
- package/dist/wrap-primitives.d.ts +0 -11
- package/dist/wrap-primitives.d.ts.map +1 -1
- package/dist/wrap-primitives.js +3 -9
- package/dist/wrap-primitives.js.map +1 -1
- package/dist/ws-commands.d.ts +770 -0
- package/dist/ws-commands.d.ts.map +1 -0
- package/dist/ws-commands.js +624 -0
- package/dist/ws-commands.js.map +1 -0
- package/dist/zod-schema.d.ts +20 -0
- package/dist/zod-schema.d.ts.map +1 -0
- package/dist/zod-schema.js +298 -0
- package/dist/zod-schema.js.map +1 -0
- package/package.json +96 -7
- package/schema/sdk-v1.asyncapi.implemented.json +65 -0
- package/schema/sdk-v1.asyncapi.json +65 -0
- package/schema/sdk-v1.discovery.schema.json +1218 -0
- package/schema/sdk-v1.execution.schema.json +2792 -0
- package/schema/sdk-v1.lifecycle.schema.json +1031 -0
- package/schema/sdk-v1.manifest.json +71 -0
- package/schema/sdk-v1.openapi.implemented.json +730 -0
- package/schema/sdk-v1.openapi.json +730 -0
- package/schema/sdk-v1.operations.json +732 -0
- package/dist/agent-protocol.d.ts +0 -217
- package/dist/agent-protocol.d.ts.map +0 -1
- package/dist/agent-protocol.js +0 -85
- package/dist/agent-protocol.js.map +0 -1
|
@@ -0,0 +1,667 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Workflow flow's planner contract and its plan→graph builder (PRD § 11).
|
|
3
|
+
*
|
|
4
|
+
* Three pure pieces, shared by the browser flow and the headless capabilities so
|
|
5
|
+
* a plan means the same thing on both:
|
|
6
|
+
*
|
|
7
|
+
* - the structured-output contract the planner asks a model for
|
|
8
|
+
* ({@link buildWorkflowPlanSchema}, {@link parseWorkflowPlan});
|
|
9
|
+
* - {@link resolveWorkflowPlan}, which turns a plan into the review step's
|
|
10
|
+
* markers — a step whose node type the registry does not know, a step whose
|
|
11
|
+
* model role has no configured provider (D23);
|
|
12
|
+
* - {@link planToPlacement}, which turns a resolved plan into the ordered node
|
|
13
|
+
* and edge list the build replays through `ui_add_node` / `ui_connect_nodes`
|
|
14
|
+
* / `ui_update_node_data`.
|
|
15
|
+
*
|
|
16
|
+
* Nothing here places a node, calls a provider or touches a store, which is
|
|
17
|
+
* what makes criterion 3 assertable: planning is text, and the build is a
|
|
18
|
+
* separate step the creator has to press (D4).
|
|
19
|
+
*
|
|
20
|
+
* R6 lives in the last piece. A plan whose steps name real node types can still
|
|
21
|
+
* build a graph that validates and produces nothing, so `planToPlacement`
|
|
22
|
+
* reports every step it could not wire in {@link WorkflowPlacement.issues}
|
|
23
|
+
* rather than emitting a plausible-looking island — and the harness grades the
|
|
24
|
+
* run's output, not the validation.
|
|
25
|
+
*/
|
|
26
|
+
import { isRecord, isString } from "./predicates.js";
|
|
27
|
+
import { workflowSetupPlan } from "./api-schemas/workflows.js";
|
|
28
|
+
// ── The planner's contract ──────────────────────────────────────────────────
|
|
29
|
+
export const WORKFLOW_PLAN_TOOL_NAME = "workflow_plan";
|
|
30
|
+
/** The node a plan step runs its own JavaScript on. */
|
|
31
|
+
export const PLAN_CODE_NODE_TYPE = "nodetool.code.Code";
|
|
32
|
+
/** The Code step's input and output handles, named in the planner prompt. */
|
|
33
|
+
export const PLAN_CODE_INPUT = "input";
|
|
34
|
+
export const PLAN_CODE_OUTPUT = "output";
|
|
35
|
+
export const WORKFLOW_PLAN_TOOL_DESCRIPTION = "The steps a NodeTool workflow needs to do the task, each mapped to a node type that exists in the registry.";
|
|
36
|
+
export const WORKFLOW_PLANNER_SYSTEM_PROMPT = [
|
|
37
|
+
"You plan NodeTool workflows. You do not build them.",
|
|
38
|
+
"",
|
|
39
|
+
"Return the inputs the workflow takes, the steps it runs in order, and the",
|
|
40
|
+
"outputs it produces. Every step names one node type from the candidate list",
|
|
41
|
+
"you are given, copied exactly. When no candidate fits a step, set its",
|
|
42
|
+
"node_type to null and say what the step needs in its summary — a named guess",
|
|
43
|
+
"that turns out to be the wrong node builds a graph that runs and produces",
|
|
44
|
+
"nothing, which is worse than an unnamed step.",
|
|
45
|
+
"",
|
|
46
|
+
"The steps form one chain. Each step receives exactly one value: the previous",
|
|
47
|
+
"step's output (the first step receives the first input). A step never reads",
|
|
48
|
+
"from two steps back, and there are no branches or joins, so do not plan Zip",
|
|
49
|
+
"or merge steps. Inputs and outputs are declared under inputs and outputs, never",
|
|
50
|
+
"as steps. Declare one output: it receives the last step's value. When a step",
|
|
51
|
+
"needs a second workflow input, make it a Code step: every input after the",
|
|
52
|
+
`first is connected to the first Code step as inputs.input_2, inputs.input_3, …`,
|
|
53
|
+
"",
|
|
54
|
+
"A data step no candidate does — parse a CSV, reshape JSON, filter or compute",
|
|
55
|
+
`values — is a Code step: set node_type to "${PLAN_CODE_NODE_TYPE}" and write`,
|
|
56
|
+
"its JavaScript body in code. Never invent a node type for it. The body reads",
|
|
57
|
+
`the previous step's value as inputs.${PLAN_CODE_INPUT}. To pass on one value,`,
|
|
58
|
+
`call await output("${PLAN_CODE_OUTPUT}", value) once. To pass on one value per`,
|
|
59
|
+
`item — one prompt per CSV row — call await emit("${PLAN_CODE_OUTPUT}", item) inside`,
|
|
60
|
+
"the loop: the next step then runs once per item. Never call output() in a loop.",
|
|
61
|
+
"Emit exactly the value the next step takes — a prompt string for an image or",
|
|
62
|
+
"text step, not an object around it. Build a prompt from fields in the Code",
|
|
63
|
+
"step that has the fields. A Code step never calls a model: put the model call",
|
|
64
|
+
"in its own step with model_role, never in fetch() with an API key. A Code step",
|
|
65
|
+
"reads its data from its inputs (media.text(inputs.input) for a document),",
|
|
66
|
+
"never from a file path, and awaits every host call (getSecret, fetch,",
|
|
67
|
+
"workspace, media).",
|
|
68
|
+
"To parse CSV, put",
|
|
69
|
+
'import { parse } from "@nodetool-ai/sandbox-csv" at the top of the body',
|
|
70
|
+
"and call await parse(text), which returns records keyed by the header row.",
|
|
71
|
+
"",
|
|
72
|
+
"Set model_role only on a step that calls a model: language, image, video or",
|
|
73
|
+
"audio. Keep the plan to the steps the task actually needs.",
|
|
74
|
+
"Give each text or number input a sample value the creator can run the",
|
|
75
|
+
"workflow with: the value itself — the CSV text, the notes — never a file name",
|
|
76
|
+
"or a path. Quote CSV fields that contain commas. Give a document, image, audio",
|
|
77
|
+
"or video input no sample: the creator uploads one."
|
|
78
|
+
].join("\n");
|
|
79
|
+
/** The structured-output schema the planner asks for. */
|
|
80
|
+
export function buildWorkflowPlanSchema() {
|
|
81
|
+
return {
|
|
82
|
+
type: "object",
|
|
83
|
+
additionalProperties: false,
|
|
84
|
+
required: ["inputs", "steps", "outputs"],
|
|
85
|
+
properties: {
|
|
86
|
+
inputs: {
|
|
87
|
+
type: "array",
|
|
88
|
+
items: {
|
|
89
|
+
type: "object",
|
|
90
|
+
additionalProperties: false,
|
|
91
|
+
required: ["name", "type"],
|
|
92
|
+
properties: {
|
|
93
|
+
name: { type: "string" },
|
|
94
|
+
type: {
|
|
95
|
+
type: "string",
|
|
96
|
+
enum: ["string", "image", "audio", "video", "document", "number"]
|
|
97
|
+
},
|
|
98
|
+
sample: { type: "string" }
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
steps: {
|
|
103
|
+
type: "array",
|
|
104
|
+
items: {
|
|
105
|
+
type: "object",
|
|
106
|
+
additionalProperties: false,
|
|
107
|
+
required: ["title", "summary", "node_type"],
|
|
108
|
+
properties: {
|
|
109
|
+
title: { type: "string" },
|
|
110
|
+
summary: { type: "string" },
|
|
111
|
+
node_type: { type: ["string", "null"] },
|
|
112
|
+
// Models write null for "no model" whatever the prompt says, and
|
|
113
|
+
// a schema that refuses it costs a validation round trip.
|
|
114
|
+
model_role: {
|
|
115
|
+
type: ["string", "null"],
|
|
116
|
+
enum: ["language", "image", "video", "audio", null]
|
|
117
|
+
},
|
|
118
|
+
code: { type: "string" }
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
outputs: {
|
|
123
|
+
type: "array",
|
|
124
|
+
items: {
|
|
125
|
+
type: "object",
|
|
126
|
+
additionalProperties: false,
|
|
127
|
+
required: ["name", "type"],
|
|
128
|
+
properties: {
|
|
129
|
+
name: { type: "string" },
|
|
130
|
+
type: { type: "string" }
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* Read a planner answer into a plan, filling in the step ids the model is not
|
|
139
|
+
* asked for. Returns null when the answer is not a plan shape at all, so the
|
|
140
|
+
* caller reports a refused run rather than opening an empty review.
|
|
141
|
+
*/
|
|
142
|
+
export function parseWorkflowPlan(data, options = {}) {
|
|
143
|
+
if (!isRecord(data)) {
|
|
144
|
+
return null;
|
|
145
|
+
}
|
|
146
|
+
const generateId = options.generateId ?? ((index) => `step-${index + 1}`);
|
|
147
|
+
const steps = Array.isArray(data["steps"]) ? data["steps"] : [];
|
|
148
|
+
const withIds = steps.map((step, index) => {
|
|
149
|
+
const raw = isRecord(step) ? step : {};
|
|
150
|
+
// A null optional field means "absent": drop it before the schema reads it.
|
|
151
|
+
const base = Object.fromEntries(Object.entries(raw).filter(([key, value]) => value !== null || key === "node_type"));
|
|
152
|
+
// A step that carries a body runs it, whatever type the planner named.
|
|
153
|
+
const hasCode = isString(base["code"]) && base["code"].trim().length > 0;
|
|
154
|
+
return {
|
|
155
|
+
...base,
|
|
156
|
+
id: isString(base["id"]) && base["id"].length > 0
|
|
157
|
+
? base["id"]
|
|
158
|
+
: generateId(index),
|
|
159
|
+
node_type: hasCode
|
|
160
|
+
? PLAN_CODE_NODE_TYPE
|
|
161
|
+
: isString(base["node_type"])
|
|
162
|
+
? base["node_type"]
|
|
163
|
+
: null
|
|
164
|
+
};
|
|
165
|
+
});
|
|
166
|
+
const parsed = workflowSetupPlan.safeParse({ ...data, steps: withIds });
|
|
167
|
+
return parsed.success ? parsed.data : null;
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* Grade every step of a plan against the live registry and the configured
|
|
171
|
+
* providers. One pass over the steps with a role cache, so a fifty-step plan
|
|
172
|
+
* costs one lookup per step and one per distinct role — never a scan per step.
|
|
173
|
+
*/
|
|
174
|
+
export function resolveWorkflowPlan(plan, options) {
|
|
175
|
+
const roleConfigured = new Map();
|
|
176
|
+
const roles = [];
|
|
177
|
+
const steps = plan.steps.map((step) => {
|
|
178
|
+
const unknownNodeType = step.node_type === null || !options.knownNodeType(step.node_type);
|
|
179
|
+
const role = step.model_role;
|
|
180
|
+
let missingProvider = null;
|
|
181
|
+
if (isString(role) && role.length > 0) {
|
|
182
|
+
let configured = roleConfigured.get(role);
|
|
183
|
+
if (configured === undefined) {
|
|
184
|
+
configured = options.providerConfigured(role);
|
|
185
|
+
roleConfigured.set(role, configured);
|
|
186
|
+
roles.push(role);
|
|
187
|
+
}
|
|
188
|
+
missingProvider = configured ? null : role;
|
|
189
|
+
}
|
|
190
|
+
const block = unknownNodeType
|
|
191
|
+
? "unknown-node-type"
|
|
192
|
+
: missingProvider !== null
|
|
193
|
+
? "missing-provider"
|
|
194
|
+
: null;
|
|
195
|
+
return { step, unknownNodeType, missingProvider, block };
|
|
196
|
+
});
|
|
197
|
+
const missingRoles = roles.filter((role) => roleConfigured.get(role) === false);
|
|
198
|
+
return {
|
|
199
|
+
steps,
|
|
200
|
+
roles,
|
|
201
|
+
missingRoles,
|
|
202
|
+
canContinue: steps.every((entry) => entry.block === null)
|
|
203
|
+
};
|
|
204
|
+
}
|
|
205
|
+
/** Plan input type → the input node that carries it. */
|
|
206
|
+
const INPUT_NODE_TYPES = {
|
|
207
|
+
string: "nodetool.input.StringInput",
|
|
208
|
+
number: "nodetool.input.FloatInput",
|
|
209
|
+
integer: "nodetool.input.IntegerInput",
|
|
210
|
+
boolean: "nodetool.input.BooleanInput",
|
|
211
|
+
image: "nodetool.input.ImageInput",
|
|
212
|
+
audio: "nodetool.input.AudioInput",
|
|
213
|
+
video: "nodetool.input.VideoInput",
|
|
214
|
+
document: "nodetool.input.DocumentInput"
|
|
215
|
+
};
|
|
216
|
+
export const PLAN_OUTPUT_NODE_TYPE = "nodetool.output.Output";
|
|
217
|
+
/** Handle types that take anything — a chain can always land on one. */
|
|
218
|
+
const WILDCARD_TYPES = new Set(["any", "union", "object"]);
|
|
219
|
+
/** Handle types a chain must never land on — a model is chosen, not wired. */
|
|
220
|
+
export const MODEL_HANDLE_TYPES = {
|
|
221
|
+
language: "language_model",
|
|
222
|
+
image: "image_model",
|
|
223
|
+
video: "video_model",
|
|
224
|
+
audio: "tts_model"
|
|
225
|
+
};
|
|
226
|
+
const MODEL_TYPES = new Set([
|
|
227
|
+
...Object.values(MODEL_HANDLE_TYPES),
|
|
228
|
+
"asr_model",
|
|
229
|
+
"embedding_model",
|
|
230
|
+
"rerank_model"
|
|
231
|
+
]);
|
|
232
|
+
const acceptsType = (target, source) => WILDCARD_TYPES.has(target) || WILDCARD_TYPES.has(source) || target === source;
|
|
233
|
+
/** The dynamic slot name the builder declares when a node has no free handle. */
|
|
234
|
+
const DYNAMIC_SLOT = "input";
|
|
235
|
+
/** Layout only: a readable left-to-right chain on the canvas. */
|
|
236
|
+
const COLUMN_WIDTH = 260;
|
|
237
|
+
const ROW_HEIGHT = 170;
|
|
238
|
+
const position = (column, row) => ({
|
|
239
|
+
x: 80 + column * COLUMN_WIDTH,
|
|
240
|
+
y: 80 + row * ROW_HEIGHT
|
|
241
|
+
});
|
|
242
|
+
export function planToPlacement(plan, lookup, options = {}) {
|
|
243
|
+
const nodes = [];
|
|
244
|
+
const edges = [];
|
|
245
|
+
const issues = [];
|
|
246
|
+
// 1. Inputs.
|
|
247
|
+
const inputs = [];
|
|
248
|
+
plan.inputs.forEach((input, index) => {
|
|
249
|
+
const nodeType = INPUT_NODE_TYPES[input.type] ?? INPUT_NODE_TYPES["string"];
|
|
250
|
+
const id = `input_${index + 1}`;
|
|
251
|
+
const properties = { name: input.name };
|
|
252
|
+
if (input.sample !== undefined) {
|
|
253
|
+
properties["value"] = input.sample;
|
|
254
|
+
}
|
|
255
|
+
nodes.push({ id, type: nodeType, position: position(0, index), properties });
|
|
256
|
+
const shape = lookup(nodeType);
|
|
257
|
+
const handle = shape?.outputs[0]?.name ?? "output";
|
|
258
|
+
inputs.push({ nodeId: id, handle, type: shape?.outputs[0]?.type ?? "any" });
|
|
259
|
+
});
|
|
260
|
+
// 2. Steps, chained.
|
|
261
|
+
let upstream = inputs[0] ?? null;
|
|
262
|
+
// Inputs the chain has not consumed yet, oldest first.
|
|
263
|
+
let spareInput = 1;
|
|
264
|
+
let lastStep = null;
|
|
265
|
+
plan.steps.forEach((step, index) => {
|
|
266
|
+
const label = `step ${index + 1} ("${step.title}")`;
|
|
267
|
+
if (step.node_type === null) {
|
|
268
|
+
issues.push(`${label} names no node type, so nothing was placed for it.`);
|
|
269
|
+
return;
|
|
270
|
+
}
|
|
271
|
+
const shape = lookup(step.node_type);
|
|
272
|
+
if (!shape) {
|
|
273
|
+
issues.push(`${label} names "${step.node_type}", which the registry does not have.`);
|
|
274
|
+
return;
|
|
275
|
+
}
|
|
276
|
+
const id = `step_${index + 1}`;
|
|
277
|
+
const node = {
|
|
278
|
+
id,
|
|
279
|
+
type: step.node_type,
|
|
280
|
+
position: position(index + 1, 0),
|
|
281
|
+
properties: {},
|
|
282
|
+
setupStepId: step.id
|
|
283
|
+
};
|
|
284
|
+
// A Code step's handles are the names its body uses — the planner's
|
|
285
|
+
// `input` and `output`, or the ones a snippet step lists — so the build
|
|
286
|
+
// declares exactly those rather than the generic `input_N` slots.
|
|
287
|
+
const isCodeStep = step.node_type === PLAN_CODE_NODE_TYPE;
|
|
288
|
+
const codeInputs = step.code_inputs ?? [PLAN_CODE_INPUT];
|
|
289
|
+
const codeOutputs = step.code_outputs ?? [PLAN_CODE_OUTPUT];
|
|
290
|
+
if (isCodeStep) {
|
|
291
|
+
if (isString(step.code) && step.code.trim().length > 0) {
|
|
292
|
+
node.properties["code"] = step.code;
|
|
293
|
+
}
|
|
294
|
+
else {
|
|
295
|
+
issues.push(`${label} is a Code step with no code, so it outputs nothing.`);
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
// The model a step calls is assigned, never wired: a chain that landed on
|
|
299
|
+
// a model property would build a graph that validates and never runs.
|
|
300
|
+
const role = step.model_role;
|
|
301
|
+
if (isString(role) && role.length > 0) {
|
|
302
|
+
const wanted = MODEL_HANDLE_TYPES[role];
|
|
303
|
+
const slot = shape.inputs.find((handle) => handle.type === wanted);
|
|
304
|
+
const chosen = options.models?.[role];
|
|
305
|
+
if (slot && chosen !== undefined) {
|
|
306
|
+
node.properties[slot.name] = chosen;
|
|
307
|
+
}
|
|
308
|
+
else if (slot) {
|
|
309
|
+
issues.push(`${label} needs a ${role} model and none was chosen, so its "${slot.name}" is unset.`);
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
// Free handles of this node, consumed left to right. A Code step's own
|
|
313
|
+
// properties are its body and settings, never a place for the chain.
|
|
314
|
+
const free = isCodeStep
|
|
315
|
+
? []
|
|
316
|
+
: shape.inputs.filter((handle) => !MODEL_TYPES.has(handle.type));
|
|
317
|
+
let cursor = 0;
|
|
318
|
+
const takeHandle = (sourceType) => {
|
|
319
|
+
while (cursor < free.length) {
|
|
320
|
+
const candidate = free[cursor];
|
|
321
|
+
cursor += 1;
|
|
322
|
+
if (acceptsType(candidate.type, sourceType)) {
|
|
323
|
+
return candidate.name;
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
if (shape.supportsDynamicInputs === true) {
|
|
327
|
+
// A dynamic node has no declared handle to land on; the slot has to be
|
|
328
|
+
// declared before the edge, which is what the build's
|
|
329
|
+
// `ui_update_node_data` call in plan order is for.
|
|
330
|
+
const count = Object.keys(node.dynamicProperties ?? {}).length;
|
|
331
|
+
const slot = isCodeStep && count < codeInputs.length
|
|
332
|
+
? codeInputs[count]
|
|
333
|
+
: `${DYNAMIC_SLOT}_${count + 1}`;
|
|
334
|
+
node.dynamicProperties = { ...(node.dynamicProperties ?? {}), [slot]: "" };
|
|
335
|
+
return slot;
|
|
336
|
+
}
|
|
337
|
+
return null;
|
|
338
|
+
};
|
|
339
|
+
if (upstream === null) {
|
|
340
|
+
issues.push(`${label} has no input: the plan declares none.`);
|
|
341
|
+
}
|
|
342
|
+
else {
|
|
343
|
+
const handle = takeHandle(upstream.type);
|
|
344
|
+
if (handle === null) {
|
|
345
|
+
issues.push(`${label} maps to "${step.node_type}", which has no input that takes ${upstream.type}.`);
|
|
346
|
+
}
|
|
347
|
+
else {
|
|
348
|
+
edges.push({
|
|
349
|
+
source: upstream.nodeId,
|
|
350
|
+
sourceHandle: upstream.handle,
|
|
351
|
+
target: id,
|
|
352
|
+
targetHandle: handle
|
|
353
|
+
});
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
// Extra plan inputs feed the first step that has room for them.
|
|
357
|
+
while (spareInput < inputs.length) {
|
|
358
|
+
const extra = inputs[spareInput];
|
|
359
|
+
const handle = takeHandle(extra.type);
|
|
360
|
+
if (handle === null) {
|
|
361
|
+
break;
|
|
362
|
+
}
|
|
363
|
+
edges.push({
|
|
364
|
+
source: extra.nodeId,
|
|
365
|
+
sourceHandle: extra.handle,
|
|
366
|
+
target: id,
|
|
367
|
+
targetHandle: handle
|
|
368
|
+
});
|
|
369
|
+
spareInput += 1;
|
|
370
|
+
}
|
|
371
|
+
nodes.push(node);
|
|
372
|
+
let out = shape.outputs[0];
|
|
373
|
+
if (!out &&
|
|
374
|
+
isCodeStep &&
|
|
375
|
+
shape.supportsDynamicOutputs === true &&
|
|
376
|
+
codeOutputs.length > 0) {
|
|
377
|
+
node.dynamicOutputs = Object.fromEntries(codeOutputs.map((name) => [
|
|
378
|
+
name,
|
|
379
|
+
{ type: "any", type_args: [], optional: false }
|
|
380
|
+
]));
|
|
381
|
+
out = { name: codeOutputs[0], type: "any" };
|
|
382
|
+
}
|
|
383
|
+
if (!out) {
|
|
384
|
+
issues.push(`${label} maps to "${step.node_type}", which produces no output.`);
|
|
385
|
+
upstream = null;
|
|
386
|
+
}
|
|
387
|
+
else {
|
|
388
|
+
upstream = { nodeId: id, handle: out.name, type: out.type };
|
|
389
|
+
lastStep = upstream;
|
|
390
|
+
}
|
|
391
|
+
});
|
|
392
|
+
if (spareInput < inputs.length) {
|
|
393
|
+
issues.push(`${inputs.length - spareInput} plan input(s) reached no step and were left unconnected.`);
|
|
394
|
+
}
|
|
395
|
+
// 3. Outputs.
|
|
396
|
+
plan.outputs.forEach((output, index) => {
|
|
397
|
+
const id = `output_${index + 1}`;
|
|
398
|
+
nodes.push({
|
|
399
|
+
id,
|
|
400
|
+
type: PLAN_OUTPUT_NODE_TYPE,
|
|
401
|
+
position: position(plan.steps.length + 1, index),
|
|
402
|
+
properties: { name: output.name }
|
|
403
|
+
});
|
|
404
|
+
const source = lastStep;
|
|
405
|
+
if (source === null) {
|
|
406
|
+
issues.push(`output "${output.name}" has no step upstream, so the workflow produces nothing.`);
|
|
407
|
+
return;
|
|
408
|
+
}
|
|
409
|
+
edges.push({
|
|
410
|
+
source: source.nodeId,
|
|
411
|
+
sourceHandle: source.handle,
|
|
412
|
+
target: id,
|
|
413
|
+
targetHandle: "value"
|
|
414
|
+
});
|
|
415
|
+
});
|
|
416
|
+
if (plan.outputs.length === 0) {
|
|
417
|
+
issues.push("the plan declares no output, so a run produces nothing.");
|
|
418
|
+
}
|
|
419
|
+
return { nodes, edges, issues };
|
|
420
|
+
}
|
|
421
|
+
/** Read one node's metadata into the shape {@link planToPlacement} wires from. */
|
|
422
|
+
export function planNodeShape(meta) {
|
|
423
|
+
// The node author's own statement of what each property is for: the content
|
|
424
|
+
// field first, then the declared input handles, then whatever is left in
|
|
425
|
+
// declaration order. Without it a chain lands on a Summarizer's
|
|
426
|
+
// `system_prompt` — wired, validating, and summarizing nothing.
|
|
427
|
+
const ranked = [...(meta.inline_fields ?? []), ...(meta.input_fields ?? [])];
|
|
428
|
+
const rank = new Map(ranked.map((name, index) => [name, index]));
|
|
429
|
+
const properties = [...(meta.properties ?? [])].sort((a, b) => (rank.get(a.name) ?? Number.MAX_SAFE_INTEGER) -
|
|
430
|
+
(rank.get(b.name) ?? Number.MAX_SAFE_INTEGER));
|
|
431
|
+
return {
|
|
432
|
+
inputs: properties.map((property) => ({
|
|
433
|
+
name: property.name,
|
|
434
|
+
type: property.type?.type ?? "any",
|
|
435
|
+
required: property.required === true
|
|
436
|
+
})),
|
|
437
|
+
outputs: (meta.outputs ?? []).map((output) => ({
|
|
438
|
+
name: output.name,
|
|
439
|
+
type: output.type?.type ?? "any"
|
|
440
|
+
})),
|
|
441
|
+
supportsDynamicInputs: meta.supports_dynamic_inputs === true,
|
|
442
|
+
supportsDynamicOutputs: meta.supports_dynamic_outputs === true
|
|
443
|
+
};
|
|
444
|
+
}
|
|
445
|
+
// ── Plan check and repair loop ──────────────────────────────────────────────
|
|
446
|
+
/**
|
|
447
|
+
* The general-purpose nodes every planner prompt offers, whatever the brief
|
|
448
|
+
* ranks: a brief's words rank provider-specific nodes first ("product shots"
|
|
449
|
+
* finds a Reve remix node before Text To Image), and the planner can only name
|
|
450
|
+
* what it is shown.
|
|
451
|
+
*/
|
|
452
|
+
export const PLAN_CORE_NODE_TYPES = [
|
|
453
|
+
"nodetool.agents.Agent",
|
|
454
|
+
"nodetool.agents.Summarizer",
|
|
455
|
+
"nodetool.agents.Extractor",
|
|
456
|
+
"nodetool.image.TextToImage",
|
|
457
|
+
"nodetool.video.TextToVideo",
|
|
458
|
+
"nodetool.audio.TextToSpeech",
|
|
459
|
+
"nodetool.control.Collect",
|
|
460
|
+
PLAN_CODE_NODE_TYPE
|
|
461
|
+
];
|
|
462
|
+
/** Node types that are a workflow's own inputs and outputs, never a step. */
|
|
463
|
+
const isIoNodeType = (nodeType) => nodeType.startsWith("nodetool.input.") ||
|
|
464
|
+
nodeType.startsWith("nodetool.output.");
|
|
465
|
+
/** Stands in for every role's model, so a check does not report models unset. */
|
|
466
|
+
const ANY_MODEL = Object.fromEntries(Object.keys(MODEL_HANDLE_TYPES).map((role) => [role, {}]));
|
|
467
|
+
/**
|
|
468
|
+
* Everything that would make a plan build a graph that fails or produces
|
|
469
|
+
* nothing, found before a node is placed or a model is called: unknown node
|
|
470
|
+
* types, wiring the builder cannot do, and Code bodies that break the Code
|
|
471
|
+
* node's contract. Models are not checked here — the creator picks them on the
|
|
472
|
+
* setup step, after the plan.
|
|
473
|
+
*/
|
|
474
|
+
export function checkWorkflowPlan(plan, options) {
|
|
475
|
+
const placement = planToPlacement(plan, options.lookup, {
|
|
476
|
+
models: ANY_MODEL
|
|
477
|
+
});
|
|
478
|
+
const problems = [...placement.issues];
|
|
479
|
+
const nodeTypeOf = new Map(placement.nodes.map((node) => [node.id, node.type]));
|
|
480
|
+
const nodeOfStep = new Map(placement.nodes
|
|
481
|
+
.filter((node) => node.setupStepId !== undefined)
|
|
482
|
+
.map((node) => [node.setupStepId, node.id]));
|
|
483
|
+
const wiredInto = (nodeId) => placement.edges
|
|
484
|
+
.filter((edge) => edge.target === nodeId)
|
|
485
|
+
.map((edge) => edge.targetHandle);
|
|
486
|
+
plan.steps.forEach((step, index) => {
|
|
487
|
+
const label = `step ${index + 1} ("${step.title}")`;
|
|
488
|
+
if (step.node_type !== null && isIoNodeType(step.node_type)) {
|
|
489
|
+
problems.push(`${label} is the workflow input/output node "${step.node_type}"; declare it under inputs or outputs, not as a step.`);
|
|
490
|
+
}
|
|
491
|
+
});
|
|
492
|
+
// The chain gives every step one value. A second workflow input can only
|
|
493
|
+
// be read by a Code step that names it; anywhere else it lands on whatever
|
|
494
|
+
// property is free — a document input's `name`, a prompt's system text.
|
|
495
|
+
for (const edge of placement.edges) {
|
|
496
|
+
if (!edge.source.startsWith("input_") || edge.source === "input_1") {
|
|
497
|
+
continue;
|
|
498
|
+
}
|
|
499
|
+
const targetType = nodeTypeOf.get(edge.target);
|
|
500
|
+
if (targetType === PLAN_CODE_NODE_TYPE || targetType === undefined) {
|
|
501
|
+
continue;
|
|
502
|
+
}
|
|
503
|
+
const inputIndex = Number(edge.source.slice("input_".length)) - 1;
|
|
504
|
+
const input = plan.inputs[inputIndex];
|
|
505
|
+
problems.push(`input "${input?.name ?? edge.source}" lands on "${edge.targetHandle}" of ${targetType}: only a Code step can take a second input, as inputs.${edge.targetHandle}.`);
|
|
506
|
+
}
|
|
507
|
+
if (plan.outputs.length > 1) {
|
|
508
|
+
problems.push(`the plan declares ${plan.outputs.length} outputs, but every output receives the last step's one value; declare one output.`);
|
|
509
|
+
}
|
|
510
|
+
const checkCode = options.checkCode;
|
|
511
|
+
if (checkCode) {
|
|
512
|
+
plan.steps.forEach((step, index) => {
|
|
513
|
+
if (step.node_type !== PLAN_CODE_NODE_TYPE ||
|
|
514
|
+
!isString(step.code) ||
|
|
515
|
+
step.code.trim().length === 0) {
|
|
516
|
+
return;
|
|
517
|
+
}
|
|
518
|
+
const nodeId = nodeOfStep.get(step.id);
|
|
519
|
+
const handles = {
|
|
520
|
+
inputs: nodeId === undefined
|
|
521
|
+
? (step.code_inputs ?? [PLAN_CODE_INPUT])
|
|
522
|
+
: wiredInto(nodeId),
|
|
523
|
+
output: step.code_outputs?.[0] ?? PLAN_CODE_OUTPUT
|
|
524
|
+
};
|
|
525
|
+
for (const problem of checkCode(step.code, handles)) {
|
|
526
|
+
problems.push(`step ${index + 1} ("${step.title}") ${problem}.`);
|
|
527
|
+
}
|
|
528
|
+
});
|
|
529
|
+
}
|
|
530
|
+
return problems;
|
|
531
|
+
}
|
|
532
|
+
export const WORKFLOW_PLAN_MAX_ROUNDS = 3;
|
|
533
|
+
/** The plan as the model wrote it: the ids are the parser's, not the model's. */
|
|
534
|
+
const planAsAnswer = (plan) => JSON.stringify({
|
|
535
|
+
...plan,
|
|
536
|
+
steps: plan.steps.map(({ id: _id, ...step }) => step)
|
|
537
|
+
});
|
|
538
|
+
/**
|
|
539
|
+
* Plan, check, and send the problems back until the plan passes.
|
|
540
|
+
*
|
|
541
|
+
* A creator should review a plan that builds, not repair one after a run
|
|
542
|
+
* failed. Each round hands the model its own previous answer and the checker's
|
|
543
|
+
* findings, and asks for the whole plan again. The loop stops on the first
|
|
544
|
+
* plan with no problems, or after `maxRounds` calls with the best plan seen.
|
|
545
|
+
*/
|
|
546
|
+
export async function refineWorkflowPlan(options) {
|
|
547
|
+
const maxRounds = Math.max(1, options.maxRounds ?? WORKFLOW_PLAN_MAX_ROUNDS);
|
|
548
|
+
const messages = [...options.messages];
|
|
549
|
+
let best = { plan: null, problems: [], rounds: 0 };
|
|
550
|
+
for (let round = 1; round <= maxRounds; round += 1) {
|
|
551
|
+
const raw = await options.generate(messages);
|
|
552
|
+
const parsed = parseWorkflowPlan(raw);
|
|
553
|
+
const plan = parsed && options.normalize ? options.normalize(parsed) : parsed;
|
|
554
|
+
const problems = plan
|
|
555
|
+
? options.check(plan)
|
|
556
|
+
: ["The answer was not a plan of {inputs, steps, outputs}."];
|
|
557
|
+
if (plan &&
|
|
558
|
+
(best.plan === null || problems.length < best.problems.length)) {
|
|
559
|
+
best = { plan, problems, rounds: round };
|
|
560
|
+
}
|
|
561
|
+
best.rounds = round;
|
|
562
|
+
if (plan && problems.length === 0) {
|
|
563
|
+
return best;
|
|
564
|
+
}
|
|
565
|
+
messages.push({
|
|
566
|
+
role: "assistant",
|
|
567
|
+
content: plan ? planAsAnswer(plan) : JSON.stringify(raw ?? null)
|
|
568
|
+
}, {
|
|
569
|
+
role: "user",
|
|
570
|
+
content: [
|
|
571
|
+
"This plan would build a workflow that fails:",
|
|
572
|
+
...problems.map((problem) => `- ${problem}`),
|
|
573
|
+
"",
|
|
574
|
+
"Return the whole corrected plan. Copy node types exactly from the",
|
|
575
|
+
`candidate list, or use a Code step ("${PLAN_CODE_NODE_TYPE}") with its body in code.`
|
|
576
|
+
].join("\n")
|
|
577
|
+
});
|
|
578
|
+
}
|
|
579
|
+
return best;
|
|
580
|
+
}
|
|
581
|
+
export const WORKFLOW_INSPIRATION_CHIPS = [
|
|
582
|
+
{
|
|
583
|
+
id: "summarize-pdf",
|
|
584
|
+
brief: "Summarize a PDF and email it",
|
|
585
|
+
plan: {
|
|
586
|
+
inputs: [{ name: "document", type: "document" }],
|
|
587
|
+
steps: [
|
|
588
|
+
{
|
|
589
|
+
id: "extract",
|
|
590
|
+
title: "Read the PDF",
|
|
591
|
+
summary: "Pull the text out of the uploaded document.",
|
|
592
|
+
node_type: "lib.pdf.ExtractText"
|
|
593
|
+
},
|
|
594
|
+
{
|
|
595
|
+
id: "summarize",
|
|
596
|
+
title: "Summarize it",
|
|
597
|
+
summary: "Write a short summary of the extracted text.",
|
|
598
|
+
node_type: "nodetool.agents.Summarizer",
|
|
599
|
+
model_role: "language"
|
|
600
|
+
}
|
|
601
|
+
],
|
|
602
|
+
outputs: [{ name: "summary", type: "string" }]
|
|
603
|
+
}
|
|
604
|
+
},
|
|
605
|
+
{
|
|
606
|
+
id: "product-shots",
|
|
607
|
+
brief: "Batch-generate product shots from a CSV",
|
|
608
|
+
plan: {
|
|
609
|
+
inputs: [
|
|
610
|
+
{
|
|
611
|
+
name: "rows",
|
|
612
|
+
type: "string",
|
|
613
|
+
sample: "product,setting\nceramic mug,a sunlit kitchen counter\nleather wallet,a dark walnut desk"
|
|
614
|
+
}
|
|
615
|
+
],
|
|
616
|
+
steps: [
|
|
617
|
+
{
|
|
618
|
+
id: "prompt",
|
|
619
|
+
title: "Compose the shot prompts",
|
|
620
|
+
summary: "Parse the CSV and emit one shot prompt per row.",
|
|
621
|
+
node_type: PLAN_CODE_NODE_TYPE,
|
|
622
|
+
code: [
|
|
623
|
+
'import { parse } from "@nodetool-ai/sandbox-csv";',
|
|
624
|
+
"",
|
|
625
|
+
"for (const row of await parse(inputs.input)) {",
|
|
626
|
+
" const subject = Object.values(row).filter(Boolean).join(\", \");",
|
|
627
|
+
' await emit("output", `Studio product photo: ${subject}`);',
|
|
628
|
+
"}"
|
|
629
|
+
].join("\n")
|
|
630
|
+
},
|
|
631
|
+
{
|
|
632
|
+
id: "render",
|
|
633
|
+
title: "Render the shot",
|
|
634
|
+
summary: "Generate the product image for the row.",
|
|
635
|
+
node_type: "nodetool.image.TextToImage",
|
|
636
|
+
model_role: "image"
|
|
637
|
+
}
|
|
638
|
+
],
|
|
639
|
+
outputs: [{ name: "shot", type: "image" }]
|
|
640
|
+
}
|
|
641
|
+
},
|
|
642
|
+
{
|
|
643
|
+
id: "notes-to-post",
|
|
644
|
+
brief: "Turn rough notes into a blog post",
|
|
645
|
+
plan: {
|
|
646
|
+
inputs: [{ name: "notes", type: "string" }],
|
|
647
|
+
steps: [
|
|
648
|
+
{
|
|
649
|
+
id: "points",
|
|
650
|
+
title: "Pull out the key points",
|
|
651
|
+
summary: "Reduce the notes to the points the post should make.",
|
|
652
|
+
node_type: "nodetool.agents.Summarizer",
|
|
653
|
+
model_role: "language"
|
|
654
|
+
},
|
|
655
|
+
{
|
|
656
|
+
id: "write",
|
|
657
|
+
title: "Write the post",
|
|
658
|
+
summary: "Draft a blog post from the key points.",
|
|
659
|
+
node_type: "nodetool.agents.Agent",
|
|
660
|
+
model_role: "language"
|
|
661
|
+
}
|
|
662
|
+
],
|
|
663
|
+
outputs: [{ name: "post", type: "string" }]
|
|
664
|
+
}
|
|
665
|
+
}
|
|
666
|
+
];
|
|
667
|
+
//# sourceMappingURL=workflow-plan.js.map
|