Commit Graph
674 Commits
Author SHA1 Message Date
Davide Silvestri e7fae94fa1 chore(deps): upgrade Pydantic AI to 2.77.0 and refresh the AI model picker (#7002)
* chore(deps): upgrade Pydantic AI to 2.77.0

* test(agent): cover updated provider error handling

* test(assistant): locate tool results alongside availability updates

* feat: keep older OpenAI and Anthropic models in the picker

* fix: use SDK retry causes in Kuma evals and clarify model discovery

* feat: preserve historical AI provider model suggestions
2026-12-03 11:13:02 +01:00
Davide Silvestri f5bc919473 feat(celery): make every task work on a threads worker, and use one in dev (#6926)
* chore(dev): run one threads Celery worker with beat in dev

The Docker and native dev stacks start a single Celery worker for every
queue, with redbeat embedded, instead of a worker, an export worker and a
beat process. It uses a new ThreadsPool that sends worker_process_init, so
telemetry and the lazy import check still run under the threads pool.

* fix(ws): stop closing every event loop's Redis pools after a broadcast

send_messages_to_channel_group called channel_layer.close_pools(), which
closes the pools of every event loop, including the ones other worker
threads are still sending with. Under the threads pool about a third of
broadcasts failed with "attached to a different loop" and some hung.
channels_redis now closes a loop's pools itself when that loop closes.

* fix(telemetry): keep Celery trace context per thread on threads workers

The Celery instrumentation keys a running task's span, context token and start
time by the task's id. A task replaced with self.replace(), like every
automation node, keeps its id, and on a threads worker the replacement can
start in another thread before the original ends. The original then ended the
replacement's span and detached its context from the wrong thread, logging
"Failed to detach context" and leaving its own context on the thread. That
state is now kept per thread.

* feat(celery): enforce soft and hard time limits in ThreadsPool

Celery's own threads pool ignores soft_time_limit and time_limit, so on a
threads worker tasks that rely on them would run on. ThreadsPool now raises
the limit in the task's thread, only while that task runs, so a limit never
reaches the next task of the thread. EMAIL_TIMEOUT stops a silent SMTP server
from blocking a worker thread forever.

* fix(chat-runs): cancel a run that keeps going after its deadline

The deadline only asks a run to stop. A run whose tools or provider call
ignore that request now gets 60 more seconds, is then cancelled, and is saved
as timed out. Celery's limit moves after that, so the run's own stop always
comes first. On a threads worker this is the only way to end it, because a
time limit can't reach a thread waiting inside async_to_sync.

* fix(premium): share one capped thread pool across AI field generations

Each generation started its own pool of
BASEROW_AI_FIELD_MAX_CONCURRENT_GENERATIONS threads, so a threads worker
running several jobs multiplied the threads and model calls. All generations
in a process now share one pool of that size. A prefork process runs one job
at a time, so nothing changes there.

* feat(celery): cancel queries at the hard limit and report overdue tasks

ThreadsPool checks every running task's time limits from one watchdog thread,
like the prefork pool's timeout handler, instead of starting timer threads
for each task. At the hard limit it also cancels the query the task's thread
is running, which the limit's exception can't interrupt.

A thread can't be killed, so a task still running 60 seconds after its hard
limit is reported to Sentry instead. Every limit reached is counted in
baserow.celery.task.time_limit, per task and limit.

* fix(airtable): time out requests to Airtable

Two Airtable import requests had no timeout, so a server that stopped
answering held the import, and on a threads worker its thread, forever. All
Airtable requests now use the same 3 minute read timeout.

* fix(celery): load sentry_sdk only when reporting an overdue task

The overdue report imported sentry_sdk at the top of baserow.config.celery,
which every process imports, so it was loaded even with Sentry off.

* chore: add a changelog entry for the Celery task timeouts

* fix(celery): raise threads pool time limits at the task's next query

An exception raised into a thread from outside can land right after a lock
is taken and before the code that releases it, leaving the lock held for
every thread of the worker. The pool now marks a reached limit and the
task's own next query raises it, once, through a connection execute
wrapper. The hard limit still cancels the running query, and raises
TimeLimitExceeded whatever the soft limit is. Limits end before Celery's
success callback runs. Savepoint queries are never interrupted, through
a helper shared with the periodic field update deadline.

* fix(celery): apply the worker default time limits on the threads pool

Celery passes CELERY_TASK_SOFT_TIME_LIMIT and CELERY_TASK_TIME_LIMIT to the pool and None per task when a task sets no limit. The prefork pool falls back to the pool's values; the threads pool now does too.

* fix(celery): keep threads pool time limits until running tasks end

The watchdog stopped before on_stop waited for the running tasks, so a task passing its limit during a warm shutdown was never stopped or reported.

* chore: name the emails the SMTP timeout covers in the changelog

EMAIL_TIMEOUT applies to the instance's own emails only. Automation and builder SMTP steps already time out after 30 seconds.

* chore(dev): drop dev.sh tabs for the removed Celery workers

The export and beat services are disabled, so attaching to them made the script exit before opening the remaining tabs.

* test(celery): cover thread time limits and savepoint rollback

* fix(ai): use one generation slot for nonpositive limits

* fix(chat): warn that an action may finish after a reply times out

* docs(celery): explain which timeout guarantees require prefork

* docs(celery): record the threads pool decision and task contract

* fix(chat): keep the worker slot until started tools finish

* fix(chat): warn visitors about repeating a timed-out request

* docs(chat): clarify when the stop grace period begins
2026-12-03 09:39:52 +01:00
Davide Silvestri b2af957de0 feat(analytics): record where each change comes from (#6986)
* feat(analytics): record where each change comes from

Every action event sent to PostHog carries `action_source`: browser, api,
mcp, assistant, agent, automation or builder. Actions by an identity are
now sent without a person profile instead of being skipped.

* fix(analytics): report application builder changes as application

* style: format the action source test

* fix(analytics): report agent row actions as agent from their dispatch context

* fix(analytics): send no email with events of identities

* refactor(analytics): one name for the action source and no email for identities by default

* feat(analytics): keep the starting channel on jobs and label scheduled and public changes

* chore: remove the local venv link

* chore: drop the changelog entry

* fix(analytics): keep the source on exports, MCP connects and button clicks

* test(analytics): cover the dispatch context labels and public-view exports
2026-12-03 08:23:38 +00:00
Peter Evans 557135532c chore: call workspace applications builders and name the builder role (#6948)
* chore: call workspace applications builders and name the builder role in English copy

* chore: say who can configure a builder instead of naming the builder role next to it

* test: expect the reworded Slack bot warning

* chore: name roles the same way everywhere and say builder in snapshot errors
2026-12-02 08:55:45 +00:00
Peter Evans 86168f17e3 fix: ignore malformed WebSocket messages instead of closing the connection (#6921)
* fix: ignore malformed WebSocket messages instead of closing the connection

* fix: refuse unstorable page strings and clean page ids by default

* fix: match page unsubscribes on their channel group
2026-12-02 08:54:47 +00:00
Bram 59fab074b5 Updated descriptions for 3.0 (#6979) 2026-12-01 20:37:32 +00:00
Bram 9d3d657b56 Prepare for 3.0.0 (#6961) 2026-12-01 19:18:09 +00:00
Przemyslaw Kukulski f01dce307f chore: remove the agent-builder and user_templates feature flags (#6960) 2026-12-01 19:56:53 +01:00
Bram cf0ec8e797 Latest translations for 3.0 (#6955) 2026-12-01 17:04:28 +01:00
Peter EvansandJeremie Pardou d7e2c3f635 chore: remove core and WAB feature flags shipping in v3 (#6903)
* chore: remove core and WAB feature flags shipping in v3

* docs: drop stale feature flag mentions from invitation link comments

* docs: add missing changelogs for released core features

* docs: mark identities ADR as accepted

* chore: remove the identities feature flag

* docs: add changelog for workspace identities

* test: remove obsolete identity feature flag test

* docs: remove stale identities feature flag references

---------

Co-authored-by: Jeremie Pardou <571533+jrmi@users.noreply.github.com>
2026-12-01 16:01:14 +00:00
Peter Evans ba7a06521e fix: stop reporting handled AI provider errors to Sentry (#6761) 2026-12-01 12:22:17 +00:00
Przemyslaw Kukulski 67101593d4 fix: apply view field visibility to ad hoc filters, sorts and aggregations (#6913) 2026-11-30 17:07:59 +01:00
alamin-br 65df28def4 fix(assistant): tell the formula generator which fields it left out (#6925)
A missing formula added no feedback, so every retry read the same prompt and the
final error said nothing.
2026-11-30 15:56:47 +01:00
alamin-br 2686fb21a9 fix(agent): show held calls in full, name option renames, stop replies on trash (#6909)
* fix(agent): show held calls in full, name option renames, stop replies on trash

Approvers saw cut previews of what was sent, option renames hid the rows they
change, and trashing an agent left its running reply going.

* fix(agent): let a removed member's running reply finish

Removal now only blocks the member's next send or approval, so an accidental
removal doesn't leave a partial result that won't resume.
2026-11-30 14:24:03 +00:00
Przemyslaw Kukulski 06ba01b67a fix: user templates leave out synced table settings, shared links and mentions (#6837) 2026-11-30 13:33:30 +01:00
alamin-br aed826c2bd fix(agent): encode public chat slug, linear web fetch strip, trigger reasons (#6897)
* fix(agent): encode public chat slug, linear web fetch strip, trigger reasons

Crafted public chat links could reach other API paths, and a page of unclosed
script tags took minutes to strip. Triggers without a message now say why they fired.

* fix(agent): keep custom elements in web fetch, validate public chat slug route

Address review: one list of row trigger types, <svg-icon> isn't stripped as <svg>,
and an invalid public chat slug 404s before any API call.
2026-11-27 16:14:05 +00:00
Peter Evans 1e7ae9deb8 feat: list every invitation link of a workspace in the workspace settings modal (#6802)
* feat: list every invitation link of a workspace in the workspace settings modal

* fix: show the table of view invite links, keep the list steady while searching and wrap its header
2026-11-27 17:16:07 +04:00
Tsering PaljorandJeremie Pardou 250748c8dc feat: Workspace level integrations (#6547)
* Add ADR-013 for workspace level integrations

* Add implementation

* Improve context section and remove technical points

* Move bulk replacement point to v2

* Remove workspace-level ownership on import since manual promotion should handle this.

* Add a glossary section

* Do Lazy creation + Celery migration

* Remove demotion

* Tighten the Options considered section

* Add Decision describing where the integrations are managed

* Update implementation plan after changes to ADR

* Sync plan and adr

* Rename adr and implementation

* Add the shared application that owns workspace integrations

* Create the shared application of every workspace

* Let only workspace admins manage workspace integrations

* Let applications use the integrations of their workspace.

* Trash workspace integrations in their workspace.

* Copy workspace integrations into exports and keep them in duplicates.

* Workspace admins can share integrations with every application in the workspace.

* Load the shared application of each workspace in the frontend and keep it out of application lists.

* Manage workspace integrations from an Integrations page in workspace settings.

* Offer workspace integrations in the integration dropdowns of every application.

* Move promoted integrations to the workspace list in other open tabs.

* Let admins make an app's integration available to the whole workspace from its integration settings.

* Preselect a workspace integration for new nodes and data sources when the app has none of its own.

* fix tests

* Delete implementation file

* More fixes after rebase

* Fix tests

* Let builders of an application see and use the workspace integrations from it.

* Show the workspace integrations, read-only, in the integration settings of applications.

* Keep a dashboard's integration out of promotion to the workspace.

* Leave the shared applications out of the admin dashboard's application count.

* Create the shared application of the workspaces made by the fill commands.

* Say in the promotion modal that an integration nobody authorized will run as the promoting admin.

* Say in the promotion modal that undoing it won't make the integration run as the previous person again.

* Ignore integration ids in sample data when publishing copies the workspace integrations an app uses.

* Let only undoing a promotion move an integration out of the workspace.

* Let the shared application backfill stop itself after 5 minutes and skip workspaces another transaction has locked.

* Say in the workspace integrations settings that published applications and workflows keep their own copy until they're published again.

* Leave the shared application out of the assistant evals' application counts.

* Refresh the workspace integrations when the Builder's data, events, users and integrations panels open.

* Say that anything new using a promoted integration blocks undoing the promotion, even from its own application.

* Warn when a database button sends through a workspace integration with no host or token.

* Refuse roles and invitations on the shared application.

* Fix tests

* Show an application only the workspace integrations of types it can use.

* Say in the promotion modal what builders of other applications can do as the integration.

* Leave the shared application type out of the API docs for creating and updating applications.

* Check who receives a workspace integration event in one permission call.

* Say which workspaces have a shared application and who creates it.

* Let a redone promotion record what uses the integration again.

* Update docstrings

* Stop template visitors from listing the integrations of the template's workspace.

* Let database buttons find their own copy of a workspace integration after an import.

* Say what holds the workspace row lock while a shared application is created.

* Fix tests

* Stop the workspace integration form component from being made reactive.

* Make test runs use a new copy of the workflow after an integration it uses changes.

* Hide the Members settings tab from members who can't list the workspace members.

* Add changelog

* Fix migration conflict

* Fix migration conflict

* Fix test

* Update comments and ADR number

* Link to the workspace integrations from the sidebar's Settings menu.

* fix: refresh agent action errors when workspace integrations change

* fix: move workspace integrations into workspace settings

* fix: use share icon for workspace integration promotion

* refactor: use explicit shared application relations

* feat: centralize default integration selection

* refactor: share integration change notifications

* refactor: prepare integration mappings before import

* refactor: collect integration references during export

* refactor: prepare integration ownership changes without a new hook

* test: restore registered service model after mocking

* test: cover shared integration defaults in Builder

* test: include Slack in Agent workspace integration choices

* Fix migrations

* Stop template visitors from listing the workspace integrations through an application of the template.

* Only offer integrations of the user source's integration type when updating a user source.

* Say the workspace integration copy means published Application Builder apps and automation workflows.

* Use the same spacing under both integration settings sections and enlarge their headings.

* Keep the shared application out of automatic snapshot schedules.

* Fix test after rebase

---------

Co-authored-by: Jeremie Pardou <571533+jrmi@users.noreply.github.com>
2026-11-27 15:49:32 +04:00
Davide Silvestri 2659033445 feat(agent): website widget channel (#6884)
* feat(agent): serve a website widget channel and its embed script

A website widget is a public chat a website opens in a panel from a
button. Its model extends the public chat's with the button's text and
corner and never has a password. GET /api/agent/public-chat/<slug>/widget.js
returns the button's script with the widget's settings written in,
cached for five minutes. ADR 016 records the decision.

* feat(agent): add website widgets in the Channels section

Channel types now come from a frontend registry: "Add channel" opens a
menu of them and each card shows its type's form. The website widget's
form has the embed code and the button's text and corner, and shares the
title, welcome text and appearance with the public chat. Embedded in the
widget's panel, the chat page fills it with its background, keeps text
readable on a dark one, and asks the widget to close on Escape.

* fix(agent): copy only a channel type's own settings

Export and import copied the public chat's appearance fields for every
public chat type, so an imported widget kept a background it can't show
or change. Each type now lists its appearance fields once, and copies use
that list; the password follows the same rule. The widget's chat URL is
built with get_embedded_share_url, so a share URL ending in / works.

* test(agent): run the widget script on another website

An e2e test embeds the widget on a page from another origin, with markup
as the button text and title, and checks both show as text and the chat
opens in the panel.

* fix(agent): backend default button text, focus the channel menu, keep widget names visible

A new widget gets its button text from the backend only, as one created
through the API does. "Add channel" moves focus into its menu like the
other menus, and a card's type label gives its space up before the name.
A test covers choosing Automatic to clear a colour.

* fix(agent): visible hover without an accent, no suggestions while a message is locked

Without an accent colour the chat's buttons darken on hover as the
member chat's do, and custom accents get the stronger hover again. The
member chat hides suggested messages while the message box is read-only
for a pending or failed send, since a click couldn't change it.

* test(agent): serve the widget test's website on loopback

CI's Chrome blocks a public page's scripts from loopback, so the routed
website never loaded the widget.
2026-11-27 10:53:47 +01:00
Davide Silvestri 9e93fb8e36 chore(agent): keep agent tool approvals visible and show failure details to builders (#6883)
* fix: keep agent approval controls visible on every pending call

* fix: show private tool failure details to agent builders

* fix: align approval buttons and wrap them as a group

* fix: highlight failed tool calls and show the reason on demand

* fix: preserve native disclosure buttons in tool history

* fix: label the batch action Always approve all

* fix: simplify approval rows and open tool errors in a context

* fix: give the always approve action more room

* fix: show failed tool calls once in approval cards

* feat: show live tool execution status in agent conversations

* fix: align tool status icons across approval rows

* fix: shorten batch button to Always approve

* fix: explain future tool access in approval tooltips

* fix: right-align tool statuses with trailing icons

* fix: match the tool spinner to the status icons

* fix: give approval buttons equal widths

* fix: explain email failures at the agent boundary

* fix: map known integration failures to safe agent messages

* fix: wrap tool statuses and refresh private diagnostics on demand

* fix: order the agent diagnostics migration and verify finish payloads
2026-11-27 10:20:12 +01:00
alamin-br 3276ed06fb fix(agent): stop tool calls on Stop, always allow app tools, name databases on cards (#6890)
* fix(agent): stop tool calls on Stop, always allow app tools, name databases on cards

Stop is seen only on the 2 s lease poll, Always allow skipped connected-app
tools, and same-named tables and rows looked identical on approval cards.

* fix(agent): give every named row its id when row labels repeat

A row named like another row's label could still read the same.

* fix: address review on agent stop, MCP always allow and database names

Refused calls show as not run, Always allow on MCP tools respects switched-off
servers and tools under lock, and more presentations name the database.
2026-11-27 10:09:24 +01:00
Peter EvansandTsering Paljor 0545545bca fix: improve integration validation (#6875)
* fix: improve integration validation

* Add regression test

---------

Co-authored-by: Tsering Paljor <tsering@baserow.io>
2026-11-27 09:08:15 +00:00
Davide Silvestri 992054e30f feat(agent): suggested messages and public chat appearance (#6874)
* feat(agent): suggest messages to start a conversation with

An agent gets up to four suggested messages, edited in its Instructions.
A new conversation shows them as cards, on the agent's page and on its
public chat, and a click puts the message in the box, ready to send.

* feat(agent): let builders style their public chat page

A public chat gets a font, an accent color, a plain or gradient
background and a "Powered by Baserow" switch, set in its card. The page,
password screen included, uses them; the core chat styles take their
accent from CSS variables so the page only sets the color.

* feat(agent): introduce an empty public chat with its title and welcome text

An empty chat shows a mark in the accent colour, the title, the welcome text and the suggested messages in the middle, like the member chat. The header with the title only appears once a conversation exists.

The welcome text is rendered as markdown on the server, so it no longer appears after the page has loaded.

* fix(agent): fall back to a generic font family on the public chat

A quoted generic family is read as a font name, so the page showed a serif font until the chosen one loaded.

* feat(agent): keep a public chat's appearance on a copy

A duplicated, restored, exported or templated agent's public chat keeps its font, colours, background and Powered by switch. A value from a file that the API would refuse falls back to the default.

* fix(agent): check an imported agent's suggested messages

A file could carry suggested messages the API refuses, and a value that isn't a list broke the workspace's application list. An import now keeps them only when the API would accept them. The copy tests also cover suggested messages and a user template.

* fix(agent): give public chats a neutral default appearance

* fix(agent): label suggested messages and cover when they can be used
2026-11-26 20:42:31 +01:00
Peter EvansandJeremie Pardou 5a62c876e4 fix: align custom code in builder Preview with the editor on shared hostnames (#6881)
* fix: restrict editor-written code in the builder editor and on the editor hostname

* fix: simplify builder author code restrictions by hostname

* refactor: remove redundant backend custom code hostname checks

* refactor: unify builder HTML element rendering restrictions

* refactor: clarify builder web frontend hostname terminology

* fix: distinguish untrusted builder content in preview notices

* refactor: remove unused backend preview security setting

* docs: shorten builder code restriction changelog

* fix: restrict iframe cookie access across frontend ports

* refactor: share web frontend hostname matching

* fix: preserve protected HTML interactions and bound iframe height

---------

Co-authored-by: Jeremie Pardou <571533+jrmi@users.noreply.github.com>
2026-11-26 17:20:44 +00:00
alamin-br 724ca69647 fix(agent): small Agent Builder fixes from the launch review (#6871)
* fix(agent): small Agent Builder fixes from the launch review

Imported actions ask first, SECRET_KEY_FALLBACKS is read, signed links keep their query,
Gemini retries transient errors, approval cards stop saying 'by you', and agent-builder turns identities on.

* test(assistant): turn identities off by having no flags

The agent-builder flag now turns identities on as well.

* fix(agent): address review of the launch quick fixes

Key fallbacks are JSON arrays, Gemini retries once per Kuma call, and an
imported action must carry the service its type runs.
2026-11-26 15:21:58 +01:00
Davide Silvestri dcf2ce57b4 feat(agent): let people outside Baserow talk to an agent through a public chat (#6864)
* docs(agent): add ADR 016 on agent channels

A channel is a place outside the agent's own page where people talk to it and get its replies. It is its own concept beside triggers: a trigger reacts once to an event, a channel carries a conversation that continues.

* feat(agent): add channels and replies with no member behind them

A conversation a channel started is shared, has no owner and holds visitor messages. Its replies run on the channel's authority and stop once the channel is off, trashed or deleted. A reply that can call tools keeps its text out of the stream, so nothing written before a tool call reaches a visitor. Members can read such a conversation, filter for it and decide its held calls, but not write in it.

* feat(agent): add channel types, the visitor service and the channels API

Channel types are a registry and each type keeps its own data in a subclass. Builders list, add, change and delete an agent's channels, with audit actions and trash. One service holds everything an anonymous visitor may do.

* feat(agent): add the public chat channel with its visitor API

A public chat is a page with its own link and an optional password. Anyone with the link talks to the agent through an anonymous API that shows a message's text only; a signed token says which conversation is theirs.

* feat(agent): show visitor conversations to members

A conversation a channel started reads "Started by a visitor" in the list and can be filtered. The visitor's messages sit on the right under their label, and the composer gives way to a note, since members don't write in it.

* feat(agent): add the public chat page

The page a visitor opens from the link: the title and welcome text, the conversation, and a password form when the chat is protected. It keeps its tokens in local storage and recovers a reply through one sync path, so it never stays on the typing dots.

* feat(agent): add the Channels section to the agent configuration

A builder adds a public chat, copies its link, sets a title, a welcome text and a password, switches it off or deletes it. The link and password controls match the ones shared views and dashboards have.

* feat(agent): edit the public chat's welcome text with the rich text editor

The card shows the text formatted while it is written and saves it as markdown. The public page shows it read-only with the same component, so the builder sees what the visitor gets.

* feat(agent): give channels and visitor conversations their own icon

The person icon marks a private conversation and the globe the HTTP trigger, so channels use two bubbles: a conversation with someone outside the workspace.

* fix(agent): harden public chat replies, sends and exports after review

- A reply that can call tools keeps no draft: when it fails, is stopped or
  waits for approval, the visitor sees nothing rather than text it wrote
  before a tool call.
- One rule decides whether a channel can be used, for the visitor API and
  for the worker before a reply starts or resumes, licence included.
- Visitor sends can be repeated safely. A lost first message is recovered
  only with a secret key the page generated, never with ids members can read.
- Visitor conversations never become template examples, even when pinned.
- Visitor responses are never cached, and passwords are taken exactly as
  typed when set and when checked.

* fix(agent): harden the public chat page and Channels section after review

- The page sends a secret key with the first message and ids with the next
  ones, so a resend after a lost answer runs nothing twice, and shows each
  message once.
- It asks for a password when the chat became protected, retries a failed
  first load with backoff while saying so, and shows a stopped reply.
- The password modals wait for the server before the switch changes.
- In a workspace without Advanced or Enterprise a card only allows switching
  the chat off and deleting it.
- The welcome text is checked against its limit before it is saved.
- In a visitor's conversation the reject dialog says the visitor may see the
  reason, and the conversation filter is named Channels.

* fix(agent): fit the Permissions section description on one line

* fix(agent): open a protected public chat only once the server grants access

The page took a stored token as proof of access and guessed a refused one
from an empty title, so a failed info request after the password showed a
blank chat. The info endpoint now says whether the request has access, and
the page shows the chat only on that answer.

* fix(agent): open a protected public chat without flashing the password form

The server renders the page without the visitor's token, which only the
browser keeps, so a saved session showed the password form until the info
reloaded. The page now shows neither the form nor the chat until the
browser has checked its stored token.

* fix(agent): read the public chat from the primary database

A replica can lag behind a chat that was just switched off or given a
password, so visitors could keep using it until the replica caught up.

* fix(agent): cap the length of a public chat password guess

* fix(agent): back off syncing a public chat reply that waits for a member

A reply can wait for approval for hours, so the visitor page now checks
less often, up to once a minute, and right away when the tab is shown.

* fix(agent): refuse an agent message's uuid sent again by a visitor

A visitor and the agent both write without a sender, so a visitor resending
an agent message's uuid and text got it back as accepted, with no reply
after it, and a 500. The retry now also needs the role of the sender.

* fix(agent): keep syncing a resent public chat reply that waits for approval

A resend can get back a reply without a run, which opened no stream and
started no sync, so the page never showed the decision. Following a reply
now syncs whenever no stream follows it.

* fix(agent): send a heartbeat for each run record a visitor can't see

During a long tool run the visitor's stream dropped every record, so the
page saw nothing, reconnected every 15 seconds and replayed the hidden
records each time.

* fix(agent): word the approval and workspace access instructions for visitors

They told the agent that the reader approves held calls and can restore the
Run as identity, which is wrong for a visitor and shares internal
configuration with them.

* feat(agent): copy channels switched off with a link of their own

A copy of an agent now keeps its channels, so a builder doesn't have to set
them up again, but none answers before a member turns it on, and each gets
a new link. Only a duplicate or a snapshot restore keeps a public chat's
password; file exports and templates leave it out. Copied visitor
conversations stay on the copied channel.
2026-11-26 11:26:08 +00:00
alamin-br 274e05e900 feat(agent): connected apps as cards, with an on/off switch per app (#6870)
* feat(agent): let editors switch a connected app off

An app can be paused without losing its tool choices or sign-in.

* test(assistant): switched-off apps still count as acting without asking

* feat(agent): edit connected apps inline as cards

Matches how triggers and actions are added, edited and collapsed.

* feat(agent): show connected app tool details as in the new design

* fix(agent): fit connected app cards in a narrow configuration panel

* fix(agent): explain failed app removals and keep tool descriptions readable

Also ignores repeated switch clicks while one is saving.

* fix(agent): stop switched-off apps mid-reply and let a waiting sign-in be cancelled

A reply checks the app is still on before each call; Cancel stays usable while the provider popup is open.

* fix(agent): keep a reply going when the app switch can't be checked

A failed check is a tool error, a removed app says so, and the refused call counts as not run.

* fix(agent): keep connected app cards in step with the server after review

Updates of one app go one at a time, untouched fields follow other editors, and the badge, switch and remove confirmation show the real state.

* fix(agent): keep a card's save buttons and badge right while saving

Covers a second submit, a key the new authentication drops, and a refused key cleared by a later refresh.
2026-11-26 12:04:31 +01:00
Peter Evans dafe8ebf2e fix: leave unused service fields out of every agent trigger (#6876) 2026-11-26 10:53:20 +00:00
BramandDavide Silvestri 0efdf44427 Added additional actions and email trigger to agents (#6866)
* Added additional actions and email trigger to agents

* Made delete row id required and share outcome

* Default formula handles text and html

* Made the email trigger and list rows labels a bit more generic

* Remove AI prompt and start workflow actions

* Added create, update, and delete permissions check

* Give correct action name to Kuma

* Add view, field and aggregation to tool call

* Prefetch query for row aggregate to reduce queries

* Implemented tool presentation for each type

* Made semantic search extend LocalBaserowAgentActionType

---------

Co-authored-by: Davide Silvestri <silvestri.eng@gmail.com>
2026-11-25 21:52:04 +01:00
Davide Silvestri 638d7236c3 feat(agent): let triggered runs ask a person (#6812)
* feat(agent): let triggered runs ask a person

A trigger-started reply gets a built-in ask_person tool when the trigger's
may_ask_person is on (default). The call is held like an ask-first call:
the run pauses, counts as going for the overlap rule, and resumes with the
answer of someone who may approve tool calls, or is told nobody will
answer when the question is dismissed. Unattended replies are told that
nobody reads them and whether they may ask; follow-ups keep the
outside-data instruction. Later replies replay each decided question and
its answer as plain turns in their history.

* feat(agent): answer an agent's question in the conversation

A held ask_person call shows as its own card with an answer field, Send
answer and Dismiss, kept out of the approval card's batch actions. Only
people without the approve permission see it read-only. The trigger card
gets a switch to let the agent ask a person, and approval wording now
covers questions too.

* test(agent): cover asking a person end to end and record it in ADR 014

* refactor(agent): build the question tool like web fetch and tell it from actions

The question tool is a plain Pydantic AI tool in agent/tools.py that the
reply runner wraps in a FunctionToolset, like web fetch. A held call is a
question only when it has no tool key, so an action saved as ask_person
before the name was reserved keeps its normal approval. History prefetches
only the decided questions, and the pending approvals menu links to the
conversation only for a pending question.

* test(agent): cover Ask first in a triggered run end to end

With changes set to not ask first, a triggered run creates a database without waiting; turned back on, the same run waits for approval and finishes once approved.

* test(agent): open the Triggers section in the ask-a-person spec

The section was renamed on develop.

* fix(agent): keep web search off next to the question tool on older Gemini

Gemini before 3 refuses web search next to function tools. The question
tool now counts as one, so a triggered run that may ask a person no longer
sends both, gets a 400 and records a failed search on every run.

* fix(agent): keep the ask-a-person switch of a license-locked trigger read-only

The API refuses the change like the trigger's other locked settings, and
the card makes the section inert and the switch read-only, like the
overlap rule.

* fix(agent): reserve the web_fetch action name

An action named web_fetch on an agent with web fetch on gave two tools
with the same name, so every reply failed when its toolsets were built.

* refactor(agent): drop the special case for an action named ask_person

Agents are behind a flag with no production users, so the name is simply
reserved like the other built-in tools: a held ask_person call is always
a question, on the backend and in the conversation.

* fix(agent): answer a waiting question after asking is turned off

ask_person now defers its call, and the resumed run gets the answer, or
the dismissal note, as the call's result. Turning the trigger's switch off
only stops new questions, instead of telling the agent that an answered
question is no longer allowed while the card shows it as answered.

* fix(agent): decide calls held with a question from the pending approvals menu

The question shows as its link row to the conversation, and the other
held calls stay in a card below it, so they can still be approved or
rejected from the menu.
2026-11-25 17:17:04 +00:00
Davide Silvestri eeca9ec5ee feat(agent): allow the tools an allowed tool requires (#6865)
Each Agent tool declares the tools that give the model an input it can't
get otherwise, like get_table_schema for create_rows. Saving allowed tools
without them is refused, Kuma refuses such a grant, and the tool permissions
modal allows them along with the tool and locks them while it is allowed.
Each section of the modal gets a Select all and Deselect all button.
2026-11-25 16:44:05 +01:00
Peter Evans 6e51666634 feat: show the workspace role "No role" members get through their teams (#6801)
* feat: show the workspace role "No role" members get through their teams

* feat: show the team role of No role members in an icon tooltip

* refactor: share the visible teams check of effective access
2026-11-25 14:22:28 +00:00
alamin-br ce51a44852 refactor(agent): type the exported identity format and carry the importer in the config (#6850)
* refactor(agent): type the exported identity format and carry the importer in the config

Follow-up to the review of #6807. The cleanup of a failed import stays out of
the delete action, because a builder may import but not delete identities.

* fix: derive the file importer from the user, and test the import cleanup and modal line

import_multiple_applications took the importer from two places that could disagree.
The discard test now checks the extension hook and the signal; the modal spec checks the rendered line.
2026-11-25 11:39:12 +01:00
Davide Silvestri 16dbb0690f feat(agent): configure who can chat, approve and continue triggered runs (#6826)
* feat(agent): configure who can chat, approve and continue triggered runs

Approving held tool calls and continuing a conversation a trigger started
become their own operations. With RBAC, an agent's Permissions section
sets who may chat, approve and continue: a lowest role, specific people
or teams, or nobody. Without RBAC every member chats and approves, and
nobody continues. The owner of a private conversation can ask others to
approve its held calls, and leave it to them.

* feat(agent): let everyone in a private conversation leave it and name who stopped a reply

Anyone asked to approve can now remove a private conversation from their
own list; only its owner deletes it for everyone. Once the owner has
left, the last person to leave deletes it for good, as only an owner's
trash may list a private conversation. A reply someone else stopped says
who stopped it.

* fix(agent): close the gaps a security review of participation found

Keep a triggered conversation's opening message untrusted when a person
continues it, audit changes to who can chat, approve and continue, and
require being able to chat to ask others to approve. People asked to
approve follow runs only while they may read the conversations, the
approver picker scans at most a thousand members, and the permission
object lists only the agents the person may see. A reply whose sender
was deleted can still be resumed by someone asked to approve it.

* docs(agent): add the participation test plan with its results

Cover every participation setting, asking others to approve, leaving a
private conversation and stopping replies, with the outcome of the e2e
run and the findings of the security review.

* fix(agent): address the review of participation permissions

- Name only people's messages to the model: a trigger's opening message
  no longer reads as written by a deleted user.
- Check the approver candidates in one pass, so the number of queries
  doesn't grow with the workspace.
- Show the read-only note only to who can't write in a conversation.
- Take a person who leaves the workspace out of the conversations they
  were asked into and the rules naming them, and delete the conversations
  nobody is left in.
- Record a rule change and its audit entry in one transaction.
- Refuse a custom approve rule nobody named in it could use.

* docs(agent): update the participation test plan after the review
2026-11-25 09:24:20 +01:00
Davide SilvestriandBram Wiepjes 68139d057c feat(agent): add semantic search as an agent action (#6814)
* feat(agent): add semantic search as an agent action

An agent's builder can add the enterprise semantic search service as an
action: the model supplies the query, the builder picks the Local Baserow
integration, table and fields. The search runs with the integration's
authority.

An action type now says whether it changes data. A type that only reads
starts with Ask first off and is never held behind another held call.

Every registered action type is offered, also when the workspace's license
locks it. A locked type shows the upgrade modal instead of being added, and
a locked action can only be renamed, switched or deleted until its type is
usable again. The model never gets a locked action.

* Fixed some bugs

* Run action with workspace identity

* fix(agent): keep a search match whose files or links don't fit

A row whose non-text values took more than the space left could not be cut,
so the result lost it and every row after it. Values that don't fit are now
cut to "…" like texts, so the best match is still read.

* test(agent): cover the semantic search card acting as the run identity

The spec still expected the removed integration picker. It now checks the
form gets the tables the run identity can read, the link to set up workspace
access without one, and the reload when the identity changes.

* fix(agent): don't offer action inputs in search filters

A filter is resolved when the call is sent, without the call's inputs, so
picking an input there only produced a configuration error. A host can now
narrow what filter values read, and the action card offers them none.

* refactor(agent): name the workspace check of an action type is_usable

available_action_types now lists the locked types too, so is_available named
the opposite of what it returned for them.

* refactor(agent): one limit on what the model reads of an action result

HTTP request and semantic search each defined the same 20,000 characters.

* refactor(agent): drop what the integration picker of actions needed

No action wraps its form anymore and Agents no longer hold Local Baserow
integrations, so the presenter hook and the test changes for them go.

* docs(agent): actions on Baserow data act as the Run as identity

State the rule for every action whose service reads or changes Baserow data:
no integration to pick, permissions on the identity alone. Actions on other
services keep their integration. Drop the integration and form wrapper parts
that no longer hold, and say how to bound a result.

* fix(agent): log why a tool or run failed in debug mode

Tool, preview, step, web fetch, trigger message, MCP and chat run failures
logged only the exception class, so a failed semantic search showed nothing
but its name. They now share the reply's helper, which adds the exception
text in debug mode.

---------

Co-authored-by: Bram Wiepjes <bramw@protonmail.com>
2026-11-24 19:37:22 +00:00
Bram 1df4f9b44d Add workspace context menu hook and permission prefetching (#6822) 2026-11-24 19:56:15 +01:00
alamin-br c1192f03bf feat(assistant): let Kuma build, edit and test Agents (#6828)
* feat(assistant): let Kuma build, edit and test Agents

Kuma gets an Agent mode with tools to list, read, apply and test Agent
setups. A change that widens what an Agent can do (a new identity, a tool
that changes data, turning off ask first, web fetch or an enabled
trigger) pauses the run behind an approval card, the same way the Agent
Builder does. The user's decision resumes the run. Approvals don't expire
and new messages wait until the card is decided.

Test conversations are marked with AgentConversation.is_test and force
ask first on every tool that changes data.

Adds the kuma-agent eval dataset; the eval harness approves each card and
resumes the run.

* fix(assistant): rename an Agent when Kuma edits its name

apply_agent_setup ignored the name on edit but reported a change.

* fix(assistant): report Agent refusals to Kuma instead of failing its run

AgentNotReady, trigger and action refusals and a too long name escaped the
tool as exceptions, so the whole chat run ended as failed.

* fix(assistant): schedule Kuma's Agent triggers in the user's timezone

Schedules were saved in UTC while Kuma spoke in the user's local time, and
the approval card didn't say when the Agent would run.

* fix(assistant): only let Kuma give an Agent an enabled model

Kuma saved any model name and called an Agent with no usable model ready.

* fix(assistant): keep a paused turn's calls when its resumed run fails

A resumed run that failed, was lost or never started rebuilt the history
without the paused run's calls and said nothing had changed.

* fix(assistant): keep a paused answer's sources when its run continues

The continued run replaced the message's artifacts, dropping the sources
found before the pause.

* fix(assistant): find a waiting card's message without its prediction

Unrated predictions are deleted after 30 days, so deciding an older card
failed and left the chat blocked.

* fix(assistant): only tell Kuma about Agents when it can build them

With the agent builder flag off, the prompt and switch_mode still offered
Agent building that no tool could do.

* fix(assistant): give Kuma an Agent change's real revert

The read setup didn't fit apply_agent_setup, so reverting dropped fields,
and added triggers, actions and identities can't be removed.

* fix(assistant): check an Agent's schedule before asking to approve it

A schedule under the minute minimum or with an unknown timezone showed on
the card and only failed once approved.

* fix(assistant): drop the approval request once a continued run stops

A continued run that failed kept asking for approval above cards that
were already decided.

* fix(assistant): stop waiting for an Agent test reply when Kuma is stopped

The wait held the worker for up to 20 seconds after the user stopped Kuma.

* fix(assistant): only suggest other search types when nothing matched

An empty later page said nothing matched although earlier pages had results.

* fix(assistant): keep a saved approval when following its run fails

A failure after the decision was saved reset the card to pending, and a
card decided elsewhere stayed wrong until a reload.

* refactor(assistant): pass the resumed run to the agent pass explicitly

Reading it back from an attribute hid which runs continue a paused one.

* feat(assistant): ask before changing an unattended Agent's instructions

New instructions steer what an Agent with a turned on trigger does to data
with nobody watching, when it has a tool that changes data without asking.

* fix(assistant): show the new instructions on their approval card

The card asked the user to approve instructions it didn't show.

* fix(assistant): keep the paused turn when a continued run fails early

A continued run that failed before its agent pass saved a history of only
the closing note, losing the prompt and earlier turns.

* fix(assistant): put the tool approval migration after develop's 0077

develop added its own enterprise 0077 migration.

* style(assistant): format the approval card message list test

* refactor(assistant): build Agents without Kuma approval cards

Approval cards for Kuma's tools move to their own PR. Until then Kuma can't
make an Agent run by itself: triggers start off, new tools that change data
ask first, and web fetch and edits to a running Agent stay with the user.

* fix(assistant): make Kuma's Agent setup safe without approval cards

With no card to confirm a change, the defaults are the only guard: tools are
granted one by one, a new identity gets the lowest role its tools need, and
refusals say what the user's role allows.

* fix(assistant): stop Kuma building a second Agent under an existing name

Eval runs built a duplicate Agent when asked to test or edit one by name.

* fix(assistant): address review of Kuma's Agent tools

Closes the ways a call could get past the running-Agent rule or overwrite what the user saved, and makes each Agent tool say which role it needs.
2026-11-24 19:44:26 +01:00
alamin-br 1106a141fc feat(agent): carry identities in templates and import/export (#6807)
* feat(agent): skip Agents when importing with the feature flag off

* feat(agent): use an enabled model when an imported Agent's model isn't available

* feat(agent): keep an imported Agent's tool choices until an identity is picked

* feat(agent): tell the editor an imported Agent's tools turn on with an identity

* feat(agent): let template previews read an Agent's configuration

* feat(agent): show Agents in the template preview

* fix(agent): check the configuration permission when copying an Agent into a user template

* fix(agent): let signed out visitors preview an Agent in a template

* fix(agent): sync a template again once its Agents can be imported

* fix(agent): make an installed Agent's data-changing tools ask first

* fix(agent): list only MCP servers as connected apps in the template preview

* test(agent): cover blank imported models and duplicates without their identity

* fix(agent): keep pending tools when tools are saved without an identity

Tools stay off without an identity, so a full-config save from an API client
shouldn't throw away the choices an imported Agent is waiting to apply.

* fix(agent): fail a template install when every application is left out

With the agent builder flag off, a template holding only Agents installed
nothing yet reported success and counted the install.

* fix(agent): say why a template with nothing to install fails

"The content of the template was removed" sent people looking for a broken
template when the real cause is a feature turned off on this instance.

* docs(agent): say a user template copy refuses an Agent the owner can't read

* fix(agent): import Agents for users granted the flag

Feature flags can now be granted per user, so the import checks the user it's for instead of only the instance.

* fix(agent): sign up with a template of only Agents while their flag is off

The signup install raised TemplateHasNothingToInstall and returned a 500 without creating the account.

* fix(agent): refuse a user template when none of its applications can be copied

An owner without the Agent flag got an empty template that no one could install.

* fix(agent): refuse a user template that would leave out a selected Agent

A mixed selection lost its Agents without notice, and every update lost them again.

* fix(agent): skip templates with nothing to install in fill_workspaces

* feat(agent): create a scoped identity for each Agent a template installs

An installed Agent waits for an identity before its tools work. An admin with
roles can now get one per Agent at install, with access to only the template's
databases, instead of picking a workspace-wide identity by hand.

* fix(agent): name the applications a user template can't copy

The job failed with a generic message, and checking before the copy creates nothing.

* fix(agent): don't offer hidden applications to export or save as a template

Agents without their feature flag were listed, so Select all always failed.

* chore(agent): log the templates fill_workspaces skips

* fix(agent): filter pickers by type availability, not by permissions

Permissions can load after the update form preselects, which dropped builders and automations.

* fix(agent): keep the count check after a user template copy

* fix(agent): don't count unusable applications as template content

* feat(agent): offer a scoped identity per Agent when installing a template

Only shown where the installer has roles and may create identities and assign
their roles, so the default flow stays as it was everywhere else.

* fix(agent): skip the identity when a template installs no database

An identity scoped to nothing can't run the Agent's tools, so it's left waiting for one to be picked.

* fix(agent): audit binding an installed Agent to its new identity

The Agent gets the identity's access, so the bind is recorded like one made by hand.

* fix(agent): import Agents whatever the importer's feature flags

A user's early access must not change what an import saves. Agents are
now kept by template sync, template installs, user template copies and
workspace file imports, so someone who gets the flag later finds them
with their configuration. Also moves is_template_storage after the
existing ImportExportConfig fields, so positional arguments keep their
meaning.

* fix(agent): hide Agents in template previews and install toasts without the flag

The preview opens another application when the preferred one is a hidden
Agent, and the install toast links to the first application the user can
see.

* fix(agent): hide the identity option for a template without databases

The backend skips the identity when nothing would grant it access, so the option did nothing.

* feat(agent): let builders scope template identities and keep their roles

Builders install templates but can't create identities, so a narrower permission covers one with no workspace access and a role only on what they installed.
Templates now carry the application roles of an Agent's identity, so an install recreates them.

* feat(agent): offer template identities to builders for any application

The identity now gets a role on every application of the template, not only databases.

* fix(agent): recreate only builder or viewer roles from a template identity

An exported role list is now applied exactly, so an empty one no longer falls back to access on every application, and malformed entries are skipped.

* fix(agent): only skip role permissions when scoping template identities

Licence, subject and scope checks still run, an identity that would get no
role isn't created, and expected failures are logged as warnings.

* fix(agent): keep the identity roles of a user template's Agent

The template copy of an Agent waits for an identity, so its export dropped
the roles it was imported with and installs fell back to tool-based roles.

* fix(agent): hide unreadable roles of an Agent waiting for an identity

An export by a user leaves out the carried roles they can't read, like
those of a bound Agent's identity.

* fix(agent): create no install identities while the Agent builder is off

The installer can't see the Agents or manage their identities then.

* fix(agent): recreate exact template identity roles on install

Editor and commenter roles are kept, admin only when the installer may change roles.
Agent-only templates get an identity without access; names with links get none.
Identities are created through a scoped identity action; unexpected failures reach Sentry.

* fix(agent): show the full install identity option and what it gets

The option wraps instead of being cut, explains the identity's access, and shows for Agent-only templates.
The user template form no longer says the Agent identity roles aren't copied.

* fix(agent): never export more identity access than the template had

An application with table or view roles, or roles the exporter can't read, is left out, so the install gives no access to it instead of the tools' defaults.

* chore: renumber the install template job migration to 0144

Develop added 0142 and 0143 core migrations.

* feat(agent): export the identity of an Agent as an object with a key

Other application types can refer to the same identity later, and Agents
that ran as one identity share the new one an install creates.

* feat(agent): carry identities in templates and exports as workspace objects

Identities are described beside the applications and created before them, so
rows, view owners and filters that point at an identity keep pointing at one.
Creation needs no install option, since identities take no license seat.

* fix(agent): renumber the identity definition migration to 0023

* fix(agent): make the identity definition migration follow 0022

* feat(agent): let applications report and bind the identities they refer to

An identity keeps the role it had on its workspace instead of a role guessed
from its Agent's tools, and an application can refer to several identities.
Also carries team and per-application roles, and Agents with only triggers.
2026-11-24 19:14:28 +01:00
Peter EvansandJeremie Pardou c152a16f92 feat: let Kuma create, change and remove data source filters from the filter form, the chat and MCP (#6544)
* feat: let Kuma create, change and remove data source filters from the filter form, the chat and MCP

* fix: allow earlier data sources in Kuma builder filters

* refactor: share targeted Kuma action endpoint

* refactor: derive service filter validation from filter types

* fix: reuse shared boolean values in service filters

* refactor: expose filter deprecation on backend types

* refactor: delegate formula examples to application types

* fix: allow Kuma to edit summary widget filters

* test: include summary widgets in filter tool contract

* fix: allow dashboard service filter groups

* test: allow dashboard filter groups in assistant prompts

* feat: enable inline Kuma for summary widget filters

* test: initialize roles for transactional synced table copies

* fix: reject table changes during Kuma filter generation

* fix: reject current node formulas in service filters

* perf: batch filterable data source discovery

---------

Co-authored-by: Jeremie Pardou <571533+jrmi@users.noreply.github.com>
2026-11-24 18:08:58 +00:00
Peter Evans fa3b7af1ea fix: notify automatic snapshot failures only when the error changes (#6848) 2026-11-24 16:05:56 +00:00
Jérémie Pardou 69b3668236 fix: enforce remaining template content rules for apps, automations and dashboards (#6838)
* fix(integrations): remove response headers from sensitive exports

* fix(builder): exclude sensitive SAML login settings from exports

* docs: mark independent template webhook addresses as implemented

* fix(integrations): sanitize member filters in sensitive exports

* docs: record existing external reference import protections

* docs: reconcile implemented template content rules

* fix(automation): reset externally imported workflows to draft
2026-11-24 15:23:55 +01:00
Peter EvansandJeremie Pardou 95b892af41 feat: add automatic snapshot schedules (#6746)
* feat: add automatic snapshot schedules

* fix: show the count in relative date labels

* refactor: rename snapshot allowance setting to workspace

* feat: notify workspace admins when automatic snapshots fail

* feat: show the last automatic snapshot execution per application

* fix: simplify snapshot modal layout and capacity feedback

---------

Co-authored-by: Jeremie Pardou <571533+jrmi@users.noreply.github.com>
2026-11-24 14:12:03 +00:00
Peter Evans 2ecccbfbc0 feat: show what each pending invitation is for in the invite modal (#6800)
* feat: show what each pending invitation is for in the invite modal

* feat: label pending invitation targets and role columns
2026-11-24 13:32:51 +00:00
Davide Silvestri 64824fce04 fix(assistant): background runs review follow-ups (#6764)
* fix(assistant): keep the onboarding run to the tab that started it

A duplicated tab copied the onboarding run id from sessionStorage and opened
the first table too. The id now lives in memory like the tab id and is stored
only while the page goes away, so a reload still opens the table.

Part of #6763

* fix(assistant): return a message refused by the run limit to the input

The refused message stayed in the chat with an error on every attempt while
the input was empty. Its text now goes back into the input, also for prompts
typed outside the panel, and the chat shows a single notice until the next
message is sent.

Part of #6763

* docs(assistant): flag the chat status as deprecated in the API schema

Part of #6763

* fix(assistant): clear the tab’s onboarding run on cancellation

* test(assistant): expect the run limit outcome after an early stop
2026-11-23 16:30:00 +00:00
Davide Silvestri 114e0a04c8 feat: trigger automations and agents when a row comment is posted (#6787)
* feat: trigger automations and agents when a row comment is posted

* fix: verify row comment trigger access at setup and dispatch

* refactor: pass the trigger event source as a plain task argument

Drop the Celery headers and the per-type flag kept for the previous
release's workers: Agent Builder is behind a feature flag. A service type
names what it watches through get_event_source_id. Check a table's
trigger read permissions in one call, add the trigger's msgid and
shorten the changelog entry.

* feat: lock agent triggers the workspace's license doesn't cover

The configuration lists every trigger type the instance offers, and the
license is checked apart. A locked trigger shows switched off with
read-only settings that open the upgrade modal; it can still be renamed,
replaced by another type or deleted, and resumes once coverage returns.
Menus mark paid items with the lock badge, in Agents and Automations.

* address feedback

* fix: address second round of row comment trigger feedback

- Treat an integration the service list loads as None as trashed
- Restore a locked trigger as it was; license checked on edit and fire
- Drop a queued event whose trigger watches another source, no skip
- Disable the mention checkbox when the host's form can't be used
- Fence the comment event text as labelled JSON for agents
- Mention the license in the trigger API docs and error

* fix: address third round of row comment trigger feedback

- pass the run identity's name to the comment form from the agent host
- keep only server-decided data in service form choices
- log comments a misconfigured comment trigger skips
- mention the license in the remaining trigger type texts

* test: serialize comment trigger nodes with the user's table access
2026-11-23 14:58:35 +00:00
Davide Silvestri d1afcddf48 feat(assistant): stop background replies between tool steps (#6384)
* feat(assistant): stop Kuma background runs cleanly

Wire product Stop to durable cancellation, including before stream metadata
arrives. Wait for active tools to drain and keep the items they finished on both
background and existing streaming paths. Cover stopping state and retained work.

Part of #6346

* Add the background Kuma replies changelog entry

One entry for the whole stack, so it lands with the last PR.

* fix(assistant): keep completed shared tool work when stopped

* fix(assistant): honor Stop before tool dispatch and navigation

* fix(assistant): check Stop through the lease renewal before tool calls

The check read the run's idle connection, so a dropped connection failed the reply.

* fix(assistant): keep docs search working after a dropped connection

* refactor(assistant): one isStopping rule for Kuma's panel and run events
2026-11-23 14:22:01 +01:00
alamin-br 01db6a26e0 fix(automation): hide table fields from users without database access (#6738)
* fix: hide table fields from automation users without database access

A user with access to an automation but not to a database saw that table's field names and IDs in node schemas over the API and the MCP and Kuma tools.

* fix: hide table fields from automation node realtime events

Node events went to every user who may read the node with the same payload, so users without access to the node's table still got its field names.

* fix: hide test run rows of tables an automation user cannot see

Sample data holds rows keyed by field name, and Kuma's formula requests still read the schema, so both leaked a hidden table's fields.

* fix: hide automation nodes that read a table the user cannot see

Iterators, later nodes and run results carried the rows of a hidden table, and formula checks accepted any path into it.

* fix: close gaps in hiding automation data of tables a user cannot see

Some formula paths slipped past the read check, run messages and trashed nodes leaked, and reading a hidden node hid a visible table's fields.

* fix: keep hidden automation data hidden for broken formulas and past runs

Unreadable formulas made node listings fail, trashed or unreachable nodes were left out of the check, and node events did the check in the request for every node.

* fix: decide who sees test run data from the tables it was built from

Editing a formula, deleting a node or deleting a table changed what a node reads today, not what its stored data holds.

* fix: hide the message of a failed run on a table the user cannot see

The run list returned the error of the node that failed, which names the fields and values it read.

* refactor: find the nodes a formula reads with the parser in both checks

The path check and the hidden-table check disagreed on some spellings of the same get().

* fix: check the fields of a button action table like the node editor does

One owner for the check, so the two editors can't answer differently for the same table.

* test: cover test run data kept after edits, deletes and failed runs

Each case starts from a real test run, and the query counts are pinned instead of mocked calls.

* fix: decide who sees a past run from the tables it read

A run's node results and messages were checked against today's formulas, so
editing a formula or deleting the table after the run showed them again.

* fix: keep the tables of old and replayed data when deciding who sees it

Data stored before the IDs were kept, nodes replayed in a test run and start
workflow nodes still decided from the formulas of today.

* fix: fill the missing table IDs in a task after the rollout

Filling inside migrate could hold up a deploy on large history tables, and
the tested node's own history missed the tables of the data it replays.

* chore: renumber the services migration after develop's 0141

* fix: fill stored table IDs from a periodic task and hide started workflow data

Old workers dropped the fill queued at migrate, edits before it froze the wrong tables, and readers of a start workflow node's response or a router's edge label still saw hidden rows.

* fix: decide the table ID fill per workflow and fill imported workflows

A global done flag stopped protecting rows that came back without IDs, and one failing workflow kept the fill from ever finishing.

* fix: hide run results of deleted tables and keep given-up workflows editable

The fill dropped deleted tables for run history without test run data, and an edit of a workflow the fill gave up on failed.

* fix: read started workflows in batches and hide answers of deleted ones

Listing or running nodes cost queries per start step; the fill left the answers of a started workflow deleted before it visible.

* fix: read started workflows only for start steps and hide answers that lost a step deeper

Every dispatch paid for the start steps of its workflow; a table or workflow deleted in a started workflow left the answers visible.
2026-11-23 14:10:21 +01:00
Peter EvansandJeremie Pardou 2b8e6ba569 feat: add per-workspace snapshot allowances and protected snapshots (#6783)
* feat: add per-workspace snapshot allowances and protected snapshots

* fix: guard snapshot replacement and separate quota management

* refactor: delegate snapshot permission descriptions to application types

* fix: highlight inherited workspace snapshot maximums

---------

Co-authored-by: Jeremie Pardou <571533+jrmi@users.noreply.github.com>
2026-11-23 11:23:05 +00:00
Przemyslaw Kukulski d7f936c55f fix: keep a copied Local Baserow data sync synced whatever the database order (#6743) 2026-11-23 11:01:04 +01:00
Przemyslaw Kukulski 3b48ca40ad fix: copied data syncs keep their key and sync again (#6742) 2026-11-20 20:50:20 +01:00