refactor(contracts): keep RPC implementation exports private#10168

merged2
cleanup-packages/client-internals
cleanup-packages/contracts-internals
openedSep 5, 2026byJJulius Marminge
View on GitHubTwo-way sync enabledPR last imported 3d ago

Individual WebSocket RPC definitions are consumed through the assembled RPC group, not as separate package exports.

Keep those RPC implementation values and the runtime tool-lifecycle constant private. Preserve all Effect schemas, schema aliases, and exported types. This PR no longer rewrites schema aliases or their consumers.

Verification: contracts and consumer typechecks pass, existing contracts tests pass, and the integrated Knip gate passes. No existing tests were changed or removed.

Follows #10167.

Note

Keep RPC implementation exports private in contracts

Converts all exported RPC definition constants in rpc.ts and the TOOL_LIFECYCLE_ITEM_TYPES constant in providerRuntime.ts to module-private. Schema fields and behavior are unchanged; several Rpc.make calls were reformatted to a compact layout.

  • Risk: external consumers importing these constants by name will fail to compile. In-tree references must rely on the public RPC contract surface rather than the implementation constants.

Macroscope summarized e36f20d.

Model: gpt-6 astra. Harness: Codex in T3 Code.

Synced from GitHub

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

ℹ️ No successful main baseline artifact is available yet. This run establishes the initial measurement.

ProviderMetricMain baselineThis PRImpactPR ceiling
CodexTotal thread wire—13.5 KiB—15.1 KiB✅
CodexThread snapshot wire—7.0 KiB—7.3 KiB✅
CodexLive turn WebSocket wire—6.5 KiB—7.8 KiB✅
CodexLive turn WebSocket decoded—57.0 KiB—66.4 KiB✅
CodexLive turn messages—8—21✅
ClaudeTotal thread wire—13.5 KiB—15.1 KiB✅
ClaudeThread snapshot wire—7.0 KiB—7.3 KiB✅
ClaudeLive turn WebSocket wire—6.5 KiB—7.8 KiB✅
ClaudeLive turn WebSocket decoded—57.8 KiB—66.4 KiB✅
ClaudeLive turn messages—9—21✅

Baseline: unavailable · PR result: e36f20d · 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: 113.8 KiB
  • Claude decoded thread snapshot: 114.5 KiB

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

Synced from GitHub

Approvability

A prior Macroscope approval was dismissed. Re-evaluating 38c1d41…

No code changes detected at e36f20d. Prior analysis still applies.

Synced from GitHub

Bugbot is paused — on-demand spend limit reached

Bugbot uses usage-based billing for this team and has hit its on-demand spend limit.

A team admin can raise the spend limit in the Cursor dashboard, or wait for the next billing cycle to continue.

Added 2 commits

  • refactor(contracts): keep runtime and RPC schemas privateaa2afc0
  • refactor(contracts): preserve runtime schemas and type exportse36f20d
Synced from GitHub

Bugbot is paused — on-demand spend limit reached

Bugbot uses usage-based billing for this team and has hit its on-demand spend limit.

A team admin can raise the spend limit in the Cursor dashboard, or wait for the next billing cycle to continue.