Skip to content

API: read, give and request the actions of an app a Bot needs - #2127

Merged
davidmckayv merged 1 commit into
mainfrom
fix/app-card-for-missing-actions-api
Nov 24, 2026
Merged

davidmckayv merged 1 commit into
mainfrom
fix/app-card-for-missing-actions-api

Conversation

@davidmckayv

Copy link
Copy Markdown
Contributor

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:

  • getBotApp takes actions. With them, an app the Bot holds but lacks one of those actions for reads as not_granted (or owner_grantable where the person asking may give them), with requestKind: grant.
  • approveBotApp and giveBotApp take an optional body with actions to give, so an admin's or owner's one press on the card gives exactly what the task needs.
  • createAppAccessRequest takes actions, and AppAccessRequest lists them. Approving a request without naming actions gives the ones it asked for.
  • The connect-app marker (@openbot/shared/connect-prompt) gains a tools reason carrying the actions and a short need in plain words.

The app's data layer passes actions through. 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:lint and typecheck pass.

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
davidmckayv force-pushed the fix/app-card-for-missing-actions-api branch from fe9c275 to b5e1540 Compare November 24, 2026 17:04
@davidmckayv
davidmckayv merged commit 41b4312 into main Nov 24, 2026
34 checks passed
@davidmckayv
davidmckayv deleted the fix/app-card-for-missing-actions-api branch November 24, 2026 17:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant