UNPKG

@code-yeongyu/senpi

Version:

Coding agent CLI with read, bash, edit, write tools and session management

33 lines • 1.83 kB
import { type HostDecisionClient, type HostProtocolInfo } from "./host-decision.ts"; import type { ResolvedHostLaunchSpec } from "./host-launch-spec.ts"; export declare const HOST_EXIT_OK = 0; export declare const HOST_EXIT_ERROR = 1; export declare const HOST_EXIT_USAGE = 2; export declare const HOST_EXIT_REFUSED = 3; export declare const HOST_EXIT_FALLBACK = 4; /** One JSON line and the exit code it means. */ export interface HostOutcome { readonly exitCode: number; readonly payload: Record<string, unknown>; } export declare function identityPayload(socket: string, pid: number, host: HostProtocolInfo | undefined): Record<string, unknown>; /** * The `runtimeBuildId` a host launched from `spec` by THIS process would report: this process's * runtime plus the spec's extensions, through the same launch profile the host derives from its * argv. A runtime that cannot be read reports `null` (unverified) rather than failing the request. */ export declare function clientRuntimeBuildId(spec: ResolvedHostLaunchSpec): Promise<string | null>; /** * The two ways a request ends without acting, and the exit codes they mean: a `refuse` leaves a * running host alone (3), a `fallback` says no host is better than this one (4). */ export declare function refusal(kind: "refuse" | "fallback", host: HostProtocolInfo | undefined, body: { readonly reason: string; } & Record<string, unknown>): HostOutcome; /** * This build as a client, WITHOUT a launch profile: the request's own `ensureHost` decides whether a * handoff may happen, from the profile it would launch. What is asked here is only what any client * can answer without one - is the running host usable, and could it be handed off from at all. */ export declare function decisionClient(): HostDecisionClient; //# sourceMappingURL=host-outcome.d.ts.map