Skip to content

Move provider state into provider bridge contract - #1879

Merged
ymichael merged 15 commits into
mainfrom
bb/explain-onboarding-agent-overview-thr_v5dusakvek
Aug 20, 2026
Merged

ymichael merged 15 commits into
mainfrom
bb/explain-onboarding-agent-overview-thr_v5dusakvek

Conversation

@ymichael

@ymichael ymichael commented Aug 19, 2026 •

Copy link
Copy Markdown
Collaborator

What was wrong

Provider readiness, usage, installation, update, executable discovery, and version policy were split between provider bridges and provider-specific core code. Generic product paths—including the root composer and Settings—depend on this state, so adding or changing a provider still required edits across the server, daemon, and app.

What changed

  • Added experimental, sessionless provider bridge methods for provider/health, provider/usage, provider/installation/status, and provider/installation/run.
  • Moved Codex, Claude Code, and Cursor installation discovery, source/version checks, executable plans, and post-run verification rules into their provider bridges.
  • Made Codex operation-specific version requirements provider-owned. Core now forwards a typed requirement such as thread_rewind and generically honors the bridge's normalized unsupported-version result.
  • Moved the built-in ACP provider catalog and executable discovery into the ACP plugin. Provider declarations carry validated static bridge options and can use installed-only visibility; the ACP bridge performs the host-local executable probe.
  • Kept the daemon as the generic host execution boundary: it supplies environment/cwd, serializes installs, supervises and streams processes, and verifies the resulting provider status.
  • Replaced onboarding-specific provider state APIs with generic provider state aggregation used by onboarding, root composer selection, usage settings, and install/update surfaces.
  • Bumped HOST_DAEMON_PROTOCOL_VERSION to 145 and documented the experimental declaration/bridge contracts.

How you verified

  • Rebased onto origin/main at e2749bc13; resolved additive API-audit and protocol-version conflicts while preserving both implementations.
  • Turbo typecheck: 14/14 affected tasks passed.
  • Turbo tests: 16/16 affected tasks passed, including 402 app test files, 195 server test files, 47 host-daemon test files, both provider plugins, runtime, SDK, protocol, and contracts.
  • git diff --check passed and the worktree is clean.

Related to #1620

AGENT GENERATED: by GPT-5

@bb-slop-cop

bb-slop-cop Bot commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

🚨 SLOP COP 🚨 · review

I am SlopCop. I am reviewing this pull request for security, quality, performance, architecture, duplication, and end-to-end behavior.

@bb-slop-cop bb-slop-cop 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.

🚨 SLOP COP 🚨 · review

Plain English summary: This change lets each AI provider report its install, sign-in, version, health, and usage state through one bridge contract. The server uses those reports in onboarding, the composer, Settings, the SDK, and the CLI.

I found two P1 issues and three P2 issues:

  • P1: The committed SDK and template declarations are stale. This mismatch now makes the package test and check jobs fail.
  • P1: A fresh machine can hide all provider install choices when Pi reports unauthenticated. The user cannot install a usable provider in onboarding.
  • P2: Plugin bridges can show Install or Update buttons without a matching host action.
  • P2: The server accepts plugin usage reports, but Settings shows only three fixed providers.
  • P2: Provider state and usage checks start unlimited parallel work. The maintenance runtime also keeps each bridge process until shutdown or invalidation.

The security review found no security issue. The host daemon protocol version has the correct change from 135 to 136.

I started the development app and tested the changed user paths. Provider state and usage routes returned HTTP 200.

The composer selected a ready provider. Usage Settings showed Codex, Claude Code, and Cursor data. Onboarding showed seven providers and advanced to project selection.

The first provider state and usage requests each took about 11.5 seconds. One request left seven bridge workers after the page closed.

The provider bridge test groups passed 672 tests. The focused runtime tests passed 14 tests. The server, host daemon, and app type checks passed.

git diff --check passed. The current GitHub package test and check jobs fail because the generated declarations are stale.

I also checked for repeated code and possible shared helpers. I found repeated executable, version, percentage, and credential helpers across provider packages.

These helpers are small. Provider isolation makes a shared module optional, so I did not report this repetition as a defect.

@ymichael
ymichael force-pushed the bb/explain-onboarding-agent-overview-thr_v5dusakvek branch 11 times, most recently from 0aca850 to 7836cfa Compare August 20, 2026 20:54
@ymichael
ymichael force-pushed the bb/explain-onboarding-agent-overview-thr_v5dusakvek branch from 7836cfa to 0979003 Compare August 20, 2026 21:15
@ymichael
ymichael merged commit d749741 into main Aug 20, 2026
13 checks passed
@ymichael
ymichael deleted the bb/explain-onboarding-agent-overview-thr_v5dusakvek branch August 20, 2026 21:21
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.

1 participant