Skip to content

Remove explicit issue-credential from plugin auth #209

Closed

Description

@dcramer

The current plugin OAuth flow resumes the pending message after callback, but it does not restore the blocked credential state. In the current code, jr-rpc issue-credential both starts OAuth and enables the turn-scoped capability lease (packages/junior/src/chat/capabilities/jr-rpc-command.ts, packages/junior/src/chat/capabilities/runtime.ts), while the OAuth callback only resumes the original message (packages/junior/src/handlers/oauth-callback.ts). That leaves the resumed model turn responsible for remembering to re-run jr-rpc issue-credential, which is avoidable fragility and differs from MCP auth, where provider auth state is stored and resumed directly (packages/junior/src/chat/mcp/auth-store.ts).

  • Remove explicit jr-rpc issue-credential behavior for plugin-backed operational requests.
  • When a plugin-owned skill is loaded and the turn author is known, issue the narrowest supported plugin credential implicitly on demand for the turn instead of requiring a bash command in the prompt.
  • Preserve explicit jr-rpc oauth-start and jr-rpc delete-token for direct connect/disconnect account-management requests.
  • On OAuth callback resume, restore the previously blocked plugin capability state instead of only replaying the pending message.
  • Keep capability scoping narrow and requester-bound; do not broaden access beyond the plugin capabilities supported for that skill.
  • Update prompt/skill guidance and add integration/eval coverage for resumed plugin requests so the agent no longer has to reconstruct the auth step after OAuth.

Action taken on behalf of David Cramer.

Activity

  1. added 9 commits that reference this issue on Apr 17, 2026
    dff5915
    7e09911
    1ce220a
    9fab706
    1c086d3
    52b86a6
    03c9ed6
    e0823f4
    4171046
  2. added a commit that references this issue on Apr 17, 2026
    00781ba
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions