Repository navigation
chore: sync upstream orchestration V2 and rebuild the embedded runtime - #6
Conversation
…dotgg#13389) Co-authored-by: javiergusart <42075376+javiergusart@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…otgg#13480) Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…gg#13481) Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…ingdotgg#13506) Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…ngdotgg#13504) Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-authored-by: t3-code[bot] <269035359+t3-code[bot]@users.noreply.github.com> Co-authored-by: Utkarsh Patil <73941998+UtkarshUsername@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…dotgg#12006) Desktop updates deleted the managed tunnel at shutdown, so remote clients spent about two minutes reconnecting after an 11 second restart. The desktop app now writes a restart marker before it stops its backends for any install, local or remote. The server keeps the tunnel when it finds a fresh marker at shutdown and consumes it. Failed or interrupted installs delete the marker. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com> Co-authored-by: Julius Marminge <julius0216@outlook.com> Co-authored-by: Julius Marminge <51714798+juliusmarminge@users.noreply.github.com>
… showcase (pingdotgg#13522) Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…13523) Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…dotgg#13474) Co-authored-by: Julius Marminge <julius0216@outlook.com> Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Pin each terminal status pulse to the document timeline when it starts, so running-terminal icons in both sidebars and the command palette share one cycle. Terminal pulses now respect prefers-reduced-motion. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…mits (pingdotgg#12799) Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
…ss environments (pingdotgg#12588) Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com> Co-authored-by: macroscopeapp[bot] <170038800+macroscopeapp[bot]@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Co-authored-by: Julius Marminge <julius0216@outlook.com>
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…tgg#13548) Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…scroll (pingdotgg#13555) Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…eads (pingdotgg#13551) Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…gdotgg#13547) Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…3534) Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…gdotgg#13558) Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…in (pingdotgg#13553) Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…gg#13554) Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…retries back off (pingdotgg#15034) Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…otgg#15041) Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
… path (pingdotgg#15021) Co-authored-by: maria-rcks <254055478+maria-rcks@users.noreply.github.com>
pingdotgg#15005) Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…ngdotgg#15055) Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…thread (pingdotgg#15050) Co-authored-by: maria-rcks <254055478+maria-rcks@users.noreply.github.com>
…gdotgg#15059) Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…gg#15101) Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…waiting (pingdotgg#15114) Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…ion (pingdotgg#14910) Co-authored-by: Theo Browne <me@t3.gg>
…dotgg#15060) Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…tgg#15108) Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Merge pingdotgg/t3code main. Upstream replaced the V1 provider adapters with orchestration-v2 adapters, so the fork's Claude and Codex adapter patches are dropped with the deleted files. Fork-owned workflows, the publishable contracts manifest, and the Claude SDK staging rules are preserved. The embedded provider-runtime is rebuilt on the V2 adapters in the next commit.
(cherry picked from commit c8c26c4)
… V2 adapters Upstream deleted the V1 Claude and Codex adapters the embedded runtime wrapped. The runtime now creates ClaudeAdapterV2 and CodexAdapterV2 instances and keeps the host contract: startSession opens a V2 session and thread, sendTurn starts a run or steers the active one, and interruptTurn waits for the provider turn id. A new legacy-events module translates ProviderAdapterV2Event into the flat ProviderRuntimeEvent stream hosts consume. The resume cursor is the encoded OrchestrationV2ProviderThread; older cursors start a fresh thread. Fork adaptations move with upstream: ClaudeAdapterV2 loads the Claude SDK on first use so Codex-only hosts do not install it, and a lazy-load test guards the import graph. The contracts package keeps publishing declaration files with explicit annotations for OrchestrationV2RpcSchemas and WsRpcGroup (TS7056), and two Codex interfaces are exported so the runtime bundle can name them. The sync workflow verifies the V2 lazy test instead of the deleted adapter tests.
The TypeScript 7 declaration generator writes a .d.ts next to every server source the runtime bundle visits, and the pack options cannot redirect it. The pack hooks record the declaration files that exist before a build and delete the ones the build added.
|
Waiting to start. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
💡 Codex Reviewt3code/packages/provider-runtime/src/index.ts Lines 513 to 519 in cd2aa67 When an existing host passes t3code/packages/provider-runtime/src/index.ts Lines 609 to 611 in cd2aa67 When a host seeds a configured t3code/packages/provider-runtime/src/legacy-events.ts Lines 375 to 378 in cd2aa67 For a long-lived embedded session, every completed turn remains in all three run maps, while its nodes, items, requests, and completed subagents likewise remain in their registries; terminalization only flips a flag and clears AGENTS.md reference: AGENTS.md:L15-L17 ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
pnpm pack cannot resolve a workspace dependency on the private shared package, which failed the preview publish. The runtime imports the host environment reference through the repository path instead.
💡 Codex Reviewt3code/packages/provider-runtime/src/index.ts Line 594 in cb8ae81 When a host recreates the runtime from a t3code/packages/provider-runtime/src/index.ts Line 626 in cb8ae81 For both providers, a successful ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
commit: |
The Claude V2 adapter resumes a native session only when the provider turn ordinal is above one. A resumed embedded session started counting at zero, so the first turn after a restart opened a new session with the stored session id and failed. The run ordinal now continues from the resumed thread, and the cursor returned by sendTurn records the started run so hosts that persist it before the turn settles can resume. Verified with live Codex and Claude turns: reply, restart, resume with memory, and interrupt.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Summary
The daily upstream sync has failed since 2026-09-25 because upstream merged orchestration V2 (pingdotgg#2829), which deleted the V1
ClaudeAdapter,CodexAdapter, andProviderAdaptermodules the embedded@t3tools/provider-runtimewrapped. This PR mergesupstream/main(1238 commits) and rebuilds the runtime on the V2 adapters while keeping the host contract stable.mainthroughfix(server): runs no longer get stuck (#15048). Fork-owned workflows, the publishable@t3tools/contractsmanifest, and the Claude SDK staging rules are preserved; the fork's edits to the deleted V1 adapters are dropped.createProviderRuntimecreatesClaudeAdapterV2/CodexAdapterV2instances.startSessionopens a V2 session and thread,sendTurnstarts a run or steers the active one,interruptTurnwaits for the provider turn id. The newlegacy-events.tstranslatesProviderAdapterV2Eventinto the flatProviderRuntimeEventstream hosts consume (item.*,content.delta,request.*,user-input.*,turn.completed,turn.aborted,thread.token-usage.updated,task.*). The resume cursor is now the encodedOrchestrationV2ProviderThread; older cursors start a fresh thread.ClaudeAdapterV2loads the Claude SDK on first use (Codex-only hosts do not install it), guarded byClaudeAdapterV2.lazy.test.ts.OrchestrationV2RpcSchemasandWsRpcGroupget explicit type annotations because their inferred types exceed the declaration serialization limit (TS7056); two Codex interfaces are exported so the bundle's declarations can name them..d.tsfiles the TypeScript 7 generator writes beside server sources.sync-upstream.ymlverifies the V2 lazy test instead of the deleted adapter tests;docs/internals/embedded-provider-runtime.mddescribes the V2 mapping.Validation
vp run --filter @t3tools/contracts buildandtypecheckvp run --filter @t3tools/provider-runtime build(bundle externals:effect/*,node:*,@t3tools/contracts; no__require("process"|"buffer"); no stray declarations)tsc --noEmitinpackages/provider-runtimevp test run packages/provider-runtime/src apps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.lazy.test.ts(21 tests, including the packed-artifact consumer test)vp test run apps/server/src/provider/Layers/ProviderRegistry.test.ts apps/server/src/provider/Layers/codexUsageLimits.test.ts apps/server/src/provider/Layers/claudeUsageLimits.test.ts scripts/lib/cli-external-packages.test.ts(103 tests)vp lintandvp fmt --checkon the changed filesNot verified: a live Claude or Codex turn through the new runtime. The vitehub consumer bump will exercise it.