Skip to content

feat(connector): support advisory action approval - #382

Merged
crimx merged 1 commit into
mainfrom
crimx/connector-advisory-approval
Oct 28, 2026
Merged

crimx merged 1 commit into
mainfrom
crimx/connector-advisory-approval

Conversation

@vince-hz

Copy link
Copy Markdown
Contributor

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).
  • bun run lint:fix
  • bun run ts-check
  • bun run knip

Related Connector protocol: https://github.com/oomol/oomol-connector/pull/2991

@coderabbitai

coderabbitai Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI; Enforced overrides: Organization
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 0d1d61c3-0488-4323-a9be-44befd2105f7
Commits

Reviewing files that changed from the base of the PR and between d9e289a and 370e9c6.

Files selected for processing: 10
  • contrib/skills/shared/oo/SKILL.md
  • contrib/skills/shared/oo/references/connector-execution.md
  • docs/commands.md
  • docs/commands.zh-CN.md
  • src/application/commands/connector/index.cli.test.ts
  • src/application/commands/connector/run.ts
  • src/application/commands/connector/shared.test.ts
  • src/application/commands/connector/shared.ts
  • src/application/commands/telemetry-decisions.test.ts
  • src/i18n/catalog.ts

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: Passed 4
Check name Status Explanation
Title check Passed The title uses the required <type>(<scope>): <subject> format, uses English, and accurately describes the connector approval feature.
Description check Passed The description accurately summarizes the approval flag, asynchronous behavior, recovery flow, documentation updates, telemetry handling, and validation results.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed 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.

@crimx
crimx merged commit 9fd0d9d into main Oct 28, 2026
6 checks passed
@crimx
crimx deleted the crimx/connector-advisory-approval branch October 28, 2026 06:51
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.

2 participants