@phren/cli
Version:
Knowledge layer for AI agents - CLI, MCP server, and data layer
28 lines (27 loc) • 1.03 kB
TypeScript
import type { ChildProcess } from "node:child_process";
import type { DriveOptions } from "../opencode-serve.js";
export type Provider = "codex" | "opencode" | "claude";
export interface LaunchOptions {
model: string;
worktree: string;
job: string;
review?: boolean;
resume?: string;
variant?: string;
extra?: string[];
}
export interface Adapter {
command: Provider;
argv(options: LaunchOptions): string[];
session(event: Record<string, unknown>): string | undefined;
/** A tool the worker was refused, when the harness reports it in its events. */
refusal?(event: Record<string, unknown>): {
type: string;
pattern: string;
message: string;
} | undefined;
/** A harness that serves an API instead of printing events: the launcher
* spawns `argv` and this drives the worker, returning its exit code. */
drive?(child: ChildProcess, options: DriveOptions): Promise<number>;
}
export declare function uuid(value: unknown): string | undefined;