UNPKG

@code-yeongyu/senpi

Version:

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

28 lines • 1.21 kB
import type { ServiceSubscriptionSnapshot } from "@earendil-works/chord"; import type { RpcTarget, SessionTarget } from "../pi-protocol/index.js"; import type { ByteTransportFactory } from "./transport.ts"; export type ConnectionState = "disconnected" | "connecting" | "connected"; export interface ConnectionStateChange { state: ConnectionState; error?: Error; } export type Unsubscribe = () => void; export type ListenerErrorHandler = (error: Error) => void; export type AttachmentChangeListener = (attachment: SessionTarget | undefined) => void; export interface ServiceSubscription { readonly id: string; readonly target: RpcTarget; readonly snapshot: ServiceSubscriptionSnapshot; /** Begin ordered update delivery after the caller has installed the snapshot. */ start(): void; dispose(): Promise<void>; } export interface ClientOptions { transportFactory: ByteTransportFactory; /** Logical server identity expected at the physical endpoint. */ serverId: string; maxFrameLength?: number; /** Reports subscriber failures without allowing them to corrupt client state. */ onListenerError?: ListenerErrorHandler; } //# sourceMappingURL=types.d.ts.map