flexkit approvals
Reviews and decides approval requests: data changes, bulk actions, plugin calls, sandbox commands, schema changes and proposed automations or skills that an automation run or a chat is waiting on. Approving runs the change and lets the paused run continue; rejecting tells the agent the change was refused. See Approvals for how requests are created and what the mutation policy does.
Synopsis
flexkit approvals <subcommand> [arguments] [options]Without a subcommand, flexkit approvals runs ls.
Permissions
Deciding a request needs a person: approve and deny need a signed-in session from flexkit login. Project API tokens (--token, FLEXKIT_TOKEN) can run ls and inspect, and are refused with A user session is required. when they approve or deny.
- Every project member can list and read the requests of automations they can see, and read the requests of their own chats by id.
- A project API token can list and read the requests of project-wide automations and of automations in the spaces it was granted. It can’t read chat requests or the requests of personal automations, including its creator’s.
- Requests from automation runs can be decided by owners and developers. Requests from a chat can be decided by the chat’s owner.
approvals ls
List the approval requests of automation runs. Shows pending requests (with their expiry) unless you pass --all or --status.
Requests from a chat aren’t listed: they belong to the chat. flexkit chat prints the request id when a turn waits on one, and approvals inspect, approve and reject take that id.
flexkit approvals ls [--all | --status <status>] [--run <runId>] [--limit <n>] [--offset <n>] [--json]--status takes pending, approved, rejected, expired or cancelled.
Examples
# Pending requests
flexkit approvals ls
# Every request of one run
flexkit approvals ls --all --run 9b2d4f6a-1c3e-4a5b-8d7f-0e2c4a6b8d1f
# Rejected requests
flexkit approvals ls --status rejected --limit 50
# Ids of pending requests
flexkit approvals ls --json | jq -r '.approvals[].id'approvals inspect
Show a request: what it would do (each GraphQL operation or command with its variables), how many records it affects, who requested it, when it expires, and its decision. --json includes the full before/after preview.
flexkit approvals inspect <approvalId> [--json]Examples
# Review a request
flexkit approvals inspect 7c1e3a5b-9d2f-4e6a-8b0c-1d3f5a7c9e2b
# Print the before/after preview
flexkit approvals inspect 7c1e3a5b-9d2f-4e6a-8b0c-1d3f5a7c9e2b --json | jq '.approval.preview'approvals approve
Approve a pending request. The CLI shows its summary and asks for confirmation; pass --yes in scripts. If the records it affects changed since the preview was made, the approval is refused so you can review the new state; approve again after inspect, or pass --force to approve anyway.
flexkit approvals approve <approvalId> [--reason <text>] [--remember] [--force] [--yes] [--json]--remember applies to plugin calls: the automation may call the same plugin tool without asking from now on.
Examples
# Approve after a prompt
flexkit approvals approve 7c1e3a5b-9d2f-4e6a-8b0c-1d3f5a7c9e2b
# Approve a plugin call and always allow that tool in the automation
flexkit approvals approve 7c1e3a5b-9d2f-4e6a-8b0c-1d3f5a7c9e2b --remember --yes
# Approve with a note
flexkit approvals approve 7c1e3a5b-9d2f-4e6a-8b0c-1d3f5a7c9e2b --reason "Checked with finance" --yesapprovals deny
Reject a pending request (alias reject). Nothing changes; the agent is told the request was rejected, with your reason if you give one.
flexkit approvals deny <approvalId> [--reason <text>] [--json]Examples
# Reject a request
flexkit approvals deny 7c1e3a5b-9d2f-4e6a-8b0c-1d3f5a7c9e2b
# Reject it and tell the agent why
flexkit approvals deny 7c1e3a5b-9d2f-4e6a-8b0c-1d3f5a7c9e2b --reason "Only update draft products"Options
You can also use all global options.
Common workflows
Unblock a paused run
# The run waits for approval
flexkit runs logs 9b2d4f6a-1c3e-4a5b-8d7f-0e2c4a6b8d1f
flexkit approvals ls --run 9b2d4f6a-1c3e-4a5b-8d7f-0e2c4a6b8d1f
flexkit approvals inspect 7c1e3a5b-9d2f-4e6a-8b0c-1d3f5a7c9e2b
flexkit approvals approve 7c1e3a5b-9d2f-4e6a-8b0c-1d3f5a7c9e2b
# Watch the run continue
flexkit runs logs 9b2d4f6a-1c3e-4a5b-8d7f-0e2c4a6b8d1f --follow