The best way to control Claude Code, Codex and more from any computer or phone
Mirrored from https://github.com/Camo67/t3code.git
Synced Nov 21, 04:45 UTC
| 1 | import type { ThreadId } from "@t3tools/contracts"; |
| 2 | import * as Context from "effect/Context"; |
| 3 | import type * as Effect from "effect/Effect"; |
| 4 | |
| 5 | export interface EventNdjsonLogger { |
| 6 | readonly filePath: string; |
| 7 | readonly write: (event: unknown, threadId: ThreadId | null) => Effect.Effect<void>; |
| 8 | readonly close: () => Effect.Effect<void>; |
| 9 | } |
| 10 | |
| 11 | export class ProviderEventLoggers extends Context.Service< |
| 12 | ProviderEventLoggers, |
| 13 | { |
| 14 | readonly native: EventNdjsonLogger | undefined; |
| 15 | readonly canonical: EventNdjsonLogger | undefined; |
| 16 | } |
| 17 | >()("@t3tools/provider-core/server/ProviderEventLoggers") {} |
| 18 | |
| 19 | export const NoOpProviderEventLoggers: ProviderEventLoggers["Service"] = { |
| 20 | native: undefined, |
| 21 | canonical: undefined, |
| 22 | }; |