@code-yeongyu/senpi
Version:
Coding agent CLI with read, bash, edit, write tools and session management
31 lines • 1.83 kB
TypeScript
import type { Duplex } from "node:stream";
import type { McpFormBinding } from "../../core/mcp-form-types.ts";
import type { AccountPrincipal } from "./mcp-presenter-account.ts";
import type { McpPresenterAuthority, McpPresenterRegistration } from "./mcp-presenter-authority.ts";
import type { PresenterPrincipal } from "./mcp-presenter-enrollment.ts";
import type { PresenterHostSurface } from "./mcp-presenter-host-surface.ts";
import type { SealedSecretHolders } from "./secret-sealed-holders.ts";
/** What one management stream owns once its first signed command enrolls it (D11 S3). */
export type PresenterOwner = ReturnType<McpPresenterAuthority["enroll"]>;
/** An enrolled principal; an account principal is managed only on the stream it enrolled on (D11 S3-2). */
export type PresenterPrincipalRecord = (PresenterPrincipal & {
readonly kind: "inherited";
readonly sessions: WeakSet<McpFormBinding>;
}) | AccountPrincipal;
export interface PresenterCommandContext {
readonly host: PresenterHostSurface;
readonly authority: McpPresenterAuthority;
readonly stream: Duplex;
readonly id: string | undefined;
readonly principal: PresenterPrincipalRecord;
readonly owner: PresenterOwner;
readonly registrations: Map<string, McpPresenterRegistration>;
readonly sealed: SealedSecretHolders | undefined;
}
/**
* The signed management switch (D11 S3), split out of `McpPresenterControl.manage` for the 250-line ceiling (#5934
* item 5). A command that is not one of the three throws `presenter_not_authorized`; the caller turns that into the
* refusal record, so nothing here writes an error frame itself.
*/
export declare function runPresenterCommand(command: Record<string, unknown>, control: PresenterCommandContext): void;
//# sourceMappingURL=mcp-presenter-control-commands.d.ts.map