n8n 2.40.5 → 2.41.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/build.tsbuildinfo +1 -1
- package/dist/commands/import/credentials.js +12 -3
- package/dist/commands/import/credentials.js.map +1 -1
- package/dist/commands/import/workflow.js +4 -4
- package/dist/commands/import/workflow.js.map +1 -1
- package/dist/commands/start.js +5 -2
- package/dist/commands/start.js.map +1 -1
- package/dist/constants.d.ts +1 -0
- package/dist/constants.js +2 -1
- package/dist/constants.js.map +1 -1
- package/dist/controllers/ai-preference.controller.js +1 -1
- package/dist/controllers/ai-preference.controller.js.map +1 -1
- package/dist/controllers/ai.controller.d.ts +1 -0
- package/dist/controllers/dev.controller.d.ts +8 -0
- package/dist/controllers/dev.controller.js +35 -0
- package/dist/controllers/dev.controller.js.map +1 -0
- package/dist/controllers/me.controller.d.ts +2 -4
- package/dist/controllers/me.controller.js +9 -24
- package/dist/controllers/me.controller.js.map +1 -1
- package/dist/controllers/role.controller.js +1 -0
- package/dist/controllers/role.controller.js.map +1 -1
- package/dist/crash-journal.js +1 -1
- package/dist/crash-journal.js.map +1 -1
- package/dist/credentials/credential-dependency.service.d.ts +2 -2
- package/dist/credentials/credential-dependency.service.js +5 -4
- package/dist/credentials/credential-dependency.service.js.map +1 -1
- package/dist/credentials/credentials-finder.service.d.ts +1 -0
- package/dist/credentials/credentials.controller.d.ts +4 -0
- package/dist/credentials/credentials.controller.js +5 -0
- package/dist/credentials/credentials.controller.js.map +1 -1
- package/dist/credentials/credentials.service.d.ts +16 -3
- package/dist/credentials/credentials.service.ee.d.ts +2 -0
- package/dist/credentials/credentials.service.js +112 -30
- package/dist/credentials/credentials.service.js.map +1 -1
- package/dist/credentials/validation.d.ts +1 -0
- package/dist/credentials/validation.js +11 -0
- package/dist/credentials/validation.js.map +1 -1
- package/dist/credentials-helper.d.ts +3 -2
- package/dist/credentials-helper.js +39 -19
- package/dist/credentials-helper.js.map +1 -1
- package/dist/credentials-overwrites.js +2 -0
- package/dist/credentials-overwrites.js.map +1 -1
- package/dist/errors/response-errors/incompatible-nodes-api-version.error.d.ts +11 -0
- package/dist/errors/response-errors/incompatible-nodes-api-version.error.js +13 -0
- package/dist/errors/response-errors/incompatible-nodes-api-version.error.js.map +1 -0
- package/dist/errors/unsupported-end-user-credential-trigger.error.d.ts +4 -0
- package/dist/errors/unsupported-end-user-credential-trigger.error.js +13 -0
- package/dist/errors/unsupported-end-user-credential-trigger.error.js.map +1 -0
- package/dist/eventbus/event-message-classes/abstract-event-message.d.ts +1 -1
- package/dist/eventbus/event-message-classes/abstract-event-message.js +8 -0
- package/dist/eventbus/event-message-classes/abstract-event-message.js.map +1 -1
- package/dist/eventbus/event-message-classes/event-message-ai-node.d.ts +0 -2
- package/dist/eventbus/event-message-classes/event-message-ai-node.js +0 -8
- package/dist/eventbus/event-message-classes/event-message-ai-node.js.map +1 -1
- package/dist/eventbus/event-message-classes/event-message-audit.d.ts +1 -2
- package/dist/eventbus/event-message-classes/event-message-audit.js +0 -8
- package/dist/eventbus/event-message-classes/event-message-audit.js.map +1 -1
- package/dist/eventbus/event-message-classes/event-message-execution.d.ts +0 -2
- package/dist/eventbus/event-message-classes/event-message-execution.js +0 -8
- package/dist/eventbus/event-message-classes/event-message-execution.js.map +1 -1
- package/dist/eventbus/event-message-classes/event-message-generic.d.ts +0 -2
- package/dist/eventbus/event-message-classes/event-message-generic.js +0 -8
- package/dist/eventbus/event-message-classes/event-message-generic.js.map +1 -1
- package/dist/eventbus/event-message-classes/event-message-mcp.d.ts +0 -2
- package/dist/eventbus/event-message-classes/event-message-mcp.js +0 -8
- package/dist/eventbus/event-message-classes/event-message-mcp.js.map +1 -1
- package/dist/eventbus/event-message-classes/event-message-node.d.ts +0 -2
- package/dist/eventbus/event-message-classes/event-message-node.js +0 -8
- package/dist/eventbus/event-message-classes/event-message-node.js.map +1 -1
- package/dist/eventbus/event-message-classes/event-message-queue.d.ts +0 -2
- package/dist/eventbus/event-message-classes/event-message-queue.js +0 -8
- package/dist/eventbus/event-message-classes/event-message-queue.js.map +1 -1
- package/dist/eventbus/event-message-classes/event-message-runner.d.ts +0 -2
- package/dist/eventbus/event-message-classes/event-message-runner.js +0 -8
- package/dist/eventbus/event-message-classes/event-message-runner.js.map +1 -1
- package/dist/eventbus/event-message-classes/event-message-workflow.d.ts +1 -2
- package/dist/eventbus/event-message-classes/event-message-workflow.js +0 -8
- package/dist/eventbus/event-message-classes/event-message-workflow.js.map +1 -1
- package/dist/events/event.service.d.ts +3 -2
- package/dist/events/event.service.js.map +1 -1
- package/dist/events/maps/mcp-post-save-metrics.event-map.d.ts +7 -0
- package/dist/events/maps/mcp-post-save-metrics.event-map.js +3 -0
- package/dist/events/maps/mcp-post-save-metrics.event-map.js.map +1 -0
- package/dist/events/maps/relay.event-map.d.ts +3 -0
- package/dist/events/maps/system-task-metrics.event-map.d.ts +45 -0
- package/dist/events/maps/system-task-metrics.event-map.js +3 -0
- package/dist/events/maps/system-task-metrics.event-map.js.map +1 -0
- package/dist/events/relays/activity.event-relay.d.ts +9 -3
- package/dist/events/relays/activity.event-relay.js +33 -4
- package/dist/events/relays/activity.event-relay.js.map +1 -1
- package/dist/events/relays/telemetry.event-relay.js +34 -14
- package/dist/events/relays/telemetry.event-relay.js.map +1 -1
- package/dist/execution-lifecycle/execution-lifecycle-hooks.js +10 -6
- package/dist/execution-lifecycle/execution-lifecycle-hooks.js.map +1 -1
- package/dist/execution-lifecycle/shared/shared-hook-functions.d.ts +1 -1
- package/dist/execution-lifecycle/shared/shared-hook-functions.js +2 -1
- package/dist/execution-lifecycle/shared/shared-hook-functions.js.map +1 -1
- package/dist/executions/engine-v2-execution-reader.service.d.ts +26 -0
- package/dist/executions/engine-v2-execution-reader.service.js +58 -13
- package/dist/executions/engine-v2-execution-reader.service.js.map +1 -1
- package/dist/executions/engine-v2-mapping.d.ts +5 -0
- package/dist/executions/engine-v2-mapping.js +30 -0
- package/dist/executions/engine-v2-mapping.js.map +1 -0
- package/dist/executions/execution-cursor.d.ts +51 -0
- package/dist/executions/execution-cursor.js +39 -0
- package/dist/executions/execution-cursor.js.map +1 -0
- package/dist/executions/execution-id.js +2 -2
- package/dist/executions/execution-id.js.map +1 -1
- package/dist/executions/execution-list-v1.service.d.ts +27 -0
- package/dist/executions/execution-list-v1.service.js +98 -0
- package/dist/executions/execution-list-v1.service.js.map +1 -0
- package/dist/executions/execution-list-v2.service.d.ts +25 -0
- package/dist/executions/execution-list-v2.service.js +168 -0
- package/dist/executions/execution-list-v2.service.js.map +1 -0
- package/dist/executions/execution-list.service.d.ts +19 -0
- package/dist/executions/execution-list.service.js +67 -0
- package/dist/executions/execution-list.service.js.map +1 -0
- package/dist/executions/execution-recovery.service.d.ts +1 -2
- package/dist/executions/execution-recovery.service.js +1 -2
- package/dist/executions/execution-recovery.service.js.map +1 -1
- package/dist/executions/execution.service.d.ts +1 -34
- package/dist/executions/execution.service.js +4 -73
- package/dist/executions/execution.service.js.map +1 -1
- package/dist/executions/execution.types.d.ts +4 -2
- package/dist/executions/executions.controller.d.ts +4 -1
- package/dist/executions/executions.controller.js +12 -23
- package/dist/executions/executions.controller.js.map +1 -1
- package/dist/executions/merge-execution-pages.d.ts +10 -0
- package/dist/executions/merge-execution-pages.js +30 -0
- package/dist/executions/merge-execution-pages.js.map +1 -0
- package/dist/executions/parse-range-query.middleware.d.ts +2 -3
- package/dist/executions/parse-range-query.middleware.js +27 -21
- package/dist/executions/parse-range-query.middleware.js.map +1 -1
- package/dist/external-hooks.d.ts +6 -2
- package/dist/load-nodes-and-credentials.d.ts +3 -0
- package/dist/load-nodes-and-credentials.js +37 -15
- package/dist/load-nodes-and-credentials.js.map +1 -1
- package/dist/metrics/prometheus/constant.d.ts +1 -0
- package/dist/metrics/prometheus/constant.js +4 -1
- package/dist/metrics/prometheus/constant.js.map +1 -1
- package/dist/metrics/prometheus/mcp-post-save-metrics.service.d.ts +10 -0
- package/dist/metrics/prometheus/mcp-post-save-metrics.service.js +44 -0
- package/dist/metrics/prometheus/mcp-post-save-metrics.service.js.map +1 -0
- package/dist/metrics/prometheus/prometheus.service.d.ts +3 -1
- package/dist/metrics/prometheus/prometheus.service.js +6 -2
- package/dist/metrics/prometheus/prometheus.service.js.map +1 -1
- package/dist/metrics/prometheus/system-task-metrics.service.d.ts +12 -0
- package/dist/metrics/prometheus/system-task-metrics.service.js +157 -0
- package/dist/metrics/prometheus/system-task-metrics.service.js.map +1 -0
- package/dist/middlewares/list-query/dtos/credentials.select.dto.js +1 -0
- package/dist/middlewares/list-query/dtos/credentials.select.dto.js.map +1 -1
- package/dist/modules/agents/adapters/agents-credential-provider.d.ts +2 -1
- package/dist/modules/agents/adapters/agents-credential-provider.js +3 -1
- package/dist/modules/agents/adapters/agents-credential-provider.js.map +1 -1
- package/dist/modules/agents/agent-chat.controller.js +32 -37
- package/dist/modules/agents/agent-chat.controller.js.map +1 -1
- package/dist/modules/agents/agent-config.service.js +1 -1
- package/dist/modules/agents/agent-config.service.js.map +1 -1
- package/dist/modules/agents/agent-conversation-state.service.d.ts +12 -0
- package/dist/modules/agents/agent-conversation-state.service.js +34 -0
- package/dist/modules/agents/agent-conversation-state.service.js.map +1 -0
- package/dist/modules/agents/agent-custom-tools.service.js +2 -2
- package/dist/modules/agents/agent-custom-tools.service.js.map +1 -1
- package/dist/modules/agents/agent-execution-orchestrator.service.d.ts +13 -6
- package/dist/modules/agents/agent-execution-orchestrator.service.js +284 -417
- package/dist/modules/agents/agent-execution-orchestrator.service.js.map +1 -1
- package/dist/modules/agents/agent-execution-recording.error.d.ts +21 -0
- package/dist/modules/agents/agent-execution-recording.error.js +17 -0
- package/dist/modules/agents/agent-execution-recording.error.js.map +1 -0
- package/dist/modules/agents/agent-execution.service.d.ts +1 -1
- package/dist/modules/agents/agent-execution.service.js +51 -20
- package/dist/modules/agents/agent-execution.service.js.map +1 -1
- package/dist/modules/agents/agent-integration-management.service.d.ts +5 -3
- package/dist/modules/agents/agent-integration-management.service.js +9 -6
- package/dist/modules/agents/agent-integration-management.service.js.map +1 -1
- package/dist/modules/agents/agent-integrations.controller.d.ts +1 -3
- package/dist/modules/agents/agent-integrations.controller.js +4 -6
- package/dist/modules/agents/agent-integrations.controller.js.map +1 -1
- package/dist/modules/agents/agent-message-mapper.d.ts +1 -1
- package/dist/modules/agents/agent-message-mapper.js +3 -0
- package/dist/modules/agents/agent-message-mapper.js.map +1 -1
- package/dist/modules/agents/agent-modification-telemetry.service.d.ts +2 -2
- package/dist/modules/agents/agent-modification-telemetry.service.js.map +1 -1
- package/dist/modules/agents/agent-publish.service.js +5 -5
- package/dist/modules/agents/agent-publish.service.js.map +1 -1
- package/dist/modules/agents/agent-runnable-state.service.js +1 -1
- package/dist/modules/agents/agent-runnable-state.service.js.map +1 -1
- package/dist/modules/agents/agent-runtime-cache.service.js +1 -1
- package/dist/modules/agents/agent-runtime-cache.service.js.map +1 -1
- package/dist/modules/agents/agent-runtime-reconstruction.service.js +1 -1
- package/dist/modules/agents/agent-runtime-reconstruction.service.js.map +1 -1
- package/dist/modules/agents/agent-skills.service.js +3 -3
- package/dist/modules/agents/agent-skills.service.js.map +1 -1
- package/dist/modules/agents/agent-sse-stream.d.ts +4 -1
- package/dist/modules/agents/agent-sse-stream.js +46 -33
- package/dist/modules/agents/agent-sse-stream.js.map +1 -1
- package/dist/modules/agents/agent-task.service.js +3 -3
- package/dist/modules/agents/agent-task.service.js.map +1 -1
- package/dist/modules/agents/agent-test-run.service.d.ts +24 -41
- package/dist/modules/agents/agent-test-run.service.js +83 -59
- package/dist/modules/agents/agent-test-run.service.js.map +1 -1
- package/dist/modules/agents/agent-turn-execution.service.d.ts +49 -0
- package/dist/modules/agents/agent-turn-execution.service.js +212 -0
- package/dist/modules/agents/agent-turn-execution.service.js.map +1 -0
- package/dist/modules/agents/agent-workflow-execution.service.d.ts +6 -3
- package/dist/modules/agents/agent-workflow-execution.service.js +77 -105
- package/dist/modules/agents/agent-workflow-execution.service.js.map +1 -1
- package/dist/modules/agents/agent-workflow-tool-resume.service.d.ts +0 -1
- package/dist/modules/agents/agent-workflow-tool-resume.service.js +46 -20
- package/dist/modules/agents/agent-workflow-tool-resume.service.js.map +1 -1
- package/dist/modules/agents/agents-config.controller.js +1 -1
- package/dist/modules/agents/agents-config.controller.js.map +1 -1
- package/dist/modules/agents/background/agent-wake.service.d.ts +3 -5
- package/dist/modules/agents/background/agent-wake.service.js +6 -10
- package/dist/modules/agents/background/agent-wake.service.js.map +1 -1
- package/dist/modules/agents/builder/agents-builder-prompts.d.ts +1 -1
- package/dist/modules/agents/builder/agents-builder-prompts.js +21 -0
- package/dist/modules/agents/builder/agents-builder-prompts.js.map +1 -1
- package/dist/modules/agents/builder/get-resource-locator-options.tool.d.ts +2 -2
- package/dist/modules/agents/builder/skills/external-services.skill.js +4 -1
- package/dist/modules/agents/builder/skills/external-services.skill.js.map +1 -1
- package/dist/modules/agents/entities/agent-checkpoint.entity.d.ts +1 -0
- package/dist/modules/agents/entities/agent-checkpoint.entity.js +10 -1
- package/dist/modules/agents/entities/agent-checkpoint.entity.js.map +1 -1
- package/dist/modules/agents/instance-ai-builder-delegate.adapter.d.ts +1 -1
- package/dist/modules/agents/instance-ai-builder-delegate.adapter.js +3 -3
- package/dist/modules/agents/instance-ai-builder-delegate.adapter.js.map +1 -1
- package/dist/modules/agents/integrations/agent-chat-bridge.d.ts +11 -24
- package/dist/modules/agents/integrations/agent-chat-bridge.js +58 -28
- package/dist/modules/agents/integrations/agent-chat-bridge.js.map +1 -1
- package/dist/modules/agents/integrations/agent-chat-hitl-resume-handler.d.ts +5 -12
- package/dist/modules/agents/integrations/agent-chat-hitl-resume-handler.js +8 -3
- package/dist/modules/agents/integrations/agent-chat-hitl-resume-handler.js.map +1 -1
- package/dist/modules/agents/integrations/agent-chat-integration.d.ts +2 -1
- package/dist/modules/agents/integrations/agent-chat-integration.js.map +1 -1
- package/dist/modules/agents/integrations/agent-chat-message-context.d.ts +4 -4
- package/dist/modules/agents/integrations/agent-chat-message-context.js +4 -37
- package/dist/modules/agents/integrations/agent-chat-message-context.js.map +1 -1
- package/dist/modules/agents/integrations/integration-message-context.d.ts +7 -0
- package/dist/modules/agents/integrations/integration-message-context.js +115 -0
- package/dist/modules/agents/integrations/integration-message-context.js.map +1 -0
- package/dist/modules/agents/integrations/integration-message-context.service.d.ts +8 -3
- package/dist/modules/agents/integrations/integration-message-context.service.js +36 -58
- package/dist/modules/agents/integrations/integration-message-context.service.js.map +1 -1
- package/dist/modules/agents/integrations/integration-tool-definitions.js +1 -1
- package/dist/modules/agents/integrations/integration-tool-definitions.js.map +1 -1
- package/dist/modules/agents/integrations/integration-tool-execution.d.ts +0 -1
- package/dist/modules/agents/integrations/integration-tool-execution.js +19 -42
- package/dist/modules/agents/integrations/integration-tool-execution.js.map +1 -1
- package/dist/modules/agents/integrations/integration-tool-factory.d.ts +0 -1
- package/dist/modules/agents/integrations/integration-tool-factory.js +1 -3
- package/dist/modules/agents/integrations/integration-tool-factory.js.map +1 -1
- package/dist/modules/agents/integrations/integration-tool-types.d.ts +13 -0
- package/dist/modules/agents/integrations/n8n-checkpoint-storage.js +4 -2
- package/dist/modules/agents/integrations/n8n-checkpoint-storage.js.map +1 -1
- package/dist/modules/agents/integrations/platforms/telegram-bridge-behavior.d.ts +2 -0
- package/dist/modules/agents/integrations/platforms/telegram-bridge-behavior.js +40 -0
- package/dist/modules/agents/integrations/platforms/telegram-bridge-behavior.js.map +1 -1
- package/dist/modules/agents/integrations/platforms/telegram-integration.d.ts +1 -0
- package/dist/modules/agents/integrations/platforms/telegram-integration.js +4 -0
- package/dist/modules/agents/integrations/platforms/telegram-integration.js.map +1 -1
- package/dist/modules/agents/repositories/agent-checkpoint.repository.d.ts +1 -1
- package/dist/modules/agents/repositories/agent-checkpoint.repository.js +2 -2
- package/dist/modules/agents/repositories/agent-checkpoint.repository.js.map +1 -1
- package/dist/modules/agents/repositories/agent-execution.repository.d.ts +2 -1
- package/dist/modules/agents/repositories/agent-execution.repository.js +7 -4
- package/dist/modules/agents/repositories/agent-execution.repository.js.map +1 -1
- package/dist/modules/agents/sub-agents/delegate-sub-agent-tool.js +3 -0
- package/dist/modules/agents/sub-agents/delegate-sub-agent-tool.js.map +1 -1
- package/dist/modules/agents/sub-agents/sub-agent-runner.d.ts +3 -4
- package/dist/modules/agents/sub-agents/sub-agent-runner.js +95 -151
- package/dist/modules/agents/sub-agents/sub-agent-runner.js.map +1 -1
- package/dist/modules/agents/tools/workflow-tool-factory.js +1 -1
- package/dist/modules/agents/tools/workflow-tool-factory.js.map +1 -1
- package/dist/modules/agents/utils/agent-credential-provider.d.ts +1 -1
- package/dist/modules/agents/utils/agent-credential-provider.js +2 -2
- package/dist/modules/agents/utils/agent-credential-provider.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 +3 -0
- package/dist/modules/agents/utils/execution-to-message-mapper.js.map +1 -1
- package/dist/modules/agents/utils/mcp-attribution.js +3 -1
- package/dist/modules/agents/utils/mcp-attribution.js.map +1 -1
- package/dist/modules/breaking-changes/breaking-changes.migration-registry.service.d.ts +2 -2
- package/dist/modules/breaking-changes/breaking-changes.migration-registry.service.js.map +1 -1
- package/dist/modules/breaking-changes/breaking-changes.migration.service.d.ts +4 -11
- package/dist/modules/breaking-changes/breaking-changes.migration.service.js +52 -28
- package/dist/modules/breaking-changes/breaking-changes.migration.service.js.map +1 -1
- package/dist/modules/breaking-changes/detection-report.d.ts +5 -0
- package/dist/modules/breaking-changes/detection-report.js +18 -0
- package/dist/modules/breaking-changes/detection-report.js.map +1 -0
- package/dist/modules/breaking-changes/migrations/execute-workflow-each-to-loop.migration.d.ts +2 -0
- package/dist/modules/breaking-changes/migrations/execute-workflow-each-to-loop.migration.js +159 -0
- package/dist/modules/breaking-changes/migrations/execute-workflow-each-to-loop.migration.js.map +1 -0
- package/dist/modules/breaking-changes/migrations/index.d.ts +2 -2
- package/dist/modules/breaking-changes/migrations/index.js +2 -1
- package/dist/modules/breaking-changes/migrations/index.js.map +1 -1
- package/dist/modules/breaking-changes/migrations/node-migration.d.ts +30 -1
- package/dist/modules/breaking-changes/migrations/node-migration.js +12 -0
- package/dist/modules/breaking-changes/migrations/node-migration.js.map +1 -1
- package/dist/modules/breaking-changes/rules/v2/oauth-callback-auth.rule.js +2 -1
- package/dist/modules/breaking-changes/rules/v2/oauth-callback-auth.rule.js.map +1 -1
- package/dist/modules/breaking-changes/rules/v2/pyodide-removed.rule.js +6 -12
- package/dist/modules/breaking-changes/rules/v2/pyodide-removed.rule.js.map +1 -1
- package/dist/modules/breaking-changes/rules/v3/agent-node-version.rule.js +6 -12
- package/dist/modules/breaking-changes/rules/v3/agent-node-version.rule.js.map +1 -1
- package/dist/modules/breaking-changes/rules/v3/agent-removed-modes.rule.js +7 -13
- package/dist/modules/breaking-changes/rules/v3/agent-removed-modes.rule.js.map +1 -1
- package/dist/modules/breaking-changes/rules/v3/ai-transform-deprecated.rule.js +6 -12
- package/dist/modules/breaking-changes/rules/v3/ai-transform-deprecated.rule.js.map +1 -1
- package/dist/modules/breaking-changes/rules/v3/always-output-data-multi-output.rule.js +6 -13
- package/dist/modules/breaking-changes/rules/v3/always-output-data-multi-output.rule.js.map +1 -1
- package/dist/modules/breaking-changes/rules/v3/caller-policy-default-any.rule.js +2 -1
- package/dist/modules/breaking-changes/rules/v3/caller-policy-default-any.rule.js.map +1 -1
- package/dist/modules/breaking-changes/rules/v3/chat-hub-deprecated.rule.js +2 -1
- package/dist/modules/breaking-changes/rules/v3/chat-hub-deprecated.rule.js.map +1 -1
- package/dist/modules/breaking-changes/rules/v3/chat-trigger-embedded-json.rule.js +6 -12
- package/dist/modules/breaking-changes/rules/v3/chat-trigger-embedded-json.rule.js.map +1 -1
- package/dist/modules/breaking-changes/rules/v3/compression-node-limits.rule.js +2 -1
- package/dist/modules/breaking-changes/rules/v3/compression-node-limits.rule.js.map +1 -1
- package/dist/modules/breaking-changes/rules/v3/docker-only-deployment.rule.js +2 -1
- package/dist/modules/breaking-changes/rules/v3/docker-only-deployment.rule.js.map +1 -1
- package/dist/modules/breaking-changes/rules/v3/execute-workflow-each-mode.rule.js +6 -12
- package/dist/modules/breaking-changes/rules/v3/execute-workflow-each-mode.rule.js.map +1 -1
- package/dist/modules/breaking-changes/rules/v3/execute-workflow-source-modes.rule.js +6 -12
- package/dist/modules/breaking-changes/rules/v3/execute-workflow-source-modes.rule.js.map +1 -1
- package/dist/modules/breaking-changes/rules/v3/external-secrets-project-roles-default.rule.js +3 -2
- package/dist/modules/breaking-changes/rules/v3/external-secrets-project-roles-default.rule.js.map +1 -1
- package/dist/modules/breaking-changes/rules/v3/get-paired-item.rule.js +6 -12
- package/dist/modules/breaking-changes/rules/v3/get-paired-item.rule.js.map +1 -1
- package/dist/modules/breaking-changes/rules/v3/gmail-trigger-version.rule.js +6 -12
- package/dist/modules/breaking-changes/rules/v3/gmail-trigger-version.rule.js.map +1 -1
- package/dist/modules/breaking-changes/rules/v3/in-memory-binary-data.rule.js +2 -1
- package/dist/modules/breaking-changes/rules/v3/in-memory-binary-data.rule.js.map +1 -1
- package/dist/modules/breaking-changes/rules/v3/offload-manual-executions.rule.js +2 -1
- package/dist/modules/breaking-changes/rules/v3/offload-manual-executions.rule.js.map +1 -1
- package/dist/modules/breaking-changes/rules/v3/pre-execute-error-creates-execution.rule.js +2 -1
- package/dist/modules/breaking-changes/rules/v3/pre-execute-error-creates-execution.rule.js.map +1 -1
- package/dist/modules/breaking-changes/rules/v3/ssrf-default-blocked-ranges.rule.js +2 -1
- package/dist/modules/breaking-changes/rules/v3/ssrf-default-blocked-ranges.rule.js.map +1 -1
- package/dist/modules/breaking-changes/rules/v3/task-runner-task-timeout.rule.js +2 -1
- package/dist/modules/breaking-changes/rules/v3/task-runner-task-timeout.rule.js.map +1 -1
- package/dist/modules/breaking-changes/rules/v3/unverified-packages.rule.js +2 -1
- package/dist/modules/breaking-changes/rules/v3/unverified-packages.rule.js.map +1 -1
- package/dist/modules/chat-hub/chat-hub-workflow.service.d.ts +1 -0
- package/dist/modules/chat-hub/chat-hub-workflow.service.js +7 -2
- package/dist/modules/chat-hub/chat-hub-workflow.service.js.map +1 -1
- package/dist/modules/chat-hub/chat-hub.attachment.service.js +3 -1
- package/dist/modules/chat-hub/chat-hub.attachment.service.js.map +1 -1
- package/dist/modules/community-packages/community-node-types-utils.d.ts +2 -2
- package/dist/modules/community-packages/community-node-types-utils.js +4 -2
- package/dist/modules/community-packages/community-node-types-utils.js.map +1 -1
- package/dist/modules/community-packages/community-node-types.service.d.ts +1 -0
- package/dist/modules/community-packages/community-node-types.service.js +12 -6
- package/dist/modules/community-packages/community-node-types.service.js.map +1 -1
- package/dist/modules/community-packages/community-packages.config.d.ts +1 -0
- package/dist/modules/community-packages/community-packages.config.js +2 -0
- package/dist/modules/community-packages/community-packages.config.js.map +1 -1
- package/dist/modules/community-packages/community-packages.lifecycle.service.d.ts +2 -1
- package/dist/modules/community-packages/community-packages.lifecycle.service.js +23 -18
- package/dist/modules/community-packages/community-packages.lifecycle.service.js.map +1 -1
- package/dist/modules/community-packages/community-packages.service.d.ts +1 -0
- package/dist/modules/community-packages/community-packages.service.js +33 -2
- package/dist/modules/community-packages/community-packages.service.js.map +1 -1
- package/dist/modules/engine-v2/engine-data-plane-client.d.ts +2 -1
- package/dist/modules/engine-v2/engine-data-plane-client.js +14 -0
- package/dist/modules/engine-v2/engine-data-plane-client.js.map +1 -1
- package/dist/modules/engine-v2/engine-v2.module.d.ts +1 -0
- package/dist/modules/engine-v2/engine-v2.module.js +11 -2
- package/dist/modules/engine-v2/engine-v2.module.js.map +1 -1
- package/dist/modules/engine-v2/engine-v2.runtime.d.ts +11 -2
- package/dist/modules/engine-v2/engine-v2.runtime.js +29 -11
- package/dist/modules/engine-v2/engine-v2.runtime.js.map +1 -1
- package/dist/modules/external-secrets.ee/constants.d.ts +0 -1
- package/dist/modules/external-secrets.ee/constants.js +1 -2
- package/dist/modules/external-secrets.ee/constants.js.map +1 -1
- package/dist/modules/external-secrets.ee/external-secrets-provider-connection-manager.ee.d.ts +1 -2
- package/dist/modules/external-secrets.ee/external-secrets-provider-connection-manager.ee.js +28 -29
- package/dist/modules/external-secrets.ee/external-secrets-provider-connection-manager.ee.js.map +1 -1
- package/dist/modules/external-secrets.ee/external-secrets.config.d.ts +2 -0
- package/dist/modules/external-secrets.ee/external-secrets.config.js +12 -0
- package/dist/modules/external-secrets.ee/external-secrets.config.js.map +1 -1
- package/dist/modules/external-secrets.ee/provider-lifecycle.service.js +1 -1
- package/dist/modules/external-secrets.ee/provider-lifecycle.service.js.map +1 -1
- package/dist/modules/external-secrets.ee/providers/infisical.js +6 -2
- package/dist/modules/external-secrets.ee/providers/infisical.js.map +1 -1
- package/dist/modules/external-secrets.ee/providers/vault.d.ts +1 -0
- package/dist/modules/external-secrets.ee/providers/vault.js +43 -13
- package/dist/modules/external-secrets.ee/providers/vault.js.map +1 -1
- package/dist/modules/external-secrets.ee/retry-manager.service.js +9 -1
- package/dist/modules/external-secrets.ee/retry-manager.service.js.map +1 -1
- package/dist/modules/external-secrets.ee/secrets-cache.service.d.ts +5 -2
- package/dist/modules/external-secrets.ee/secrets-cache.service.js +23 -20
- package/dist/modules/external-secrets.ee/secrets-cache.service.js.map +1 -1
- package/dist/modules/external-secrets.ee/types.d.ts +1 -0
- package/dist/modules/external-secrets.ee/types.js +7 -1
- package/dist/modules/external-secrets.ee/types.js.map +1 -1
- package/dist/modules/external-secrets.ee/with-timeout.d.ts +4 -0
- package/dist/modules/external-secrets.ee/with-timeout.js +21 -0
- package/dist/modules/external-secrets.ee/with-timeout.js.map +1 -0
- package/dist/modules/insights/database/repositories/insights-by-period.repository.d.ts +3 -2
- package/dist/modules/insights/database/repositories/insights-by-period.repository.js +4 -3
- package/dist/modules/insights/database/repositories/insights-by-period.repository.js.map +1 -1
- package/dist/modules/insights/insights-collection.service.js +10 -2
- package/dist/modules/insights/insights-collection.service.js.map +1 -1
- package/dist/modules/insights/insights.module.d.ts +1 -1
- package/dist/modules/instance-ai/computer-use-availability.d.ts +14 -0
- package/dist/modules/instance-ai/computer-use-availability.js +42 -0
- package/dist/modules/instance-ai/computer-use-availability.js.map +1 -0
- package/dist/modules/instance-ai/eval/agent-execution.service.js +1 -1
- package/dist/modules/instance-ai/eval/agent-execution.service.js.map +1 -1
- package/dist/modules/instance-ai/eval/eval-mocked-credentials-helper.d.ts +4 -2
- package/dist/modules/instance-ai/eval/eval-mocked-credentials-helper.js +17 -3
- package/dist/modules/instance-ai/eval/eval-mocked-credentials-helper.js.map +1 -1
- package/dist/modules/instance-ai/eval/execution.service.js +14 -4
- package/dist/modules/instance-ai/eval/execution.service.js.map +1 -1
- package/dist/modules/instance-ai/eval/thread-restore.service.d.ts +9 -3
- package/dist/modules/instance-ai/eval/thread-restore.service.js +75 -7
- package/dist/modules/instance-ai/eval/thread-restore.service.js.map +1 -1
- package/dist/modules/instance-ai/eval/workflow-analysis.d.ts +3 -1
- package/dist/modules/instance-ai/eval/workflow-analysis.js +16 -2
- package/dist/modules/instance-ai/eval/workflow-analysis.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai-conversation-history.service.js +1 -1
- package/dist/modules/instance-ai/instance-ai-conversation-history.service.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai-execution-wait.d.ts +14 -0
- package/dist/modules/instance-ai/instance-ai-execution-wait.js +66 -0
- package/dist/modules/instance-ai/instance-ai-execution-wait.js.map +1 -0
- package/dist/modules/instance-ai/instance-ai-settings.service.js +1 -4
- package/dist/modules/instance-ai/instance-ai-settings.service.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai-step-run.d.ts +32 -0
- package/dist/modules/instance-ai/instance-ai-step-run.js +135 -0
- package/dist/modules/instance-ai/instance-ai-step-run.js.map +1 -0
- package/dist/modules/instance-ai/instance-ai.adapter.service.d.ts +9 -2
- package/dist/modules/instance-ai/instance-ai.adapter.service.js +305 -92
- package/dist/modules/instance-ai/instance-ai.adapter.service.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai.controller.d.ts +1 -0
- package/dist/modules/instance-ai/instance-ai.controller.js +17 -4
- package/dist/modules/instance-ai/instance-ai.controller.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai.service.d.ts +4 -4
- package/dist/modules/instance-ai/instance-ai.service.js +85 -121
- package/dist/modules/instance-ai/instance-ai.service.js.map +1 -1
- package/dist/modules/instance-ai/instance-context.service.d.ts +39 -10
- package/dist/modules/instance-ai/instance-context.service.js +283 -69
- package/dist/modules/instance-ai/instance-context.service.js.map +1 -1
- package/dist/modules/instance-ai/internal-messages.d.ts +11 -2
- package/dist/modules/instance-ai/internal-messages.js +183 -16
- package/dist/modules/instance-ai/internal-messages.js.map +1 -1
- package/dist/modules/instance-ai/message-parser.js.map +1 -1
- package/dist/modules/instance-registry/instance-registry.module.d.ts +2 -2
- package/dist/modules/instance-registry/instance-registry.module.js +5 -1
- package/dist/modules/instance-registry/instance-registry.module.js.map +1 -1
- package/dist/modules/instance-registry/stale-member-cleanup.task.d.ts +1 -1
- package/dist/modules/instance-registry/stale-member-cleanup.task.js +1 -1
- package/dist/modules/instance-registry/stale-member-cleanup.task.js.map +1 -1
- package/dist/modules/instance-registry/storage/redis-instance-storage.js +2 -10
- package/dist/modules/instance-registry/storage/redis-instance-storage.js.map +1 -1
- package/dist/modules/mcp/mcp-post-save-metrics.service.d.ts +10 -0
- package/dist/modules/mcp/mcp-post-save-metrics.service.js +40 -0
- package/dist/modules/mcp/mcp-post-save-metrics.service.js.map +1 -0
- package/dist/modules/mcp/mcp-protected-resource.d.ts +5 -2
- package/dist/modules/mcp/mcp-protected-resource.js +25 -4
- package/dist/modules/mcp/mcp-protected-resource.js.map +1 -1
- package/dist/modules/mcp/mcp-scopes.d.ts +3 -0
- package/dist/modules/mcp/mcp-scopes.js +21 -1
- package/dist/modules/mcp/mcp-scopes.js.map +1 -1
- package/dist/modules/mcp/mcp-tool-availability.d.ts +7 -0
- package/dist/modules/mcp/mcp-tool-availability.js +11 -0
- package/dist/modules/mcp/mcp-tool-availability.js.map +1 -1
- package/dist/modules/mcp/mcp.config.d.ts +1 -0
- package/dist/modules/mcp/mcp.config.js +5 -0
- package/dist/modules/mcp/mcp.config.js.map +1 -1
- package/dist/modules/mcp/mcp.constants.d.ts +6 -0
- package/dist/modules/mcp/mcp.constants.js +7 -1
- package/dist/modules/mcp/mcp.constants.js.map +1 -1
- package/dist/modules/mcp/mcp.controller.js +3 -6
- package/dist/modules/mcp/mcp.controller.js.map +1 -1
- package/dist/modules/mcp/mcp.service.d.ts +11 -7
- package/dist/modules/mcp/mcp.service.js +116 -43
- package/dist/modules/mcp/mcp.service.js.map +1 -1
- package/dist/modules/mcp/mcp.types.d.ts +0 -1
- package/dist/modules/mcp/tools/get-instance-context.tool.d.ts +29 -0
- package/dist/modules/mcp/tools/get-instance-context.tool.js +109 -0
- package/dist/modules/mcp/tools/get-instance-context.tool.js.map +1 -0
- package/dist/modules/mcp/tools/get-node-usage.tool.d.ts +13 -0
- package/dist/modules/mcp/tools/get-node-usage.tool.js +117 -0
- package/dist/modules/mcp/tools/get-node-usage.tool.js.map +1 -0
- package/dist/modules/mcp/tools/get-user-preferences.tool.d.ts +10 -0
- package/dist/modules/mcp/tools/get-user-preferences.tool.js +108 -0
- package/dist/modules/mcp/tools/get-user-preferences.tool.js.map +1 -0
- package/dist/modules/mcp/tools/instance-activity.tool.d.ts +27 -0
- package/dist/modules/mcp/tools/instance-activity.tool.js +205 -0
- package/dist/modules/mcp/tools/instance-activity.tool.js.map +1 -0
- package/dist/modules/mcp/tools/list-credentials.tool.d.ts +63 -13
- package/dist/modules/mcp/tools/list-credentials.tool.js +8 -1
- package/dist/modules/mcp/tools/list-credentials.tool.js.map +1 -1
- package/dist/modules/mcp/tools/search-executions.tool.d.ts +3 -3
- package/dist/modules/mcp/tools/search-executions.tool.js +22 -14
- package/dist/modules/mcp/tools/search-executions.tool.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-builder/create-workflow-from-code.tool.d.ts +8 -4
- package/dist/modules/mcp/tools/workflow-builder/create-workflow-from-code.tool.js +128 -70
- package/dist/modules/mcp/tools/workflow-builder/create-workflow-from-code.tool.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-builder/error-code.utils.d.ts +1 -0
- package/dist/modules/mcp/tools/workflow-builder/error-code.utils.js +22 -0
- package/dist/modules/mcp/tools/workflow-builder/error-code.utils.js.map +1 -0
- package/dist/modules/mcp/tools/workflow-builder/get-workflow-best-practices.tool.d.ts +1 -3
- package/dist/modules/mcp/tools/workflow-builder/get-workflow-best-practices.tool.js +5 -6
- package/dist/modules/mcp/tools/workflow-builder/get-workflow-best-practices.tool.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-builder/get-workflow-node-types.tool.d.ts +1 -1
- package/dist/modules/mcp/tools/workflow-builder/get-workflow-node-types.tool.js +2 -2
- package/dist/modules/mcp/tools/workflow-builder/get-workflow-node-types.tool.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-builder/get-workflow-sdk-reference.tool.d.ts +2 -5
- package/dist/modules/mcp/tools/workflow-builder/get-workflow-sdk-reference.tool.js +10 -16
- package/dist/modules/mcp/tools/workflow-builder/get-workflow-sdk-reference.tool.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-builder/install-community-node.tool.d.ts +12 -0
- package/dist/modules/mcp/tools/workflow-builder/install-community-node.tool.js +140 -0
- package/dist/modules/mcp/tools/workflow-builder/install-community-node.tool.js.map +1 -0
- package/dist/modules/mcp/tools/workflow-builder/mcp-instructions.d.ts +2 -2
- package/dist/modules/mcp/tools/workflow-builder/mcp-instructions.js +17 -9
- package/dist/modules/mcp/tools/workflow-builder/mcp-instructions.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-builder/sdk-reference-content.d.ts +1 -3
- package/dist/modules/mcp/tools/workflow-builder/sdk-reference-content.js +2 -6
- package/dist/modules/mcp/tools/workflow-builder/sdk-reference-content.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-builder/search-workflow-nodes.tool.d.ts +1 -1
- package/dist/modules/mcp/tools/workflow-builder/search-workflow-nodes.tool.js +9 -8
- package/dist/modules/mcp/tools/workflow-builder/search-workflow-nodes.tool.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-builder/uninstalled-node-warnings.d.ts +13 -0
- package/dist/modules/mcp/tools/workflow-builder/uninstalled-node-warnings.js +23 -0
- package/dist/modules/mcp/tools/workflow-builder/uninstalled-node-warnings.js.map +1 -0
- package/dist/modules/mcp/tools/workflow-builder/update-workflow.tool.d.ts +18 -14
- package/dist/modules/mcp/tools/workflow-builder/update-workflow.tool.js +200 -87
- package/dist/modules/mcp/tools/workflow-builder/update-workflow.tool.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-builder/validate-workflow-code.tool.d.ts +1 -4
- package/dist/modules/mcp/tools/workflow-builder/validate-workflow-code.tool.js +3 -5
- package/dist/modules/mcp/tools/workflow-builder/validate-workflow-code.tool.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-builder/workflow-operations.d.ts +1 -3
- package/dist/modules/mcp/tools/workflow-builder/workflow-operations.js +2 -2
- package/dist/modules/mcp/tools/workflow-builder/workflow-operations.js.map +1 -1
- package/dist/modules/mcp-registry/node-description-transform.js +3 -0
- package/dist/modules/mcp-registry/node-description-transform.js.map +1 -1
- package/dist/modules/mcp-registry/registry/mcp-registry-api.client.js +1 -1
- package/dist/modules/mcp-registry/registry/mcp-registry-api.client.js.map +1 -1
- package/dist/modules/mcp-registry/registry/mcp-registry-capabilities.d.ts +6 -0
- package/dist/modules/mcp-registry/registry/mcp-registry-capabilities.js +34 -0
- package/dist/modules/mcp-registry/registry/mcp-registry-capabilities.js.map +1 -0
- package/dist/modules/mcp-registry/registry/mcp-registry-server.entity.d.ts +1 -0
- package/dist/modules/mcp-registry/registry/mcp-registry-server.entity.js.map +1 -1
- package/dist/modules/mcp-registry/registry/mcp-registry.service.d.ts +4 -1
- package/dist/modules/mcp-registry/registry/mcp-registry.service.js +20 -9
- package/dist/modules/mcp-registry/registry/mcp-registry.service.js.map +1 -1
- package/dist/modules/mcp-registry/registry/mcp-registry.types.d.ts +3 -0
- package/dist/modules/mcp-registry/registry/mcp-registry.types.js +1 -0
- package/dist/modules/mcp-registry/registry/mcp-registry.types.js.map +1 -1
- package/dist/modules/n8n-packages/engine/n8n-package-parser.js +1 -1
- package/dist/modules/n8n-packages/engine/n8n-package-parser.js.map +1 -1
- package/dist/modules/n8n-packages/entities/credential/credential.serializer.js.map +1 -1
- package/dist/modules/n8n-packages/entities/variable/variable-requirements.extractor.d.ts +8 -2
- package/dist/modules/n8n-packages/entities/variable/variable-requirements.extractor.js.map +1 -1
- package/dist/modules/n8n-packages/entities/workflow/workflow-published-state.d.ts +1 -1
- package/dist/modules/n8n-packages/entities/workflow/workflow-published-state.js +2 -2
- package/dist/modules/n8n-packages/entities/workflow/workflow-published-state.js.map +1 -1
- package/dist/modules/n8n-packages/entities/workflow/workflow.serializer.d.ts +1 -2
- package/dist/modules/n8n-packages/entities/workflow/workflow.serializer.js +4 -2
- package/dist/modules/n8n-packages/entities/workflow/workflow.serializer.js.map +1 -1
- package/dist/modules/n8n-packages/io/directory/package-directory-inventory-reader.d.ts +43 -0
- package/dist/modules/n8n-packages/io/directory/package-directory-inventory-reader.js +177 -0
- package/dist/modules/n8n-packages/io/directory/package-directory-inventory-reader.js.map +1 -0
- package/dist/modules/n8n-packages/spec/serialized/workflow-metadata.schema.d.ts +3 -0
- package/dist/modules/n8n-packages/spec/serialized/workflow-metadata.schema.js +1 -0
- package/dist/modules/n8n-packages/spec/serialized/workflow-metadata.schema.js.map +1 -1
- package/dist/modules/n8n-packages/spec/serialized/workflow.schema.d.ts +0 -3
- package/dist/modules/n8n-packages/spec/serialized/workflow.schema.js +0 -1
- package/dist/modules/n8n-packages/spec/serialized/workflow.schema.js.map +1 -1
- package/dist/modules/oauth-jwe/oauth-jwe-key.service.d.ts +1 -0
- package/dist/modules/oauth-jwe/oauth-jwe-key.service.js +10 -3
- package/dist/modules/oauth-jwe/oauth-jwe-key.service.js.map +1 -1
- package/dist/modules/oauth-server/oauth-clients.controller.js +1 -1
- package/dist/modules/oauth-server/oauth-clients.controller.js.map +1 -1
- package/dist/modules/oauth-server/oauth-consent.service.d.ts +1 -0
- package/dist/modules/oauth-server/oauth-consent.service.js +21 -10
- package/dist/modules/oauth-server/oauth-consent.service.js.map +1 -1
- package/dist/modules/oauth-server/oauth-server.service.d.ts +1 -1
- package/dist/modules/oauth-server/oauth-server.service.js +2 -2
- package/dist/modules/oauth-server/oauth-server.service.js.map +1 -1
- package/dist/modules/oauth-server/oauth-token.service.d.ts +3 -1
- package/dist/modules/oauth-server/oauth-token.service.js +10 -2
- package/dist/modules/oauth-server/oauth-token.service.js.map +1 -1
- package/dist/modules/policy-infrastructure/policy-decision-audit.d.ts +1 -1
- package/dist/modules/policy-infrastructure/policy-decision-audit.js +8 -1
- package/dist/modules/policy-infrastructure/policy-decision-audit.js.map +1 -1
- package/dist/modules/policy-infrastructure/policy-decision.service.js +1 -0
- package/dist/modules/policy-infrastructure/policy-decision.service.js.map +1 -1
- package/dist/modules/promotions.ee/base-branch-files.d.ts +2 -2
- package/dist/modules/promotions.ee/base-branch-files.js +2 -3
- package/dist/modules/promotions.ee/base-branch-files.js.map +1 -1
- package/dist/modules/promotions.ee/constants.d.ts +1 -0
- package/dist/modules/promotions.ee/constants.js +2 -1
- package/dist/modules/promotions.ee/constants.js.map +1 -1
- package/dist/modules/promotions.ee/database/repositories/promotion-provider.repository.js +1 -14
- package/dist/modules/promotions.ee/database/repositories/promotion-provider.repository.js.map +1 -1
- package/dist/modules/promotions.ee/promotion-binding-preflight.service.d.ts +22 -0
- package/dist/modules/promotions.ee/promotion-binding-preflight.service.js +264 -0
- package/dist/modules/promotions.ee/promotion-binding-preflight.service.js.map +1 -0
- package/dist/modules/promotions.ee/promotion-change.service.d.ts +8 -3
- package/dist/modules/promotions.ee/promotion-change.service.js +133 -24
- package/dist/modules/promotions.ee/promotion-change.service.js.map +1 -1
- package/dist/modules/promotions.ee/promotion-changes.controller.d.ts +2 -2
- package/dist/modules/promotions.ee/promotion-changes.controller.js +10 -12
- package/dist/modules/promotions.ee/promotion-changes.controller.js.map +1 -1
- package/dist/modules/promotions.ee/promotion-connections.service.d.ts +48 -2
- package/dist/modules/promotions.ee/promotion-connections.service.js +66 -14
- package/dist/modules/promotions.ee/promotion-connections.service.js.map +1 -1
- package/dist/modules/promotions.ee/promotions-git.service.d.ts +8 -1
- package/dist/modules/promotions.ee/promotions-git.service.js +27 -9
- package/dist/modules/promotions.ee/promotions-git.service.js.map +1 -1
- package/dist/modules/promotions.ee/promotions-git.utils.d.ts +8 -2
- package/dist/modules/promotions.ee/promotions-git.utils.js +10 -0
- package/dist/modules/promotions.ee/promotions-git.utils.js.map +1 -1
- package/dist/modules/promotions.ee/promotions.service.d.ts +9 -5
- package/dist/modules/promotions.ee/promotions.service.js +78 -21
- package/dist/modules/promotions.ee/promotions.service.js.map +1 -1
- package/dist/modules/promotions.ee/promotions.types.d.ts +6 -0
- package/dist/modules/promotions.ee/promotions.types.js.map +1 -1
- package/dist/modules/token-exchange/database/repositories/token-exchange-jti.repository.js +1 -0
- package/dist/modules/token-exchange/database/repositories/token-exchange-jti.repository.js.map +1 -1
- package/dist/modules/token-exchange/services/jti-cleanup.task.d.ts +1 -1
- package/dist/modules/token-exchange/services/jti-cleanup.task.js +1 -1
- package/dist/modules/token-exchange/services/jti-cleanup.task.js.map +1 -1
- package/dist/modules/type-availability-policies/constants.d.ts +1 -0
- package/dist/modules/type-availability-policies/constants.js +2 -1
- package/dist/modules/type-availability-policies/constants.js.map +1 -1
- package/dist/modules/type-availability-policies/database/entities/type-availability-policy.entity.js +2 -1
- package/dist/modules/type-availability-policies/database/entities/type-availability-policy.entity.js.map +1 -1
- package/dist/modules/type-availability-policies/database/repositories/type-availability-policy-scope.repository.d.ts +2 -1
- package/dist/modules/type-availability-policies/database/repositories/type-availability-policy-scope.repository.js +12 -0
- package/dist/modules/type-availability-policies/database/repositories/type-availability-policy-scope.repository.js.map +1 -1
- package/dist/modules/type-availability-policies/database/repositories/type-availability-policy.repository.d.ts +5 -1
- package/dist/modules/type-availability-policies/database/repositories/type-availability-policy.repository.js +11 -2
- package/dist/modules/type-availability-policies/database/repositories/type-availability-policy.repository.js.map +1 -1
- package/dist/modules/type-availability-policies/node-type-policy.check.d.ts +17 -0
- package/dist/modules/type-availability-policies/node-type-policy.check.js +87 -0
- package/dist/modules/type-availability-policies/node-type-policy.check.js.map +1 -0
- package/dist/modules/type-availability-policies/package-resolver.d.ts +4 -0
- package/dist/modules/type-availability-policies/package-resolver.js +26 -0
- package/dist/modules/type-availability-policies/package-resolver.js.map +1 -0
- package/dist/modules/type-availability-policies/policy-evaluator.d.ts +6 -4
- package/dist/modules/type-availability-policies/policy-evaluator.js +16 -13
- package/dist/modules/type-availability-policies/policy-evaluator.js.map +1 -1
- package/dist/modules/type-availability-policies/policy-rule.types.d.ts +4 -0
- package/dist/modules/type-availability-policies/policy-shadow-lint.d.ts +2 -1
- package/dist/modules/type-availability-policies/policy-shadow-lint.js +7 -5
- package/dist/modules/type-availability-policies/policy-shadow-lint.js.map +1 -1
- package/dist/modules/type-availability-policies/type-availability-policies.module.d.ts +1 -1
- package/dist/modules/type-availability-policies/type-availability-policies.module.js +1 -0
- package/dist/modules/type-availability-policies/type-availability-policies.module.js.map +1 -1
- package/dist/modules/type-availability-policies/type-availability-policy-instance.controller.js +3 -3
- package/dist/modules/type-availability-policies/type-availability-policy-instance.controller.js.map +1 -1
- package/dist/modules/type-availability-policies/type-availability-policy.service.d.ts +33 -4
- package/dist/modules/type-availability-policies/type-availability-policy.service.js +189 -28
- package/dist/modules/type-availability-policies/type-availability-policy.service.js.map +1 -1
- package/dist/modules/workflow-index/workflow-index.service.js +5 -2
- package/dist/modules/workflow-index/workflow-index.service.js.map +1 -1
- package/dist/node-catalog/index.d.ts +1 -1
- package/dist/node-catalog/index.js.map +1 -1
- package/dist/node-catalog/node-catalog.service.d.ts +28 -4
- package/dist/node-catalog/node-catalog.service.js +202 -7
- package/dist/node-catalog/node-catalog.service.js.map +1 -1
- package/dist/node-catalog/registry-lookup.d.ts +12 -0
- package/dist/node-catalog/registry-lookup.js +68 -0
- package/dist/node-catalog/registry-lookup.js.map +1 -0
- package/dist/node-execution/execute-node.service.d.ts +72 -0
- package/dist/node-execution/execute-node.service.js +297 -0
- package/dist/node-execution/execute-node.service.js.map +1 -0
- package/dist/node-execution/index.d.ts +2 -0
- package/dist/node-execution/index.js +5 -1
- package/dist/node-execution/index.js.map +1 -1
- package/dist/oauth/dcr-managed-fields.d.ts +1 -1
- package/dist/oauth/dcr-managed-fields.js +4 -2
- package/dist/oauth/dcr-managed-fields.js.map +1 -1
- package/dist/policy/policy-enforcement-backend.d.ts +2 -1
- package/dist/policy/policy-enforcement.service.d.ts +3 -1
- package/dist/policy/policy-enforcement.service.js +9 -0
- package/dist/policy/policy-enforcement.service.js.map +1 -1
- package/dist/posthog/index.d.ts +1 -0
- package/dist/posthog/index.js +35 -14
- package/dist/posthog/index.js.map +1 -1
- package/dist/public-api/constants.d.ts +1 -0
- package/dist/public-api/constants.js +5 -0
- package/dist/public-api/constants.js.map +1 -0
- package/dist/public-api/public-api-controller.registry.d.ts +1 -0
- package/dist/public-api/public-api-controller.registry.js +15 -0
- package/dist/public-api/public-api-controller.registry.js.map +1 -1
- package/dist/public-api/types.d.ts +2 -27
- package/dist/public-api/v1/controllers/credentials.public.controller.d.ts +3 -1
- package/dist/public-api/v1/controllers/credentials.public.controller.js +52 -1
- package/dist/public-api/v1/controllers/credentials.public.controller.js.map +1 -1
- package/dist/public-api/v1/controllers/executions.public.controller.js +3 -3
- package/dist/public-api/v1/controllers/executions.public.controller.js.map +1 -1
- package/dist/public-api/v1/controllers/folders.public.controller.d.ts +10 -0
- package/dist/public-api/v1/controllers/folders.public.controller.js +121 -0
- package/dist/public-api/v1/controllers/folders.public.controller.js.map +1 -0
- package/dist/public-api/v1/controllers/index.d.ts +2 -0
- package/dist/public-api/v1/controllers/index.js +2 -0
- package/dist/public-api/v1/controllers/index.js.map +1 -1
- package/dist/public-api/v1/controllers/insights.public.controller.d.ts +9 -0
- package/dist/public-api/v1/controllers/insights.public.controller.js +69 -0
- package/dist/public-api/v1/controllers/insights.public.controller.js.map +1 -0
- package/dist/public-api/v1/controllers/node-type-policies.public.controller.d.ts +11 -5
- package/dist/public-api/v1/controllers/node-type-policies.public.controller.js +152 -4
- package/dist/public-api/v1/controllers/node-type-policies.public.controller.js.map +1 -1
- package/dist/public-api/v1/controllers/promotions.public.controller.d.ts +5 -2
- package/dist/public-api/v1/controllers/promotions.public.controller.js +60 -4
- package/dist/public-api/v1/controllers/promotions.public.controller.js.map +1 -1
- package/dist/public-api/v1/controllers/roles.public.controller.js +1 -0
- package/dist/public-api/v1/controllers/roles.public.controller.js.map +1 -1
- package/dist/public-api/v1/controllers/tags.public.controller.d.ts +3 -1
- package/dist/public-api/v1/controllers/tags.public.controller.js +61 -0
- package/dist/public-api/v1/controllers/tags.public.controller.js.map +1 -1
- package/dist/public-api/v1/handlers/credentials/credentials.utils.d.ts +3 -3
- package/dist/public-api/v1/handlers/credentials/credentials.utils.js +1 -6
- package/dist/public-api/v1/handlers/credentials/credentials.utils.js.map +1 -1
- package/dist/public-api/v1/handlers/folders/folders.handler.d.ts +0 -7
- package/dist/public-api/v1/handlers/folders/folders.handler.js +0 -29
- package/dist/public-api/v1/handlers/folders/folders.handler.js.map +1 -1
- package/dist/public-api/v1/openapi.yml +4051 -2008
- package/dist/public-api/v1/shared/middlewares/global.middleware.d.ts +1 -1
- package/dist/public-api/v1/shared/middlewares/global.middleware.js +4 -3
- package/dist/public-api/v1/shared/middlewares/global.middleware.js.map +1 -1
- package/dist/requests.d.ts +1 -0
- package/dist/scaling/constants.d.ts +2 -0
- package/dist/scaling/constants.js +4 -1
- package/dist/scaling/constants.js.map +1 -1
- package/dist/scaling/pubsub/subscriber.service.d.ts +5 -0
- package/dist/scaling/pubsub/subscriber.service.js +47 -0
- package/dist/scaling/pubsub/subscriber.service.js.map +1 -1
- package/dist/scheduling/durable-job-provisioner.d.ts +10 -1
- package/dist/scheduling/durable-job-provisioner.js +26 -9
- package/dist/scheduling/durable-job-provisioner.js.map +1 -1
- package/dist/scheduling/durable-scheduler.d.ts +2 -1
- package/dist/scheduling/durable-scheduler.js +4 -3
- package/dist/scheduling/durable-scheduler.js.map +1 -1
- package/dist/scheduling/scheduled-job-owner-registry.d.ts +2 -1
- package/dist/scheduling/scheduled-job-owner-registry.js +2 -1
- package/dist/scheduling/scheduled-job-owner-registry.js.map +1 -1
- package/dist/scheduling/system-tasks/emit-system-task-metric.d.ts +3 -0
- package/dist/scheduling/system-tasks/emit-system-task-metric.js +11 -0
- package/dist/scheduling/system-tasks/emit-system-task-metric.js.map +1 -0
- package/dist/scheduling/system-tasks/system-task-handler.d.ts +5 -1
- package/dist/scheduling/system-tasks/system-task-handler.js +9 -8
- package/dist/scheduling/system-tasks/system-task-handler.js.map +1 -1
- package/dist/scheduling/system-tasks/system-task-job-registrar.d.ts +28 -0
- package/dist/scheduling/system-tasks/system-task-job-registrar.js +130 -0
- package/dist/scheduling/system-tasks/system-task-job-registrar.js.map +1 -0
- package/dist/scheduling/system-tasks/system-task-run-observer.d.ts +13 -0
- package/dist/scheduling/system-tasks/system-task-run-observer.js +54 -0
- package/dist/scheduling/system-tasks/system-task-run-observer.js.map +1 -0
- package/dist/scheduling/system-tasks/system-task-runner.d.ts +13 -3
- package/dist/scheduling/system-tasks/system-task-runner.js +85 -15
- package/dist/scheduling/system-tasks/system-task-runner.js.map +1 -1
- package/dist/scheduling/system-tasks/system-task-scheduled-job-owner.d.ts +13 -0
- package/dist/scheduling/system-tasks/system-task-scheduled-job-owner.js +51 -0
- package/dist/scheduling/system-tasks/system-task-scheduled-job-owner.js.map +1 -0
- package/dist/scheduling/system-tasks/system-task-timer.d.ts +3 -1
- package/dist/scheduling/system-tasks/system-task-timer.js +33 -9
- package/dist/scheduling/system-tasks/system-task-timer.js.map +1 -1
- package/dist/scheduling/system-tasks/system-task-version-stamp.d.ts +5 -0
- package/dist/scheduling/system-tasks/system-task-version-stamp.js +14 -0
- package/dist/scheduling/system-tasks/system-task-version-stamp.js.map +1 -0
- package/dist/server.d.ts +0 -1
- package/dist/server.js +4 -2
- package/dist/server.js.map +1 -1
- package/dist/services/ai-gateway.service.d.ts +2 -1
- package/dist/services/ai-gateway.service.js +7 -4
- package/dist/services/ai-gateway.service.js.map +1 -1
- package/dist/services/ai-preference.service.d.ts +29 -5
- package/dist/services/ai-preference.service.js +119 -20
- package/dist/services/ai-preference.service.js.map +1 -1
- package/dist/services/credentials-tester.service.js +12 -0
- package/dist/services/credentials-tester.service.js.map +1 -1
- package/dist/services/engine-data-plane-proxy.service.d.ts +3 -1
- package/dist/services/engine-data-plane-proxy.service.js +5 -0
- package/dist/services/engine-data-plane-proxy.service.js.map +1 -1
- package/dist/services/free-ai-credits.service.d.ts +1 -0
- package/dist/services/frontend.service.js +2 -1
- package/dist/services/frontend.service.js.map +1 -1
- package/dist/services/protected-resource.registry.d.ts +2 -1
- package/dist/services/protected-resource.registry.js.map +1 -1
- package/dist/services/role.service.js +5 -4
- package/dist/services/role.service.js.map +1 -1
- package/dist/utils/strapi-utils.d.ts +1 -0
- package/dist/utils/strapi-utils.js.map +1 -1
- package/dist/wait-tracker.d.ts +5 -0
- package/dist/wait-tracker.js +130 -20
- package/dist/wait-tracker.js.map +1 -1
- package/dist/webhooks/live-webhooks.js +2 -2
- package/dist/webhooks/live-webhooks.js.map +1 -1
- package/dist/webhooks/test-webhook-registrations.service.d.ts +3 -1
- package/dist/webhooks/test-webhook-registrations.service.js +24 -11
- package/dist/webhooks/test-webhook-registrations.service.js.map +1 -1
- package/dist/webhooks/test-webhooks.d.ts +1 -0
- package/dist/webhooks/test-webhooks.js +9 -4
- package/dist/webhooks/test-webhooks.js.map +1 -1
- package/dist/webhooks/webhook-helpers.d.ts +1 -1
- package/dist/webhooks/webhook-helpers.js +113 -92
- package/dist/webhooks/webhook-helpers.js.map +1 -1
- package/dist/workflow-helpers.d.ts +1 -1
- package/dist/workflow-helpers.js +10 -3
- package/dist/workflow-helpers.js.map +1 -1
- package/dist/workflow-runner.js +104 -7
- package/dist/workflow-runner.js.map +1 -1
- package/dist/workflows/workflow.service.d.ts +1 -1
- package/package.json +42 -36
- package/dist/controllers/instance-ai-examples.controller.d.ts +0 -31
- package/dist/controllers/instance-ai-examples.controller.js +0 -104
- package/dist/controllers/instance-ai-examples.controller.js.map +0 -1
- package/dist/instance-ai-examples.data.json +0 -277957
- package/dist/public-api/v1/handlers/credentials/credentials.handler.d.ts +0 -8
- package/dist/public-api/v1/handlers/credentials/credentials.handler.js +0 -45
- package/dist/public-api/v1/handlers/credentials/credentials.handler.js.map +0 -1
- package/dist/public-api/v1/handlers/insights/insights.handler.d.ts +0 -7
- package/dist/public-api/v1/handlers/insights/insights.handler.js +0 -62
- package/dist/public-api/v1/handlers/insights/insights.handler.js.map +0 -1
- package/dist/public-api/v1/handlers/tags/tags.handler.d.ts +0 -8
- package/dist/public-api/v1/handlers/tags/tags.handler.js +0 -46
- package/dist/public-api/v1/handlers/tags/tags.handler.js.map +0 -1
|
@@ -1,12 +1,29 @@
|
|
|
1
1
|
import { Logger } from '@n8n/backend-common';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import type { User } from '@n8n/db';
|
|
2
|
+
import { ActivityEventRepository, ExecutionRepository, ProjectRepository, WorkflowRepository } from '@n8n/db';
|
|
3
|
+
import type { ActivityEventCategory, User } from '@n8n/db';
|
|
5
4
|
import type { InstanceAiActivityEntry, InstanceAiActivityExpansion } from '@n8n/instance-ai';
|
|
5
|
+
import { ProjectService } from '../../services/project.service.ee';
|
|
6
|
+
export type InstanceContextScope = {
|
|
7
|
+
surface: 'conversation';
|
|
8
|
+
projectId?: string;
|
|
9
|
+
} | {
|
|
10
|
+
surface: 'mcp';
|
|
11
|
+
projectId?: string;
|
|
12
|
+
credentialGranted: boolean;
|
|
13
|
+
executionGranted: boolean;
|
|
14
|
+
};
|
|
15
|
+
export type ActivityPage = {
|
|
16
|
+
entries: InstanceAiActivityEntry[];
|
|
17
|
+
hasMore: boolean;
|
|
18
|
+
nextBeforeId?: number;
|
|
19
|
+
};
|
|
6
20
|
export declare const INSTANCE_CONTEXT_CURSOR = "instanceContext";
|
|
7
21
|
export type InstanceContextCursor = {
|
|
8
22
|
activityMark: number;
|
|
23
|
+
activityFloor: number;
|
|
24
|
+
activityCategories: ActivityEventCategory[];
|
|
9
25
|
activitySeen: number[];
|
|
26
|
+
activitySeenFloor?: number;
|
|
10
27
|
runsThrough: string;
|
|
11
28
|
};
|
|
12
29
|
export declare function readInstanceContextCursor(metadata: Record<string, unknown> | undefined): InstanceContextCursor | null;
|
|
@@ -16,33 +33,45 @@ export type InstanceContextBlock = {
|
|
|
16
33
|
};
|
|
17
34
|
export declare class InstanceContextService {
|
|
18
35
|
private readonly logger;
|
|
19
|
-
private readonly globalConfig;
|
|
20
36
|
private readonly activityEventRepository;
|
|
21
37
|
private readonly executionRepository;
|
|
22
38
|
private readonly workflowRepository;
|
|
23
|
-
|
|
24
|
-
|
|
39
|
+
private readonly projectRepository;
|
|
40
|
+
private readonly projectService;
|
|
41
|
+
constructor(logger: Logger, activityEventRepository: ActivityEventRepository, executionRepository: ExecutionRepository, workflowRepository: WorkflowRepository, projectRepository: ProjectRepository, projectService: ProjectService);
|
|
25
42
|
buildBlock(input: {
|
|
26
43
|
user: User;
|
|
27
|
-
|
|
44
|
+
scope: InstanceContextScope;
|
|
28
45
|
cursor: InstanceContextCursor | null;
|
|
29
46
|
isMachineFollowUp?: boolean;
|
|
47
|
+
enabled: boolean;
|
|
30
48
|
now?: Date;
|
|
31
49
|
}): Promise<InstanceContextBlock | null>;
|
|
32
50
|
list(input: {
|
|
33
51
|
user: User;
|
|
34
|
-
|
|
52
|
+
scope: InstanceContextScope;
|
|
35
53
|
limit: number;
|
|
36
54
|
category?: string;
|
|
37
55
|
resourceId?: string;
|
|
38
56
|
beforeId?: number;
|
|
39
57
|
}): Promise<InstanceAiActivityEntry[]>;
|
|
58
|
+
listPage(input: {
|
|
59
|
+
user: User;
|
|
60
|
+
scope: InstanceContextScope;
|
|
61
|
+
limit: number;
|
|
62
|
+
category?: string;
|
|
63
|
+
resourceId?: string;
|
|
64
|
+
beforeId?: number;
|
|
65
|
+
}): Promise<ActivityPage>;
|
|
40
66
|
expand(input: {
|
|
41
67
|
id: number;
|
|
42
68
|
user: User;
|
|
43
|
-
|
|
69
|
+
scope: InstanceContextScope;
|
|
44
70
|
}): Promise<InstanceAiActivityExpansion | null>;
|
|
45
71
|
private readEntries;
|
|
46
72
|
private readRuns;
|
|
47
|
-
private
|
|
73
|
+
private resolveScope;
|
|
74
|
+
private credentialReadableProjectIds;
|
|
75
|
+
hasWithheldWorkflows(user: User, scope: InstanceContextScope): Promise<boolean>;
|
|
76
|
+
private withoutWithheldWorkflows;
|
|
48
77
|
}
|
|
@@ -12,72 +12,91 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.InstanceContextService = exports.INSTANCE_CONTEXT_CURSOR = void 0;
|
|
13
13
|
exports.readInstanceContextCursor = readInstanceContextCursor;
|
|
14
14
|
const backend_common_1 = require("@n8n/backend-common");
|
|
15
|
-
const config_1 = require("@n8n/config");
|
|
16
15
|
const constants_1 = require("@n8n/constants");
|
|
17
16
|
const db_1 = require("@n8n/db");
|
|
18
17
|
const di_1 = require("@n8n/di");
|
|
18
|
+
const permissions_1 = require("@n8n/permissions");
|
|
19
19
|
const is_record_1 = require("@n8n/utils/is-record");
|
|
20
20
|
const check_access_1 = require("../../permissions.ee/check-access");
|
|
21
|
+
const project_service_ee_1 = require("../../services/project.service.ee");
|
|
21
22
|
const internal_messages_1 = require("./internal-messages");
|
|
22
23
|
const windowSize = 40;
|
|
23
24
|
const fetchMultiplier = 4;
|
|
25
|
+
const withheldFetchMultiplier = 4;
|
|
24
26
|
const maxAgeMs = 7 * constants_1.Time.days.toMilliseconds;
|
|
27
|
+
const mcpRunWindowMs = 24 * constants_1.Time.hours.toMilliseconds;
|
|
25
28
|
const runWorkflowCap = 12;
|
|
26
29
|
const inventorySize = 8;
|
|
27
30
|
const resourceHistoryLimit = 20;
|
|
28
|
-
const
|
|
29
|
-
const seenIdsCap = activityLagIds;
|
|
31
|
+
const seenIdsCap = 200;
|
|
30
32
|
const entryFetchLimit = windowSize * fetchMultiplier;
|
|
31
33
|
exports.INSTANCE_CONTEXT_CURSOR = 'instanceContext';
|
|
32
34
|
function readInstanceContextCursor(metadata) {
|
|
33
35
|
const value = metadata?.[exports.INSTANCE_CONTEXT_CURSOR];
|
|
34
36
|
if (!(0, is_record_1.isRecord)(value))
|
|
35
37
|
return null;
|
|
36
|
-
const { activityMark, activitySeen, runsThrough } = value;
|
|
38
|
+
const { activityMark, activityFloor, activityCategories, activitySeen, runsThrough } = value;
|
|
37
39
|
if (typeof activityMark !== 'number' || !Number.isFinite(activityMark))
|
|
38
40
|
return null;
|
|
41
|
+
if (typeof activityFloor !== 'number' || !Number.isFinite(activityFloor))
|
|
42
|
+
return null;
|
|
43
|
+
if (!Array.isArray(activityCategories))
|
|
44
|
+
return null;
|
|
39
45
|
if (typeof runsThrough !== 'string' || Number.isNaN(Date.parse(runsThrough)))
|
|
40
46
|
return null;
|
|
41
47
|
return {
|
|
42
48
|
activityMark,
|
|
49
|
+
activityFloor,
|
|
50
|
+
activityCategories: activityCategories.filter(isKnownCategory),
|
|
43
51
|
activitySeen: Array.isArray(activitySeen)
|
|
44
52
|
? activitySeen.filter((id) => typeof id === 'number' && Number.isFinite(id))
|
|
45
53
|
: [],
|
|
54
|
+
...(typeof value.activitySeenFloor === 'number' && Number.isFinite(value.activitySeenFloor)
|
|
55
|
+
? { activitySeenFloor: value.activitySeenFloor }
|
|
56
|
+
: {}),
|
|
46
57
|
runsThrough,
|
|
47
58
|
};
|
|
48
59
|
}
|
|
49
60
|
let InstanceContextService = class InstanceContextService {
|
|
50
|
-
constructor(logger,
|
|
61
|
+
constructor(logger, activityEventRepository, executionRepository, workflowRepository, projectRepository, projectService) {
|
|
51
62
|
this.logger = logger;
|
|
52
|
-
this.globalConfig = globalConfig;
|
|
53
63
|
this.activityEventRepository = activityEventRepository;
|
|
54
64
|
this.executionRepository = executionRepository;
|
|
55
65
|
this.workflowRepository = workflowRepository;
|
|
66
|
+
this.projectRepository = projectRepository;
|
|
67
|
+
this.projectService = projectService;
|
|
56
68
|
this.logger = this.logger.scoped('instance-ai');
|
|
57
69
|
}
|
|
58
|
-
get enabled() {
|
|
59
|
-
return this.globalConfig.instanceAi.instanceContextEnabled;
|
|
60
|
-
}
|
|
61
70
|
async buildBlock(input) {
|
|
62
|
-
if (!
|
|
71
|
+
if (!input.enabled)
|
|
72
|
+
return null;
|
|
73
|
+
if (input.isMachineFollowUp)
|
|
63
74
|
return null;
|
|
64
75
|
try {
|
|
65
76
|
const now = input.now ?? new Date();
|
|
66
|
-
const
|
|
67
|
-
|
|
68
|
-
if (projectIds.length === 0)
|
|
77
|
+
const resolved = await this.resolveScope(input.user, input.scope);
|
|
78
|
+
if (resolved === null)
|
|
69
79
|
return null;
|
|
80
|
+
const projectIds = resolved.projectIds;
|
|
81
|
+
const mcpVisibleOnly = resolved.surface === 'mcp';
|
|
82
|
+
const cursor = input.cursor;
|
|
83
|
+
const isUpdate = cursor !== null;
|
|
70
84
|
const [entries, runs, inventory] = await Promise.all([
|
|
71
|
-
this.readEntries({
|
|
72
|
-
|
|
85
|
+
this.readEntries({ cursor, now, scope: resolved }),
|
|
86
|
+
resolved.surface === 'mcp' && !resolved.runsVisible
|
|
87
|
+
? Promise.resolve([])
|
|
88
|
+
: this.readRuns({ projectIds, cursor, now, mcpVisibleOnly }),
|
|
73
89
|
isUpdate
|
|
74
90
|
? Promise.resolve(undefined)
|
|
75
|
-
: this.workflowRepository.findRecentForProjects(projectIds, inventorySize
|
|
91
|
+
: this.workflowRepository.findRecentForProjects(projectIds, inventorySize, {
|
|
92
|
+
mcpVisibleOnly,
|
|
93
|
+
}),
|
|
76
94
|
]);
|
|
77
95
|
if (entries.rows.length === 0 && runs.length === 0 && !inventory?.total)
|
|
78
96
|
return null;
|
|
79
97
|
return {
|
|
80
98
|
block: renderBlock({
|
|
99
|
+
surface: resolved.surface,
|
|
81
100
|
entries: entries.rows.map((row) => toFeedEntry(row, input.user.id, now)),
|
|
82
101
|
entriesTruncated: entries.truncated,
|
|
83
102
|
runs,
|
|
@@ -87,38 +106,77 @@ let InstanceContextService = class InstanceContextService {
|
|
|
87
106
|
}),
|
|
88
107
|
cursor: {
|
|
89
108
|
activityMark: entries.mark,
|
|
109
|
+
activityFloor: entries.floor,
|
|
110
|
+
activityCategories: resolved.allowedCategories,
|
|
90
111
|
activitySeen: entries.seen,
|
|
112
|
+
activitySeenFloor: entries.seenFloor,
|
|
91
113
|
runsThrough: now.toISOString(),
|
|
92
114
|
},
|
|
93
115
|
};
|
|
94
116
|
}
|
|
95
117
|
catch (error) {
|
|
96
118
|
this.logger.warn('Failed to build the instance-context block', { error });
|
|
119
|
+
if (input.scope.surface === 'mcp')
|
|
120
|
+
throw error;
|
|
97
121
|
return null;
|
|
98
122
|
}
|
|
99
123
|
}
|
|
100
124
|
async list(input) {
|
|
125
|
+
return (await this.listPage(input)).entries;
|
|
126
|
+
}
|
|
127
|
+
async listPage(input) {
|
|
128
|
+
const empty = { entries: [], hasMore: false };
|
|
101
129
|
if (input.category !== undefined && !isKnownCategory(input.category))
|
|
102
|
-
return
|
|
103
|
-
const
|
|
104
|
-
if (
|
|
105
|
-
return
|
|
130
|
+
return empty;
|
|
131
|
+
const resolved = await this.resolveScope(input.user, input.scope);
|
|
132
|
+
if (resolved === null)
|
|
133
|
+
return empty;
|
|
134
|
+
const category = resolveCategory(input.category, resolved);
|
|
135
|
+
if (category === null)
|
|
136
|
+
return empty;
|
|
137
|
+
const filtersWithheld = resolved.surface === 'mcp';
|
|
138
|
+
const fetchLimit = filtersWithheld ? input.limit * withheldFetchMultiplier : input.limit;
|
|
106
139
|
const rows = await this.activityEventRepository.findFeed({
|
|
107
|
-
limit:
|
|
108
|
-
projectIds,
|
|
109
|
-
|
|
140
|
+
limit: fetchLimit,
|
|
141
|
+
projectIds: resolved.projectIds,
|
|
142
|
+
allowedCategories: resolved.allowedCategories,
|
|
143
|
+
...(category !== undefined ? { filterCategory: category } : {}),
|
|
110
144
|
...(input.resourceId !== undefined ? { resourceId: input.resourceId } : {}),
|
|
111
145
|
...(input.beforeId !== undefined ? { beforeId: input.beforeId } : {}),
|
|
112
146
|
});
|
|
113
|
-
|
|
147
|
+
const visible = filtersWithheld ? await this.withoutWithheldWorkflows(rows, resolved) : rows;
|
|
148
|
+
if (input.resourceId !== undefined && rows.length > 0 && visible.length === 0) {
|
|
149
|
+
return empty;
|
|
150
|
+
}
|
|
151
|
+
const hasMore = visible.length > input.limit || rows.length === fetchLimit;
|
|
152
|
+
const shown = visible.slice(0, input.limit);
|
|
153
|
+
const resumeFrom = shown.length === input.limit ? shown.at(-1)?.id : rows.at(-1)?.id;
|
|
154
|
+
return {
|
|
155
|
+
entries: shown.map((row) => toActivityEntry(row, input.user.id)),
|
|
156
|
+
hasMore,
|
|
157
|
+
...(hasMore && resumeFrom !== undefined ? { nextBeforeId: resumeFrom } : {}),
|
|
158
|
+
};
|
|
114
159
|
}
|
|
115
160
|
async expand(input) {
|
|
116
|
-
const
|
|
117
|
-
if (
|
|
161
|
+
const resolved = await this.resolveScope(input.user, input.scope);
|
|
162
|
+
if (resolved === null)
|
|
118
163
|
return null;
|
|
119
|
-
const
|
|
164
|
+
const projectIds = resolved.projectIds;
|
|
165
|
+
const row = await this.activityEventRepository.findEntry({
|
|
166
|
+
id: input.id,
|
|
167
|
+
projectIds,
|
|
168
|
+
allowedCategories: resolved.allowedCategories,
|
|
169
|
+
});
|
|
120
170
|
if (!row)
|
|
121
171
|
return null;
|
|
172
|
+
if (resolved.surface === 'mcp') {
|
|
173
|
+
const touchesCredential = row.category === 'credential' || row.resourceType === 'credential';
|
|
174
|
+
if (touchesCredential && !isCredentialVisible(row, resolved))
|
|
175
|
+
return null;
|
|
176
|
+
const [visible] = await this.withoutWithheldWorkflows([row], resolved);
|
|
177
|
+
if (!visible)
|
|
178
|
+
return null;
|
|
179
|
+
}
|
|
122
180
|
const history = row.resourceType && row.resourceId
|
|
123
181
|
? await this.activityEventRepository.findByResource({
|
|
124
182
|
resourceType: row.resourceType,
|
|
@@ -127,7 +185,7 @@ let InstanceContextService = class InstanceContextService {
|
|
|
127
185
|
limit: resourceHistoryLimit,
|
|
128
186
|
})
|
|
129
187
|
: [];
|
|
130
|
-
const hint = liveRecordHint(row);
|
|
188
|
+
const hint = liveRecordHint(row, input.scope.surface);
|
|
131
189
|
return {
|
|
132
190
|
entry: toActivityEntry(row, input.user.id),
|
|
133
191
|
resourceHistory: history
|
|
@@ -137,85 +195,232 @@ let InstanceContextService = class InstanceContextService {
|
|
|
137
195
|
};
|
|
138
196
|
}
|
|
139
197
|
async readEntries(input) {
|
|
140
|
-
const
|
|
198
|
+
const fetchLimit = input.scope.surface === 'mcp' ? entryFetchLimit * withheldFetchMultiplier : entryFetchLimit;
|
|
141
199
|
const arrivals = await this.activityEventRepository.findFeed({
|
|
142
|
-
limit:
|
|
143
|
-
projectIds: input.projectIds,
|
|
144
|
-
|
|
200
|
+
limit: fetchLimit,
|
|
201
|
+
projectIds: input.scope.projectIds,
|
|
202
|
+
allowedCategories: input.scope.allowedCategories,
|
|
203
|
+
...(input.cursor ? { afterId: input.cursor.activityMark } : {}),
|
|
145
204
|
});
|
|
205
|
+
const cursor = input.cursor;
|
|
146
206
|
const band = cursor
|
|
147
207
|
? await this.activityEventRepository.findFeed({
|
|
148
|
-
limit:
|
|
149
|
-
projectIds: input.projectIds,
|
|
150
|
-
|
|
208
|
+
limit: seenIdsCap,
|
|
209
|
+
projectIds: input.scope.projectIds,
|
|
210
|
+
allowedCategories: input.scope.allowedCategories,
|
|
211
|
+
afterId: Math.max(cursor.activityFloor, cursor.activitySeenFloor ?? 0),
|
|
151
212
|
beforeId: cursor.activityMark,
|
|
152
213
|
})
|
|
153
214
|
: [];
|
|
154
|
-
const
|
|
215
|
+
const addedCategories = input.scope.allowedCategories.filter((category) => cursor && !cursor.activityCategories.includes(category));
|
|
216
|
+
const reopened = cursor && addedCategories.length > 0
|
|
217
|
+
? await this.activityEventRepository.findFeed({
|
|
218
|
+
limit: seenIdsCap,
|
|
219
|
+
projectIds: input.scope.projectIds,
|
|
220
|
+
allowedCategories: addedCategories,
|
|
221
|
+
afterId: cursor.activitySeenFloor ?? 0,
|
|
222
|
+
beforeId: cursor.activityFloor + 1,
|
|
223
|
+
})
|
|
224
|
+
: [];
|
|
225
|
+
const read = [...arrivals, ...band, ...reopened];
|
|
226
|
+
const rows = input.scope.surface === 'mcp' ? await this.withoutWithheldWorkflows(read, input.scope) : read;
|
|
155
227
|
const alreadyShown = new Set(cursor?.activitySeen ?? []);
|
|
156
228
|
const fresh = rows.filter((row) => !alreadyShown.has(row.id) && input.now.getTime() - row.createdAt.getTime() <= maxAgeMs);
|
|
157
229
|
const shown = fresh.slice(0, windowSize);
|
|
158
|
-
const mark =
|
|
159
|
-
const
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
230
|
+
const mark = read.reduce((highest, row) => Math.max(highest, row.id), cursor?.activityMark ?? 0);
|
|
231
|
+
const cut = fresh[windowSize];
|
|
232
|
+
const floor = Math.max(cursor?.activityFloor ?? 0, cut?.id ?? 0);
|
|
233
|
+
const seen = [...alreadyShown, ...shown.map((row) => row.id)].sort((a, b) => b - a);
|
|
234
|
+
const seenFloor = Math.max(cursor?.activitySeenFloor ?? 0, seen[seenIdsCap] ?? 0);
|
|
163
235
|
return {
|
|
164
236
|
rows: shown,
|
|
165
237
|
mark,
|
|
166
|
-
|
|
167
|
-
|
|
238
|
+
floor,
|
|
239
|
+
seen: seen.filter((id) => id > seenFloor).slice(0, seenIdsCap),
|
|
240
|
+
seenFloor,
|
|
241
|
+
truncated: fresh.length > windowSize || arrivals.length === fetchLimit,
|
|
168
242
|
};
|
|
169
243
|
}
|
|
170
244
|
async readRuns(input) {
|
|
245
|
+
const windowMs = input.mcpVisibleOnly ? mcpRunWindowMs : maxAgeMs;
|
|
171
246
|
const stoppedAfter = input.cursor
|
|
172
247
|
? new Date(Date.parse(input.cursor.runsThrough))
|
|
173
|
-
: new Date(input.now.getTime() -
|
|
248
|
+
: new Date(input.now.getTime() - windowMs);
|
|
174
249
|
return await this.executionRepository.summariseRunsForProjects({
|
|
175
250
|
projectIds: input.projectIds,
|
|
176
251
|
stoppedAfter,
|
|
177
252
|
stoppedBefore: input.now,
|
|
178
253
|
workflowLimit: runWorkflowCap,
|
|
254
|
+
...(input.mcpVisibleOnly ? { mcpVisibleOnly: true } : {}),
|
|
179
255
|
});
|
|
180
256
|
}
|
|
181
|
-
async
|
|
182
|
-
if (projectId
|
|
257
|
+
async resolveScope(user, scope) {
|
|
258
|
+
if (scope.projectId !== undefined) {
|
|
259
|
+
const projectId = scope.projectId;
|
|
260
|
+
const allowed = await (0, check_access_1.userHasScopes)(user, ['workflow:read'], false, { projectId });
|
|
261
|
+
if (!allowed)
|
|
262
|
+
return null;
|
|
263
|
+
if (scope.surface === 'conversation') {
|
|
264
|
+
const credentials = await (0, check_access_1.userHasScopes)(user, ['credential:read'], false, { projectId });
|
|
265
|
+
return {
|
|
266
|
+
surface: 'conversation',
|
|
267
|
+
projectIds: [projectId],
|
|
268
|
+
allowedCategories: credentials ? ['workflow', 'credential'] : ['workflow'],
|
|
269
|
+
};
|
|
270
|
+
}
|
|
271
|
+
const credentialProjectIds = scope.credentialGranted
|
|
272
|
+
? await this.credentialReadableProjectIds(user, [projectId], (await this.projectRepository.getPersonalProjectForUser(user.id))?.id)
|
|
273
|
+
: [];
|
|
274
|
+
return {
|
|
275
|
+
surface: 'mcp',
|
|
276
|
+
projectIds: [projectId],
|
|
277
|
+
credentialProjectIds,
|
|
278
|
+
allowedCategories: credentialProjectIds.length > 0 ? ['workflow', 'credential'] : ['workflow'],
|
|
279
|
+
runsVisible: scope.executionGranted,
|
|
280
|
+
};
|
|
281
|
+
}
|
|
282
|
+
if (scope.surface === 'conversation')
|
|
283
|
+
return null;
|
|
284
|
+
if ((0, permissions_1.hasGlobalScope)(user, ['workflow:read'], { mode: 'allOf' })) {
|
|
285
|
+
const credentialProjectIds = !scope.credentialGranted
|
|
286
|
+
? []
|
|
287
|
+
: (0, permissions_1.hasGlobalScope)(user, ['credential:read'], { mode: 'allOf' })
|
|
288
|
+
? 'all-projects'
|
|
289
|
+
: await this.credentialReadableProjectIds(user, null, undefined);
|
|
290
|
+
return {
|
|
291
|
+
surface: 'mcp',
|
|
292
|
+
projectIds: 'all-projects',
|
|
293
|
+
credentialProjectIds,
|
|
294
|
+
allowedCategories: credentialProjectIds.length > 0 ? ['workflow', 'credential'] : ['workflow'],
|
|
295
|
+
runsVisible: scope.executionGranted,
|
|
296
|
+
};
|
|
297
|
+
}
|
|
298
|
+
const [scopedIds, personalProject] = await Promise.all([
|
|
299
|
+
this.projectService.getProjectIdsWithScope(user, ['workflow:read']),
|
|
300
|
+
this.projectRepository.getPersonalProjectForUser(user.id),
|
|
301
|
+
]);
|
|
302
|
+
const projectIds = personalProject
|
|
303
|
+
? [...new Set([...scopedIds, personalProject.id])]
|
|
304
|
+
: scopedIds;
|
|
305
|
+
if (projectIds.length === 0)
|
|
306
|
+
return null;
|
|
307
|
+
const credentialProjectIds = scope.credentialGranted
|
|
308
|
+
? await this.credentialReadableProjectIds(user, projectIds, personalProject?.id)
|
|
309
|
+
: [];
|
|
310
|
+
return {
|
|
311
|
+
surface: 'mcp',
|
|
312
|
+
projectIds,
|
|
313
|
+
credentialProjectIds,
|
|
314
|
+
allowedCategories: credentialProjectIds.length > 0 ? ['workflow', 'credential'] : ['workflow'],
|
|
315
|
+
runsVisible: scope.executionGranted,
|
|
316
|
+
};
|
|
317
|
+
}
|
|
318
|
+
async credentialReadableProjectIds(user, projectIds, personalProjectId) {
|
|
319
|
+
if (projectIds !== null && projectIds.length === 0)
|
|
183
320
|
return [];
|
|
184
|
-
const
|
|
185
|
-
|
|
321
|
+
const readable = await this.projectService.getProjectIdsWithScope(user, ['credential:read'], projectIds ?? undefined);
|
|
322
|
+
const readableSet = new Set(readable);
|
|
323
|
+
if (personalProjectId)
|
|
324
|
+
readableSet.add(personalProjectId);
|
|
325
|
+
if (projectIds === null)
|
|
326
|
+
return [...readableSet];
|
|
327
|
+
return projectIds.filter((projectId) => readableSet.has(projectId));
|
|
328
|
+
}
|
|
329
|
+
async hasWithheldWorkflows(user, scope) {
|
|
330
|
+
const resolved = await this.resolveScope(user, scope);
|
|
331
|
+
if (resolved === null)
|
|
332
|
+
return false;
|
|
333
|
+
const { total } = await this.workflowRepository.findRecentForProjects(resolved.projectIds, 1, {
|
|
334
|
+
mcpVisibleOnly: false,
|
|
335
|
+
});
|
|
336
|
+
return total > 0;
|
|
337
|
+
}
|
|
338
|
+
async withoutWithheldWorkflows(rows, scope) {
|
|
339
|
+
rows = rows.filter((row) => isCredentialVisible(row, scope));
|
|
340
|
+
const workflowIds = [
|
|
341
|
+
...new Set(rows.flatMap((row) => row.resourceType === 'workflow' && row.resourceId ? [row.resourceId] : [])),
|
|
342
|
+
];
|
|
343
|
+
if (workflowIds.length === 0)
|
|
344
|
+
return rows;
|
|
345
|
+
const availability = await this.workflowRepository.findMcpAvailabilityByIds(workflowIds);
|
|
346
|
+
return rows.filter((row) => {
|
|
347
|
+
if (row.resourceType !== 'workflow' || !row.resourceId)
|
|
348
|
+
return true;
|
|
349
|
+
const available = availability.get(row.resourceId);
|
|
350
|
+
if (available === undefined)
|
|
351
|
+
return row.action === 'deleted';
|
|
352
|
+
return available;
|
|
353
|
+
});
|
|
186
354
|
}
|
|
187
355
|
};
|
|
188
356
|
exports.InstanceContextService = InstanceContextService;
|
|
189
357
|
exports.InstanceContextService = InstanceContextService = __decorate([
|
|
190
358
|
(0, di_1.Service)(),
|
|
191
|
-
__metadata("design:paramtypes", [backend_common_1.Logger,
|
|
359
|
+
__metadata("design:paramtypes", [backend_common_1.Logger, db_1.ActivityEventRepository, db_1.ExecutionRepository, db_1.WorkflowRepository, db_1.ProjectRepository, project_service_ee_1.ProjectService])
|
|
192
360
|
], InstanceContextService);
|
|
193
|
-
|
|
361
|
+
function resolveCategory(requested, scope) {
|
|
362
|
+
const category = isKnownCategory(requested) ? requested : undefined;
|
|
363
|
+
if (category !== undefined && !scope.allowedCategories.includes(category))
|
|
364
|
+
return null;
|
|
365
|
+
if (scope.surface !== 'mcp')
|
|
366
|
+
return category;
|
|
367
|
+
const seesSomeCredentials = scope.credentialProjectIds === 'all-projects' || scope.credentialProjectIds.length > 0;
|
|
368
|
+
if (seesSomeCredentials)
|
|
369
|
+
return category;
|
|
370
|
+
if (category === 'credential')
|
|
371
|
+
return null;
|
|
372
|
+
return category ?? 'workflow';
|
|
373
|
+
}
|
|
374
|
+
function isCredentialVisible(row, scope) {
|
|
375
|
+
if (scope.surface !== 'mcp')
|
|
376
|
+
return true;
|
|
377
|
+
if (row.category !== 'credential' && row.resourceType !== 'credential')
|
|
378
|
+
return true;
|
|
379
|
+
if (scope.credentialProjectIds === 'all-projects')
|
|
380
|
+
return true;
|
|
381
|
+
return scope.credentialProjectIds.includes(row.projectId);
|
|
382
|
+
}
|
|
383
|
+
const toolNames = {
|
|
384
|
+
conversation: {
|
|
385
|
+
expand: '`activity(action="expand", id=N)`',
|
|
386
|
+
list: '`activity(action="list")`',
|
|
387
|
+
workflows: '`workflows(action="list")`',
|
|
388
|
+
},
|
|
389
|
+
mcp: {
|
|
390
|
+
expand: '`expand_instance_activity(id=N)`',
|
|
391
|
+
list: '`get_instance_activity`',
|
|
392
|
+
workflows: '`search_workflows`',
|
|
393
|
+
},
|
|
394
|
+
};
|
|
395
|
+
const initialPreamble = (tools) => [
|
|
194
396
|
'What is going on in this instance. This is work that already exists and that you can pick up:',
|
|
195
397
|
'when the user is vague ("fix it", "carry on", "what should I look at"), the answer is usually',
|
|
196
398
|
'the most recent thing here, and often the most recent failure. Name what you think they mean',
|
|
197
399
|
'and act on it rather than asking them to choose from a list they can already see.',
|
|
198
400
|
'Do not narrate this back to them — unless they asked what has been happening, let it change',
|
|
199
401
|
'what you do rather than what you say.',
|
|
200
|
-
|
|
201
|
-
|
|
402
|
+
`Call ${tools.expand} on a bracketed id to see that entry in full along with`,
|
|
403
|
+
`everything else that happened to the same resource, or ${tools.list} to look`,
|
|
202
404
|
'further back than this window. An entry may name a resource that no longer exists.',
|
|
203
405
|
];
|
|
204
|
-
const updatePreamble = [
|
|
406
|
+
const updatePreamble = (tools) => [
|
|
205
407
|
'What has happened since the list earlier in this conversation. Those earlier entries still',
|
|
206
408
|
'stand — these are additions, not a replacement. Read them the same way: context on what the',
|
|
207
409
|
'user has been doing, not a task list or something to comment on unprompted.',
|
|
208
|
-
|
|
410
|
+
`${tools.expand} and ${tools.list} work on these ids too.`,
|
|
209
411
|
];
|
|
210
|
-
function renderInventory(inventory) {
|
|
211
|
-
if (inventory.total === 0)
|
|
212
|
-
return
|
|
412
|
+
function renderInventory(inventory, tools, surface) {
|
|
413
|
+
if (inventory.total === 0) {
|
|
414
|
+
return surface === 'mcp'
|
|
415
|
+
? ['No workflows here are exposed to MCP, so none can be named.', '']
|
|
416
|
+
: ['Nothing has been built here yet.', ''];
|
|
417
|
+
}
|
|
213
418
|
const named = inventory.workflows.map((workflow) => ` - "${sanitiseForBlock(workflow.name)}" (workflow:${workflow.id})${workflow.active ? ' [published]' : ''}`);
|
|
214
419
|
const more = inventory.total - inventory.workflows.length;
|
|
215
420
|
return [
|
|
216
421
|
`Workflows that already exist here: ${inventory.total}. Most recently worked on:`,
|
|
217
422
|
...named,
|
|
218
|
-
...(more > 0 ? [` ... and ${more} more —
|
|
423
|
+
...(more > 0 ? [` ... and ${more} more — ${tools.workflows} for the rest.`] : []),
|
|
219
424
|
'',
|
|
220
425
|
];
|
|
221
426
|
}
|
|
@@ -241,22 +446,25 @@ function renderRuns(runs, isUpdate, now) {
|
|
|
241
446
|
return [isUpdate ? 'Runs since then:' : 'Recent runs:', ...lines, ''];
|
|
242
447
|
}
|
|
243
448
|
function renderBlock(input) {
|
|
449
|
+
const tools = toolNames[input.surface];
|
|
244
450
|
const prose = [
|
|
245
|
-
...(input.isUpdate ? updatePreamble : initialPreamble),
|
|
451
|
+
...(input.isUpdate ? updatePreamble(tools) : initialPreamble(tools)),
|
|
246
452
|
'',
|
|
247
|
-
...(input.inventory ? renderInventory(input.inventory) : []),
|
|
453
|
+
...(input.inventory ? renderInventory(input.inventory, tools, input.surface) : []),
|
|
248
454
|
...renderRuns(input.runs, input.isUpdate, input.now),
|
|
249
455
|
...(input.entries.length > 0
|
|
250
456
|
? [
|
|
251
457
|
input.isUpdate ? 'Changes since then:' : 'What changed recently:',
|
|
252
458
|
...input.entries,
|
|
253
459
|
...(input.entriesTruncated
|
|
254
|
-
? [
|
|
460
|
+
? [` ... and more than these — ${tools.list} for the rest.`]
|
|
255
461
|
: []),
|
|
256
462
|
]
|
|
257
463
|
: []),
|
|
258
464
|
].join('\n');
|
|
259
|
-
return
|
|
465
|
+
return input.surface === 'mcp'
|
|
466
|
+
? prose
|
|
467
|
+
: `${internal_messages_1.INSTANCE_CONTEXT_OPEN_TAG}\n${prose}\n${internal_messages_1.INSTANCE_CONTEXT_CLOSE_TAG}`;
|
|
260
468
|
}
|
|
261
469
|
const knownCategories = new Set(db_1.activityEventCategories);
|
|
262
470
|
function isKnownCategory(category) {
|
|
@@ -275,14 +483,20 @@ function toActivityEntry(row, currentUserId) {
|
|
|
275
483
|
...(row.data ? { detail: row.data } : {}),
|
|
276
484
|
};
|
|
277
485
|
}
|
|
278
|
-
function liveRecordHint(row) {
|
|
279
|
-
const
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
486
|
+
function liveRecordHint(row, surface) {
|
|
487
|
+
const hints = {
|
|
488
|
+
conversation: {
|
|
489
|
+
workflow: row.resourceId
|
|
490
|
+
? `workflows(action="get", workflowId="${row.resourceId}")`
|
|
491
|
+
: undefined,
|
|
492
|
+
credential: 'credentials(action="list")',
|
|
493
|
+
},
|
|
494
|
+
mcp: {
|
|
495
|
+
workflow: row.resourceId ? `get_workflow_details(workflowId="${row.resourceId}")` : undefined,
|
|
496
|
+
credential: 'list_credentials()',
|
|
497
|
+
},
|
|
284
498
|
};
|
|
285
|
-
return row.resourceType ?
|
|
499
|
+
return row.resourceType ? hints[surface][row.resourceType] : undefined;
|
|
286
500
|
}
|
|
287
501
|
function toFeedEntry(row, currentUserId, now) {
|
|
288
502
|
return [
|