mirror of
https://github.com/baserow/baserow.git
synced 2026-12-04 08:18:42 +00:00
stop-reporting-builder-custom-code-errors
65
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
f01dce307f | chore: remove the agent-builder and user_templates feature flags (#6960) | ||
|
|
cf0ec8e797 | Latest translations for 3.0 (#6955) | ||
|
|
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> |
||
|
|
ba7a06521e | fix: stop reporting handled AI provider errors to Sentry (#6761) | ||
|
|
9080e662ec |
chore(agent): Agent Builder analytics events for PostHog (#6914)
* feat(agent): send Agent Builder analytics events to PostHog Adds metadata-only events for the Agent Builder dashboard: agent_run_finished, agent_trigger_skipped (one per skip episode), labelled tool lists and waited_seconds on decide_agent_tool_approvals, and a content-free $ai_generation per agent model request. Tool labels never carry action or MCP tool names. Nothing is read or sent when PostHog is disabled, including the action_done receiver, which now returns early. * feat(agent): send create modal steps to PostHog * refactor(agent): drop $ai_latency and merge overlapping analytics tests * fix(agent): report every reply ending, including failures before a run |
||
|
|
e4b9a2615b |
feat: add a shared base for integrations that connect an account through OAuth (#6810)
* feat: add a shared base for integrations that connect an account through OAuth * fix: keep OAuth account scopes current and bound provider answers * fix: share parent registration between form APIs * fix: preserve refreshed OAuth tokens when actions fail * refactor: use absolute imports for parent OAuth modules * refactor: decouple OAuth cleanup from application publication models * refactor: use common import hooks for OAuth connections * fix: keep OAuth account integrations out of the workspace --------- Co-authored-by: Jeremie Pardou <571533+jrmi@users.noreply.github.com> |
||
|
|
85f9e8e67d |
[2/2] Usage credit subscription: Measure AI usage (#6823)
* Measure AI usage * Show the AI usage data of plugins per agent reply and AI values job * Fixed feedback |
||
|
|
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> |
||
|
|
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. |
||
|
|
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 |
||
|
|
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. |
||
|
|
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 |
||
|
|
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. |
||
|
|
17c1af4cc4 |
feat: show formula data as a source badge and the data it points to (#6857)
* feat: show formula data as a source badge and the data it points to * docs: add a changelog entry for the formula data redesign * test: close the data explorer before saving a button field in e2e tests * fix: keep long formula data inside the filter row and wrap its tooltip * fix: show the link styling tabs for a column just changed to a link |
||
|
|
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. |
||
|
|
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. |
||
|
|
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> |
||
|
|
de1d26dc5a | chore(agent): use existing modal styles in the Create agent wizard (#6867) | ||
|
|
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. |
||
|
|
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. |
||
|
|
28032c63d9 |
feat(agent): preview template Agents like the real page, with example conversations (#6852)
* feat(agent): preview template Agents like the real page, with example conversations A template preview showed an Agent as a plain list. Official templates can now carry shared conversations as examples, which visitors read but an install never copies. * test: list the conversations a template preview may read * fix(agent): address template preview review findings Mark pending ask-first tools in the preview, keep user-template conversations private in the core template manager, drop tool steps from example conversations, and show load errors with a retry. * feat(agent): carry pinned shared conversations as examples in exports and templates Davide and Bram chose to export user-started, pinned and shared conversations in every export and template, import them as examples, and show them in user template previews too. * fix(agent): drop the official Agent template and show preview tools read-only The template would list an Agent to every instance while the Agent builder is behind its flag. Visitors can now open the tool groups without changing them. * fix(agent): keep example conversations read-only and skip broken ones on import A message sent to an installed example would leave with the next export, so examples take none. Pinning a shared conversation now says it becomes an example. |
||
|
|
2f954bffad | Group agent right sidebar sections and change descriptions (#6861) | ||
|
|
e8e335a23d | Small agent UI/UX improvements (#6862) | ||
|
|
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 |
||
|
|
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> |
||
|
|
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. |
||
|
|
1a555ad89e |
feat(agent): share conversations with everyone who reads the agent (#6793)
* feat(agent): share conversations with everyone who reads the agent A person's conversation starts private; its owner can share it for good. Everyone who may read the agent's conversations then sees it, and anyone who may send the agent messages continues it. Messages record their sender, and a reply runs for the person it answers. The conversation list filters private and shared conversations. * feat(agent): show each conversation's state, origin and age in the list * fix(agent): address conversation sharing review Name who wrote each message of a shared conversation to the model, let the person a reply answers stop it, and say in the share dialog that only people who can update the agent rename, pin or delete it afterwards. Only the owner shares a conversation. Show a failed reply live, on a resend and with the false filter, explain why you can't send in any conversation you can only read, list a conversation again when the share or update that hid it fails, and name a deleted owner in the list. * fix(agent): polish shared messages and the conversation list Show another person's message as a grey bubble with their name inside and keep its line breaks. Keep the copy button and time closer to their own message than to the next one. In the conversation list, align the icon, lock and time with the filter and the section label, put the icon on the title line, let the options button take the lock's place instead of reserving a column, and leave a small gap between rows. * fix(agent): stop a message or a name from passing for another sender |
||
|
|
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 |
||
|
|
edce69d6fc |
feat(agent): tell why the AI provider failed a reply (#6795)
* feat(agent): tell why the AI provider failed a reply A failed reply now says when the provider refused the API key, limited requests or was unreachable. Each provider type names the failure, because Google and xAI report an invalid key as a 400. * fix(agent): name a provider failure only when it is certain - Say "couldn't be reached" only when the connection failed, not for a failure the provider reports inside a 200 answer. - Read only a 401 as a rejected API key; a 403 keeps the generic text. - Point the reader at an admin to check the key in AI providers. - Don't retry without web search when the 400 is a rejected key. * removed comment |
||
|
|
fc1131bc62 |
feat(agent): support Agents in templates and import/export (#6789)
* 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 * 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 * 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. |
||
|
|
cc361e6658 |
feat(agent): create agents with a setup wizard (#6765)
* feat(agent): create agents with a two-step setup wizard The create modal asks for a name and what the agent should do, then reviews instructions, how it starts, the identity it acts as, permissions and extras. The choices are applied through the endpoints Configuration uses; a choice that can't be applied is reported and the agent still opens. The Run as dropdown can also create an identity. Application types supply their create modal through getCreateModalComponent. * feat(agent): add tools, model and identity choices to the create wizard The wizard gains a third screen for the provider, model, reasoning effort and web search. Review can create an identity and pick tools one by one. Each suggestion now fills the whole setup: how the agent starts, its schedule, permissions, web search and actions. A new endpoint lists the tools an agent created in a workspace can be given, so they can be picked before the agent exists. The provider, model and effort fields are one component shared by Configuration and the wizard. * fix(agent): choose the wizard identity role from workspace tools * fix(agent): address create wizard review Skip locked tools in the permission presets, create the identity before the agent so a rejected name stops the wizard, number suggestion names, select the prefilled name, report models that can't search the web, show a failed tools request and fix the Read only icon. * fix(agent): address second create wizard review Give a new identity Builder when the agent may change data, reuse the identity a failed create made, explain why web search stays off and pass the workspace to the tool picker. |
||
|
|
b580793dd7 |
fix(agent): address agent builder feedback (#6781)
* fix(agent): address agent builder feedback * feat(identities): let builders bind existing identities Binding an Agent or a Local Baserow integration to an existing identity takes the new identity.bind permission, held by workspace builders and admins. Creating, editing and deleting identities stays admin-only. ADR 013 updated and trimmed of migration and deployment details. * fix(agent): show ask before changes only for the Everything preset * fix(agent): fix CI and polish the tools modal and input table Update tests for the identity bind rule and the key/value input table, keep table keys on one line, use one toggle style in the external tools modal, and apply Prettier. * fix(agent): compact the pending approvals menu Each conversation is one line: its title with an ellipsis, then Always allow, Reject and Approve. The chat keeps the full approval card. * feat(agent): make the conversation sidebar collapsible * address feedback * Added a little bit of space after the trigger --------- Co-authored-by: Bram Wiepjes <bramw@protonmail.com> |
||
|
|
d822dd067a |
feat(agent): row comment tools, with a search shared by MCP and Kuma (#6760)
* feat(row comments): search comments across a database Add RowCommentHandler.search_comments and the shared search_row_comments tool. They return the comments on the rows of a database, newest first, each with its table and row, narrowed by table, mentioned users, authors and creation time. A user is given as an ID, part of a name, or 0 for the user the tools act as. Every search is index-driven. A mention search is one query that starts from the mentions of the given users. Any other search reads the newest comments of each table from two new indexes, (table, -created_on) and (table, user, -created_on), added with RetryableAddIndexConcurrently. Comments on trashed rows are dropped after a page is read, so the result carries has_more instead of a total. list_row_comments now also returns the user_id and the mentions of each comment. * feat(mcp): expose search_row_comments Register the comment search as a read-only MCP tool in the database_read group, next to list_row_comments, and document it. * feat(agent): let a tool type be deactivated for a workspace An Agent tool type can now tell that a workspace can't use it, through is_deactivated and raise_if_deactivated, like service and node types do. A deactivated tool stays in the Agent's available tools, marked deactivated, so the client can show it as locked. It is left out of the allowed tools, so a reply never offers it, and the configuration refuses to allow it. * feat(agent): show a deactivated tool as locked in the tool permissions A tool the workspace can't use keeps its row in the Agent's tool permissions. A lock button replaces its Allow checkbox and opens the modal the tool's presentation type returns from getDeactivatedClickModal. The presets and the counts only consider the tools the workspace can use. * feat(agent): add the row comment tools An Agent can now list the comments of a row, search the comments of a database and post comments. Premium registers the three tools and their presentation. A workspace without premium sees them locked, and the lock opens the paid features modal on row comments. The core tests that pin the Agent tool names and their presentation now cover the core tools only; premium pins its own. * feat(agent): tell the model who a private conversation is with The tools of an Agent act as its identity, so the model had no way to turn "me" into a user. The instructions of a private conversation now name the person and their user ID. A conversation started by a trigger names nobody. The name is collapsed to one short line because it is user-controlled text. * feat(assistant): let Kuma search row comments Wrap the shared search_row_comments tool for Kuma, active in every mode like the other database read tools, and add an eval case that asks for the comments mentioning the user. * fix(agent): require workspace RBAC for row comment tools in Agents and Kuma * fix(row comments): accept an empty table list and odd digits in a search An empty table_ids returned no comments while the empty lists of users meant no filter. It now searches every table like an omitted one. A reference such as "²" passed isdigit() and failed in int(); isdecimal() reads it as a name. * refactor(row comments): check the searched tables in one permission call check_multiple_permissions raises the first denial itself, so the search no longer evaluates a denied table a second time to get its error. * fix(agent): refuse a deactivated tool by default A tool type that only said it is deactivated was listed as locked but could still be allowed and called. The base check now raises when the type is deactivated, as the service and automation node types do. A type can still raise its own error, like the one for a missing licence. * fix(agent): tell an Agent only about the locked tools it was allowed Every reply in a workspace without the licence carried a note about the three row comment tools, also for an Agent that never had them or has no workspace access. The note now names the tools in the Agent's allow list that the workspace can't use, and is left out when there are none. The tool type gives the reason and the handler writes the sentence. Kuma has no allow list, so its tool group keeps the sentence naming all three. * fix(agent): honor saved tool grants and row comment search permissions * fix(assistant): end a scenario's enterprise licence with its eval case A scenario's instance-wide licence stayed for every later case of the run, and the cached licence list hid it from its own case. The case's fixtures now add it, refresh the cache and remove it when the case ends. A licence that was already there is kept. * fix(row comments): cap the page of the comment tools A search without a mention filter reads the comments up to its page in every table, and a huge page overflowed the offset. Both comment tools stop at page 100, also in Kuma. * fix(row comments): read a user reference the same way in the search and its step The step of a search showed "0" when the model sent the acting user as text. The search and the step now share one parser. The description also says a name matches everyone whose name contains it. * fix(agent): make a tool's lock a button only when it explains itself A locked tool without a modal got a button that did nothing, and every locked tool kept a disabled Ask first checkbox that screen readers announced. |
||
|
|
db66e25b17 | feat: per-user feature flags for early access (#6780) | ||
|
|
a63ff419a2 |
feat(agent): let agents open web pages with any model (#6766)
* feat(agent): let agents open web pages with any model Co-authored-by: Mohammad Al Amin <alamin.baserow@gmail.com> * fix(agent): open web pages through Baserow's HTTP stack and report failures Failed fetches ended the whole reply, showed as invalid input, and files were stored whole. Pages now go through the integration HTTP limits, only text is opened, and a reply opens at most five. * fix(agent): leave scripts out of opened pages and bound their titles Script and style text made up most of what the model got from many pages. * fix(agent): refuse internal addresses when opening pages The model picks the URL and a page can steer it, so the setting that lets integrations reach internal services shouldn't apply. * fix(agent): read opened pages more safely A crafted page could still end the reply, files sent as text were read, and pages without a charset came out garbled. --------- Co-authored-by: Mohammad Al Amin <alamin.baserow@gmail.com> |
||
|
|
23f328cb19 |
feat(database): assign identities to rows and mention them in comments (#6619)
* feat(database): assign and mention identities behind a field option - Collaborator fields get `include_identities` and long text fields `long_text_include_identities`, both off by default. - With the option on, active identities of the workspace can be assigned or suggested as mentions; they are shown with their icon and renamed in realtime, and they never receive notifications. - Turning the collaborator option off backs up the column, deletes the identity assignments and strips identities from the view defaults, so the update can be undone. - Identities can author row comments and be mentioned in them. - Exports write an identity as `Name <identity>`. * refactor: hide internal emails in collaborator exports through one check * fix: import a personal view only for a person, without a query per owner * fix: show collaborator identities with the icon of the user subject type * refactor: drop a redundant local import of the core handler * fix: unify identity icons and space field options * fix: keep identity field menus and saved mentions readable * fix: limit identity mention suggestions to row comments * perf: prefetch available collaborators once per workspace * fix: use workspace members as authors of generated rows * fix: resolve linked collaborator values by member email * fix: use workspace collaborators for field pickers and paste * refactor: move identity avatar styles to the avatar stylesheet * fix: address review feedback on identity collaborators |
||
|
|
74d6625a49 |
feat(assistant): run Kuma replies in the background (#6383)
* feat(assistant): stream Kuma background replies over HTTP Behind assistant_background_runs, commit and enqueue the message then follow Redis on the existing POST/200 cumulative JSON response. Resume the same run without sending the prompt again. Keep refresh, multi-tab discovery, onboarding and durable outcome recovery in the Kuma adapter and UI integration. Part of #6346 * Remove unused Kuma chat run response header * Register Kuma with the shared async streaming router * Always execute Kuma messages in background runs * Use chat run constant enums in Kuma Kuma's model_unavailable error code moves to its own run constants, because the engine no longer defines run type specific codes. * Move the tool executor into Kuma Kuma is its only user, and it is specific to pydantic-ai agents, so it does not belong to the shared chat run engine. * Return nothing from Kuma's interruption warning hook The engine now prunes a run whatever the hook does, so it no longer reports whether the warning was kept. * Stop patching the removed ChatRunBuffer.finish * Fix and simplify Kuma's background run adapter - Save "nothing changed" when the model was unavailable or the prompt never reached it. - Keep the progress line after a reconnect and build the compatibility records from their models, with the right text for runs that did nothing. - Delete the in-request path, its cache-key Stop and the event bus. - Map a second message to 409 directly and return one run shape in the chat API. - Fix docstrings, help texts and the POST schema; drop overlapping tests and share run test helpers. * Fix and simplify Kuma's run follower in the browser - Keep local-only messages on refresh and show a queued run as queued. - Settle a request aborted before it is sent and never show raw error pages. - Fall back to the API for a new view whose broadcast is late. - Stop a run through the engine. - Delete the reader for the previous backend, the old cancel call and the UI location history. - Share run test helpers and drop overlapping tests. * Tighten Kuma's e2e tests, CI setup and docs - Prove a live resume after a reload and drop a test that proved nothing new. - Keep Kuma's panel closed in every browser context through the storage state. - Drop the unused OpenAI key from the e2e setup. - Rewrite the background replies section of the AI assistant docs. * Handle Kuma runs whose sender lost access, and other review fixes - A queued run whose sender can no longer use Kuma ends as access_lost without calling the model. - A chat keeps asking runs for a title while its title is provisional. - Test that a run captures and saves its onboarding target. - Pass Phoenix settings to the dev export worker; pin CI's Kuma stub to Node 24.22.1. * Fix Kuma's browser edge cases found in the re-review - A send whose stream is refused after its run started re-reads the chat and counts as accepted. - A chat read that ends after another chat was chosen is dropped, and only a 4xx forgets the tab's stored chat. - An unsaved outcome stays shown while its run is the chat's latest. - The status line shows that Kuma is answering. - Empty stopped or failed answers show only their outcome. - Logout clears Kuma's chats, messages and pending navigation. * feat(assistant): follow Kuma replies through shared chat runs * refactor(assistant): remove obsolete stream-limit recovery * fix(assistant): simplify Kuma cutover and preserve legacy Stop * fix(assistant): preserve existing Kuma API contracts * refactor(assistant): match stream event kinds * refactor(assistant): simplify execution and navigation * fix(assistant): show that Kuma is cancelling after Stop * test(assistant): cover the stale refresh guard and trashed workspaces * refactor(assistant): close the run follower and drop the unused baseline * refactor(chat-runs): share the run-in-progress error code * docs(assistant): document the run limit and the deprecated chat status * fix(assistant): give a duplicated tab its own Kuma tab id |
||
|
|
5169076065 |
feat: introduce User-backed workspace identities (#6556)
* feat: introduce User-backed workspace identities Replaces workspace core.Agent subjects with identities stored as Django Users, so permissions, execution and attribution use the same record. - User.objects and WorkspaceUser.objects are human-only; permission and identity code opts in through objects_and_identities. is_human and is_identity classify a user at runtime. - Login, tokens, seats, notification recipients, personal views and last-admin checks stay human-only. Roles, teams and field grants work for identities unchanged. - Agent applications run as an identity, never as a person. Every shared tool rechecks the identity's authority on each call, and MCP refuses a tool that skips that boundary. - Migrations add the profile metadata and index, remove the Agent model and delete or clear legacy Agent data: trash entries, role assignments, team memberships, integration authorizations and run-as bindings. - Rename the management API, UI, events and feature flag to identity. Squashed and rebased onto develop; the previous history is kept on backup/6556-before-develop-rebase. * refactor: remove generic subject options endpoint * refactor: simplify identity selection and Agent run-as options * feat: distinguish identity notification senders * fix: restrict identity bindings to identity managers * docs: record users and identities verification * fix: restore snapshots as the person restoring A restore checked the snapshot creator's permission and used the creator to decide whether an Agent keeps its identity binding. It now checks the person restoring, passed to the import as `restored_by`. `copied_by` stays unset on restore, so credential checks keyed on it behave as on develop. Restoring a snapshot whose creator was deleted works again. The copy rule for identity bindings covers Agent run-as only; a copied Local Baserow integration keeps its authorized subject. * fix: leave settings pages the user may not open A settings route without a permitted tab rendered an empty page, as the Identities page did with its feature flag off. It now opens the first page the user may see. * fix: renumber the legacy Agent cleanup migrations Develop added agent 0016 and integrations 0043, so the migrations that clear legacy Agent run-as bindings and integration authorizations move to agent 0017 and integrations 0044. * test(agent): run the trigger self-event test as an identity The test added on develop created a `core.Agent`, which this branch removes. It now uses an identity user as the Agent's run-as subject. * perf: load user types once per batched permission check * refactor: state the stored subjects in each subject type * fix: give every user a profile * fix: keep identity attribution on rows copied in their workspace * refactor: give people and identities their own subject type UserSubjectType stays the type both are registered and stored under. It forwards what differs to HumanSubjectType and IdentitySubjectType, so get_specific_type is the only place in subject code that inspects the user type. The registry returns the specific type on request and get_by_model keeps returning the stored type, which never reads the profile. An identity's membership is checked in one query instead of two. * fix: keep the roles of identities when a database is duplicated The role import read subjects through the model's default manager, which only returns people, so duplicating or restoring a database failed when an identity held a role on it. It now resolves the subject through the subject registry. A subject that no longer exists is skipped instead of failing the whole duplicate or restore. * refactor: look up a subject type from its content type in one place * fix: reload a cached token whose profile is incomplete A token cached by the previous release has a profile without the user type, which reads as not a person, so its requests were refused until the entry expired. The token cache now treats it as a miss, with the check the user cache already used. * refactor: check the user type once where the check was repeated The MCP endpoint loader, the personal view permission manager and the identity trash type each asked the same question several times. The rule that an identity is never selected by email moves from the team handler to the identity subject type. * refactor: leave trashed workspaces out of the identity membership manager WorkspaceUser.objects_and_identities was named after objects but also returned memberships of trashed workspaces, so callers filtered them by hand. It now follows the existing pair: it leaves trashed workspaces out, and objects_and_identities_and_trash includes them, as objects_and_trash does for people. * test: state the behaviour of every user type The table fails when a user type is added and says what has to be decided first. An unknown type is checked to be denied. * refactor: refuse to say whether a stored user subject is interactive The answer differs between a person and an identity, so reading it from the stored type would be wrong for one of them. It now raises and points to the specific type. * refactor: lock the person in membership writes instead of checking the type Leaving a workspace, removing a member and adding a user lock the user through the people manager, which refuses an identity or an unknown type in the same query. Nothing adds an identity through add_user_to_workspace, so its branch for identities goes. The last admin check compares the membership with the people who are admin, which needs no type check. * test: leave no rows behind in the legacy authorization migration test The test left an integration that pointed at a user that didn't exist and a workspace, in the database the migration tests share. Tests that ran after it then failed on the foreign key or on the workspace id. It now uses a real user and empties the two tables. * docs: describe the subject types and compare the Subject table alternative ADR 013 is shorter and states that people and identities each have a specific subject type under the stored auth.User type. It compares shared User storage with a Subject table that users and identities would both point to. * chore: run the legacy run-as cleanup after the agent actions migration Develop added agent migration 0017, so the cleanup becomes 0018 and depends on it. * test: leave no rows behind in the legacy agent migration tests Like the legacy authorization test, these left a workspace in the database the migration tests share, which a later test that creates workspaces with fixed ids collides with. * fix: write and read the workspace role of an identity in one place The role assignment API wrote the role of an identity through the membership update of people, which told every member of the workspace about it and stored Builder as MEMBER, while the identities API stored BUILDER and returned the stored value. Both now write through the identity handler, which stores the role like the role of a person, and the role is read with the resolver the workspace members use. * fix: take no row lock in the membership writes of a person Leaving a workspace locked the user before the membership while removing or updating a member locks the membership first, so the two could deadlock. The user type never changes and these operations refuse an identity, so the lock protected nothing: they now only check that the user is a person. Leaving no longer locks the admin memberships and removing a member no longer checks for the last admin, as before identities. * fix: find an identity by its name only in the subject options The search also matched the email and username, which for an identity hold an internal key, so searching a part of that key returned every identity. * chore: run the identity migrations after the new ones on develop Develop added core 0138, integrations 0044 and enterprise 0073, so the identity migrations become core 0139 and 0140, integrations 0045 and enterprise 0074 and depend on them. * fix: keep the identity of a copied integration only for identity managers A duplicated application or a restored snapshot kept the identity its Local Baserow integration acts as, without checking the person who made the copy. Restoring a snapshot could so bring back a binding an admin had removed. The copy now keeps the identity only when that person may bind identities, as the Agent application already did, and is otherwise authorized as that person. * docs: follow the renumbered migrations and the copy rule in the test plan The test plan named the identity migrations and their tests by their old numbers and still said a copied integration keeps its subject. * test(agent): run the row trigger tests as an identity The row trigger tests added on develop created a `core.Agent`, which this branch removes. They now use an identity user as the Agent's run-as subject, and the e2e fixture creates it through the identities endpoint. |
||
|
|
d21801281f |
feat(agent): trigger agents when rows are created, updated or deleted (#6695)
* feat(agent): trigger agents when rows are created, updated or deleted * test(agent): find the trigger picker by the class it now has The trigger picker renders the shared service picker since the send email actions, so its menu is under .agent-service-picker. * fix(agent): check a trigger's access again before its conversation starts The task that starts a firing's conversation trusted the access check made when the event happened. A run identity removed, trashed or without access by the time the task ran still got a conversation with the event's rows. * fix(agent): apply the row trigger review fixes - A type change moves an overlap rule left at the old type's default to the new type's default. - Queued replies wait while the run identity can't read what the trigger watches. - An imported formula is kept as written when no path is remapped, through one import_formula in core. - Row events hand their listeners services holding the event's table. - Trigger form choices no longer read the workspace's views. - A first row too long for a message is cut short instead of left out. - A no-access error for a type the card no longer shows is ignored. - The dispatcher no longer clamps the batch size. * fix(agent): keep the merged trigger behaviour and UI for row triggers - Skipping stays the default overlap rule: only the row trigger types say their events can't be skipped, so HTTP and periodic triggers start as they did before. - The workspace-access note is a plain alert and the batch size field is spaced like the hosted forms, without style overrides. - The type-change and queued-firing tests are develop's again, with the row trigger tests added after them. - ADR 014 names the hooks row triggers add to the shared service type. * fix(agent): show a row trigger without workspace access as misconfigured The trigger can't run until the agent has workspace access, so its card gets the error icon with a tooltip and the database field shows the error, instead of an info note. |
||
|
|
b566941058 |
feat(agent): start runs from HTTP webhooks (#6737)
* feat(agent): start runs from HTTP webhooks * fix(agent): address HTTP trigger review feedback - Add opt-in agent trigger types that adapt a shared trigger type - HTTP: exclude GET by default and drop the workflow response settings - HTTP: raw body is the default message and the text of an unset one - A message with no text says when the trigger fired, not the payload - Forms take hiddenFormFields from their host - Trigger cards collapse and no longer resize while saving - Keep the HTTP trigger uid out of exports without sensitive data * feat(agent): make trigger and action card headers consistent - Chevron on the left of action cards, as on trigger cards - "Enabled" label above the switches, on the Expand all line - Switch tooltip says the state and what a click does - No divider under an action card's name |
||
|
|
5a6121b5a3 |
feat(agent): let agents send HTTP requests through configured actions (#6735)
* feat(agent): let agents send HTTP requests through configured actions An agent can now call an outside API with a configured HTTP request action. The model fills the inputs bound to the request, sees the API's answer, and fixed header, query and form values stay hidden in the approval preview. * fix(agent): hide and keep back what an HTTP action's approver doesn't read Values the builder fixed stay out of the preview and the paused run and are resolved again on approval, keyed by row position so an undone edit keeps a held call working. Malformed or oversized requests and other hosts are refused first. * fix(agent): keep an HTTP action's call on its host and bound what it returns A redirect elsewhere would carry fixed headers and the body past the approver, so agent calls only follow redirects on the same host. Also hide a URL's user, count row keys in the size limit, and measure the body the model reads. * fix(agent): show an HTTP action's inputs to the approver and refuse calls it can't send Review round 2: the approver reads every input the model chose but not a fixed URL path, and calls that can only fail are refused before they wait. |
||
|
|
b587de3dba |
feat(agent): configure per-user active-run limits (#6458)
* feat(agent): configure per-user active-run limits BASEROW_AGENT_MAX_ACTIVE_RUNS_PER_USER caps the Agent replies one user can have queued or running across workspaces. Unset means no limit, so self-hosted installs are unaffected. The run-type hook receives the user so a plugin can set the limit per user. * fix(agent): address review of the per-user run limit - Negative Agent run limits mean no limit, like the trigger limits, so no configured value can refuse every send. - Docs keep plan wording for the workspace hook only; the user hook sets one user's cap across workspaces. - ChatRunLimitReached docstrings say "a reply limit" instead of listing which limits exist. - Drop Agent tests that repeated core checks; core now checks that a finished run frees its slot. |
||
|
|
3460fd301f |
feat(agent): change a trigger's type and name row trigger services (#6704)
* feat(agent): let a trigger change its type * feat(integrations): name row trigger services after their table * feat(agent): change a trigger's type from its card * chore(agent): name a read-only trigger's type box after its type * fix(agent): keep trigger type changes consistent * fix(agent): keep trigger validation and type changes consistent |
||
|
|
26ff58a3d9 |
feat(agent): let agents send emails through configured actions (#6720)
* feat(agent): add configurable send email actions
* fix(agent): send what an action call showed and harden actions
Review fixes for the send email action.
- Resolve an action call's formulas once and carry the values from the
held call to its dispatch, so the approved preview is exactly what is
sent. DispatchContext.resolved_values lets a dispatch skip resolving
the formulas of that service again.
- Deny an approved call when its integration changed, or when it comes
back without the values its approver read.
- Let the AgentActionType base own configuration checks, preview and
dispatch. A type only supplies its defaults and readable values.
- Reserve the mcp<number>_ names of connected app tools, and accept any
valid input name, run_ctx included.
- Keep whole numbers whole in Number inputs.
- Add BASEROW_AGENT_MAX_ACTIONS_PER_AGENT, unset by default, and load an
agent's actions in a constant number of queries.
- Order and label an action's fields from its presenter in the step
card and in configuration errors.
- Replace the plan with docs/development/agent-actions.md.
* fix(agent): show what a saved action returns and drop undone errors
- A debounced save updated a copy the action card doesn't render, so the
configuration errors the server found never showed. Save through the
object the list renders.
- Clear a rejected edit's error once the edit is undone.
- Word the action limit so it also reads well with a limit of one.
* test(database): update decorator tooltip snapshots for edge-aware tooltips
The tooltip directive now keeps top and bottom tooltips inside the
viewport and positions their arrow, which changes the inline style the
two decorator tooltip snapshots record.
* fix(agent): mark an action formula with a refused argument as invalid
A function's argument check raises Django's ValidationError, which the
readiness check let through. A formula like minus('abc', 1), stored by
an import, then failed the action list, the configuration and every
reply instead of showing the action as misconfigured.
* fix(agent): start an email action on the instance server only if it delivers
The starter asked the looser question the builder and automations use,
while the readiness check asks whether a message is delivered. With a
backend that only prints, a new action opened on the instance server
and was unavailable straight away.
* fix(agent): name a deleted action in the trash
* fix(agent): read a negative agent limit as no limit
A limit of -1 was kept as a limit, so nothing could be added: no action
with BASEROW_AGENT_MAX_ACTIONS_PER_AGENT, no reply with
BASEROW_AGENT_MAX_ACTIVE_RUNS_PER_WORKSPACE. Both now treat 0 or less
as no limit, like the trigger caps.
* feat(agent): ask first by default before an action runs
A new action sent as soon as it was added, so anyone chatting with the
agent could have it email any address. Built-in tools that change data
and MCP tools already start with Ask first on; every action now does
too, at the model level so the next action types inherit it.
* fix(agent): tell the approver's own session when "Always allow" applies
Approving with "Always allow" turned Ask first off on the server, but
the realtime event skipped the approver's session as if it had edited
the action itself. The Actions card kept showing Ask first on while
emails went out. No session made this edit, so every session is told.
* fix(agent): show an action call in full to whoever approves it
The approval preview kept 10 recipients and 1,000 characters while the
call sent everything. An action's step now shows every value, never
shortened. Limiting what a call may send is left to a follow-up.
* fix(agent): apply every action event a reconnect replays
Action events all write to one slot of the agent, and the watcher only
saw the last value of a tick. A reconnect replays what it missed in one
loop, so an action another user created was lost when a later event
followed it. The watcher now runs on every write.
* fix(agent): reload the configuration when the agent gains or loses an action
Actions count as tools for web search, but nothing refetched the
configuration when one was added, switched, repaired or deleted, here
or by another user. On a model that can't search while it uses tools,
the web search setting stayed stale until a reload. The Actions section
now emits the reload other sections already use, only when the agent
gains its first callable action or loses its last.
* docs(agent): leave the limits of a call to its action type
What a call may send and what its preview shows is for each action type
to limit. Send email limits neither yet.
* fix(agent): mark a stored formula that can't be checked as invalid
A formula nested too deeply raised RecursionError in the readiness check,
so listing the actions, the configuration and every reply failed. Any
failure to check a formula now marks its field as invalid, as a stored
formula can make the parser or a function's own check raise anything.
* fix(agent): keep an approval when its integration is renamed or moved
The approval key digested the whole exported integration. Its name and
its place in the list don't change where a call is sent, and the place
of every integration can change when another one is added or moved.
* fix(core): keep the custom scrollbar in WebKit browsers
Since Chromium 121 the standard scrollbar properties replace the
::-webkit-scrollbar rules, so the rich text editor lost its 10px thumb.
The standard properties now only apply where those rules don't exist.
Stylelint is told that a mixin's body ends up inside a rule.
* chore(agent): name the collapse-all button after its block
|
||
|
|
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. |
||
|
|
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 |
||
|
|
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 |
||
|
|
84dc609565 |
feat(agent): improve the conversation list (#6683)
* feat(agent): improve the conversation list * fix(agent): align the always-allow button height * fix(agent): shorten multi-tool approval labels * adjust page size to fit the conversation list * fix(agent): keep pins on form renames and send pinned conversations Validate the conversation PATCH body as partial, so a form-encoded rename no longer unpins. Update events carry the whole conversation, so other tabs can list a conversation pinned outside their loaded pages. Drop the owner index that the pinned-first ordering no longer uses. * fix(agent): place conversations instead of re-reading the list One rule decides whether a conversation is listed: it matches the filter and falls within the loaded pages. Only the server's 404 or delete event removes a conversation, so a reload after a missed unpin keeps the open conversation and its draft. Pin events and pin responses no longer read the list again, and a hidden open conversation that is deleted selects the one after it. |
||
|
|
ae1232fad8 |
feat(agent): add database create, list and rename tools (#6678)
* feat(agent): add database create, list and rename tools * fix(agent): clarify database approvals and check no-op permissions |
||
|
|
9f9e068a27 |
feat(agent): show waiting approvals and let editors stop the asking (#6610)
* feat(agent): count pending approvals per application and conversation * feat(agent): show waiting approvals in the sidebar, header and conversation list * feat(agent): always allow a held tool from the approval * feat(agent): add Always allow and the ask before changes switch * fix(agent): read pending counts from the primary and lock the conversation first * test(agent): run approval test actions through the action registry * test(agent): read the decision result in the web search approval test * test(agent): let the waiting conversations request start before answering it * fix(agent): keep older waiting conversations through a reconnect * perf(agent): count pending approvals for many users and conversations at once The core hook takes many users and returns counts per user and application, so creating or restoring an Agent and the count task count once for all members instead of once per member; the task sends every count in one broadcast. Pending approvals are defined once, and a page of conversations gets its counts in one query passed to the serializer, like its runs, instead of an annotation with a per-object fallback. * refactor(agent): return one decision result and name the count signal after its event The service and the action both return the decision result, which carries the approved and rejected tools, so they are computed once for the audit params and Always allow. Always allow bumps the Agent's updated_on like a configuration update. The signal is renamed application_pending_count_updated, like its websocket event. * fix(agent): keep the deciding tab's waiting counts current A decision lowers the Agent's count before its request and restores it when the request fails, unless the call was decided elsewhere. Its conversation count goes through the tracked update, so a list read that started earlier restarts instead of bringing the old count back. The pill adds only the waiting conversations it hadn't loaded, and leaves a conversation picked while it loads selected. * chore(agent): describe the ask switch and drop the unused counter class The ask switch is described by its text and the row separator is hidden from screen readers. The sidebar no longer adds tree__action--has-counter, whose padding --has-options already sets. * test: give fixture fields unique default names Two fields of one table could get the same random name, so a formula referencing the other field referenced itself and failed with SelfReferenceFieldDependencyError. * refactor(agent): show the sidebar count with the warning counter The admin Templates count added badge-counter--warning, so the Agent's count uses it too instead of its own yellow color prop on BadgeCounter. * fix(agent): reconcile approval counts and cycle loaded conversations * fix(agent): name the tools Always allow stops asking for * fix(agent): load older pages until the pill reaches a waiting conversation |