import type { Context as InferenceContext } from "@mariozechner/pi-ai"; import type { Logger } from "pino"; import type { Connector } from "@/types"; import type { AuthStore } from "../../../auth/store.js"; import type { AssistantSettings, ProviderSettings } from "../../../settings.js"; import type { Heartbeats } from "../../heartbeat/heartbeats.js"; import type { EngineEventBus } from "../../ipc/events.js"; import type { Memory } from "../../memory/memory.js"; import type { ConnectorRegistry } from "../../modules/connectorRegistry.js"; import type { InferenceRouter } from "../../modules/inference/router.js"; import type { ToolResolverApi } from "../../modules/toolResolver.js"; import type { Skills } from "../../skills/skills.js"; import type { Agent } from "../agent.js"; import type { AgentSystem } from "../agentSystem.js"; import type { AgentHistoryRecord, AgentMessage } from "./agentTypes.js"; type AgentLoopRunOptions = { entry: AgentMessage; agent: Agent; source: string; context: InferenceContext; connector: Connector | null; connectorRegistry: ConnectorRegistry; inferenceRouter: InferenceRouter; toolResolver: ToolResolverApi; authStore: AuthStore; eventBus: EngineEventBus; assistant: AssistantSettings | null; agentSystem: AgentSystem; heartbeats: Heartbeats; memory: Memory; skills: Skills; providersForAgent: ProviderSettings[]; verbose: boolean; logger: Logger; abortSignal?: AbortSignal; appendHistoryRecord?: (record: AgentHistoryRecord) => Promise; notifySubagentFailure: (reason: string, error?: unknown) => Promise; }; type AgentLoopResult = { responseText?: string | null; historyRecords: AgentHistoryRecord[]; contextOverflow?: boolean; contextOverflowTokens?: number; tokenStatsUpdates: Array<{ provider: string; model: string; size: { input: number; output: number; cacheRead: number; cacheWrite: number; total: number; }; }>; }; /** * Runs the agent inference loop and handles tool execution + response delivery. * Expects: context already includes the user message and system prompt. */ export declare function agentLoopRun(options: AgentLoopRunOptions): Promise; export {}; //# sourceMappingURL=agentLoopRun.d.ts.map