Commit Graph

6869 Commits

Author SHA1 Message Date
Arvin Ansari
fcba43ed45 feat(core): Give the MCP tools the same folder and node-type reads (no-changelog)
The MCP server builds its own tools against WorkflowService and never touched the
Instance AI adapter, so it carried the same gap: `search_folders` could resolve a
folder name to an id, and then nothing would accept that id.

- `search_workflows` gains `folderId`, `recursive` and `nodeTypes`, and every row
  now carries `folder {id, name, path}` in the same `path` shape `search_folders`
  returns, so the two are directly comparable.
- A `folderId` the caller cannot read aborts the search with an explanation
  rather than returning the unscoped set, which is indistinguishable from the
  folder being empty and would be presented as its contents.
- Subtree expansion goes through `findFolderSubtreesForUser`, so the access check
  covers the descendants in the same query that finds them.
- `get_workflow_details` reports `folder {id, name}` alongside the existing bare
  `parentFolderId`, which required a second lookup to be worth anything.

Folder reads are wired only when folders are licensed, matching how the folder
tools are already registered.
2026-08-27 19:06:06 +02:00
Arvin Ansari
70b3f2fcaf feat(core): Let the agent read which nodes the workflows in scope use (no-changelog)
The dependency index already records a row per node type per workflow, kept
current on every save, and the workflow repository already resolves a
`nodeTypes` filter against it. No caller ever supplied one, so "which workflows
use Postgres" meant fetching every workflow and parsing its nodes, and "what is
this folder built out of" was not answerable at all.

- `workflows(list)` gains `nodeTypes`. It matches the node a workflow actually
  contains, so a workflow merely NAMED for a service is correctly excluded and
  one that uses it under an unrelated name is correctly found.
- `workflows(node-usage)` returns the node-type histogram for a scope, most-used
  first, and composes with the folder arguments. Offered only where the adapter
  can answer it, so the agent is never shown a summary it would get an error from.
- Counts DISTINCT workflows rather than node instances: three HTTP Request nodes
  in one workflow are one user of the type, which is the question being asked.
- The scan is capped, and a capped scan says its counts are a lower bound —
  silently truncating would read as a total, and these are numbers a caller
  quotes back to the user.
- Gated separately from folder context. The two answer different questions
  (where something lives vs what it is made of), and one switch could not tell
  which of them moved a result.

Shared field descriptions are hoisted to constants because the schema sanitizer
requires a single description per field name across the action union.
2026-08-27 19:06:06 +02:00
Arvin Ansari
2b85c805f6 test(core): Expose the folder gate to the adapter module mocks (no-changelog)
Both adapter suites replace `@n8n/instance-ai` wholesale, so a new export the
adapter reads has to be added by hand or every listing test throws
`No "isFolderContextEnabled" export is defined on the mock`. Imported from the
real module rather than stubbed, so the tests exercise the shipped default.
2026-08-27 19:06:06 +02:00
Arvin Ansari
d4d063d5f0 test(core): Cover folder membership as a context surface (no-changelog)
A case could not previously state that a workflow lives in a folder, so the
nearest expressible thing was "workflows whose names share a prefix" — which is
the wrong signal the agent was already reading, and would have graded green on a
name guess.

- `seed.workflows[].folder` takes a slash path and creates it on restore.
  Creation is IDEMPOTENT: unlike workflow names, folder names are not uniquified
  per run (a case's prose names the folder the way a user would), so without
  reuse five iterations leave five identically named folders and the folder under
  test resolves as ambiguous. Folders are not rolled back with the workflows —
  they are empty containers, and deleting one another restore just filled is the
  more destructive of the two options.
- Four cases under a `folders` tier, each taken from a real thread: a search
  workflow reported as missing while it sat in the named folder; a folder
  inventory; a folder disambiguating two similarly named workflows; and the scope
  of a bulk folder edit.

Each case is built so the wrong heuristic fails rather than accidentally
succeeds — in-folder names share no token with the folder, and a same-named
non-member sits outside it. The disambiguation case grades on a node name unique
to the in-folder workflow (and asserts absence of one unique to the decoy): node
names only reach context once a workflow is opened, which separates opening the
right one from listing both.
2026-08-27 19:06:05 +02:00
Arvin Ansari
9ee443c1cc feat(core): Let the agent read and address workflow folders (no-changelog)
A listing could not say which folder a workflow was in, and `list` had no way
to ask for one. The only move available for "the workflows in my X folder" was
a substring guess on workflow NAMES — which both misses members named
differently and sweeps in non-members that share the name.

- `WorkflowSummary.folder` carries `{id, name, path}`. The repository's default
  select already joined `parentFolder`; the adapter was discarding it. Paths are
  batch-resolved per page through the existing recursive-CTE repository method,
  so attribution costs one query for a whole page and nothing when a page has no
  foldered workflows.
- `list` accepts `folderPath` / `folderId` / `recursive`. Resolution is staged
  and strict — exact path, then exact folder name, then the last segment (a user
  writing "personal/raglog" is naming the project, which is not part of a folder
  path), then a segment-boundary suffix. It never partially matches.
- An unresolved folder is reported, never silently widened: the result carries
  `folderResolution` and a note saying the rows are NOT that folder, listing the
  folders that do exist, and refusing the name-filter fallback by name.
- Subtrees are expanded here rather than by the repository. Only the
  workflows-and-folders query expands `parentFolderId`; this listing uses the
  plain path, where it is an exact match. Expansion walks parent links rather
  than path prefixes, because a folder name may itself contain a slash.
- `N8N_INSTANCE_AI_FOLDER_CONTEXT_ENABLED=false` removes the fields from the
  advertised schema and suppresses attribution, so both arms of a measurement
  run come off one binary.

The integration test runs the real queries against a real database: the folder
scan's column selection has to satisfy the ORDER BY that pagination generates,
and a mocked repository cannot see that constraint.
2026-08-27 14:00:20 +02:00
Irénée
ce4d58ea13
feat(API): Add Git connections public API (no-changelog) (#36272)
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-08-20 07:28:36 +00:00
Dimitri Lavrenük
86c53a28c9
feat(core): Add generic feature flag overrides via environment variable (#36643)
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-20 06:14:39 +00:00
Veljko Terzic
e95d40732d
fix(core): Serialize community package installs and make downloads non-destructive (#36505) 2026-08-20 06:11:13 +00:00
Yuliia Pominchuk
8c6d469c19
fix(core): Add project:manageUsers scope to gate project membership changes (#36243)
Some checks are pending
Build: Benchmark Image / build (push) Waiting to run
CI: Master (Build, Test, Lint) / Build for Github Cache (push) Waiting to run
CI: Master (Build, Test, Lint) / Unit tests (24.18.1) (push) Waiting to run
CI: Master (Build, Test, Lint) / Unit tests (26.5.1) (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) / Verify single-instance deps (npm-install) (push) Waiting to run
CI: Master (Build, Test, Lint) / Notify Slack on failure (push) Blocked by required conditions
Util: Publish API Schema / Cloudflare Pages (push) Waiting to run
2026-08-19 18:43:35 +00:00
Riqwan Thamir
9376c576e2
fix(core): Validate chat models and recover from execution failures (#36550)
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-19 16:46:31 +00:00
Michael Drury
e436cb71a9
feat: Add Slack Agent view support (#36352) 2026-08-19 16:03:01 +00:00
Miguel Ángel Moreno
7a69e3fe5c
fix(core): Support array indices in setNodeParameter JSON Pointer paths (#36520)
Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-19 15:59:21 +00:00
Mike Repeć
f8084475bb
fix(core): Only init the expression engine for commands that evaluate expressions (#36538)
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Co-authored-by: Danny Martini <danny@n8n.io>
2026-08-19 15:36:45 +00:00
Anne Aguirre
246e6d99bc
feat(ai-builder): Show why unsupported workflows cannot be run within agents in tool selection modal (#36519) 2026-08-19 15:09:01 +00:00
Guillaume Jacquart
0d0ed73983
feat(core): Add policy infrastructure module scaffold (no-changelog) (#36613)
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-19 14:43:12 +00:00
Mike Repeć
05de34323c
fix(core): Release test-webhook isolate only after teardown completes (#36573)
Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
Co-authored-by: Danny Martini <danny@n8n.io>
2026-08-19 14:16:25 +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
Irénée
17567043bd
feat(core): Add Git connections module and service (no-changelog) (#36270)
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-08-19 13:46:51 +00:00
Toby Wilds
7469231277
feat(Typeform Node): Allow custom OAuth2 scopes (#36486) 2026-08-19 13:07:10 +00:00
Jaakko Husso
befb9477b5
fix(core): Keep Instance AI confirmation fields intact on resume (#36468)
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-19 13:06:28 +00:00
Lorent Lempereur
222eec5ccf
fix(core): Avoid restarting task runners that are only slow (#36530) 2026-08-19 12:29:16 +00:00
oleg
be44726ff4
fix(core): Harden Daytona sandbox acquisition against transient failures and stuck sandboxes (#36528) 2026-08-19 12:03:08 +00:00
Danny Martini
2d90e1ee30
feat(core): Add system-authored workflow version publishing (no-changelog) (#36511)
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-08-19 11:16:16 +00: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
Elias Meire
25d0be0ec1
fix(MCP Server Trigger Node): Emit tool schemas as JSON Schema 2020-12 (#36490) 2026-08-19 07:52:36 +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
n8n-assistant[bot]
c9f2ee661c
chore: Bundle/2.x (#36558)
Co-authored-by: Matsu <matias.huhta@n8n.io>
Co-authored-by: Sam Wooler <swooler592@gmail.com>
Co-authored-by: Dimitri Lavrenük <20122620+dlavrenuek@users.noreply.github.com>
Co-authored-by: Bernhard Wittmann <bernhard.wittmann@n8n.io>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-authored-by: Lorent Lempereur <looorent@users.noreply.github.com>
Co-authored-by: yehorkardash <yehor.kardash@n8n.io>
Co-authored-by: Danny Martini <danny@n8n.io>
Co-authored-by: mfsiega <93014743+mfsiega@users.noreply.github.com>
Co-authored-by: phyllis-noester <102315132+phyllis-noester@users.noreply.github.com>
Co-authored-by: n8n-assistant[bot] <n8n-assistant[bot]@users.noreply.github.com>
Co-authored-by: Emilia <100027345+sovietspaceship@users.noreply.github.com>
Co-authored-by: Robin Braumann <50590409+bjorger@users.noreply.github.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-08-19 07:57:44 +03:00
Lorent Lempereur
5d9d462d69
feat(core): Add retryabilityFromError to @n8n/backend-network (no-changelog) (#36527)
Co-authored-by: Danny Martini <danny@n8n.io>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-08-18 21:56:30 +00:00
Sandra Zollner
f938e13b45
feat(core): Persist review baseline at approval time (#36132)
Some checks are pending
Build: Benchmark Image / build (push) Waiting to run
CI: Master (Build, Test, Lint) / Build for Github Cache (push) Waiting to run
CI: Master (Build, Test, Lint) / Unit tests (24.18.1) (push) Waiting to run
CI: Master (Build, Test, Lint) / Unit tests (26.5.1) (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) / Verify single-instance deps (npm-install) (push) Waiting to run
CI: Master (Build, Test, Lint) / Notify Slack on failure (push) Blocked by required conditions
Util: Publish API Schema / Cloudflare Pages (push) Waiting to run
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: kgrhartlage <kai.hartlage@n8n.io>
2026-08-18 17:35:58 +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
Irénée
56bb5f593d
fix(core): Restore AWS Secrets Manager connection reuse (#36426)
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-08-18 15:46:43 +00:00
Uddish Verma
e73244eca6
refactor(API): Migrate workflow archive, unarchive, and transfer routes to the decorator pattern (no-changelog) (#35835)
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-08-18 15:14:06 +00:00
Predrag Ristic
59efcb95b2
fix(core): Handle managed credentials in workflow codegen (#36210) 2026-08-18 15:04:36 +00:00
Benjamin Schroth
cc340df75a
refactor(core): Add breaking change rule for AI Agent versions below 2 (#36404) 2026-08-18 14:32:23 +00:00
Pierantonio Cangianiello
aa126ab276
fix(core): Coerce the deleteBefore param when deleting executions (#36477)
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-18 14:22:16 +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
Sandra Zollner
8fa6cde8a1
feat(core): Allow reviewer to decide after version submit (#36282)
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: Kai <kai.hartlage@n8n.io>
2026-08-18 14:12:26 +00:00
Danny Martini
f76b35ca5a
feat(core): Add pure node-id heal function for published workflow versions (no-changelog) (#36453)
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-08-18 14:11:48 +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
Mike Repeć
2435ed5cf0
fix(core): Report activation mode 'activate' for a first publication via the outbox (#36512)
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-08-18 13:53:44 +00:00
Guillaume Jacquart
83db64a94e
fix(core): Resolve end-user credentials when loading node parameters (#36452)
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-18 13:39:48 +00:00
Declan Carroll
c57d1c1e3f
build: Bump dependency pins to patched minor and patch versions (no-changelog) (#36503)
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-08-18 13:28:13 +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
Ali Elkhateeb
697d53c8d0
feat(editor): Hide convert to sub-workflow when Execute Workflow nodes are excluded (#36499)
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-18 12:45:30 +00:00
Sam Wooler
47f4bc8d1e
feat(API): Add endpoint to list role-mapping rules (#36501)
Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-18 12:42:04 +00:00
Guillaume Jacquart
85f7dde311
fix(core): Show a clear no-access message when SSO role mapping denies a login (#36407)
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-18 12:00:57 +00:00
Jaakko Husso
e1a6ede450
fix(core): Handle projects better on AIA workflow listing (#36413)
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-18 11:58:35 +00:00
Uddish Verma
39be106f68
fix(API): Return a request schema for decorator routes in /discover (#36211)
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-18 10:03:08 +00:00
n8n-release-tag-merge[bot]
44a5deb577 Merge tag 'n8n@2.36.0' 2026-08-18 09:41:33 +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