Commit Graph
621 Commits
Author SHA1 Message Date
Przemyslaw Kukulski 47ef996921 feat: a way back for a blocked user template (#6696)
* feat: a blocked user template has a way back

* Review feedback
2026-11-16 12:09:41 +01:00
Peter Evans 4dcceef1d6 chore: require Node.js 24.15 or later and switch the shared IDE test configs from Jest to Vitest (#6676) 2026-11-16 10:58:21 +00:00
Bram 727772b03c Prepare for 2.4.3 (#6726) 2026-11-14 08:52:16 +00:00
Bram 07a05e0ca4 Compress large realtime messages in Redis (#6722) 2026-11-13 17:53:37 +01:00
Davide Silvestri 9af8a8422e feat(agent): rate-limit agent triggers and let a busy trigger skip or wait (#6672)
* feat(agent): rate-limit agent triggers and let a busy trigger skip or wait

* feat(agent): choose a trigger's overlap rule and show skipped firings

* feat(agent): let a trigger run its replies in parallel

A third overlap rule, Run in parallel, starts up to
BASEROW_AGENT_TRIGGER_MAX_PARALLEL_RUNS replies at once (default 5) and
queues the rest up to the queue cap. Skip, Wait and Parallel now share one
rule (OverlapLimits): start while there is room to go and nothing is
queued ahead, queue while the queue has room, else skip. A firing held
back by the workspace's run limit queues where the rule queues. The
hand-off and the sweep start as many queued replies as fit.

* test(agent): pin the trigger lock order a hand-off and a builder's save rely on

* fix(agent): lock agent before firing its trigger

* fix(agent): tighten trigger overlap counts and limit parsing

- A reply in a trashed conversation no longer counts as going, so it
  can't block a trigger until the trash is emptied.
- A message that fails to resolve fails its reply before the overlap
  rule, so the builder sees it instead of a skip.
- The hand-off locks only the queued replies that can start.
- Rate-limit pairs must be positive integers.
- The API help text describes `parallel`.

* fix(agent): hand a trigger's queue on in its own task

- When a trigger's reply ends, a task started with the trigger's id
  starts its queued replies, instead of the ending reply's save doing
  it. With the broker down, a hand-off fails at most one reply instead
  of the whole queue, and the reply's save no longer loads the trigger.
- The hand-off and the sweep check what a firing checks: Agents on, the
  trigger type available and the agent ready. A trigger that can't fire
  keeps its queue until it can.
2026-11-13 17:38:50 +01:00
alamin-br 3911d1ae66 docs: add ADR 015 for encrypting stored secrets (#6713)
* docs: add ADR 015 for encrypting stored secrets

Records why secrets sent to other services are encrypted with a dedicated key and one shared field.

* docs: keep ADR 015 to decisions, without implementation details

* docs: add a developer guide for encrypted secrets and update ADR 015

Unreadable secrets now stay stored and are never sent, and adopters need the field's usage, limits and required tests.

* docs: add diagrams to the encrypted secrets guide

* docs: stage key changes in the encrypted secrets guide

Services not yet restarted can't read what new ones write unless the new key is a fallback first.

* docs: flag expression updates, raw SQL and db defaults on encrypted fields

They skip the field's encryption, so adopters must review them separately.

* docs: cover rollout of released columns and damaged values in the secrets guide

Old processes read ciphertext as the secret during a deploy, and damaged values now count as encrypted.
2026-11-13 17:38:42 +01:00
alamin-br 8977543422 feat(integrations): encrypt the keys and tokens of MCP servers (#6667)
* feat(core): encrypt stored secrets with a dedicated key

A database dump or read access shouldn't reveal the credentials Baserow sends
to other services. Values say which key encrypted them, so keys can rotate.

* feat(integrations): encrypt the keys and tokens of MCP servers

They are the first secrets stored with the new encrypted field.

* docs: explain that one key encrypts every stored secret

The key, field and rotation command are shared by every secret encrypted at rest, so losing or changing the key affects all of them.

* fix(core): never decrypt written secrets and keep rows with unreadable ones loading

A written ciphertext was decrypted on save, and one unreadable value broke every query on its row.
Also reads secrets after a SECRET_KEY change, fixes the context per field, and stops the image generating a key per container.

* fix(core): keep unreadable secrets stored, never sent, and load dumps once

An unreadable secret read as empty, so moving its server skipped the credential
check and refreshing erased the tokens. Dumps were encrypted twice on load.

* fix(core): refuse encryption keys that share an id

A value names its key by id only, so the second key could never be used.

* fix(core): make reencrypt_secrets decrypt every secret and fail on any it can't

--check only counted prefixes, so missing keys and tampered values passed.

* docs: explain backups, restores and changing the encryption key

* fix(core): keep damaged secrets unusable and verify against the primary

A damaged envelope read as plain text and passed --check, and --check could
read a lagging replica instead of the database rotation writes to.

* docs: stage a first dedicated key and upgrades from development builds
2026-11-13 17:26:51 +01:00
Davide Silvestri 09e6992a1c feat(agent): run agents from triggers in shared conversations (#6663)
* feat(agent): start shared conversations when a trigger fires

* feat(agent): show shared conversations and let editors decide their held calls
2026-11-13 10:03:11 +01:00
Davide Silvestri 4ad9b01319 feat(agent): set up agent triggers in When it runs (#6693)
* refactor(core): read service results and trigger timezones through the service type

* feat(agent): add named agent triggers with their API

* feat(integrations): name and describe periodic trigger services for any consumer

* feat(agent): configure triggers in the When it runs section

* docs(adr): record agent triggers and shared conversations

* fix(agent): save a trigger switch alone after a rejected save

* fix(agent): audit only trigger messages that change and translate trigger actions

* perf(agent): load trigger services in bulk when listing triggers

* fix(agent): resolve trigger dates in the trigger's timezone, drop the duplicate schema and unnamed trash names

* fix(agent): save each trigger field alone and show reverted service values in the form

* fix(agent): offer to add a trigger only once the trigger list has loaded

* fix(agent): stop nesting trigger service forms inside the configuration form

* refactor(builder): read data source and previous action results through the service type

* perf(agent): look up a trigger's type only when its service values change
2026-11-12 22:55:05 +00:00
Przemyslaw Kukulski 7121039db6 feat: block and unblock user templates from the admin Templates page (#6661)
* feat: block and unblock user templates from the admin Templates page

* Review feedback
2026-11-12 20:24:32 +01:00
Davide Silvestri cc4f447156 fix(agent): model defaults and printed tool-call responses (#6682)
* fix: share Agent model defaults and guard tool-call output

* fix(agent): scope model reliability behavior to provider configurations

* fix(tests): separate Agent selection from provider availability

* fix(agent): scope output retries and share printed-call repair
2026-11-12 15:58:17 +01:00
Bram 8e797da4f7 feat: [4/5] GPU variant for the embeddings (#6524)
* Added embeddings GPU variant

* Fixed feedback
2026-11-12 13:24:51 +01:00
alamin-br 8fe54ed4da feat(mcp): plugin-first setup and one-click installs on the MCP settings page (#6386)
* feat(mcp): link to the docs for per-app OAuth setup steps

Claude and ChatGPT change their connector UI often; the docs can follow without a release.

* feat(mcp): plugin-first setup and one-click installs on the MCP settings page

Point Claude Code users at the plugin, build Cursor and VS Code install links from the instance URL, and add Codex, Gemini CLI and add-mcp commands so self-hosted users get copy-ready setup.

* fix(mcp): handle non-Latin instance URLs in the editor install links

btoa() threw on a non-Latin hostname and blanked the Cursor tab, including the config fallback.
2026-11-12 10:38:15 +00:00
Bram 3d9e37163e feat: [3/5] Semantic search action for automations and applications (#6451)
* Semantic search action for automations and applications

* Fixed feedback
2026-11-12 11:03:12 +01:00
alamin-br 90fcd746ac refactor(builder): move the builder tools from enterprise to contrib/builder (#6660)
* refactor(builder): move the builder tools from enterprise to contrib/builder

Only login needs enterprise code, so setup_user_source and its helpers stay there
and the other builder tools work without a paid edition.

* test(builder): keep the guards on the builder tools left in enterprise

The enterprise tests block model calls and assistant imports again, and the backend tests pass without enterprise.

* fix(builder): say an auth_form needs an instance that has it

On an instance without enterprise, the refusal no longer claims the whole batch was undone.

* test(builder): run the missing element check without enterprise
2026-11-11 15:29:15 +00:00
Bram 431c823fa8 Prepare for 2.4.2 (#6679) 2026-11-11 15:22:02 +01:00
Tsering Paljor 72fbe9106b Add sweep that cleans up stuck Automation workflows. (#6665) 2026-11-11 09:47:39 +04:00
Davide Silvestri 18ae3c06cb feat(agent): ask before running tools (#6602)
* feat(agent): retain reply execution details

* feat(agent): hold Ask first tool calls for the owner's approval

* feat(agent): approve or reject held tool calls in the chat

* fix(agent): tell the model that Ask first calls wait for the user

* refactor(agent): run the approval action through the action registry

* fix(agent): preserve approval state across reply transitions

Mark held calls waiting immediately and keep retry slots across durable
pauses. Keep stale history and run snapshots from undoing newer decisions.
Contain rejection dialog focus and localize its waiting announcement.

Add focused transition regressions and update the tool presentation contract.
Align approval fixtures with the parent conversation cursor contract.
Validation: 469 backend passed (one known xfail), 362 frontend passed;
query-growth, migration drift, lint and browser component checks passed.

* feat(agent): show partial results of approved calls in the approval card

* test(agent): cover web searches next to held tool calls

* fix(agent): drop retry slots, every tool call has its own card

A paused reply no longer saves which failed steps the next response may
continue. Transcripts drop text PostgreSQL can't store, like steps do.

* feat(agent): show a held call's named request while it waits

A held call is named as the Agent identity when it is held and sends
the request to its step like a running call, so the owner decides on
names. What can't be named keeps its ID; the call still waits.

* feat(agent): title held changes with their table

* fix(agent): end held calls by the owner's decision

A held call that a reply ends without resuming is rejected when the owner
rejected it, stopped when they approved it, since the resume may have run it,
and failed when undecided. Copies end held calls at export, where the
decisions are known. Rejected calls stay out of the interruption note.

* fix(agent): resume a paused reply as the run that paused

The transcript keeps whether the paused run offered web search and the
identity it acted as. A resume offers search only if the paused run did, so a
provider that refused it doesn't fail the reply after the approved change ran.
It runs approved calls only as the identity they were held under; when the
Agent no longer acts as it, they fail with a permission error. Every resume
tells the model that users approve these calls.

* chore(agent): clean up after the tool approval review

Drop the unreachable ChatRunAlreadyActive from the decide path, its API schema
and tests, and test the refused resume against the real run limit. Remove the
import branch for exports without ask_first_tools and the toolInputText
indirection, and add the decision audit strings to the agent catalog.

* fix(agent): end held calls that never ran as not run

A held call that a reply ends without running now fails with `not_run`:
undecided, or approved when the resume never started (not ready, cancelled
before it started). Only a resume that started stops its approved calls,
since it may have run them; `mark_reply_interrupted` now passes an empty
result, so `None` again means the run never started. The interruption note
leaves `not_run` calls out, like rejected ones, and the card says "It didn't
run."

* fix(agent): keep the IDs of what a held request can't name

A table, database or view the Agent identity can't see no longer empties the
whole request preview: it keeps its ID, like fields and rows already did.
Values of rows for a table that can't be named are all masked, since its
password fields are unknown. An approval for an unknown table now shows
`table_id` and the requested rows instead of nothing.

* fix(agent): tell the model why an approved call lost its identity

When the Agent no longer acts as the identity a call was held under, the
approved call is denied with a note saying so, and that tools are
unavailable for the rest of the reply, instead of "This tool is no longer
allowed."

* fix(agent): hold no change after a call with invalid arguments

pydantic-ai validates every call of a response before running any, and
reports invalid ones with `args_valid=False`. An ask first call that fails
validation is retried, never held, so it no longer holds the changes after
it: a change set to run without asking now runs.

* fix(agent): leave reply transcripts out of copies

Duplicates and snapshots no longer copy each reply's model messages and
usage. They hold every tool result, nothing reads them, and the export
loaded all of them at once. A copied reply can't resume anyway.

* feat(agent): title unfinished calls by their request

A call that isn't running or done is titled by what it asked for, so an
approved call that fails keeps "Update 1 row in Accounts". An approved card
item shows any outcome other than success next to the decision, now failed
too. Held reads keep their request and are titled with their table.
2026-11-10 18:06:58 +00:00
alamin-br ad7c61db45 fix(mcp): follow-up fixes for the application builder tools (#6650)
* perf(automation): leave replaced published copies to the hourly cleanup

clear_old_history already removes them and keeps the newest copy, so the extra task isn't needed. Its delete now batches the service deletes.

* fix(mcp): keep dashboard creation on connections that allowed create_dashboards

The tool is now create_dashboard and unregistered names are ignored, so stored grants lost it.

* docs(mcp): list pause_workflow and move_elements as destructive

* fix(mcp): log the integration create_automation adds

It was created without its action type, so the audit log missed it.

* test(assistant): expect the integration action when redoing a new automation

* fix(mcp): check the workflow copy that publish_workflow makes live

A service-only node edit during the publication still went live unchecked. The checks now run on the copy in the same transaction, and come from the node types.

* test(assistant): tighten Kuma eval checks and add unquoted ask case

Search check judges only the sentence naming Sales and Invoices; two cases
also check nothing else changed; core cases share one database scenario.

* docs: run the shared tool tests in the assistant test plan

* chore: add changelog entries for the MCP builder tools and redo fix

* fix(mcp): check {{ }} templates in linear time

* fix(mcp): report the client's value in formula_errors

Kuma's repair step reads the description instead. The invalid-formula
warning uses loguru and no longer names the assistant.

* fix(builder): refuse a user property the user data provider doesn't have

* fix(assistant): route Kuma's mapping, move and style tools through the shared tools

Kuma now refuses mappings the page can't read and makes its moves in one
transaction, like MCP.

* fix(mcp): title list_applications 'List databases'

It lists only databases. The old list_databases becomes 'List all databases'
so the two stay apart at consent.

* feat(mcp): name the builder action tools element actions

list_element_actions, create_element_actions and update_element_action, so
they read apart from automation actions before grants store them. MCP drops
add_action_field_mapping; Kuma keeps it and its own tool names.

* fix(assistant): name the right update tool for an application of another type

* fix(mcp): keep create_database out of the shared create_tables description

The Agent Builder offers create_tables but not create_database; Kuma's own
description still names it.

* fix(builder): validate page paths in the handler and create pages with visibility in one action

* fix(builder): refuse row action mappings on read-only fields

* fix(builder): bound page, user source, menu item and column names in tool input

* fix(builder): keep an explicit column formula over a field of the same name

* perf(builder): reuse the loaded page when listing elements

* perf(builder): reload page graphs only after a failed move

* feat(builder): allow get_row data sources without a row id in the tools

* refactor(builder): update builders through the shared update_application helper

* perf(builder): list a page's data sources with the service in one call

* fix(builder): record tool-created integrations and login pages in the audit log

* docs(mcp): say setup_user_source can create a users table or a password field

* feat(mcp): move builder item deletes into a builder_delete group

* feat(builder): list links and actions a page parameter change breaks, and let update_element fix a link

* test(mcp): expect delete_element_items in the annotation list

* chore: update English backend translation catalogs

* feat(assistant): use the element action tool names in Kuma too

Kuma lists every mode's tools by name and switches mode on a call, so create_actions next to the automation node tools could route an automation request into the builder.

* chore: drop the MCP builder tools feature changelog entry

The MCP feature entry is added once the milestone is done.

* fix(automation): keep the draft dirty when a publication rolls back

Refuse an empty draft before copying it, and warn about a delete row node with no row ID.

* fix(mcp): keep the integration create_automation adds out of undo

Undo could trash it under the nodes that use it; the builder tools already do this.

* fix(builder): list table link columns a page change breaks and fix the link hint

* fix(assistant): keep Kuma's style and move tools to the page they name

* fix(mcp): shorten the setup_user_source title so consent shows it whole

* fix(mcp): keep tool changes made while the create_dashboard rename runs

One UPDATE rewrites each allow list from the row it locks, so a revoked tool
isn't restored from a stale read.

* fix(automation): keep the draft's dirty flag when a workflow is published

The flag tracks the test clone, which publishing doesn't replace, so a draft
edit made during a publication was lost and the next test run reused a stale clone.

* fix(builder): write page parameter formulas by name after a concurrent edit

The formula step runs in its own transaction, so an editor can reorder or
retarget the parameters in between. Match each formula by name, and refuse
when the link or action now opens another page.

* fix(builder): list menu items whose page parameters no longer fit

A menu item made in the editor can give page parameters, so a page that drops
them still breaks it. Compare its parameters always, and point to the editor.

* fix(assistant): judge the search-finds-table eval on claims, not wording

Negation is scoped to the clause naming the table, lists under a Sales heading
count, and an answer that also says Invoices is missing fails.
2026-11-10 17:08:33 +01:00
Davide Silvestri 058bca8274 feat(agent): show readable requests for the database tools (#6651)
* feat(agent): name a tool request as the Agent before the call runs

Before a change tool runs, its request is resolved into names with the
Agent's permissions. If a name can't be resolved, the call fails and
nothing runs. Values of password fields are masked, and lists are cut to
10 items of 10 keys.

* feat(agent): show readable requests for the database tools

Change tools show the tables, fields, views and rows they work on by
name, rows by their primary value. Card titles use the requested table.

* fix(agent): let the tool, not the preview, decide whether a call runs

Fields, rows and tables the Agent identity can't name keep their IDs in
the readable request, and a preview that can't be built is left out, so
delete_fields and update_fields fail per item again and a table without
a primary field can still be changed.

* fix(agent): never show an oversized request as an empty list

A request whose single item can't be stored keeps its names without
the list. Row deletions no longer dedupe IDs, which the row handler
rejects anyway.

* fix(agent): show a call's readable request while it runs

The tool sends its named request to the running step through a
pydantic-ai custom event before it changes anything, so a stopped call
or one whose worker died still shows what it asked for.
2026-11-10 13:58:00 +01:00
Przemyslaw Kukulski 5e6ce919b6 feat: share a user template with a private link (#6611)
* feat: share a user template with a private link

* Review feedback
2026-11-10 12:50:34 +01:00
Tsering Paljor 6d729c3b1d feat: Add Wait node (#6575)
* Add suspect and presume primitives for wait service.

* Add the Wait service and node that pauses a workflow.

* Ensure resume_at is returned in node history serializer

* Add the frontend Wait node and show waiting nodes in the workflow history.

* Add migrations for wait service and node

* On cancellation request, ensure waiting node is cancelled immediately

* Tolerate a deleted run history when the dispatch chain ends

* Ensure that lost wake-up tasks are recoverable

* Add changelog

* Fix test

* Cancel run of deleted workflow

* Mark the node as error when hourly sweep finds stale waiting node that is in a loop

* Show the iteration of a waiting node in the run history

* Stop counting waiting runs toward the unfinished runs rate limit

* Add tests that waiting runs finish after the workflow is switched off

* Merge migrations

* Update comment

* Disable node error policy for types that don't need it

* Simplify error message

* Remove the skipped status, as it isn't really useful

* create index concurrently
2026-11-10 15:31:28 +04:00
Jérémie Pardou 908ce9bdf3 fix(core): sanitize service sample data in user templates (#6548)
* fix(core): sanitize service sample data in exports and templates

* fix(core): preserve workflow metadata in exported samples

* test(database): preserve status in sanitized button samples
2026-11-10 09:10:19 +01:00
Davide Silvestri 68f8fed4c2 feat(agent): show tool inputs and why tool calls failed (#6631)
* feat(agent): show tool inputs and name known targets of failed calls

Moved out of the tool activity layer so the approvals layer can decide how long input values are kept.

* refactor(agent): drop duplicate checks on step resources and input previews

* refactor(agent): drop failed-call targets and row input previews

Failed calls show only the error, the input preview is a single size
check on the stored JSON, and row writes keep no preview because their
values can include passwords. Both are tracked in #6626.

* feat(tools): report database tool errors in one format

Every error has a code, a message written for people and an optional hint
for the model. Batch tools list failed items in errors, set changed, and
set error only when nothing was changed. MCP gets the hint after the
message.

* fix(assistant): read the shared tools' new error format

Formula repair finds invalid formulas by code and rechecks the outcome
after repairing. A repair that fails for another reason reports the real
cause. Hints reach Kuma as next steps.

* feat(agent): keep only tool calls that did something

A failed call shows the reason, a call that changed nothing is skipped,
a partly done call lists what failed, and a retry of a failed call
continues its card.

* feat(agent): show failure reasons and partial results in tool cards

* style(mcp): format the server test

* fix(tools): log unexpected errors and keep their text out of messages

Built-in errors are unexpected again: logged, with the generic message.
Tools raise ToolInputError with a message for people and a hint for the
model where they mean a user error, including linking to a table in
another database. create_views no longer turns any exception into a
message.

* fix(agent): give every tool call its own card

A result ends only its own call's card: no retry continues an earlier
card. Step text, reply text and streamed text are cleaned of characters
PostgreSQL can't store. The partial status is visible.
2026-11-09 22:49:21 +01:00
alamin-br be71e3bce6 feat(mcp): add application builder tools and one create and update tool per application type (#6606)
* refactor(mcp): share the tool error messages

The row comment, row colour and audit log tools need licence errors to reach the client, and the item error helper outside automation.

* fix(assistant): show shared tool errors to Kuma

A licence or input error from a shared tool ended the chat run instead of reaching the model.

* feat(mcp): search the workspace

Lets MCP clients and Kuma find a table or row by name without walking every database.

* feat(mcp): read and post row comments

Lets MCP clients and Kuma read what people said about a row and add to it, in plain text.

* feat(mcp): change view sorts, field visibility and row colours

Lets MCP clients and Kuma configure views, and delete views and filters. list_views now returns the ids those tools take.

* feat(mcp): read the workspace audit log

Lets MCP clients and Kuma answer who did what in a workspace. It stays off until a user turns it on, even though it only reads.

* refactor(assistant): move the builder tool types out of the assistant

The builder tools need these types and helpers without pydantic_ai
or the assistant, so MCP can share them with Kuma.

* feat(assistant): make Kuma's builder writes undoable

Kuma's page, data source, workflow action and user source writes now appear in undo and the action log.

* fix(assistant): set up a new login page after undoing the old one

Undo trashes the login page but the builder still points at it, so setup skipped creating one.

* fix(mcp): run the field visibility change in a transaction

Over MCP and Kuma it failed on select_for_update, as they call tools outside a transaction.

* feat(mcp): add the application builder tool groups

Builder tools need their own groups and picker labels so users can switch them on separately.

* feat(mcp): offer the application builder read tools

Clients other than Kuma can inspect builders, pages, data sources, elements and actions.

* test(mcp): keep the no model calls check to the shared builder tests

Under a rootdir that excludes the enterprise tests, pytest applied the autouse patch of Agent to every test.

* test(mcp): prove the no model calls check runs and restore Kuma's not found hints

The folder check now resolves paths, and Kuma's list tools explain a missing builder or page again.

* feat(mcp): offer creating and updating builders and pages

Clients with builder_edit can set up an application builder and its pages. Kuma's
page tools now run the same create and update code, and keep their own results.

* feat(mcp): offer creating and updating builder data sources

The formula step that needs no model moves to the shared code, so MCP stores given
formulas and reports the rest. Kuma runs it, then repairs what is left with its model.

* fix(mcp): check builder formulas against values of the right type

Example values of the wrong type refused valid formulas, and over MCP no model can
fix that. Failures after a batch committed are now reported with their item.

* fix(mcp): check builder formulas without evaluating them

Example values can't stand in for every field type, so they refused valid formulas.
The check now looks at the formula's functions and paths against what the page has.

* fix(mcp): check nested builder formulas in linear time

Each nested get was visited twice, so a short formula could stall a request thread.

* feat(mcp): offer the application builder element tools

MCP clients can build page content without a model. Kuma runs the same create and
update code and repairs what it leaves.

* fix(mcp): store the values the element create tools are given

A default value or link URL was dropped with nothing reported; a negative size gave an internal error.
Column-name-wins is now opt-in, and update_element is marked destructive.

* fix(mcp): only take row colours a row can show

A row takes its colour from a CSS class per palette name, so a hex value reported success and coloured nothing.

* fix(mcp): undo a row colour that fails halfway

The tool adds to a view's colours, so a client retrying after an error would end up with a second colour.

* fix(mcp): show how a view's filters combine

A view matching any filter, or one with filter groups, read as one matching all of them.

* fix(mcp): mark set_view_sorts as overwriting

It replaces a view's sorts and an empty list removes them, so clients should confirm it.

* fix(mcp): read comments with a mention without a label

The API accepts such a mention, and one of them made every comment of the row unreadable.

* fix(mcp): refuse a blank workspace search

The API trims the query too, and a space would match most names.

* docs(mcp): say why reordered sorts are recreated

* test(mcp): expect how filters combine in the listed views

* feat(mcp): offer the application builder action, setup and theme tools

MCP clients can now wire up workflow actions, build a page in one call, add logins and set a theme.
Kuma's tools call the same functions and keep their results, repairing formulas after each phase.

* fix(mcp): handle bad input to the audit log tools

A reversed range and a blank query read as nothing having happened, and an unknown browser timezone ended Kuma's run.

* fix(mcp): read comments with no content

The API accepts such a comment, and one of them made every comment on the page unreadable.

* fix(mcp): show when a view's filters are switched off

Those filters hide no rows, so listing them as active misled the client.

* docs(mcp): correct what the view tools say they do

Row colours work on every view with rows, and Kuma was told to skip list_views when it needs the filters and colours.

* fix(mcp): leave IP addresses out of the audit log tools

Who did what doesn't need them, and Kuma sends tool results to the LLM provider.

* feat(mcp): add update_action and fix the builder action review findings

A refused notification or open_page value had no way to be corrected over MCP.
A shared page action could name a data source only one page has, which fails on click.

* fix(mcp): let clients read back action values and check open_page parameters

update_action could silently drop page parameters it couldn't show, and store ones the target page lacks.
Reads now give the values in the form update_action takes.

* fix(mcp): keep function-call values as formulas when update_action gets them back

A value list_actions shows like upper('abc') was written back as fixed text.
A custom-URL action no longer fails the page parameter check.

* feat(mcp): offer one create and one update tool per application type

A client asking for one application type should only get that type, and an
edit group should not reach the other types.

* fix(mcp): connect new automations to the workspace data

Row actions fail at run time without a Local Baserow integration, and Kuma's
old hook used to add it.

* fix: redo restores an automation after undoing its creation

An automation is trashed under its own type, so restoring it as an application failed and rolled back the whole undo group.
Undoing a delete and redoing a duplicate or template install had the same problem.

* feat(mcp): offer publishing a workflow

MCP clients could build a workflow but not make it run.
The list reported the draft copy, so a published workflow looked like a draft.

* fix(mcp): refuse publishing a workflow that can't do anything

An MCP client has no UI to stop it, and the workflow came back as live.
Clients also skipped confirmation for a tool that starts real effects.

* feat(mcp): offer pausing a workflow

A client could start a workflow over MCP but had no way to stop it.

* perf: delete older published workflow copies in the background

The delete took over 90% of a republish, in the transaction and on the thread
shared by MCP calls and websocket DB work.

* fix: keep the newest published copy of a paused workflow

The cleanup only kept live copies, so a paused or disabled workflow lost its copy and reported the wrong state.
pause_workflow no longer needs a local cache scope: the update reads the published copy uncached.

* perf: delete superseded copies on the export queue

Deferring the service deletes takes a 200 node copy from 22s to 1.2s.
A 60s countdown keeps the delete away from a row event still reading the just-disabled copy.

* fix(mcp): tighten application tool names, lookups and checks

Blank names, hidden applications and the unclear-request eval check slipped past the new application tools.

* test(mcp): cover builder tool schemas and the read only preset

Keeps Kuma-only parameters off MCP and shows the preset can't write.

* test: add a Kuma eval for a bare request to create an application

A request like this should make an application builder, not a database.

* docs: list the builder and application MCP tools and their test steps

Adds groups, defaults and destructive flags, the new tools, and the manual create-an-application test.

* test: drop tests another test covers and tighten the weak ones

Each dropped test had a covering test that asserts the same behaviour.
The routing test no longer hides a redirect behind a second call.

* test: add Kuma evals for dashboards, several applications, renames and action edits

Nothing called create_dashboard, update_* or update_action in the last eval run.

* fix: let Kuma create an application that has a purpose without asking for a name

Evals asked only for the name, and create_builder had lost the rule against inventing app records.
The setup_user_source description now says it reuses an existing source.

* docs: say MCP writes can't be undone where the action layer is described

The line said operations are undoable, which the builder section contradicts.

* fix: say an application, app or website means an application builder

Kuma and MCP clients could pick a database or dashboard tool for a plain request for an app.

* fix(mcp): refuse a builder formula that reads a row field by its name

A published page only loads fields its formulas name as field_<id>, so such a value
was stored with no report and rendered empty there. Kuma's repair now rewrites it.

* fix(mcp): point a button's click message to its notification action

A model asked to change the message a button shows rewrote the button's text and saw
only success. Descriptions say where that message lives, and the result names it.

* fix: ask first on a bare app request even though an app means a builder

"Application means builder" and "for my team" read as enough to create Team App.
The wording now says it only picks the tool, and who an app is for isn't a purpose.

* fix: show update_action's required thought in an example

On notification title edits the model left thought out and Groq rejected the call,
so the edit took two or three tries.

* fix(mcp): check what new and changed table columns read

A by-name column was stored and came back empty on the published page, with no signal to the client.

* fix(mcp): read a form element's default value from the row around it

At run time a record selector's default value reads the enclosing repeat, not its own rows.

* fix(mcp): refuse a user source table whose fields can't be used

A text field named Password made adding the password field an internal error, and a refused setup left an integration behind.

* fix(mcp): keep the given order of children in a container

Core puts each new child first, so one call's children came out reversed on both clients.

* fix(mcp): accept a file field's thumbnails in a formula

They are valid at run time, but the file field's schema leaves them out.

* fix(mcp): check a new row action's field values like an update does

A value like nosuchfn('x') was stored unchecked and failed only when the page ran.

* chore: remove the table button action hook that never created anything

It always returned no actions, so its result handling and the empty TYPE_CHECKING block were dead too.

* fix(mcp): mark update_action as destructive

Moving an action to another table clears its field values, so clients should ask first.

* docs: correct the builder tool descriptions and docs for MCP

They promised undo MCP doesn't have, named an unset setting, and left out the button note.

* fix(mcp): store plain field values on a new row action as fixed text

Only text that is or parses as a formula goes through the check; Alice no longer comes back empty.

* fix(mcp): list a page's elements in page order

A move showed in the page but not in the list. A move before a child of another place is refused.

* fix: point formula fields to the tool description

The field text claimed a $formula: prefix that MCP does not repair.

* fix(mcp): describe a field value so it is true on create and update

update_action refuses plain text with the same schema create_actions uses.

* fix(mcp): treat an empty place_in_container as unset when moving before a child

The move schema treats an empty place as unset, but this check refused it.

* fix(mcp): refuse an open_page action missing its page parameters

A new action without them stored a button that couldn't open its row and reported success; update_action already refused this.

* fix(mcp): create a child before the element given in its container

before_element_id was ignored once a parent was given, so the element went last.

* fix(mcp): move into a column's first place when none is given

The field says none means the default slot and create does this, but the move failed.

* fix(mcp): refuse moving an empty container into itself

The check for an element already last caught this case, so the move reported success.

* fix(mcp): make a valid example email for a role with spaces

A role name with a space or symbol made the example row fail, and with it the whole setup.

* fix(mcp): refuse a row_id on a data source that is neither a number nor a formula

Plain text was stored as a literal row id with no report, and on update it replaced a working value.

* fix(mcp): read a whole function call as a formula on a new action too

create_actions stored upper('abc') as text while update_action read it as a formula.

* fix(mcp): show a client the shared page's data sources and its ID

A header can only read a shared page data source, and a client couldn't list one or find where to create it.

* fix(mcp): let create_display_elements give a link's page parameters

Over MCP only setup_page could give them, so a link to a page with a path parameter was left broken.

* fix(mcp): refuse a link's new page when its parameters don't fit

update_element kept the old page's parameters, leaving a link that breaks when clicked.

* fix(mcp): say what a client can do when a link's new page doesn't fit

The refusal said to replace the link, but no tool deletes a builder element.

* fix(mcp): give a login page that's already set a working form

setup_user_source reported success on a set login page with no usable form, or one only logged-in visitors can see, and nobody could log in.

* fix(mcp): keep a sentence with a parenthesis as plain text

Order now (today only) was stored empty over MCP, against the docs saying plain text is fixed text.

Builder values now use the automation pattern, which keeps a whole spaced call like get ('x') as a formula.

* fix(mcp): refuse a new link whose parameters don't fit its page

The frontend hides such a link at run time. open_page and link updates already refuse it.

* fix(mcp): keep a fixed value that parses as a sum as plain text

A field value of 3/4 was stored as a formula showing 0.75, and a link parameter of 10/2 as 5.

Field values and link parameters now follow the title rule: calls and plain numbers or booleans only.

* fix(mcp): check every changed column when two share a name

Keyed by name, a bad formula on the first of two columns named Edit was stored unchecked.

* fix(mcp): list a column's children in the order the page shows them

Places were walked in insertion order, so a child added to the second column first was listed first.

* fix(mcp): refuse page parameters with a repeated name

The frontend compares the name lists exactly and hides the link or button if a name is there twice.

* fix(mcp): share the lookup that hides an application the user can't see

The same wrapper was copied in the four application types' tools.

* fix(mcp): remove a dead refresh action helper and a repeated form element block

The refresh helper's value was always overwritten, and four form elements built their label and default value the same way.

* fix(mcp): refuse form data on items of the shared page

At run time a shared element reads the form data of the page being shown, so a
header form's value is empty and its element or action counts as in error.

* fix(mcp): store an auth form's login button label as text

The frontend can't parse 'Sign in' as a formula, so visitors saw the default label
instead. Export and duplicate keep the value either way.

* fix(mcp): store page parameters in the order of the page they open

The frontend compares the names with _.isEqual, so a complete list in another order
hides the link or button from visitors.

* fix(mcp): make a link go to the page or URL an update gives it

Without a navigation type the stored one stayed, so visitors still went to the old
target.

* fix(mcp): refuse a menu item that links to a page with path parameters

Menu items have no parameter field, and one missing its parameters puts the whole
menu in error, which hides it from visitors.

* fix(mcp): refuse a row id on a data source that has none

A list_rows source dropped it and reported success. A get_row source does have a
search query, so that stays.

* fix(mcp): refuse a move before an element outside the given parent

It moved to the end and reported success. No Kuma prompt, eval or test depends on it:
on the base a parent made before_id ignored either way.

* fix(mcp): refuse a new field mapping on a trashed field

The mapping would be stored against a field no visitor's row can get. A mapping the
action already has on a trashed field can still be changed.

* fix(mcp): say when the login page's form uses another user source

The result reported success while people in the new table couldn't log in. A page at
/login found with no login page set now keeps its one form too, instead of a second.

* fix(mcp): mark the builder tools that overwrite stored values destructive

update_nodes, update_fields and update_widgets do. Clients only ask first when the hint
is set.

* fix(mcp): refuse element values the REST API refuses

level=99, format='html' and column_amount=500 reached the database with no error, and
rows=-1 gave "Internal error.". The limits are the serializers' and models'.

* chore(mcp): format the review fixes

* fix(mcp): keep what a restricted view hides out of the view tools

A member below builder could read a restricted view's filters, hidden sorts and colours from list_views, and a field's name from an error before permissions were checked.

* fix(mcp): replace a view's sorts one call at a time

Two calls could each read the old sorts and add to them, leaving a list neither asked for.

* fix(mcp): read a mention whose label isn't a string

The API accepts such a label, and one comment holding it stopped the row's comments from being listed.

* fix(mcp): limit the row comments of a call to 100

Each comment runs about nine queries in its own transaction, and a commenter could ask for any number.

* fix(mcp): show Kuma that set_field_visibility needs a field

Both clients now reject an empty list from the schema, so the checks after it can't run.

* docs(mcp): correct the audit log tools' licence and fields

An advanced licence also has the audit log, and entries no longer hold an IP address.

* test(mcp): run the missing formula case on a data source with a row id

A list_rows source now refuses a row id before any formula is generated.

* test(mcp): expect the builder tools that overwrite values to be destructive

* refactor(mcp): rename set_row_colours to add_row_colours

It adds to the colours a view has, while set_view_sorts replaces the sorts.

* fix(mcp): add a login form for the new user source beside another's

People in the new table can log in once the call succeeds, whichever way the login page
was found. This replaces the note and restores the two forms Kuma's test expects.

* fix(mcp): leave a refused field value out of a new row action

The empty placeholder was a live mapping, so each click wrote an empty string
over that field of a real row until someone fixed the formula.

* fix(mcp): refuse a header's pages that can't work

share_type 'only' with no pages hides a header on every page, and page_ids with
no share_type were ignored. An update has no page_ids, so it can only refuse.

* fix(mcp): refuse changing an action on a trashed page

The lookup only checked the application, so an action on a page in the trash
could still be changed.

* fix(mcp): keep a zero column gap and page size on a new element

0 is allowed, as on REST, but was replaced by the default of 20.

* fix(mcp): treat a whole function call on an element as a formula

A formula like upper('abc') read from list_elements and sent back was stored as
text, so the page showed the formula itself. Actions already follow this rule.
Also replaces the placeholder expression repeated on each element value.

* fix(mcp): share the parameter model and the stored formula reader

Two identical parameter models and three readers of a stored formula's text.

* chore(mcp): format the round's review fixes

* fix(mcp): refuse a page size of zero on tables and repeats

A page size of 0 fetches no rows and shows an empty element; the editor's
minimum is 1.

* fix(mcp): warn on publish about a row_id stored as an empty literal

update_nodes stores row_id='' as '', which the check for a missing row_id
didn't count as empty.

* fix(mcp): keep a field value's formula when its field id has spaces

The formula was stored under the stripped id and looked up under the raw one, so
' 12' lost its value with no report.

* fix: leave test clones out of the superseded copies task

A test run can pick up an older clone just before this task deletes it, so writing
its history entry fails. clear_old_history removes unused clones.

* fix(mcp): refuse style values the element columns can't hold

An overlong color or a radius or size past the column's limit gave "Internal
error.", and a negative radius, which the editor refuses, was stored.

* fix(mcp): treat a whole function call in search_query as a formula

upper('abc') from list_data_sources was stored as text when sent back, as elements
were. The create docstring also said plain text was left empty, which it isn't.

* fix(mcp): mark the application update tools destructive

update_table only renames and is marked destructive, as is update_page; these
overwrite a stored name too. update_builder also changes the login page.

* chore(mcp): format the round's review fixes

* fix(mcp): stop set_view_sorts deadlocking with a new sort

A new sort checks its view when it commits, which the view lock blocked while
the sort rows it needed were held. Sort writers now share a weaker view lock.

* fix(mcp): title add_row_colours Add row colours

* refactor(mcp): merge search_audit_log into list_audit_log

The two differed only by a text query and a 90 day cap. Timestamps now need an
offset, as nothing tells MCP the user's timezone.

* feat(mcp): let a date filter carry its timezone

MCP has no timezone for the user, so relative date modes would follow UTC. An
offset can't express those, so the caller names the IANA timezone.

* test(assistant): expect the login page to stay after undo

Develop creates the login page without an action, so undo no longer trashes it.

* fix(mcp): say a licence is missing when a tool needs one

The REST message reads like a permission problem, which sends users to the wrong fix.

* test(mcp): cover the licence message of the tool errors

* fix(mcp): mark tools that reach outside the workspace as open world (#6609)

ChatGPT's scan refused to publish create_views because it reported
openWorldHint false while public views, emails and redirects reach outside.

* fix(builder): refuse a reused user source without password login

A login form for it could never sign anyone in, yet the setup reported success.

* fix(automation): check a workflow under the lock that publishes it

A node deleted between the checks and the publication went live unchecked.

* fix(builder): cap how many items one builder tool call takes

A caller could ask for any number of elements or nested items in one call.

* test(assistant): fail evals that only look like they passed

A wrong dashboard name, a denied table search and a form mapping both fields to one input passed.

* fix(mcp): mark pausing a workflow and moving elements as destructive

Neither only adds: a pause drops events and a move changes existing placement.

* refactor(builder): read tables without the database MCP module

The shared builder layer shouldn't depend on one client's adapter.

* test(assistant): add an eval that changes a row action's mapping

update_action had no eval for the branch that writes rows.

* test(mcp): expect moving elements to be destructive
2026-11-09 15:08:40 +01:00
alamin-br d59e412bf3 feat(agent): add native web search (#6628)
* feat(agent): add native web search setting

Agents can answer from current web pages using the search built into their model provider. Off by default because searches cost money and can leak data when combined with workspace tools.

* fix(agent): stop retrying searches once a reply reaches its limit

Newer Claude models report the limit only inside their filtering code, so they kept retrying for minutes with nothing on screen.

* fix(agent): let Anthropic enforce the reply's search cap

Searches run from filtering code escape max_uses and continuations reuse the tool,
and Anthropic already counts earlier requests of the reply, so plain search with a
fixed cap is the only one it enforces.

* fix(agent): show when a reply could not search instead of having the model say so

A 400 doesn't prove the model can't search, and an SDK that excludes search
would fail the whole reply.

* refactor(agent): match step events by pattern

* feat(agent): mark web search as unavailable beside its switch

A saved setting the chosen model can't use looked on until you read the text under it.
2026-11-09 14:00:57 +01:00
Davide SilvestriandClaude Opus 5.5 eec8247c0a feat(agent): show tool activity in conversations (#6551)
* feat(agent): show tool activity in conversations

* refactor(agent): centralize tool step statuses

* fix(agent): keep tool-step diagnostics free of private data

* fix(agent): retain Sentry details for tool errors

* feat(agent): show tool inputs and failed read attempts

* fix(agent): show individual tool outcomes in activity groups

* feat(agent): explain tool failures in translated tooltips

* feat(agent): name known targets in failed tool calls

* fix(agent): use shared tool errors after rebase

* fix(agent): show interrupted changes, announce tool steps and clear pre-tool text

* refactor(agent): move input previews and failed-call targets out of tool steps

* refactor(agent): log tool-step failures without the Sentry helper

* fix(agent): classify tool errors once and drop partial-failure steps

Calls to tools a reply never offered no longer get a step.

* refactor(agent): key tool presenters by tool name and drop unused step data

Drops presentation_type, the unused card icon, copy-time step cleanup and Kuma-visible chat CSS changes, and defers steps when loading reply history.

* test(agent): cover Stop during a change and merge overlapping step tests

* docs(agent): trim tool presentation guide to the step contract

* fix(agent): keep step facts JSON-safe and polish stopped cards

Restores the JSON check on step facts, keeps a stopped change's title readable at narrow widths, raises its warning contrast, and stops reopening a running reply from re-announcing its old steps.

* fix(agent): cap the Agent chat column at 900px

* fix(agent): name the executing tool call and keep step cards stable while text streams

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(agent): name reused tables and views instead of showing zero created

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(agent): tell the model which changes an interrupted reply started

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(agent): continue a retried tool call on the step of its invalid attempt

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(agent): report views skipped by name collisions

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-06 10:53:05 +00:00
alamin-br 4654019e22 feat(mcp): add search, row comment, view config and audit log tools (#6593)
* refactor(mcp): share the tool error messages

The row comment, row colour and audit log tools need licence errors to reach the client, and the item error helper outside automation.

* fix(assistant): show shared tool errors to Kuma

A licence or input error from a shared tool ended the chat run instead of reaching the model.

* feat(mcp): search the workspace

Lets MCP clients and Kuma find a table or row by name without walking every database.

* feat(mcp): read and post row comments

Lets MCP clients and Kuma read what people said about a row and add to it, in plain text.

* feat(mcp): change view sorts, field visibility and row colours

Lets MCP clients and Kuma configure views, and delete views and filters. list_views now returns the ids those tools take.

* feat(mcp): read the workspace audit log

Lets MCP clients and Kuma answer who did what in a workspace. It stays off until a user turns it on, even though it only reads.

* fix(mcp): run the field visibility change in a transaction

Over MCP and Kuma it failed on select_for_update, as they call tools outside a transaction.

* fix(mcp): only take row colours a row can show

A row takes its colour from a CSS class per palette name, so a hex value reported success and coloured nothing.

* fix(mcp): undo a row colour that fails halfway

The tool adds to a view's colours, so a client retrying after an error would end up with a second colour.

* fix(mcp): show how a view's filters combine

A view matching any filter, or one with filter groups, read as one matching all of them.

* fix(mcp): mark set_view_sorts as overwriting

It replaces a view's sorts and an empty list removes them, so clients should confirm it.

* fix(mcp): read comments with a mention without a label

The API accepts such a mention, and one of them made every comment of the row unreadable.

* fix(mcp): refuse a blank workspace search

The API trims the query too, and a space would match most names.

* docs(mcp): say why reordered sorts are recreated

* test(mcp): expect how filters combine in the listed views

* fix(mcp): handle bad input to the audit log tools

A reversed range and a blank query read as nothing having happened, and an unknown browser timezone ended Kuma's run.

* fix(mcp): read comments with no content

The API accepts such a comment, and one of them made every comment on the page unreadable.

* fix(mcp): show when a view's filters are switched off

Those filters hide no rows, so listing them as active misled the client.

* docs(mcp): correct what the view tools say they do

Row colours work on every view with rows, and Kuma was told to skip list_views when it needs the filters and colours.

* fix(mcp): leave IP addresses out of the audit log tools

Who did what doesn't need them, and Kuma sends tool results to the LLM provider.

* fix(mcp): keep what a restricted view hides out of the view tools

A member below builder could read a restricted view's filters, hidden sorts and colours from list_views, and a field's name from an error before permissions were checked.

* fix(mcp): replace a view's sorts one call at a time

Two calls could each read the old sorts and add to them, leaving a list neither asked for.

* fix(mcp): read a mention whose label isn't a string

The API accepts such a label, and one comment holding it stopped the row's comments from being listed.

* fix(mcp): limit the row comments of a call to 100

Each comment runs about nine queries in its own transaction, and a commenter could ask for any number.

* fix(mcp): show Kuma that set_field_visibility needs a field

Both clients now reject an empty list from the schema, so the checks after it can't run.

* docs(mcp): correct the audit log tools' licence and fields

An advanced licence also has the audit log, and entries no longer hold an IP address.

* refactor(mcp): rename set_row_colours to add_row_colours

It adds to the colours a view has, while set_view_sorts replaces the sorts.

* fix(mcp): stop set_view_sorts deadlocking with a new sort

A new sort checks its view when it commits, which the view lock blocked while
the sort rows it needed were held. Sort writers now share a weaker view lock.

* fix(mcp): title add_row_colours Add row colours

* refactor(mcp): merge search_audit_log into list_audit_log

The two differed only by a text query and a 90 day cap. Timestamps now need an
offset, as nothing tells MCP the user's timezone.

* feat(mcp): let a date filter carry its timezone

MCP has no timezone for the user, so relative date modes would follow UTC. An
offset can't express those, so the caller names the IANA timezone.
2026-11-04 14:05:50 +01:00
Peter EvansandJeremie Pardou 5e271e22c9 feat: add permanent workspace invite links (#6521)
* feat: add permanent workspace invite links behind the rbac_improvements feature flag

* feat: ask logged-in users to confirm before joining a workspace through an invite link

* feat: make the invite link code length configurable with a default of 12 and a minimum of 7

* feat: let admins name invite links so they remember what each one is for

* feat: show only the invite path in the link column to make room for the name

* fix: harden invite links and let people sign up through them with single sign-on

* fix: ask people who sign up through an invite link with single sign-on to confirm joining

* feat: let invite links raise a member's role after they confirm, without ever lowering it

* fix: move shared clipboard helper into core

* fix: validate workspace invitation link roles

* refactor: share confirmation modal across core features

* refactor: use literal frontend translation keys

* fix: label invitation route Invite links

* fix: copy invitation links when clicking their paths

* fix: align invitation migration with latest develop

---------

Co-authored-by: Jeremie Pardou <571533+jrmi@users.noreply.github.com>
2026-11-04 08:37:21 +01:00
Davide Silvestri 4cbe4af199 feat(agent-builder): Agents reply to messages (#6466)
* feat(agent-builder): answer messages with background replies

Each message starts a core chat run that streams the configured model's reply and saves it with its turn: status, error code, model messages, usage, and the provider and model that answered. Messages record their author. One reply runs per conversation, and BASEROW_AGENT_MAX_ACTIVE_RUNS_PER_WORKSPACE caps a workspace (default 5). Copies keep turns and authors and end replies still running.

* feat(agent-builder): stream, stop and resume replies in the chat

The chat follows each reply through the core run stream, shows authors, lets the user stop a reply, resumes after a reload or in another tab, and explains replies that did not finish.

* refactor(agent): keep replies focused on chat

* refactor(agent): keep each reply's outcome on its message

A reply is an assistant message created empty with its prompt, and the run
writing it saves its text, status and error code there, replacing the turn
table. Send responses name the run they started, so a reply that ends before
the response is still followed. Retries read the run before the reply, listed
replies that still look unfinished are read again from the primary, and blank
replies are saved empty.

* feat(chat): add shared chat components

Store-free message, markdown, composer and copy button components styled
after the agent builder designs, so the Agent chat and later Kuma can share
one UI. Replies render markdown without images, which could carry
conversation data to any URL, and app links open in the router.

* feat(agent-builder): show replies with the shared chat components

Replies render in place from the conversation history under the agent's
name and avatar, with Thinking and Writing above the composer while they
run, a note when stopped and an error card when they fail. Stop stays
available while a reply runs, even when the configuration stops being
ready.

* feat(agent): hand finished replies to followers and announce reply runs

A finished run carries the saved reply as the messages list shows it, so
followers can apply it without reading the messages again. Conversations
expose the run writing a reply, and agent_conversation_updated carries that
run's id when a reply starts and null when it ends, with the conversation's
updated_on to order them, so every session can show it without requests.
A blank model answer now ends the reply as failed, and replies reuse
ChatRunStatus. Reply permission checks move to the service, sends check the
agent-builder flag, finishing a reply relies on the engine's run lock
instead of a row lock, and the workspace limit defaults to 10.

* feat(chat): share Kuma's typing and loading indicators

Kuma's bouncing dots and reasoning spinner move to core as ChatTyping and
ChatLoading, and Kuma renders them from there with the same look.
ChatComposer's status prop becomes activity and keeps focus on the input
when Send and Stop swap, ChatMessage drops its author props until
conversations can be shared, and markdown leaves mailto and other non-web
links to the browser.

* feat(agent-builder): show reply progress like Kuma and apply replies in place

A reply shows the typing dots until its first text, then a spinner beside
the streaming text. The finished run's saved reply replaces it in place, a
run's start no longer reads the messages, and a streamed chunk re-renders
only the reply being written. Realtime updates set a listed conversation's
run without reading the list again, so its dot pulses grey while it
replies, in every session, and the page drops its chat subscription when no
conversation is open.

* fix(agent): handle empty replies and legacy message retries

* fix(agent): address reply review feedback

* refactor(chat): share response UI with Kuma

* fix(assistant): separate thinking from streamed answers

* feat(chat): share message footers with Kuma

* fix(chat): keep thinking blue and streamed answers expanded
2026-11-03 17:03:13 +01:00
alamin-br 99f4f1d037 fix: download active content from secure file serve (#6562)
* fix: download active content from secure file serve

Without dl, every type was served inline, so an uploaded HTML or SVG file could run script on the Baserow origin.

* fix: download audio and video opened directly from secure file serve

The sandbox CSP left a dead player for them, and the built-in mime table made the audio entries depend on the host.

* fix: remove audio and video from the secure file serve allow-list

The sandbox CSP left a dead player for them, and the built-in mime table made the audio entries depend on the host.

* fix: download BMP from secure file serve and test both MIME tables

The production image calls BMP image/x-ms-bmp, which Chromium and WebKit download anyway.
SecurityMiddleware already sets nosniff, so the view no longer does.
2026-11-03 13:04:53 +00:00
alamin-br d5d93a12cb feat(mcp): add the dashboard tools (#6526)
* feat(mcp): add the dashboard tool groups

* feat(dashboard): share the dashboard list and create tools

* feat(dashboard): share the widget read tools

* feat(dashboard): share the widget write tools

* feat(mcp): offer the dashboard tools

* docs(mcp): list the dashboard tools

* fix(dashboard): keep chart series styles when a widget changes

Only the changed data source values are sent, and a series given at the same position keeps its id, so per-series chart types and colours survive. create_dashboards is capped at 20 names.

* fix(dashboard): address review of the dashboard tools

Chart aggregations, licence errors, series styles, clearing values, hidden items and
write permissions behaved differently from the UI and the automation tools.

* feat(assistant): let Kuma build dashboards

Kuma gets a dashboard mode with the shared widget tools, so it can add, change, read
and delete widgets and opens the dashboard after adding them.

* test(assistant): give the chart eval a premium licence

Charts need premium; without it Kuma asked about the plan instead of adding the chart.

* fix(assistant): name the tools that list dashboard and widget ids

Without them the argument fixer told Kuma to call list_dashboards, which it doesn't have.

* fix(assistant): answer dashboard questions from the widgets

Kuma sometimes added a widget or view filter to count something a chart already showed.

* fix(dashboard): address final review of the dashboard tools

A refused write kept earlier items, other users' personal views passed the check,
and broken widgets, wrong chart types and missing ids gave unhelpful errors.

* fix(dashboard): address review of the dashboard tools

The services validate the data source, Kuma creates dashboards without an
event the frontend can't handle, and the chart evals check the figures.

* refactor(dashboard): let widget types register their tool definitions

Charts and pie charts are premium, so their tool models, series handling and
series_config now live in premium instead of the open-source tools.

* fix(mcp): keep core.tools importable before Django is set up

asgi.py imports baserow.core.mcp before django.setup(), and core.mcp now
imports core.tools for its error mapping.

* fix(assistant): refresh db connections in the dashboard tools

develop now runs every Kuma toolset through AssistantFunctionToolset, which
checks the thread's database connection before each sync tool call.

* fix(dashboard): check the whole widget on partial updates

The service only checks an aggregation sent with its field, so a partial update
could save a widget that can't compute. Also restyle a chart whose series differ
from its type, and tighten the eval check for the Won count.

* test(dashboard): drop tests that only check constants and pydantic

They assert configured limits and pydantic behaviour that other tests already cover.
2026-11-03 12:52:34 +01:00
Bram d0571201ad feat: [2/5] Added semantic search vector indexing for text fields (#6450)
* Added semantic search vector indexing

* Introduced incompatible state

* Covered template scenarios

* Set data_schema in local baserow ingration

* Check if field is still enabled when updating

* Update docs about env var hash change

* Added enterprise query test

* Fixed index name
2026-11-03 11:41:13 +01:00
Przemyslaw Kukulski 2f17b58e1c feat: download a user template (#6477)
* feat: download a user template

* Review feedback

* Review feedback 2
2026-11-03 07:49:04 +01:00
Davide Silvestri 362f690b9e feat(chat-runs): per-run-type limits and a core run stream (#6454)
* feat(chat-runs): limit active runs per run type, per user or workspace

Each run type now counts only its own runs. The per-user limit keeps its default of 2, and a run type can add a per-workspace limit.

* feat(chat-runs): follow any run over one core streaming endpoint

GET /api/chat-runs/<run_id>/stream/ relays the output of any run type behind its read check. Helm and the install guides route /api/chat-runs/ to the ASGI service; the guides also gain Kuma's /assistant/ route.

* feat(chat-runs): read the core run stream by default in the frontend

The base ChatRunType reads the core stream, applies the resume baseline and retries once after a token refresh.

* refactor(chat-runs): expose the output fold for lost runs

Run types rebuild a lost run's partial text from the buffered output with fold_output.

* perf(chat-runs): send heartbeat records and skip repeated run reads

While no output arrives, an open stream sends run.heartbeat as a JSON
record, so a follower can tell a quiet stream from a stalled one. The stream
view hands follow_run the run state it read for its permission check,
finish_run returns the ended run instead of letting callers read it again,
and a lease renewal takes one statement while the run goes on. The
per-workspace limit hook receives the workspace, so a run type can set the
limit per plan.

* perf(chat-runs): follow runs from their open stream in the frontend

The store reads a run's status only while it has no stream or the stream
lost its output, and restarts a stream that stays silent for 15 seconds,
also after the computer slept. Following a run opens its stream directly,
and Stop doesn't read a run whose stream is open. Each run type keeps one
chat subscription, released with unsubscribeFromChat; refreshChat runs only
when a subscription is confirmed on a new websocket, and window focus or a
regained network only re-attach followers. The developer guide documents
the subscription and heartbeat contract.

* perf(chat-runs): write a reply's first words at once

- The journal writes output after a quiet moment at once and batches
  what follows, so the first words no longer wait for the 250 ms timer.
- The stream adapter settles when aborted. Chrome can fire the last
  progress event after the request is done, where aborting fires no event.
- A stream refused with 503 is retried with the next status check
  instead of spending every reconnect attempt at once.

* refactor(chat-runs): register the stream route by URL name
2026-10-30 10:35:50 +01:00
Jérémie Pardouandpeter_baserow 5ebc98d3c6 feat: block untrusted content in builder and automation imports (#6457)
Co-authored-by: peter_baserow <peter@baserow.io>
2026-10-29 11:08:35 +00:00
alamin-br 440a949339 fix(assistant): stop Kuma runs failing on dropped DB connections and tool errors (#6517)
* fix(assistant): stop Kuma runs failing on dropped DB connections and tool errors

Kuma runs failed on dropped DB connections, link fields to non-text primaries and taken page paths, which made up most production failures.

* fix(assistant): address review on Kuma run failures

Health checks for DATABASE_URL configs, readable link examples without DISTINCT, a reused /login page, and error telemetry without provider bodies.

* fix(assistant): address second review on Kuma run failures

Login form set up on any reused /login page, lighter link examples, no refusal text in telemetry, guarded nested toolsets and title cleanup that keeps title characters.
2026-10-28 17:34:34 +01:00
Peter Evans dbde9e5161 feat: configurable body size and rate limits for HTTP triggers (#6518)
* feat: configurable body size and rate limits for HTTP triggers

* fix: keep default throttles on HTTP trigger and release slots for unknown uids
2026-10-28 14:51:05 +00:00
alamin-br ba24b135b2 fix: rotate refresh tokens and revoke the session when an old one is reused (#6519)
* fix: rotate refresh tokens and revoke the session when an old one is reused

A refresh token could be replayed to get new access tokens until it expired,
so a leaked token gave access for up to seven days.

* test: mint the refresh token inside the frozen time

The token was minted at the real time, so refreshing at an earlier frozen time failed once the clock passed it.

* fix: document the rotated refresh token in the token refresh response

The schema checked simplejwt's own rotation setting, which is off, so the API docs left out refresh_token.

* fix: keep the user session valid across refresh token rotation

The previous release crashed on the new cookie payload, and the cookie stopped
working as soon as its refresh token rotated.

* test: sign out through the API in the secure file serve test

Signing out revokes the session, which is what the user session cookie checks now.
2026-10-28 13:39:52 +01:00
Bram 8353d65c5f refactor: [1/5] Prepare for semantic search (#6470)
* Made pending search data updates reusable

* Added field extension hooks

* Moved embeddings and text chunking to core

* Fixed feedback
2026-10-28 10:03:02 +01:00
Peter EvansandJeremie Pardou 31552d5e97 feat: show who effectively has access in the share dialog (#6463)
* show who effectively has access in the share dialog

* optimise the effective access query

* add a loading spinner for the effective access too

* fix: navigate inherited access within the sharing modal

* fix: restore invitation popup and scrollable access lists

* fix: return accurate team counts in scope access lists

* refactor: centralize subject avatar rendering and styling

* fix: keep team counts in field permissions and restore template icons

---------

Co-authored-by: Jeremie Pardou <571533+jrmi@users.noreply.github.com>
2026-10-27 14:19:07 +00:00
alamin-br 583ebf9f83 feat(mcp): offer Kuma's automation tools (#6469)
* feat(automation): share the workflow and node read tools

MCP clients can find automations and read workflow graphs; workflows and nodes in another workspace are not found.

* feat(mcp): label the automation tool groups

* feat(automation): check automation formulas without a model

Adds the workflow and node definitions to core so MCP can use them, with a formula check that needs no model.

* fix(assistant): repair automation formulas after the nodes are written

The model ran inside the write transaction (#6297), and Kuma's own write path didn't scope nodes and tables to the workspace.

* feat(mcp): offer Kuma's automation tools

* docs(mcp): list the automation tools

* fix(automation): report values the node tools can't set

These values were dropped or misapplied without telling the caller, who then assumed they were set.

* fix(automation): keep node formulas runnable and updates non-destructive

A ref in a previous_node path broke the workflow at run time and on import, and a typo in an update wiped a working value.

* fix(automation): store the email body type as a choice

The quoted value made emails go out as text/'html' and left the editor without a valid choice.

* fix(assistant): let repaired formulas name nodes by their ref

The generator sees each node's ref, but the repair write refused a formula that used it.

* fix(assistant): stop repairing automation formulas when cancelled

A cancel during the model call still wrote that node's formulas.

* fix(assistant): keep a cancel and each field's repair apart in formula repair

A generator error after a cancel was logged as a failed repair, and a missing field kept every repaired row value in formula_errors.

* fix(automation): report a row_id or values a new row node can't take

add_nodes dropped them silently where update_nodes reports them, so a create_row with a row_id looked like it acted on that row.

* fix(automation): refuse a formula path the node doesn't output

A condition like get('previous_node.<trigger>.Priority') parsed, so it was stored and its branch never matched. Kuma used to rewrite every condition, which hid this.

* fix(automation): report what the node tools drop or misplace

Values a node type takes no part of, a branch on a node that isn't a router, a repeated field and unchanged nodes were all reported as done. Text naming previous_node was read as a node path, and the builder lost its loose formula detection.

* test(assistant): add evals for changing existing workflows

The automation evals only created workflows, so add_nodes, update_nodes and delete_nodes were never exercised against a model.

* fix(automation): list branches by label and keep a branch sent without a condition

In the evals the model passed a branch uid as previous_node_ref, and listed unchanged branches in update_nodes without a condition, which was refused.

* fix(automation): leave formula text in string literals alone

Paths and $formula: inside quoted text were checked and rewritten as code.
Field names are accepted in row paths since the row services read them too.
A whole value written as one call with a space before ( is a formula again.

* fix(automation): reload the graph after a node change rolls back

The request's cached graph kept the rolled-back change and the next node saved it.
A node given twice in update_nodes had its first formula repaired over the second.
An email's body_type was reported as not set although it was.

* fix(assistant): list nodes Kuma repaired in updated_nodes

A node only the repair changed came back missing, so Kuma retried the update.
The evals also check the email is still connected to the trigger.
2026-10-26 16:43:44 +01:00
alamin-br be799d43d2 feat(mcp): share Kuma's table, field and view tools with MCP (#6442)
* feat(database): share field tools and store raw formulas without a model

MCP and Kuma need one definition of the field tools, and the MCP path has no model.
Kuma repairs invalid formulas after the shared call, outside the transaction.

* fix(assistant): run formula repair after the table transaction commits

Tables and fields are now created by shared core code in one transaction, and
Kuma repairs invalid formulas only after it commits. Closes #6297 for database.

* fix(database): save each field in its own savepoint

A database error on one field aborted the whole transaction, losing the other fields in the call.

* feat(mcp): offer Kuma's table, field and view tools

MCP clients get the field and view write tools Kuma uses, built from the same
functions, and the disabled core table and field tools they replace are gone.

* fix(database): reject bad select filter values and check every view first

A string select value made an empty filter and an int one an internal error.
A missing view left the filters of earlier views saved, so a retry duplicated them.

* refactor(database): share list_tables between MCP and Kuma

MCP gains Kuma's name filters and keeps its list output; Kuma's not-found
hint now only names and counts databases the user can see.

* refactor(database): share get_table_schema between MCP and Kuma

MCP now gets Kuma's field details (option IDs, lookup through and target,
array formula type) and keeps its old keys; Kuma reshapes the same result.

* feat(mcp): share list_applications between MCP and Kuma

Kuma's list_builders pages instead of silently stopping at 20.
list_databases stays as an alias because existing connections allow it.

* fix(assistant): keep generated formulas out of Kuma's table schema

The shared schema sends MCP the formula of lookup, count and rollup fields,
as before; Kuma only showed it for formula fields.

* test(mcp): pin that stored tool lists can't hold removed or re-enabled tools

Every write path has checked names against enabled tools since allowed_tools was
added, so no data migration is needed.

* docs(mcp): list the shared database tools in the test plan

* fix(database): log unexpected field tool errors and hide their message

The per-item loops sent raw exception text to MCP clients and never logged it.

* fix(database): report an empty formula in formula_errors

It used to fail later with "retry later" advice that Kuma's fixer never saw.

* fix(database): create the filters of all views in one transaction

An error on a later view left the earlier filters saved, and a retry duplicated them.

* fix(database): store form settings and skip view filters Baserow refuses

A form view filter or a field option error failed the call unreadably, form submit
settings were dropped, and date, boolean and select filter values were stored as
something other than what the response echoed.

* fix(database): lock updated fields and drop models cached in a rolled back item

update_fields merged select options from an unlocked read, and a failed item or a
denied table could leave the request's cached table model ahead of the database.

* fix(database): look up through the link field a lookup names

through_field was taken for a table id, so the lookup failed or linked a new field
to the wrong table, and a link field created for a lookup went unreported.

* fix(database): report a refused primary field name with the table's name

A reserved, blank or too long primary_field_name failed create_tables with
"Internal error.".

* fix(mcp): list only databases with list_applications

The tool sits in the database read group, so it must not list builders,
automations or dashboards until their groups exist.

* fix(assistant): leave empty formulas to the user and note every unrepaired one

The fixer invented a formula for a field that had none, and a permission denial
while repairing dropped the notes for the formulas still invalid.

* fix(database): validate a form view's redirect URL like the REST API

The public form navigates to it after submit, so a javascript: URL ran in Baserow's
origin. Also stops catching filter errors this path can't raise.

* fix(database): match a lookup's through_field name ignoring case and spaces

Select labels are matched that way, so link field names now are too.

* refactor(database): move user_error_message next to the shared tools

The table tools imported it from the MCP services, which is a layer above them.

* fix(database): echo no value for a relative date filter that ignores it

The response showed a value Baserow never stored for modes like today; it now
reports null with a note.

* fix(database): match reused table field names ignoring case and spaces

"email" against an existing "Email" was reported missing, and next_steps led to a
near duplicate field. Also tests a blank primary field name over MCP.

* fix(mcp): let list_tables and get_table_schema ignore unknown arguments

They are legacy default tools and ignored extra keys before, so existing
clients that send them got errors.

* fix(database): lock field updates in table and field id order

Two calls locking the same fields in opposite order could deadlock when waiting
for locks instead of failing with a conflict.

* fix(assistant): drop models cached in a failed formula repair

The repair savepoints could leave the request's table model ahead of the
database, like the shared loops did before.

* fix(database): lock all updated fields up front and apply them in order

Sorting the updates broke a rename followed by a formula using the new name; the
fields are now locked in id order first, and a lock conflict reads like REST's.

* fix(database): make gte and lte view filters include equal values

The aliases mapped to strict comparisons, so a row equal to the value was left out.

* fix(database): skip link_row view filters without a row id

A missing or non-numeric value was stored and matched every row.

* fix(database): skip number view filters without a number

A missing value was stored as "None", which hides every row.

* fix(database): use UTC in date view filters when the profile has no timezone

The filter stored "None" as its timezone and matched no rows.

* fix(database): limit view names in create_views to 255 characters

A longer name reached the database column and failed as an internal error.

* fix(database): reject select options that share a value on create

Tools pick options by value, so the second of two such options could never be
matched. update_fields already rejected them.

* fix(database): match a reused lookup's link field name like creation does

Creation ignores case and outer spaces after an exact match, so the reused table
check reported a lookup through "projects" as wrong when its link is "Projects".

* fix(database): only skip a requested field named exactly like the primary field

Field names are unique only when they match exactly, so a requested " Name " next
to the primary "Name" was dropped without a word.

* fix(database): reject a table name several tables in the database share

Table creation reused the last such table while a link picked the first, so the
link could point at another table than the response reported.

* fix(database): create lookups after every requested table has its fields

Fields were added table by table, so a lookup of a field in a later table of the
same create_tables call failed.

* fix(database): skip a requested field named like the primary in another case

Clients vary the case of the primary field name, so an exact match created a
second "name" next to "Name". Spaces still count, as on develop.

* fix(database): resolve linked table names among the tables the user can see

A hidden table of the same name made a link ambiguous, and the error revealed it.

* fix(database): store an empty value for empty and not empty number filters

* docs(mcp): list_applications lists databases only

* test(assistant): add formula and lookup evals for Kuma's database tools

* test(assistant): expect an empty value for empty number filters

* feat(database): look up through the table's only link field when none is named

Kuma often leaves the link out of a lookup and retries after the validation error.

* fix(assistant): keep a later formula update and stop repairing formulas when cancelled

* fix(database): take the filter timezone from the tool context, not the user profile

An actor such as an Agent has no profile.

* docs(database): explain a lookup to a formula of a later table

* fix(assistant): repair the formula of the update that failed

Formula errors from update_fields carry the index of their update, so the
repair no longer matches on formula text. A later update that sets the formula
to None leaves it unchanged and no longer skips the repair.
2026-10-23 15:54:16 +00:00
Przemyslaw Kukulski 48e666c34c feat(update-user-template): Update a user template's details and content (#6428) 2026-10-23 09:57:34 +02:00
Jérémie PardouandTsering Paljor 4049b1a391 feat: support most of field types in grouped data source (#6392)
Co-authored-by: Tsering Paljor <tsering@baserow.io>
2026-10-22 16:48:31 +02:00
Peter Evans 5c4828d7ae fix: admins should not be able to exclude themselves (#6373)
* v1 of the ADR

* fix: admins can no longer be locked out of databases, tables or views

* ADMIN direct role assignments take priority at their level, and at their descendants.

* fix: lock inherited admins in the new share dialog and show admin explanations in full
2026-10-22 12:10:59 +01:00
alamin-br 0f165f83a4 chore(deps): bump Node.js to 24.22.1 (#6449)
Node.js October 2026 security release fixes HIGH severity issues in 24.x.
2026-10-21 15:45:54 +00:00
alamin-br 6b20dcc391 fix: limit password reset and verify email requests (#6441)
* fix: limit password reset and verify email requests

Anyone could flood an address with reset emails, and parallel requests got past
the verify email limit. Adds a per-recipient reset limit, a per-IP limit on both
endpoints, and makes the rate_limit decorator atomic.

* fix: keep reset and verify email limits separate

Both senders were named send_email, so they shared one rate limit bucket per user.

* fix: make the per-IP email limit opt-in and name rate limits

Behind nginx and Caddy every caller shares one IP, and behind an appending
proxy the caller picks it, so the IP limit now needs BASEROW_THROTTLE_IP_ENABLED.
2026-10-21 16:56:03 +02:00
Davide Silvestri 9eabe6b06b feat(core): add Redis-backed background chat runs (#6382)
* feat(core): add Redis-backed background chat runs

Run AI work once in Celery and follow bounded Redis Streams over HTTP. Keep
lifecycle, Stop, leases and final outcomes in Postgres without per-token writes.
Include the shared frontend follower, adapter registry, recovery API, migration,
queue/deployment wiring and adapter guide. No product uses it yet.

Part of #6346

* Remove unused chat run response header exposure

* Extract shared async streaming HTTP router

* Simplify chat run follower and group engine constants

- Check read access once when a stream opens; read run state from Postgres
  only after 5 s without output or on run.finished.
- Split follow_run into small steps around _OutputReader.
- Turn event kinds, error codes and stop reasons into StrEnums; the
  Kuma-only model_unavailable code moves to Kuma.
- Document ChatRunType hooks with param, return and raises fields.
- Add BASEROW_ASGI_HTTP_MAX_CONCURRENT_STREAMS and size the follower Redis
  pool by it.
- Give handler publish/recover calls their own event loop, so cleanup
  cannot close pools shared by HTTP followers.
- Update ADR 010 and the background chat runs docs.

* Clean up chat run interfaces and test setup

* Prune chat runs once after 7 days and skip overdue claims

- Delete each expired page with one statement. Incomplete runs get one more
  ensure_interruption_warning call first, and are deleted even if it fails,
  so run metadata never accumulates. The hook now returns None.
- Keep runs for 7 days instead of 30.
- Never claim a queued run older than NOT_STARTED_AFTER; the sweeper ends it.

* Retry brief Redis failures in chat run followers

- A connection error, or a buffer that does not exist yet, is retried with
  the same cursor, sending heartbeats meanwhile.
- run.replay_unavailable is only sent once the follower stops reading, so
  the browser can treat it as final.

* Let finished chat run output expire with the active TTL

Nothing reads a buffer once its run has finished: followers return the saved
outcome first and recovery only reads running runs. Drop finish() and the
24 h TTL, so a finished buffer expires an hour after its last append.
_publish_terminal now reuses _publish.

* Run the chat run scale tests on fakeredis

Build the buffer's real read and write pools on fakeredis connections, so
these tests always run and backend CI needs no Redis service. The Kuma e2e
tests cover a real Redis.

* Address the remaining chat run review comments

- Serialize the saved outcome after the transaction, so only a failed save
  is logged as one.
- Make the primary-pin test transactional; inside the test transaction the
  router always used the primary, so it could not fail.
- Cover the race past the per-user lock, a lost run after Stop and an old
  writer appending to a recreated buffer.
- End the admission test's request with a disconnect, so a regression fails
  instead of looping.
- Document that one worker process runs AI replies one at a time.

* Move the chat run migration after develop's core 0130

* Log only the class of an outcome serialization error

* Test that the run deadline asks a run to stop

* Keep a run's status when a resumed follower rebuilds its output

* Note that slow DNS lookups turn off a run's live output
2026-10-21 14:52:59 +02:00
Peter EvansandJeremie Pardou a36e7e3688 feat: implementing the new invite-to-scope feature. (#6361)
* Implementing the new invite-to-scope design and functionality.

* Simplifying the invitation acceptance, we don't need the redirect.

* Fix the action type description

* Addressing my own review feedback, and making sure the workspace invitation form behaves like the scoped one.

* Further tweaks after testing edge cases manually

* Lint fix

* Taking a DRYer approach to validating the subject chips.

* Lint fix

* Addressing feedback

* fix: block invitation batches containing invalid emails

Malformed addresses could be silently cleared after a partial batch send.
Keep them visible and block submission until corrected or removed.

* fix: respect workspace invitation permission in scope sharing

Scoped Admins could attempt email invites denied by workspace permissions.
Gate new-email invitations while keeping existing subjects assignable.

* feat: unify workspace and scoped access lists

Workspace and scope lists duplicated markup and lacked consistent controls.
Share rows, add workspace edit/cancel actions, and cap lists at six rows.

* fix: reconcile invitation branch with develop

Develop enables agents and adds an Enterprise migration at the same number.
Align invitation subjects and renumber the branch migration after develop.

* refactor: resolve workspace user roles in the backend

The frontend duplicated the backend mapping from basic roles to RBAC roles.
Expose role_uid in user payloads and reuse it for inherited access counts.

* fix: validate invitation emails before submission

The permissive database validator let malformed invitation addresses reach the API.
Use the existing strict validator for email suggestions, chips, and batch submission.

* fix: align invitation input focus styling

The invite input used a gray border tied to whether suggestions were open.
Use the standard blue border with focus-within so Escape preserves the focus highlight.

* feat: limit email invitation batches

Large invitation batches can exhaust the sending allowance partway through.
Default to five new emails per batch, configurable, with a message before submission.

* feat: let roles declare the invitation default

RBAC invitations should default to Viewer without Enterprise-specific logic in core.
Let role types declare the default: Member for basic workspaces and Viewer for RBAC.

* refactor: keep invitation role semantics in their owning modules

Core invitation UI should not interpret Enterprise role IDs or depend on Database roles.
Move basic roles to core and let Enterprise supply invitation subtitles through role metadata.

---------

Co-authored-by: Jeremie Pardou <571533+jrmi@users.noreply.github.com>
2026-10-21 13:33:41 +01:00