@code-yeongyu/senpi
Version:
Coding agent CLI with read, bash, edit, write tools and session management
26 lines • 1.76 kB
TypeScript
import type { McpFormBinding } from "../../core/mcp-form-types.ts";
import type { McpPresenterAuthority, McpPresenterConnection } from "./mcp-presenter-authority.ts";
import type { SealedSecretSource } from "./secret-sealed-holders.ts";
/**
* What the presenter control endpoint needs from the host that carries the sessions (senpi#4249, D11 2.9).
* `SessionEventWriter` implements it for RPC hosts; a terminal host provides its own adapter.
*/
export interface PresenterHostSurface {
/** The host's presenter authority, enabled on first read. */
readonly authority: McpPresenterAuthority;
/** True when the authority outlives the control (a terminal's own presenter): stopping it revokes only its grants. */
readonly sharedAuthority?: boolean;
getMcpFormBinding(sessionId: string): McpFormBinding | undefined;
findMcpPresenterConnection(nonce: string): McpPresenterConnection | undefined;
getConnectionCapabilities(id: string): readonly string[] | undefined;
advertiseMcpPresenterControl(path: string): void;
withdrawMcpPresenterControl(path: string): void;
/** Lets in-process secret prompts reach sealed holders (D11 secret phase 5.2); returns the detach function. */
attachSealedSecrets?(source: SealedSecretSource): () => void;
}
/**
* The `mcp_presenter_context` reply. `controlEndpoint` is added only on an explicit `discover: true` and only when an
* account-enrolling control is advertised; otherwise the reply keeps the shape strict clients decode.
*/
export declare function presenterContextReply(authority: McpPresenterAuthority | undefined, sender: McpPresenterConnection | undefined, request: object, advertised: string | undefined): object;
//# sourceMappingURL=mcp-presenter-host-surface.d.ts.map