Unified · Split
| @@ -6,6 +6,7 @@ import { execFileSync } from "node:child_process"; · 5 unmodified lines | ||
| 6 | 6 | import * as NodeServices from "@effect/platform-node/NodeServices"; |
| 7 | 7 | import { |
| 8 | 8 | ApprovalRequestId, |
| 9 | + ProviderKind, | |
| 9 | 10 | type OrchestrationEvent, |
| 10 | 11 | type OrchestrationThread, |
| 11 | 12 | } from "@t3tools/contracts"; |
| @@ -205,7 +206,7 @@ export interface OrchestrationIntegrationHarness { · 193 unmodified lines | ||
| 205 | 206 | } |
| 206 | 207 | |
| 207 | 208 | interface MakeOrchestrationIntegrationHarnessOptions { |
| 208 | − readonly provider?: "codex" | "claudeCode"; | |
| 209 | + readonly provider?: ProviderKind; | |
| 209 | 210 | readonly realCodex?: boolean; |
| 210 | 211 | } |
| 211 | 212 | |
| @@ -10,6 +10,7 @@ import { · 9 unmodified lines | ||
| 10 | 10 | ProviderTurnStartResult, |
| 11 | 11 | ThreadId, |
| 12 | 12 | TurnId, |
| 13 | + ProviderKind, | |
| 13 | 14 | } from "@t3tools/contracts"; |
| 14 | 15 | import { Effect, Queue, Stream } from "effect"; |
| 15 | 16 | |
| @@ -35,7 +36,7 @@ export interface TestTurnResponse { · 19 unmodified lines | ||
| 35 | 36 | export type FixtureProviderRuntimeEvent = { |
| 36 | 37 | readonly type: string; |
| 37 | 38 | readonly eventId: EventId; |
| 38 | − readonly provider: "codex" | "claudeCode"; | |
| 39 | + readonly provider: ProviderKind; | |
| 39 | 40 | readonly createdAt: string; |
| 40 | 41 | readonly threadId: string; |
| 41 | 42 | readonly turnId?: string | undefined; |
| @@ -177,7 +178,7 @@ function normalizeFixtureEvent(rawEvent: Record<string, unknown>): ProviderRunti · 135 unmodified lines | ||
| 177 | 178 | |
| 178 | 179 | export interface TestProviderAdapterHarness { |
| 179 | 180 | readonly adapter: ProviderAdapterShape<ProviderAdapterError>; |
| 180 | − readonly provider: "codex" | "claudeCode"; | |
| 181 | + readonly provider: ProviderKind; | |
| 181 | 182 | readonly queueTurnResponse: ( |
| 182 | 183 | threadId: ThreadId, |
| 183 | 184 | response: TestTurnResponse, |
| @@ -197,7 +198,7 @@ export interface TestProviderAdapterHarness { · 13 unmodified lines | ||
| 197 | 198 | } |
| 198 | 199 | |
| 199 | 200 | interface MakeTestProviderAdapterHarnessOptions { |
| 200 | − readonly provider?: "codex" | "claudeCode"; | |
| 201 | + readonly provider?: ProviderKind; | |
| 201 | 202 | } |
| 202 | 203 | |
| 203 | 204 | function nowIso(): string { |
| @@ -205,7 +206,7 @@ function nowIso(): string { · 1 unmodified line | ||
| 205 | 206 | } |
| 206 | 207 | |
| 207 | 208 | function sessionNotFound( |
| 208 | − provider: "codex" | "claudeCode", | |
| 209 | + provider: ProviderKind, | |
| 209 | 210 | threadId: ThreadId, |
| 210 | 211 | ): ProviderAdapterSessionNotFoundError { |
| 211 | 212 | return new ProviderAdapterSessionNotFoundError({ |
| @@ -215,7 +216,7 @@ function sessionNotFound( · 3 unmodified lines | ||
| 215 | 216 | } |
| 216 | 217 | |
| 217 | 218 | function missingSessionEffect( |
| 218 | − provider: "codex" | "claudeCode", | |
| 219 | + provider: ProviderKind, | |
| 219 | 220 | threadId: ThreadId, |
| 220 | 221 | ): Effect.Effect<never, ProviderAdapterError> { |
| 221 | 222 | return Effect.fail(sessionNotFound(provider, threadId)); |
| @@ -8,6 +8,7 @@ import { · 7 unmodified lines | ||
| 8 | 8 | EventId, |
| 9 | 9 | MessageId, |
| 10 | 10 | ProjectId, |
| 11 | + ProviderKind, | |
| 11 | 12 | ThreadId, |
| 12 | 13 | } from "@t3tools/contracts"; |
| 13 | 14 | import { assert, it } from "@effect/vitest"; |
| @@ -36,7 +37,7 @@ const PROJECT_ID = asProjectId("project-1"); · 22 unmodified lines | ||
| 36 | 37 | const THREAD_ID = ThreadId.makeUnsafe("thread-1"); |
| 37 | 38 | const FIXTURE_TURN_ID = "fixture-turn"; |
| 38 | 39 | const APPROVAL_REQUEST_ID = asApprovalRequestId("req-approval-1"); |
| 39 | −type IntegrationProvider = "codex" | "claudeCode"; | |
| 40 | +type IntegrationProvider = ProviderKind; | |
| 40 | 41 | |
| 41 | 42 | function nowIso() { |
| 42 | 43 | return new Date().toISOString(); |
| @@ -3,7 +3,7 @@ import os from "node:os"; · 2 unmodified lines | ||
| 3 | 3 | import path from "node:path"; |
| 4 | 4 | import { execFileSync } from "node:child_process"; |
| 5 | 5 | |
| 6 | −import type { ProviderRuntimeEvent, ProviderSession } from "@t3tools/contracts"; | |
| 6 | +import type { ProviderKind, ProviderRuntimeEvent, ProviderSession } from "@t3tools/contracts"; | |
| 7 | 7 | import { |
| 8 | 8 | CommandId, |
| 9 | 9 | DEFAULT_PROVIDER_INTERACTION_MODE, |
| @@ -44,7 +44,7 @@ const asTurnId = (value: string): TurnId => TurnId.makeUnsafe(value); · 34 unmodified lines | ||
| 44 | 44 | type LegacyProviderRuntimeEvent = { |
| 45 | 45 | readonly type: string; |
| 46 | 46 | readonly eventId: EventId; |
| 47 | − readonly provider: "codex" | "claudeCode"; | |
| 47 | + readonly provider: ProviderKind; | |
| 48 | 48 | readonly createdAt: string; |
| 49 | 49 | readonly threadId: ThreadId; |
| 50 | 50 | readonly turnId?: string | undefined; |
| @@ -235,7 +235,7 @@ describe("CheckpointReactor", () => { · 184 unmodified lines | ||
| 235 | 235 | readonly projectWorkspaceRoot?: string; |
| 236 | 236 | readonly threadWorktreePath?: string | null; |
| 237 | 237 | readonly providerSessionCwd?: string; |
| 238 | − readonly providerName?: "codex" | "claudeCode"; | |
| 238 | + readonly providerName?: ProviderKind; | |
| 239 | 239 | }) { |
| 240 | 240 | const cwd = createGitRepository(); |
| 241 | 241 | tempDirs.push(cwd); |
| @@ -2,7 +2,11 @@ import fs from "node:fs"; · 1 unmodified line | ||
| 2 | 2 | import os from "node:os"; |
| 3 | 3 | import path from "node:path"; |
| 4 | 4 | |
| 5 | −import type { OrchestrationReadModel, ProviderRuntimeEvent } from "@t3tools/contracts"; | |
| 5 | +import type { | |
| 6 | + OrchestrationReadModel, | |
| 7 | + ProviderKind, | |
| 8 | + ProviderRuntimeEvent, | |
| 9 | +} from "@t3tools/contracts"; | |
| 6 | 10 | import { |
| 7 | 11 | ApprovalRequestId, |
| 8 | 12 | CommandId, |
| @@ -45,7 +49,7 @@ const asTurnId = (value: string): TurnId => TurnId.makeUnsafe(value); · 36 unmodified lines | ||
| 45 | 49 | type LegacyProviderRuntimeEvent = { |
| 46 | 50 | readonly type: string; |
| 47 | 51 | readonly eventId: EventId; |
| 48 | − readonly provider: "codex" | "claudeCode"; | |
| 52 | + readonly provider: ProviderKind; | |
| 49 | 53 | readonly createdAt: string; |
| 50 | 54 | readonly threadId: ThreadId; |
| 51 | 55 | readonly turnId?: string | undefined; |
| @@ -52,7 +52,7 @@ const asTurnId = (value: string): TurnId => TurnId.makeUnsafe(value); · 51 unmodified lines | ||
| 52 | 52 | type LegacyProviderRuntimeEvent = { |
| 53 | 53 | readonly type: string; |
| 54 | 54 | readonly eventId: EventId; |
| 55 | − readonly provider: "codex" | "claudeCode"; | |
| 55 | + readonly provider: ProviderKind; | |
| 56 | 56 | readonly createdAt: string; |
| 57 | 57 | readonly threadId: ThreadId; |
| 58 | 58 | readonly turnId?: string | undefined; |