Skip to content
Source
Sign inSign up
pingdotgg/t3code

refactor(provider-core): add provider-core and provider-testing packages #17299

Mergedjuliusmarmingemerged 3 commits intomain fromrefs/pull/17299/headmerged by juliusmarminge View on GitHub

juliusmarmingecommented

Providers could not live outside apps/server: the driver contract, the helpers drivers share, and every way a driver reached the server were server-internal. This adds the packages a provider package builds on. No behavior change.

@t3tools/provider-core

  • ./client: ProviderClientDefinition (label, settings schema, environment fields, badge, plain-data icon) and a registry. Web settings, onboarding, and usage read it instead of a web-only table.
  • ./server/*: the driver and instance records, the V2 adapter interface, selection transitions, snapshot, auth, text-generation, and maintenance interfaces, plus the helpers drivers share that have no server dependencies (ids, failure items, MCP session and tool presentation, process groups, status probes, update ownership, usage limits, text-generation prompts).
  • ProviderHost: the one service a provider uses to reach the server (paths, settings reads and changes, background-work gate, attachment paths), implemented once by the server. Every driver now takes it instead of the server's BackgroundPolicy.

@t3tools/provider-testing: replay transcript decoding, the replay gate, the git checkpoint workspace, and a scoped ProviderHost for driver tests.

Server modules keep their services and re-export moved types. Effect service modules are PascalCase (ProviderAdapter, ProviderHost, IdAllocator); utility modules are camelCase. Service keys follow the new module paths (in-memory tags; nothing persists them).


Stack: #17299 → #17300 → #17302. Replaces the earlier 7-PR stack (#17282–#17288).

Done by Claude Opus 5.5 in Claude Code.

🤖 Generated with Claude Code


Devin Review
    1. github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:trusted

    2. juliusmarminge changed the title

    3. juliusmarminge added labelsmacroscope-review

    4. github-actions[bot](GitHub profile, opens in a new tab)commented

      Thread transfer impact

      ✅ Thread transfer remains within every enforced ceiling.

      ProviderMetricMain baselineThis PRImpactPR ceiling
      CodexTotal thread wire5.0 KiB5.0 KiB0 B (0.0%)6.8 KiB✅
      CodexThread snapshot wire3.8 KiB3.8 KiB0 B (0.0%)4.9 KiB✅
      CodexLive turn WebSocket wire1.2 KiB1.2 KiB0 B (0.0%)2.0 KiB✅
      CodexLive turn WebSocket decoded20.9 KiB20.9 KiB0 B (0.0%)29.3 KiB✅
      CodexLive turn messages220 (0.0%)8✅
      ClaudeTotal thread wire5.0 KiB5.0 KiB0 B (0.0%)6.8 KiB✅
      ClaudeThread snapshot wire3.8 KiB3.8 KiB0 B (0.0%)4.9 KiB✅
      ClaudeLive turn WebSocket wire1.2 KiB1.2 KiB0 B (0.0%)2.0 KiB✅
      ClaudeLive turn WebSocket decoded21.2 KiB21.2 KiB0 B (0.0%)29.3 KiB✅
      ClaudeLive turn messages220 (0.0%)8✅

      Baseline: 5809487 · PR result: 52fbad9 · Source CI: success

      Scenario and decoded snapshot size

      10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.

      • Codex decoded thread snapshot: 108.5 KiB
      • Claude decoded thread snapshot: 108.8 KiB

      Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.

    5. Approvability

      Verdict: Not approved

      Macroscope's review found this PR not approvable — This PR performs a broad provider-platform refactor that rewires production provider construction, runtime services, and client metadata across hundreds of files. It also changes authentication-related interfaces, so the scope and sensitivity warrant human validation.

      You can add or adjust custom eligibility rules. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).
    6. Review in Change Stack →
      ✨ Finishing Touches 💡 1
      🛠️ Fix failing CI checks 💡
      • Commit to this branch
      • Create a new PR
      📝 Generate docstrings
      • Commit to this branch
      • Create a new PR
      🧪 Generate unit tests (beta)
      • Commit to this branch
      • Create a new PR
      • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

      Comment `@coderabbitai help` to get the list of available commands.
    7. juliusmarminge merged this9eea28b

    8. juliusmarminge closed this

Sign in to join this conversation.