Commit Graph

126 Commits

Author SHA1 Message Date
Robin Braumann
0afd257a02
Merge origin/master into agent-882-feature-message-queueing 2026-09-15 11:40:46 +02:00
Eugene
7efefc7347
feat(editor): Show background tasks in the agent preview (#38360) 2026-09-15 07:35:56 +00:00
Robin Braumann
38595748aa
fix: harden queued agent turn handling
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-14 17:38:05 +02:00
Robin Braumann
3163f426ae
refactor: simplify agent thread claims
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-14 16:20:51 +02:00
Robin Braumann
d50d02555b
feat(core): Queue all agent turns durably
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-14 15:52:10 +02:00
Robin Braumann
fb65257ca5
refactor(core): Simplify turn lease loss and claim finalization
Abort the thread lease signal with a reason in the coordinator, so the
orchestrator no longer names lease loss itself. Merge the three
finalization methods of the execution repository into one with an
optional stale guard. Remove the wake service suspension pre-check; the
orchestrator keeps the post-admission check. Drop the unused conflict
error field and the one-field waiter interface.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-12 12:07:30 +02:00
Robin Braumann
0f3a5b388d
fix(core): re-check thread state after queue admission and release held resources on failure
Address review findings on the per-thread turn queue:

- Stop a queued turn when its thread lease is lost while it waits for a running row or a claim conflict.
- Re-validate the HITL checkpoint and the wake suspension check after admission; a stale click or wake no longer claims the thread.
- Consume the HITL callback key only inside the admitted resume so a full queue keeps the card usable.
- Cancel a queued /new reset when the session lock is lost.
- Finalize an abandoned execution only while its liveness timestamp stays stale.
- Release the runtime lease when chat message context preparation fails.
2026-09-12 11:38:37 +02:00
Robin Braumann
bdcc8da6bf
feat(core): Queue concurrent agent messages per thread
One turn per durable agent thread at a time, on every surface: preview chat,
published chat integrations, background wake, task runs, HITL resume.

- AgentThreadTurnCoordinator: bounded FIFO per thread and main (50 waiters),
  distributed agent-thread-turn lease, abort-aware waiting, queue-full error.
- agent_execution.activeThreadId claim with a unique partial index as the
  fail-closed fence; heartbeat drops the claim when the row is no longer ours.
- Chat SDK runs with concurrency 'concurrent'; the coordinator orders turns.
- Preview chat surfaces the queue-full error; channel threads post a notice.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-12 10:31:18 +02:00
Andreas Fitzek
840aef623e
fix(core): Redact execution data on partial private-credential runs (#38364) 2026-09-11 11:24:54 +00:00
Robin Braumann
5de6a4071a
feat(core): Add agent-directed episodic memory capture (#38134)
Co-authored-by: Michael Drury <michael.drury@n8n.io>
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-11 05:03:28 +00:00
Svetoslav Dekov
1cfd0959e3
feat(core): Add the shared AI preference repository and resolver service (no-changelog) (#38174)
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
Co-authored-by: Roman Makowiak <roman.makowiak@n8n.io>
2026-09-10 09:59:30 +00:00
Eugene
99e9730a01
feat(core): Notify parent agents when background jobs settle (#37617)
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-09 14:15:38 +00:00
Eugene
588543cba8
feat(core): Store parent identity on background jobs (#37752)
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-08 12:47:30 +00:00
Emilia
3521e54b81
fix(core): Count executions that crash recovery marks as crashed (#37733)
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-09-08 11:29:15 +00:00
Eugene
9418c23b81
feat(core): Declare agents as a scheduled job owner (no-changelog) (#37848)
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
Co-authored-by: Emilia <100027345+sovietspaceship@users.noreply.github.com>
2026-09-07 15:28:55 +00:00
Emilia
afc4a54798
fix(core): Wait for detached sub-workflows before the worker stops its task runner (#37737)
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-09-04 15:41:31 +00:00
Arvin A
47c9644392
feat(core): Let Instance AI read node-type usage from the dependency index (#37539) 2026-09-03 11:23:21 +00:00
Lorent Lempereur
7675c614bf
refactor(core): Own scheduled jobs by owner data rather than by workflow node (no-changelog) (#37134) 2026-09-02 20:10:43 +00:00
mfsiega
cae0c8be00
fix(core): Stop webhook routing locally before best-effort external teardown (#37241)
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-08-31 11:55:28 +00:00
Danny Martini
946fb02849
feat(core): Give poll triggers an engine-derived time budget (no-changelog) (#37119)
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-08-27 13:30:58 +00:00
Nour Alhadi Mahmoud
98e51043a8
perf(core): Chunk package ID lookups (#36923)
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-26 10:29:30 +00:00
Benjamin Schroth
6b0de0d60f
fix(core): Report and reconcile agent channel startup failures (#36578)
Co-authored-by: Danny Martini <danny@n8n.io>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-08-25 14:35:15 +00:00
Danny Martini
be014224d3
perf(core): Read the poller state row once per durable poll tick (#36973)
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-08-25 09:09:17 +00:00
Emilia
df8bfd9e56
feat(core): Back off a failing poll trigger instead of re-polling every tick (no-changelog) (#35707)
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Co-authored-by: Lorent Lempereur <lorent.lempereur@n8n.io>
2026-08-21 23:17:17 +00:00
Robin Braumann
ead8ae16c4
feat(core): Add filters to agent sessions (#36493)
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-19 13:58:12 +00:00
Kai
ec4ad66ed6
feat(editor): Show review status as a badge on the workflows list (#36476) 2026-08-18 16:26:52 +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
Ali Elkhateeb
7060434f1f
refactor(API): Route public API credentials through the shared credentials service (#36048) 2026-08-17 13:14:21 +00:00
Danny Martini
b6b010e0d3
test(core): Cover deleteWorkflowCursors in the poller-state repository suite (no-changelog) (#36438)
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-08-17 13:03:28 +00:00
Benjamin Schroth
79c1393cfb
fix(core): Make published agent channel add, replace, and remove failure-safe (#36100) 2026-08-14 13:09:15 +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
a9787fcd6f
feat(core): Commit a poll trigger's cursor and its execution in one transaction (no-changelog) (#35295)
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Co-authored-by: Lorent Lempereur <lorent.lempereur@n8n.io>
2026-08-11 17:59:29 +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
Iván Ovejero
4afbd16dc7
ci: Run DB tests against the full supported Postgres range (#35960) 2026-08-11 09:49:07 +00:00
Kai
a044c0d1d8
feat(core): Auto-close workflow review requests when a workflow is archived or moved (#35772) 2026-08-07 12:53:25 +00:00
Danny Martini
1801f65d85
feat(core): Converge leader takeover through the reconciliation loop (#35454)
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-08-04 06:24:49 +00:00
Kai
f52e2b831d
feat(editor): Show the latest workflow review state in the canvas header (#35233)
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-07-31 08:47:32 +00:00
Tomi Turtiainen
b964ed6f4b
refactor(core): Move sleep into @n8n/utils and unify sleep/sleepWithAbort (#35057) 2026-07-28 18:47:18 +00:00
Anne Aguirre
f62cc6319a
feat(ai-builder): Agent session records direct to session chat, not trace (#34997) 2026-07-27 14:46:14 +00:00
Albert Alises
7d8426f055
feat: Add admin-managed instance credentials (#34364) 2026-07-25 14:22:22 +00:00
Lorent Lempereur
4212fc2202
fix(core): Avoid loading execution data during credentials security audit (#34876) 2026-07-24 13:54:37 +00:00
Mike Repeć
4d861d16a6
fix(core): Prevent concurrent instance startups from racing database migrations (#34685)
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-23 10:54:41 +00:00
Danny Martini
056c1a6af3
fix(core): Self-heal orphaned trigger status rows on unpublish (no-changelog) (#34443)
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-20 15:17:11 +00:00
mfsiega
4818e79b5a
perf(core): Skip webhook-only workflows when enqueuing publications on leader handoff (no-changelog) (#34076)
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: Danny Martini <danny@n8n.io>
2026-07-15 14:02:22 +00:00
Matsu
cec46445ee
chore: Migrate packages/cli to Typescript 7 (#34159) 2026-07-15 11:49:51 +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
Matsu
8bb6489918
chore: Remove remaining Jest references (no-changelog) (#33412)
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
2026-07-09 09:29:24 +03:00
Danny Martini
bde5f081fc
fix(core): Exclude published versions from workflow history prune (#32239)
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-08 14:35:17 +00:00
Tomi Turtiainen
8ff4759957
feat(core): Add workflow publication Prometheus metrics (no-changelog) (#33299) 2026-07-02 11:08:52 +00:00