Skip to content

refactor(codex): integrate effect-codex-app-server and remove legacy manager#65

Merged
tyulyukov merged 6 commits into
mainfrom
marcode/port-codex-effect-refactor
Apr 23, 2026
Merged

refactor(codex): integrate effect-codex-app-server and remove legacy manager#65
tyulyukov merged 6 commits into
mainfrom
marcode/port-codex-effect-refactor

Conversation

@tyulyukov
Copy link
Copy Markdown
Owner

Summary

  • Removes legacy codexAppServerManager.ts (~1632 lines) and its test suite (~1218 lines) which centralized all Codex RPC protocol handling, session management, and approval/user-input tracking
  • Introduces effect-codex-app-server package with Effect-based architecture for cleaner protocol composition and error handling
    • Generated schema bindings from Codex protocol definitions
    • RPC client and server implementations with typed request/response handling
    • Protocol definitions, error types, and utilities
  • Updates provider layer (CodexAdapter, CodexProvider, CodexSessionRuntime) to use the new package APIs instead of the legacy manager
  • Adds CodexDeveloperInstructions.ts with collaboration mode configuration (plan/default modes)
  • Adds path expansion utilities for CODEX_HOME environment variable handling

Testing

  • Existing tests for provider layers (CodexAdapter, CodexProvider, ProviderRegistry) updated to work with new APIs
  • Generated code from protocol bindings verified against Codex protocol version be75785504ff152fa6333e380a2d50642f42fba0
  • Path expansion tested with pathExpansion.test.ts for tilde expansion behavior
  • Not run: Live Codex integration tests (requires CODEX_BINARY_PATH environment variable)

juliusmarminge and others added 6 commits April 24, 2026 00:09
Co-authored-by: codex <codex@users.noreply.github.com>
…f42fba0` (pingdotgg#2276)

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
…gdotgg#2210)

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: = <=>
Upstream pingdotgg#1942 dropped this import assuming the corresponding describe
block was already gone, but that block-removal commit was never ported
to MarCode. MarCode still exports PROVIDER_OPTIONS and still has the
describe block, so the import must stay until/unless we also port the
block-removal.
Completes the rebrand pass that landed partially in 5ad43ef — the
prior commit only covered Codex-adjacent files. This sweeps every
user-facing "T3 Code" string, every `t3/provider/Services/...` service
tag, Cursor/OpenCode/Claude disabled messages, OpenCode version
upgrade copy, OpenCode title templates, SettingsPanels tooltip, and
scattered test fixtures (fake paths, tempfile prefixes, bootstrap
branch name, T3CODE_CURSOR_ENABLED env var) to MarCode.

Kept on purpose:
- apps/web/src/uiStateStore.ts `LEGACY_PERSISTED_STATE_KEYS` — these
  are backward-compat migration keys so T3 Code users keep their UI
  state when upgrading to MarCode. Removing them drops that path.
- apps/web/src/featureGuards.test.ts string literals — they are the
  forbidden-token patterns the regression guard searches for.
- AGENTS.md "pingdotgg/t3code" — legitimate reference to the upstream
  fork source, not user-facing.

Test side-effect: ProviderRegistry.test.ts and providerStatusCache
.test.ts now assert the rebranded error strings, matching source.
Reverts the user-facing default chosen in 4c32418 ("set Opus 4.7
default effort to High"). Per request, Extra High is the preferred
default. Adapter test updated: with xhigh default, the SDK receives
`max` (per the existing xhigh→max mapping in ClaudeAdapter).
@tyulyukov tyulyukov merged commit 9979500 into main Apr 23, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants