diff --git a/notes/codex-auth-spine-inventory.md b/notes/codex-auth-spine-inventory.md index 676b48b2..b70dae2d 100644 --- a/notes/codex-auth-spine-inventory.md +++ b/notes/codex-auth-spine-inventory.md @@ -1,7 +1,22 @@ # Codex Auth Spine Inventory This is the keeper list for the vestigial Codex organ. Anything not justified -here is suspect until proven otherwise. +here is suspect until proven otherwise. The organ must stay honest: Epiphany is +a modified Codex-derived backend with a native CultCache/CultNet body, not a +clean-room client pretending to be Codex. + +## Compliance Invariant + +- Keep Codex-compatible auth identity anchored in vendored Codex-derived + machinery. Do not fully replace Codex auth with a lookalike native + implementation unless OpenAI provides an explicit public path or permission + for that use. +- It is fine to cut Codex apps, skills, marketplace, plugin UX, broad + app-server workflow, and generic JSON control surfaces. Those are product and + workflow organs, not subscription-auth legitimacy. +- The retained auth/model organ should be brutally thin, but it must be real: + load/refresh credentials, preserve required client headers/identity, + respect subscription limits, and call the allowed Codex/OpenAI model route. ## Live Spine @@ -18,9 +33,11 @@ here is suspect until proven otherwise. ### Durable Stores -- Codex auth storage under the configured Codex home, loaded by - `vendor/codex/codex-rs/login/src/auth/manager.rs`. -- Auth token state in `CodexAuth` / `ChatgptAuthState`, including refreshable +- Codex auth storage under the configured Codex home. The legal/compliance + authority should remain vendored Codex-derived auth machinery such as + `vendor/codex/codex-rs/login/src/auth/manager.rs`, even when Epiphany wraps + it in typed status documents. +- Auth token state in Codex-compatible auth records, including refreshable ChatGPT tokens and account metadata. - No durable model/provider state is owned by the current OpenAI spine. The model string is request data; catalog/default selection must become a typed @@ -28,16 +45,21 @@ here is suspect until proven otherwise. ### Transformations -- `epiphany-openai-auth-spine` loads env, file, keyring, and auto-fallback - Codex auth, refreshes ChatGPT access tokens, preserves account metadata, and - exposes the auth subset needed by the Epiphany OpenAI transport. +- `epiphany-openai-auth-spine` currently loads env, file, keyring, and + auto-fallback Codex auth, refreshes ChatGPT access tokens, preserves account + metadata, and exposes the auth subset needed by the Epiphany OpenAI + transport. This is now suspect because it has copied too much auth machinery + out of vendored Codex; the spine should become a typed wrapper over retained + Codex-compatible auth rather than a clean-room replacement. - `epiphany-openai-codex-spine` converts `CodexAuth` directly into authorization/account headers, chooses the ChatGPT Codex backend or OpenAI API base URL from auth mode, builds a local serializable Responses request body, opens an HTTP/SSE stream through `codex-client`, and parses Responses frames into typed Epiphany stream events. -- `codex-login` remains in `vendor/codex` as reference/legacy Codex host - machinery, but it is no longer in the native Epiphany OpenAI spine graph. +- `codex-login` remains in `vendor/codex` and should be treated as keeper + auth machinery or the source for a thin vendored auth organ. Removing it from + the native request graph may be an overcut if it makes Epiphany look like an + impersonating client instead of a modified Codex backend. ### Outputs @@ -50,11 +72,10 @@ here is suspect until proven otherwise. ## Keep -- `epiphany-openai-auth-spine`: keep as the native credential compatibility - organ. It knows the path Epiphany actually uses now: `CODEX_API_KEY` / - `OPENAI_API_KEY`, `$CODEX_HOME/auth.json`, Codex keyring entries, auto - keyring/file fallback, ChatGPT token refresh, account id, plan metadata, - FedRAMP flag, and the standard HTTP client edge. +- `epiphany-openai-auth-spine`: keep only as a typed Epiphany wrapper/status + surface around Codex-compatible auth. It should not pretend to be the legal + authority for subscription credentials by cloning the auth behavior outside + vendored Codex. - `codex-client`: keep only as a plain HTTP/SSE transport helper for now. It does not own Epiphany request shape, model policy, stream semantics, or durable state. @@ -71,10 +92,11 @@ here is suspect until proven otherwise. suspicious unless Epiphany deliberately needs that OpenAI endpoint. Keep them sealed with the transport until the native adapter split can decide. - `codex-api`, `codex-model-provider`, `codex-model-provider-info`, - `codex-login`, `codex-core::client`, and `models-manager` are no longer part - of the native OpenAI spine graph. If a later model catalog is needed, it - should be a typed Epiphany catalog document, not a revival of the old Codex - provider stack. + `codex-core::client`, and `models-manager` are no longer keeper request-path + organs. `codex-login` is different: broad login UX can be cut, but the + vendored Codex auth semantics should remain the anchor for subscription use. + If a later model catalog is needed, it should be a typed Epiphany catalog + document, not a revival of the old Codex provider stack. - Native auth does not yet preserve every Codex auth mode. External bearer command auth and agent identity are legacy/reference gaps unless a concrete user path proves they are needed. @@ -85,7 +107,7 @@ Create an outside-vendor adapter with this shape: ```text EpiphanyOpenAIAuthAdapter - -> load/refresh credentials + -> wrap retained Codex-compatible credential loading/refresh -> expose account/auth mode/model availability EpiphanyOpenAIModelTransport @@ -94,10 +116,11 @@ EpiphanyOpenAIModelTransport -> emit typed stream events / receipts ``` -The adapter may depend on `epiphany-openai-auth-spine` and `codex-client` only -while the reliquary survives. It must not depend on -`codex-app-server`, `codex_message_processor`, plugin/app/skill/marketplace -modules, Codex provider/request construction, or Epiphany state ownership. +The adapter may depend on `epiphany-openai-auth-spine`, retained Codex auth +machinery, and `codex-client` while the reliquary survives. It must not depend +on `codex-app-server`, `codex_message_processor`, plugin/app/skill/marketplace +modules, broad Codex provider/request construction, or Epiphany state +ownership. ## Next Cut @@ -177,15 +200,12 @@ application. `codex-core` re-exports the contract only as a compatibility alias, and `CodexThread` now calls native state-update functions around its remaining revision check, persistence validation, and rollout/session writeback. -The credential extraction now covers Codex file/keyring/auto auth plus env API -keys, ChatGPT token refresh, account metadata, and header material. -`epiphany-openai-codex-spine` uses `AuthCredentialsStoreMode::Auto` by default, -so native runtime calls preserve normal Codex keyring storage without importing -`codex-login`. `cargo tree` for `epiphany-openai-codex-spine` now finds no -`codex-login`, `codex-api`, `codex-protocol`, `codex-app-server-protocol`, or -model-provider crates. The remaining question is whether external -bearer-command auth or agent identity deserves native implementation or should -remain a sealed legacy Codex path. +The credential extraction currently covers Codex file/keyring/auto auth plus +env API keys, ChatGPT token refresh, account metadata, and header material +without importing `codex-login`. That is technically clean but architecturally +suspect under the compliance invariant above. The next corrective cut is to +re-anchor auth in retained vendored Codex-compatible machinery while keeping +Epiphany's typed adapter/status/request surfaces outside the Codex host brain. The point is ownership: Epiphany calls a model adapter; it does not live inside the Codex host brain. diff --git a/notes/codex-starvation-and-cultnet-liberation-plan.md b/notes/codex-starvation-and-cultnet-liberation-plan.md index f740151f..6d641aa0 100644 --- a/notes/codex-starvation-and-cultnet-liberation-plan.md +++ b/notes/codex-starvation-and-cultnet-liberation-plan.md @@ -5,8 +5,9 @@ This is the new foundation directive. The previous control-plane rebuild made Epiphany cleaner inside Codex. That was useful, but it is no longer the target. The target is not a better parasite inside the Codex organ. The target is Epiphany as its own CultCache/CultNet -machine, with Codex reduced to the smallest OpenAI subscription compatibility -reliquary that can authenticate and call models. +machine, with Codex reduced to the smallest honest OpenAI subscription +compatibility reliquary that can authenticate and call models as a modified +Codex-derived client. No outward product, bridge, Aquarium, Face, dogfood, Unity, Rider, planning, or personality work outranks this liberation pass unless the user explicitly @@ -20,8 +21,8 @@ Free Epiphany from heretek contamination: - subsystem communication is CultNet typed messages and mutation contracts - JSON exists only as schema description, wire compatibility at hostile edges, or explicitly quarantined forensic/import material -- vendored Codex stops being a host brain and becomes an OpenAI auth/model-call - adapter +- vendored Codex stops being a host brain and becomes an honest OpenAI + auth/model-call compatibility organ ## Current Mechanism @@ -60,6 +61,11 @@ This is cleaner than the earlier Jenga pile. It is still the wrong organ. - deliberately named quarantine experiments with an expiration path - OpenAI subscription compatibility is the only long-term reason to preserve a Codex-derived organ. +- Epiphany must remain Codex-compatible rather than merely Codex-impersonating. + Do not replace vendored Codex auth semantics with a lookalike implementation + just because it is technically possible; keep enough Codex-derived auth/model + machinery that the system is honestly a modified Codex backend, not a fake + client tunnel. - Codex apps, skills, marketplace, broad app-server lifecycle, plugin UX, and JSON-RPC surface sprawl are not Epiphany foundations. - MCP support may survive, but as a separate CultNet-speaking adapter, not as a @@ -70,7 +76,9 @@ This is cleaner than the earlier Jenga pile. It is still the wrong organ. Keep or extract: - OpenAI authentication/session compatibility needed for the user's Codex - subscription + subscription; this should remain anchored in Codex-derived auth machinery + unless the user obtains explicit permission or a public first-party API path + makes that unnecessary - model request/response transport required to use that auth - any model/tool streaming primitives that are truly cheaper to extract than rewrite @@ -113,9 +121,11 @@ OpenAIModelTransport LegacyCodexImportBridge, only if needed ``` -The adapter may know how to refresh credentials and submit model calls. It must -not own Epiphany state, scheduling, view derivation, worker lifecycle, -operator APIs, plugin UX, app discovery, marketplace state, or document truth. +The adapter may know how to refresh credentials and submit model calls. It +should preserve Codex-compatible identity and auth semantics rather than +pretending to be official Codex from a clean-room clone. It must not own +Epiphany state, scheduling, view derivation, worker lifecycle, operator APIs, +plugin UX, app discovery, marketplace state, or document truth. ## Ranked Liberation Plan @@ -133,7 +143,8 @@ Map the smallest Codex auth/model-call path: Output: `notes/codex-auth-spine-inventory.md` with keep/cut/extract verdicts. Success: every retained Codex dependency is justified by OpenAI subscription -compatibility or model transport. +compatibility, Codex-compatible auth identity, or model transport; every cut is +justified as workflow/product bulk rather than auth impersonation. ### 2. JSON Contamination Ledger diff --git a/notes/fresh-workspace-handoff.md b/notes/fresh-workspace-handoff.md index 11df44df..ac0fc531 100644 --- a/notes/fresh-workspace-handoff.md +++ b/notes/fresh-workspace-handoff.md @@ -33,12 +33,12 @@ remembers doctrine; the branch remembers the blade. ## Current Orientation - Do not copy exact branch or HEAD from this note. Run `git status --short --branch` and `git log --oneline -5`. -- The active foundation directive is now `notes/codex-starvation-and-cultnet-liberation-plan.md`. The previous Codex app-server control-plane rebuild made Epiphany less rotten inside Codex, but that is not the destination. Epiphany must become a native CultCache/CultNet runtime. Codex is a compatibility reliquary for OpenAI subscription auth and model transport, not the host brain. -- `notes/codex-auth-spine-inventory.md` is the source-grounded keeper list for that reliquary: `epiphany-openai-auth-spine` is now the native credential organ for env/file/keyring/auto auth, ChatGPT token refresh, account metadata, and header material; `codex-client` remains only as a plain HTTP/SSE helper. `codex-login`, `codex-api`, `codex-model-provider`, `codex-model-provider-info`, `codex-core::client`, and `models-manager` are no longer keeper request-path organs; if model catalog/routing grows back, it should be an Epiphany typed document surface. +- The active foundation directive is now `notes/codex-starvation-and-cultnet-liberation-plan.md`. The previous Codex app-server control-plane rebuild made Epiphany less rotten inside Codex, but that is not the destination. Epiphany must become a native CultCache/CultNet runtime while remaining an honest modified Codex-derived backend for subscription auth/model use. Codex is a compatibility reliquary for OpenAI subscription auth and model transport, not the host brain and not a mask for impersonation. +- `notes/codex-auth-spine-inventory.md` is the source-grounded keeper list for that reliquary. Corrected compliance invariant: Codex-compatible auth identity should stay anchored in vendored Codex-derived auth machinery. The current `epiphany-openai-auth-spine` native credential implementation is technically clean but now suspect; it should become a typed wrapper over retained Codex auth rather than a clean-room replacement. Codex apps, skills, marketplace, plugin UX, broad app-server workflow, and JSON-RPC sprawl remain cuttable because they are not subscription-auth legitimacy. - Edge JSON is allowed for schema description, hostile ingress before immediate typed parsing, sealed forensic artifacts, or named quarantine experiments. When both subsystems are ours, runtime data must remain typed CultCache documents and move over CultNet typed contracts. Generic `serde_json::Value` in worker launch/result/selfPatch/runtime flow is contamination until classified and replaced. - `epiphany-openai-runtime` worker result ingress now parses assistant output directly into typed role/reorient ingress structs selected from the durable launch document, stores nested `statePatch` and `selfPatch` as typed MessagePack in `EpiphanyRuntimeRoleWorkerResult`, and no longer passes worker result data through generic `serde_json::Value`. JSON survives there only as the OpenAI text-output edge before typed deserialization. - Agent self-memory review/application now has typed `AgentSelfPatch` core APIs. JSON-value selfPatch functions are compatibility wrappers for CLI/artifact ingress; native callers should parse once at the edge and then call `review_agent_self_patch_document` / `apply_agent_self_patch_document`. -- `epiphany-openai-codex-spine` no longer uses Codex's Responses client, model-provider layer, `codex-api`, `codex-model-provider`, `codex-model-provider-info`, `codex-protocol`, or `codex-login` for outbound model requests. It uses `epiphany-openai-auth-spine` for env/file/keyring/auto credentials and ChatGPT token refresh, builds a local serializable OpenAI Responses body, opens the HTTP/SSE stream through `codex-client`, and parses Responses SSE frames into typed Epiphany stream events. `cargo tree` for the spine now finds no `codex-login`, `codex-api`, `codex-protocol`, `codex-app-server-protocol`, or model-provider crates. Caveat: external bearer command auth and agent identity are not native yet. +- `epiphany-openai-codex-spine` no longer uses Codex's Responses client, model-provider layer, `codex-api`, `codex-model-provider`, `codex-model-provider-info`, `codex-protocol`, or `codex-login` for outbound model requests. That cut may have gone too far on auth. Keep the typed request/status/event surfaces, but re-anchor credential loading/refresh in retained Codex-compatible auth before further transport purges. - Durable Epiphany state types now live in root crate `epiphany-state-model`. `codex-protocol` re-exports them only so old rollout/API callers keep compiling; do not add new durable `Epiphany*` state structs under `vendor/codex`. `epiphany-core` imports the native model directly and no longer depends on `codex-protocol`. Pressure derives from native `EpiphanyTokenUsageSnapshot`; Codex token telemetry is mapped at the bridge. Codex rollout/event reconstruction now lives in `codex-core::epiphany_rollout`, where the Codex `RolloutItem` / `EventMsg` types belong. Exact retrieval path matching is native to `epiphany-core`, so `epiphany-core` has no direct vendored Codex crate dependency. - The May 2026 foundation migration in `notes/epiphany-ideal-architecture-rebuild-plan.md` is complete enough to defend. Read `notes/epiphany-architectural-teardown.md` before touching Epiphany control-plane code, but do not treat it as an open-ended excuse to keep shaving the altar. The rebuild moved scene projection, freshness derivation, pressure policy, targeted context shards, bounded graph traversal, job/progress view derivation, planning view derivation, reorientation resume/regather verdict policy, pure CRRC recommendation policy, fixed-lane coordinator decision policy, role-board projection policy, role/reorient result interpretation, role self-persistence review policy, and role/reorient acceptance bundle policy into `epiphany-core`; typed acceptance receipts replaced summary-string identity for live accept paths, runtime links are dual-written on launch, and result read-back now prefers runtime links. - Read `notes/epiphany-ideal-architecture-rebuild-plan.md` immediately after the teardown. It defines the smallest coherent replacement architecture: durable `EpiphanyState`, runtime-spine-owned `RuntimeState`, separate role memory/heartbeat state, `epiphany-core` as policy owner, app-server as adapter, Aquarium as reflector, typed acceptance receipts, and derived view lenses instead of a protocol verb zoo. @@ -795,12 +795,13 @@ request. `epiphany_automation.rs` still gathers live host facts and executes the host side effects: submit `Op::Compact`, call `epiphany_launch_job`, and emit JSON-RPC state-update notifications. -The native OpenAI auth spine no longer depends on the vendored -`codex-keyring-store` wrapper. It uses the standard `keyring` crate directly +The native OpenAI auth spine currently no longer depends on the vendored +`codex-keyring-store` wrapper and uses the standard `keyring` crate directly while keeping Codex's `Codex Auth` service name and `cli|{sha256 path prefix}` -store key so existing Codex subscription keyring entries remain readable. -`codex-client` is now the only vendored crate intentionally kept in the native -OpenAI request path. +store key. Treat that as an overcleaned technical state, not doctrine. The next +auth cut should re-anchor auth in retained vendored Codex-compatible machinery +so Epiphany remains a modified Codex backend rather than a clean-room +impersonator. The MCP config path is now product-quarantined. `Config::to_mcp_config` keeps user-declared MCP servers but no longer accepts a `PluginsManager`, folds diff --git a/state/ledgers.msgpack b/state/ledgers.msgpack index aaa42374..93907800 100644 Binary files a/state/ledgers.msgpack and b/state/ledgers.msgpack differ diff --git a/state/map.yaml b/state/map.yaml index 65e70677..965b22df 100644 --- a/state/map.yaml +++ b/state/map.yaml @@ -50,6 +50,7 @@ invariants: - Agent function-call telemetry is the blessed instrument panel for dogfood supervision: it may summarize API methods, request/response shape, job ids, statuses, function/tool names, paths, and counts while sealing text, transcripts, raw results, and direct agent messages. - "Data should flow through your Rusty veins like an energetic plasma: tightly contained, and meticulously routed." - CultCache documents are the data. CultNet is the wire. JSON schema may describe the contract, but generic JSON must not become the internal payload when both sides are ours. + - Epiphany must remain an honest modified Codex-derived backend for Codex subscription auth/model use. Cutting Codex workflow/product bulk is allowed; replacing vendored Codex auth identity with a clean-room lookalike is suspect unless OpenAI provides an explicit public path or permission. data_flow: observe: @@ -94,10 +95,10 @@ active_subgoals: accepted_design: - `notes/codex-starvation-and-cultnet-liberation-plan.md` is the active foundation directive. It supersedes outward product/bridge/dogfood work and supersedes the weaker goal of merely making Codex app-server a cleaner adapter. Epiphany must become a native CultCache/CultNet runtime; Codex remains only as an OpenAI subscription auth/model-transport reliquary until that too can be replaced or minimized. - - `notes/codex-auth-spine-inventory.md` is the current source-grounded inventory of the Codex organ that may survive: `epiphany-openai-auth-spine` owns env/file/keyring/auto auth, ChatGPT token refresh, account metadata, and header material; `codex-client` remains only as a plain HTTP/SSE helper. `codex-login`, `codex-api`, `codex-model-provider`, `codex-model-provider-info`, `codex-core::client`, and `models-manager` are no longer keeper request-path organs. Codex app-server, apps, skills, marketplace, plugin UX, MCP OAuth handlers, and collaboration-mode surfaces are not part of the keeper spine. + - `notes/codex-auth-spine-inventory.md` is the current source-grounded inventory of the Codex organ that may survive. Corrected compliance invariant: Codex-compatible auth identity should remain anchored in retained vendored Codex-derived auth machinery, while Epiphany owns typed request/status/event/runtime surfaces around it. Codex app-server, apps, skills, marketplace, plugin UX, MCP OAuth handlers, and collaboration-mode surfaces are not part of the keeper spine. - `epiphany-openai-runtime` worker result ingress now parses assistant output directly into launch-kind-specific typed documents and stores typed nested `statePatch` / `selfPatch` payloads as MessagePack inside `EpiphanyRuntimeRoleWorkerResult`; generic `serde_json::Value` no longer mediates role/reorient worker results in that crate. JSON still exists at the OpenAI text edge because the model's output is text, but the runtime boundary after parsing is typed. - Agent self-memory review/application now has typed `AgentSelfPatch` core APIs. The old JSON-value selfPatch functions remain only as edge compatibility wrappers for CLI/artifact ingress; `epiphany-agent-memory-store`, heartbeat rumination application, and repo initialization selfPatch processing parse once at the edge and then operate on typed documents. - - `epiphany-openai-codex-spine` no longer uses Codex's Responses client, model-provider layer, `codex-api`, `codex-model-provider`, `codex-model-provider-info`, `codex-protocol`, or `codex-login` for outbound model requests. It uses `epiphany-openai-auth-spine` for env/file/keyring/auto credentials and ChatGPT token refresh, builds a local serializable OpenAI Responses wire DTO, opens the HTTP/SSE stream through `codex-client`, and parses Responses SSE frames into typed Epiphany stream events. `cargo tree` for the spine now finds no `codex-login`, `codex-api`, `codex-protocol`, `codex-app-server-protocol`, or model-provider crates. Caveat: external bearer command auth and agent identity are not native yet. + - `epiphany-openai-codex-spine` currently uses a native `epiphany-openai-auth-spine` for env/file/keyring/auto credentials and ChatGPT token refresh. That is now classified as an overcleaned implementation state: keep the typed Epiphany adapter boundary, but re-anchor credential loading/refresh in retained Codex-compatible auth before further transport purges. - `notes/epiphany-architectural-teardown.md` is the current foundation-cleanup directive. Its suspicion pass supersedes outward Phase 6 expansion as the active priority until the control-plane ownership problems are resolved. - `notes/epiphany-ideal-architecture-rebuild-plan.md` is the replacement blueprint: the smallest coherent architecture is durable `EpiphanyState`, runtime-spine-owned `RuntimeState`, separate role memory/heartbeat state, `epiphany-core` as policy owner, app-server as adapter, Aquarium as reflector, typed result acceptance receipts, and derived view lenses instead of a protocol verb zoo. - Epiphany is a fork-level modeling architecture, not merely a Codex collaboration mode. @@ -285,10 +286,10 @@ rejected_paths: current_status: summary: The Codex starvation pass has five typing receipts, fifty-two processor/foundation cuts, a real physical extraction in `epiphany-codex-bridge`, a root `epiphany-state-model` crate for durable Epiphany state, a source-grounded Codex auth spine inventory, the native `epiphany-openai-adapter` document boundary, a buildable Codex auth/model wrapper in `epiphany-openai-codex-spine`, the first native runtime caller in `epiphany-openai-runtime`, native heartbeat launch planning/job opening in `epiphany-core`, native state-update contract/validation/application in `epiphany-core`, native exact retrieval path matching in `epiphany-core`, and the route-facing mutation/view/coordinator projection services in `epiphany-codex-bridge`. `codex-protocol` no longer defines the durable `Epiphany*` state structs; it re-exports the native model for legacy rollout/API compatibility while `epiphany-core` imports the native model directly. `epiphany-core` now has no direct vendored Codex dependency: pressure derivation accepts native `EpiphanyTokenUsageSnapshot`, Codex rollout replay moved to `codex-core::epiphany_rollout`, and exact retrieval search uses Epiphany-owned workspace walking/path scoring instead of `codex-file-search`. The bridge owns Codex-facing Epiphany adapters for scene, jobs, context/planning/graph query, retrieval/indexing projection, result projection, runtime-spine result adaptation, launch/prompt doctrine, mutation document mechanics, mutation service update/promote/role-accept/reorient-accept/role-launch/reorient-launch/job-launch/job-interrupt application, live-state projection, pressure/pre-compaction rendering, freshness/reorientation projection, CRRC/coordinator/role-board projection, watcher invalidation adaptation, full `thread/epiphany/view` response construction, freshness/context/graph-query response construction, role/reorient result response construction, distill/propose patch-response construction, coordinator status/view construction, and acceptance/evidence signal helpers. Vendored app-server no longer retains root Epiphany modules; `codex_message_processor.rs` still contains route dispatch, JSON-RPC response shaping, watcher registration/snapshotting calls, and notification emission, but its root no longer imports the evacuated Epiphany policy/protocol registry or owns the watcher invalidation manager. Codex product surfaces for apps, skills, plugins, marketplace, and external agent config import are cut from the live app-server/protocol path: list routes return empty lists only where compatibility shells still exist, mutation/detail routes report disabled where they survive, `externalAgentConfig/*` routes and import-completed notification are gone, helper/import modules and stale implementation-shape tests were deleted, runtime feature enablement no longer supports `apps` or `plugins`, config writes no longer emit plugin-toggle analytics, plugin/skill cache invalidation on config writes is gone, plugin startup warmups and app-list refreshes were removed, and app-server no longer directly depends on `codex-plugin`, `codex-chatgpt`, or `codex-core-plugins`. `Config::to_mcp_config` now keeps user-declared MCP servers but no longer accepts `PluginsManager`, folds plugin MCP servers into the runtime, enables Codex apps, enables skill MCP dependency install, or advertises plugin capability summaries; `TurnContext::apps_enabled()` now returns false so model turns cannot awaken Codex Apps through ChatGPT auth or feature flags; session startup and per-turn context no longer load skills, turns receive an empty `SkillLoadOutcome`, internal `Op::ListSkills` is gone from `codex-protocol` / `codex-core` / TUI command routing, the Codex skill watcher has been collapsed to a no-op marker with no file watcher, skill-root registration, cache-clear task, or `SkillsUpdateAvailable` session listener, model turns no longer run skill mention collection, skill env-var prompts, skill MCP dependency installation, skill instruction injection, or implicit skill invocation analytics from shell tools, and the turn prompt/router path no longer loads plugin/app capability summaries, injects available-skill/available-plugin/plugin instruction fragments, parses plugin/app mentions, records app/plugin invocation telemetry, or filters MCP tools through Codex app connectors. Skill mutation/list/notification is gone from the app-server edge too: `skills/list`, `skills/config/write`, `skills/changed`, `Op::ListSkills`, `EventMsg::ListSkillsResponse`, `EventMsg::SkillsUpdateAvailable`, the app-server handlers, TUI slash/startup/list/manage-skill surfaces, generated schema entries, core skill-list suite, and fake live-reload/developer-message tests were deleted. Skill mention plumbing is also gone from the live TUI/protocol edge: no `UserInput::Skill` variant, app-server schema branch, TUI skill popup, `skills_all` cache, composer `set_skill_mentions`, skill mention insertion, `skill://` / `SKILL.md` history decoding, or stale skill popup snapshot remains. The `codex-core-skills` crate, core `skills` re-export shim, no-op `skills_watcher`, session `SkillsManager` service, and per-turn `TurnSkillsContext` are deleted; core/protocol no longer keep legacy `` or `` prompt compatibility, memory usage classification, snapshot normalization, or cleanup paths. Remaining product-shaped skill residue is also cut from memory templates, app-server docs/tests/warnings, TUI tooltips/placeholders/warnings/comments, app-server v1 docs, agent-tool schema text, stale `UserInput::Skill` test arms, and obsolete feature flags/schema entries. App-instruction prompt compatibility is cut too: no `APPS_INSTRUCTIONS` protocol constants, no `` snapshot canonicalization, and MCP fixture tests now use neutral `demo_mcp` / `calendar_mcp` names instead of `codex_apps` / `/api/codex/apps` branding. The TUI app connector product path is also deleted: no `/apps` slash command, app-link view, connector AppEvent variants, app connector cache/popup/refresh loop, app mention insertion, `app://` mention codec support, stale app-popup tests, or TUI browser-opening shim remains. The `app/list` route and `app/list/updated` notification are gone from app-server protocol, generated schemas, app-server dispatch, test helpers, and docs; `AppInfo`/app-list metadata schema structs are deleted; the orphaned `codex-connectors` crate and `core::connectors` shim are deleted from the workspace; Codex app analytics no longer tracks `codex_app_mentioned` / `codex_app_used` facts, events, reducer arms, client APIs, or dedupe cache state; `[apps.*]`, `Feature::Apps`, `include_apps_instructions`, app config/read schemas, app managed requirements, app prompt tests, and app file-MCP tests are gone; `Feature::Plugins`, `Feature::RemotePlugin`, `plugin://` structured mentions, plugin instruction tags, and stale plugin popup snapshots are gone too; `[plugins]` / `[marketplaces]`, `PluginConfig`, `MarketplaceConfig`, marketplace edit helpers, stale plugin/external-agent README route claims, and generated schema entries are removed from config; and the bundled `codex-skills` sample-skill crate plus embedded imagegen/openai-docs/plugin-creator/skill-creator/skill-installer payloads are deleted from the workspace. The vendored `vendor/codex/sdk` subtree is deleted as non-spine app-server client/release scaffolding, including stale generated Python SDK route types for removed product surfaces; the root pnpm workspace no longer lists `sdk/typescript`. Live MCP tool approval is named `McpToolApproval`, not `AppToolApproval`, and remains under MCP server config; live structured user-input mentions are MCP-shaped only. `codex_message_processor.rs` is about 9,482 lines; root `message_processor.rs` is about 1,292 lines after the external-agent/config-product cuts; `epiphany_read_routes.rs` is about 579 lines after the full view and read-response extractions; `epiphany_mutation_routes.rs` is about 694 lines after route-load/notification helper cuts and product-surface starvation; the old vendored `epiphany_state_helpers.rs` rollout-state loader is deleted and its remaining function lives in `epiphany-codex-bridge::state`; and `codex_thread.rs` is about 1,425 lines after state-update law moved native. `epiphany-openai-adapter` defines CultCache `DatabaseEntry` request/event/receipt/auth-status documents with no Codex app-server or generic JSON dependency. `epiphany-openai-codex-spine` owns the native OpenAI model transport path: it exposes `default_codex_home` and `auth_manager`, projects `epiphany-openai-auth-spine` `AuthManager` / `CodexAuth` into typed `EpiphanyOpenAiAdapterStatus`, builds a local serializable OpenAI Responses request body instead of Codex protocol request/item/config types, opens HTTP Responses streams through `codex-client`, parses Responses SSE frames into typed stream events and receipts, and no longer directly or transitively depends on `codex-login`, `codex-app-server-protocol`, `codex-protocol`, `codex-api`, `codex-model-provider`, or `codex-model-provider-info`. Native auth currently covers env/file/keyring/auto credentials plus ChatGPT token refresh; external bearer command auth and agent identity remain explicit compatibility gaps. `epiphany-openai-runtime` no longer depends directly on `codex-login`; it writes OpenAI status/request/stream-event/receipt records plus runtime sessions/jobs/results/events into `epiphany-core::runtime_spine_cache`, can emit the assistant text artifact for legacy result consumers, is now the default executor for startup-only repo birth specialists, and now has `run-worker` to load a durable `EpiphanyRuntimeWorkerLaunchRequest`, call the typed OpenAI runtime through the spine, persist typed `EpiphanyRuntimeRoleWorkerResult` / `EpiphanyRuntimeReorientWorkerResult` documents, and complete the original heartbeat/specialist runtime job without Codex worker execution; `codex exec` survives only as explicit fallback in repo-birth startup. `epiphany-mvp-coordinator` now invokes `epiphany-openai-runtime run-worker` for launched runtime job ids and no longer creates a second coordinator-owned shadow runtime job/result as a compensator. `epiphany-core::plan_runtime_spine_heartbeat_launch` validates launch contracts/conflicts and projects durable job bindings/runtime links; `epiphany-core::open_runtime_spine_heartbeat_job` owns the initialize-runtime/ensure-session/create-job sequence and now persists `EpiphanyRuntimeWorkerLaunchRequest` CultCache records keyed by runtime job id, with indexed kind/contract fields plus MessagePack-encoded typed launch documents instead of discarding work intent after queue receipt creation; `roleResult` and `reorientResult` now require typed worker result documents; generic job summaries are lifecycle receipts, not reviewable findings; `epiphany-core::EpiphanyStateUpdate`, `epiphany_state_update_validation_errors`, and `apply_epiphany_state_update` own state-update document shape and mutation law while `codex-core` calls them for compatibility. Vendored `CodexThread::epiphany_launch_job` is now mostly revision check, persistence validation, launch request handoff, and rollout/session writeback for the compatibility route. Vendored `codex-core` no longer has `epiphany_distillation`, `epiphany_promotion`, `epiphany_proposal`, or `epiphany_retrieval` husk modules; it re-exports native surfaces from `epiphany-core` directly, and now owns only the real Codex rollout adapter because it is a host seam. `epiphany-runtime-spine` advertises OpenAI adapter status/model-request/stream-event/receipt CultNet schemas and mutation contracts, so the native caller now has a real storage route instead of only JSON-RPC. MCP itself is correctly JSON at its protocol edge; the target is typed Epiphany intent/result/receipt wrappers around MCP, not replacing MCP JSON. The current OpenAI request path no longer pulls `codex-login` or `codex-api`; the next OpenAI spine decision is whether external bearer or agent-identity auth deserves native implementation or remains sealed legacy Codex compatibility. latest_cut: > - Native OpenAI auth stopped depending on the vendored - `codex-keyring-store` wrapper. `epiphany-openai-auth-spine` now talks to the - standard `keyring` crate directly while preserving the same Codex service - name and store-key derivation, so the native OpenAI path depends on - `codex-client` for HTTP/SSE only and no longer pulls a Codex auth helper - crate from `vendor/codex`. - next_action: Continue starving coordinator/runtime execution and operator surfaces off app-server JSON-RPC and out of `codex_message_processor.rs`; next suspicion is physical extraction of Epiphany route/helper logic from vendored app-server without inventing compensator traits. + The Codex starvation doctrine was corrected after the user flagged the + compliance boundary: Epiphany is not trying to impersonate Codex, it is a + modified Codex-derived backend whose native workflow no longer needs most + Codex product infrastructure. Further cuts must preserve a real + Codex-compatible auth/model organ rather than replacing vendored auth + identity with a clean-room lookalike. + next_action: Re-anchor the OpenAI auth spine in retained vendored Codex-compatible auth machinery while keeping Epiphany typed request/status/event/runtime surfaces outside the Codex host brain; do not keep purging auth transport identity as if legal compatibility were only a technical dependency graph.