UNPKG

@code-yeongyu/senpi

Version:

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

53 lines • 2.03 kB
import type { SourceInfo } from "../../core/source-info.ts"; export type RpcCommandSource = "extension" | "prompt" | "skill"; export interface RpcSlashCommand { /** Command name without its leading invocation marker. */ name: string; /** Human-readable description. */ description?: string; /** What kind of command this is. */ source: RpcCommandSource; /** Source metadata for the owning resource. */ sourceInfo: SourceInfo; /** Canonical marker clients should insert for this candidate. */ syntax: "slash" | "dollar"; } export interface RpcCommandsChangedEvent { type: "commands_changed"; commands: readonly RpcSlashCommand[]; } interface RpcCommandInput { name: string; description?: string; sourceInfo: SourceInfo; } interface RpcSkillCommandInput extends RpcCommandInput { /** Internal skill-read allowlist; never sent on the wire (senpi#5636). */ allowedSet?: unknown; } interface RpcCommandSurfaceInput { extensionCommands: readonly RpcCommandInput[]; promptTemplates: readonly RpcCommandInput[]; skills: readonly RpcSkillCommandInput[]; } interface RpcCommandSurfaceSession { extensionRunner: { getRegisteredCommands(): readonly { invocationName: string; description?: string; sourceInfo: SourceInfo; }[]; }; promptTemplates: readonly RpcCommandInput[]; resourceLoader: { getSkills(): { skills: readonly RpcCommandInput[]; }; }; } export declare function buildRpcCommands(input: RpcCommandSurfaceInput): RpcSlashCommand[]; export declare function buildRpcCommandsForSession(session: RpcCommandSurfaceSession): RpcSlashCommand[]; export declare function rpcCommandListDigest(commands: readonly RpcSlashCommand[]): string; export declare function createCommandsChangedEvent(previousDigest: string | undefined, commands: readonly RpcSlashCommand[]): RpcCommandsChangedEvent | undefined; export {}; //# sourceMappingURL=rpc-command-surface.d.ts.map