@phren/cli
Version:
Knowledge layer for AI agents - CLI, MCP server, and data layer
55 lines (54 loc) • 1.97 kB
TypeScript
import { z } from "zod";
import { type Json } from "./protocol.js";
import type { PeerIdentity } from "./request-origin.js";
export declare const continuationLaunchSchema: z.ZodObject<{
workerDispatch: z.ZodOptional<z.ZodString>;
worker: z.ZodDefault<z.ZodBoolean>;
computerId: z.ZodString;
project: z.ZodString;
to: z.ZodObject<{
computer: z.ZodOptional<z.ZodString>;
harness: z.ZodEnum<{
claude: "claude";
codex: "codex";
copilot: "copilot";
opencode: "opencode";
}>;
account: z.ZodOptional<z.ZodString>;
model: z.ZodOptional<z.ZodString>;
effort: z.ZodOptional<z.ZodEnum<{
high: "high";
low: "low";
max: "max";
medium: "medium";
minimal: "minimal";
xhigh: "xhigh";
}>>;
}, z.core.$strict>;
label: z.ZodString;
brief: z.ZodObject<{
id: z.ZodString;
text: z.ZodString;
}, z.core.$strict>;
}, z.core.$strict>;
type Placement = {
hash: string;
worker?: boolean;
workerDispatch?: string;
state: "uncertain" | "placed" | "not-placed";
createdAt?: number;
server?: string;
caller?: PeerIdentity;
paneTarget?: Json;
result?: Json;
};
/** A durable intent precedes creation. An interrupted intent is reconciled by
* its brief arrival, never by creating another pane. */
export declare function continuationPlacement(id: string, includeCreating?: boolean): Promise<Placement | undefined>;
export declare function launchContinuation(input: unknown, launch: (data: z.infer<typeof continuationLaunchSchema>, placed: (paneTarget: Json) => Promise<void>) => Promise<Json>, authorization?: {
caller?: PeerIdentity;
server: string;
}): Promise<Json>;
export declare function saveContinuationIntent(input: Json): Promise<void>;
export declare function continuationIntent(id: string): Promise<Json>;
export {};