histoire
Version:
A fast story book powered by Vite
38 lines • 2.86 kB
TypeScript
import type { UiAgentSettings, UiAgentsSnapshot } from '@histoire/shared';
import type { AcpManagerOptions, AcpPromptRequest, AcpPromptResult, AcpUpdate } from './types.js';
/** Creates a project-owned ACP manager; construction never launches a process. */
export declare function createAcpManager(options: AcpManagerOptions): {
ready: Promise<void>;
snapshot: () => UiAgentsSnapshot;
/** Catalog reads never change configured presets or launch agents. */
registry: (force?: boolean) => Promise<import("@histoire/shared").UiAgentRegistry>;
/** Registry logos never launch agents or reveal registry URLs. */
icon: (id: string) => Promise<string | undefined>;
/** Discovery has separate capacity and process ownership from comments. */
configOptions(agentId: string, force?: boolean): Promise<import("@histoire/shared").UiAgentConfigOptions>;
/** Names of the agent's last announced or cached slash commands. */
commandNames: (agentId: string) => string[];
/** Subscribes to this runtime's safe process/reply/permission updates. */
onUpdate(listener: (event: AcpUpdate) => void): () => void;
/** Persist changed fields only; admission retires before the first asynchronous step. */
configure(value: UiAgentSettings): Promise<void>;
/** Retire only verified saved paths whose current value still matches the submitted value. */
retireProjectOverrides: (paths: readonly string[], config?: AcpManagerOptions['config']) => Promise<void>;
/** Reset named local paths to authoritative project defaults without changing project files. */
resetProjectOverrides: (paths: readonly string[]) => Promise<void>;
/** Private credential updates share the mutation lane without retiring other agents' prompts. */
setEnvironment(agentId: string, env: Record<string, string>): Promise<void>;
/** Returns a persistent per-thread ACP reply; source edits stay agent-owned. */
prompt(request: AcpPromptRequest): Promise<AcpPromptResult>;
/** Cancels only the requested comment conversation and its permission cards. */
cancel(threadId: string): Promise<void>;
replyPermission: (requestId: string, allow: boolean, remember: boolean, choiceId?: string) => void;
replyElicitation: (requestId: import("@histoire/shared").UiAgentElicitationReply['requestId'], action: import("@histoire/shared").UiAgentElicitationReply['action'], content?: unknown) => boolean;
/** Restarts share configuration admission; a queued retirement cannot resurrect its predecessor. */
restart(agentId: string): Promise<void>;
/** Retires all processes before a dev context or configuration generation ends. */
close(): Promise<void>;
};
/** Public manager contract used by comment threads. */
export type AcpManager = ReturnType<typeof createAcpManager>;
//# sourceMappingURL=manager.d.ts.map