n8n 2.23.2 → 2.24.0
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/active-workflow-manager.d.ts +8 -4
- package/dist/active-workflow-manager.js +26 -9
- package/dist/active-workflow-manager.js.map +1 -1
- package/dist/auth/auth.service.d.ts +1 -1
- package/dist/auth/auth.service.js +2 -1
- package/dist/auth/auth.service.js.map +1 -1
- package/dist/build.tsbuildinfo +1 -1
- package/dist/controllers/ai.controller.js +1 -1
- package/dist/controllers/ai.controller.js.map +1 -1
- package/dist/controllers/api-keys.controller.d.ts +20 -15
- package/dist/controllers/api-keys.controller.js +7 -4
- package/dist/controllers/api-keys.controller.js.map +1 -1
- package/dist/controllers/oauth/oauth1-credential.controller.d.ts +4 -2
- package/dist/controllers/oauth/oauth1-credential.controller.js +15 -5
- package/dist/controllers/oauth/oauth1-credential.controller.js.map +1 -1
- package/dist/controllers/oauth/oauth2-credential.controller.d.ts +4 -2
- package/dist/controllers/oauth/oauth2-credential.controller.js +15 -6
- package/dist/controllers/oauth/oauth2-credential.controller.js.map +1 -1
- package/dist/controllers/project.controller.d.ts +8 -0
- package/dist/controllers/project.controller.js +2 -1
- package/dist/controllers/project.controller.js.map +1 -1
- package/dist/controllers/security-settings.controller.js +18 -1
- package/dist/controllers/security-settings.controller.js.map +1 -1
- package/dist/controllers/telemetry.controller.js +4 -1
- package/dist/controllers/telemetry.controller.js.map +1 -1
- package/dist/credentials/credential-connection-status-provider.interface.d.ts +3 -0
- package/dist/credentials/credential-connection-status-proxy.d.ts +3 -0
- package/dist/credentials/credential-connection-status-proxy.js +10 -0
- package/dist/credentials/credential-connection-status-proxy.js.map +1 -1
- package/dist/credentials/credentials.controller.d.ts +6 -0
- package/dist/credentials/credentials.controller.js +39 -2
- package/dist/credentials/credentials.controller.js.map +1 -1
- package/dist/credentials/credentials.service.d.ts +29 -13
- package/dist/credentials/credentials.service.ee.d.ts +2 -0
- package/dist/credentials/credentials.service.ee.js +3 -0
- package/dist/credentials/credentials.service.ee.js.map +1 -1
- package/dist/credentials/credentials.service.js +27 -6
- package/dist/credentials/credentials.service.js.map +1 -1
- package/dist/credentials-helper.d.ts +1 -0
- package/dist/credentials-helper.js +14 -4
- package/dist/credentials-helper.js.map +1 -1
- package/dist/errors/credential-missing-id.error.d.ts +4 -0
- package/dist/errors/credential-missing-id.error.js +14 -0
- package/dist/errors/credential-missing-id.error.js.map +1 -0
- package/dist/eventbus/event-message-classes/index.d.ts +2 -2
- package/dist/eventbus/event-message-classes/index.js +3 -0
- package/dist/eventbus/event-message-classes/index.js.map +1 -1
- package/dist/events/maps/relay.event-map.d.ts +54 -2
- package/dist/events/relays/log-streaming.event-relay.d.ts +3 -0
- package/dist/events/relays/log-streaming.event-relay.js +39 -1
- package/dist/events/relays/log-streaming.event-relay.js.map +1 -1
- package/dist/events/relays/telemetry.event-relay.d.ts +6 -0
- package/dist/events/relays/telemetry.event-relay.js +74 -3
- package/dist/events/relays/telemetry.event-relay.js.map +1 -1
- package/dist/execution-lifecycle/execution-lifecycle-hooks.js +6 -5
- package/dist/execution-lifecycle/execution-lifecycle-hooks.js.map +1 -1
- package/dist/executions/execution-persistence.js +4 -0
- package/dist/executions/execution-persistence.js.map +1 -1
- package/dist/expression-observability/expression-observability.provider.d.ts +3 -1
- package/dist/expression-observability/expression-observability.provider.js +48 -46
- package/dist/expression-observability/expression-observability.provider.js.map +1 -1
- package/dist/interfaces.d.ts +3 -1
- package/dist/modules/agents/agent-execution.service.d.ts +4 -2
- package/dist/modules/agents/agent-execution.service.js +3 -3
- package/dist/modules/agents/agent-execution.service.js.map +1 -1
- package/dist/modules/agents/agent-knowledge-command.service.d.ts +40 -0
- package/dist/modules/agents/agent-knowledge-command.service.js +221 -0
- package/dist/modules/agents/agent-knowledge-command.service.js.map +1 -0
- package/dist/modules/agents/agent-knowledge.service.d.ts +42 -0
- package/dist/modules/agents/agent-knowledge.service.js +300 -0
- package/dist/modules/agents/agent-knowledge.service.js.map +1 -0
- package/dist/modules/agents/agent-task.service.d.ts +52 -0
- package/dist/modules/agents/agent-task.service.js +487 -0
- package/dist/modules/agents/agent-task.service.js.map +1 -0
- package/dist/modules/agents/agent-upload.middleware.d.ts +7 -0
- package/dist/modules/agents/agent-upload.middleware.js +62 -0
- package/dist/modules/agents/agent-upload.middleware.js.map +1 -0
- package/dist/modules/agents/agents-tools.service.d.ts +1 -1
- package/dist/modules/agents/agents-tools.service.js +12 -3
- package/dist/modules/agents/agents-tools.service.js.map +1 -1
- package/dist/modules/agents/agents.controller.d.ts +138 -45
- package/dist/modules/agents/agents.controller.js +176 -48
- package/dist/modules/agents/agents.controller.js.map +1 -1
- package/dist/modules/agents/agents.module.d.ts +2 -2
- package/dist/modules/agents/agents.module.js +13 -5
- package/dist/modules/agents/agents.module.js.map +1 -1
- package/dist/modules/agents/agents.service.d.ts +43 -7
- package/dist/modules/agents/agents.service.js +341 -57
- package/dist/modules/agents/agents.service.js.map +1 -1
- package/dist/modules/agents/builder/agents-builder-prompts.d.ts +6 -5
- package/dist/modules/agents/builder/agents-builder-prompts.js +92 -18
- package/dist/modules/agents/builder/agents-builder-prompts.js.map +1 -1
- package/dist/modules/agents/builder/agents-builder-tools.service.d.ts +11 -1
- package/dist/modules/agents/builder/agents-builder-tools.service.js +164 -26
- package/dist/modules/agents/builder/agents-builder-tools.service.js.map +1 -1
- package/dist/modules/agents/builder/agents-builder.service.d.ts +3 -1
- package/dist/modules/agents/builder/agents-builder.service.js +8 -3
- package/dist/modules/agents/builder/agents-builder.service.js.map +1 -1
- package/dist/modules/agents/builder/builder-tool-names.d.ts +3 -0
- package/dist/modules/agents/builder/builder-tool-names.js +3 -0
- package/dist/modules/agents/builder/builder-tool-names.js.map +1 -1
- package/dist/modules/agents/builder/interactive/ask-credential.tool.d.ts +1 -0
- package/dist/modules/agents/builder/interactive/ask-credential.tool.js +25 -4
- package/dist/modules/agents/builder/interactive/ask-credential.tool.js.map +1 -1
- package/dist/modules/agents/builder/interactive/ask-question.tool.js +6 -5
- package/dist/modules/agents/builder/interactive/ask-question.tool.js.map +1 -1
- package/dist/modules/agents/builder/prompts/config-mutation.prompt.js +20 -5
- package/dist/modules/agents/builder/prompts/config-mutation.prompt.js.map +1 -1
- package/dist/modules/agents/builder/prompts/config-rules.prompt.js +23 -4
- package/dist/modules/agents/builder/prompts/config-rules.prompt.js.map +1 -1
- package/dist/modules/agents/builder/prompts/llm-selection.prompt.js +18 -1
- package/dist/modules/agents/builder/prompts/llm-selection.prompt.js.map +1 -1
- package/dist/modules/agents/builder/prompts/memory.prompt.d.ts +1 -1
- package/dist/modules/agents/builder/prompts/memory.prompt.js +5 -3
- package/dist/modules/agents/builder/prompts/memory.prompt.js.map +1 -1
- package/dist/modules/agents/builder/prompts/tools.prompt.d.ts +1 -1
- package/dist/modules/agents/builder/prompts/tools.prompt.js +11 -2
- package/dist/modules/agents/builder/prompts/tools.prompt.js.map +1 -1
- package/dist/modules/agents/builder/search-mcp-servers.tool.d.ts +6 -0
- package/dist/modules/agents/builder/search-mcp-servers.tool.js +85 -0
- package/dist/modules/agents/builder/search-mcp-servers.tool.js.map +1 -0
- package/dist/modules/agents/builder/skill-body-template.d.ts +4 -0
- package/dist/modules/agents/builder/skill-body-template.js +31 -0
- package/dist/modules/agents/builder/skill-body-template.js.map +1 -0
- package/dist/modules/agents/builder/skills/index.js +6 -1
- package/dist/modules/agents/builder/skills/index.js.map +1 -1
- package/dist/modules/agents/builder/skills/integrations.skill.js +39 -18
- package/dist/modules/agents/builder/skills/integrations.skill.js.map +1 -1
- package/dist/modules/agents/builder/skills/mcp.skill.d.ts +2 -0
- package/dist/modules/agents/builder/skills/mcp.skill.js +110 -0
- package/dist/modules/agents/builder/skills/mcp.skill.js.map +1 -0
- package/dist/modules/agents/builder/skills/research.skill.js +8 -5
- package/dist/modules/agents/builder/skills/research.skill.js.map +1 -1
- package/dist/modules/agents/builder/skills/target-skills.skill.js +41 -13
- package/dist/modules/agents/builder/skills/target-skills.skill.js.map +1 -1
- package/dist/modules/agents/builder/skills/target-tasks.skill.d.ts +2 -0
- package/dist/modules/agents/builder/skills/target-tasks.skill.js +82 -0
- package/dist/modules/agents/builder/skills/target-tasks.skill.js.map +1 -0
- package/dist/modules/agents/builder/task-objective-template.d.ts +3 -0
- package/dist/modules/agents/builder/task-objective-template.js +27 -0
- package/dist/modules/agents/builder/task-objective-template.js.map +1 -0
- package/dist/modules/agents/builder/verify-mcp-server.tool.d.ts +8 -0
- package/dist/modules/agents/builder/verify-mcp-server.tool.js +79 -0
- package/dist/modules/agents/builder/verify-mcp-server.tool.js.map +1 -0
- package/dist/modules/agents/entities/agent-execution-thread.entity.d.ts +4 -0
- package/dist/modules/agents/entities/agent-execution-thread.entity.js +26 -0
- package/dist/modules/agents/entities/agent-execution-thread.entity.js.map +1 -1
- package/dist/modules/agents/entities/agent-file.entity.d.ts +11 -0
- package/dist/modules/agents/entities/agent-file.entity.js +48 -0
- package/dist/modules/agents/entities/agent-file.entity.js.map +1 -0
- package/dist/modules/agents/entities/agent-task-run-lock.entity.d.ts +10 -0
- package/dist/modules/agents/entities/agent-task-run-lock.entity.js +54 -0
- package/dist/modules/agents/entities/agent-task-run-lock.entity.js.map +1 -0
- package/dist/modules/agents/entities/agent-task-snapshot.entity.d.ts +12 -0
- package/dist/modules/agents/entities/agent-task-snapshot.entity.js +70 -0
- package/dist/modules/agents/entities/agent-task-snapshot.entity.js.map +1 -0
- package/dist/modules/agents/entities/agent-task.entity.d.ts +11 -0
- package/dist/modules/agents/entities/agent-task.entity.js +64 -0
- package/dist/modules/agents/entities/agent-task.entity.js.map +1 -0
- package/dist/modules/agents/execution-recorder.d.ts +1 -0
- package/dist/modules/agents/execution-recorder.js +9 -5
- package/dist/modules/agents/execution-recorder.js.map +1 -1
- package/dist/modules/agents/integrations/agent-chat-bridge.d.ts +16 -4
- package/dist/modules/agents/integrations/agent-chat-bridge.js +372 -116
- package/dist/modules/agents/integrations/agent-chat-bridge.js.map +1 -1
- package/dist/modules/agents/integrations/agent-chat-integration.d.ts +27 -2
- package/dist/modules/agents/integrations/agent-chat-integration.js +5 -0
- package/dist/modules/agents/integrations/agent-chat-integration.js.map +1 -1
- package/dist/modules/agents/integrations/chat-integration.service.d.ts +15 -6
- package/dist/modules/agents/integrations/chat-integration.service.js +9 -10
- package/dist/modules/agents/integrations/chat-integration.service.js.map +1 -1
- package/dist/modules/agents/integrations/component-mapper.d.ts +14 -0
- package/dist/modules/agents/integrations/component-mapper.js +9 -1
- package/dist/modules/agents/integrations/component-mapper.js.map +1 -1
- package/dist/modules/agents/integrations/integration-action-executor.d.ts +22 -0
- package/dist/modules/agents/integrations/integration-action-executor.js +171 -0
- package/dist/modules/agents/integrations/integration-action-executor.js.map +1 -0
- package/dist/modules/agents/integrations/integration-context-query-executor.d.ts +18 -0
- package/dist/modules/agents/integrations/integration-context-query-executor.js +58 -0
- package/dist/modules/agents/integrations/integration-context-query-executor.js.map +1 -0
- package/dist/modules/agents/integrations/integration-error-codes.d.ts +13 -0
- package/dist/modules/agents/integrations/integration-error-codes.js +16 -0
- package/dist/modules/agents/integrations/integration-error-codes.js.map +1 -0
- package/dist/modules/agents/integrations/integration-helpers.d.ts +21 -0
- package/dist/modules/agents/integrations/integration-helpers.js +72 -0
- package/dist/modules/agents/integrations/integration-helpers.js.map +1 -0
- package/dist/modules/agents/integrations/integration-message-context.service.d.ts +13 -0
- package/dist/modules/agents/integrations/integration-message-context.service.js +129 -0
- package/dist/modules/agents/integrations/integration-message-context.service.js.map +1 -0
- package/dist/modules/agents/integrations/integration-tools.d.ts +205 -0
- package/dist/modules/agents/integrations/integration-tools.js +955 -0
- package/dist/modules/agents/integrations/integration-tools.js.map +1 -0
- package/dist/modules/agents/integrations/integrations-sync.d.ts +1 -1
- package/dist/modules/agents/integrations/integrations-sync.js +1 -29
- package/dist/modules/agents/integrations/integrations-sync.js.map +1 -1
- package/dist/modules/agents/integrations/n8n-memory.d.ts +2 -0
- package/dist/modules/agents/integrations/n8n-memory.js +18 -11
- package/dist/modules/agents/integrations/n8n-memory.js.map +1 -1
- package/dist/modules/agents/integrations/platforms/linear-integration.d.ts +13 -2
- package/dist/modules/agents/integrations/platforms/linear-integration.js +70 -15
- package/dist/modules/agents/integrations/platforms/linear-integration.js.map +1 -1
- package/dist/modules/agents/integrations/platforms/linear-operations.d.ts +18 -0
- package/dist/modules/agents/integrations/platforms/linear-operations.js +679 -0
- package/dist/modules/agents/integrations/platforms/linear-operations.js.map +1 -0
- package/dist/modules/agents/integrations/platforms/slack-integration.d.ts +11 -1
- package/dist/modules/agents/integrations/platforms/slack-integration.js +53 -1
- package/dist/modules/agents/integrations/platforms/slack-integration.js.map +1 -1
- package/dist/modules/agents/integrations/platforms/slack-operations.d.ts +17 -0
- package/dist/modules/agents/integrations/platforms/slack-operations.js +288 -0
- package/dist/modules/agents/integrations/platforms/slack-operations.js.map +1 -0
- package/dist/modules/agents/integrations/platforms/telegram-integration.d.ts +9 -2
- package/dist/modules/agents/integrations/platforms/telegram-integration.js +17 -0
- package/dist/modules/agents/integrations/platforms/telegram-integration.js.map +1 -1
- package/dist/modules/agents/integrations/slack-app-setup.service.js +7 -1
- package/dist/modules/agents/integrations/slack-app-setup.service.js.map +1 -1
- package/dist/modules/agents/json-config/from-json-config.d.ts +4 -2
- package/dist/modules/agents/json-config/from-json-config.js +88 -11
- package/dist/modules/agents/json-config/from-json-config.js.map +1 -1
- package/dist/modules/agents/json-config/mcp-client-factory.d.ts +16 -0
- package/dist/modules/agents/json-config/mcp-client-factory.js +155 -0
- package/dist/modules/agents/json-config/mcp-client-factory.js.map +1 -0
- package/dist/modules/agents/json-config/native-web-search-provider-tools.d.ts +8 -0
- package/dist/modules/agents/json-config/native-web-search-provider-tools.js +59 -0
- package/dist/modules/agents/json-config/native-web-search-provider-tools.js.map +1 -0
- package/dist/modules/agents/json-config/schema-text-serializer.js +12 -2
- package/dist/modules/agents/json-config/schema-text-serializer.js.map +1 -1
- package/dist/modules/agents/repositories/agent-execution-thread.repository.d.ts +1 -1
- package/dist/modules/agents/repositories/agent-execution-thread.repository.js +5 -3
- package/dist/modules/agents/repositories/agent-execution-thread.repository.js.map +1 -1
- package/dist/modules/agents/repositories/agent-file.repository.d.ts +7 -0
- package/dist/modules/agents/repositories/agent-file.repository.js +35 -0
- package/dist/modules/agents/repositories/agent-file.repository.js.map +1 -0
- package/dist/modules/agents/repositories/agent-history.repository.d.ts +2 -0
- package/dist/modules/agents/repositories/agent-history.repository.js +18 -0
- package/dist/modules/agents/repositories/agent-history.repository.js.map +1 -1
- package/dist/modules/agents/repositories/agent-task-run-lock.repository.d.ts +12 -0
- package/dist/modules/agents/repositories/agent-task-run-lock.repository.js +72 -0
- package/dist/modules/agents/repositories/agent-task-run-lock.repository.js.map +1 -0
- package/dist/modules/agents/repositories/agent-task-snapshot.repository.d.ts +11 -0
- package/dist/modules/agents/repositories/agent-task-snapshot.repository.js +45 -0
- package/dist/modules/agents/repositories/agent-task-snapshot.repository.js.map +1 -0
- package/dist/modules/agents/repositories/agent-task.repository.d.ts +7 -0
- package/dist/modules/agents/repositories/agent-task.repository.js +32 -0
- package/dist/modules/agents/repositories/agent-task.repository.js.map +1 -0
- package/dist/modules/agents/repositories/agent.repository.js +1 -2
- package/dist/modules/agents/repositories/agent.repository.js.map +1 -1
- package/dist/modules/agents/tools/knowledge/csv-helpers.d.ts +73 -0
- package/dist/modules/agents/tools/knowledge/csv-helpers.js +341 -0
- package/dist/modules/agents/tools/knowledge/csv-helpers.js.map +1 -0
- package/dist/modules/agents/tools/knowledge/csv.operation.d.ts +61 -0
- package/dist/modules/agents/tools/knowledge/csv.operation.js +207 -0
- package/dist/modules/agents/tools/knowledge/csv.operation.js.map +1 -0
- package/dist/modules/agents/tools/knowledge/file-references.d.ts +16 -0
- package/dist/modules/agents/tools/knowledge/file-references.js +35 -0
- package/dist/modules/agents/tools/knowledge/file-references.js.map +1 -0
- package/dist/modules/agents/tools/knowledge/read.operation.d.ts +8 -0
- package/dist/modules/agents/tools/knowledge/read.operation.js +38 -0
- package/dist/modules/agents/tools/knowledge/read.operation.js.map +1 -0
- package/dist/modules/agents/tools/knowledge/schemas.d.ts +1505 -0
- package/dist/modules/agents/tools/knowledge/schemas.js +441 -0
- package/dist/modules/agents/tools/knowledge/schemas.js.map +1 -0
- package/dist/modules/agents/tools/knowledge/search.operation.d.ts +9 -0
- package/dist/modules/agents/tools/knowledge/search.operation.js +332 -0
- package/dist/modules/agents/tools/knowledge/search.operation.js.map +1 -0
- package/dist/modules/agents/tools/knowledge/tool.d.ts +8 -0
- package/dist/modules/agents/tools/knowledge/tool.js +121 -0
- package/dist/modules/agents/tools/knowledge/tool.js.map +1 -0
- package/dist/modules/agents/utils/agent-memory-scope.d.ts +1 -1
- package/dist/modules/agents/utils/agent-memory-scope.js +4 -4
- package/dist/modules/agents/utils/agent-memory-scope.js.map +1 -1
- package/dist/modules/agents/utils/agent-resource-id.d.ts +1 -1
- package/dist/modules/chat-hub/chat-hub.module.d.ts +2 -2
- package/dist/modules/chat-hub/chat-hub.settings.controller.d.ts +4 -4
- package/dist/modules/chat-hub/chat-hub.types.d.ts +5 -5
- package/dist/modules/chat-hub/dto/chat-models-request.dto.d.ts +1 -1
- package/dist/modules/dynamic-credentials.ee/constants.d.ts +1 -1
- package/dist/modules/dynamic-credentials.ee/constants.js +2 -1
- package/dist/modules/dynamic-credentials.ee/constants.js.map +1 -1
- package/dist/modules/dynamic-credentials.ee/dynamic-credentials.controller.d.ts +9 -2
- package/dist/modules/dynamic-credentials.ee/dynamic-credentials.controller.js +45 -14
- package/dist/modules/dynamic-credentials.ee/dynamic-credentials.controller.js.map +1 -1
- package/dist/modules/dynamic-credentials.ee/services/credential-connection-status.service.d.ts +4 -0
- package/dist/modules/dynamic-credentials.ee/services/credential-connection-status.service.js +16 -0
- package/dist/modules/dynamic-credentials.ee/services/credential-connection-status.service.js.map +1 -1
- package/dist/modules/dynamic-credentials.ee/services/dynamic-credential.service.js +6 -2
- package/dist/modules/dynamic-credentials.ee/services/dynamic-credential.service.js.map +1 -1
- package/dist/modules/instance-ai/eval/eval-mocked-credentials-helper.d.ts +1 -0
- package/dist/modules/instance-ai/eval/eval-mocked-credentials-helper.js +21 -2
- package/dist/modules/instance-ai/eval/eval-mocked-credentials-helper.js.map +1 -1
- package/dist/modules/instance-ai/eval/execution.service.d.ts +4 -1
- package/dist/modules/instance-ai/eval/execution.service.js +118 -24
- package/dist/modules/instance-ai/eval/execution.service.js.map +1 -1
- package/dist/modules/instance-ai/eval/llm-wire-server.d.ts +8 -3
- package/dist/modules/instance-ai/eval/llm-wire-server.js +147 -50
- package/dist/modules/instance-ai/eval/llm-wire-server.js.map +1 -1
- package/dist/modules/instance-ai/eval/mock-handler.js +45 -8
- package/dist/modules/instance-ai/eval/mock-handler.js.map +1 -1
- package/dist/modules/instance-ai/eval/mock-quirks.d.ts +4 -2
- package/dist/modules/instance-ai/eval/mock-quirks.js +83 -4
- package/dist/modules/instance-ai/eval/mock-quirks.js.map +1 -1
- package/dist/modules/instance-ai/eval/openai-envelope.d.ts +8 -0
- package/dist/modules/instance-ai/eval/openai-envelope.js +121 -8
- package/dist/modules/instance-ai/eval/openai-envelope.js.map +1 -1
- package/dist/modules/instance-ai/eval/openai-responses-envelope.d.ts +11 -0
- package/dist/modules/instance-ai/eval/openai-responses-envelope.js +238 -0
- package/dist/modules/instance-ai/eval/openai-responses-envelope.js.map +1 -0
- package/dist/modules/instance-ai/eval/request-binary-redactor.d.ts +1 -0
- package/dist/modules/instance-ai/eval/request-binary-redactor.js +74 -0
- package/dist/modules/instance-ai/eval/request-binary-redactor.js.map +1 -0
- package/dist/modules/instance-ai/eval/workflow-analysis.d.ts +19 -1
- package/dist/modules/instance-ai/eval/workflow-analysis.js +159 -76
- package/dist/modules/instance-ai/eval/workflow-analysis.js.map +1 -1
- package/dist/modules/instance-ai/extract-resolved-node-parameters.d.ts +7 -0
- package/dist/modules/instance-ai/extract-resolved-node-parameters.js +221 -0
- package/dist/modules/instance-ai/extract-resolved-node-parameters.js.map +1 -0
- package/dist/modules/instance-ai/instance-ai-memory.service.d.ts +7 -1
- package/dist/modules/instance-ai/instance-ai-memory.service.js +80 -3
- package/dist/modules/instance-ai/instance-ai-memory.service.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai-settings.service.js +1 -16
- package/dist/modules/instance-ai/instance-ai-settings.service.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai.adapter.service.d.ts +1 -1
- package/dist/modules/instance-ai/instance-ai.adapter.service.js +67 -7
- package/dist/modules/instance-ai/instance-ai.adapter.service.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai.module.d.ts +1 -1
- package/dist/modules/instance-ai/instance-ai.service.d.ts +24 -1
- package/dist/modules/instance-ai/instance-ai.service.js +400 -26
- package/dist/modules/instance-ai/instance-ai.service.js.map +1 -1
- package/dist/modules/instance-ai/liveness/instance-ai-liveness.service.d.ts +1 -0
- package/dist/modules/instance-ai/liveness/instance-ai-liveness.service.js +1 -0
- package/dist/modules/instance-ai/liveness/instance-ai-liveness.service.js.map +1 -1
- package/dist/modules/instance-ai/message-parser.d.ts +2 -0
- package/dist/modules/instance-ai/message-parser.js +165 -36
- package/dist/modules/instance-ai/message-parser.js.map +1 -1
- package/dist/modules/instance-ai/repositories/instance-ai-checkpoint.repository.d.ts +2 -0
- package/dist/modules/instance-ai/repositories/instance-ai-checkpoint.repository.js +13 -0
- package/dist/modules/instance-ai/repositories/instance-ai-checkpoint.repository.js.map +1 -1
- package/dist/modules/instance-ai/repositories/instance-ai-pending-confirmation.repository.d.ts +12 -0
- package/dist/modules/instance-ai/repositories/instance-ai-pending-confirmation.repository.js +80 -0
- package/dist/modules/instance-ai/repositories/instance-ai-pending-confirmation.repository.js.map +1 -0
- package/dist/modules/instance-ai/storage/db-snapshot-storage.d.ts +1 -0
- package/dist/modules/instance-ai/storage/db-snapshot-storage.js +23 -0
- package/dist/modules/instance-ai/storage/db-snapshot-storage.js.map +1 -1
- package/dist/modules/instance-ai/storage/typeorm-agent-checkpoint-store.d.ts +10 -4
- package/dist/modules/instance-ai/storage/typeorm-agent-checkpoint-store.js +49 -37
- package/dist/modules/instance-ai/storage/typeorm-agent-checkpoint-store.js.map +1 -1
- package/dist/modules/instance-ai/web-research/index.d.ts +0 -2
- package/dist/modules/instance-ai/web-research/index.js +1 -5
- package/dist/modules/instance-ai/web-research/index.js.map +1 -1
- package/dist/modules/ldap.ee/helpers.ee.js +6 -2
- package/dist/modules/ldap.ee/helpers.ee.js.map +1 -1
- package/dist/modules/mcp/mcp.controller.js +13 -6
- package/dist/modules/mcp/mcp.controller.js.map +1 -1
- package/dist/modules/mcp/mcp.service.d.ts +10 -2
- package/dist/modules/mcp/mcp.service.js +36 -6
- package/dist/modules/mcp/mcp.service.js.map +1 -1
- package/dist/modules/mcp/mcp.settings.controller.d.ts +2 -0
- package/dist/modules/mcp/mcp.settings.service.d.ts +2 -0
- package/dist/modules/mcp/mcp.settings.service.js +6 -5
- package/dist/modules/mcp/mcp.settings.service.js.map +1 -1
- package/dist/modules/mcp/mcp.types.d.ts +6 -0
- package/dist/modules/mcp/mcp.types.js +9 -0
- package/dist/modules/mcp/mcp.types.js.map +1 -1
- package/dist/modules/mcp/tools/execute-workflow.tool.d.ts +6 -6
- package/dist/modules/mcp/tools/search-workflows.tool.d.ts +2 -1
- package/dist/modules/mcp/tools/search-workflows.tool.js +12 -4
- package/dist/modules/mcp/tools/search-workflows.tool.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-builder/mcp-instructions.js +1 -1
- package/dist/modules/mcp/tools/workflow-builder/update-workflow.tool.d.ts +67 -6
- package/dist/modules/mcp/tools/workflow-builder/workflow-operations.d.ts +67 -6
- package/dist/modules/mcp/tools/workflow-builder/workflow-operations.js +51 -0
- package/dist/modules/mcp/tools/workflow-builder/workflow-operations.js.map +1 -1
- package/dist/modules/mcp-registry/registry/mcp-registry.types.js.map +1 -1
- package/dist/modules/mcp-registry/synthesize-type-def.d.ts +2 -0
- package/dist/modules/mcp-registry/synthesize-type-def.js +35 -0
- package/dist/modules/mcp-registry/synthesize-type-def.js.map +1 -0
- package/dist/modules/n8n-packages/engine/import-pipeline.d.ts +24 -0
- package/dist/modules/n8n-packages/engine/import-pipeline.js +206 -0
- package/dist/modules/n8n-packages/engine/import-pipeline.js.map +1 -0
- package/dist/modules/n8n-packages/entities/credential/credential-requirements.extractor.d.ts +6 -0
- package/dist/modules/n8n-packages/entities/credential/credential-requirements.extractor.js +33 -0
- package/dist/modules/n8n-packages/entities/credential/credential-requirements.extractor.js.map +1 -0
- package/dist/modules/n8n-packages/entities/credential/credential.exporter.d.ts +23 -0
- package/dist/modules/n8n-packages/entities/credential/credential.exporter.js +68 -0
- package/dist/modules/n8n-packages/entities/credential/credential.exporter.js.map +1 -0
- package/dist/modules/n8n-packages/entities/credential/credential.serializer.d.ts +5 -0
- package/dist/modules/n8n-packages/entities/credential/credential.serializer.js +25 -0
- package/dist/modules/n8n-packages/entities/credential/credential.serializer.js.map +1 -0
- package/dist/modules/n8n-packages/entities/credential/credential.types.d.ts +6 -0
- package/dist/modules/n8n-packages/entities/credential/credential.types.js +3 -0
- package/dist/modules/n8n-packages/entities/credential/credential.types.js.map +1 -0
- package/dist/modules/n8n-packages/entities/requirements-extractor.d.ts +4 -0
- package/dist/modules/n8n-packages/entities/requirements-extractor.js +3 -0
- package/dist/modules/n8n-packages/entities/requirements-extractor.js.map +1 -0
- package/dist/modules/n8n-packages/entities/workflow/workflow.exporter.d.ts +12 -3
- package/dist/modules/n8n-packages/entities/workflow/workflow.exporter.js +11 -20
- package/dist/modules/n8n-packages/entities/workflow/workflow.exporter.js.map +1 -1
- package/dist/modules/n8n-packages/entities/workflow/workflow.serializer.d.ts +3 -0
- package/dist/modules/n8n-packages/entities/workflow/workflow.serializer.js +10 -0
- package/dist/modules/n8n-packages/entities/workflow/workflow.serializer.js.map +1 -1
- package/dist/modules/n8n-packages/io/package-reader.d.ts +6 -0
- package/dist/modules/n8n-packages/io/package-reader.js +3 -0
- package/dist/modules/n8n-packages/io/package-reader.js.map +1 -0
- package/dist/modules/n8n-packages/io/slug.utils.d.ts +1 -1
- package/dist/modules/n8n-packages/io/slug.utils.js +3 -3
- package/dist/modules/n8n-packages/io/slug.utils.js.map +1 -1
- package/dist/modules/n8n-packages/io/tar/tar-package-reader.d.ts +13 -0
- package/dist/modules/n8n-packages/io/tar/tar-package-reader.js +84 -0
- package/dist/modules/n8n-packages/io/tar/tar-package-reader.js.map +1 -0
- package/dist/modules/n8n-packages/io/unique-filename-allocator.d.ts +7 -0
- package/dist/modules/n8n-packages/io/unique-filename-allocator.js +27 -0
- package/dist/modules/n8n-packages/io/unique-filename-allocator.js.map +1 -0
- package/dist/modules/n8n-packages/n8n-packages.service.d.ts +7 -2
- package/dist/modules/n8n-packages/n8n-packages.service.js +21 -3
- package/dist/modules/n8n-packages/n8n-packages.service.js.map +1 -1
- package/dist/modules/n8n-packages/n8n-packages.types.d.ts +22 -0
- package/dist/modules/n8n-packages/spec/manifest.schema.d.ts +121 -4
- package/dist/modules/n8n-packages/spec/manifest.schema.js +22 -3
- package/dist/modules/n8n-packages/spec/manifest.schema.js.map +1 -1
- package/dist/modules/n8n-packages/spec/requirements.schema.d.ts +51 -0
- package/dist/modules/n8n-packages/spec/requirements.schema.js +14 -0
- package/dist/modules/n8n-packages/spec/requirements.schema.js.map +1 -0
- package/dist/modules/n8n-packages/spec/serialized/credential.schema.d.ts +15 -0
- package/dist/modules/n8n-packages/spec/serialized/credential.schema.js +12 -0
- package/dist/modules/n8n-packages/spec/serialized/credential.schema.js.map +1 -0
- package/dist/modules/n8n-packages/spec/serialized/workflow.schema.d.ts +4 -4
- package/dist/modules/n8n-packages/utils/import-package-upload.d.ts +13 -0
- package/dist/modules/n8n-packages/utils/import-package-upload.js +59 -0
- package/dist/modules/n8n-packages/utils/import-package-upload.js.map +1 -0
- package/dist/modules/otel/execution-level-tracer.js +15 -6
- package/dist/modules/otel/execution-level-tracer.js.map +1 -1
- package/dist/modules/otel/execution-level-tracer.types.d.ts +3 -0
- package/dist/modules/otel/execution-level-tracer.types.js.map +1 -1
- package/dist/modules/otel/otel-lifecycle-handler.d.ts +4 -2
- package/dist/modules/otel/otel-lifecycle-handler.js +69 -4
- package/dist/modules/otel/otel-lifecycle-handler.js.map +1 -1
- package/dist/modules/otel/otel.config.d.ts +1 -0
- package/dist/modules/otel/otel.config.js +5 -0
- package/dist/modules/otel/otel.config.js.map +1 -1
- package/dist/modules/otel/otel.constants.d.ts +2 -0
- package/dist/modules/otel/otel.constants.js +2 -0
- package/dist/modules/otel/otel.constants.js.map +1 -1
- package/dist/modules/redaction/instance-redaction-enforcement.service.d.ts +4 -0
- package/dist/modules/redaction/instance-redaction-enforcement.service.js +8 -0
- package/dist/modules/redaction/instance-redaction-enforcement.service.js.map +1 -1
- package/dist/modules/redaction/redaction-context-hook.d.ts +9 -0
- package/dist/modules/redaction/redaction-context-hook.js +57 -0
- package/dist/modules/redaction/redaction-context-hook.js.map +1 -0
- package/dist/modules/redaction/redaction.module.js +1 -0
- package/dist/modules/redaction/redaction.module.js.map +1 -1
- package/dist/modules/source-control.ee/constants.d.ts +1 -0
- package/dist/modules/source-control.ee/constants.js +2 -1
- package/dist/modules/source-control.ee/constants.js.map +1 -1
- package/dist/modules/source-control.ee/source-control-status.service.ee.js +5 -0
- package/dist/modules/source-control.ee/source-control-status.service.ee.js.map +1 -1
- package/dist/modules/source-control.ee/source-control.controller.ee.d.ts +4 -2
- package/dist/modules/source-control.ee/source-control.controller.ee.js +32 -5
- package/dist/modules/source-control.ee/source-control.controller.ee.js.map +1 -1
- package/dist/modules/source-control.ee/source-control.service.ee.js +2 -0
- package/dist/modules/source-control.ee/source-control.service.ee.js.map +1 -1
- package/dist/modules/workflow-builder/workflow-builder-session.repository.js +2 -1
- package/dist/modules/workflow-builder/workflow-builder-session.repository.js.map +1 -1
- package/dist/node-catalog/node-catalog.service.d.ts +2 -0
- package/dist/node-catalog/node-catalog.service.js +38 -2
- package/dist/node-catalog/node-catalog.service.js.map +1 -1
- package/dist/oauth/oauth-browser-binding.service.d.ts +18 -0
- package/dist/oauth/oauth-browser-binding.service.js +68 -0
- package/dist/oauth/oauth-browser-binding.service.js.map +1 -0
- package/dist/oauth/oauth.service.d.ts +10 -4
- package/dist/oauth/oauth.service.js +87 -4
- package/dist/oauth/oauth.service.js.map +1 -1
- package/dist/oauth/types.d.ts +1 -0
- package/dist/oauth/types.js.map +1 -1
- package/dist/public-api/index.js +5 -1
- package/dist/public-api/index.js.map +1 -1
- package/dist/public-api/types.d.ts +6 -0
- package/dist/public-api/v1/handlers/credentials/credentials.service.js +1 -0
- package/dist/public-api/v1/handlers/credentials/credentials.service.js.map +1 -1
- package/dist/public-api/v1/handlers/n8n-packages/n8n-packages.handler.d.ts +5 -0
- package/dist/public-api/v1/handlers/n8n-packages/n8n-packages.handler.js +22 -0
- package/dist/public-api/v1/handlers/n8n-packages/n8n-packages.handler.js.map +1 -1
- package/dist/public-api/v1/openapi.yml +207 -59
- package/dist/requests.d.ts +4 -0
- package/dist/scaling/constants.d.ts +2 -2
- package/dist/scaling/pubsub/pubsub.event-map.d.ts +5 -2
- package/dist/scaling/pubsub/pubsub.types.d.ts +2 -1
- package/dist/services/ai-workflow-builder.service.d.ts +6 -3
- package/dist/services/ai-workflow-builder.service.js +13 -5
- package/dist/services/ai-workflow-builder.service.js.map +1 -1
- package/dist/services/api-key-auth.strategy.d.ts +4 -1
- package/dist/services/api-key-auth.strategy.js +18 -2
- package/dist/services/api-key-auth.strategy.js.map +1 -1
- package/dist/services/ownership.service.d.ts +1 -0
- package/dist/services/ownership.service.js +7 -0
- package/dist/services/ownership.service.js.map +1 -1
- package/dist/services/project.service.ee.d.ts +6 -2
- package/dist/services/project.service.ee.js +30 -8
- package/dist/services/project.service.ee.js.map +1 -1
- package/dist/services/public-api-key.service.d.ts +21 -14
- package/dist/services/public-api-key.service.js +14 -9
- package/dist/services/public-api-key.service.js.map +1 -1
- package/dist/telemetry/index.d.ts +6 -9
- package/dist/telemetry/index.js +23 -9
- package/dist/telemetry/index.js.map +1 -1
- package/dist/webhooks/constants.js +5 -1
- package/dist/webhooks/constants.js.map +1 -1
- package/dist/webhooks/live-webhooks.d.ts +8 -1
- package/dist/webhooks/live-webhooks.js +37 -22
- package/dist/webhooks/live-webhooks.js.map +1 -1
- package/dist/webhooks/waiting-forms.js +8 -1
- package/dist/webhooks/waiting-forms.js.map +1 -1
- package/dist/webhooks/webhook-helpers.d.ts +1 -1
- package/dist/webhooks/webhook-helpers.js +20 -10
- package/dist/webhooks/webhook-helpers.js.map +1 -1
- package/dist/webhooks/webhook-request-handler.js +1 -1
- package/dist/webhooks/webhook-request-handler.js.map +1 -1
- package/dist/workflow-helpers.d.ts +6 -1
- package/dist/workflow-helpers.js +9 -1
- package/dist/workflow-helpers.js.map +1 -1
- package/dist/workflows/workflow-creation.service.d.ts +4 -1
- package/dist/workflows/workflow-creation.service.js +12 -3
- package/dist/workflows/workflow-creation.service.js.map +1 -1
- package/dist/workflows/workflow-finder.service.d.ts +1 -0
- package/dist/workflows/workflow-published-data.service.d.ts +11 -0
- package/dist/workflows/workflow-published-data.service.js +39 -0
- package/dist/workflows/workflow-published-data.service.js.map +1 -0
- package/dist/workflows/workflow-validation.service.d.ts +5 -1
- package/dist/workflows/workflow-validation.service.js +55 -2
- package/dist/workflows/workflow-validation.service.js.map +1 -1
- package/dist/workflows/workflow.service.js +4 -0
- package/dist/workflows/workflow.service.js.map +1 -1
- package/dist/workflows/workflows.controller.d.ts +8 -0
- package/package.json +40 -32
- package/templates/form-trigger-completion.handlebars +12 -1
- package/dist/modules/agents/integrations/agent-schedule.service.d.ts +0 -30
- package/dist/modules/agents/integrations/agent-schedule.service.js +0 -331
- package/dist/modules/agents/integrations/agent-schedule.service.js.map +0 -1
- package/dist/modules/instance-ai/web-research/brave-search.d.ts +0 -10
- package/dist/modules/instance-ai/web-research/brave-search.js +0 -44
- package/dist/modules/instance-ai/web-research/brave-search.js.map +0 -1
- package/dist/modules/instance-ai/web-research/searxng-search.d.ts +0 -6
- package/dist/modules/instance-ai/web-research/searxng-search.js +0 -39
- package/dist/modules/instance-ai/web-research/searxng-search.js.map +0 -1
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.reverseTranslateOpenAiResponsesRequest = reverseTranslateOpenAiResponsesRequest;
|
|
4
|
+
exports.extractResponsesRequestModel = extractResponsesRequestModel;
|
|
5
|
+
exports.isResponsesStreamRequested = isResponsesStreamRequested;
|
|
6
|
+
exports.forwardTranslateToResponsesEnvelope = forwardTranslateToResponsesEnvelope;
|
|
7
|
+
exports.forwardTranslateToResponsesSseEvents = forwardTranslateToResponsesSseEvents;
|
|
8
|
+
exports.buildResponsesErrorEnvelope = buildResponsesErrorEnvelope;
|
|
9
|
+
const node_crypto_1 = require("node:crypto");
|
|
10
|
+
const openai_envelope_1 = require("./openai-envelope");
|
|
11
|
+
const OPENAI_RESPONSES_SYNTHETIC_URL = 'https://api.openai.com/v1/responses';
|
|
12
|
+
const DEFAULT_MODEL = 'gpt-4o-mini';
|
|
13
|
+
function reverseTranslateOpenAiResponsesRequest(body) {
|
|
14
|
+
return {
|
|
15
|
+
url: OPENAI_RESPONSES_SYNTHETIC_URL,
|
|
16
|
+
method: 'POST',
|
|
17
|
+
body: body ?? {},
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
function extractResponsesRequestModel(body) {
|
|
21
|
+
if (typeof body !== 'object' || body === null)
|
|
22
|
+
return DEFAULT_MODEL;
|
|
23
|
+
const model = body.model;
|
|
24
|
+
return typeof model === 'string' && model.length > 0 ? model : DEFAULT_MODEL;
|
|
25
|
+
}
|
|
26
|
+
function isResponsesStreamRequested(body) {
|
|
27
|
+
if (typeof body !== 'object' || body === null)
|
|
28
|
+
return false;
|
|
29
|
+
return body.stream === true;
|
|
30
|
+
}
|
|
31
|
+
function forwardTranslateToResponsesEnvelope(mockResponse, model) {
|
|
32
|
+
const toolCalls = (0, openai_envelope_1.extractToolCalls)(mockResponse?.body);
|
|
33
|
+
const responseId = `resp_${(0, node_crypto_1.randomUUID)().replace(/-/g, '').slice(0, 32)}`;
|
|
34
|
+
const now = Math.floor(Date.now() / 1000);
|
|
35
|
+
const output = toolCalls.length > 0
|
|
36
|
+
? toolCallsToResponsesOutput(toolCalls)
|
|
37
|
+
: [buildAssistantMessage(extractResponsesContent(mockResponse?.body))];
|
|
38
|
+
return {
|
|
39
|
+
id: responseId,
|
|
40
|
+
object: 'response',
|
|
41
|
+
created_at: now,
|
|
42
|
+
status: 'completed',
|
|
43
|
+
model,
|
|
44
|
+
output,
|
|
45
|
+
usage: {
|
|
46
|
+
input_tokens: 0,
|
|
47
|
+
output_tokens: 0,
|
|
48
|
+
total_tokens: 0,
|
|
49
|
+
},
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
function forwardTranslateToResponsesSseEvents(mockResponse, model) {
|
|
53
|
+
const responseId = `resp_${(0, node_crypto_1.randomUUID)().replace(/-/g, '').slice(0, 32)}`;
|
|
54
|
+
const createdAt = Math.floor(Date.now() / 1000);
|
|
55
|
+
const toolCalls = (0, openai_envelope_1.extractToolCalls)(mockResponse?.body);
|
|
56
|
+
const baseResponse = (status, output) => ({
|
|
57
|
+
id: responseId,
|
|
58
|
+
object: 'response',
|
|
59
|
+
created_at: createdAt,
|
|
60
|
+
status,
|
|
61
|
+
model,
|
|
62
|
+
output,
|
|
63
|
+
usage: { input_tokens: 0, output_tokens: 0, total_tokens: 0 },
|
|
64
|
+
});
|
|
65
|
+
const events = [];
|
|
66
|
+
events.push({ event: 'response.created', data: { response: baseResponse('in_progress', []) } });
|
|
67
|
+
events.push({
|
|
68
|
+
event: 'response.in_progress',
|
|
69
|
+
data: { response: baseResponse('in_progress', []) },
|
|
70
|
+
});
|
|
71
|
+
if (toolCalls.length > 0) {
|
|
72
|
+
const finalItems = toolCallsToResponsesOutput(toolCalls);
|
|
73
|
+
toolCalls.forEach((tc, callIndex) => {
|
|
74
|
+
const finalItem = finalItems[callIndex];
|
|
75
|
+
const itemId = finalItem.id;
|
|
76
|
+
const initialItem = { ...finalItem, arguments: '' };
|
|
77
|
+
events.push({
|
|
78
|
+
event: 'response.output_item.added',
|
|
79
|
+
data: { output_index: callIndex, item: initialItem },
|
|
80
|
+
});
|
|
81
|
+
if (tc.arguments.length > 0) {
|
|
82
|
+
events.push({
|
|
83
|
+
event: 'response.function_call_arguments.delta',
|
|
84
|
+
data: {
|
|
85
|
+
item_id: itemId,
|
|
86
|
+
output_index: callIndex,
|
|
87
|
+
delta: tc.arguments,
|
|
88
|
+
},
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
events.push({
|
|
92
|
+
event: 'response.function_call_arguments.done',
|
|
93
|
+
data: {
|
|
94
|
+
item_id: itemId,
|
|
95
|
+
output_index: callIndex,
|
|
96
|
+
arguments: tc.arguments,
|
|
97
|
+
},
|
|
98
|
+
});
|
|
99
|
+
events.push({
|
|
100
|
+
event: 'response.output_item.done',
|
|
101
|
+
data: { output_index: callIndex, item: finalItem },
|
|
102
|
+
});
|
|
103
|
+
});
|
|
104
|
+
events.push({
|
|
105
|
+
event: 'response.completed',
|
|
106
|
+
data: { response: baseResponse('completed', finalItems) },
|
|
107
|
+
});
|
|
108
|
+
return events;
|
|
109
|
+
}
|
|
110
|
+
const content = extractResponsesContent(mockResponse?.body);
|
|
111
|
+
const messageId = `msg_${(0, node_crypto_1.randomUUID)().replace(/-/g, '').slice(0, 16)}`;
|
|
112
|
+
const messageItem = {
|
|
113
|
+
id: messageId,
|
|
114
|
+
type: 'message',
|
|
115
|
+
role: 'assistant',
|
|
116
|
+
content: [{ type: 'output_text', text: content, annotations: [] }],
|
|
117
|
+
status: 'completed',
|
|
118
|
+
};
|
|
119
|
+
events.push({
|
|
120
|
+
event: 'response.output_item.added',
|
|
121
|
+
data: {
|
|
122
|
+
output_index: 0,
|
|
123
|
+
item: {
|
|
124
|
+
...messageItem,
|
|
125
|
+
content: [{ type: 'output_text', text: '', annotations: [] }],
|
|
126
|
+
status: 'in_progress',
|
|
127
|
+
},
|
|
128
|
+
},
|
|
129
|
+
});
|
|
130
|
+
events.push({
|
|
131
|
+
event: 'response.content_part.added',
|
|
132
|
+
data: {
|
|
133
|
+
item_id: messageId,
|
|
134
|
+
output_index: 0,
|
|
135
|
+
content_index: 0,
|
|
136
|
+
part: { type: 'output_text', text: '', annotations: [] },
|
|
137
|
+
},
|
|
138
|
+
});
|
|
139
|
+
if (content.length > 0) {
|
|
140
|
+
events.push({
|
|
141
|
+
event: 'response.output_text.delta',
|
|
142
|
+
data: {
|
|
143
|
+
item_id: messageId,
|
|
144
|
+
output_index: 0,
|
|
145
|
+
content_index: 0,
|
|
146
|
+
delta: content,
|
|
147
|
+
},
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
events.push({
|
|
151
|
+
event: 'response.output_text.done',
|
|
152
|
+
data: {
|
|
153
|
+
item_id: messageId,
|
|
154
|
+
output_index: 0,
|
|
155
|
+
content_index: 0,
|
|
156
|
+
text: content,
|
|
157
|
+
},
|
|
158
|
+
});
|
|
159
|
+
events.push({
|
|
160
|
+
event: 'response.content_part.done',
|
|
161
|
+
data: {
|
|
162
|
+
item_id: messageId,
|
|
163
|
+
output_index: 0,
|
|
164
|
+
content_index: 0,
|
|
165
|
+
part: { type: 'output_text', text: content, annotations: [] },
|
|
166
|
+
},
|
|
167
|
+
});
|
|
168
|
+
events.push({
|
|
169
|
+
event: 'response.output_item.done',
|
|
170
|
+
data: { output_index: 0, item: messageItem },
|
|
171
|
+
});
|
|
172
|
+
events.push({
|
|
173
|
+
event: 'response.completed',
|
|
174
|
+
data: { response: baseResponse('completed', [messageItem]) },
|
|
175
|
+
});
|
|
176
|
+
return events;
|
|
177
|
+
}
|
|
178
|
+
function buildResponsesErrorEnvelope(message) {
|
|
179
|
+
return {
|
|
180
|
+
error: {
|
|
181
|
+
message,
|
|
182
|
+
type: 'eval_wire_server_error',
|
|
183
|
+
code: 'eval_mock_generation_failed',
|
|
184
|
+
param: null,
|
|
185
|
+
},
|
|
186
|
+
};
|
|
187
|
+
}
|
|
188
|
+
function toolCallsToResponsesOutput(toolCalls) {
|
|
189
|
+
return toolCalls.map((tc) => ({
|
|
190
|
+
id: `fc_${(0, node_crypto_1.randomUUID)().replace(/-/g, '').slice(0, 16)}`,
|
|
191
|
+
type: 'function_call',
|
|
192
|
+
call_id: tc.id,
|
|
193
|
+
name: tc.name,
|
|
194
|
+
arguments: tc.arguments,
|
|
195
|
+
}));
|
|
196
|
+
}
|
|
197
|
+
function buildAssistantMessage(text) {
|
|
198
|
+
return {
|
|
199
|
+
id: `msg_${(0, node_crypto_1.randomUUID)().replace(/-/g, '').slice(0, 16)}`,
|
|
200
|
+
type: 'message',
|
|
201
|
+
role: 'assistant',
|
|
202
|
+
status: 'completed',
|
|
203
|
+
content: [{ type: 'output_text', text, annotations: [] }],
|
|
204
|
+
};
|
|
205
|
+
}
|
|
206
|
+
function extractResponsesContent(body) {
|
|
207
|
+
if (body === null || body === undefined)
|
|
208
|
+
return '';
|
|
209
|
+
if (typeof body === 'string')
|
|
210
|
+
return body;
|
|
211
|
+
if (typeof body !== 'object')
|
|
212
|
+
return String(body);
|
|
213
|
+
const obj = body;
|
|
214
|
+
if (typeof obj.output_text === 'string')
|
|
215
|
+
return obj.output_text;
|
|
216
|
+
const output = obj.output;
|
|
217
|
+
if (Array.isArray(output) && output.length > 0) {
|
|
218
|
+
for (const item of output) {
|
|
219
|
+
if (typeof item !== 'object' || item === null)
|
|
220
|
+
continue;
|
|
221
|
+
const content = item.content;
|
|
222
|
+
if (!Array.isArray(content) || content.length === 0)
|
|
223
|
+
continue;
|
|
224
|
+
const first = content[0];
|
|
225
|
+
if (typeof first === 'object' && first !== null) {
|
|
226
|
+
const text = first.text;
|
|
227
|
+
if (typeof text === 'string')
|
|
228
|
+
return text;
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
if (typeof obj.content === 'string')
|
|
233
|
+
return obj.content;
|
|
234
|
+
if (typeof obj.message === 'string')
|
|
235
|
+
return obj.message;
|
|
236
|
+
return JSON.stringify(body);
|
|
237
|
+
}
|
|
238
|
+
//# sourceMappingURL=openai-responses-envelope.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"openai-responses-envelope.js","sourceRoot":"","sources":["../../../../src/modules/instance-ai/eval/openai-responses-envelope.ts"],"names":[],"mappings":";;AAiBA,wFAMC;AAGD,oEAIC;AAGD,gEAGC;AAQD,kFA8BC;AASD,oFA0IC;AAGD,kEASC;AAvOD,6CAAyC;AAEzC,uDAA8E;AAQ9E,MAAM,8BAA8B,GAAG,qCAAqC,CAAC;AAE7E,MAAM,aAAa,GAAG,aAAa,CAAC;AAGpC,SAAgB,sCAAsC,CAAC,IAAa;IACnE,OAAO;QACN,GAAG,EAAE,8BAA8B;QACnC,MAAM,EAAE,MAAM;QACd,IAAI,EAAE,IAAI,IAAI,EAAE;KAChB,CAAC;AACH,CAAC;AAGD,SAAgB,4BAA4B,CAAC,IAAa;IACzD,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,IAAI;QAAE,OAAO,aAAa,CAAC;IACpE,MAAM,KAAK,GAAI,IAA4B,CAAC,KAAK,CAAC;IAClD,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,aAAa,CAAC;AAC9E,CAAC;AAGD,SAAgB,0BAA0B,CAAC,IAAa;IACvD,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,IAAI;QAAE,OAAO,KAAK,CAAC;IAC5D,OAAQ,IAA6B,CAAC,MAAM,KAAK,IAAI,CAAC;AACvD,CAAC;AAQD,SAAgB,mCAAmC,CAClD,YAA8C,EAC9C,KAAa;IAEb,MAAM,SAAS,GAAG,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AC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function redactBinaryBody(body: unknown, contentType?: string): unknown;
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.redactBinaryBody = redactBinaryBody;
|
|
4
|
+
const BINARY_CONTENT_TYPE_RE = /^(?:image|audio|video|application\/(?:pdf|octet-stream|zip))/i;
|
|
5
|
+
function isFormDataLike(value) {
|
|
6
|
+
if (typeof value !== 'object' || value === null)
|
|
7
|
+
return false;
|
|
8
|
+
const candidate = value;
|
|
9
|
+
return typeof candidate.getBoundary === 'function' && Array.isArray(candidate._streams);
|
|
10
|
+
}
|
|
11
|
+
function summarizeFormData(fd) {
|
|
12
|
+
const parts = [];
|
|
13
|
+
const streams = Array.isArray(fd._streams) ? fd._streams : [];
|
|
14
|
+
for (const entry of streams) {
|
|
15
|
+
if (typeof entry !== 'string')
|
|
16
|
+
continue;
|
|
17
|
+
if (!entry.includes('Content-Disposition'))
|
|
18
|
+
continue;
|
|
19
|
+
const nameMatch = /name="([^"]+)"/.exec(entry);
|
|
20
|
+
if (!nameMatch)
|
|
21
|
+
continue;
|
|
22
|
+
const filenameMatch = /filename="([^"]+)"/.exec(entry);
|
|
23
|
+
const contentTypeMatch = /Content-Type:\s*([^\r\n]+)/i.exec(entry);
|
|
24
|
+
parts.push({
|
|
25
|
+
name: nameMatch[1],
|
|
26
|
+
filename: filenameMatch?.[1],
|
|
27
|
+
contentType: contentTypeMatch?.[1]?.trim(),
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
return {
|
|
31
|
+
__redacted: 'multipart',
|
|
32
|
+
boundary: typeof fd.getBoundary === 'function' ? fd.getBoundary() : undefined,
|
|
33
|
+
parts,
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
function summarizeBuffer(buf, contentType) {
|
|
37
|
+
return {
|
|
38
|
+
__redacted: 'buffer',
|
|
39
|
+
contentType: contentType ?? 'application/octet-stream',
|
|
40
|
+
size: buf.length,
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
function summarizeString(text, contentType) {
|
|
44
|
+
return {
|
|
45
|
+
__redacted: 'binary',
|
|
46
|
+
contentType,
|
|
47
|
+
size: Buffer.byteLength(text, 'utf8'),
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
function redactBinaryBody(body, contentType) {
|
|
51
|
+
if (body === null || body === undefined)
|
|
52
|
+
return body;
|
|
53
|
+
if (Buffer.isBuffer(body)) {
|
|
54
|
+
return summarizeBuffer(body, contentType);
|
|
55
|
+
}
|
|
56
|
+
if (isFormDataLike(body)) {
|
|
57
|
+
return summarizeFormData(body);
|
|
58
|
+
}
|
|
59
|
+
if (typeof body === 'string' && contentType && BINARY_CONTENT_TYPE_RE.test(contentType)) {
|
|
60
|
+
return summarizeString(body, contentType);
|
|
61
|
+
}
|
|
62
|
+
if (Array.isArray(body)) {
|
|
63
|
+
return body.map((value) => redactBinaryBody(value));
|
|
64
|
+
}
|
|
65
|
+
if (typeof body === 'object') {
|
|
66
|
+
const result = {};
|
|
67
|
+
for (const [key, value] of Object.entries(body)) {
|
|
68
|
+
result[key] = redactBinaryBody(value);
|
|
69
|
+
}
|
|
70
|
+
return result;
|
|
71
|
+
}
|
|
72
|
+
return body;
|
|
73
|
+
}
|
|
74
|
+
//# sourceMappingURL=request-binary-redactor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"request-binary-redactor.js","sourceRoot":"","sources":["../../../../src/modules/instance-ai/eval/request-binary-redactor.ts"],"names":[],"mappings":";;AAwFA,4CA8BC;AAvGD,MAAM,sBAAsB,GAAG,+DAA+D,CAAC;AAe/F,SAAS,cAAc,CAAC,KAAc;IACrC,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI;QAAE,OAAO,KAAK,CAAC;IAC9D,MAAM,SAAS,GAAG,KAAqB,CAAC;IACxC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K,CAAC,CAAC;QACvC,CAAC;QACD,OAAO,MAAM,CAAC;IACf,CAAC;IAED,OAAO,IAAI,CAAC;AACb,CAAC"}
|
|
@@ -1,11 +1,29 @@
|
|
|
1
1
|
import { type INode, type IPinData, type IWorkflowBase } from 'n8n-workflow';
|
|
2
2
|
export declare function identifyNodesForPinData(workflow: IWorkflowBase, exclusionSet?: Set<string>): INode[];
|
|
3
|
+
export interface TriggerBinaryRequirement {
|
|
4
|
+
propertyName: string;
|
|
5
|
+
contentType: string;
|
|
6
|
+
filename: string;
|
|
7
|
+
}
|
|
8
|
+
export declare function detectBinaryDependencies(workflow: IWorkflowBase): TriggerBinaryRequirement | undefined;
|
|
9
|
+
export type AutoPinReason = 'protocol_binary' | 'unsupported_vendor_llm' | 'unsafe_baseurl_override' | 'shared_vendor_llm_subnode';
|
|
10
|
+
export interface AutoPinEntry {
|
|
11
|
+
root: string;
|
|
12
|
+
subNode: string;
|
|
13
|
+
subNodeType: string;
|
|
14
|
+
reason: AutoPinReason;
|
|
15
|
+
}
|
|
3
16
|
export interface VendorLlmRouting {
|
|
4
17
|
subNodeToRoot: Map<string, string>;
|
|
5
18
|
rootToSubNode: Map<string, INode>;
|
|
6
19
|
}
|
|
7
20
|
export declare function buildVendorLlmRouting(workflow: IWorkflowBase, unpinNodes: string[]): VendorLlmRouting;
|
|
8
|
-
export
|
|
21
|
+
export interface PartitionedAiRoots {
|
|
22
|
+
unpinNodes: string[];
|
|
23
|
+
pinNodes: string[];
|
|
24
|
+
autoPinned: AutoPinEntry[];
|
|
25
|
+
}
|
|
26
|
+
export declare function partitionAiRoots(workflow: IWorkflowBase, explicitPinNodes?: string[]): PartitionedAiRoots;
|
|
9
27
|
export declare function identifyNodesForHints(workflow: IWorkflowBase): INode[];
|
|
10
28
|
export interface MockHints {
|
|
11
29
|
globalContext: string;
|