Open History to see the last commit
1/**
2 * CodexAdapter - Codex implementation of the generic provider adapter contract.
3 *
4 * This service owns Codex app-server process / JSON-RPC semantics and emits
5 * Codex provider events. It does not perform cross-provider routing, shared
6 * event fan-out, or checkpoint orchestration.
7 *
8 * Uses Effect `ServiceMap.Service` for dependency injection and returns the
9 * shared provider-adapter error channel with `provider: "codex"` context.
10 *
11 * @module CodexAdapter
12 */
13import { ServiceMap } from "effect";
14
15import type { ProviderAdapterError } from "../Errors.ts";
16import type { ProviderAdapterShape } from "./ProviderAdapter.ts";
17
18/**
19 * CodexAdapterShape - Service API for the Codex provider adapter.
20 */
21export interface CodexAdapterShape extends ProviderAdapterShape<ProviderAdapterError> {
22 readonly provider: "codex";
23}
24
25/**
26 * CodexAdapter - Service tag for Codex provider adapter operations.
27 */
28export class CodexAdapter extends ServiceMap.Service<CodexAdapter, CodexAdapterShape>()(
29 "t3/provider/Services/CodexAdapter",
30) {}