Skip to content

Merge upstream/main (42160f2925): sync 230 upstream commits, preserve Cline, Freebuff, cloud runtimes and OpenCode providers - #10

Merged
ArturLauche merged 231 commits into
mainfrom
sync/upstream-2026-10-13
Oct 13, 2026
Merged

ArturLauche merged 231 commits into
mainfrom
sync/upstream-2026-10-13

Conversation

@ArturLauche

Copy link
Copy Markdown
Owner

Upstream version synchronized

Merges pingdotgg/t3code main @ 42160f2925 into the fork.

Upstream tip 42160f2925
Previous merge base 98beed1a22 (the tip merged in by PR #9)
Upstream commits integrated 230
Fork-only commits preserved 34
Files changed 1269 (+70,791 / −16,226)

The local checkout was first verified against origin/main (ee93219009) before any work; main was not modified. An earlier attempt had a merge in progress against a stale upstream tip (511d20c6f2, 31 commits behind), which was aborted in favour of one clean merge against the true target.

Important upstream changes incorporated

  • Reworked provider-secret handling. Settings secrets are now walked generically through a schema-driven mapSettingsSecrets helper (apps/server/src/settingsSecrets.ts) instead of hand-rolled per-field code. Replaces ~250 lines of bespoke logic for provider config, provider environment, source-control host tokens and usage-limit keys.
  • Source-control host settings refactor (#17901). The legacy github/bitbucket settings keys are retired in favour of per-host definitions under sourceControlHosts, with a migration that moves stored secrets to their new names.
  • Claude Agent SDK startup. query() is now started under Effect.uninterruptibleMask, registers MCP servers through queryRuntime.setMcpServers with a registration timeout, and closes the CLI if anything before the session is handed out fails.
  • clientCapabilitiesMeta is now schema-typed (InitializeRequest["clientCapabilities"]["_meta"]) rather than Record<string, boolean>.
  • ProviderTextGeneration gained generateReviewGuide, and resolveReviewGuideModelSelection / resolveSourceControlWriterModelSelection now choose a review-guide writer.
  • fallbackTextGenerationModelSelection returns a full ModelSelection instead of a driver kind, resolving the model internally.
  • Text-generation model fallback is candidate-driven. TEXT_GENERATION_FALLBACK_DRIVERS enumerates the drivers eligible for titles, commit messages and PR descriptions.
  • Removed the web ComputerUseAppIcon in favour of a local BrowserAppIcon (#18865), and moved @ff-labs/fff-node to 0.11.0 plus an effect-acp package split.
  • Dependency and build-config updates across Expo 58, @effect/* 4.0.2 and the vendored react-native-enriched-markdown tarball.

Conflicts encountered and how they were resolved

12 files conflicted. Each was investigated on both sides rather than taken wholesale.

File Resolution
pnpm-workspace.yaml Union. The fork added protobufjs: true to allowBuilds; upstream added the vendored react-native-enriched-markdown tarball. Both are still needed (protobufjs arrives via @grpc/proto-loader ← @daytona/sdk), so both were kept, alphabetically ordered.
packages/provider-acp/.../adapter.ts Union. Kept the fork's supportsMcpTooling (used by Cline and Freebuff, which ignore the MCP servers T3 registers) and adopted upstream's tighter clientCapabilitiesMeta type. Verified upstream's own consumers pass boolean-valued _meta, so the narrower type is safe.
packages/contracts/src/settings.ts Kept the fork's ProviderInstanceConfigMapPatch (per-entry patches that tolerate older clients omitting executionTarget) and CloudRuntimeConfigMapPatch, and adopted upstream's sourceControlHosts.
packages/shared/src/serverSettings.ts Kept the fork's ProviderInstanceConfig import — its mergeProviderInstancePatches is what preserves executionTarget when a client omits it. Upstream only stopped needing the type, it did not remove it.
apps/server/src/serverSettings.ts (7 hunks) The largest change; see below.
apps/server/src/serverSettings.test.ts Union of both test groups — the fork's 4 OpenCode secret-lifecycle tests and upstream's 2 generic secret-lifecycle tests.
packages/shared/src/serverSettings.test.ts Kept the fork's cloud-runtime per-entry merge test; adopted upstream's test title, since the body was auto-merged onto sourceControlHosts.
packages/contracts/src/settings.test.ts Union of imports (fork's CloudRuntimeConfig/FreebuffSettings, upstream's CommandId).
Adapters/ClaudeAdapterV2.ts Kept upstream's uninterruptibleMask + setMcpServers startup, and preserved the fork's spawnClaudeCodeProcess (the cloud sandbox spawner) inside the SDK options it builds. Both are valid: upstream's own test also passes spawnClaudeCodeProcess via options.
apps/web/src/components/Icons.tsx Kept the fork's FreebuffIcon and ClineIcon. Dropped ComputerUseAppIcon, which upstream intentionally deleted and replaced with a local BrowserAppIcon in MessagesTimeline.tsx; nothing referenced it any more, so keeping it would have been dead code.
apps/server/scripts/acp-mock-agent.ts Kept the fork's hangSetConfigOption stall and adopted upstream's failSetModeConfigOption condition.
ThreadSettingsSheet.tsx (mobile) Took upstream's import block, a strict superset.

The serverSettings.ts secret-handling port

Upstream replaced the fork's hand-rolled secret code with the generic walker. The fork's two fork-specific behaviours do not live in any settings schema, so the generic pass cannot see them; both were re-attached as explicit layers on top of upstream's machinery:

  • OpenCode provider API keys live at config.providers.<id>.apiKey, a nested blob behind the driver's own apiKeyRedacted marker, hidden from the generic driver form. Redaction, materialization and write/removal planning are preserved as a dedicated pass (redactOpenCodeProviderInstanceSecrets, withOpenCodeProviderKeys, persistedSettings) around upstream's walker.
  • Cloud runtime credentials live outside settings.json. The removal of a runtime's credential when the runtime is deleted or its vendor/endpoint identity changes is preserved unchanged.

The obsolete per-field code upstream replaced (providerEnvironmentSecretName, usageLimitSourceSecretName, BITBUCKET_SECRET_NAMES, gitHubTokenSecretName, redactSecret, redactProviderEnvironmentVariable and the local SECRET_REDACTED) was removed as dead. Upstream's migrateLegacySourceControlSettings already covers the legacy github/bitbucket migration, so no duplicate was left behind.

How fork functionality was preserved or adapted

All 152 fork-touched files survive, and every fork feature is still registered and reachable, not merely present:

  • Cline ACP provider — provider, driver, orchestration adapter, ACP support, contracts, web + mobile UI, icons, docs.
  • Freebuff provider — provider, driver, screen renderer, screen catalogue, config, orchestration adapter.
  • Configurable remote/cloud agent execution — the fork-only packages/cloud-runtime workspace, CloudRuntimeService, VendorAdapter, CloudExecutionSpawner, credential naming, CloudClaudeSpawner, and the web/mobile cloud-runtime settings screens. Upstream never had this package, so it merged with no conflict.
  • OpenCode providers and models in Settings — contracts, config helpers, secret handling, settings section and its logic module.
  • Fork CI — fork-ci.yml, fork-docker.yml, fork-preview-windows.yml, Dockerfile, server test shard weights.

Two adaptations worth calling out:

  • Freebuff text-generation protection. The fork guarded against Freebuff's opaque session model becoming a text-generation fallback. Upstream's rewrite returns a full ModelSelection from fallbackTextGenerationModelSelection, which changes the calling convention. Adopting upstream's version is safe because freebuff is absent from TEXT_GENERATION_FALLBACK_DRIVERS, so it can never be selected — the protection now holds structurally rather than through a guard. Verified this rather than assuming it.
  • Cloud spawner on the new Claude startup. Ported onto upstream's uninterruptibleMask flow so a remote Claude process is still spawned through makeCloudClaudeSpawner while MCP registration and CLI cleanup behave as upstream intends.

Additional compatibility fixes required by the update

  • apps/server/src/textGeneration/unsupportedTextGeneration.ts did not implement upstream's new generateReviewGuide, which broke the server typecheck. Added it, and updated the user-facing error detail to mention review guides.
  • Removed the DEFAULT_TEXT_GENERATION_MODEL_BY_PROVIDER import from serverSettings.ts, which became unused once upstream's fallback-selection call shape was adopted.
  • Confirmed the fork's @daytona/* minimumReleaseAgeExclude entries survived the merge. Upstream dropped Daytona from that list; had the merge taken upstream's deletion, the fork's @daytona/sdk dependency would have lost its release-age exemption while still being present in the lockfile.
  • Removed ComputerUseAppIcon as the dead code upstream's deletion left behind.

Validation performed

Check Command Result
Install pnpm install --no-frozen-lockfile ✅ clean; merged lockfile reconciled (fork's @daytona/sdk and protobufjs retained)
Typecheck (all workspaces) vp run -r --concurrency-limit 2 typecheck ✅ 0 errors
Typecheck (merge-critical packages) vp run --filter @t3tools/contracts --filter @t3tools/shared --filter @t3tools/provider-acp typecheck ✅ 0 errors
Lint vp lint --report-unused-disable-directives ✅ exit 0, 0 errors (pre-existing warnings only)
Format vp fmt --check ✅ all 5674 files correctly formatted
Settings/secret tests serverSettings.test.ts, shared/serverSettings, contracts/settings ✅ 290 passed — includes the fork's OpenCode secret lifecycle tests and upstream's generic ones
Fork feature tests Cline, Freebuff, OpenCode secrets, provider registry/compatibility, cloud runtime, web + mobile Cline/OpenCode settings ✅ all passed
Licenses node scripts/sync-third-party-license-notices.ts --check ✅ exit 0

Known-failing tests, all pre-existing and environmental

These are not caused by this merge; each was verified.

  • apps/server/src/provider/ClineProvider.test.ts — 5 tests time out spawning the fake CLI. Verified pre-existing: checked out the pre-merge fork (ee93219009) in a separate worktree with its own install and got the identical 5 failures with identical timings.
  • apps/server/src/sourceControl/SourceControlDiscovery.test.ts — 2 tests. Ambient GH_TOKEN/GH_HOST in this environment makes real auth probing fail. Verified: the file passes 3/3 with those variables unset.
  • apps/server/src/terminal/Manager.test.ts — 1 test. preserves non-notFound cwd stat failures relies on chmod 000 blocking a stat, which root (uid 0) bypasses.
  • node scripts/export-brand-icons.ts --check requires macOS Icon Composer; unavailable on Linux.

Review notes

  • No fork file was deleted, and no duplicate logic was left behind: the settings migration exists once, and the dead per-field secret helpers were removed rather than orphaned.
  • Unrelated refactoring was deliberately avoided — the diff is upstream's 230 commits plus the conflict resolutions and the two compatibility fixes listed above.

🤖 Generated with opencode/space-bunny-free (opencode, Space Bunny Free model)

Yash-Singh1 and others added 30 commits October 10, 2026 09:50
…dotgg#17223)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Yash Singh <saiansh2525@gmail.com>
…ingdotgg#17843)

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…g#17724)

Co-authored-by: maria-rcks <254055478+maria-rcks@users.noreply.github.com>
… full-access MCP grants (pingdotgg#17772)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…pull request (pingdotgg#12223)

Co-authored-by: t3-code[bot] <269035359+t3-code[bot]@users.noreply.github.com>
Co-authored-by: Julius Marminge <51714798+juliusmarminge@users.noreply.github.com>
Co-authored-by: Julius Marminge <jmarminge@gmail.com>
Signed-off-by: Loïs Postula <lois@postu.la>
…slug (pingdotgg#17739)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…finitions (pingdotgg#17756)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…tions (pingdotgg#17757)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…host resolvers (pingdotgg#17770)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…ot GitHub (pingdotgg#17774)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…tgg#17898)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…artial (pingdotgg#17761)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…the thread (pingdotgg#17764)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…17896)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…ith a GitCafe token (pingdotgg#17901)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…ingdotgg#17714)

Co-authored-by: maria-rcks <254055478+maria-rcks@users.noreply.github.com>
Yash-Singh1 and others added 25 commits October 12, 2026 20:04
…page (pingdotgg#18666)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…ingdotgg#16554)

Co-authored-by: PR Batch Tester <agent@local.test>
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
… you to a new draft (pingdotgg#18672)

Co-authored-by: PR Batch Tester <agent@local.test>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…ct (pingdotgg#18824)

Co-authored-by: PR Batch Tester <agent@local.test>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…stead of crash-looping (pingdotgg#15925)

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-authored-by: PR Batch Tester <agent@local.test>
… resync after a downgrade (pingdotgg#15937)

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
Co-authored-by: PR Batch Tester <agent@local.test>
… MCP servers (pingdotgg#17058)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Yash Singh <saiansh2525@gmail.com>
…ught (pingdotgg#18887)

Co-authored-by: maria-rcks <254055478+maria-rcks@users.noreply.github.com>
…is offline (pingdotgg#18698)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…18853)

Co-authored-by: SAPHID <saphid@users.noreply.github.com>
Co-authored-by: GPT-6.1 Sol <noreply@openai.com>
pingdotgg#18900)

Co-authored-by: Pawel Mikolajczuk <pmikolajczuk@atlassian.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Syncs 230 upstream commits (merge base 98beed1) into the fork while
keeping its Cline, Freebuff, cloud-runtime and OpenCode-provider features.

Conflict resolutions:
- pnpm-workspace allowBuilds: kept both the fork's `protobufjs` and upstream's
  vendored react-native-enriched-markdown tarball.
- provider-acp AcpAdapterV2Flavor: kept the fork's `supportsMcpTooling` and
  adopted upstream's schema-derived `clientCapabilitiesMeta` type.
- contracts/shared serverSettings: kept the fork's ProviderInstanceConfigMapPatch
  and CloudRuntimeConfigMapPatch alongside upstream's sourceControlHosts, which
  retires the legacy `github` patch field.
- server/serverSettings: ported the fork's OpenCode provider API keys and cloud
  credential cleanup onto upstream's schema-driven mapSettingsSecrets walker,
  which replaces the hand-rolled per-field secret handling.
- serverSettings tests: kept the fork's OpenCode secret lifecycle tests and
  upstream's generic secret-lifecycle tests.
- ClaudeAdapterV2: kept the fork's cloud spawnClaudeCodeProcess on top of
  upstream's uninterruptible query startup and setMcpServers registration.
- web Icons: kept the fork's Freebuff and Cline marks; dropped
  ComputerUseAppIcon, which upstream replaced with a local BrowserAppIcon.

Integration fixes:
- unsupportedTextGeneration: added generateReviewGuide for upstream's widened
  ProviderTextGeneration interface.
- Removed the now-unused DEFAULT_TEXT_GENERATION_MODEL_BY_PROVIDER import.
@coderabbitai

coderabbitai Bot commented Oct 13, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Configuration used: Path: .coderabbit.config.ts
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 60f71de2-47f4-4d25-8761-59263c276657
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:XXL labels Oct 13, 2026
@ArturLauche
ArturLauche merged commit 17333df into main Oct 13, 2026
8 of 25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XXL vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.