Co-authored-by: Claude Opus 4.6 (1M context) <[email protected]> Co-authored-by: Julius Marminge <[email protected]> Co-authored-by: codex <[email protected]>
38 lines
1.0 KiB
TypeScript
38 lines
1.0 KiB
TypeScript
import { Context } from "effect";
|
|
import type { Effect } from "effect";
|
|
|
|
export interface ProjectSetupScriptRunnerResultNoScript {
|
|
readonly status: "no-script";
|
|
}
|
|
|
|
export interface ProjectSetupScriptRunnerResultStarted {
|
|
readonly status: "started";
|
|
readonly scriptId: string;
|
|
readonly scriptName: string;
|
|
readonly terminalId: string;
|
|
readonly cwd: string;
|
|
}
|
|
|
|
export type ProjectSetupScriptRunnerResult =
|
|
| ProjectSetupScriptRunnerResultNoScript
|
|
| ProjectSetupScriptRunnerResultStarted;
|
|
|
|
export interface ProjectSetupScriptRunnerInput {
|
|
readonly threadId: string;
|
|
readonly projectId?: string;
|
|
readonly projectCwd?: string;
|
|
readonly worktreePath: string;
|
|
readonly preferredTerminalId?: string;
|
|
}
|
|
|
|
export interface ProjectSetupScriptRunnerShape {
|
|
readonly runForThread: (
|
|
input: ProjectSetupScriptRunnerInput,
|
|
) => Effect.Effect<ProjectSetupScriptRunnerResult, Error>;
|
|
}
|
|
|
|
export class ProjectSetupScriptRunner extends Context.Service<
|
|
ProjectSetupScriptRunner,
|
|
ProjectSetupScriptRunnerShape
|
|
>()("t3/project/ProjectSetupScriptRunner") {}
|