import { type AgentInstance, type PendingCredentialRefresh, type AgentStatusBroadcast } from "./instance.js"; import type { AgentMemberConfig, AgentStatus, ContextUsage, MemberActiveToolInfo } from "./types.js"; import type { AgentHistoryEvent } from "./events.js"; export interface ControlServices { memberConfig(memberId: string): AgentMemberConfig | null; memberScopes(memberId: string): string[]; clearSession(memberId: string): void; commitModelBinding(memberId: string, binding: { model: string; credentialId: string; }): void; emitEvent(sourceRef: string | null, memberId: string, event: AgentHistoryEvent): void; postSystemNotice(scopeId: string, message: string): void; publishStatus(scopeId: string, event: AgentStatusBroadcast): void; publishReset(scopeId: string, memberName: string, event: AgentStatusBroadcast): void; } export declare function configureControls(next: ControlServices): void; export declare function getAgentStatus(memberId: string): AgentStatus; export declare function getMemberBusyState(memberId: string): { busy: boolean; reason?: string; }; export declare function getAgentContextUsage(memberId: string): ContextUsage | null; export declare function refreshAgentContextUsage(memberId: string): Promise; export type AgentSystemPromptRead = { available: true; text: string; } | { available: false; reason: "instance_not_running"; }; export declare function readAgentSystemPrompt(memberId: string): Promise; export declare function getMemberActiveTools(memberId: string): { sessionActive: boolean; tools: MemberActiveToolInfo[]; message?: string; }; export declare function getMemberActiveScopes(memberId: string): string[]; export declare function applyPendingAfterPromptSettlement(instance: AgentInstance, trigger: string): void; export declare function refreshAllInstanceModelRegistries(): Promise<{ refreshed: number; failed: number; }>; export declare function invalidateModelCredentialProfile(profileId: string, providerSlug: string, changeType?: PendingCredentialRefresh["changeType"]): Promise; export declare class MemberModelSwitchConflictError extends Error { constructor(memberId: string); } export declare function switchMemberModel(memberId: string, binding: { model: string; credentialId: string; }): Promise; export declare function switchMemberThinkingLevel(memberId: string, thinkingLevel: string): Promise; /** Manual compaction as ONE explicit conversation action (steer-removal §2): * room and DM address the live instance by its real scopeId — no * more room-path shortcuts. The operation marks the lifecycle busy BEFORE the * first await, so ordinary messages queue (they never cancel it); * explicit Stop stays the one canceller, including in the window between the * old prompt settling and compaction actually starting. Shell processes are * never killed — blocking shell waits are settled so the member's turn can * end, but the commands keep running in the PTY. */ export declare function compactMember(sourceRef: string | null, memberId: string): Promise<{ ok: boolean; action: string; }>; /** Drop the member's live runtime (teardown only; no SQL side effects). */ /** Stop the member's current work; queued work in every chat is cancelled. */ export declare function abortMember(memberId: string): { ok: boolean; action: string; }; /** Compact the member's session: the chat being served, else the member DM. */ export declare function compactMemberById(memberId: string): Promise<{ ok: boolean; action: string; }>; /** Reset the member's session from any interface. */ export declare function resetMemberSession(memberId: string): { ok: true; message: string; }; /** Restart the member's runtime: drop it; the next activation rebuilds. */ export declare function restartMember(memberId: string): { ok: true; message: string; }; export declare function destroyInstance(memberId: string, options?: { preservePending?: boolean; }): void; export declare function interruptAcceptedInput(_scopeId: string, instance: AgentInstance, trigger: string): void; /** Called only after durable member admission has closed. */ export declare function quiesceMember(memberId: string): Promise; export declare function shutdownAll(): Promise; /** Close one chat source without deleting/restarting its members or other chats. */ export declare function cancelConversationInputs(sourceRef: string): void; export declare function quiesceConversation(sourceRef: string): Promise; //# sourceMappingURL=controls.d.ts.map