n8n/packages/cli/test/migration
Arvin Ansari 605247262a
feat(core): Let the agent read past the activity window (no-changelog)
Adds the `activity` tool. `list` reads further back than the window the agent
is handed, or filtered to one kind of event or one resource; `expand` opens a
single entry and returns everything else the log knows about the same
resource. That is the read the deferred `(resourceType, resourceId, id)` index
now exists for, added in its own migration rather than up front.

Expanding never fetches the live resource. `workflows`, `executions` and
`credentials` already do that, with their own permission checks — so an
expansion names the call to make instead, and the entry carries the id to make
it with. A missing id comes back as `notFound` rather than an error: entries
are pruned, so a stale id the agent read from an earlier block is an ordinary
outcome, not a failure.

Closes a scoping hole this feature opened. The window read had no project
filter, so a conversation not bound to a project would have been shown
activity from every project on the instance, including ones the user cannot
open. Reads are now bounded by the conversation's project, or by the user's
accessible projects when there is none, and an entry with no project is
excluded outright — there is no way to prove it is in scope. An expand outside
that scope is indistinguishable from a pruned id.

Keeping deletions visible under that rule needed the writer to change too. A
`workflow-deleted` event fires after the sharing rows that would name its
project are gone, so the project is recalled from the log's own earlier
entries for the same resource; credential updates and deletes do the same.
Without it the entries most worth surfacing would have been silently dropped
by the new filter.

The tool is always loaded when the log is enabled, and absent entirely when it
is not. The activity block names it, so deferring it would price every expand
at search_tools plus load_tool.
2026-08-26 13:52:51 +02:00
..
1760020838000-unique-role-names.test.ts chore(core): Run migration tests on PRs (#25181) 2026-02-04 13:29:54 +00:00
1763048000000-activate-execute-workflow-trigger-workflows.test.ts chore(core): Run migration tests on PRs (#25181) 2026-02-04 13:29:54 +00:00
1766064542000-add-workflow-publish-scope-to-project-roles.test.ts chore(core): Run migration tests on PRs (#25181) 2026-02-04 13:29:54 +00:00
1767018516000-change-workflow-statistics-fk-to-no-action.test.ts chore(core): Run migration tests on PRs (#25181) 2026-02-04 13:29:54 +00:00
1769784356000-expand-subject-id-column-length.test.ts fix(core): Wrong pagination argument order for sqlite in copyTables helper (#25301) 2026-02-04 13:11:29 +00:00
1769900001000-add-workflow-unpublish-scope-to-custom-roles.test.ts feat: Add new scope for workflow:unpublish, assignable to personal projects and regular project roles (#25228) 2026-02-06 15:04:40 +00:00
1770000000000-create-chat-hub-tools-table.test.ts feat(core): Support most tools on Chat hub (#25571) 2026-02-16 10:37:24 +00:00
1770220686000-create-workflow-builder-session-table.test.ts feat(editor): Replace restore/changes UI with inline version cards (#27522) 2026-03-27 13:31:48 +00:00
1771417407753-add-scaling-fields-to-test-run.test.ts fix(core): Implement evaluation run cancellation for multi-main (#25353) 2026-02-18 15:42:53 +00:00
1771500000000-migrate-external-secrets-to-entity-storage.test.ts feat: Migrate external secrets settings to entity-based storage (no-changelog) (#26001) 2026-02-20 13:10:27 +00:00
1771500000001-add-unshare-scope-to-custom-roles.test.ts feat(core): Split share and unshare into separate scopes (#26011) 2026-02-23 17:06:23 +00:00
1772619247761-add-role-column-to-project-secrets-provider-access.test.ts chore: Add role column to project_secrets_provider_access (#26523) 2026-03-06 08:21:43 +00:00
1773000000000-create-credential-dependency-table.test.ts test: Migrate cli package from Jest to Vitest (#31804) 2026-06-29 21:19:56 +03:00
1774280963551-add-restore-fields-to-workflow-builder-session.test.ts feat(editor): Replace restore/changes UI with inline version cards (#27522) 2026-03-27 13:31:48 +00:00
1784000000011-create-agent-history-table.test.ts test: Migrate cli package from Jest to Vitest (#31804) 2026-06-29 21:19:56 +03:00
1784000000013-split-redaction-scope-in-custom-roles.test.ts feat(core): Split workflow:updateRedactionSetting into enable and disable scopes (#30446) 2026-05-26 12:19:35 +01:00
1784000000019-add-custom-telemetry-tags-to-project.test.ts feat(core): Add project-level custom telemetry tags to OTel spans (#30985) 2026-06-01 09:48:18 +00:00
1784000000024-add-resource-to-oauth-authorization-codes.test.ts test: Migrate cli package from Jest to Vitest (#31804) 2026-06-29 21:19:56 +03:00
1784000000025-migrate-redaction-enforcement-to-floor.test.ts refactor(core): Store redaction enforcement as a floor enum natively (#31629) 2026-06-03 12:29:42 +00:00
1784000000026-add-scope-column-to-oauth-tables.test.ts feat(core): Add scope column to MCP OAuth tables (no-changelog) (#31494) 2026-06-05 09:27:38 +00:00
1784000000028-add-project-id-to-instance-ai-thread.test.ts test: Migrate cli package from Jest to Vitest (#31804) 2026-06-29 21:19:56 +03:00
1784000000029-add-json-size-bytes-and-workflow-version-id-to-execution-entity.test.ts feat(core): Add sizeBytes and workflowVersionId to executions (no-changelog) (#32067) 2026-06-12 09:44:19 +00:00
1784000000033-add-binary-data-size-bytes-to-execution-entity.test.ts feat(core): Track binary data size on execution entity rows (no-changelog) (#32387) 2026-06-17 15:14:27 +00:00
1784000000038-set-chat-hub-enabled-from-usage.test.ts feat(core): Turn Chat Hub off by default for instances not using it (#33136) 2026-06-29 09:27:30 +00:00
1784000000042-create-scheduler-tables.test.ts feat(core): Add durable scheduler database schema (no-changelog) (#33315) 2026-07-01 13:12:59 +00:00
1784000000043-create-workflow-statistics-delta-table.test.ts perf(core): Aggregate workflow statistics to avoid hot-row contention (#33045) 2026-07-06 11:11:18 +00:00
1784000000045-add-recurring-cron-schedule-kind.test.ts feat(core): Add recurring_cron schedule kind to the durable scheduler (no-changelog) (#33858) 2026-07-10 12:48:20 +00:00
1784000000047-backfill-pre-scoping-oauth-grant-scopes.test.ts feat(editor): Add scope selection to MCP OAuth consent screen (#33710) 2026-07-14 13:21:14 +00:00
1784000000052-create-workflow-review-request-tables.test.ts feat(core): Add workflow review request entities and migration scripts (#34062) 2026-07-21 12:57:39 +00:00
1784815940112-create-agent-eval-tables.test.ts feat(core): Add agent-scoped eval data model and migration (no-changelog) (#34657) 2026-07-24 12:37:53 +00:00
1784897791636-add-available-in-mcp-to-agents.test.ts feat(core): Add availableInMCP column to agents (#34665) 2026-07-24 14:09:04 +00:00
1785162364000-change-installed-node-version-type.test.ts fix(core): Support fractional community node versions with PostgreSQL (#34717) 2026-07-27 15:36:08 +00:00
1785162364001-add-is-first-party-to-oauth-clients.test.ts feat(core): Add on-demand OAuth clients and protected resources for form triggers (no-changelog) (#34903) 2026-07-28 12:46:57 +00:00
1785186578138-add-agent-file-storage-columns.test.ts refactor(core): Replace agent knowledge base binary data storage with blob storage (no-changelog) (#34985) 2026-07-28 13:36:27 +00:00
1785247194306-crash-stale-enqueued-executions.test.ts fix(core): Recover enqueued executions after a restart (#35059) 2026-07-29 09:55:40 +00:00
1785247194307-add-misfire-policy-to-scheduler.test.ts feat(core): Add a misfire policy to the durable scheduler (#35075) 2026-07-30 10:10:31 +00:00
1785255306000-create-agent-chat-attachments-table.test.ts feat: Support inbound binary attachments for agents (no-changelog) (#34869) 2026-07-30 14:20:06 +00:00
1785500832626-add-setup-completed-at-to-agents.test.ts feat(core): Emit once-per-agent setup completion telemetry (#35359) 2026-08-03 11:00:37 +00:00
1785828155091-add-agent-execution-runtime-state.test.ts feat(core): Persist agent session timelines during execution (#35490) 2026-08-05 08:12:58 +00:00
1785840970000-allow-discord-agent-chat-subscriptions.test.ts feat(core): Add Discord as an agent chat channel (#35331) 2026-08-06 06:09:43 +00:00
1785843640527-create-workflow-review-activity-tables-and-baseline.test.ts feat(core): Add workflow review activity log tables and migration (no-changelog) (#35517) 2026-08-11 12:25:46 +00:00
1786519946974-add-reason-to-workflow-publication-outbox.test.ts fix(core): Report the real activation mode for triggers activated via the publication outbox (#36123) 2026-08-12 13:17:53 +00:00
1786666615643-add-coalesce-owner-misfire-policy.test.ts feat(core): Coalesce a Schedule Trigger node's catch-up runs after downtime (#35524) 2026-08-14 13:04:09 +00:00
1787056876306-create-git-connection-table.test.ts feat(core): Add Git connection database table (no-changelog) (#36268) 2026-08-18 13:54:47 +00:00
1787057050000-add-timezone-to-agent-tasks.test.ts fix(core): Run agent scheduled tasks in the timezone they were authored in (#36226) 2026-08-18 14:21:46 +00:00
1787089039726-create-git-connection-project-table.test.ts feat(core): Add project Git connection table (no-changelog) (#36549) 2026-08-19 07:21:32 +00:00
1787089039727-drop-workflow-review-activity-type-check-and-workflow-id-column.test.ts feat(core): Loosen the workflow review activity schema for cause events (no-changelog) (#36376) 2026-08-19 08:47:02 +00:00
1787140858009-add-project-manage-members-scope-to-api-keys.test.ts fix(core): Add project:manageUsers scope to gate project membership changes (#36243) 2026-08-19 18:43:35 +00:00
1787140858009-add-project-manage-members-scope-to-custom-roles.test.ts fix(core): Add project:manageUsers scope to gate project membership changes (#36243) 2026-08-19 18:43:35 +00:00
1787741452169-create-activity-event-table.test.ts feat(core): Record recent instance activity for agent context (no-changelog) 2026-08-26 13:13:21 +02:00
1787744205058-add-activity-event-resource-index.test.ts feat(core): Let the agent read past the activity window (no-changelog) 2026-08-26 13:52:51 +02:00
migration-test-helpers.test.ts fix(core): Add ESLint rule to prevent error instances in toThrow assertions (#29889) 2026-05-08 05:51:05 +00:00