n8n 2.29.6 → 2.30.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/README.md +9 -8
- package/dist/active-executions.d.ts +2 -1
- package/dist/active-executions.js +2 -1
- package/dist/active-executions.js.map +1 -1
- package/dist/active-workflow-manager.js +10 -5
- package/dist/active-workflow-manager.js.map +1 -1
- package/dist/blob-storage/azure-byte-store.ee.js +2 -2
- package/dist/blob-storage/azure-byte-store.ee.js.map +1 -1
- package/dist/blob-storage/s3-byte-store.ee.js +2 -2
- package/dist/blob-storage/s3-byte-store.ee.js.map +1 -1
- package/dist/build.tsbuildinfo +1 -1
- package/dist/chat/chat-service.js +5 -4
- package/dist/chat/chat-service.js.map +1 -1
- package/dist/chat/chat-service.types.d.ts +2 -2
- package/dist/command-registry.js +12 -4
- package/dist/command-registry.js.map +1 -1
- package/dist/commands/audit.js +3 -2
- package/dist/commands/audit.js.map +1 -1
- package/dist/commands/base-command.js +2 -1
- package/dist/commands/base-command.js.map +1 -1
- package/dist/commands/execute.d.ts +2 -2
- package/dist/commands/export/credentials.d.ts +4 -4
- package/dist/commands/export/entities.d.ts +2 -2
- package/dist/commands/export/workflow.d.ts +4 -4
- package/dist/commands/import/credentials.d.ts +2 -2
- package/dist/commands/import/workflow.d.ts +2 -2
- package/dist/commands/start.js +2 -0
- package/dist/commands/start.js.map +1 -1
- package/dist/commands/ttwf/generate.d.ts +2 -2
- package/dist/controllers/annotation-tags.controller.ee.d.ts +1 -1
- package/dist/controllers/oauth/oauth1-credential.controller.d.ts +3 -1
- package/dist/controllers/oauth/oauth1-credential.controller.js +12 -6
- package/dist/controllers/oauth/oauth1-credential.controller.js.map +1 -1
- package/dist/controllers/oauth/oauth2-credential.controller.d.ts +3 -1
- package/dist/controllers/oauth/oauth2-credential.controller.js +12 -5
- package/dist/controllers/oauth/oauth2-credential.controller.js.map +1 -1
- package/dist/controllers/posthog.controller.d.ts +6 -0
- package/dist/controllers/posthog.controller.js +36 -8
- package/dist/controllers/posthog.controller.js.map +1 -1
- package/dist/controllers/project.controller.d.ts +2 -0
- package/dist/controllers/project.controller.js +12 -4
- package/dist/controllers/project.controller.js.map +1 -1
- package/dist/controllers/role.controller.d.ts +3 -2
- package/dist/controllers/role.controller.js +21 -7
- package/dist/controllers/role.controller.js.map +1 -1
- package/dist/controllers/users.controller.d.ts +3 -2
- package/dist/controllers/users.controller.js +5 -1
- package/dist/controllers/users.controller.js.map +1 -1
- package/dist/credentials/credentials.controller.d.ts +3 -1
- package/dist/credentials/credentials.controller.js +24 -18
- package/dist/credentials/credentials.controller.js.map +1 -1
- package/dist/credentials/credentials.service.d.ts +1 -0
- package/dist/credentials/credentials.service.js +11 -0
- package/dist/credentials/credentials.service.js.map +1 -1
- package/dist/credentials-overwrites.d.ts +2 -0
- package/dist/credentials-overwrites.js +10 -0
- package/dist/credentials-overwrites.js.map +1 -1
- package/dist/deprecation/deprecation.service.js +35 -6
- package/dist/deprecation/deprecation.service.js.map +1 -1
- package/dist/errors/response-errors/bad-request.error.d.ts +2 -1
- package/dist/errors/response-errors/bad-request.error.js +5 -2
- package/dist/errors/response-errors/bad-request.error.js.map +1 -1
- package/dist/evaluation.ee/test-runs.controller.ee.d.ts +1 -0
- package/dist/eventbus/event-message-classes/index.d.ts +2 -2
- package/dist/eventbus/event-message-classes/index.js +1 -0
- package/dist/eventbus/event-message-classes/index.js.map +1 -1
- package/dist/events/event.service.d.ts +2 -1
- package/dist/events/event.service.js.map +1 -1
- package/dist/events/maps/instance-ai.event-map.d.ts +1 -1
- package/dist/events/maps/relay.event-map.d.ts +21 -2
- package/dist/events/maps/workflow-publication-metrics.event-map.d.ts +26 -0
- package/dist/events/maps/workflow-publication-metrics.event-map.js +3 -0
- package/dist/events/maps/workflow-publication-metrics.event-map.js.map +1 -0
- package/dist/events/relays/log-streaming.event-relay.d.ts +2 -1
- package/dist/events/relays/log-streaming.event-relay.js +16 -3
- package/dist/events/relays/log-streaming.event-relay.js.map +1 -1
- package/dist/events/relays/telemetry.event-relay.d.ts +3 -0
- package/dist/events/relays/telemetry.event-relay.js +44 -3
- package/dist/events/relays/telemetry.event-relay.js.map +1 -1
- package/dist/execution-lifecycle/execution-lifecycle-hooks.js +2 -0
- package/dist/execution-lifecycle/execution-lifecycle-hooks.js.map +1 -1
- package/dist/execution-lifecycle/shared/shared-hook-functions.js +2 -2
- package/dist/execution-lifecycle/shared/shared-hook-functions.js.map +1 -1
- package/dist/executions/execution-data/azure-store.ee.js +2 -1
- package/dist/executions/execution-data/azure-store.ee.js.map +1 -1
- package/dist/executions/execution-data/s3-store.ee.js +2 -1
- package/dist/executions/execution-data/s3-store.ee.js.map +1 -1
- package/dist/executions/execution.service.js +13 -2
- package/dist/executions/execution.service.js.map +1 -1
- package/dist/instance-settings-loader/loaders/community-packages.instance-settings-loader.js +6 -6
- package/dist/instance-settings-loader/loaders/community-packages.instance-settings-loader.js.map +1 -1
- package/dist/interfaces.d.ts +2 -1
- package/dist/license/license.service.js +4 -4
- package/dist/license/license.service.js.map +1 -1
- package/dist/load-nodes-and-credentials.js +5 -4
- package/dist/load-nodes-and-credentials.js.map +1 -1
- package/dist/metrics/prometheus/active-workflow-metrics.service.js +8 -13
- package/dist/metrics/prometheus/active-workflow-metrics.service.js.map +1 -1
- package/dist/metrics/prometheus/cached-metric-query.d.ts +19 -0
- package/dist/metrics/prometheus/cached-metric-query.js +28 -0
- package/dist/metrics/prometheus/cached-metric-query.js.map +1 -0
- package/dist/metrics/prometheus/instance-ai-metrics.service.js +5 -3
- package/dist/metrics/prometheus/instance-ai-metrics.service.js.map +1 -1
- package/dist/metrics/prometheus/prometheus.service.d.ts +2 -1
- package/dist/metrics/prometheus/prometheus.service.js +5 -2
- package/dist/metrics/prometheus/prometheus.service.js.map +1 -1
- package/dist/metrics/prometheus/workflow-info-metrics.service.js +8 -13
- package/dist/metrics/prometheus/workflow-info-metrics.service.js.map +1 -1
- package/dist/metrics/prometheus/workflow-publication-metrics.service.d.ts +21 -0
- package/dist/metrics/prometheus/workflow-publication-metrics.service.js +160 -0
- package/dist/metrics/prometheus/workflow-publication-metrics.service.js.map +1 -0
- package/dist/metrics/prometheus/workflow-statistics-metrics.service.d.ts +0 -4
- package/dist/metrics/prometheus/workflow-statistics-metrics.service.js +10 -42
- package/dist/metrics/prometheus/workflow-statistics-metrics.service.js.map +1 -1
- package/dist/middlewares/body-parser.js +21 -7
- package/dist/middlewares/body-parser.js.map +1 -1
- package/dist/modules/agents/agent-config.service.js +39 -18
- package/dist/modules/agents/agent-config.service.js.map +1 -1
- package/dist/modules/agents/agent-execution-orchestrator.service.d.ts +2 -2
- package/dist/modules/agents/agent-execution-orchestrator.service.js +5 -8
- package/dist/modules/agents/agent-execution-orchestrator.service.js.map +1 -1
- package/dist/modules/agents/agent-execution.service.d.ts +2 -2
- package/dist/modules/agents/agent-execution.service.js +11 -8
- package/dist/modules/agents/agent-execution.service.js.map +1 -1
- package/dist/modules/agents/agent-integration-persistence.service.d.ts +4 -1
- package/dist/modules/agents/agent-integration-persistence.service.js +4 -2
- package/dist/modules/agents/agent-integration-persistence.service.js.map +1 -1
- package/dist/modules/agents/agent-integrations.controller.js +13 -3
- package/dist/modules/agents/agent-integrations.controller.js.map +1 -1
- package/dist/modules/agents/agent-knowledge-commands.d.ts +3 -0
- package/dist/modules/agents/agent-knowledge-commands.js +32 -9
- package/dist/modules/agents/agent-knowledge-commands.js.map +1 -1
- package/dist/modules/agents/agent-knowledge-gate.d.ts +1 -1
- package/dist/modules/agents/agent-knowledge-gate.js +1 -3
- package/dist/modules/agents/agent-knowledge-gate.js.map +1 -1
- package/dist/modules/agents/agent-knowledge-retrieval.d.ts +13 -6
- package/dist/modules/agents/agent-knowledge-retrieval.js +16 -14
- package/dist/modules/agents/agent-knowledge-retrieval.js.map +1 -1
- package/dist/modules/agents/agent-knowledge-sandbox.service.d.ts +16 -11
- package/dist/modules/agents/agent-knowledge-sandbox.service.js +233 -140
- package/dist/modules/agents/agent-knowledge-sandbox.service.js.map +1 -1
- package/dist/modules/agents/agent-knowledge-storage.d.ts +4 -15
- package/dist/modules/agents/agent-knowledge-storage.js +13 -26
- package/dist/modules/agents/agent-knowledge-storage.js.map +1 -1
- package/dist/modules/agents/agent-knowledge.controller.d.ts +1 -1
- package/dist/modules/agents/agent-knowledge.controller.js +3 -3
- package/dist/modules/agents/agent-knowledge.controller.js.map +1 -1
- package/dist/modules/agents/agent-knowledge.service.d.ts +13 -12
- package/dist/modules/agents/agent-knowledge.service.js +93 -106
- package/dist/modules/agents/agent-knowledge.service.js.map +1 -1
- package/dist/modules/agents/agent-model-catalog.service.d.ts +11 -0
- package/dist/modules/agents/agent-model-catalog.service.js +138 -0
- package/dist/modules/agents/agent-model-catalog.service.js.map +1 -0
- package/dist/modules/agents/agent-publish.service.js +6 -1
- package/dist/modules/agents/agent-publish.service.js.map +1 -1
- package/dist/modules/agents/agent-runtime-cache.service.d.ts +0 -1
- package/dist/modules/agents/agent-runtime-cache.service.js +4 -13
- package/dist/modules/agents/agent-runtime-cache.service.js.map +1 -1
- package/dist/modules/agents/agent-runtime-reconstruction.service.d.ts +3 -7
- package/dist/modules/agents/agent-runtime-reconstruction.service.js +10 -26
- package/dist/modules/agents/agent-runtime-reconstruction.service.js.map +1 -1
- package/dist/modules/agents/agent-sandbox.controller.d.ts +1 -1
- package/dist/modules/agents/agent-sandbox.controller.js +4 -4
- package/dist/modules/agents/agent-sandbox.controller.js.map +1 -1
- package/dist/modules/agents/agent-task.service.d.ts +1 -4
- package/dist/modules/agents/agent-task.service.js +1 -23
- package/dist/modules/agents/agent-task.service.js.map +1 -1
- package/dist/modules/agents/agents-catalog.controller.d.ts +9 -2
- package/dist/modules/agents/agents-catalog.controller.js +25 -2
- package/dist/modules/agents/agents-catalog.controller.js.map +1 -1
- package/dist/modules/agents/agents-config.controller.d.ts +46 -30
- package/dist/modules/agents/agents.controller.js +1 -1
- package/dist/modules/agents/agents.controller.js.map +1 -1
- package/dist/modules/agents/agents.service.d.ts +1 -1
- package/dist/modules/agents/agents.service.js +8 -2
- package/dist/modules/agents/agents.service.js.map +1 -1
- package/dist/modules/agents/builder/agents-builder-tools.service.d.ts +3 -3
- package/dist/modules/agents/builder/agents-builder-tools.service.js +32 -9
- package/dist/modules/agents/builder/agents-builder-tools.service.js.map +1 -1
- package/dist/modules/agents/builder/builder-model-live-lookup.service.d.ts +14 -0
- package/dist/modules/agents/builder/builder-model-live-lookup.service.js +91 -0
- package/dist/modules/agents/builder/builder-model-live-lookup.service.js.map +1 -0
- package/dist/modules/agents/builder/interactive/llm-provider-defaults.d.ts +0 -12
- package/dist/modules/agents/builder/interactive/llm-provider-defaults.js +20 -40
- package/dist/modules/agents/builder/interactive/llm-provider-defaults.js.map +1 -1
- package/dist/modules/agents/builder/interactive/resolve-llm.tool.d.ts +1 -2
- package/dist/modules/agents/builder/interactive/resolve-llm.tool.js +3 -2
- package/dist/modules/agents/builder/interactive/resolve-llm.tool.js.map +1 -1
- package/dist/modules/agents/builder/prompts/config-mutation.prompt.js +6 -0
- package/dist/modules/agents/builder/prompts/config-mutation.prompt.js.map +1 -1
- package/dist/modules/agents/builder/prompts/config-rules.prompt.js +7 -0
- package/dist/modules/agents/builder/prompts/config-rules.prompt.js.map +1 -1
- package/dist/modules/agents/entities/agent-execution.entity.d.ts +2 -4
- package/dist/modules/agents/entities/agent-execution.entity.js +2 -10
- package/dist/modules/agents/entities/agent-execution.entity.js.map +1 -1
- package/dist/modules/agents/execution-recorder.d.ts +0 -8
- package/dist/modules/agents/execution-recorder.js +12 -27
- package/dist/modules/agents/execution-recorder.js.map +1 -1
- package/dist/modules/agents/integrations/agent-chat-suspension-cards.js +5 -5
- package/dist/modules/agents/integrations/agent-chat-suspension-cards.js.map +1 -1
- package/dist/modules/agents/integrations/chat-integration.service.d.ts +7 -6
- package/dist/modules/agents/integrations/chat-integration.service.js +51 -85
- package/dist/modules/agents/integrations/chat-integration.service.js.map +1 -1
- package/dist/modules/agents/integrations/integration-action-executor.d.ts +116 -116
- package/dist/modules/agents/integrations/integration-helpers.js +5 -5
- package/dist/modules/agents/integrations/integration-helpers.js.map +1 -1
- package/dist/modules/agents/integrations/integration-message-context.service.js +2 -2
- package/dist/modules/agents/integrations/integration-message-context.service.js.map +1 -1
- package/dist/modules/agents/integrations/integration-tool-definitions.d.ts +949 -949
- package/dist/modules/agents/integrations/integration-tool-execution.js +4 -4
- package/dist/modules/agents/integrations/integration-tool-execution.js.map +1 -1
- package/dist/modules/agents/integrations/n8n-checkpoint-storage.d.ts +1 -0
- package/dist/modules/agents/integrations/n8n-checkpoint-storage.js +9 -1
- package/dist/modules/agents/integrations/n8n-checkpoint-storage.js.map +1 -1
- package/dist/modules/agents/integrations/platforms/linear-operations.js +18 -18
- package/dist/modules/agents/integrations/platforms/linear-operations.js.map +1 -1
- package/dist/modules/agents/integrations/platforms/linear-tool-definitions.d.ts +30 -30
- package/dist/modules/agents/integrations/platforms/slack-bridge-behavior.js +6 -6
- package/dist/modules/agents/integrations/platforms/slack-bridge-behavior.js.map +1 -1
- package/dist/modules/agents/integrations/platforms/slack-operations.js +3 -3
- package/dist/modules/agents/integrations/platforms/slack-operations.js.map +1 -1
- package/dist/modules/agents/integrations/recording/channel-integration-recorder.d.ts +64 -0
- package/dist/modules/agents/integrations/recording/channel-integration-recorder.js +376 -0
- package/dist/modules/agents/integrations/recording/channel-integration-recorder.js.map +1 -0
- package/dist/modules/agents/integrations/recording/recording-adapter.d.ts +2 -0
- package/dist/modules/agents/integrations/recording/recording-adapter.js +98 -0
- package/dist/modules/agents/integrations/recording/recording-adapter.js.map +1 -0
- package/dist/modules/agents/integrations/slack-app-setup.service.js +5 -5
- package/dist/modules/agents/integrations/slack-app-setup.service.js.map +1 -1
- package/dist/modules/agents/json-config/from-json-config.js +3 -0
- package/dist/modules/agents/json-config/from-json-config.js.map +1 -1
- package/dist/modules/agents/repositories/agent-checkpoint.repository.d.ts +1 -0
- package/dist/modules/agents/repositories/agent-checkpoint.repository.js +4 -0
- package/dist/modules/agents/repositories/agent-checkpoint.repository.js.map +1 -1
- package/dist/modules/agents/repositories/agent-execution.repository.js +3 -1
- package/dist/modules/agents/repositories/agent-execution.repository.js.map +1 -1
- package/dist/modules/agents/sub-agents/sub-agent-foreground-runner.d.ts +0 -1
- package/dist/modules/agents/sub-agents/sub-agent-foreground-runner.js +0 -1
- package/dist/modules/agents/sub-agents/sub-agent-foreground-runner.js.map +1 -1
- package/dist/modules/agents/tools/knowledge/search-knowledge.tool.d.ts +12 -8
- package/dist/modules/agents/tools/knowledge/search-knowledge.tool.js +12 -10
- package/dist/modules/agents/tools/knowledge/search-knowledge.tool.js.map +1 -1
- package/dist/modules/agents/tools/workflow-tool-factory.d.ts +2 -6
- package/dist/modules/agents/tools/workflow-tool-factory.js +11 -24
- package/dist/modules/agents/tools/workflow-tool-factory.js.map +1 -1
- package/dist/modules/agents/utils/agent-resource-id.js +2 -2
- package/dist/modules/agents/utils/agent-resource-id.js.map +1 -1
- package/dist/modules/agents/utils/execution-to-message-mapper.d.ts +1 -1
- package/dist/modules/agents/utils/execution-to-message-mapper.js +4 -31
- package/dist/modules/agents/utils/execution-to-message-mapper.js.map +1 -1
- package/dist/modules/breaking-changes/breaking-changes.controller.d.ts +4 -7
- package/dist/modules/breaking-changes/breaking-changes.controller.js +8 -7
- package/dist/modules/breaking-changes/breaking-changes.controller.js.map +1 -1
- package/dist/modules/breaking-changes/rules/index.d.ts +2 -0
- package/dist/modules/breaking-changes/rules/index.js +2 -0
- package/dist/modules/breaking-changes/rules/index.js.map +1 -1
- package/dist/modules/breaking-changes/rules/v3/always-output-data-multi-output.rule.d.ts +14 -0
- package/dist/modules/breaking-changes/rules/v3/always-output-data-multi-output.rule.js +82 -0
- package/dist/modules/breaking-changes/rules/v3/always-output-data-multi-output.rule.js.map +1 -0
- package/dist/modules/breaking-changes/rules/v3/execute-workflow-each-mode.rule.d.ts +10 -0
- package/dist/modules/breaking-changes/rules/v3/execute-workflow-each-mode.rule.js +53 -0
- package/dist/modules/breaking-changes/rules/v3/execute-workflow-each-mode.rule.js.map +1 -0
- package/dist/modules/chat-hub/chat-hub-extractor.js +2 -1
- package/dist/modules/chat-hub/chat-hub-extractor.js.map +1 -1
- package/dist/modules/chat-hub/chat-hub.attachment.service.js +3 -3
- package/dist/modules/chat-hub/chat-hub.attachment.service.js.map +1 -1
- package/dist/modules/chat-hub/chat-hub.controller.js +2 -2
- package/dist/modules/chat-hub/chat-hub.controller.js.map +1 -1
- package/dist/modules/chat-hub/chat-hub.module.d.ts +1 -1
- package/dist/modules/chat-hub/chat-hub.settings.controller.d.ts +3 -3
- package/dist/modules/chat-hub/chat-hub.types.d.ts +4 -4
- package/dist/modules/community-packages/community-node-types.service.js +3 -2
- package/dist/modules/community-packages/community-node-types.service.js.map +1 -1
- package/dist/modules/community-packages/community-packages.lifecycle.service.js +2 -1
- package/dist/modules/community-packages/community-packages.lifecycle.service.js.map +1 -1
- package/dist/modules/community-packages/community-packages.service.d.ts +6 -0
- package/dist/modules/community-packages/community-packages.service.js +116 -25
- package/dist/modules/community-packages/community-packages.service.js.map +1 -1
- package/dist/modules/community-packages/installed-packages.repository.d.ts +2 -0
- package/dist/modules/community-packages/installed-packages.repository.js +9 -0
- package/dist/modules/community-packages/installed-packages.repository.js.map +1 -1
- package/dist/modules/community-packages/npm-utils.js +2 -2
- package/dist/modules/community-packages/npm-utils.js.map +1 -1
- package/dist/modules/data-table/data-table-column.repository.js +3 -2
- package/dist/modules/data-table/data-table-column.repository.js.map +1 -1
- package/dist/modules/data-table/data-table-proxy.service.d.ts +3 -0
- package/dist/modules/data-table/data-table-proxy.service.js +8 -0
- package/dist/modules/data-table/data-table-proxy.service.js.map +1 -1
- package/dist/modules/data-table/data-table-rows.repository.d.ts +3 -0
- package/dist/modules/data-table/data-table-rows.repository.js +15 -4
- package/dist/modules/data-table/data-table-rows.repository.js.map +1 -1
- package/dist/modules/data-table/data-table.controller.js +2 -1
- package/dist/modules/data-table/data-table.controller.js.map +1 -1
- package/dist/modules/data-table/data-table.module.d.ts +1 -1
- package/dist/modules/data-table/data-table.repository.js +10 -0
- package/dist/modules/data-table/data-table.repository.js.map +1 -1
- package/dist/modules/data-table/data-table.service.d.ts +3 -0
- package/dist/modules/data-table/data-table.service.js +10 -0
- package/dist/modules/data-table/data-table.service.js.map +1 -1
- package/dist/modules/data-table/multer-upload-middleware.js +4 -3
- package/dist/modules/data-table/multer-upload-middleware.js.map +1 -1
- package/dist/modules/dynamic-credentials.ee/context-establishment-hooks/n8n-oauth/n8n-oauth-extractor.js +2 -1
- package/dist/modules/dynamic-credentials.ee/context-establishment-hooks/n8n-oauth/n8n-oauth-extractor.js.map +1 -1
- package/dist/modules/dynamic-credentials.ee/credential-resolvers/identifiers/oauth2-introspection-identifier.d.ts +2 -2
- package/dist/modules/dynamic-credentials.ee/dynamic-credentials.controller.js +2 -1
- package/dist/modules/dynamic-credentials.ee/dynamic-credentials.controller.js.map +1 -1
- package/dist/modules/dynamic-credentials.ee/services/dynamic-credential-storage.service.js +5 -0
- package/dist/modules/dynamic-credentials.ee/services/dynamic-credential-storage.service.js.map +1 -1
- package/dist/modules/dynamic-credentials.ee/services/n8n-resolver-seeder.service.d.ts +2 -3
- package/dist/modules/dynamic-credentials.ee/services/n8n-resolver-seeder.service.js +1 -7
- package/dist/modules/dynamic-credentials.ee/services/n8n-resolver-seeder.service.js.map +1 -1
- package/dist/modules/dynamic-credentials.ee/services/shared-fields.d.ts +2 -1
- package/dist/modules/dynamic-credentials.ee/services/shared-fields.js +15 -0
- package/dist/modules/dynamic-credentials.ee/services/shared-fields.js.map +1 -1
- package/dist/modules/external-secrets.ee/errors/secrets-provider-errors.d.ts +33 -0
- package/dist/modules/external-secrets.ee/errors/secrets-provider-errors.js +58 -0
- package/dist/modules/external-secrets.ee/errors/secrets-provider-errors.js.map +1 -0
- package/dist/modules/external-secrets.ee/provider-lifecycle.service.js +4 -4
- package/dist/modules/external-secrets.ee/provider-lifecycle.service.js.map +1 -1
- package/dist/modules/external-secrets.ee/providers/aws-secrets-manager.d.ts +16 -3
- package/dist/modules/external-secrets.ee/providers/aws-secrets-manager.js +114 -23
- package/dist/modules/external-secrets.ee/providers/aws-secrets-manager.js.map +1 -1
- package/dist/modules/external-secrets.ee/providers/azure-key-vault/azure-key-vault.d.ts +3 -0
- package/dist/modules/external-secrets.ee/providers/azure-key-vault/azure-key-vault.js +136 -32
- package/dist/modules/external-secrets.ee/providers/azure-key-vault/azure-key-vault.js.map +1 -1
- package/dist/modules/external-secrets.ee/providers/gcp-secrets-manager/gcp-secrets-manager.d.ts +2 -0
- package/dist/modules/external-secrets.ee/providers/gcp-secrets-manager/gcp-secrets-manager.js +134 -50
- package/dist/modules/external-secrets.ee/providers/gcp-secrets-manager/gcp-secrets-manager.js.map +1 -1
- package/dist/modules/external-secrets.ee/providers/infisical.d.ts +31 -0
- package/dist/modules/external-secrets.ee/providers/infisical.js +97 -40
- package/dist/modules/external-secrets.ee/providers/infisical.js.map +1 -1
- package/dist/modules/external-secrets.ee/providers/one-password.d.ts +2 -0
- package/dist/modules/external-secrets.ee/providers/one-password.js +97 -41
- package/dist/modules/external-secrets.ee/providers/one-password.js.map +1 -1
- package/dist/modules/external-secrets.ee/providers/vault.d.ts +3 -1
- package/dist/modules/external-secrets.ee/providers/vault.js +126 -33
- package/dist/modules/external-secrets.ee/providers/vault.js.map +1 -1
- package/dist/modules/external-secrets.ee/secrets-cache.service.js +2 -1
- package/dist/modules/external-secrets.ee/secrets-cache.service.js.map +1 -1
- package/dist/modules/favorites/dto/add-favorite.dto.d.ts +1 -1
- package/dist/modules/insights/database/entities/insights-shared.d.ts +1 -1
- package/dist/modules/insights/database/repositories/insights-by-period.repository.d.ts +2 -2
- package/dist/modules/insights/insights-compaction.service.d.ts +4 -2
- package/dist/modules/insights/insights-compaction.service.js +46 -39
- package/dist/modules/insights/insights-compaction.service.js.map +1 -1
- package/dist/modules/insights/insights.service.d.ts +3 -3
- package/dist/modules/insights/insights.service.js +4 -4
- package/dist/modules/insights/insights.service.js.map +1 -1
- package/dist/modules/instance-ai/browser/browser-local-mcp-server.js +1 -1
- package/dist/modules/instance-ai/browser/browser-local-mcp-server.js.map +1 -1
- package/dist/modules/instance-ai/eval/date-anchors.d.ts +1 -0
- package/dist/modules/instance-ai/eval/date-anchors.js +24 -0
- package/dist/modules/instance-ai/eval/date-anchors.js.map +1 -0
- package/dist/modules/instance-ai/eval/eval-timings.d.ts +10 -0
- package/dist/modules/instance-ai/eval/eval-timings.js +50 -0
- package/dist/modules/instance-ai/eval/eval-timings.js.map +1 -0
- package/dist/modules/instance-ai/eval/execution.service.d.ts +1 -0
- package/dist/modules/instance-ai/eval/execution.service.js +175 -26
- package/dist/modules/instance-ai/eval/execution.service.js.map +1 -1
- package/dist/modules/instance-ai/eval/llm-completion-mock.d.ts +7 -0
- package/dist/modules/instance-ai/eval/llm-completion-mock.js +188 -0
- package/dist/modules/instance-ai/eval/llm-completion-mock.js.map +1 -0
- package/dist/modules/instance-ai/eval/llm-wire-server.js +14 -1
- package/dist/modules/instance-ai/eval/llm-wire-server.js.map +1 -1
- package/dist/modules/instance-ai/eval/mock-handler.d.ts +9 -2
- package/dist/modules/instance-ai/eval/mock-handler.js +239 -41
- package/dist/modules/instance-ai/eval/mock-handler.js.map +1 -1
- package/dist/modules/instance-ai/eval/mock-quirks.d.ts +1 -0
- package/dist/modules/instance-ai/eval/mock-quirks.js +47 -2
- package/dist/modules/instance-ai/eval/mock-quirks.js.map +1 -1
- package/dist/modules/instance-ai/eval/pin-data-generator.d.ts +7 -0
- package/dist/modules/instance-ai/eval/pin-data-generator.js +190 -8
- package/dist/modules/instance-ai/eval/pin-data-generator.js.map +1 -1
- package/dist/modules/instance-ai/eval/workflow-analysis.d.ts +2 -0
- package/dist/modules/instance-ai/eval/workflow-analysis.js +25 -3
- package/dist/modules/instance-ai/eval/workflow-analysis.js.map +1 -1
- package/dist/modules/instance-ai/event-bus/in-process-event-bus.d.ts +15 -1
- package/dist/modules/instance-ai/event-bus/in-process-event-bus.js +51 -5
- package/dist/modules/instance-ai/event-bus/in-process-event-bus.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai-error-reporter.service.d.ts +18 -0
- package/dist/modules/instance-ai/instance-ai-error-reporter.service.js +76 -0
- package/dist/modules/instance-ai/instance-ai-error-reporter.service.js.map +1 -0
- package/dist/modules/instance-ai/instance-ai.adapter.service.d.ts +4 -1
- package/dist/modules/instance-ai/instance-ai.adapter.service.js +71 -8
- package/dist/modules/instance-ai/instance-ai.adapter.service.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai.controller.d.ts +5 -5
- package/dist/modules/instance-ai/instance-ai.controller.js +85 -55
- package/dist/modules/instance-ai/instance-ai.controller.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai.service.d.ts +24 -6
- package/dist/modules/instance-ai/instance-ai.service.js +303 -106
- package/dist/modules/instance-ai/instance-ai.service.js.map +1 -1
- package/dist/modules/instance-ai/mcp/instance-ai-mcp-connection.controller.d.ts +2 -1
- package/dist/modules/instance-ai/mcp/instance-ai-mcp-connection.controller.js +12 -0
- package/dist/modules/instance-ai/mcp/instance-ai-mcp-connection.controller.js.map +1 -1
- package/dist/modules/instance-ai/mcp/instance-ai-mcp-registry.service.d.ts +3 -1
- package/dist/modules/instance-ai/mcp/instance-ai-mcp-registry.service.js +78 -11
- package/dist/modules/instance-ai/mcp/instance-ai-mcp-registry.service.js.map +1 -1
- package/dist/modules/instance-ai/message-parser.js +62 -15
- package/dist/modules/instance-ai/message-parser.js.map +1 -1
- package/dist/modules/instance-ai/node-definition-resolver.js +34 -4
- package/dist/modules/instance-ai/node-definition-resolver.js.map +1 -1
- package/dist/modules/instance-ai/observability.d.ts +2 -1
- package/dist/modules/instance-ai/observability.js +2 -1
- package/dist/modules/instance-ai/observability.js.map +1 -1
- package/dist/modules/instance-ai/repositories/instance-ai-pending-confirmation.repository.d.ts +1 -0
- package/dist/modules/instance-ai/repositories/instance-ai-pending-confirmation.repository.js +4 -0
- package/dist/modules/instance-ai/repositories/instance-ai-pending-confirmation.repository.js.map +1 -1
- package/dist/modules/instance-ai/storage/db-iteration-log-storage.js +2 -2
- package/dist/modules/instance-ai/storage/db-iteration-log-storage.js.map +1 -1
- package/dist/modules/instance-ai/storage/typeorm-agent-memory.js +4 -4
- package/dist/modules/instance-ai/storage/typeorm-agent-memory.js.map +1 -1
- package/dist/modules/instance-ai/suspended-run-restorer.service.d.ts +3 -2
- package/dist/modules/instance-ai/suspended-run-restorer.service.js +9 -8
- package/dist/modules/instance-ai/suspended-run-restorer.service.js.map +1 -1
- package/dist/modules/instance-registry/storage/redis-instance-storage.js +9 -8
- package/dist/modules/instance-registry/storage/redis-instance-storage.js.map +1 -1
- package/dist/modules/mcp/mcp-api-key.service.js +2 -2
- package/dist/modules/mcp/mcp-api-key.service.js.map +1 -1
- package/dist/modules/mcp/mcp-server-middleware.service.js +3 -3
- package/dist/modules/mcp/mcp-server-middleware.service.js.map +1 -1
- package/dist/modules/mcp/mcp.service.d.ts +2 -1
- package/dist/modules/mcp/mcp.service.js +3 -2
- package/dist/modules/mcp/mcp.service.js.map +1 -1
- package/dist/modules/mcp/mcp.typeguards.js +9 -9
- package/dist/modules/mcp/mcp.typeguards.js.map +1 -1
- package/dist/modules/mcp/mcp.utils.js +2 -2
- package/dist/modules/mcp/mcp.utils.js.map +1 -1
- package/dist/modules/mcp/tools/execute-workflow.tool.d.ts +8 -8
- package/dist/modules/mcp/tools/execute-workflow.tool.js +2 -1
- package/dist/modules/mcp/tools/execute-workflow.tool.js.map +1 -1
- package/dist/modules/mcp/tools/execution-utils.js +2 -1
- package/dist/modules/mcp/tools/execution-utils.js.map +1 -1
- package/dist/modules/mcp/tools/get-execution.tool.js +2 -1
- package/dist/modules/mcp/tools/get-execution.tool.js.map +1 -1
- package/dist/modules/mcp/tools/get-workflow-details.tool.d.ts +2 -2
- package/dist/modules/mcp/tools/get-workflow-details.tool.js +5 -5
- package/dist/modules/mcp/tools/get-workflow-details.tool.js.map +1 -1
- package/dist/modules/mcp/tools/get-workflow-history.tool.d.ts +4 -4
- package/dist/modules/mcp/tools/get-workflow-history.tool.js +2 -2
- package/dist/modules/mcp/tools/get-workflow-history.tool.js.map +1 -1
- package/dist/modules/mcp/tools/get-workflow-version.tool.js +2 -2
- package/dist/modules/mcp/tools/get-workflow-version.tool.js.map +1 -1
- package/dist/modules/mcp/tools/publish-workflow.tool.js +2 -1
- package/dist/modules/mcp/tools/publish-workflow.tool.js.map +1 -1
- package/dist/modules/mcp/tools/schemas.d.ts +52 -52
- package/dist/modules/mcp/tools/test-workflow.tool.js +2 -1
- package/dist/modules/mcp/tools/test-workflow.tool.js.map +1 -1
- package/dist/modules/mcp/tools/unpublish-workflow.tool.js +2 -1
- package/dist/modules/mcp/tools/unpublish-workflow.tool.js.map +1 -1
- package/dist/modules/mcp/tools/webhook-utils.d.ts +2 -3
- package/dist/modules/mcp/tools/webhook-utils.js +15 -21
- package/dist/modules/mcp/tools/webhook-utils.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-builder/get-workflow-node-types.tool.d.ts +2 -2
- package/dist/modules/mcp/tools/workflow-builder/restore-workflow-version.tool.js +2 -2
- package/dist/modules/mcp/tools/workflow-builder/restore-workflow-version.tool.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-builder/validate-node.tool.d.ts +2 -2
- package/dist/modules/mcp/tools/workflow-builder/workflow-operations.d.ts +85 -85
- package/dist/modules/mcp-registry/mcp-registry-node-loader.js +2 -1
- package/dist/modules/mcp-registry/mcp-registry-node-loader.js.map +1 -1
- package/dist/modules/n8n-packages/engine/import-pipeline.js +14 -1
- package/dist/modules/n8n-packages/engine/import-pipeline.js.map +1 -1
- package/dist/modules/n8n-packages/entities/folder/folder.exporter.d.ts +31 -0
- package/dist/modules/n8n-packages/entities/folder/folder.exporter.js +115 -0
- package/dist/modules/n8n-packages/entities/folder/folder.exporter.js.map +1 -0
- package/dist/modules/n8n-packages/entities/folder/folder.serializer.d.ts +5 -0
- package/dist/modules/n8n-packages/entities/folder/folder.serializer.js +25 -0
- package/dist/modules/n8n-packages/entities/folder/folder.serializer.js.map +1 -0
- package/dist/modules/n8n-packages/entities/project/project.exporter.d.ts +20 -0
- package/dist/modules/n8n-packages/entities/project/project.exporter.js +59 -0
- package/dist/modules/n8n-packages/entities/project/project.exporter.js.map +1 -0
- package/dist/modules/n8n-packages/entities/project/project.serializer.d.ts +5 -0
- package/dist/modules/n8n-packages/entities/project/project.serializer.js +26 -0
- package/dist/modules/n8n-packages/entities/project/project.serializer.js.map +1 -0
- package/dist/modules/n8n-packages/entities/requirements.types.d.ts +5 -0
- package/dist/modules/n8n-packages/entities/requirements.types.js +8 -0
- package/dist/modules/n8n-packages/entities/requirements.types.js.map +1 -0
- package/dist/modules/n8n-packages/entities/workflow/workflow-publisher.js +2 -2
- package/dist/modules/n8n-packages/entities/workflow/workflow-publisher.js.map +1 -1
- package/dist/modules/n8n-packages/entities/workflow/workflow.exporter.d.ts +3 -5
- package/dist/modules/n8n-packages/entities/workflow/workflow.exporter.js +2 -2
- package/dist/modules/n8n-packages/entities/workflow/workflow.exporter.js.map +1 -1
- package/dist/modules/n8n-packages/io/slug.utils.d.ts +1 -1
- package/dist/modules/n8n-packages/io/slug.utils.js +1 -2
- package/dist/modules/n8n-packages/io/slug.utils.js.map +1 -1
- package/dist/modules/n8n-packages/io/unique-filename-allocator.d.ts +3 -2
- package/dist/modules/n8n-packages/io/unique-filename-allocator.js +3 -0
- package/dist/modules/n8n-packages/io/unique-filename-allocator.js.map +1 -1
- package/dist/modules/n8n-packages/n8n-packages.module.js +1 -1
- package/dist/modules/n8n-packages/n8n-packages.module.js.map +1 -1
- package/dist/modules/n8n-packages/n8n-packages.service.d.ts +11 -3
- package/dist/modules/n8n-packages/n8n-packages.service.js +77 -16
- package/dist/modules/n8n-packages/n8n-packages.service.js.map +1 -1
- package/dist/modules/n8n-packages/n8n-packages.types.d.ts +21 -2
- package/dist/modules/n8n-packages/n8n-packages.types.js.map +1 -1
- package/dist/modules/n8n-packages/spec/manifest.schema.d.ts +88 -22
- package/dist/modules/n8n-packages/spec/manifest.schema.js +20 -12
- package/dist/modules/n8n-packages/spec/manifest.schema.js.map +1 -1
- package/dist/modules/n8n-packages/spec/requirements.schema.d.ts +8 -8
- package/dist/modules/n8n-packages/spec/serialized/credential.schema.d.ts +2 -2
- package/dist/modules/n8n-packages/spec/serialized/folder.schema.d.ts +15 -0
- package/dist/modules/n8n-packages/spec/serialized/folder.schema.js +12 -0
- package/dist/modules/n8n-packages/spec/serialized/folder.schema.js.map +1 -0
- package/dist/modules/n8n-packages/spec/serialized/project.schema.d.ts +33 -0
- package/dist/modules/n8n-packages/spec/serialized/project.schema.js +15 -0
- package/dist/modules/n8n-packages/spec/serialized/project.schema.js.map +1 -0
- package/dist/modules/n8n-packages/spec/serialized/workflow.schema.d.ts +32 -32
- package/dist/modules/oauth-jwe/oauth-jwe-key.service.js +2 -2
- package/dist/modules/oauth-jwe/oauth-jwe-key.service.js.map +1 -1
- package/dist/modules/oauth-server/oauth-token.service.js +2 -1
- package/dist/modules/oauth-server/oauth-token.service.js.map +1 -1
- package/dist/modules/oauth-server/protected-resource-resolvers/workflow-mcp-test-trigger-resource.resolver.js +2 -2
- package/dist/modules/oauth-server/protected-resource-resolvers/workflow-mcp-test-trigger-resource.resolver.js.map +1 -1
- package/dist/modules/otel/execution-level-tracer.js +32 -8
- package/dist/modules/otel/execution-level-tracer.js.map +1 -1
- package/dist/modules/otel/execution-level-tracer.types.d.ts +2 -0
- package/dist/modules/otel/execution-level-tracer.types.js.map +1 -1
- package/dist/modules/provisioning.ee/provisioning.service.ee.d.ts +1 -0
- package/dist/modules/provisioning.ee/provisioning.service.ee.js +38 -15
- package/dist/modules/provisioning.ee/provisioning.service.ee.js.map +1 -1
- package/dist/modules/quick-connect/quick-connect.config.d.ts +19 -19
- package/dist/modules/quick-connect/quick-connect.module.d.ts +8 -8
- package/dist/modules/source-control.ee/source-control-export.service.ee.js +3 -1
- package/dist/modules/source-control.ee/source-control-export.service.ee.js.map +1 -1
- package/dist/modules/source-control.ee/source-control-helper.ee.js +2 -0
- package/dist/modules/source-control.ee/source-control-helper.ee.js.map +1 -1
- package/dist/modules/source-control.ee/source-control-import.service.ee.js +15 -10
- package/dist/modules/source-control.ee/source-control-import.service.ee.js.map +1 -1
- package/dist/modules/source-control.ee/source-control.controller.ee.d.ts +6 -6
- package/dist/modules/source-control.ee/source-control.controller.ee.js +3 -3
- package/dist/modules/source-control.ee/source-control.controller.ee.js.map +1 -1
- package/dist/modules/source-control.ee/source-control.service.ee.d.ts +2 -2
- package/dist/modules/source-control.ee/source-control.service.ee.js +2 -2
- package/dist/modules/source-control.ee/source-control.service.ee.js.map +1 -1
- package/dist/modules/source-control.ee/types/exportable-credential.d.ts +2 -0
- package/dist/modules/sso-saml/saml.controller.ee.d.ts +2 -2
- package/dist/modules/token-exchange/token-exchange.schemas.d.ts +8 -8
- package/dist/modules/workflow-index/workflow-index.service.js +3 -2
- package/dist/modules/workflow-index/workflow-index.service.js.map +1 -1
- package/dist/node-types.d.ts +1 -0
- package/dist/node-types.js +17 -3
- package/dist/node-types.js.map +1 -1
- package/dist/oauth/oauth.service.d.ts +5 -0
- package/dist/oauth/oauth.service.js +45 -15
- package/dist/oauth/oauth.service.js.map +1 -1
- package/dist/public-api/types.d.ts +28 -1
- package/dist/public-api/v1/handlers/data-tables/data-tables.rows.handler.d.ts +1 -0
- package/dist/public-api/v1/handlers/data-tables/data-tables.rows.handler.js +15 -0
- package/dist/public-api/v1/handlers/data-tables/data-tables.rows.handler.js.map +1 -1
- package/dist/public-api/v1/handlers/discover/discover.service.js +11 -11
- package/dist/public-api/v1/handlers/discover/discover.service.js.map +1 -1
- package/dist/public-api/v1/handlers/evaluations/evaluations.handler.d.ts +9 -0
- package/dist/public-api/v1/handlers/evaluations/evaluations.handler.js +64 -0
- package/dist/public-api/v1/handlers/evaluations/evaluations.handler.js.map +1 -0
- package/dist/public-api/v1/handlers/evaluations/evaluations.mapper.d.ts +9 -0
- package/dist/public-api/v1/handlers/evaluations/evaluations.mapper.js +34 -0
- package/dist/public-api/v1/handlers/evaluations/evaluations.mapper.js.map +1 -0
- package/dist/public-api/v1/handlers/executions/executions.handler.js +1 -0
- package/dist/public-api/v1/handlers/executions/executions.handler.js.map +1 -1
- package/dist/public-api/v1/handlers/n8n-packages/n8n-packages.handler.d.ts +5 -3
- package/dist/public-api/v1/handlers/n8n-packages/n8n-packages.handler.js +53 -26
- package/dist/public-api/v1/handlers/n8n-packages/n8n-packages.handler.js.map +1 -1
- package/dist/public-api/v1/handlers/projects/projects.handler.js +10 -0
- package/dist/public-api/v1/handlers/projects/projects.handler.js.map +1 -1
- package/dist/public-api/v1/openapi.yml +300 -18
- package/dist/public-api/v1/shared/middlewares/global.middleware.d.ts +1 -0
- package/dist/public-api/v1/shared/middlewares/global.middleware.js +6 -0
- package/dist/public-api/v1/shared/middlewares/global.middleware.js.map +1 -1
- package/dist/push/index.js +3 -3
- package/dist/push/index.js.map +1 -1
- package/dist/requests.d.ts +1 -0
- package/dist/response-helper.js +2 -1
- package/dist/response-helper.js.map +1 -1
- package/dist/scaling/constants.d.ts +3 -2
- package/dist/scaling/constants.js +4 -1
- package/dist/scaling/constants.js.map +1 -1
- package/dist/scaling/job-processor.js +1 -0
- package/dist/scaling/job-processor.js.map +1 -1
- package/dist/scaling/leader-election-client.d.ts +1 -1
- package/dist/scaling/leader-election-client.js +13 -12
- package/dist/scaling/leader-election-client.js.map +1 -1
- package/dist/scaling/pubsub/pubsub.event-map.d.ts +11 -1
- package/dist/scaling/pubsub/pubsub.types.d.ts +3 -1
- package/dist/scaling/redis-lock.service.js +5 -5
- package/dist/scaling/redis-lock.service.js.map +1 -1
- package/dist/scaling/scaling.service.js +3 -2
- package/dist/scaling/scaling.service.js.map +1 -1
- package/dist/scaling/scaling.types.d.ts +1 -0
- package/dist/services/folder-finder.service.d.ts +12 -0
- package/dist/services/folder-finder.service.js +58 -0
- package/dist/services/folder-finder.service.js.map +1 -0
- package/dist/services/frontend.service.js +3 -0
- package/dist/services/frontend.service.js.map +1 -1
- package/dist/services/import.service.js +2 -2
- package/dist/services/import.service.js.map +1 -1
- package/dist/services/project.service.ee.d.ts +1 -0
- package/dist/services/project.service.ee.js +21 -1
- package/dist/services/project.service.ee.js.map +1 -1
- package/dist/services/protected-resource.registry.js +2 -2
- package/dist/services/protected-resource.registry.js.map +1 -1
- package/dist/services/proxy-token-manager.js +2 -2
- package/dist/services/proxy-token-manager.js.map +1 -1
- package/dist/services/pruning/executions-pruning.service.js +3 -3
- package/dist/services/pruning/executions-pruning.service.js.map +1 -1
- package/dist/services/pruning/workflow-history-compaction.service.js +2 -1
- package/dist/services/pruning/workflow-history-compaction.service.js.map +1 -1
- package/dist/services/redis-client.service.js +5 -2
- package/dist/services/redis-client.service.js.map +1 -1
- package/dist/services/role.service.d.ts +3 -3
- package/dist/services/role.service.js +9 -3
- package/dist/services/role.service.js.map +1 -1
- package/dist/services/url.service.d.ts +1 -0
- package/dist/services/url.service.js +10 -5
- package/dist/services/url.service.js.map +1 -1
- package/dist/services/workflow-statistics-rollup.service.d.ts +31 -0
- package/dist/services/workflow-statistics-rollup.service.js +160 -0
- package/dist/services/workflow-statistics-rollup.service.js.map +1 -0
- package/dist/services/workflow-statistics.service.d.ts +5 -2
- package/dist/services/workflow-statistics.service.js +37 -15
- package/dist/services/workflow-statistics.service.js.map +1 -1
- package/dist/task-runners/task-managers/task-requester.d.ts +2 -1
- package/dist/task-runners/task-managers/task-requester.js +3 -3
- package/dist/task-runners/task-managers/task-requester.js.map +1 -1
- package/dist/wait-tracker.js +2 -1
- package/dist/wait-tracker.js.map +1 -1
- package/dist/webhooks/webhook-helpers.d.ts +2 -1
- package/dist/webhooks/webhook-helpers.js +5 -4
- package/dist/webhooks/webhook-helpers.js.map +1 -1
- package/dist/webhooks/webhook-last-node-response-extractor.d.ts +2 -1
- package/dist/webhooks/webhook-last-node-response-extractor.js +12 -11
- package/dist/webhooks/webhook-last-node-response-extractor.js.map +1 -1
- package/dist/webhooks/webhook-request-handler.js +2 -2
- package/dist/webhooks/webhook-request-handler.js.map +1 -1
- package/dist/webhooks/webhook-response-headers.js +2 -2
- package/dist/webhooks/webhook-response-headers.js.map +1 -1
- package/dist/webhooks/webhook.service.js +6 -5
- package/dist/webhooks/webhook.service.js.map +1 -1
- package/dist/workflow-execute-additional-data.js +6 -13
- package/dist/workflow-execute-additional-data.js.map +1 -1
- package/dist/workflow-runner.d.ts +2 -1
- package/dist/workflow-runner.js +1 -0
- package/dist/workflow-runner.js.map +1 -1
- package/dist/workflows/publication/workflow-publication-applier.js +2 -2
- package/dist/workflows/publication/workflow-publication-applier.js.map +1 -1
- package/dist/workflows/publication/workflow-publication-notifier.d.ts +12 -0
- package/dist/workflows/publication/workflow-publication-notifier.js +78 -0
- package/dist/workflows/publication/workflow-publication-notifier.js.map +1 -0
- package/dist/workflows/publication/workflow-publication-outbox-cleanup.service.d.ts +3 -1
- package/dist/workflows/publication/workflow-publication-outbox-cleanup.service.js +13 -2
- package/dist/workflows/publication/workflow-publication-outbox-cleanup.service.js.map +1 -1
- package/dist/workflows/publication/workflow-publication-outbox-consumer.d.ts +4 -1
- package/dist/workflows/publication/workflow-publication-outbox-consumer.js +61 -11
- package/dist/workflows/publication/workflow-publication-outbox-consumer.js.map +1 -1
- package/dist/workflows/publication/workflow-publication-status.service.d.ts +9 -0
- package/dist/workflows/publication/workflow-publication-status.service.js +54 -0
- package/dist/workflows/publication/workflow-publication-status.service.js.map +1 -0
- package/dist/workflows/triggers/non-webhook-trigger-registrar.d.ts +1 -1
- package/dist/workflows/triggers/trigger-activation-retry.js +2 -1
- package/dist/workflows/triggers/trigger-activation-retry.js.map +1 -1
- package/dist/workflows/triggers/trigger-execution-context.factory.d.ts +2 -2
- package/dist/workflows/triggers/trigger-execution-context.factory.js +1 -1
- package/dist/workflows/triggers/trigger-execution-context.factory.js.map +1 -1
- package/dist/workflows/triggers/webhook-trigger-registrar.js +2 -1
- package/dist/workflows/triggers/webhook-trigger-registrar.js.map +1 -1
- package/dist/workflows/triggers/workflow-trigger-activator.d.ts +7 -1
- package/dist/workflows/triggers/workflow-trigger-activator.js +64 -10
- package/dist/workflows/triggers/workflow-trigger-activator.js.map +1 -1
- package/dist/workflows/workflow-execution.service.d.ts +2 -1
- package/dist/workflows/workflow-execution.service.js.map +1 -1
- package/dist/workflows/workflow-finder.service.d.ts +1 -0
- package/dist/workflows/workflow-finder.service.js +21 -0
- package/dist/workflows/workflow-finder.service.js.map +1 -1
- package/dist/workflows/workflow-history/workflow-history.service.js +2 -1
- package/dist/workflows/workflow-history/workflow-history.service.js.map +1 -1
- package/dist/workflows/workflow-published-data.service.js +2 -2
- package/dist/workflows/workflow-published-data.service.js.map +1 -1
- package/dist/workflows/workflow-validation.service.js +3 -2
- package/dist/workflows/workflow-validation.service.js.map +1 -1
- package/dist/workflows/workflow.service.d.ts +8 -6
- package/dist/workflows/workflow.service.js +9 -3
- package/dist/workflows/workflow.service.js.map +1 -1
- package/dist/workflows/workflows.controller.d.ts +31 -28
- package/dist/workflows/workflows.controller.js +28 -4
- package/dist/workflows/workflows.controller.js.map +1 -1
- package/package.json +41 -37
- package/dist/modules/agents/builder/builder-model-lookup.service.d.ts +0 -17
- package/dist/modules/agents/builder/builder-model-lookup.service.js +0 -67
- package/dist/modules/agents/builder/builder-model-lookup.service.js.map +0 -1
- package/dist/modules/n8n-packages/n8n-packages.controller.d.ts +0 -10
- package/dist/modules/n8n-packages/n8n-packages.controller.js +0 -44
- package/dist/modules/n8n-packages/n8n-packages.controller.js.map +0 -1
|
@@ -1,17 +1,22 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.buildDateAnchors = void 0;
|
|
3
4
|
exports.createLlmMockHandler = createLlmMockHandler;
|
|
4
|
-
exports.
|
|
5
|
+
exports.extractDateFilterConstraints = extractDateFilterConstraints;
|
|
6
|
+
exports.findDateFilterViolations = findDateFilterViolations;
|
|
5
7
|
const backend_common_1 = require("@n8n/backend-common");
|
|
6
8
|
const di_1 = require("@n8n/di");
|
|
7
9
|
const instance_ai_1 = require("@n8n/instance-ai");
|
|
8
10
|
const n8n_core_1 = require("n8n-core");
|
|
9
11
|
const zod_1 = require("zod");
|
|
10
12
|
const api_docs_1 = require("./api-docs");
|
|
13
|
+
const date_anchors_1 = require("./date-anchors");
|
|
11
14
|
const mock_quirks_1 = require("./mock-quirks");
|
|
12
15
|
const node_config_1 = require("./node-config");
|
|
13
16
|
const request_binary_redactor_1 = require("./request-binary-redactor");
|
|
14
17
|
const request_sanitizer_1 = require("./request-sanitizer");
|
|
18
|
+
var date_anchors_2 = require("./date-anchors");
|
|
19
|
+
Object.defineProperty(exports, "buildDateAnchors", { enumerable: true, get: function () { return date_anchors_2.buildDateAnchors; } });
|
|
15
20
|
const MOCK_SYSTEM_PROMPT = `You generate realistic HTTP responses for one specific request, mocking an API in n8n workflow evaluation.
|
|
16
21
|
|
|
17
22
|
You get everything you need in the user message: the request (service, method, URL, body, query), API docs for the endpoint, the n8n node's parameters, and optional context (globalContext, nodeHint, scenarioHints).
|
|
@@ -24,11 +29,13 @@ You get everything you need in the user message: the request (service, method, U
|
|
|
24
29
|
**Write operations (POST / PUT / PATCH that create or modify a resource):**
|
|
25
30
|
Return the FULL resource object the API produces on success — not a minimal acknowledgement-only response. When the docs show multiple response variants for one endpoint, default to the FULL/complete one. Use a partial/minimal variant only if the request body contains the explicit field that triggers it (e.g. \`template\`, \`async: true\`).
|
|
26
31
|
|
|
27
|
-
Each request is mocked independently. Even when the same node makes multiple similar calls in a workflow, every call must produce a fully-shaped response on its own — never shortcut later calls.
|
|
32
|
+
Each request is mocked independently. Even when the same node makes multiple similar calls in a workflow, every call must produce a fully-shaped response on its own — never shortcut later calls. (Byte-identical repeats of a request you already answered are served from a cache and never reach you — any request you DO see is distinct and needs its own full response.)
|
|
28
33
|
|
|
29
34
|
Response SHAPE comes from the API docs; DATA VALUES come from the node config. Use names/IDs from the config exactly (case-sensitive).
|
|
30
35
|
|
|
31
|
-
**Honor explicit values from the scenario and hints.** When the scenarioHints, nodeHint, or globalContext state a specific value — a quantity with a unit, a percentage, a monetary amount ("$1,200"), a count ("3 rows"), a threshold, an ID, or a name — reproduce that EXACT value in the response. Do NOT round it, soften it toward a "more typical" reading, or substitute your own estimate: the stated value is the test's intent, and downstream nodes (IF/Switch gates, filters, sums) compare against it. Emit the exact number of enumerated items the context describes. Only invent a value when the context gives none for that field. If a nodeHint and the scenario disagree, the scenario wins.
|
|
36
|
+
**Honor explicit values from the scenario and hints.** When the scenarioHints, nodeHint, or globalContext state a specific value — a quantity with a unit, a percentage, a monetary amount ("$1,200"), a count ("3 rows"), a threshold, an ID, or a name — reproduce that EXACT value in the response. Do NOT round it, soften it toward a "more typical" reading, or substitute your own estimate: the stated value is the test's intent, and downstream nodes (IF/Switch gates, filters, sums) compare against it. Emit the exact number of enumerated items the context describes. This extends to per-item constraints: when the scenario says EVERY/ALL items share a property (a literal substring every title must contain, a minimum every row must exceed), EVERY item you generate must satisfy it — check each item against the constraint character-by-character before responding (near-miss variants of a required literal fail the test). Only invent a value when the context gives none for that field. If a nodeHint and the scenario disagree, the scenario wins. When the context assigns an error or missing-data condition to a specific entity (one channel, one user, one record), compare THIS request's parameters (URL, query, body) against that entity: return the error response ONLY when this request targets it, and a normal success response for every other entity — an error scenario is only tested if the matching request actually fails.
|
|
37
|
+
|
|
38
|
+
**Honor request filters.** When the request narrows results — a date-range constraint (\`gte\`/\`lte\`/\`since\`/\`after\`/\`before\` params, or filter variables inside a GraphQL query), a status/type filter, a search query, or a \`limit\` — EVERY record in your response MUST satisfy it. Never include records outside the requested window "for realism": workflows re-filter and count your records against the real clock, and one out-of-window item changes the counts the test asserts. For date filters, resolve the requested window against the Date anchors and double-check every returned timestamp falls inside it. When the scenario says records exist "in the last N days", place them safely inside that window (e.g. 2–5 days ago), never on the boundary and never on training-data dates. When the scenario ALSO describes records outside the window (e.g. "two issues from 3 weeks ago"), those records exist in storage but the API filters them out server-side — EXCLUDE them from this response entirely; never shift their dates into the window to keep them visible (their age is part of the test's setup, and the excluded records are how the test verifies the filter works).
|
|
32
39
|
|
|
33
40
|
**Node response-handling options are not part of the body.** The node config may include options that control how n8n post-processes the response — \`fullResponse\`, \`responseFormat\`, \`outputPropertyName\`, pagination. These are applied AFTER you return and must NOT change the body you produce: always return the raw body the real API sends over the wire. Never reshape the body to mimic them — a body shaped like \`{ statusCode, headers, body }\` (mimicking \`fullResponse\`) or \`{ <outputPropertyName>: ... }\` is wrong.
|
|
34
41
|
|
|
@@ -43,6 +50,8 @@ Node-config patterns to know:
|
|
|
43
50
|
|
|
44
51
|
Match THIS request only (URL + method): a node may make multiple sequential calls; reply to the specific one shown. Echo identifiers, placeholders, and reference values from the request back into the response. Return a single page (don't expect multi-page cursor follow-up), but keep the API's real envelope and mark it as the final page (e.g. \`nextCursor: null\`, \`has_more: false\`).
|
|
45
52
|
|
|
53
|
+
**Keep list responses small.** Generate the MINIMUM data that satisfies the request, scenario, and workflow logic. For list/feed/forecast endpoints, return only as many entries as the downstream logic needs — a 5-day hourly forecast does not need all 40 entries, just enough to cover the window the workflow filters on (default 5-8 entries, at most ~20). Exception: when the scenario, hints, or the request's own parameters state an exact count or a larger dataset, honor that exactly — never shrink an explicitly-specified dataset. Oversized responses are slow to generate and risk aborting the whole request.
|
|
54
|
+
|
|
46
55
|
For APIs that return empty responses on success (204/202), call submit_response with type="json" and body={}.
|
|
47
56
|
|
|
48
57
|
**Binary / file responses.** Pick \`type: "binary"\` when the request URL or node parameters indicate a file download — Telegram \`getFile\` / \`/file/bot...\`, Google Drive \`alt=media\`, Dropbox \`/files/download\`, OneDrive \`/items/{id}/content\`, S3 \`GetObject\`, OpenAI \`audio/transcriptions\` source file, or any path containing \`/download\`, \`/file\`, \`/attachment\`, \`/media\`, \`/image\`, \`/voice\`, \`/audio\`, \`/export\`. Always set \`contentType\` (real MIME like \`application/pdf\`, \`audio/ogg\`, \`image/png\`) and \`filename\` (with the correct extension). Use \`sizeHint\` only when the scenario hints mention file size constraints (e.g. "rejects files > 100KB"). Do NOT pick \`binary\` for JSON metadata endpoints like Slack \`files.upload\`, \`files.info\`, or Telegram \`getFile\` (which returns a JSON envelope describing the file — the binary comes from the follow-up \`/file/bot.../path\` request). Exception: when the document at a download/export path is itself textual (CSV, XML, HTML, plain text) and the scenario or node hints specify its contents, use \`type: "text"\` with the exact document — reserve \`binary\` for opaque formats (PDF, images, audio, video, archives).
|
|
@@ -51,25 +60,87 @@ For APIs that return empty responses on success (204/202), call submit_response
|
|
|
51
60
|
const DEFAULT_MAX_RETRIES = 1;
|
|
52
61
|
const ERROR_PREVIEW_MAX = 400;
|
|
53
62
|
const ERROR_DETAIL_MAX = 300;
|
|
63
|
+
const LLM_CALL_TIMEOUT_MS = 120_000;
|
|
64
|
+
const LLM_CALL_RETRY_TIMEOUT_MS = 300_000;
|
|
54
65
|
function createLlmMockHandler(options) {
|
|
55
66
|
const nodeConfigCache = new Map();
|
|
67
|
+
const responseCache = new Map();
|
|
56
68
|
return async (requestOptions, node) => {
|
|
57
|
-
|
|
58
|
-
nodeConfigCache.
|
|
69
|
+
try {
|
|
70
|
+
if (!nodeConfigCache.has(node.name)) {
|
|
71
|
+
nodeConfigCache.set(node.name, (0, node_config_1.extractNodeConfig)(node));
|
|
72
|
+
}
|
|
73
|
+
const cacheKey = buildMockCacheKey(requestOptions, node.name);
|
|
74
|
+
const cached = cacheKey ? responseCache.get(cacheKey) : undefined;
|
|
75
|
+
if (cached) {
|
|
76
|
+
di_1.Container.get(backend_common_1.Logger).debug(`[EvalMock] Serving cached mock for ${requestOptions.method ?? 'GET'} ${extractEndpoint(requestOptions.url)} ("${node.name}")`);
|
|
77
|
+
return cloneMockResponse(await cached);
|
|
78
|
+
}
|
|
79
|
+
const pending = generateMockResponse(requestOptions, node, {
|
|
80
|
+
scenarioHints: options?.scenarioHints,
|
|
81
|
+
globalContext: options?.globalContext,
|
|
82
|
+
nodeHint: options?.nodeHints?.[node.name],
|
|
83
|
+
pinnedOutputs: options?.pinnedOutputs,
|
|
84
|
+
nodeConfig: nodeConfigCache.get(node.name) ?? '',
|
|
85
|
+
maxRetries: options?.maxRetries ?? DEFAULT_MAX_RETRIES,
|
|
86
|
+
});
|
|
87
|
+
if (cacheKey) {
|
|
88
|
+
responseCache.set(cacheKey, pending);
|
|
89
|
+
void pending.then((response) => {
|
|
90
|
+
if (isMockErrorSentinel(response) || softFallbackResponses.has(response)) {
|
|
91
|
+
responseCache.delete(cacheKey);
|
|
92
|
+
}
|
|
93
|
+
}, () => responseCache.delete(cacheKey));
|
|
94
|
+
}
|
|
95
|
+
return cloneMockResponse(await pending);
|
|
59
96
|
}
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
97
|
+
catch (error) {
|
|
98
|
+
return buildPipelineErrorResponse(error, requestOptions, node.name);
|
|
99
|
+
}
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
const softFallbackResponses = new WeakSet();
|
|
103
|
+
function cloneMockResponse(response) {
|
|
104
|
+
const body = Buffer.isBuffer(response.body)
|
|
105
|
+
? Buffer.from(response.body)
|
|
106
|
+
: response.body !== null && typeof response.body === 'object'
|
|
107
|
+
? structuredClone(response.body)
|
|
108
|
+
: response.body;
|
|
109
|
+
return { ...response, body, headers: { ...response.headers } };
|
|
110
|
+
}
|
|
111
|
+
function buildPipelineErrorResponse(error, request, nodeName) {
|
|
112
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
113
|
+
const stack = error instanceof Error && error.stack ? error.stack.replace(/\s*\n\s*/g, ' <- ') : '(no stack)';
|
|
114
|
+
di_1.Container.get(backend_common_1.Logger).error(`[EvalMock] Mock pipeline error for "${nodeName}" (${request.method ?? 'GET'} ${extractEndpoint(request.url ?? '')}): ${message} | stack: ${stack}`);
|
|
115
|
+
return {
|
|
116
|
+
body: { _evalMockError: true, message: `Mock pipeline error: ${message}` },
|
|
117
|
+
headers: { 'content-type': 'application/json' },
|
|
118
|
+
statusCode: 200,
|
|
67
119
|
};
|
|
68
120
|
}
|
|
121
|
+
function buildMockCacheKey(request, nodeName) {
|
|
122
|
+
try {
|
|
123
|
+
const bodyKey = request.body === undefined
|
|
124
|
+
? ''
|
|
125
|
+
: JSON.stringify((0, request_binary_redactor_1.redactBinaryBody)(request.body, getContentType(request.headers)));
|
|
126
|
+
const qsKey = request.qs ? JSON.stringify(request.qs) : '';
|
|
127
|
+
return [nodeName, request.method ?? 'GET', request.url, qsKey, bodyKey].join('\u0000');
|
|
128
|
+
}
|
|
129
|
+
catch {
|
|
130
|
+
return undefined;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
function isMockErrorSentinel(response) {
|
|
134
|
+
const body = response.body;
|
|
135
|
+
return (typeof body === 'object' && body !== null && !Array.isArray(body) && '_evalMockError' in body);
|
|
136
|
+
}
|
|
69
137
|
async function generateMockResponse(request, node, context) {
|
|
138
|
+
if (!request.url) {
|
|
139
|
+
return buildMissingUrlResponse(node);
|
|
140
|
+
}
|
|
70
141
|
const serviceName = extractServiceName(request.url);
|
|
71
142
|
const endpoint = extractEndpoint(request.url);
|
|
72
|
-
const dateAnchors = buildDateAnchors(new Date());
|
|
143
|
+
const dateAnchors = (0, date_anchors_1.buildDateAnchors)(new Date());
|
|
73
144
|
const sections = [
|
|
74
145
|
'## Request',
|
|
75
146
|
`Service: ${serviceName}`,
|
|
@@ -111,6 +182,11 @@ async function generateMockResponse(request, node, context) {
|
|
|
111
182
|
: '(Use "error" type with appropriate statusCode for error scenarios.)');
|
|
112
183
|
}
|
|
113
184
|
}
|
|
185
|
+
if (context.pinnedOutputs) {
|
|
186
|
+
sections.push('', '## Pinned node outputs (authoritative)');
|
|
187
|
+
sections.push('These nodes already have fixed outputs in this execution. Your response MUST stay consistent with them — reuse the same entities, IDs, statuses, and timestamps wherever the scenario implies they refer to the same data (e.g. "stored record matches current status").');
|
|
188
|
+
sections.push(context.pinnedOutputs);
|
|
189
|
+
}
|
|
114
190
|
sections.push('', '## Date anchors', dateAnchors);
|
|
115
191
|
const userPrompt = sections.join('\n');
|
|
116
192
|
const safeUrl = extractEndpoint(request.url);
|
|
@@ -118,15 +194,20 @@ async function generateMockResponse(request, node, context) {
|
|
|
118
194
|
const requestPath = extractEndpointPath(request.url);
|
|
119
195
|
const requestMethod = request.method ?? 'GET';
|
|
120
196
|
const requestHostname = extractHostname(request.url);
|
|
197
|
+
const dateConstraints = extractDateFilterConstraints(request.body, request.qs);
|
|
121
198
|
for (let attempt = 0; attempt <= context.maxRetries; attempt++) {
|
|
122
199
|
try {
|
|
123
|
-
const spec = await callLlm(userPrompt, {
|
|
200
|
+
const { spec, softOnly } = await callLlm(userPrompt, {
|
|
124
201
|
serviceName,
|
|
125
202
|
method: requestMethod,
|
|
126
203
|
pathname: requestPath,
|
|
127
204
|
hostname: requestHostname,
|
|
128
|
-
});
|
|
129
|
-
|
|
205
|
+
}, attempt === 0 ? LLM_CALL_TIMEOUT_MS : LLM_CALL_RETRY_TIMEOUT_MS, dateConstraints);
|
|
206
|
+
applyEndpointNormalizers(request, spec);
|
|
207
|
+
const response = materializeSpec(spec);
|
|
208
|
+
if (softOnly)
|
|
209
|
+
softFallbackResponses.add(response);
|
|
210
|
+
return response;
|
|
130
211
|
}
|
|
131
212
|
catch (error) {
|
|
132
213
|
lastError = error instanceof Error ? error.message : String(error);
|
|
@@ -142,6 +223,112 @@ async function generateMockResponse(request, node, context) {
|
|
|
142
223
|
statusCode: 200,
|
|
143
224
|
};
|
|
144
225
|
}
|
|
226
|
+
function buildMissingUrlResponse(node) {
|
|
227
|
+
const params = node.parameters ?? {};
|
|
228
|
+
const resource = typeof params.resource === 'string' ? params.resource : undefined;
|
|
229
|
+
const operation = typeof params.operation === 'string' ? params.operation : undefined;
|
|
230
|
+
const configured = resource || operation
|
|
231
|
+
? ` (configured resource/operation: "${resource ?? '?'}" / "${operation ?? '?'}")`
|
|
232
|
+
: '';
|
|
233
|
+
di_1.Container.get(backend_common_1.Logger).warn(`[EvalMock] Request from "${node.name}" (${node.type}) has no URL${configured} — returning 400 instead of mocking`);
|
|
234
|
+
return {
|
|
235
|
+
body: {
|
|
236
|
+
error: {
|
|
237
|
+
message: `Invalid request: the node sent an HTTP request without a URL${configured}. This means the node's routing produced an empty request — typically the selected resource/operation does not exist on node type "${node.type}". Fix the node configuration or use a node type that supports this operation.`,
|
|
238
|
+
},
|
|
239
|
+
},
|
|
240
|
+
headers: { 'content-type': 'application/json' },
|
|
241
|
+
statusCode: 400,
|
|
242
|
+
};
|
|
243
|
+
}
|
|
244
|
+
const MIN_DATE_KEY = /^(gte|gt|since|after|created_?after|updated_?after|from|start_?(date|time))$/i;
|
|
245
|
+
const MAX_DATE_KEY = /^(lte|lt|before|until|to|end_?(date|time))$/i;
|
|
246
|
+
const DATE_FILTER_TOLERANCE_MS = 24 * 3600 * 1000;
|
|
247
|
+
function parseFilterDate(value) {
|
|
248
|
+
if (typeof value !== 'string' || !/^\d{4}-\d{2}-\d{2}/.test(value))
|
|
249
|
+
return undefined;
|
|
250
|
+
const ts = Date.parse(value);
|
|
251
|
+
if (Number.isNaN(ts))
|
|
252
|
+
return undefined;
|
|
253
|
+
const twoYearsMs = 2 * 365 * 24 * 3600 * 1000;
|
|
254
|
+
if (Math.abs(ts - Date.now()) > twoYearsMs)
|
|
255
|
+
return undefined;
|
|
256
|
+
return ts;
|
|
257
|
+
}
|
|
258
|
+
function extractDateFilterConstraints(body, qs) {
|
|
259
|
+
const constraints = [];
|
|
260
|
+
const visit = (value, depth) => {
|
|
261
|
+
if (depth > 6 || value === null || typeof value !== 'object')
|
|
262
|
+
return;
|
|
263
|
+
if (Buffer.isBuffer(value))
|
|
264
|
+
return;
|
|
265
|
+
if (Array.isArray(value)) {
|
|
266
|
+
for (const entry of value)
|
|
267
|
+
visit(entry, depth + 1);
|
|
268
|
+
return;
|
|
269
|
+
}
|
|
270
|
+
for (const [key, child] of Object.entries(value)) {
|
|
271
|
+
if (MIN_DATE_KEY.test(key)) {
|
|
272
|
+
const ts = parseFilterDate(child);
|
|
273
|
+
if (ts !== undefined)
|
|
274
|
+
constraints.push({ label: key, min: ts });
|
|
275
|
+
}
|
|
276
|
+
else if (MAX_DATE_KEY.test(key)) {
|
|
277
|
+
const ts = parseFilterDate(child);
|
|
278
|
+
if (ts !== undefined)
|
|
279
|
+
constraints.push({ label: key, max: ts });
|
|
280
|
+
}
|
|
281
|
+
visit(child, depth + 1);
|
|
282
|
+
}
|
|
283
|
+
};
|
|
284
|
+
visit(body, 0);
|
|
285
|
+
visit(qs, 0);
|
|
286
|
+
return constraints;
|
|
287
|
+
}
|
|
288
|
+
function findDateFilterViolations(body, constraints) {
|
|
289
|
+
if (constraints.length === 0 || body === undefined || body === null)
|
|
290
|
+
return [];
|
|
291
|
+
let serialized;
|
|
292
|
+
try {
|
|
293
|
+
serialized = JSON.stringify(body);
|
|
294
|
+
}
|
|
295
|
+
catch {
|
|
296
|
+
return [];
|
|
297
|
+
}
|
|
298
|
+
const mins = constraints.filter((c) => c.min !== undefined).map((c) => c.min);
|
|
299
|
+
const maxes = constraints.filter((c) => c.max !== undefined).map((c) => c.max);
|
|
300
|
+
const loosestMin = mins.length > 0 ? Math.min(...mins) - DATE_FILTER_TOLERANCE_MS : undefined;
|
|
301
|
+
const loosestMax = maxes.length > 0 ? Math.max(...maxes) + DATE_FILTER_TOLERANCE_MS : undefined;
|
|
302
|
+
const violations = [];
|
|
303
|
+
const seen = new Set();
|
|
304
|
+
const pattern = /"([A-Za-z0-9_]+)":"(\d{4}-\d{2}-\d{2}[^"]*)"/g;
|
|
305
|
+
let match;
|
|
306
|
+
while ((match = pattern.exec(serialized)) !== null && violations.length < 3) {
|
|
307
|
+
const [, key, rawDate] = match;
|
|
308
|
+
const ts = Date.parse(rawDate);
|
|
309
|
+
if (Number.isNaN(ts))
|
|
310
|
+
continue;
|
|
311
|
+
const tooOld = loosestMin !== undefined && ts < loosestMin;
|
|
312
|
+
const tooNew = loosestMax !== undefined && ts > loosestMax;
|
|
313
|
+
if (!tooOld && !tooNew)
|
|
314
|
+
continue;
|
|
315
|
+
const entry = `${key}=${rawDate}`;
|
|
316
|
+
if (seen.has(entry))
|
|
317
|
+
continue;
|
|
318
|
+
seen.add(entry);
|
|
319
|
+
violations.push(entry);
|
|
320
|
+
}
|
|
321
|
+
return violations;
|
|
322
|
+
}
|
|
323
|
+
function describeDateConstraints(constraints) {
|
|
324
|
+
return constraints
|
|
325
|
+
.map((c) => {
|
|
326
|
+
const bound = c.min ?? c.max;
|
|
327
|
+
const side = c.min !== undefined ? '>=' : '<=';
|
|
328
|
+
return `${c.label} ${side} ${new Date(bound).toISOString().slice(0, 10)}`;
|
|
329
|
+
})
|
|
330
|
+
.join(', ');
|
|
331
|
+
}
|
|
145
332
|
const submitResponseSchema = zod_1.z.object({
|
|
146
333
|
type: zod_1.z
|
|
147
334
|
.enum(['json', 'text', 'binary', 'error'])
|
|
@@ -181,7 +368,7 @@ function looksLikeJsonDocument(text) {
|
|
|
181
368
|
return false;
|
|
182
369
|
}
|
|
183
370
|
}
|
|
184
|
-
function createSubmitResponseTool(capture) {
|
|
371
|
+
function createSubmitResponseTool(capture, dateConstraints = []) {
|
|
185
372
|
return new instance_ai_1.Tool('submit_response')
|
|
186
373
|
.description('Submit your final mock HTTP response. Submit one response; if the result starts with "Invalid:", fix the input and call submit_response again.')
|
|
187
374
|
.input(submitResponseSchema)
|
|
@@ -212,6 +399,15 @@ function createSubmitResponseTool(capture) {
|
|
|
212
399
|
input.body !== undefined) {
|
|
213
400
|
return reject('Invalid: type="error" takes either body (JSON error) or textBody (text/XML error document), not both. Resubmit with exactly one.');
|
|
214
401
|
}
|
|
402
|
+
if (input.type === 'json' && !capture.dateFilterWarned && dateConstraints.length > 0) {
|
|
403
|
+
const violations = findDateFilterViolations(input.body, dateConstraints);
|
|
404
|
+
if (violations.length > 0) {
|
|
405
|
+
capture.dateFilterWarned = true;
|
|
406
|
+
capture.spec = input;
|
|
407
|
+
capture.softOnly = true;
|
|
408
|
+
return reject(`Invalid: the request filters by date (${describeDateConstraints(dateConstraints)}), but the response contains date values outside that window: ${violations.join(', ')}. REMOVE every record outside the requested window — the real API filters them out server-side. Do NOT change a record's dates to pull it inside the window: stored records keep the dates the scenario assigns them (a record's age is often exactly what the test checks). Only if a flagged value belongs to a nested unrelated entity (e.g. a creator's registration date — not one of the filtered records) resubmit the same response unchanged to confirm it.`);
|
|
409
|
+
}
|
|
410
|
+
}
|
|
215
411
|
capture.spec = input;
|
|
216
412
|
capture.softOnly = false;
|
|
217
413
|
return 'Response submitted.';
|
|
@@ -231,15 +427,17 @@ function createQuirksLookupTool(serviceName, method, pathname, hostname) {
|
|
|
231
427
|
})
|
|
232
428
|
.build();
|
|
233
429
|
}
|
|
234
|
-
async function callLlm(userPrompt, requestInfo) {
|
|
430
|
+
async function callLlm(userPrompt, requestInfo, timeoutMs, dateConstraints = []) {
|
|
235
431
|
const capture = {};
|
|
236
432
|
const agent = (0, instance_ai_1.createEvalAgent)('eval-mock-responder', {
|
|
237
433
|
instructions: MOCK_SYSTEM_PROMPT,
|
|
238
434
|
cache: true,
|
|
239
435
|
})
|
|
240
436
|
.tool(createQuirksLookupTool(requestInfo.serviceName, requestInfo.method, requestInfo.pathname, requestInfo.hostname))
|
|
241
|
-
.tool(createSubmitResponseTool(capture));
|
|
242
|
-
const result = await agent.generate(userPrompt
|
|
437
|
+
.tool(createSubmitResponseTool(capture, dateConstraints));
|
|
438
|
+
const result = await agent.generate(userPrompt, {
|
|
439
|
+
abortSignal: AbortSignal.timeout(timeoutMs),
|
|
440
|
+
});
|
|
243
441
|
if (!capture.spec) {
|
|
244
442
|
const text = (0, instance_ai_1.extractText)(result);
|
|
245
443
|
const edge = ERROR_PREVIEW_MAX / 2;
|
|
@@ -258,7 +456,27 @@ async function callLlm(userPrompt, requestInfo) {
|
|
|
258
456
|
if (capture.softOnly) {
|
|
259
457
|
di_1.Container.get(backend_common_1.Logger).warn(`[EvalMock] Serving soft-captured json body — submit_response was rejected (${capture.lastRejection ?? 'unknown reason'}) and never resubmitted`);
|
|
260
458
|
}
|
|
261
|
-
return capture.spec;
|
|
459
|
+
return { spec: capture.spec, softOnly: capture.softOnly === true };
|
|
460
|
+
}
|
|
461
|
+
function applyEndpointNormalizers(request, spec) {
|
|
462
|
+
normalizeGmailRawMessage(request, spec);
|
|
463
|
+
}
|
|
464
|
+
function normalizeGmailRawMessage(request, spec) {
|
|
465
|
+
if (spec.type !== 'json')
|
|
466
|
+
return;
|
|
467
|
+
if (typeof spec.body !== 'object' || spec.body === null || Array.isArray(spec.body))
|
|
468
|
+
return;
|
|
469
|
+
if (!/\/gmail\/v1\/users\/[^/]+\/messages\//.test(extractEndpointPath(request.url)))
|
|
470
|
+
return;
|
|
471
|
+
const body = spec.body;
|
|
472
|
+
if (typeof body.raw !== 'string' || body.raw.length === 0)
|
|
473
|
+
return;
|
|
474
|
+
if (!looksLikeRfc822(body.raw))
|
|
475
|
+
return;
|
|
476
|
+
body.raw = Buffer.from(body.raw, 'utf8').toString('base64url');
|
|
477
|
+
}
|
|
478
|
+
function looksLikeRfc822(text) {
|
|
479
|
+
return /^[A-Za-z][A-Za-z0-9-]*:\s/m.test(text) && /\r?\n\r?\n/.test(text);
|
|
262
480
|
}
|
|
263
481
|
function materializeSpec(spec) {
|
|
264
482
|
switch (spec.type) {
|
|
@@ -358,24 +576,4 @@ function extractHostname(url) {
|
|
|
358
576
|
return undefined;
|
|
359
577
|
}
|
|
360
578
|
}
|
|
361
|
-
function buildDateAnchors(now) {
|
|
362
|
-
const labels = [
|
|
363
|
-
['today', 0],
|
|
364
|
-
['yesterday', -1],
|
|
365
|
-
['7 days ago', -7],
|
|
366
|
-
['14 days ago', -14],
|
|
367
|
-
['30 days ago', -30],
|
|
368
|
-
['1 day from now', 1],
|
|
369
|
-
['7 days from now', 7],
|
|
370
|
-
];
|
|
371
|
-
const lines = labels.map(([label, dayOffset]) => {
|
|
372
|
-
const d = new Date(now);
|
|
373
|
-
d.setUTCDate(d.getUTCDate() + dayOffset);
|
|
374
|
-
const isoDate = d.toISOString().slice(0, 10);
|
|
375
|
-
return label === 'today'
|
|
376
|
-
? `- ${label}: ${isoDate} (full timestamp ${now.toISOString()})`
|
|
377
|
-
: `- ${label}: ${isoDate}`;
|
|
378
|
-
});
|
|
379
|
-
return lines.join('\n');
|
|
380
|
-
}
|
|
381
579
|
//# sourceMappingURL=mock-handler.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mock-handler.js","sourceRoot":"","sources":["../../../../src/modules/instance-ai/eval/mock-handler.ts"],"names":[],"mappings":";;AAgGA,oDAgBC;AAkbD,4CAmBC;AA3iBD,wDAA6C;AAC7C,gCAAoC;AACpC,kDAAsE;AAEtE,uCAAmD;AACnD,6BAAwB;AAExB,yCAA0C;AAC1C,+CAA+C;AAC/C,+CAAkD;AAClD,uEAA6D;AAC7D,2DAAuE;AAMvE,MAAM,kBAAkB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8lBAmCmkB,CAAC;AAM/lB,MAAM,mBAAmB,GAAG,CAAC,CAAC;AAC9B,MAAM,iBAAiB,GAAG,GAAG,CAAC;AAC9B,MAAM,gBAAgB,GAAG,GAAG,CAAC;AA0B7B,SAAgB,oBAAoB,CAAC,OAA4B;IAChE,MAAM,eAAe,GAAG,IAAI,GAAG,EAAkB,CAAC;IAElD,OAAO,KAAK,EAAE,cAAc,EAAE,IAAI,EAAE,EAAE;QACrC,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;YACrC,eAAe,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,EAAE,IAAA,+BAAiB,EAAC,IAAI,CAAC,CAAC,CAAC;QACzD,CAAC;QAED,OAAO,MAAM,oBAAoB,CAAC,cAAc,EAAE,IAAI,EAA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B,KAAK,CAAC,GAAG,CAAC,CAAC;QACb,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IAC7D,CAAC;IAAC,MAAM,CAAC;QACR,OAAO,SAAS,CAAC;IAClB,CAAC;AACF,CAAC;AAED,SAAS,eAAe,CAAC,GAAW;IACnC,IAAI,CAAC;QACJ,MAAM,MAAM,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,CAAC;QAC5B,OAAO,MAAM,CAAC,QAAQ,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;IAC/D,CAAC;IAAC,MAAM,CAAC;QACR,OAAO,GAAG,CAAC;IACZ,CAAC;AACF,CAAC;AAED,SAAS,mBAAmB,CAAC,GAAW;IACvC,IAAI,CAAC;QACJ,OAAO,IAAI,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC;IAC9B,CAAC;IAAC,MAAM,CAAC;QACR,OAAO,GAAG,CAAC;IACZ,CAAC;AACF,CAAC;AAED,SAAS,eAAe,CAAC,GAAW;IACnC,IAAI,CAAC;QACJ,OAAO,IAAI,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC;IAC9B,CAAC;IAAC,MAAM,CAAC;QACR,OAAO,SAAS,CAAC;IAClB,CAAC;AACF,CAAC"}
|
|
@@ -8,5 +8,6 @@ export interface MockQuirk {
|
|
|
8
8
|
}
|
|
9
9
|
export declare const MOCK_QUIRKS: MockQuirk[];
|
|
10
10
|
export declare function quirkMatches(quirk: MockQuirk, service: string, method: string, pathname: string, hostname?: string): boolean;
|
|
11
|
+
export declare function endpointMatchesPattern(pattern: string, method: string, pathname: string): boolean;
|
|
11
12
|
export declare function findMockQuirks(service: string, method: string, pathname: string, hostname?: string): string[];
|
|
12
13
|
export declare function hostnameMatchesPattern(pattern: string, hostname: string): boolean;
|
|
@@ -2,9 +2,16 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.MOCK_QUIRKS = void 0;
|
|
4
4
|
exports.quirkMatches = quirkMatches;
|
|
5
|
+
exports.endpointMatchesPattern = endpointMatchesPattern;
|
|
5
6
|
exports.findMockQuirks = findMockQuirks;
|
|
6
7
|
exports.hostnameMatchesPattern = hostnameMatchesPattern;
|
|
7
8
|
exports.MOCK_QUIRKS = [
|
|
9
|
+
{
|
|
10
|
+
service: 'Anthropic',
|
|
11
|
+
guidance: 'Anthropic Messages API (`POST /v1/messages`) → JSON `{ "id": "msg_01AbCd...", "type": "message", "role": "assistant", "model": "<from request>", "content": [{ "type": "text", "text": "<answer>" }], "stop_reason": "end_turn", "stop_sequence": null, "usage": { "input_tokens": 100, "output_tokens": 50 } }`. `content` MUST be an ARRAY of content-block objects — NEVER a plain string (the n8n node calls `response.content.filter(...)` and crashes on a string). When the request has `tools` and the scenario implies a tool call, use a `{ "type": "tool_use", "id": "toolu_01...", "name": "<tool>", "input": { ... } }` block and `stop_reason: "tool_use"`.',
|
|
12
|
+
rationale: "The n8n Anthropic node filters response.content by block type; a string content field throws 'content.filter is not a function'. Observed as the residual mock_issue in eval run 28667058059 (daily-slack-summary/empty-channel).",
|
|
13
|
+
addedAt: '2026-07-03',
|
|
14
|
+
},
|
|
8
15
|
{
|
|
9
16
|
service: 'Notion',
|
|
10
17
|
guidance: 'Notion documents partial response variants (objects with only `{object, id}`) alongside full ones for many resources (pages, databases, blocks, users). ALWAYS return the FULL response object with all documented fields (`properties`, `parent`, `created_time`, schema, etc.) — never a partial form. Use a partial variant ONLY if the request body explicitly opts in (e.g. a `template` field for create-page). The `object` field must match the endpoint\'s resource type — GET `/v1/databases/{id}` returns `object: "database"`, not `"page"`.',
|
|
@@ -22,6 +29,7 @@ exports.MOCK_QUIRKS = [
|
|
|
22
29
|
{
|
|
23
30
|
service: 'Openai',
|
|
24
31
|
guidance: 'OpenAI endpoints commonly seen in workflows:\n' +
|
|
32
|
+
' * `POST /v1/responses` (Responses API) → JSON `{ "id": "resp_abc123", "object": "response", "status": "completed", "model": "<from request>", "output": [{ "type": "message", "id": "msg_abc123", "status": "completed", "role": "assistant", "content": [{ "type": "output_text", "text": "<answer>", "annotations": [] }] }], "usage": { "input_tokens": 100, "output_tokens": 50, "total_tokens": 150 } }`. The `output` ARRAY is REQUIRED — consumers read `output[].content[].text` and crash without it. NEVER return `{ "content": ... }` or a chat-completions `choices` shape for this endpoint.\n' +
|
|
25
33
|
' * `POST /v1/audio/transcriptions` and `POST /v1/audio/translations` → JSON `{ "text": "<plausible transcript>", ... }`. The request multipart body has been redacted (you will see `__redacted: "multipart"`); derive the transcript from scenario/node hints when present, otherwise return a short generic English sentence.\n' +
|
|
26
34
|
' * `POST /v1/images/generations` → JSON `{ "created": <unix>, "data": [{ "url": "https://example.invalid/img.png", "revised_prompt": "..." }] }`. If the request body has `response_format: "b64_json"`, replace `url` with `b64_json` containing a tiny base64 PNG-like blob (literal value `iVBORw0KGgo` is fine — the eval harness does not decode it).\n' +
|
|
27
35
|
' * `GET /v1/files/{file_id}/content` → BINARY (`type: "binary"`). Use `contentType` matching the file MIME if known, else `application/octet-stream`. The metadata sibling `GET /v1/files/{file_id}` is JSON.\n' +
|
|
@@ -29,6 +37,18 @@ exports.MOCK_QUIRKS = [
|
|
|
29
37
|
rationale: 'OpenAI mixes JSON, binary, and base64-in-JSON across endpoints, and AI workflow scenarios depend on the transcript text being plausibly downstream-matchable.',
|
|
30
38
|
addedAt: '2026-05-19',
|
|
31
39
|
},
|
|
40
|
+
{
|
|
41
|
+
service: 'Gmail',
|
|
42
|
+
hostnames: ['gmail.googleapis.com', 'www.googleapis.com'],
|
|
43
|
+
guidance: 'Gmail message reads are TWO-STEP with distinct shapes. Pick by path:\n' +
|
|
44
|
+
' * `GET /gmail/v1/users/{userId}/messages` (list) → `{ "messages": [{ "id", "threadId" }, ...], "resultSizeEstimate" }` — ID stubs ONLY, no subjects or bodies; the workflow fetches each message in a follow-up GET.\n' +
|
|
45
|
+
' * `GET /gmail/v1/users/{userId}/messages/{id}` (single message) → the FULL Message resource: `{ id, threadId, labelIds, snippet, internalDate, payload }` where `payload` = `{ mimeType, headers: [{ name: "Subject"|"From"|"To"|"Date", value }, ...], body: { size, data } }`. Body text lives ONLY under `payload.body.data` as BASE64URL-encoded content (base64 with `-`/`_`) — never plain text at the top level, never a flattened `{ subject, from, body }` object. KEEP IT TINY: the decoded body must be ONE short sentence (≤ 80 chars) so the base64url string stays short — never encode long documents; n8n decodes it and downstream logic only needs the gist.\n' +
|
|
46
|
+
' * Each message GET must return the DISTINCT email for THAT id — match the id against the scenario/context enumeration (subjects, senders) and never repeat the same subject/body across different ids.\n' +
|
|
47
|
+
' * `?format=raw` (the n8n Gmail node uses this when simple=false) → `{ id, threadId, labelIds, snippet, internalDate, raw }` where `raw` is the ENTIRE RFC822 message source written as PLAIN multi-line text — the harness applies the base64url transport encoding for you; never pre-encode it. Keep it TINY: a minimal message — `From:`/`To:`/`Subject:`/`Date:` headers, a blank line, then a one-line body (≤ 80 chars). The node Buffer-decodes `raw`; omitting it crashes the workflow.\n' +
|
|
48
|
+
' * `?format=metadata` → headers only, no `body.data` and no `raw`.',
|
|
49
|
+
rationale: "Digest/inbox workflows list message IDs then GET each message; the LLM otherwise returns flattened subject/body objects (Gmail node's payload/base64url parsing yields empty fields) or identical content for every id (digest misses the scenario's distinct emails). Size cap prevents bulk base64 generation from doubling per-request latency and timing out scenarios.",
|
|
50
|
+
addedAt: '2026-07-03',
|
|
51
|
+
},
|
|
32
52
|
{
|
|
33
53
|
service: 'Googleapis',
|
|
34
54
|
guidance: 'Google Drive on www.googleapis.com routes both JSON and binary on the same host. Pick by path + query:\n' +
|
|
@@ -47,6 +67,16 @@ exports.MOCK_QUIRKS = [
|
|
|
47
67
|
rationale: 'The Gmail node consumes `responseData.messages` from the list call; a bare array yields zero items with no error. Observed as the residual mock_issue in eval run mock-robustness-fixes-n3 (daily-gmail-action-digest).',
|
|
48
68
|
addedAt: '2026-06-12',
|
|
49
69
|
},
|
|
70
|
+
{
|
|
71
|
+
service: 'Googleapis',
|
|
72
|
+
endpoint: 'GET /gmail/v1/users/*/messages/*',
|
|
73
|
+
guidance: 'Gmail messages.get — the response shape depends on the `format` query param, and the n8n Gmail node crashes on the wrong one:\n' +
|
|
74
|
+
' * `format=raw` (what the node sends whenever "Simplify" is off): the message JSON MUST include `raw` containing the FULL RFC822 email source — header lines (`From:`, `To:`, `Subject:`, `Date:`, `Content-Type:`), a blank line, then the body — alongside `id`, `threadId`, `labelIds`, `sizeEstimate`. Write `raw` as PLAIN multi-line text; the harness applies the base64 transport encoding for you. Prefer a simple single-part `Content-Type: text/plain; charset="UTF-8"` message unless the scenario needs attachments. NEVER answer a `format=raw` request with a `payload`-only message — the node decodes `raw` unconditionally.\n' +
|
|
75
|
+
' * `format=metadata` → `{ id, threadId, labelIds, snippet, sizeEstimate, payload: { headers: [{ name, value }, ...] } }` — headers array only, no body data, no `raw`.\n' +
|
|
76
|
+
' * `format=full` → `payload` tree where EVERY leaf part carries `body: { size: <n>, data: "<base64url>" }`; multipart containers use `mimeType: "multipart/..."`, `body: { size: 0 }`, and a `parts` array. Never emit a leaf part whose `body` has only `size` — nodes decode `body.data` and crash on undefined.',
|
|
77
|
+
rationale: 'The Gmail node fetches messages with format=raw and runs Buffer.from(message.raw, "base64") unconditionally; a payload-style mock without `raw` crashes it ("first argument must be of type string... Received undefined" — observed in eval run 28593025895, emails-with-action-items). Multipart `full` responses with data-less leaf parts crash the decode path the same way.',
|
|
78
|
+
addedAt: '2026-07-02',
|
|
79
|
+
},
|
|
50
80
|
{
|
|
51
81
|
service: 'Slack',
|
|
52
82
|
hostnames: ['*.slack.com'],
|
|
@@ -96,8 +126,23 @@ function quirkMatches(quirk, service, method, pathname, hostname) {
|
|
|
96
126
|
return false;
|
|
97
127
|
if (!quirk.endpoint)
|
|
98
128
|
return true;
|
|
99
|
-
|
|
100
|
-
|
|
129
|
+
return endpointMatchesPattern(quirk.endpoint, method, pathname);
|
|
130
|
+
}
|
|
131
|
+
function endpointMatchesPattern(pattern, method, pathname) {
|
|
132
|
+
const spaceIdx = pattern.indexOf(' ');
|
|
133
|
+
if (spaceIdx === -1)
|
|
134
|
+
return false;
|
|
135
|
+
const patternMethod = pattern.slice(0, spaceIdx);
|
|
136
|
+
const patternPath = pattern.slice(spaceIdx + 1);
|
|
137
|
+
if (patternMethod.toUpperCase() !== method.toUpperCase())
|
|
138
|
+
return false;
|
|
139
|
+
if (!patternPath.includes('*')) {
|
|
140
|
+
return patternPath.toUpperCase() === pathname.toUpperCase();
|
|
141
|
+
}
|
|
142
|
+
const parts = patternPath
|
|
143
|
+
.split('/')
|
|
144
|
+
.map((p) => (p === '*' ? '[^/]+' : p.replace(/[.+^${}()|[\]\\?*]/g, '\\$&')));
|
|
145
|
+
return new RegExp(`^${parts.join('/')}$`, 'i').test(pathname);
|
|
101
146
|
}
|
|
102
147
|
function findMockQuirks(service, method, pathname, hostname) {
|
|
103
148
|
return exports.MOCK_QUIRKS.filter((q) => quirkMatches(q, service, method, pathname, hostname)).map((q) => q.guidance);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mock-quirks.js","sourceRoot":"","sources":["../../../../src/modules/instance-ai/eval/mock-quirks.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"mock-quirks.js","sourceRoot":"","sources":["../../../../src/modules/instance-ai/eval/mock-quirks.ts"],"names":[],"mappings":";;;AAsLA,oCAeC;AAOD,wDAaC;AAGD,wCASC;AAWD,wDAKC;AAnNY,QAAA,WAAW,GAAgB;IACvC;QACC,OAAO,EAAE,WAAW;QACpB,QAAQ,EACP,2oBAA2oB;QAC5oB,SAAS,EACR,mOAAmO;QACpO,OAAO,EAAE,YAAY;KACrB;IACD;QACC,OAAO,EAAE,QAAQ;QAC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C;AAWD,SAAgB,sBAAsB,CAAC,OAAe,EAAE,QAAgB;IACvE,MAAM,KAAK,GAAG,OAAO;SACnB,KAAK,CAAC,GAAG,CAAC;SACV,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,qBAAqB,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC;IAC/E,OAAO,IAAI,MAAM,CAAC,IAAI,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;AAC5D,CAAC"}
|
|
@@ -2,11 +2,18 @@ import type { WorkflowJSON } from '@n8n/workflow-sdk';
|
|
|
2
2
|
type PinData = Record<string, Array<Record<string, unknown>>>;
|
|
3
3
|
interface PinDataGenerationInstructions {
|
|
4
4
|
dataDescription: string;
|
|
5
|
+
testScenario?: string;
|
|
5
6
|
}
|
|
6
7
|
export interface GeneratePinDataOptions {
|
|
7
8
|
workflow: WorkflowJSON;
|
|
8
9
|
nodeNames: string[];
|
|
9
10
|
instructions?: PinDataGenerationInstructions;
|
|
10
11
|
}
|
|
12
|
+
interface OutputParserContext {
|
|
13
|
+
schemaText?: string;
|
|
14
|
+
schemaIsExample: boolean;
|
|
15
|
+
}
|
|
16
|
+
export declare function findOutputParserTargets(workflow: WorkflowJSON): Map<string, OutputParserContext>;
|
|
17
|
+
export declare function repairStructuredAgentOutput(pinData: PinData, parserTargetNames: Iterable<string>): PinData;
|
|
11
18
|
export declare function generatePinData(options: GeneratePinDataOptions): Promise<PinData>;
|
|
12
19
|
export {};
|