Open History to see the last commit
1/**
2 * ClaudeCodeAdapter - Claude Code implementation of the generic provider adapter contract.
3 *
4 * This service owns Claude runtime/session semantics and emits canonical
5 * provider runtime 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: "claudeCode"` context.
10 *
11 * @module ClaudeCodeAdapter
12 */
13import { ServiceMap } from "effect";
14
15import type { ProviderAdapterError } from "../Errors.ts";
16import type { ProviderAdapterShape } from "./ProviderAdapter.ts";
17
18/**
19 * ClaudeCodeAdapterShape - Service API for the Claude Code provider adapter.
20 */
21export interface ClaudeCodeAdapterShape extends ProviderAdapterShape<ProviderAdapterError> {
22 readonly provider: "claudeCode";
23}
24
25/**
26 * ClaudeCodeAdapter - Service tag for Claude Code provider adapter operations.
27 */
28export class ClaudeCodeAdapter extends ServiceMap.Service<
29 ClaudeCodeAdapter,
30 ClaudeCodeAdapterShape
31>()("t3/provider/Services/ClaudeCodeAdapter") {}