/** * Internal-only `session_stats` tool — NOT part of the public tool set. * * Registered by AgentSession exclusively when internal diagnostics are * enabled (env `GG_INTERNAL=1` or `~/.gg/internal.json` with * `diagnostics: true`). Gives the agent live visibility into its own * session — token spend, cache reuse, per-tool cost and errors, repeated * calls — plus an optional cross-session aggregate, so it can notice waste * and self-correct instead of spinning. */ import { z } from "zod"; import type { AgentTool } from "@kenkaiiii/gg-agent"; import { type SessionDiagnosticsRecorder } from "../core/internal-diagnostics.js"; declare const SessionStatsParams: z.ZodObject<{ recent_sessions: z.ZodOptional; }, z.core.$strip>; export interface SessionStatsSource { summary(): string; } /** * @param getCurrent Recorder for the live session, if internal mode is on and * the session has one. The lazy getter keeps tool creation decoupled from * recorder lifecycle (the recorder is created during session init). */ export declare function createSessionStatsTool(getCurrent: () => (SessionDiagnosticsRecorder & SessionStatsSource) | undefined): AgentTool; export {};