UNPKG

@phren/cli

Version:

Knowledge layer for AI agents - CLI, MCP server, and data layer

62 lines (61 loc) • 3.18 kB
import { z } from "zod"; import { type moveToSchema } from "./dispatch.js"; type MoveTo = z.infer<typeof moveToSchema>; import { type DispatchHost } from "./dispatch-hosts.js"; import { type Json } from "./protocol.js"; declare const availability: z.ZodObject<{ computerId: z.ZodOptional<z.ZodString>; hasCheckout: z.ZodBoolean; harnesses: z.ZodArray<z.ZodObject<{ source: z.ZodEnum<{ claude: "claude"; codex: "codex"; copilot: "copilot"; opencode: "opencode"; }>; usable: z.ZodBoolean; reason: z.ZodOptional<z.ZodString>; accounts: z.ZodOptional<z.ZodArray<z.ZodObject<{ id: z.ZodString; label: z.ZodString; usable: z.ZodBoolean; signedIn: z.ZodBoolean; email: z.ZodOptional<z.ZodString>; plan: z.ZodOptional<z.ZodString>; current: z.ZodDefault<z.ZodBoolean>; fiveHourResetsAt: z.ZodOptional<z.ZodString>; weekResetsAt: z.ZodOptional<z.ZodString>; fiveHourLeft: z.ZodOptional<z.ZodNumber>; weekLeft: z.ZodOptional<z.ZodNumber>; resetsAt: z.ZodOptional<z.ZodString>; pool: z.ZodOptional<z.ZodString>; role: z.ZodOptional<z.ZodString>; console: z.ZodOptional<z.ZodBoolean>; poolRefused: z.ZodOptional<z.ZodString>; }, z.core.$strip>>>; }, z.core.$strip>>; usagePending: z.ZodOptional<z.ZodLiteral<true>>; usageError: z.ZodOptional<z.ZodString>; }, z.core.$strip>; export type MoveAvailability = z.infer<typeof availability>; /** How long a computer's own Claude usage read may hold its continuation facts. */ export declare const MOVE_USAGE_TIMEOUT_MS = 5000; export declare function localMoveAvailability(project: unknown, usage: () => Promise<Json>, conductor?: boolean, usageTimeoutMs?: number): Promise<MoveAvailability>; /** Exact verified names only; self also accepts the name health displays. */ export declare function movePeer(computer: string | undefined, self?: string): Promise<DispatchHost | undefined>; export declare function peerMoveAvailability(peer: DispatchHost, project: string, conductor?: boolean): Promise<MoveAvailability>; export declare function checkMovePeer(peer: DispatchHost, project: string, to: MoveTo, conductor?: boolean): Promise<{ account?: string; accountChoice?: string; computerId?: string; }>; export declare function moveComputers(project: unknown, self: string, local: () => Promise<MoveAvailability>, currentAccount?: string, conductor?: boolean): Promise<Json>; /** * Why this computer's Claude account `account` may not take a session in `cwd` (a same-computer move or * account switch), or undefined: the pools of the project whose checkout holds `cwd` and this computer's own. * Roles don't apply: the account is named by hand. */ export declare function localPoolRefusal(cwd: string, account: string): Promise<string | undefined>; /** Re-read enrollment before every request that may transmit a brief. */ export declare function currentMovePeer(captured: DispatchHost): Promise<DispatchHost>; export {};