n8n/packages/cli
Mutasem Aldmour a8fb02b46f
fix(editor): Make Browser Use work end to end in the agent chat preview (no-changelog)
Running an agent against a real model surfaced two failures that unit tests
and typechecking could not.

Anthropic rejected the whole request with "tools.19.custom.input_schema.type:
Field required". Three browser tools (browser_scroll, browser_cookies,
browser_storage) are discriminated unions, which convert to a top-level
anyOf; providers require an object at the root and refuse anyOf/oneOf/allOf
there. Because the rejection is per-request rather than per-tool, one such
schema took the entire agent down. They are now flattened into a single
object - union of every branch's properties, requiring only what all branches
share, with the discriminator collapsed into an enum so no mode is hidden
from the model. The real zod schema still validates inside callTool, so a bad
combination returns a correctable error instead of breaking the conversation.
A tool whose schema cannot be expressed is dropped with a warning rather than
poisoning every request.

The suspension then reached the frontend but rendered nothing: the chat only
built interactive cards for approval-shaped payloads and chat_action, so the
run sat suspended with no way to resume. Adds a third interactive variant for
the connect card. The approval card was not reusable - it is hard-coded to
"Approval required" with Approve/Deny, which is the wrong question here.

One suspend payload now serves both surfaces: `components` is what a channel
turns into Block Kit, `type` and `setupUrl` are what the in-app chat matches
on. Neither minds the other's fields.

Verified in the preview against Claude Sonnet 4.5: the agent calls
browser_tab_open, the card renders with a working setup link, and clicking
"I've connected" resumes the run - which then reports no browser and explains
it instead of looping.
2026-08-12 12:56:32 +02:00
..
bin chore: Initial V2 changes (#22553) 2025-12-01 20:44:59 +02:00
scripts docs(API): Generate OpenAPI docs from Zod DTOs and PublicApiController decorators (#34540) 2026-08-04 08:00:54 +00:00
src fix(editor): Make Browser Use work end to end in the agent chat preview (no-changelog) 2026-08-12 12:56:32 +02:00
templates feat(Form Trigger Node): Add credential connect UI for end-user credentials (#35347) 2026-08-05 10:14:11 +00:00
test test(core): Add durable scheduler poll cursors e2e tests (no-changelog) (#35343) 2026-08-11 20:36:24 +00:00
AGENTS.md chore(core): Lock the @n8n/typeorm import ratchet and document the boundary (no-changelog) (#34370) 2026-07-21 08:26:21 +00:00
BREAKING-CHANGES.md fix: Security patches (#22748) 2025-12-05 13:28:39 +00:00
eslint.config.mjs refactor(API): Migrate GET /workflows/{id} to the decorator pattern (no-changelog) (#35830) 2026-08-10 12:54:55 +00:00
nodemon.json
package.json 🚀 Release 2.35.0 (#36006) 2026-08-11 07:16:06 +00:00
tsconfig.build.json feat: Add @n8n/telemetry event registry with typed track() support (no-changelog) (#34662) 2026-07-23 16:09:54 +00:00
tsconfig.json feat: Add @n8n/telemetry event registry with typed track() support (no-changelog) (#34662) 2026-07-23 16:09:54 +00:00
vitest.config.base.ts feat: Add @n8n/telemetry event registry with typed track() support (no-changelog) (#34662) 2026-07-23 16:09:54 +00:00
vitest.config.integration.testcontainers.ts chore: Remove references to Jest (#33282) 2026-07-01 09:03:25 +00:00
vitest.config.integration.ts refactor(core): Tidy agent-eval runner and rating-persistence internals (no-changelog) (#35424) 2026-08-04 10:42:20 +00:00
vitest.config.migration.testcontainers.ts chore: Remove references to Jest (#33282) 2026-07-01 09:03:25 +00:00
vitest.config.migration.ts chore: Remove references to Jest (#33282) 2026-07-01 09:03:25 +00:00
vitest.config.ts test: Migrate cli package from Jest to Vitest (#31804) 2026-06-29 21:19:56 +03:00
vitest.tsc-entity-transform.ts chore: Consolidate ts tooling catalog (#34310) 2026-07-16 10:10:12 +00:00
vitest.workspace-externals.ts test: Migrate cli package from Jest to Vitest (#31804) 2026-06-29 21:19:56 +03:00