@n8n/instance-ai 1.1.0 → 1.2.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/dist/agent/instance-agent.js +17 -45
- package/dist/agent/instance-agent.js.map +1 -1
- package/dist/agent/register-with-mastra.d.ts +1 -1
- package/dist/agent/register-with-mastra.js +5 -9
- package/dist/agent/register-with-mastra.js.map +1 -1
- package/dist/agent/sub-agent-briefing.d.ts +20 -0
- package/dist/agent/sub-agent-briefing.js +39 -0
- package/dist/agent/sub-agent-briefing.js.map +1 -0
- package/dist/agent/sub-agent-debriefing.d.ts +71 -0
- package/dist/agent/sub-agent-debriefing.js +39 -0
- package/dist/agent/sub-agent-debriefing.js.map +1 -0
- package/dist/agent/sub-agent-factory.d.ts +1 -1
- package/dist/agent/sub-agent-factory.js +15 -3
- package/dist/agent/sub-agent-factory.js.map +1 -1
- package/dist/agent/system-prompt.d.ts +1 -0
- package/dist/agent/system-prompt.js +67 -43
- package/dist/agent/system-prompt.js.map +1 -1
- package/dist/agent/tool-access.d.ts +2 -0
- package/dist/agent/tool-access.js +28 -0
- package/dist/agent/tool-access.js.map +1 -0
- package/dist/build.tsbuildinfo +1 -1
- package/dist/domain-access/domain-gating.d.ts +1 -0
- package/dist/domain-access/domain-gating.js +3 -0
- package/dist/domain-access/domain-gating.js.map +1 -1
- package/dist/index.d.ts +5 -3
- package/dist/index.js +13 -4
- package/dist/index.js.map +1 -1
- package/dist/memory/memory-config.js +1 -3
- package/dist/memory/memory-config.js.map +1 -1
- package/dist/parsers/structured-file-parser.d.ts +56 -0
- package/dist/parsers/structured-file-parser.js +354 -0
- package/dist/parsers/structured-file-parser.js.map +1 -0
- package/dist/planned-tasks/planned-task-service.js +6 -0
- package/dist/planned-tasks/planned-task-service.js.map +1 -1
- package/dist/runtime/background-task-manager.d.ts +2 -1
- package/dist/runtime/background-task-manager.js +13 -1
- package/dist/runtime/background-task-manager.js.map +1 -1
- package/dist/runtime/resumable-stream-executor.d.ts +6 -3
- package/dist/runtime/resumable-stream-executor.js +66 -119
- package/dist/runtime/resumable-stream-executor.js.map +1 -1
- package/dist/runtime/stream-runner.d.ts +2 -2
- package/dist/runtime/stream-runner.js +4 -25
- package/dist/runtime/stream-runner.js.map +1 -1
- package/dist/stream/consume-with-hitl.d.ts +4 -1
- package/dist/stream/consume-with-hitl.js +11 -2
- package/dist/stream/consume-with-hitl.js.map +1 -1
- package/dist/stream/map-chunk.d.ts +1 -1
- package/dist/stream/map-chunk.js +20 -15
- package/dist/stream/map-chunk.js.map +1 -1
- package/dist/stream/work-summary-accumulator.d.ts +63 -0
- package/dist/stream/work-summary-accumulator.js +66 -0
- package/dist/stream/work-summary-accumulator.js.map +1 -0
- package/dist/tools/attachments/parse-file.tool.d.ts +90 -0
- package/dist/tools/attachments/parse-file.tool.js +135 -0
- package/dist/tools/attachments/parse-file.tool.js.map +1 -0
- package/dist/tools/best-practices/get-best-practices.tool.d.ts +6 -9
- package/dist/tools/best-practices/get-best-practices.tool.js +7 -5
- package/dist/tools/best-practices/get-best-practices.tool.js.map +1 -1
- package/dist/tools/best-practices/index.js +5 -29
- package/dist/tools/best-practices/index.js.map +1 -1
- package/dist/tools/best-practices/techniques.d.ts +1 -20
- package/dist/tools/best-practices/techniques.js +3 -36
- package/dist/tools/best-practices/techniques.js.map +1 -1
- package/dist/tools/credentials/delete-credential.tool.d.ts +13 -14
- package/dist/tools/credentials/delete-credential.tool.js +18 -11
- package/dist/tools/credentials/delete-credential.tool.js.map +1 -1
- package/dist/tools/credentials/get-credential.tool.d.ts +8 -2
- package/dist/tools/credentials/get-credential.tool.js +13 -7
- package/dist/tools/credentials/get-credential.tool.js.map +1 -1
- package/dist/tools/credentials/list-credentials.tool.d.ts +13 -3
- package/dist/tools/credentials/list-credentials.tool.js +50 -8
- package/dist/tools/credentials/list-credentials.tool.js.map +1 -1
- package/dist/tools/credentials/search-credential-types.tool.d.ts +7 -3
- package/dist/tools/credentials/search-credential-types.tool.js +7 -5
- package/dist/tools/credentials/search-credential-types.tool.js.map +1 -1
- package/dist/tools/credentials/setup-credentials.tool.d.ts +40 -44
- package/dist/tools/credentials/setup-credentials.tool.js +37 -31
- package/dist/tools/credentials/setup-credentials.tool.js.map +1 -1
- package/dist/tools/credentials/test-credential.tool.d.ts +7 -4
- package/dist/tools/credentials/test-credential.tool.js +5 -3
- package/dist/tools/credentials/test-credential.tool.js.map +1 -1
- package/dist/tools/data-tables/add-data-table-column.tool.d.ts +15 -19
- package/dist/tools/data-tables/add-data-table-column.tool.js +16 -9
- package/dist/tools/data-tables/add-data-table-column.tool.js.map +1 -1
- package/dist/tools/data-tables/create-data-table.tool.d.ts +26 -24
- package/dist/tools/data-tables/create-data-table.tool.js +49 -22
- package/dist/tools/data-tables/create-data-table.tool.js.map +1 -1
- package/dist/tools/data-tables/delete-data-table-column.tool.d.ts +13 -14
- package/dist/tools/data-tables/delete-data-table-column.tool.js +15 -8
- package/dist/tools/data-tables/delete-data-table-column.tool.js.map +1 -1
- package/dist/tools/data-tables/delete-data-table-rows.tool.d.ts +49 -15
- package/dist/tools/data-tables/delete-data-table-rows.tool.js +25 -9
- package/dist/tools/data-tables/delete-data-table-rows.tool.js.map +1 -1
- package/dist/tools/data-tables/delete-data-table.tool.d.ts +11 -14
- package/dist/tools/data-tables/delete-data-table.tool.js +17 -9
- package/dist/tools/data-tables/delete-data-table.tool.js.map +1 -1
- package/dist/tools/data-tables/get-data-table-schema.tool.d.ts +7 -8
- package/dist/tools/data-tables/get-data-table-schema.tool.js +5 -3
- package/dist/tools/data-tables/get-data-table-schema.tool.js.map +1 -1
- package/dist/tools/data-tables/insert-data-table-rows.tool.d.ts +14 -15
- package/dist/tools/data-tables/insert-data-table-rows.tool.js +22 -12
- package/dist/tools/data-tables/insert-data-table-rows.tool.js.map +1 -1
- package/dist/tools/data-tables/list-data-tables.tool.d.ts +7 -3
- package/dist/tools/data-tables/list-data-tables.tool.js +8 -6
- package/dist/tools/data-tables/list-data-tables.tool.js.map +1 -1
- package/dist/tools/data-tables/query-data-table-rows.tool.d.ts +49 -8
- package/dist/tools/data-tables/query-data-table-rows.tool.js +14 -12
- package/dist/tools/data-tables/query-data-table-rows.tool.js.map +1 -1
- package/dist/tools/data-tables/rename-data-table-column.tool.d.ts +15 -14
- package/dist/tools/data-tables/rename-data-table-column.tool.js +16 -9
- package/dist/tools/data-tables/rename-data-table-column.tool.js.map +1 -1
- package/dist/tools/data-tables/update-data-table-rows.tool.d.ts +51 -14
- package/dist/tools/data-tables/update-data-table-rows.tool.js +19 -9
- package/dist/tools/data-tables/update-data-table-rows.tool.js.map +1 -1
- package/dist/tools/executions/debug-execution.tool.d.ts +8 -2
- package/dist/tools/executions/debug-execution.tool.js +5 -3
- package/dist/tools/executions/debug-execution.tool.js.map +1 -1
- package/dist/tools/executions/get-execution.tool.d.ts +8 -2
- package/dist/tools/executions/get-execution.tool.js +5 -3
- package/dist/tools/executions/get-execution.tool.js.map +1 -1
- package/dist/tools/executions/get-node-output.tool.d.ts +14 -2
- package/dist/tools/executions/get-node-output.tool.js +14 -17
- package/dist/tools/executions/get-node-output.tool.js.map +1 -1
- package/dist/tools/executions/list-executions.tool.d.ts +11 -3
- package/dist/tools/executions/list-executions.tool.js +16 -14
- package/dist/tools/executions/list-executions.tool.js.map +1 -1
- package/dist/tools/executions/run-workflow.tool.d.ts +17 -15
- package/dist/tools/executions/run-workflow.tool.js +35 -25
- package/dist/tools/executions/run-workflow.tool.js.map +1 -1
- package/dist/tools/executions/stop-execution.tool.d.ts +7 -4
- package/dist/tools/executions/stop-execution.tool.js +8 -3
- package/dist/tools/executions/stop-execution.tool.js.map +1 -1
- package/dist/tools/filesystem/create-tools-from-mcp-server.js +2 -1
- package/dist/tools/filesystem/create-tools-from-mcp-server.js.map +1 -1
- package/dist/tools/index.d.ts +67 -2380
- package/dist/tools/index.js +9 -15
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/nodes/explore-node-resources.tool.d.ts +23 -10
- package/dist/tools/nodes/explore-node-resources.tool.js +27 -25
- package/dist/tools/nodes/explore-node-resources.tool.js.map +1 -1
- package/dist/tools/nodes/get-node-description.tool.d.ts +7 -20
- package/dist/tools/nodes/get-node-description.tool.js +5 -3
- package/dist/tools/nodes/get-node-description.tool.js.map +1 -1
- package/dist/tools/nodes/get-node-type-definition.tool.d.ts +29 -6
- package/dist/tools/nodes/get-node-type-definition.tool.js +9 -7
- package/dist/tools/nodes/get-node-type-definition.tool.js.map +1 -1
- package/dist/tools/nodes/get-suggested-nodes.tool.d.ts +7 -12
- package/dist/tools/nodes/get-suggested-nodes.tool.js +9 -7
- package/dist/tools/nodes/get-suggested-nodes.tool.js.map +1 -1
- package/dist/tools/nodes/list-nodes.tool.d.ts +7 -3
- package/dist/tools/nodes/list-nodes.tool.js +8 -6
- package/dist/tools/nodes/list-nodes.tool.js.map +1 -1
- package/dist/tools/nodes/node-search-engine.d.ts +1 -0
- package/dist/tools/nodes/node-search-engine.js +12 -9
- package/dist/tools/nodes/node-search-engine.js.map +1 -1
- package/dist/tools/nodes/search-nodes.tool.d.ts +12 -24
- package/dist/tools/nodes/search-nodes.tool.js +21 -17
- package/dist/tools/nodes/search-nodes.tool.js.map +1 -1
- package/dist/tools/orchestration/add-plan-item.tool.d.ts +5 -0
- package/dist/tools/orchestration/add-plan-item.tool.js +91 -0
- package/dist/tools/orchestration/add-plan-item.tool.js.map +1 -0
- package/dist/tools/orchestration/blueprint-accumulator.d.ts +50 -0
- package/dist/tools/orchestration/blueprint-accumulator.js +215 -0
- package/dist/tools/orchestration/blueprint-accumulator.js.map +1 -0
- package/dist/tools/orchestration/blueprint.schema.d.ts +271 -0
- package/dist/tools/orchestration/blueprint.schema.js +61 -0
- package/dist/tools/orchestration/blueprint.schema.js.map +1 -0
- package/dist/tools/orchestration/browser-credential-setup.tool.d.ts +15 -12
- package/dist/tools/orchestration/browser-credential-setup.tool.js +26 -21
- package/dist/tools/orchestration/browser-credential-setup.tool.js.map +1 -1
- package/dist/tools/orchestration/build-workflow-agent.prompt.d.ts +1 -1
- package/dist/tools/orchestration/build-workflow-agent.prompt.js +43 -149
- package/dist/tools/orchestration/build-workflow-agent.prompt.js.map +1 -1
- package/dist/tools/orchestration/build-workflow-agent.tool.d.ts +11 -4
- package/dist/tools/orchestration/build-workflow-agent.tool.js +50 -82
- package/dist/tools/orchestration/build-workflow-agent.tool.js.map +1 -1
- package/dist/tools/orchestration/cancel-background-task.tool.d.ts +7 -3
- package/dist/tools/orchestration/cancel-background-task.tool.js +5 -3
- package/dist/tools/orchestration/cancel-background-task.tool.js.map +1 -1
- package/dist/tools/orchestration/correct-background-task.tool.d.ts +9 -3
- package/dist/tools/orchestration/correct-background-task.tool.js +8 -6
- package/dist/tools/orchestration/correct-background-task.tool.js.map +1 -1
- package/dist/tools/orchestration/data-table-agent.prompt.d.ts +1 -1
- package/dist/tools/orchestration/data-table-agent.prompt.js +20 -0
- package/dist/tools/orchestration/data-table-agent.prompt.js.map +1 -1
- package/dist/tools/orchestration/data-table-agent.tool.d.ts +9 -4
- package/dist/tools/orchestration/data-table-agent.tool.js +22 -25
- package/dist/tools/orchestration/data-table-agent.tool.js.map +1 -1
- package/dist/tools/orchestration/delegate.schemas.d.ts +12 -0
- package/dist/tools/orchestration/delegate.schemas.js +17 -0
- package/dist/tools/orchestration/delegate.schemas.js.map +1 -1
- package/dist/tools/orchestration/delegate.tool.d.ts +1 -10
- package/dist/tools/orchestration/delegate.tool.js +40 -41
- package/dist/tools/orchestration/delegate.tool.js.map +1 -1
- package/dist/tools/orchestration/plan-agent-prompt.d.ts +1 -0
- package/dist/tools/orchestration/plan-agent-prompt.js +76 -0
- package/dist/tools/orchestration/plan-agent-prompt.js.map +1 -0
- package/dist/tools/orchestration/plan-with-agent.tool.d.ts +2 -0
- package/dist/tools/orchestration/plan-with-agent.tool.js +277 -0
- package/dist/tools/orchestration/plan-with-agent.tool.js.map +1 -0
- package/dist/tools/orchestration/plan.tool.d.ts +7 -39
- package/dist/tools/orchestration/plan.tool.js +15 -13
- package/dist/tools/orchestration/plan.tool.js.map +1 -1
- package/dist/tools/orchestration/report-verification-verdict.tool.d.ts +23 -3
- package/dist/tools/orchestration/report-verification-verdict.tool.js +27 -28
- package/dist/tools/orchestration/report-verification-verdict.tool.js.map +1 -1
- package/dist/tools/orchestration/research-with-agent.tool.d.ts +11 -4
- package/dist/tools/orchestration/research-with-agent.tool.js +25 -21
- package/dist/tools/orchestration/research-with-agent.tool.js.map +1 -1
- package/dist/tools/orchestration/submit-plan.tool.d.ts +3 -0
- package/dist/tools/orchestration/submit-plan.tool.js +81 -0
- package/dist/tools/orchestration/submit-plan.tool.js.map +1 -0
- package/dist/tools/orchestration/update-tasks.tool.d.ts +1 -9
- package/dist/tools/orchestration/update-tasks.tool.js.map +1 -1
- package/dist/tools/orchestration/verify-built-workflow.tool.d.ts +13 -7
- package/dist/tools/orchestration/verify-built-workflow.tool.js +14 -15
- package/dist/tools/orchestration/verify-built-workflow.tool.js.map +1 -1
- package/dist/tools/shared/ask-user.tool.d.ts +42 -31
- package/dist/tools/shared/ask-user.tool.js +16 -15
- package/dist/tools/shared/ask-user.tool.js.map +1 -1
- package/dist/tools/templates/search-template-parameters.tool.d.ts +14 -7
- package/dist/tools/templates/search-template-parameters.tool.js +17 -15
- package/dist/tools/templates/search-template-parameters.tool.js.map +1 -1
- package/dist/tools/templates/search-template-structures.tool.d.ts +11 -8
- package/dist/tools/templates/search-template-structures.tool.js +13 -11
- package/dist/tools/templates/search-template-structures.tool.js.map +1 -1
- package/dist/tools/web-research/fetch-url.tool.d.ts +9 -23
- package/dist/tools/web-research/fetch-url.tool.js +30 -14
- package/dist/tools/web-research/fetch-url.tool.js.map +1 -1
- package/dist/tools/web-research/web-search.tool.d.ts +12 -2
- package/dist/tools/web-research/web-search.tool.js +20 -18
- package/dist/tools/web-research/web-search.tool.js.map +1 -1
- package/dist/tools/workflows/apply-workflow-credentials.tool.d.ts +11 -5
- package/dist/tools/workflows/apply-workflow-credentials.tool.js +7 -5
- package/dist/tools/workflows/apply-workflow-credentials.tool.js.map +1 -1
- package/dist/tools/workflows/build-workflow.tool.d.ts +26 -5
- package/dist/tools/workflows/build-workflow.tool.js +23 -20
- package/dist/tools/workflows/build-workflow.tool.js.map +1 -1
- package/dist/tools/workflows/delete-workflow.tool.d.ts +13 -14
- package/dist/tools/workflows/delete-workflow.tool.js +15 -11
- package/dist/tools/workflows/delete-workflow.tool.js.map +1 -1
- package/dist/tools/workflows/get-workflow-as-code.tool.d.ts +6 -10
- package/dist/tools/workflows/get-workflow-as-code.tool.js +5 -3
- package/dist/tools/workflows/get-workflow-as-code.tool.js.map +1 -1
- package/dist/tools/workflows/get-workflow-version.tool.d.ts +8 -16
- package/dist/tools/workflows/get-workflow-version.tool.js +6 -4
- package/dist/tools/workflows/get-workflow-version.tool.js.map +1 -1
- package/dist/tools/workflows/get-workflow.tool.d.ts +7 -15
- package/dist/tools/workflows/get-workflow.tool.js +5 -3
- package/dist/tools/workflows/get-workflow.tool.js.map +1 -1
- package/dist/tools/workflows/list-workflow-versions.tool.d.ts +11 -3
- package/dist/tools/workflows/list-workflow-versions.tool.js +13 -11
- package/dist/tools/workflows/list-workflow-versions.tool.js.map +1 -1
- package/dist/tools/workflows/list-workflows.tool.d.ts +9 -10
- package/dist/tools/workflows/list-workflows.tool.js +12 -10
- package/dist/tools/workflows/list-workflows.tool.js.map +1 -1
- package/dist/tools/workflows/materialize-node-type.tool.d.ts +29 -11
- package/dist/tools/workflows/materialize-node-type.tool.js +9 -7
- package/dist/tools/workflows/materialize-node-type.tool.js.map +1 -1
- package/dist/tools/workflows/publish-workflow.tool.d.ts +6 -20
- package/dist/tools/workflows/publish-workflow.tool.js +29 -24
- package/dist/tools/workflows/publish-workflow.tool.js.map +1 -1
- package/dist/tools/workflows/restore-workflow-version.tool.d.ts +13 -15
- package/dist/tools/workflows/restore-workflow-version.tool.js +15 -8
- package/dist/tools/workflows/restore-workflow-version.tool.js.map +1 -1
- package/dist/tools/workflows/setup-workflow.service.d.ts +0 -1
- package/dist/tools/workflows/setup-workflow.service.js +23 -6
- package/dist/tools/workflows/setup-workflow.service.js.map +1 -1
- package/dist/tools/workflows/setup-workflow.tool.d.ts +7 -144
- package/dist/tools/workflows/setup-workflow.tool.js +10 -14
- package/dist/tools/workflows/setup-workflow.tool.js.map +1 -1
- package/dist/tools/workflows/submit-workflow.tool.d.ts +12 -9
- package/dist/tools/workflows/submit-workflow.tool.js +15 -17
- package/dist/tools/workflows/submit-workflow.tool.js.map +1 -1
- package/dist/tools/workflows/unpublish-workflow.tool.d.ts +13 -15
- package/dist/tools/workflows/unpublish-workflow.tool.js +15 -11
- package/dist/tools/workflows/unpublish-workflow.tool.js.map +1 -1
- package/dist/tools/workflows/update-workflow-version.tool.d.ts +13 -3
- package/dist/tools/workflows/update-workflow-version.tool.js +12 -10
- package/dist/tools/workflows/update-workflow-version.tool.js.map +1 -1
- package/dist/tools/workflows/write-sandbox-file.tool.d.ts +9 -9
- package/dist/tools/workflows/write-sandbox-file.tool.js +8 -6
- package/dist/tools/workflows/write-sandbox-file.tool.js.map +1 -1
- package/dist/tools/workspace/cleanup-test-executions.tool.d.ts +15 -14
- package/dist/tools/workspace/cleanup-test-executions.tool.js +19 -15
- package/dist/tools/workspace/cleanup-test-executions.tool.js.map +1 -1
- package/dist/tools/workspace/create-folder.tool.d.ts +15 -16
- package/dist/tools/workspace/create-folder.tool.js +25 -12
- package/dist/tools/workspace/create-folder.tool.js.map +1 -1
- package/dist/tools/workspace/delete-folder.tool.d.ts +19 -14
- package/dist/tools/workspace/delete-folder.tool.js +24 -17
- package/dist/tools/workspace/delete-folder.tool.js.map +1 -1
- package/dist/tools/workspace/list-folders.tool.d.ts +7 -3
- package/dist/tools/workspace/list-folders.tool.js +5 -3
- package/dist/tools/workspace/list-folders.tool.js.map +1 -1
- package/dist/tools/workspace/list-projects.tool.d.ts +3 -3
- package/dist/tools/workspace/list-projects.tool.js +3 -1
- package/dist/tools/workspace/list-projects.tool.js.map +1 -1
- package/dist/tools/workspace/list-tags.tool.d.ts +3 -6
- package/dist/tools/workspace/list-tags.tool.js +3 -1
- package/dist/tools/workspace/list-tags.tool.js.map +1 -1
- package/dist/tools/workspace/move-workflow-to-folder.tool.d.ts +17 -14
- package/dist/tools/workspace/move-workflow-to-folder.tool.js +20 -16
- package/dist/tools/workspace/move-workflow-to-folder.tool.js.map +1 -1
- package/dist/tools/workspace/tag-workflow.tool.d.ts +15 -14
- package/dist/tools/workspace/tag-workflow.tool.js +16 -12
- package/dist/tools/workspace/tag-workflow.tool.js.map +1 -1
- package/dist/tracing/langsmith-tracing.d.ts +1 -0
- package/dist/tracing/langsmith-tracing.js +47 -57
- package/dist/tracing/langsmith-tracing.js.map +1 -1
- package/dist/types.d.ts +24 -50
- package/dist/utils/eval-agents.d.ts +10 -0
- package/dist/utils/eval-agents.js +54 -0
- package/dist/utils/eval-agents.js.map +1 -0
- package/dist/workflow-builder/sdk-prompt-sections.d.ts +1 -4
- package/dist/workflow-builder/sdk-prompt-sections.js +5 -513
- package/dist/workflow-builder/sdk-prompt-sections.js.map +1 -1
- package/dist/workflow-loop/guidance.js +3 -5
- package/dist/workflow-loop/guidance.js.map +1 -1
- package/dist/workspace/daytona-filesystem.js +15 -1
- package/dist/workspace/daytona-filesystem.js.map +1 -1
- package/package.json +15 -9
- package/dist/memory/working-memory-template.d.ts +0 -1
- package/dist/memory/working-memory-template.js +0 -25
- package/dist/memory/working-memory-template.js.map +0 -1
- package/dist/runtime/working-memory-tracing.d.ts +0 -19
- package/dist/runtime/working-memory-tracing.js +0 -111
- package/dist/runtime/working-memory-tracing.js.map +0 -1
- package/dist/tools/best-practices/guides/chatbot.d.ts +0 -1
- package/dist/tools/best-practices/guides/chatbot.js +0 -111
- package/dist/tools/best-practices/guides/chatbot.js.map +0 -1
- package/dist/tools/best-practices/guides/content-generation.d.ts +0 -1
- package/dist/tools/best-practices/guides/content-generation.js +0 -108
- package/dist/tools/best-practices/guides/content-generation.js.map +0 -1
- package/dist/tools/best-practices/guides/data-extraction.d.ts +0 -1
- package/dist/tools/best-practices/guides/data-extraction.js +0 -115
- package/dist/tools/best-practices/guides/data-extraction.js.map +0 -1
- package/dist/tools/best-practices/guides/data-persistence.d.ts +0 -1
- package/dist/tools/best-practices/guides/data-persistence.js +0 -198
- package/dist/tools/best-practices/guides/data-persistence.js.map +0 -1
- package/dist/tools/best-practices/guides/data-transformation.d.ts +0 -1
- package/dist/tools/best-practices/guides/data-transformation.js +0 -139
- package/dist/tools/best-practices/guides/data-transformation.js.map +0 -1
- package/dist/tools/best-practices/guides/document-processing.d.ts +0 -1
- package/dist/tools/best-practices/guides/document-processing.js +0 -326
- package/dist/tools/best-practices/guides/document-processing.js.map +0 -1
- package/dist/tools/best-practices/guides/form-input.d.ts +0 -1
- package/dist/tools/best-practices/guides/form-input.js +0 -166
- package/dist/tools/best-practices/guides/form-input.js.map +0 -1
- package/dist/tools/best-practices/guides/notification.d.ts +0 -1
- package/dist/tools/best-practices/guides/notification.js +0 -128
- package/dist/tools/best-practices/guides/notification.js.map +0 -1
- package/dist/tools/best-practices/guides/scheduling.d.ts +0 -1
- package/dist/tools/best-practices/guides/scheduling.js +0 -145
- package/dist/tools/best-practices/guides/scheduling.js.map +0 -1
- package/dist/tools/best-practices/guides/scraping-and-research.d.ts +0 -1
- package/dist/tools/best-practices/guides/scraping-and-research.js +0 -151
- package/dist/tools/best-practices/guides/scraping-and-research.js.map +0 -1
- package/dist/tools/best-practices/guides/triage.d.ts +0 -1
- package/dist/tools/best-practices/guides/triage.js +0 -142
- package/dist/tools/best-practices/guides/triage.js.map +0 -1
- package/dist/tools/filesystem/get-file-tree.tool.d.ts +0 -22
- package/dist/tools/filesystem/get-file-tree.tool.js +0 -64
- package/dist/tools/filesystem/get-file-tree.tool.js.map +0 -1
- package/dist/tools/filesystem/list-files.tool.d.ts +0 -30
- package/dist/tools/filesystem/list-files.tool.js +0 -100
- package/dist/tools/filesystem/list-files.tool.js.map +0 -1
- package/dist/tools/filesystem/read-file.tool.d.ts +0 -25
- package/dist/tools/filesystem/read-file.tool.js +0 -83
- package/dist/tools/filesystem/read-file.tool.js.map +0 -1
- package/dist/tools/filesystem/search-files.tool.d.ts +0 -31
- package/dist/tools/filesystem/search-files.tool.js +0 -96
- package/dist/tools/filesystem/search-files.tool.js.map +0 -1
|
@@ -1,11 +1,18 @@
|
|
|
1
|
-
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const searchTemplateParametersInputSchema: z.ZodObject<{
|
|
3
|
+
search: z.ZodOptional<z.ZodString>;
|
|
4
|
+
category: z.ZodOptional<z.ZodEnum<["AI", "AI Chatbot", "AI RAG", "AI Summarization", "Content Creation", "CRM", "Crypto Trading", "DevOps", "Document Extraction", "Document Ops", "Engineering", "File Management", "HR", "Internal Wiki", "Invoice Processing", "IT Ops", "Lead Generation", "Lead Nurturing", "Marketing", "Market Research", "Miscellaneous", "Multimodal AI", "Other", "Personal Productivity", "Project Management", "Sales", "SecOps", "Social Media", "Support", "Support Chatbot", "Ticket Management"]>>;
|
|
5
|
+
rows: z.ZodOptional<z.ZodNumber>;
|
|
6
|
+
nodeType: z.ZodOptional<z.ZodString>;
|
|
7
|
+
}, "strip", z.ZodTypeAny, {
|
|
2
8
|
search?: string | undefined;
|
|
3
|
-
nodeType?: string | undefined;
|
|
4
9
|
rows?: number | undefined;
|
|
10
|
+
nodeType?: string | undefined;
|
|
5
11
|
category?: "AI" | "AI Chatbot" | "AI RAG" | "AI Summarization" | "Content Creation" | "CRM" | "Crypto Trading" | "DevOps" | "Document Extraction" | "Document Ops" | "Engineering" | "File Management" | "HR" | "Internal Wiki" | "Invoice Processing" | "IT Ops" | "Lead Generation" | "Lead Nurturing" | "Marketing" | "Market Research" | "Miscellaneous" | "Multimodal AI" | "Other" | "Personal Productivity" | "Project Management" | "Sales" | "SecOps" | "Social Media" | "Support" | "Support Chatbot" | "Ticket Management" | undefined;
|
|
6
12
|
}, {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}
|
|
13
|
+
search?: string | undefined;
|
|
14
|
+
rows?: number | undefined;
|
|
15
|
+
nodeType?: string | undefined;
|
|
16
|
+
category?: "AI" | "AI Chatbot" | "AI RAG" | "AI Summarization" | "Content Creation" | "CRM" | "Crypto Trading" | "DevOps" | "Document Extraction" | "Document Ops" | "Engineering" | "File Management" | "HR" | "Internal Wiki" | "Invoice Processing" | "IT Ops" | "Lead Generation" | "Lead Nurturing" | "Marketing" | "Market Research" | "Miscellaneous" | "Multimodal AI" | "Other" | "Personal Productivity" | "Project Management" | "Sales" | "SecOps" | "Social Media" | "Support" | "Support Chatbot" | "Ticket Management" | undefined;
|
|
17
|
+
}>;
|
|
18
|
+
export declare function createSearchTemplateParametersTool(): import("@mastra/core/tools").Tool<InferPublicSchema<T>, InferPublicSchema<T>, InferPublicSchema<T>, InferPublicSchema<T>, import("@mastra/core/tools").ToolExecutionContext<InferPublicSchema<T>, InferPublicSchema<T>, unknown>, "search-template-parameters", unknown>;
|
|
@@ -1,29 +1,31 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.searchTemplateParametersInputSchema = void 0;
|
|
3
4
|
exports.createSearchTemplateParametersTool = createSearchTemplateParametersTool;
|
|
4
5
|
const tools_1 = require("@mastra/core/tools");
|
|
5
6
|
const zod_1 = require("zod");
|
|
6
7
|
const template_api_1 = require("./template-api");
|
|
7
8
|
const types_1 = require("./types");
|
|
8
9
|
const node_configuration_utils_1 = require("../utils/node-configuration.utils");
|
|
10
|
+
exports.searchTemplateParametersInputSchema = zod_1.z.object({
|
|
11
|
+
search: zod_1.z.string().optional().describe('Free-text search query for templates'),
|
|
12
|
+
category: zod_1.z.enum(types_1.categories).optional().describe('Filter by template category'),
|
|
13
|
+
rows: zod_1.z
|
|
14
|
+
.number()
|
|
15
|
+
.min(1)
|
|
16
|
+
.max(10)
|
|
17
|
+
.optional()
|
|
18
|
+
.describe('Number of templates to search (default: 5, max: 10)'),
|
|
19
|
+
nodeType: zod_1.z
|
|
20
|
+
.string()
|
|
21
|
+
.optional()
|
|
22
|
+
.describe('Filter to show configurations for a specific node type only (e.g. "n8n-nodes-base.telegram")'),
|
|
23
|
+
});
|
|
9
24
|
function createSearchTemplateParametersTool() {
|
|
10
25
|
return (0, tools_1.createTool)({
|
|
11
26
|
id: 'search-template-parameters',
|
|
12
27
|
description: 'Search n8n workflow templates and return node parameter configurations showing how specific nodes are typically set up. Use this to understand how nodes should be configured.',
|
|
13
|
-
inputSchema:
|
|
14
|
-
search: zod_1.z.string().optional().describe('Free-text search query for templates'),
|
|
15
|
-
category: zod_1.z.enum(types_1.categories).optional().describe('Filter by template category'),
|
|
16
|
-
rows: zod_1.z
|
|
17
|
-
.number()
|
|
18
|
-
.min(1)
|
|
19
|
-
.max(10)
|
|
20
|
-
.optional()
|
|
21
|
-
.describe('Number of templates to search (default: 5, max: 10)'),
|
|
22
|
-
nodeType: zod_1.z
|
|
23
|
-
.string()
|
|
24
|
-
.optional()
|
|
25
|
-
.describe('Filter to show configurations for a specific node type only (e.g. "n8n-nodes-base.telegram")'),
|
|
26
|
-
}),
|
|
28
|
+
inputSchema: exports.searchTemplateParametersInputSchema,
|
|
27
29
|
outputSchema: zod_1.z.object({
|
|
28
30
|
configurations: zod_1.z.record(zod_1.z.string(), zod_1.z.array(zod_1.z.object({
|
|
29
31
|
version: zod_1.z.number(),
|
|
@@ -33,7 +35,7 @@ function createSearchTemplateParametersTool() {
|
|
|
33
35
|
totalTemplatesSearched: zod_1.z.number(),
|
|
34
36
|
formatted: zod_1.z.string(),
|
|
35
37
|
}),
|
|
36
|
-
execute: async ({ search, category, rows, nodeType }) => {
|
|
38
|
+
execute: async ({ search, category, rows, nodeType, }) => {
|
|
37
39
|
const result = await (0, template_api_1.fetchWorkflowsFromTemplates)({ search, category, rows });
|
|
38
40
|
const allConfigurations = (0, node_configuration_utils_1.collectNodeConfigurationsFromWorkflows)(result.workflows);
|
|
39
41
|
let filteredConfigurations = allConfigurations;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search-template-parameters.tool.js","sourceRoot":"","sources":["../../../src/tools/templates/search-template-parameters.tool.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"search-template-parameters.tool.js","sourceRoot":"","sources":["../../../src/tools/templates/search-template-parameters.tool.ts"],"names":[],"mappings":";;;AA2BA,gFAmDC;AA9ED,8CAAgD;AAChD,6BAAwB;AAExB,iDAA6D;AAC7D,mCAAqC;AACrC,gFAG2C;AAE9B,QAAA,mCAAmC,GAAG,OAAC,CAAC,MAAM,CAAC;IAC3D,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,sCAAsC,CAAC;IAC9E,QAAQ,EAAE,OAAC,CAAC,IAAI,CAAC,kBAAU,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,6BAA6B,CAAC;IAC/E,IAAI,EAAE,OAAC;SACL,MAAM,EAAE;SACR,GAAG,CAAC,CAAC,CAAC;SACN,GAAG,CAAC,EAAE,CAAC;SACP,QAAQ,EAAE;SACV,QAAQ,CAAC,qDAAqD,CAAC;IACjE,QAAQ,EAAE,OAAC;SACT,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CACR,8FAA8F,CAC9F;CACF,CAAC,CAAC;AAEH,SAAgB,kCAAkC;IACjD,OAAO,IAAA,kBAAU,EAAC;QACjB,EAAE,EAAE,4BAA4B;QAChC,WAAW,EACV,gLAAgL;QACjL,WAAW,EAAE,2CAAmC;QAChD,YAAY,EAAE,OAAC,CAAC,MAAM,CAAC;YACtB,cAAc,EAAE,OAAC,CAAC,MAAM,CACvB,OAAC,CAAC,MAAM,EAAE,EACV,OAAC,CAAC,KAAK,CACN,OAAC,CAAC,MAAM,CAAC;gBACR,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE;gBACnB,UAAU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C,CAAC;QACH,CAAC;KACD,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -1,12 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const searchTemplateStructuresInputSchema: z.ZodObject<{
|
|
3
|
+
search: z.ZodOptional<z.ZodString>;
|
|
4
|
+
category: z.ZodOptional<z.ZodEnum<["AI", "AI Chatbot", "AI RAG", "AI Summarization", "Content Creation", "CRM", "Crypto Trading", "DevOps", "Document Extraction", "Document Ops", "Engineering", "File Management", "HR", "Internal Wiki", "Invoice Processing", "IT Ops", "Lead Generation", "Lead Nurturing", "Marketing", "Market Research", "Miscellaneous", "Multimodal AI", "Other", "Personal Productivity", "Project Management", "Sales", "SecOps", "Social Media", "Support", "Support Chatbot", "Ticket Management"]>>;
|
|
5
|
+
rows: z.ZodOptional<z.ZodNumber>;
|
|
6
|
+
}, "strip", z.ZodTypeAny, {
|
|
2
7
|
search?: string | undefined;
|
|
3
8
|
rows?: number | undefined;
|
|
4
9
|
category?: "AI" | "AI Chatbot" | "AI RAG" | "AI Summarization" | "Content Creation" | "CRM" | "Crypto Trading" | "DevOps" | "Document Extraction" | "Document Ops" | "Engineering" | "File Management" | "HR" | "Internal Wiki" | "Invoice Processing" | "IT Ops" | "Lead Generation" | "Lead Nurturing" | "Marketing" | "Market Research" | "Miscellaneous" | "Multimodal AI" | "Other" | "Personal Productivity" | "Project Management" | "Sales" | "SecOps" | "Social Media" | "Support" | "Support Chatbot" | "Ticket Management" | undefined;
|
|
5
10
|
}, {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}[];
|
|
12
|
-
}, unknown, unknown, import("@mastra/core/tools").ToolExecutionContext<unknown, unknown, unknown>, "search-template-structures", unknown>;
|
|
11
|
+
search?: string | undefined;
|
|
12
|
+
rows?: number | undefined;
|
|
13
|
+
category?: "AI" | "AI Chatbot" | "AI RAG" | "AI Summarization" | "Content Creation" | "CRM" | "Crypto Trading" | "DevOps" | "Document Extraction" | "Document Ops" | "Engineering" | "File Management" | "HR" | "Internal Wiki" | "Invoice Processing" | "IT Ops" | "Lead Generation" | "Lead Nurturing" | "Marketing" | "Market Research" | "Miscellaneous" | "Multimodal AI" | "Other" | "Personal Productivity" | "Project Management" | "Sales" | "SecOps" | "Social Media" | "Support" | "Support Chatbot" | "Ticket Management" | undefined;
|
|
14
|
+
}>;
|
|
15
|
+
export declare function createSearchTemplateStructuresTool(): import("@mastra/core/tools").Tool<InferPublicSchema<T>, InferPublicSchema<T>, InferPublicSchema<T>, InferPublicSchema<T>, import("@mastra/core/tools").ToolExecutionContext<InferPublicSchema<T>, InferPublicSchema<T>, unknown>, "search-template-structures", unknown>;
|
|
@@ -1,25 +1,27 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.searchTemplateStructuresInputSchema = void 0;
|
|
3
4
|
exports.createSearchTemplateStructuresTool = createSearchTemplateStructuresTool;
|
|
4
5
|
const tools_1 = require("@mastra/core/tools");
|
|
5
6
|
const zod_1 = require("zod");
|
|
6
7
|
const template_api_1 = require("./template-api");
|
|
7
8
|
const types_1 = require("./types");
|
|
8
9
|
const mermaid_utils_1 = require("../utils/mermaid.utils");
|
|
10
|
+
exports.searchTemplateStructuresInputSchema = zod_1.z.object({
|
|
11
|
+
search: zod_1.z.string().optional().describe('Free-text search query for templates'),
|
|
12
|
+
category: zod_1.z.enum(types_1.categories).optional().describe('Filter by template category'),
|
|
13
|
+
rows: zod_1.z
|
|
14
|
+
.number()
|
|
15
|
+
.min(1)
|
|
16
|
+
.max(10)
|
|
17
|
+
.optional()
|
|
18
|
+
.describe('Number of templates to return (default: 5, max: 10)'),
|
|
19
|
+
});
|
|
9
20
|
function createSearchTemplateStructuresTool() {
|
|
10
21
|
return (0, tools_1.createTool)({
|
|
11
22
|
id: 'search-template-structures',
|
|
12
23
|
description: 'Search n8n workflow templates and return mermaid diagrams showing their structure. Use this to find reference workflow patterns before building complex workflows.',
|
|
13
|
-
inputSchema:
|
|
14
|
-
search: zod_1.z.string().optional().describe('Free-text search query for templates'),
|
|
15
|
-
category: zod_1.z.enum(types_1.categories).optional().describe('Filter by template category'),
|
|
16
|
-
rows: zod_1.z
|
|
17
|
-
.number()
|
|
18
|
-
.min(1)
|
|
19
|
-
.max(10)
|
|
20
|
-
.optional()
|
|
21
|
-
.describe('Number of templates to return (default: 5, max: 10)'),
|
|
22
|
-
}),
|
|
24
|
+
inputSchema: exports.searchTemplateStructuresInputSchema,
|
|
23
25
|
outputSchema: zod_1.z.object({
|
|
24
26
|
examples: zod_1.z.array(zod_1.z.object({
|
|
25
27
|
name: zod_1.z.string(),
|
|
@@ -28,7 +30,7 @@ function createSearchTemplateStructuresTool() {
|
|
|
28
30
|
})),
|
|
29
31
|
totalResults: zod_1.z.number(),
|
|
30
32
|
}),
|
|
31
|
-
execute: async ({ search, category, rows }) => {
|
|
33
|
+
execute: async ({ search, category, rows, }) => {
|
|
32
34
|
const result = await (0, template_api_1.fetchWorkflowsFromTemplates)({ search, category, rows });
|
|
33
35
|
const examples = result.workflows.map((wf) => ({
|
|
34
36
|
name: wf.name,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search-template-structures.tool.js","sourceRoot":"","sources":["../../../src/tools/templates/search-template-structures.tool.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"search-template-structures.tool.js","sourceRoot":"","sources":["../../../src/tools/templates/search-template-structures.tool.ts"],"names":[],"mappings":";;;AAkBA,gFAmCC;AArDD,8CAAgD;AAChD,6BAAwB;AAExB,iDAA6D;AAC7D,mCAAqC;AACrC,0DAA0D;AAE7C,QAAA,mCAAmC,GAAG,OAAC,CAAC,MAAM,CAAC;IAC3D,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,sCAAsC,CAAC;IAC9E,QAAQ,EAAE,O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AAE,MAAM,CAAC,UAAU;aAC/B,CAAC;QACH,CAAC;KACD,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -1,27 +1,13 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
1
2
|
import type { InstanceAiContext } from '../../types';
|
|
2
|
-
export declare
|
|
3
|
+
export declare const fetchUrlInputSchema: z.ZodObject<{
|
|
4
|
+
url: z.ZodString;
|
|
5
|
+
maxContentLength: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
|
6
|
+
}, "strip", z.ZodTypeAny, {
|
|
3
7
|
url: string;
|
|
4
8
|
maxContentLength?: number | undefined;
|
|
5
|
-
}, import("../../types").FetchedPage, {
|
|
6
|
-
message: string;
|
|
7
|
-
requestId: string;
|
|
8
|
-
severity: "destructive" | "warning" | "info";
|
|
9
|
-
domainAccess: {
|
|
10
|
-
url: string;
|
|
11
|
-
host: string;
|
|
12
|
-
};
|
|
13
9
|
}, {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
requestId: string;
|
|
19
|
-
severity: "destructive" | "warning" | "info";
|
|
20
|
-
domainAccess: {
|
|
21
|
-
url: string;
|
|
22
|
-
host: string;
|
|
23
|
-
};
|
|
24
|
-
}, {
|
|
25
|
-
approved: boolean;
|
|
26
|
-
domainAccessAction?: "allow_once" | "allow_domain" | "allow_all" | undefined;
|
|
27
|
-
}, unknown>, "fetch-url", unknown>;
|
|
10
|
+
url: string;
|
|
11
|
+
maxContentLength?: number | undefined;
|
|
12
|
+
}>;
|
|
13
|
+
export declare function createFetchUrlTool(context: InstanceAiContext): import("@mastra/core/tools").Tool<InferPublicSchema<T>, InferPublicSchema<T>, InferPublicSchema<T>, InferPublicSchema<T>, import("@mastra/core/tools").ToolExecutionContext<InferPublicSchema<T>, InferPublicSchema<T>, unknown>, "fetch-url", unknown>;
|
|
@@ -1,25 +1,27 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.fetchUrlInputSchema = void 0;
|
|
3
4
|
exports.createFetchUrlTool = createFetchUrlTool;
|
|
4
5
|
const tools_1 = require("@mastra/core/tools");
|
|
5
6
|
const zod_1 = require("zod");
|
|
6
7
|
const sanitize_web_content_1 = require("./sanitize-web-content");
|
|
7
8
|
const domain_access_1 = require("../../domain-access");
|
|
9
|
+
exports.fetchUrlInputSchema = zod_1.z.object({
|
|
10
|
+
url: zod_1.z.string().url().describe('URL of the page to fetch'),
|
|
11
|
+
maxContentLength: zod_1.z
|
|
12
|
+
.number()
|
|
13
|
+
.int()
|
|
14
|
+
.positive()
|
|
15
|
+
.max(100_000)
|
|
16
|
+
.default(30_000)
|
|
17
|
+
.optional()
|
|
18
|
+
.describe('Maximum content length in characters (default 30000)'),
|
|
19
|
+
});
|
|
8
20
|
function createFetchUrlTool(context) {
|
|
9
21
|
return (0, tools_1.createTool)({
|
|
10
22
|
id: 'fetch-url',
|
|
11
23
|
description: 'Fetch a web page and extract its content as markdown. Use for reading documentation pages, API references, or guides from known URLs.',
|
|
12
|
-
inputSchema:
|
|
13
|
-
url: zod_1.z.string().url().describe('URL of the page to fetch'),
|
|
14
|
-
maxContentLength: zod_1.z
|
|
15
|
-
.number()
|
|
16
|
-
.int()
|
|
17
|
-
.positive()
|
|
18
|
-
.max(100_000)
|
|
19
|
-
.default(30_000)
|
|
20
|
-
.optional()
|
|
21
|
-
.describe('Maximum content length in characters (default 30000)'),
|
|
22
|
-
}),
|
|
24
|
+
inputSchema: exports.fetchUrlInputSchema,
|
|
23
25
|
outputSchema: zod_1.z.object({
|
|
24
26
|
url: zod_1.z.string(),
|
|
25
27
|
finalUrl: zod_1.z.string(),
|
|
@@ -47,7 +49,8 @@ function createFetchUrlTool(context) {
|
|
|
47
49
|
contentLength: 0,
|
|
48
50
|
};
|
|
49
51
|
}
|
|
50
|
-
const
|
|
52
|
+
const resumeData = ctx?.agent?.resumeData;
|
|
53
|
+
const suspend = ctx?.agent?.suspend;
|
|
51
54
|
if (resumeData !== undefined && resumeData !== null) {
|
|
52
55
|
let host;
|
|
53
56
|
try {
|
|
@@ -81,6 +84,16 @@ function createFetchUrlTool(context) {
|
|
|
81
84
|
runId: context.runId,
|
|
82
85
|
});
|
|
83
86
|
if (!check.allowed) {
|
|
87
|
+
if (check.blocked) {
|
|
88
|
+
return {
|
|
89
|
+
url: input.url,
|
|
90
|
+
finalUrl: input.url,
|
|
91
|
+
title: '',
|
|
92
|
+
content: 'Action blocked by admin.',
|
|
93
|
+
truncated: false,
|
|
94
|
+
contentLength: 0,
|
|
95
|
+
};
|
|
96
|
+
}
|
|
84
97
|
await suspend?.(check.suspendPayload);
|
|
85
98
|
return {
|
|
86
99
|
url: input.url,
|
|
@@ -100,8 +113,11 @@ function createFetchUrlTool(context) {
|
|
|
100
113
|
runId: context.runId,
|
|
101
114
|
});
|
|
102
115
|
if (!redirectCheck.allowed) {
|
|
103
|
-
|
|
104
|
-
`
|
|
116
|
+
const reason = redirectCheck.blocked
|
|
117
|
+
? `Access to ${new URL(targetUrl).hostname} is blocked by admin.`
|
|
118
|
+
: `Redirect to ${new URL(targetUrl).hostname} requires approval. ` +
|
|
119
|
+
`Retry with the direct URL: ${targetUrl}`;
|
|
120
|
+
throw new Error(reason);
|
|
105
121
|
}
|
|
106
122
|
};
|
|
107
123
|
const result = await context.webResearchService.fetchUrl(input.url, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetch-url.tool.js","sourceRoot":"","sources":["../../../src/tools/web-research/fetch-url.tool.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"fetch-url.tool.js","sourceRoot":"","sources":["../../../src/tools/web-research/fetch-url.tool.ts"],"names":[],"mappings":";;;AAwBA,gDAgIC;AAxJD,8CAAgD;AAChD,6BAAwB;AAExB,iEAAgF;AAChF,uDAK6B;AAGhB,QAAA,mBAAmB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC3C,GAAG,EAAE,OAAC,CAAC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O,CAAC,kBAAkB,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,EAAE;gBACnE,gBAAgB,EAAE,KAAK,CAAC,gBAAgB,IAAI,SAAS;gBACrD,YAAY;aACZ,CAAC,CAAC;YACH,MAAM,CAAC,OAAO,GAAG,IAAA,yCAAkB,EAAC,IAAA,yCAAkB,EAAC,MAAM,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC,QAAQ,CAAC,CAAC;YACzF,OAAO,MAAM,CAAC;QACf,CAAC;KACD,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -1,6 +1,16 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
1
2
|
import type { InstanceAiContext } from '../../types';
|
|
2
|
-
export declare
|
|
3
|
+
export declare const webSearchInputSchema: z.ZodObject<{
|
|
4
|
+
query: z.ZodString;
|
|
5
|
+
maxResults: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
|
6
|
+
includeDomains: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
7
|
+
}, "strip", z.ZodTypeAny, {
|
|
3
8
|
query: string;
|
|
4
9
|
maxResults?: number | undefined;
|
|
5
10
|
includeDomains?: string[] | undefined;
|
|
6
|
-
},
|
|
11
|
+
}, {
|
|
12
|
+
query: string;
|
|
13
|
+
maxResults?: number | undefined;
|
|
14
|
+
includeDomains?: string[] | undefined;
|
|
15
|
+
}>;
|
|
16
|
+
export declare function createWebSearchTool(context: InstanceAiContext): import("@mastra/core/tools").Tool<InferPublicSchema<T>, InferPublicSchema<T>, InferPublicSchema<T>, InferPublicSchema<T>, import("@mastra/core/tools").ToolExecutionContext<InferPublicSchema<T>, InferPublicSchema<T>, unknown>, "web-search", unknown>;
|
|
@@ -1,32 +1,34 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.webSearchInputSchema = void 0;
|
|
3
4
|
exports.createWebSearchTool = createWebSearchTool;
|
|
4
5
|
const tools_1 = require("@mastra/core/tools");
|
|
5
6
|
const zod_1 = require("zod");
|
|
6
7
|
const sanitize_web_content_1 = require("./sanitize-web-content");
|
|
8
|
+
exports.webSearchInputSchema = zod_1.z.object({
|
|
9
|
+
query: zod_1.z
|
|
10
|
+
.string()
|
|
11
|
+
.describe('Search query. Be specific — include service names, API versions, error codes.'),
|
|
12
|
+
maxResults: zod_1.z
|
|
13
|
+
.number()
|
|
14
|
+
.int()
|
|
15
|
+
.min(1)
|
|
16
|
+
.max(20)
|
|
17
|
+
.default(5)
|
|
18
|
+
.optional()
|
|
19
|
+
.describe('Maximum number of results to return (default 5, max 20)'),
|
|
20
|
+
includeDomains: zod_1.z
|
|
21
|
+
.array(zod_1.z.string())
|
|
22
|
+
.optional()
|
|
23
|
+
.describe('Restrict results to these domains, e.g. ["docs.stripe.com"]'),
|
|
24
|
+
});
|
|
7
25
|
function createWebSearchTool(context) {
|
|
8
26
|
return (0, tools_1.createTool)({
|
|
9
27
|
id: 'web-search',
|
|
10
28
|
description: 'Search the web for information. Returns ranked results with titles, URLs, ' +
|
|
11
29
|
'and snippets. Use for API docs, integration guides, error messages, and ' +
|
|
12
30
|
'general technical questions.',
|
|
13
|
-
inputSchema:
|
|
14
|
-
query: zod_1.z
|
|
15
|
-
.string()
|
|
16
|
-
.describe('Search query. Be specific — include service names, API versions, error codes.'),
|
|
17
|
-
maxResults: zod_1.z
|
|
18
|
-
.number()
|
|
19
|
-
.int()
|
|
20
|
-
.min(1)
|
|
21
|
-
.max(20)
|
|
22
|
-
.default(5)
|
|
23
|
-
.optional()
|
|
24
|
-
.describe('Maximum number of results to return (default 5, max 20)'),
|
|
25
|
-
includeDomains: zod_1.z
|
|
26
|
-
.array(zod_1.z.string())
|
|
27
|
-
.optional()
|
|
28
|
-
.describe('Restrict results to these domains, e.g. ["docs.stripe.com"]'),
|
|
29
|
-
}),
|
|
31
|
+
inputSchema: exports.webSearchInputSchema,
|
|
30
32
|
outputSchema: zod_1.z.object({
|
|
31
33
|
query: zod_1.z.string(),
|
|
32
34
|
results: zod_1.z.array(zod_1.z.object({
|
|
@@ -36,7 +38,7 @@ function createWebSearchTool(context) {
|
|
|
36
38
|
publishedDate: zod_1.z.string().optional(),
|
|
37
39
|
})),
|
|
38
40
|
}),
|
|
39
|
-
execute: async ({ query, maxResults, includeDomains }) => {
|
|
41
|
+
execute: async ({ query, maxResults, includeDomains, }) => {
|
|
40
42
|
if (!context.webResearchService?.search) {
|
|
41
43
|
return {
|
|
42
44
|
query,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"web-search.tool.js","sourceRoot":"","sources":["../../../src/tools/web-research/web-search.tool.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"web-search.tool.js","sourceRoot":"","sources":["../../../src/tools/web-research/web-search.tool.ts"],"names":[],"mappings":";;;AAwBA,kDA0CC;AAlED,8CAAgD;AAChD,6BAAwB;AAExB,iEAA4D;AAG/C,QAAA,oBAAoB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC5C,KAAK,EAAE,OAAC;SACN,MAAM,EAAE;SACR,QAAQ,CAAC,+EAA+E,CAAC;IAC3F,UAAU,EAAE,OAAC;SACX,MAAM,EAAE;SACR,GAAG,EAAE;SACL,GAAG,CAAC,CAAC,CAAC;SACN,GAAG,CAAC,EAAE,CAAC;SACP,OAAO,CAAC,CAAC,CAAC;SACV,QAAQ,EAAE;SACV,QAAQ,CAAC,yDAAyD,CAAC;IACrE,cAAc,EAAE,OAAC;SACf,KAAK,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC;SACjB,QAAQ,EAAE;SACV,QAAQ,CAAC,6DAA6D,CAAC;CACzE,CAAC,CAAC;AAEH,SAAgB,mBAAmB,CAAC,OAA0B;IAC7D,OAAO,IAAA,kBAAU,EAAC;QACjB,EAAE,EAAE,YAAY;QAChB,WAAW,EACV,4EAA4E;YAC5E,0EAA0E;YAC1E,8BAA8B;QAC/B,WAAW,EAAE,4BAAoB;QACjC,YAAY,EAAE,OAAC,CAAC,MAAM,CAAC;YACtB,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE;YACjB,OAAO,EAAE,OAAC,CAAC,KAAK,CACf,OAAC,CAAC,MAAM,CAAC;gBACR,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE;gBACjB,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE;gBACf,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE;gBACnB,aAAa,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;aACpC,CAAC,CACF;SACD,CAAC;QACF,OAAO,EAAE,KAAK,EAAE,EACf,KAAK,EACL,UAAU,EACV,cAAc,GACwB,EAAE,EAAE;YAC1C,IAAI,CAAC,OAAO,CAAC,kBAAkB,EAAE,MAAM,EAAE,CAAC;gBACzC,OAAO;oBACN,KAAK;oBACL,OAAO,EAAE,EAAE;iBACX,CAAC;YACH,CAAC;YAED,MAAM,MAAM,GAAG,MAAM,OAAO,CAAC,kBAAkB,CAAC,MAAM,CAAC,KAAK,EAAE;gBAC7D,UAAU,EAAE,UAAU,IAAI,SAAS;gBACnC,cAAc,EAAE,cAAc,IAAI,SAAS;aAC3C,CAAC,CAAC;YAEH,KAAK,MAAM,CAAC,IAAI,MAAM,CAAC,OAAO,EAAE,CAAC;gBAChC,CAAC,CAAC,OAAO,GAAG,IAAA,yCAAkB,EAAC,CAAC,CAAC,OAAO,CAAC,CAAC;YAC3C,CAAC;YACD,OAAO,MAAM,CAAC;QACf,CAAC;KACD,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -1,10 +1,16 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
1
2
|
import type { OrchestrationContext } from '../../types';
|
|
2
|
-
export declare
|
|
3
|
+
export declare const applyWorkflowCredentialsInputSchema: z.ZodObject<{
|
|
4
|
+
workItemId: z.ZodString;
|
|
5
|
+
workflowId: z.ZodString;
|
|
6
|
+
credentials: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
7
|
+
}, "strip", z.ZodTypeAny, {
|
|
3
8
|
workItemId: string;
|
|
4
9
|
workflowId: string;
|
|
5
10
|
credentials: Record<string, string>;
|
|
6
11
|
}, {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}
|
|
12
|
+
workItemId: string;
|
|
13
|
+
workflowId: string;
|
|
14
|
+
credentials: Record<string, string>;
|
|
15
|
+
}>;
|
|
16
|
+
export declare function createApplyWorkflowCredentialsTool(context: OrchestrationContext): import("@mastra/core/tools").Tool<InferPublicSchema<T>, InferPublicSchema<T>, InferPublicSchema<T>, InferPublicSchema<T>, import("@mastra/core/tools").ToolExecutionContext<InferPublicSchema<T>, InferPublicSchema<T>, unknown>, "apply-workflow-credentials", unknown>;
|
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.applyWorkflowCredentialsInputSchema = void 0;
|
|
3
4
|
exports.createApplyWorkflowCredentialsTool = createApplyWorkflowCredentialsTool;
|
|
4
5
|
const tools_1 = require("@mastra/core/tools");
|
|
5
6
|
const zod_1 = require("zod");
|
|
7
|
+
exports.applyWorkflowCredentialsInputSchema = zod_1.z.object({
|
|
8
|
+
workItemId: zod_1.z.string().describe('The work item ID from the build (wi_XXXXXXXX)'),
|
|
9
|
+
workflowId: zod_1.z.string().describe('The workflow ID to update'),
|
|
10
|
+
credentials: zod_1.z.record(zod_1.z.string()).describe('Map of credentialType → credentialId to apply'),
|
|
11
|
+
});
|
|
6
12
|
function createApplyWorkflowCredentialsTool(context) {
|
|
7
13
|
return (0, tools_1.createTool)({
|
|
8
14
|
id: 'apply-workflow-credentials',
|
|
9
15
|
description: 'Apply real credentials to a workflow that was built with mocked credentials. ' +
|
|
10
16
|
'Only updates nodes that were mocked — never overwrites existing real credentials.',
|
|
11
|
-
inputSchema:
|
|
12
|
-
workItemId: zod_1.z.string().describe('The work item ID from the build (wi_XXXXXXXX)'),
|
|
13
|
-
workflowId: zod_1.z.string().describe('The workflow ID to update'),
|
|
14
|
-
credentials: zod_1.z.record(zod_1.z.string()).describe('Map of credentialType → credentialId to apply'),
|
|
15
|
-
}),
|
|
17
|
+
inputSchema: exports.applyWorkflowCredentialsInputSchema,
|
|
16
18
|
outputSchema: zod_1.z.object({
|
|
17
19
|
success: zod_1.z.boolean(),
|
|
18
20
|
appliedNodes: zod_1.z.array(zod_1.z.string()).optional(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apply-workflow-credentials.tool.js","sourceRoot":"","sources":["../../../src/tools/workflows/apply-workflow-credentials.tool.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"apply-workflow-credentials.tool.js","sourceRoot":"","sources":["../../../src/tools/workflows/apply-workflow-credentials.tool.ts"],"names":[],"mappings":";;;AAmBA,gFAuFC;AAlGD,8CAAgD;AAChD,6BAAwB;AAIX,QAAA,mCAAmC,GAAG,OAAC,CAAC,MAAM,CAAC;IAC3D,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,+CAA+C,CAAC;IAChF,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,2BAA2B,CAAC;IAC5D,WAAW,EAAE,OAAC,CAAC,MAAM,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,CAAC,+CAA+C,CAAC;CAC3F,CAAC,CAAC;AAEH,SAAgB,kCAAkC,CAAC,OAA6B;IAC/E,OAAO,IAAA,kBAAU,EAAC;QACjB,EAAE,EAAE,4BAA4B;QAChC,WAAW,EACV,+EAA+E;YAC/E,mFAAmF;QACpF,WAAW,EAAE,2CAAmC;QAChD,YAAY,EAAE,OAAC,CAAC,MAAM,CAAC;YACtB,OAAO,EAAE,OAAC,CAAC,OAAO,EAAE;YACpB,YAAY,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;YAC5C,KAA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,eAAe,EAAE,SAAS;gBAC1B,qBAAqB,EAAE,SAAS;aAChC,CAAC,CAAC;YAEH,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,YAAY,EAAE,CAAC;QACxC,CAAC;KACD,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -1,5 +1,21 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
1
2
|
import type { InstanceAiContext } from '../../types';
|
|
2
|
-
export declare
|
|
3
|
+
export declare const buildWorkflowInputSchema: z.ZodObject<{
|
|
4
|
+
code: z.ZodOptional<z.ZodString>;
|
|
5
|
+
patches: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
6
|
+
old_str: z.ZodString;
|
|
7
|
+
new_str: z.ZodString;
|
|
8
|
+
}, "strip", z.ZodTypeAny, {
|
|
9
|
+
old_str: string;
|
|
10
|
+
new_str: string;
|
|
11
|
+
}, {
|
|
12
|
+
old_str: string;
|
|
13
|
+
new_str: string;
|
|
14
|
+
}>, "many">>;
|
|
15
|
+
workflowId: z.ZodOptional<z.ZodString>;
|
|
16
|
+
projectId: z.ZodOptional<z.ZodString>;
|
|
17
|
+
name: z.ZodOptional<z.ZodString>;
|
|
18
|
+
}, "strip", z.ZodTypeAny, {
|
|
3
19
|
code?: string | undefined;
|
|
4
20
|
workflowId?: string | undefined;
|
|
5
21
|
name?: string | undefined;
|
|
@@ -9,8 +25,13 @@ export declare function createBuildWorkflowTool(context: InstanceAiContext): imp
|
|
|
9
25
|
new_str: string;
|
|
10
26
|
}[] | undefined;
|
|
11
27
|
}, {
|
|
12
|
-
|
|
28
|
+
code?: string | undefined;
|
|
13
29
|
workflowId?: string | undefined;
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
30
|
+
name?: string | undefined;
|
|
31
|
+
projectId?: string | undefined;
|
|
32
|
+
patches?: {
|
|
33
|
+
old_str: string;
|
|
34
|
+
new_str: string;
|
|
35
|
+
}[] | undefined;
|
|
36
|
+
}>;
|
|
37
|
+
export declare function createBuildWorkflowTool(context: InstanceAiContext): import("@mastra/core/tools").Tool<InferPublicSchema<T>, InferPublicSchema<T>, InferPublicSchema<T>, InferPublicSchema<T>, import("@mastra/core/tools").ToolExecutionContext<InferPublicSchema<T>, InferPublicSchema<T>, unknown>, "build-workflow", unknown>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.buildWorkflowInputSchema = void 0;
|
|
3
4
|
exports.createBuildWorkflowTool = createBuildWorkflowTool;
|
|
4
5
|
const tools_1 = require("@mastra/core/tools");
|
|
5
6
|
const workflow_sdk_1 = require("@n8n/workflow-sdk");
|
|
@@ -13,6 +14,23 @@ const patchSchema = zod_1.z.object({
|
|
|
13
14
|
old_str: zod_1.z.string().describe('Exact string to find in the code'),
|
|
14
15
|
new_str: zod_1.z.string().describe('Replacement string'),
|
|
15
16
|
});
|
|
17
|
+
exports.buildWorkflowInputSchema = zod_1.z.object({
|
|
18
|
+
code: zod_1.z
|
|
19
|
+
.string()
|
|
20
|
+
.optional()
|
|
21
|
+
.describe('Full TypeScript workflow code using @n8n/workflow-sdk. Required for new workflows.'),
|
|
22
|
+
patches: zod_1.z
|
|
23
|
+
.array(patchSchema)
|
|
24
|
+
.optional()
|
|
25
|
+
.describe('Array of {old_str, new_str} replacements to apply to existing workflow code. ' +
|
|
26
|
+
'Requires workflowId. More efficient than resending full code for small fixes.'),
|
|
27
|
+
workflowId: zod_1.z.string().optional().describe('Existing workflow ID to update (omit to create new)'),
|
|
28
|
+
projectId: zod_1.z
|
|
29
|
+
.string()
|
|
30
|
+
.optional()
|
|
31
|
+
.describe('Project ID to create the workflow in. Defaults to personal project.'),
|
|
32
|
+
name: zod_1.z.string().optional().describe('Workflow name (required for new workflows)'),
|
|
33
|
+
});
|
|
16
34
|
function createBuildWorkflowTool(context) {
|
|
17
35
|
let lastCode = null;
|
|
18
36
|
return (0, tools_1.createTool)({
|
|
@@ -21,26 +39,7 @@ function createBuildWorkflowTool(context) {
|
|
|
21
39
|
'1. Full code: pass `code` to create/update a workflow from scratch.\n' +
|
|
22
40
|
'2. Patch mode: pass `patches` (+ optional `workflowId`) to apply str_replace fixes. ' +
|
|
23
41
|
'Patches apply to last submitted code, or auto-fetch from saved workflow if workflowId given.',
|
|
24
|
-
inputSchema:
|
|
25
|
-
code: zod_1.z
|
|
26
|
-
.string()
|
|
27
|
-
.optional()
|
|
28
|
-
.describe('Full TypeScript workflow code using @n8n/workflow-sdk. Required for new workflows.'),
|
|
29
|
-
patches: zod_1.z
|
|
30
|
-
.array(patchSchema)
|
|
31
|
-
.optional()
|
|
32
|
-
.describe('Array of {old_str, new_str} replacements to apply to existing workflow code. ' +
|
|
33
|
-
'Requires workflowId. More efficient than resending full code for small fixes.'),
|
|
34
|
-
workflowId: zod_1.z
|
|
35
|
-
.string()
|
|
36
|
-
.optional()
|
|
37
|
-
.describe('Existing workflow ID to update (omit to create new)'),
|
|
38
|
-
projectId: zod_1.z
|
|
39
|
-
.string()
|
|
40
|
-
.optional()
|
|
41
|
-
.describe('Project ID to create the workflow in. Defaults to personal project.'),
|
|
42
|
-
name: zod_1.z.string().optional().describe('Workflow name (required for new workflows)'),
|
|
43
|
-
}),
|
|
42
|
+
inputSchema: exports.buildWorkflowInputSchema,
|
|
44
43
|
outputSchema: zod_1.z.object({
|
|
45
44
|
success: zod_1.z.boolean(),
|
|
46
45
|
workflowId: zod_1.z.string().optional(),
|
|
@@ -48,6 +47,10 @@ function createBuildWorkflowTool(context) {
|
|
|
48
47
|
warnings: zod_1.z.array(zod_1.z.string()).optional(),
|
|
49
48
|
}),
|
|
50
49
|
execute: async (input) => {
|
|
50
|
+
const permKey = input.workflowId ? 'updateWorkflow' : 'createWorkflow';
|
|
51
|
+
if (context.permissions?.[permKey] === 'blocked') {
|
|
52
|
+
return { success: false, errors: ['Action blocked by admin'] };
|
|
53
|
+
}
|
|
51
54
|
const { code, patches, workflowId, projectId, name } = input;
|
|
52
55
|
let finalCode;
|
|
53
56
|
if (patches) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build-workflow.tool.js","sourceRoot":"","sources":["../../../src/tools/workflows/build-workflow.tool.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"build-workflow.tool.js","sourceRoot":"","sources":["../../../src/tools/workflows/build-workflow.tool.ts"],"names":[],"mappings":";;;AAoCA,0DA+JC;AAnMD,8CAAgD;AAChD,oDAA6E;AAC7E,6BAAwB;AAExB,+DAA+E;AAC/E,iEAA0D;AAE1D,6DAA6E;AAC7E,sEAA0E;AAC1E,kEAAiE;AAEjE,MAAM,WAAW,GAAG,OAAC,CAAC,MAAM,CAAC;IAC5B,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,kCAAkC,CAAC;IAChE,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,oBAAoB,CAAC;CAClD,CAAC,CAAC;AAEU,QAAA,wBAAwB,GAAG,OAAC,CAAC,MAAM,CAAC;IAChD,IAAI,EAAE,OAAC;SACL,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CAAC,oFAAoF,CAAC;IAChG,OAAO,EAAE,OAAC;SACR,KAAK,CAAC,WAAW,CAAC;SAClB,QAAQ,EAAE;SACV,QAAQ,CACR,+EAA+E;QAC9E,+EAA+E,CAChF;IACF,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,qDAAqD,CAAC;IACjG,SAAS,EAAE,OAAC;SACV,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CAAC,qEAAqE,CAAC;IACjF,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,4CAA4C,CAAC;CAClF,CAAC,CAAC;AAEH,SAAgB,uBAAuB,CAAC,OAA0B;IAGjE,IAAI,QAAQ,GAA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