UNPKG

@code-yeongyu/senpi

Version:

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

30 lines • 1.88 kB
import type { DelegationDescriptor } from "./delegation-record.ts"; import type { ExtensionOwner, ExtensionOwnerIdentity, ExtensionTransportOwner } from "./extension-owner.ts"; /** Capture registrations before awaits; a routing string is never an incarnation. */ export declare class SessionConnectionContext { private readonly storage; private readonly ownerOf; private readonly delegationOf; constructor(ownerOf: (id: string) => ExtensionTransportOwner | undefined, delegationOf?: (id: string) => DelegationDescriptor | undefined); run<T>(id: string, task: () => T): T; /** Host-owned background construction has no requesting transport or inherited delegation. */ outside<T>(task: () => T): T; /** The delegation the running line captured at its start, or undefined for a connection that never declared. */ get delegation(): DelegationDescriptor | undefined; /** * Route a worker's targeted output to the exact incarnation and binding generation that captured it. * A routing string now registered to another transport, or a retired gate, leaves the frame stale. */ runCaptured<T>(id: string, identity: ExtensionOwnerIdentity, task: () => T): T; /** A session isolate has no transports of its own: it runs a command with the gate its host captured. */ runIssued<T>(id: string, binding: ExtensionOwner, task: () => T): T; getStore(): string | undefined; transportOf(id: string): ExtensionTransportOwner | undefined; get transport(): ExtensionTransportOwner | undefined; get owner(): ExtensionOwner | undefined; withBinding<T>(generation: string, task: () => T): T; isCurrent(): boolean; /** A check of the captured destination that stays valid after this async context ends (queued output). */ currentGuard(): () => boolean; } //# sourceMappingURL=session-connection-context.d.ts.map