You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(connector): support advisory action approval - #382
Connector actions can require advisory confirmation through approval_required. Add opt-in oo connector run --approval to send the caller's authorization declaration separately from Provider input. Default calls omit the field, and confirmation errors retain their HTTP status and exit code without automatic retries.
--wait forwards an explicit declaration on every poll of the selected action. With --wait-result, only submission receives it; if result querying requires confirmation, stderr includes recovery JSON so the caller can resume the existing task with the original team and connection.
Update the shared Agent skill, English/Chinese help and command docs. Agents assess the operation, parameters, context and existing user instructions before declaring approval, asking only when authorization is insufficient. Existing telemetry records the error code without approval or recovery payloads.
Validation:
190 tests passed across Connector CLI/shared requests, telemetry decisions and i18n (bun run test with the relevant paths).
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.
Summary by CodeRabbit
New Features
Added an optional --approval flag for connector actions when the user’s authorization is sufficient. Actions that require approval but are not authorized are not executed.
If approval is required to check the result of a submitted asynchronous action, the command provides recovery details so you can resume the result check without submitting the action again.
Documentation
Updated English and Chinese command help and guidance to explain approval handling and asynchronous recovery.
Walkthrough
The connector run command adds an optional --approval declaration and sends it separately from action input. Approval-required responses are reported without automatic retry. For async result queries blocked after submission, the command provides recovery data so polling can resume without resubmitting the action. The changes also update authorization guidance, localized messages, documentation, and tests.
Sequence Diagram(s)
sequenceDiagram
actor User
participant ConnectorRun
participant ConnectorActionAPI
User->>ConnectorRun: Submit with --wait-result
ConnectorRun->>ConnectorActionAPI: Submit action
ConnectorActionAPI-->>ConnectorRun: Return execution ID
ConnectorRun->>ConnectorActionAPI: Query result action
ConnectorActionAPI-->>ConnectorRun: Return approval_required
ConnectorRun-->>User: Provide recovery data
User->>ConnectorRun: Resume with recovery input and --wait --approval
ConnectorRun->>ConnectorActionAPI: Query result with preserved selectors
Loading
Possibly related PRs
oomol-lab/oo-cli#380: Adds connector selectors that this change preserves during approval recovery and async polling.
oomol-lab/oo-cli#381: Adds cross-team connector result discovery and confirmation behavior related to this change’s authorization and selector handling.
Priority: Normal
Merge Risk: Minimal · up to 370e9
The approval guidance permits proceeding without another question when existing authorization satisfies host rules. No actionable merge risk remains after normal checks.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title uses the required <type>(<scope>): <subject> format, uses English, and accurately describes the connector approval feature.
Description check
The description accurately summarizes the approval flag, asynchronous behavior, recovery flow, documentation updates, telemetry handling, and validation results.
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Finishing Touches
✨ Simplify code
Commit to this branch
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Comment @coderabbitai help to get the list of available commands.
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
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.
Connector actions can require advisory confirmation through
approval_required. Add opt-inoo connector run --approvalto send the caller's authorization declaration separately from Provider input. Default calls omit the field, and confirmation errors retain their HTTP status and exit code without automatic retries.--waitforwards an explicit declaration on every poll of the selected action. With--wait-result, only submission receives it; if result querying requires confirmation, stderr includes recovery JSON so the caller can resume the existing task with the original team and connection.Update the shared Agent skill, English/Chinese help and command docs. Agents assess the operation, parameters, context and existing user instructions before declaring approval, asking only when authorization is insufficient. Existing telemetry records the error code without approval or recovery payloads.
Validation:
bun run testwith the relevant paths).bun run lint:fixbun run ts-checkbun run knipRelated Connector protocol: https://github.com/oomol/oomol-connector/pull/2991