@code-yeongyu/senpi
Version:
Coding agent CLI with read, bash, edit, write tools and session management
26 lines • 1.61 kB
TypeScript
/** The terminal extension's per-generation state, the bundle event sinks it binds, and the tool context over it. */
import type { ExtensionAPI, ExtensionContext } from "../../types.ts";
import type { MonitorNotifier } from "./monitor-notify.ts";
import type { MonitorStatusTicker } from "./monitor-status-ticker.ts";
import { type TerminalNotifier } from "./notify.ts";
import type { PersistenceState } from "./restore-session.ts";
import { type TerminalEventSinks, TerminalSessionBundle } from "./session-bundle.ts";
import type { ResolvedTerminalSettings } from "./settings.ts";
import type { TerminalToolContext } from "./tools/context.ts";
export interface TerminalExtensionState extends PersistenceState {
settings: ResolvedTerminalSettings;
notifier: TerminalNotifier | null;
monitorNotifier: MonitorNotifier | null;
statusTicker: MonitorStatusTicker;
shellPath: string | undefined;
steppedAside: boolean;
noticeShown: boolean;
parked: boolean;
}
/** Tests and SDK callers may hand partial contexts without a session manager. */
export declare function sessionKeyOf(ctx: ExtensionContext | undefined): string | undefined;
export declare function createBundle(state: TerminalExtensionState): TerminalSessionBundle;
/** Sinks read the live instance state at call time, so notifier swaps need no re-bind. */
export declare function bundleSinks(pi: ExtensionAPI, state: TerminalExtensionState): TerminalEventSinks;
export declare function buildToolContext(pi: ExtensionAPI, state: TerminalExtensionState): TerminalToolContext;
//# sourceMappingURL=extension-state.d.ts.map