Skip to content

feat(macos): load provider catalog during AI onboarding#101132

Merged
steipete merged 5 commits into
mainfrom
codex/macos-onboarding-provider-catalog
Jul 6, 2026
Merged

feat(macos): load provider catalog during AI onboarding#101132
steipete merged 5 commits into
mainfrom
codex/macos-onboarding-provider-catalog

Conversation

@steipete

@steipete steipete commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Closes #101019

What Problem This Solves

macOS AI onboarding offered only three hardcoded API-key providers even though OpenClaw ships many more text-inference providers. Users of another supported provider had to leave the app-guided flow and configure it elsewhere.

Why This Change Was Made

The Gateway now derives the manual provider list from trusted installed plugin manifests that explicitly opt into one-secret app-guided setup. The macOS app renders that catalog dynamically, sends the opaque auth choice back, and the Gateway loads only the selected plugin, stages its credential/config, runs a real model check, then persists only after success.

The previous hardcoded provider request field was introduced after the latest release tag and exists in no shipped tag, so this keeps one canonical protocol path instead of adding an unshipped compatibility alias.

User Impact

macOS onboarding now offers the supported provider catalog instead of Claude, OpenAI, and Gemini only. The current bundled catalog exposes 59 API-key/token choices, including provider-owned token and dynamic local-provider setup, while older Gateways still retain automatic candidate onboarding and show clear update guidance for the unavailable catalog.

Evidence

  • Blacksmith Testbox tbx_01kwwdatrdyg416c9hrw53vr3p: pnpm check:changed passed all selected typecheck, core/extension lint, app, import-cycle, database, and packaging lanes (10m59s).
  • Focused Testbox proof: 230 tests passed across setup inference, Gateway Crestodian methods, protocol schemas, provider auth/manifest resolution, Anthropic, and GitHub Copilot.
  • Source-blind isolated detection: 59 manual providers returned in 210ms.
  • Native macOS: swift test --package-path apps/macos --filter Onboarding passed 18 tests after a clean Swift build.
  • Fresh structured autoreview: all accepted findings fixed; no accepted/actionable findings remain.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3678b6a607

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

provider: Type.Optional(Type.String()),
/** Manual step only: the pasted API key; masked by clients, never echoed. */
/** Manual step only: opaque provider-auth choice returned by detection. */
authChoice: Type.Optional(Type.String()),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep accepting legacy setup provider payloads

With provider replaced by authChoice, pre-update macOS clients that still post {kind: "api-key", provider: "openai", apiKey: ...} hit this schema with additionalProperties: false and are rejected before src/gateway/server-methods/crestodian.ts can run. Gateway/app updates can be staggered, and the prior app did send provider, so keep provider as a deprecated optional alias (mapping the old anthropic/openai/google values to the new choice ids) instead of making this an incompatible protocol change.

Useful? React with 👍 / 👎.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f6a3f92939

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

"provider": "github-copilot",
"method": "device",
"choiceId": "github-copilot",
"appGuidedSecret": true,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Update Copilot provider-auth contract fixture

When this flag is added, normalizeProviderAuthChoices preserves appGuidedSecret, but src/plugins/contracts/registry.contract.test.ts still uses toEqual for the GitHub Copilot providerAuthChoices object without this field. That contract test will fail as soon as the plugin registry is loaded, so update the fixture or loosen the assertion with the manifest change.

Useful? React with 👍 / 👎.

@steipete

steipete commented Jul 6, 2026

Copy link
Copy Markdown
Contributor Author

Land-ready proof for fdbd181f57ceb7c43d71ae3cd291e8eeda5a542a:

  • Behavior: macOS onboarding now receives its manual provider choices from trusted Gateway provider manifests; isolated detection returned 59 sorted choices in 210 ms. Selection loads only the chosen provider, performs a real model completion, and persists staged auth/config only after success.
  • Blacksmith Testbox: pnpm check:changed passed all selected typecheck, lint, app, import-cycle, database, and package lanes on lease tbx_01kwwdatrdyg416c9hrw53vr3p.
  • Focused Testbox coverage: 230 TypeScript tests passed across protocol, Gateway Crestodian setup, setup inference, manifest/provider auth, Anthropic, and GitHub Copilot; the final registry-contract correction passed 21/21 tests and targeted oxfmt --check.
  • Native proof: clean swift test --package-path apps/macos --filter Onboarding passed 18/18 tests. native:i18n:check reports changed=false after refreshing the generated inventory.
  • Hosted exact-head CI: CI run 28818245634 passed; Workflow Sanity run 28818245507 passed. Repository prepare-run accepted the hosted exact-head gates.
  • Review: fresh structured autoreview completed with no accepted/actionable findings.

Known proof gap: no new screenshot artifact; native compilation/tests and the source-blind catalog response cover this data-driven control change.

@steipete
steipete merged commit 80537c1 into main Jul 6, 2026
210 of 212 checks passed
@steipete
steipete deleted the codex/macos-onboarding-provider-catalog branch July 6, 2026 19:57
@steipete

steipete commented Jul 6, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 7, 2026
)

* feat(macos): load onboarding providers from gateway

* test(crestodian): widen setup config mock

* fix(crestodian): satisfy onboarding lint gate

* chore(macos): refresh onboarding localization inventory

* test(plugins): cover guided Copilot secret metadata
giodl73-repo pushed a commit to giodl73-repo/openclaw that referenced this pull request Jul 8, 2026
)

* feat(macos): load onboarding providers from gateway

* test(crestodian): widen setup config mock

* fix(crestodian): satisfy onboarding lint gate

* chore(macos): refresh onboarding localization inventory

* test(plugins): cover guided Copilot secret metadata
steipete added a commit that referenced this pull request Jul 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment