Repository navigation
API: read, give and request the actions of an app a Bot needs - #2127
Merged
Merged
Conversation
davidmckayv
requested review from
MikeRyanDev,
dustywusty,
guidovizoso,
mxmzb,
samjulien and
tylerslaton
as code owners
November 24, 2026 16:28
davidmckayv
force-pushed
the
fix/app-card-for-missing-actions-api
branch
from
November 24, 2026 16:45
8d7fb93 to
fe9c275
Compare
A Bot that held some of an app's actions and needed one it wasn't given had no way to say so that a person could act on: the app read as ready, and the only fix was a settings dialog of raw tool names. These additions let the app card name the actions and offer the step that gives them. - getBotApp takes actions: the app as it stands for those actions, not_granted (or owner_grantable) with requestKind grant when the Bot lacks any of them. - approveBotApp and giveBotApp take an optional body with actions to give. - createAppAccessRequest takes actions; a request lists the actions it asks for, and approving it without naming actions gives those. - The connect-app marker gains a tools reason, with the actions and the need in plain words. All additive. The app's data layer passes actions through; the screens use them next.
davidmckayv
force-pushed
the
fix/app-card-for-missing-actions-api
branch
from
November 24, 2026 17:04
fe9c275 to
b5e1540
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A Bot that holds some of an app's actions and needs one it wasn't given (asked to recolour calendar events while holding only Google Calendar's reads) had nothing a person could act on. The app read as ready, so its card had no button, and the Bot ended on a sentence. The only fix was Settings, the app's page, Grant tools.
This is the API half of closing that loop. Everything is additive:
getBotApptakesactions. With them, an app the Bot holds but lacks one of those actions for reads asnot_granted(orowner_grantablewhere the person asking may give them), withrequestKind: grant.approveBotAppandgiveBotApptake an optional body withactionsto give, so an admin's or owner's one press on the card gives exactly what the task needs.createAppAccessRequesttakesactions, andAppAccessRequestlists them. Approving a request without naming actions gives the ones it asked for.@openbot/shared/connect-prompt) gains atoolsreason carrying the actions and a shortneedin plain words.The app's data layer passes
actionsthrough. The card and the inbox use them in a follow-up.Tests: the marker round trip with the new fields, a brace in the need, and malformed actions; the app's existing access-request and card suites.
api:lintand typecheck pass.