Commit Graph

48 Commits

Author SHA1 Message Date
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
Arvin Ansari
840805a730
feat(core): Record recent instance activity for agent context (no-changelog)
Adds an append-only `activity_event` table fed from the event bus, so the
instance agent can be handed what the user has been doing instead of spending
a turn discovering it. Entries are pointers — category, verb, and the ids
needed to fetch the full record — not copies of the resource.

Two decisions worth flagging:

`resourceId` carries no foreign key, unlike every other reference in the
schema. An entry has to outlive what it describes; a workflow deletion is the
entry most worth keeping, and a cascade would erase it exactly when it became
interesting. `workflow_review_activity.workflowId` made and undid this same
mistake. Neither vocabulary column gets a CHECK, for the reason that table
dropped its own: a feed covers more kinds with every feature, and each
widening is another SQLite table recreation.

The relay registers in `BaseCommand` rather than the instance-ai module.
`workflow-post-execute` is emitted wherever the execution ran, which in
scaling mode is the worker, and that module loads on main only — registering
there would silently lose every execution entry under scaling.

Off by default behind `N8N_INSTANCE_AI_ACTIVITY_LOG_ENABLED`; the flag is
read once at init, so a disabled instance carries no listeners. Pruning runs
on the leader main only, by age with an entry-count backstop.

Postgres schema docs are not regenerated — that leg needs Docker, which is
unavailable here. The sqlite docs are current.
2026-08-26 13:13:21 +02:00
Kai
ee7584255f
feat(core): Loosen the workflow review activity schema for cause events (no-changelog) (#36376)
Co-authored-by: Jan K. <jan.kalkan@n8n.io>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-19 08:47:02 +00:00
Irénée
d42484b7f6
feat(core): Add project Git connection table (no-changelog) (#36549)
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-08-19 07:21:32 +00:00
Benjamin Schroth
3d70ae7fc4
fix(core): Run agent scheduled tasks in the timezone they were authored in (#36226) 2026-08-18 14:21:46 +00:00
Irénée
9c947996da
feat(core): Add Git connection database table (no-changelog) (#36268)
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-08-18 13:54:47 +00:00
Robin Braumann
d551999c6c
fix(core): Surface failures in agent sessions (#36492)
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-18 13:07:10 +00:00
Anne Aguirre
87e8b9c58f
fix(ai-builder): Fix for autosave and publish events issues (#36241)
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-18 09:17:27 +00:00
Emilia
026cee3507
feat(core): Coalesce a Schedule Trigger node's catch-up runs after downtime (#35524)
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Co-authored-by: Lorent Lempereur <lorent.lempereur@n8n.io>
2026-08-14 13:04:09 +00:00
Mike Repeć
1a12af601b
fix(core): Report the real activation mode for triggers activated via the publication outbox (#36123)
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-08-12 13:17:53 +00:00
Emilia
93ff542e92
feat(core): Add poller_state table for durable poll trigger cursors (no-changelog) (#35128)
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Co-authored-by: Lorent Lempereur <lorent.lempereur@n8n.io>
2026-08-11 16:31:00 +00:00
Jan Kalkan
41d54e77f1
feat(core): Add workflow review activity log tables and migration (no-changelog) (#35517)
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-authored-by: Sandra Zollner <sandra.zollner@n8n.io>
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-11 12:25:46 +00:00
Robin Braumann
4e6fc65f55
feat(core): Add Discord as an agent chat channel (#35331)
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-06 06:09:43 +00:00
Michael Drury
a74c6fd11f
fix(core): Show Agent references in credential usage (#35409) 2026-08-05 15:54:00 +00:00
Robin Braumann
1546c95485
feat(core): Persist agent session timelines during execution (#35490)
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-05 08:12:58 +00:00
Robin Braumann
89c9be6266
feat(core): Emit once-per-agent setup completion telemetry (#35359)
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-03 11:00:37 +00:00
Eugene
0932806c05
feat: Support inbound binary attachments for agents (no-changelog) (#34869)
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-30 14:20:06 +00:00
Emilia
8672d9567c
feat(core): Add a misfire policy to the durable scheduler (#35075)
Some checks are pending
CI: Master (Build, Test, Lint) / Build for Github Cache (push) Waiting to run
CI: Master (Build, Test, Lint) / Unit tests (22.22.3) (push) Waiting to run
CI: Master (Build, Test, Lint) / Unit tests (24.18.0) (push) Waiting to run
CI: Master (Build, Test, Lint) / Lint (push) Waiting to run
CI: Master (Build, Test, Lint) / Performance (push) Waiting to run
CI: Master (Build, Test, Lint) / Notify Slack on failure (push) Blocked by required conditions
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-07-30 10:10:31 +00:00
Robin Braumann
4a05044bf5
refactor(core): Replace agent knowledge base binary data storage with blob storage (no-changelog) (#34985)
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-28 13:36:27 +00:00
Andreas Fitzek
4f0a218e2d
feat(core): Add on-demand OAuth clients and protected resources for form triggers (no-changelog) (#34903) 2026-07-28 12:46:57 +00:00
RomanDavydchuk
48c0e70f14
fix(core): Support fractional community node versions with PostgreSQL (#34717) 2026-07-27 15:36:08 +00:00
Svetoslav Dekov
fdd4e33f9c
feat(core): Add availableInMCP column to agents (#34665)
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-24 14:09:04 +00:00
Arvin A
e5bb60f663
feat(core): Add agent-scoped eval data model and migration (no-changelog) (#34657) 2026-07-24 12:37:53 +00:00
Albert Alises
13becf336c
feat(core): Add instance credential database schema (#34709)
Co-authored-by: Danny Martini <danny@n8n.io>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-24 09:37:33 +00:00
Robin Braumann
0b4bbd05b8
feat(core): Add storedAt column to agent_execution (#34858)
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-24 08:57:18 +00:00
Sandra Zollner
156ac00120
feat(core): Add workflow review request entities and migration scripts (#34062)
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: James Gee <1285296+geemanjs@users.noreply.github.com>
Co-authored-by: kgrhartlage <kai.hartlage@n8n.io>
2026-07-21 12:57:39 +00:00
Raúl Gómez Morales
865142f5da
feat(core): Sweep interrupted Instance AI runs to a terminal state (no-changelog) (#34183)
Co-authored-by: Danny Martini <danny@n8n.io>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-16 10:37:28 +00:00
Lorent Lempereur
e22680b99f
fix(core): Close the durable scheduler's record-then-dispatch effect boundary (#34014)
Co-authored-by: Emilia <100027345+sovietspaceship@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-16 09:47:10 +00:00
mfsiega
c761c4da9b
feat(core): Add trigger reconciliation to recover missed activations (no-changelog) (#33577)
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: Danny Martini <danny@n8n.io>
2026-07-14 14:40:33 +00:00
Ricardo Espinoza
c3ca9a36da
feat(editor): Add scope selection to MCP OAuth consent screen (#33710)
Co-authored-by: Danny Martini <danny@n8n.io>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-14 13:21:14 +00:00
Raúl Gómez Morales
05b412cd28
feat(core): Add the Instance AI durable event-log store and writer (no-changelog) (#33910)
Co-authored-by: Danny Martini <danny@n8n.io>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-14 11:12:31 +00:00
Lorent Lempereur
fa7e97130b
feat(core): Add recurring_cron schedule kind to the durable scheduler (no-changelog) (#33858) 2026-07-10 12:48:20 +00:00
Iván Ovejero
6509d774aa
perf(core): Reduce DB reads for global credentials check (#33918) 2026-07-09 13:31:51 +00:00
Iván Ovejero
378710072f
perf(core): Aggregate workflow statistics to avoid hot-row contention (#33045) 2026-07-06 11:11:18 +00:00
Lorent Lempereur
f008844d75
feat(core): Add durable scheduler database schema (no-changelog) (#33315)
Co-authored-by: Emilia <100027345+sovietspaceship@users.noreply.github.com>
2026-07-01 13:12:59 +00:00
Savelii
4290e8461a
feat(editor): Show private credential icon on execution list runs (#32957)
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-30 14:06:54 +00:00
mfsiega
4979df1970
feat(core): Persist per-trigger workflow publication status (no-changelog) (#33191)
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-30 09:02:00 +00:00
yehorkardash
bc3fe3eaa6
refactor(core): Drop redundant agent execution columns (#32862) 2026-06-30 07:36:26 +00:00
bjorger
4231ae8124
refactor(core): Remove top-level agent description (no-changelog) (#32922)
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-24 14:41:43 +00:00
Jaakko Husso
0c8955e793
feat(core): Persist IAI 'always allow' execute permissions on DB (no-changelog) (#32599) 2026-06-23 06:58:15 +00:00
bjorger
3ae74f10b0
feat(core): Add knowledge file storage for agents (#31956)
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-22 11:49:50 +00:00
Iván Ovejero
1d6415cd59
feat(core): Add Azure storage mode for execution data (#32368) 2026-06-18 11:33:04 +00:00
Mike Repeć
10856a4f4d
feat(core): Track binary data size on execution entity rows (no-changelog) (#32387)
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-17 15:14:27 +00:00
Tomi Turtiainen
711f8abc57
chore(core): Make DB schema docs generation deterministic (#32373) 2026-06-16 11:35:33 +00:00
Savelii
3b53949792
perf(core): Add partial index on execution_entity to fix executions list CPU spike (#32116)
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-15 13:02:24 +00:00
Michael Drury
86b7234f81
fix(core): Persist agent subscription lists for threads to DB for multi-main configurations (no-changelog) (#31614)
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-12 11:16:20 +00:00
Mike Repeć
612cb772c2
feat(core): Add sizeBytes and workflowVersionId to executions (no-changelog) (#32067)
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: Iván Ovejero <ivov.src@gmail.com>
2026-06-12 09:44:19 +00:00
Tomi Turtiainen
f5ced2faf9
feat(core): Add auto-generated database schema documentation (no-changelog) (#32069) 2026-06-12 07:44:01 +00:00