import type { AdvisoryBudget, AdvisoryCallRecord } from '../types/advisory/index.js'; import type { TriggerEvaluator } from './evaluator.js'; import type { AdvisoryCallContext } from './executor.js'; import type { AdvisoryExecutor } from './executor.js'; import type { AdvisorRegistry } from './registry.js'; /** * What the turn looks like right now, for an advisory call that did not come * from the iteration loop. * * A function rather than a snapshot because the tool is built once per turn * and called at an unknown later point: capturing the context at * construction would hand every advisor the state the turn had before it * started. */ export type AdvisoryCallContextProvider = () => AdvisoryCallContext; export declare class AdvisoryContext { readonly registry: AdvisorRegistry; readonly executor: AdvisoryExecutor; readonly evaluator: TriggerEvaluator; readonly callHistory: AdvisoryCallRecord[]; private readonly budget; private callContextProvider; constructor(registry: AdvisorRegistry, executor: AdvisoryExecutor, evaluator: TriggerEvaluator, budget?: AdvisoryBudget); /** Wired by the runtime once the turn exists. */ setCallContextProvider(provider: AdvisoryCallContextProvider): void; /** * The call context for a tool-initiated consultation. * * The trigger path (`iteration/phases/advisory.ts`) has always passed the * live messages, working state and tool catalogue. The TOOL path passed * `{ messages: [], iteration: 0 }` — a literal empty context — so an * advisor consulted by the model saw the question and nothing else, and * the model's `include_context` had nothing to include either way. The * empty fallback survives only for a context built without a runtime. */ callContext(): AdvisoryCallContext; recordCall(record: AdvisoryCallRecord): void; getBudgetStatus(): { remaining: number | undefined; total: number | undefined; used: number; }; /** Advisory spend so far this turn, summed from the recorded calls. */ spentCost(): number; checkBudget(): { allowed: boolean; reason?: string; }; } //# sourceMappingURL=context.d.ts.map