/** * swarm/mode — SwarmMode state machine. * * Tracks whether swarm mode is active and manages the lifecycle * of entering/exiting swarm mode with system reminders. * * Architecture reference: AgentSwarm pattern. */ /** How swarm mode was triggered. */ export type SwarmModeTrigger = "manual" | "task" | "tool"; /** * Minimal interface for the agent object that SwarmMode needs. * The real agent is provided by the extension context. */ export interface SwarmModeAgent { readonly context: { /** * Append a system reminder to the agent context. * The reminder is injected into the model's context window. */ appendSystemReminder(text: string, origin: { kind: string; variant: string; }): void; /** * Pop a matched message from the context. * Returns true if a message was removed. */ popMatchedMessage(predicate: (origin: unknown) => boolean): boolean; }; /** Emit a status update event. */ emitStatusUpdated(): void; /** Log a record to the agent's event log. */ records: { logRecord(entry: { type: string; trigger?: string; }): void; }; } export declare class SwarmMode { private readonly agent; private active; constructor(agent: SwarmModeAgent); /** Enter swarm mode with the given trigger. No-op if already active. */ enter(trigger: SwarmModeTrigger): void; /** Restore a previously saved swarm mode trigger (e.g., on session resume). */ restoreEnter(trigger: SwarmModeTrigger): void; /** Exit swarm mode. No-op if not active. */ exit(): void; /** Whether swarm mode is currently active. */ get isActive(): boolean; /** Whether swarm mode should auto-exit after the current operation. */ get shouldAutoExit(): boolean; /** The current trigger, or null if not active. */ get currentTrigger(): SwarmModeTrigger | null; } //# sourceMappingURL=mode.d.ts.map