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