diff --git a/src/main/agent-runtime/runtime-message-injector.ts b/src/main/agent-runtime/runtime-message-injector.ts index 0a7d7b9e..5f633b38 100644 --- a/src/main/agent-runtime/runtime-message-injector.ts +++ b/src/main/agent-runtime/runtime-message-injector.ts @@ -26,7 +26,7 @@ import { randomUUID } from "node:crypto"; import type { AppDatabase } from "@main/database"; import type { AgentMessageRecord } from "@shared/types"; -import type { ParentMessage } from "@main/worker/worker-helpers"; +import type { ParentMessage } from "@main/worker/runtime/helpers"; import type { RuntimeBridge } from "./runtime-bridge"; export interface RuntimeMessageInjectorDeps { diff --git a/src/main/worker/entry/index.ts b/src/main/worker/entry/index.ts index caf19b30..99432b39 100644 --- a/src/main/worker/entry/index.ts +++ b/src/main/worker/entry/index.ts @@ -1,6 +1,6 @@ -import type { ChildMessage, ParentMessage, RunJob } from "../worker-helpers"; +import type { ChildMessage, ParentMessage, RunJob } from "../runtime/helpers"; import { WorkerRpcClient } from "./rpc"; -import { WorkerRunner } from "../worker-runner"; +import { WorkerRunner } from "../runtime"; const parentPort = process.parentPort; diff --git a/src/main/worker/entry/rpc.ts b/src/main/worker/entry/rpc.ts index 9bd2c799..c7e194de 100644 --- a/src/main/worker/entry/rpc.ts +++ b/src/main/worker/entry/rpc.ts @@ -1,5 +1,5 @@ import { randomUUID } from "node:crypto"; -import type { ChildMessage } from "../worker-helpers"; +import type { ChildMessage } from "../runtime/helpers"; interface PendingRpc { resolve: (value: { ok: true; result: unknown } | { ok: false; error: string }) => void; diff --git a/src/main/worker/worker-helpers.ts b/src/main/worker/runtime/helpers.ts similarity index 100% rename from src/main/worker/worker-helpers.ts rename to src/main/worker/runtime/helpers.ts diff --git a/src/main/worker/worker-runner.ts b/src/main/worker/runtime/index.ts similarity index 97% rename from src/main/worker/worker-runner.ts rename to src/main/worker/runtime/index.ts index 49ca7660..112e1d70 100644 --- a/src/main/worker/worker-runner.ts +++ b/src/main/worker/runtime/index.ts @@ -1,11 +1,11 @@ import type { Agent, AgentMessage } from "@mariozechner/pi-agent-core"; -import { resolveModel, resolveExtraStreamHeaders } from "../model-resolver"; +import { resolveModel, resolveExtraStreamHeaders } from "../../model-resolver"; import type { RunStatus } from "@shared/types"; -import type { ChildMessage, RunJob } from "./worker-helpers"; -import { applyEnvOverrides, buildRedactor } from "./worker-helpers"; +import type { ChildMessage, RunJob } from "./helpers"; +import { applyEnvOverrides, buildRedactor } from "./helpers"; import { createCodingTools } from "@mariozechner/pi-coding-agent"; import { createPiAgent, resolveThinkingLevel } from "./pi-agent-factory"; -import type { WorkerRpcClient } from "./entry/rpc"; +import type { WorkerRpcClient } from "../entry/rpc"; interface PrepareRunResult { provider: string; diff --git a/src/main/worker/pi-agent-factory.ts b/src/main/worker/runtime/pi-agent-factory.ts similarity index 98% rename from src/main/worker/pi-agent-factory.ts rename to src/main/worker/runtime/pi-agent-factory.ts index dd2334b6..a7a66e13 100644 --- a/src/main/worker/pi-agent-factory.ts +++ b/src/main/worker/runtime/pi-agent-factory.ts @@ -29,7 +29,7 @@ import type { TransformContextRpcPayload, TransformContextRpcResult, } from "@main/agent-runtime/hook-rpc"; -import type { WorkerRpcClient } from "./entry/rpc"; +import type { WorkerRpcClient } from "../entry/rpc"; // Side-effect import: drags the hook signature contract into the typecheck // graph so any drift in pi-agent-core hook shapes breaks the build here. import "./pi-hook-contract"; diff --git a/src/main/worker/pi-hook-contract.ts b/src/main/worker/runtime/pi-hook-contract.ts similarity index 100% rename from src/main/worker/pi-hook-contract.ts rename to src/main/worker/runtime/pi-hook-contract.ts