Align orchestration V2 with Effect service conventions

This commit is contained in:
Julius Marminge authored and Julius Marminge committed 2026-08-14 11:22:52 +02:00
1 parent 27da49519f
commit 63f2e161e7
23 files changed
+370 -321

No files matched your search

+4 -4
View File
@@ -1,7 +1,7 @@
#!/usr/bin/env node
// @effect-diagnostics nodeBuiltinImport:off
import { writeFileSync } from "node:fs";
import { createInterface } from "node:readline";
import * as NodeFS from "node:fs";
import * as NodeReadline from "node:readline";
interface ReplayEntry {
readonly type: "emit_inbound" | "expect_outbound" | "runtime_exit";
@@ -54,7 +54,7 @@ const pendingClientRequestIds = new Map<string, string | number>();
const pendingAgentRequestMethods = new Map<string, string>();
function writeStatus(failure?: unknown): void {
writeFileSync(
NodeFS.writeFileSync(
replayStatusPath,
JSON.stringify({
scenario: transcript.scenario,
@@ -268,7 +268,7 @@ function handleMessage(message: JsonRpcMessage): void {
writeStatus();
flushInbound();
const input = createInterface({ input: process.stdin, crlfDelay: Infinity });
const input = NodeReadline.createInterface({ input: process.stdin, crlfDelay: Infinity });
input.on("line", (line) => {
if (stopped || line.trim().length === 0) return;
try {
@@ -1067,7 +1067,7 @@ function installReplayHandlers({
startCommandExecution,
beforeApprovalResponse,
}: {
readonly client: CodexClient.CodexAppServerClientShape;
readonly client: CodexClient.CodexAppServerClient["Service"];
readonly startTurn: (turnId: string) => Effect.Effect<void>;
readonly completeTurn: (turnId: string) => Effect.Effect<void>;
readonly startCommandExecution: (turnId: string) => Effect.Effect<void>;
@@ -1222,7 +1222,7 @@ function runReplaySession({
});
const runTurnStep = (
client: CodexClient.CodexAppServerClientShape,
client: CodexClient.CodexAppServerClient["Service"],
threadId: string,
step: TurnReplayStep,
) =>