Repository navigation
[release] v0.126.0 - #7867
[release] v0.126.0#7867
Conversation
|
Important Review skippedBot user detected. To trigger a single review, invoke the
|
…7843) * fix(api): a channel thread's session belongs to its own binding only * fix(api): only the owner as a person activates a private agent's binding * fix(api): a hosted Telegram bind link for a private agent's connection only for its owner * fix(api,frontend): guard bindings restored with a connection and off Telegram bindings; role notice for channel readers * fix(api): a connection restore writes only for the archive it read; audience note wording * fix(api): the agent policy read stays in the request memo when the cache write fails * docs: channel binding exceptions in the M3 design * fix(api): pass the guard person explicitly and read old channel cache entries again - The routes pass the person who makes the request (None for an API key or a channel run credential) to every binding write. The Slack install callback takes it from the signed state, which records whether a person started the install, so an owner's reinstall restores her private agent's binding on. - A channel cache entry without its binding id (written before this change) is a miss, so the session's own binding is not refused after the deploy. SessionPolicyState derives is_channel from channel_binding_id. - The restore reads the bindings once, requires the archive it expects, takes the artifact locks in id order, and answers 409 when the archive changed. - One helper names the binding of a channel run; _set keeps a value read from Postgres for the request unless an nx write found another one. - Tests record the guard arguments instead of a copy of the DAO rule; the Slack guide says one thing about who reads a private agent's chats. * docs: channel session rules in the session sharing spec and the Slack guide A project-visible channel session lets members read and send; a private agent's channel session is its owner's, and the people the owner shares a chat with can see it too (CodeRabbit). * fix(api): restore bindings in one locked transaction; a Telegram reconnect turns its binding on - The restore locks the connection, the agents of the bindings it read (in id order) and the binding rows, all in one transaction. A binding that changed after the read, or whose private agent is not the restorer's, comes back off. The stale error, its 409 mapping and its message are gone. - The hosted Telegram connect turns on the binding it points at, after the owner guard, so a reconnect over someone else's private binding answers. - The Slack callback's error card no longer says nothing was saved: a reinstall can save the token before a later step fails. - One rule for old session cache entries; _set has no nx branch; the routes use the sharing human_id helper. * fix(frontend,api): connecting turns its binding on on every path; cache and lock-order cleanups - pointConnectionAt (hosted Slack, custom bots, embeds) turns on the binding it points at, also when it already names this agent but a restore brought it back off, as the Telegram connect does. - A session cache entry with no policy, no channel flag, or a channel flag without its binding is read again (_is_old_entry); the unused missing field is gone. - The sharing DAO lock-order contract names the connection row a restore locks first. --------- Co-authored-by: Agenta Product Agent <agent@agenta.ai>
📘 Docs preview
Pages changed in this pull request This comment updates in place on every push. |
Website previewPreview URL: https://pr-7867-agenta-website-preview.mahmoud-637.workers.dev Built from |
Railway Preview Environment
Dependent tests finished. Post /preview for manual review. Environment absence verified; retained storage requires separate provider accounting. Post |
…n error frame (#7868) Co-authored-by: Agenta Product Agent <agent@agenta.ai>
…uding subscription logins (M5, backend) (#7808) * docs: align the M5 organization credentials spec with the implementation plan * feat(api): add the organization credentials schema * refactor(api): one secret owner type for the vault and the gateways * refactor(api): address secrets by owner in the DAO * feat(api): resolve one effective credential set per project * feat(api): manage organization credentials in the vault * feat(api): add the organization access decision * feat(api): add the organization credentials routes * fix(api): shadow-check every slugged project insert and managed updates, refuse non-text organization credential extras * feat(api): list inherited credentials without values * feat(api): resolve gateway credentials through the effective set * fix(api): the user-update shadow check reads availability for the row's own project * feat(api): serve inherited custom providers through the gateway * feat(api): record the credential owner kind on gateway calls * test(api): pin the organization credentials hot-path counts * fix(api): the echo scan of organization credentials also finds their JSON-escaped spellings * test(api): acceptance tests for organization credentials * fix(api): organization header credentials use characters no JSON encoder escapes, and the echo scan covers Go's HTML-safe spellings * docs: organization credentials design and contract * fix(api): the echo scan covers Go's separator-only escapes of a credential document * fix(api): complete organization audit events, answer 404 before a limit refusal, retry serialization failures with a short wait, and stricter count and race tests * test(api): count tests re-measure after a contention retry; up to six serializable attempts with a growing wait * test(api): write rows count the invalidation DEL that today's code sends when entries exist * fix(api): a project delete of an id that is not a project row keeps answering 204 and changes nothing * test(api): pin six serializable attempts and log each retry at debug with ids only * fix(api): the echo scan also finds the .NET System.Text.Json spellings of organization values * docs(api): state the six serializable attempts everywhere the retry is described * fix(api): build the .NET echo spelling per character so literal escape text in a value stays as written * chore: exempt the organization credentials test fixtures from gitleaks by value * test(api): organization credentials gateway acceptance tests skip on a deployment with the LLM gateway off * docs(api): align the M5 interfaces and spec with the code (retries, slugged inserts, secret_projects columns, custom lookup) * test(api): the Redis call counter docstring says pipelines are not counted * docs: oss000000054 follows oss000000052, the head of main at v0.125.0 * chore(frontend): regenerate the Fern client from the EE spec (organization credentials) * fix(api): a secrets update that keeps the row's kind and provider family runs READ COMMITTED; only a kind or family change runs SERIALIZABLE * test(api): count fixtures retry setup writes on a write conflict, and write rows accept SCAN paging * feat(api): agents save an explicit model connection; an organization connection must be complete, and the cloud refuses self_managed without a slug * feat(sdk): a model connection names its scope; an organization connection uses its own gateway namespace and never resolves from plaintext rows * feat(frontend): every agent save path writes the picked or default model connection explicitly * docs: M5 option B, an agent uses exactly the connection it picked by scope and slug * chore(frontend): regenerate the Fern client from the EE spec (organization connections by scope) * refactor(api)!: organization connections are named by scope and slug; remove inheritance, the shadow rule and the serializable writes * feat(api,sdk,runner): organization subscription logins, used only by an agent that names them and only on the inprocess engine An organization owner or admin may hold a ChatGPT or Claude subscription login. The API releases it only to the run credential of a project it is available to (GET /secrets/organization-subscriptions/{slug}). The SDK sends it as organizationSubscription, a field older runners ignore. The runner accepts it only on the inprocess engine for Pi with a ChatGPT login, and refuses it on the daytona and local engines. Upkeep and device logins write the organization row. An organization Claude login is refused at run time. * test(frontend): agent save paths expect the explicit project connection * fix(sdk): send connection_scope only when the agent names a scope; test(api): an owner creates an organization subscription login, an editor cannot * fix(api,sdk,runner): Codex review round 1 for M5 option B - An organization probe answer (and error text) that holds a stored value is refused with 502, as the gateway refuses an echo. - The SDK sends a fence marker in subscription beside an organization login, so a runner older than M5 refuses the run instead of using an operator login. The M5 runner accepts the marker only beside organizationSubscription. - The env and static resolvers refuse an organization connection before any credential choice. * fix(api): accept the sandbox gateway credential on the organization LLM namespace The auth middleware's gateway data-plane pattern listed builtin, standard and custom only, so a run that named an organization connection got 401 audience_mismatch on /gateways/llms/organization/{slug}/... and the turn failed with a model authentication error. Found in live QA on /m. The MCP plane keeps no organization namespace. * refactor(api)!: no save-time check for self_managed without a slug Owner decision (2026-10-26): a save never checks whether a named item exists or is usable. A self_managed agent commits with or without a slug, as on v0.125.0, and the runner decides at run time. Removes the self_managed_without_slug refusal and AGENTA_RUNNER_REQUIRE_NAMED_SELF_MANAGED_CONNECTION, with its tests, spec and docs. The organization_connection_incomplete shape check stays. * feat(api,sdk,runner)!: organization subscription logins behave like project ones An organization Claude login is no longer refused. Its setup-token travels as an environment credential, like a project Claude login. An organization ChatGPT login is no longer limited to the inprocess engine. The runner builds the same plan as for a project login on every engine; only the owner differs, so refreshes and failures still go to the organization row. The old-runner fence stays: a runner older than M5 reads the marker as an unusable login and refuses the run. Removes OrganizationSubscriptionNotSupportedError (organization_subscription_not_supported) and ORGANIZATION_SUBSCRIPTION_ENGINE_MESSAGE. Updates CONTRACT section 8, the M5 interfaces and technical design, and the OpenSpec change. * refactor(api,sdk)!: organization connections use the /secrets/ routes; owners and admins choose among every project The separate /organization-secrets/ router is gone (owner decision). POST /secrets/ takes scope organization (with availability and project_ids), GET /secrets/?scope=organization lists the organization's connections, the by-id routes find a project row under project RBAC first and otherwise an organization row behind the organization decision, and PUT /secrets/{id}/projects sets the EE limit. A run reads an organization subscription login from GET /secrets/{slug}?scope=organization. GET /projects/?scope=organization lists every project of the organization for an owner or admin, so the project choice is no longer limited to the projects the admin is a member of. * chore(frontend): regenerate the Fern client from the EE spec (organization rows on the /secrets/ routes) * fix(api,sdk): Codex review round 1 of the /secrets/ rework An organization subscription login may be created without a name (the API names it), a second one answers 409 with the organization's text, and /resolve keeps answering protocol null on a project route (only custom_provider is left out when unset). The acceptance tests follow the owner rule that owners and admins manage organization rows on /secrets/{id}; docs state the cost of the organization fallback. * chore: exempt the organization_id=None keyword argument from the generic gitleaks rule * docs: the /resolve answer keeps protocol null, and the projects route takes no scope * style(frontend): prettier on the agent creation prefs test * fix(api,frontend): CodeRabbit review: organization targets follow their route's model rules, a string llm is judged by the schema, withModel keeps the scope An organization provider key leaves the model to the provider like a standard endpoint, and an organization custom provider sends the bare model slug upstream like a custom one. The template compiler adds the default connection only to an object llm. withModel passes the organization scope through. The interfaces document names the DAO delete return. * fix(api): CodeRabbit review: a malformed connection or a non-string organization slug is refused, not replaced; the design names the runner changes * fix(frontend): an organization subscription pick keeps its organization scope when saved * refactor(api,runner): review round 1: one storage path, the caller states the scope, one error map Organization connections use the owner-based DAO methods with shareable=True (kind filter, row lock, selected projects in the same statement); the raw-SQL family and its DTO are gone. Every by-id /secrets/ route takes scope (default project), so a project request costs exactly what it did before; the run's credential gets the organization login release by the secret-resolve grant, a browser session the admin read. One handle_secrets_exceptions replaces the two maps and the inline blocks. Removed: the transaction isolation option, the runner's subscriptionOwner and its empty branch, the unreachable organization part of the Bedrock check, the project branch of the organization by-id read, owner_kind on the project slug path, the include_organization special case. provider_candidates is back in resolution.py. Fern client regenerated. * fix(api): the foreign-project refusal carries the code project_not_in_organization * docs: the project list is read by owners and admins only, after the organization list * fix(api): address review round 2 on organization credentials - Expect 404 for the run credential on a read by id in the denial test. - Audit organization login writes made by a person. - delete returns the deleted row; delete_secret returns nothing. - Drop the extra read in set_organization_secret_availability. - Remove the explicit project-scope connection default; keep named and organization connections. - One helper for the saved connection namespace. - Update docs. * fix(api): review round 3 on organization credentials - Audit the writes that store an organization login (a finished device login, a stored token), not the start, the poll or the cancel. - delete_secret and delete_managed_secret use the row the DAO returns. - The plan refusal on a project limit carries the code project_limit_not_allowed. - The gateway-off acceptance test names the organization scope and checks the listing. - Docs. * fix(api): a rollback deletes organization connections; project rows keep their order - The oss000000054 downgrade deletes the organization connections (provider keys, custom providers and subscription logins owned by an organization) before it drops the column and the table, so a later upgrade never opens a limited connection to every project. SSO and project rows stay. Migration test: downgrade and upgrade again. - The effective list has no ORDER BY: the project's rows come back in the order the project list always had, so the first key of a provider stays the same. Organization rows are sorted in Python. * fix(api): with the LLM gateway off, organization keys are not offered to agents GET /secrets/?include_organization=true leaves out organization provider keys and custom providers when the LLM gateway is off, since a run could not use them. Organization subscription logins stay. Tests for the gateway on and off. * test(api): organization listing acceptance tests follow the LLM gateway state With the gateway off, an organization key is not listed; the listing-shape and new-project cases use an organization subscription login, which stays listed. --------- Co-authored-by: Agenta Product Agent <agent@agenta.ai>
…cker (#7839) * feat(frontend): organization connections in settings and the model picker The settings rail gets a Connections section (AI providers, Integrations, Secrets, MCPs, Channels). AI providers has two tabs, the project's and the organization's. An organization owner or admin lists, adds, edits and deletes organization connections and chooses the projects that can use each one (all projects by default); ChatGPT and Claude logins can belong to the organization too. A member sees the connections the project may use, read-only, and can Test them. The vault read asks for the organization connections the project may use (include_organization, the same request). Project-only readers keep the project's rows; agent surfaces see both. The model picker lists organization connections after the project's with the Organization tag, and a pick stores scope and namespace organization with the slug. The prompt playground drawer lists them disabled as agents only. * fix(frontend): a new agent never defaults to an organization connection Organization routes are listed after the project's own, built-in and subscription routes, and the automatic default skips them: an agent uses an organization connection only when the builder picks it. * fix(frontend): Codex review round 1 for the organization connections UI A member's Test sends only the stored connection's id and scope. A restored or stored organization pick keeps its namespace in both modes, and a gone organization connection is not stood in for by another one in the picker. Onboarding manages project connections only. The projects draft survives a sign-in refresh, a token login takes the projects chosen before Connect, a projects-only change skips the credential write, and saves refresh the lists in the background. Member loading and load errors follow the vault read; Selected projects waits while the plan loads. * fix(frontend): Codex review round 2 for the organization connections UI A gone organization connection selects nothing in the model picker, and a project selection never falls back to an organization row. A 403 on the organization list switches to the read-only view even over cached rows. Organization logins take the API's default name and the refusal messages of the key drawer; token and sign-in refreshes of the other list run in the background. Plan entitlements load in parallel for owners and admins, and a row whose projects the viewer cannot name shows their count. * fix(frontend): Codex review round 3 for the organization connections UI A project connection that is gone no longer lights an organization row for the same model id. An organization token save applies the saved row at once and refreshes in the background, and its refusals use the approved organization messages. See plans keeps the /m base path. * fix(frontend): Codex review round 4 for the organization connections UI A new organization token login is added to the cached list at once, so the dialog shows it connected and a retry does not create it again. Sign-in and delete refusals use the approved organization messages. * fix(frontend): a token login updates only the current organization list The saved row goes into this user's list for this project, not into every cached organization list. * fix(frontend): capture the list key before the token request The cache key of the organization list is read before the save, so a user switch while it runs cannot put the row into another user's list. * refactor(frontend): organization connections use the /secrets/ routes; the project choice lists every project The Organization tab reads GET /secrets/?scope=organization, creates with scope organization and limits with PUT /secrets/{id}/projects; editing, deleting and signing in use the project routes, which find an organization row by id. In EE the tab also reads GET /projects/?scope=organization in parallel, so an owner or admin can choose projects they are not a member of. * refactor(frontend): review round 1: one providers panel, one set of write atoms, the organization scope on every write The project and organization lists share one ProvidersPanel (ph-no-capture on both). The project atoms take an optional organization argument; only setOrganizationConnectionProjectsAtom stays. An organization save writes the credential and the projects in parallel and refreshes both lists also when one write fails, keeping the unsaved choice on screen. Edits, deletes, tokens and device logins of an organization row send scope organization. The project choice waits for the organization's project list (an owner or admin's read, EE only) instead of falling back to the member's projects. Test is off where the current project may not use the connection. The foreign-project refusal is matched on its code. * style(frontend): prettier on the organization state test * fix(frontend): review round 2 for the organization connections UI - A typed key is tested on its own; only a probe of the stored organization row sends the scope and needs the current project to be allowed. - The subscription paths map only 403 and the coded 422; the API's conflict sentence shows. - Done saves the projects of an existing subscription connection without a sign-in. - One SecretOwnerScope type; the organization create defaults live in the create atom. - One namespace rule for saved picks; rows omit the project count; the project-list failure hides the list only where projects are chosen. * fix(frontend): review round 3 for the organization connections UI - The drawer holds a connection by id and its card reads the stored connection, so a save that landed in part writes the restored projects on retry. - The coded plan refusal shows the plan sentence, not the lost-role one. - Tests: Done with a typed token sends no token; the plan refusal; the partial save retry. --------- Co-authored-by: Agenta Product Agent <agent@agenta.ai>
…was saved with a bare model id (#7869) Co-authored-by: Agenta Product Agent <agent@agenta.ai>
mmabrouk
left a comment
There was a problem hiding this comment.
🤖 The AI agent says: Approved on Mahmoud's instruction after the v0.126.0 production deploy went green in US (run 40675206528) and EU (run 40677095454), with live agent checks passing in both regions.
https://entire.com/gh/agenta-ai/-/trails/26/changes/agenta/26
New version v0.126.0 in