/** * Light mode — a minimal, low-token preset for small/local models. * * The preset restricts the session to the four core tools (read, write, edit, * bash) with shortened descriptions and undocumented parameter schemas, * replaces the default system prompt with a terse one, and disables * subagents, TodoWrite, skills, context files, and the mode-prompt appendix. * The goal is the smallest possible fixed per-turn surface (system prompt + * serialized tool schemas) so weak tool-callers waste no context on harness * boilerplate. bash subsumes the search tool: discovery happens via the shell. */ import type { AgentTool } from "@kolisachint/hoocode-agent-core"; import type { ToolInfo } from "./extensions/types.js"; /** The only tools a light session exposes. */ export declare const LIGHT_TOOL_NAMES: readonly ["read", "write", "edit", "bash"]; /** * Terse replacement for the default system prompt. buildSystemPrompt appends * the current date and working directory; nothing else rides along because * light mode also disables skills, context files, and the mode appendix. */ export declare const LIGHT_SYSTEM_PROMPT = "You are a coding agent. Use the tools to read, edit, and write files and run shell commands.\nSearch with bash (rg/find/ls). Prefer edit for changes; write for new files.\nBe concise. No preamble."; /** * Environment flag signaling light mode to code that cannot see CLI flags or * settings — notably the hoo-core modes extension, which reads it to skip the * `` system-prompt appendix. Same pattern as * WARM_SUBAGENTS_ENV / SUBAGENT_MAX_DEPTH_ENV. */ export declare const LIGHT_MODE_ENV = "HOOCODE_LIGHT"; /** Whether light mode was signaled through the environment. */ export declare function isLightModeEnv(): boolean; /** * Build the four light tools for `baseToolsOverride`: the real tool * implementations wearing short descriptions and stripped parameter schemas. */ export declare function createLightTools(cwd: string): Record; /** Token breakdown of a session's fixed per-turn surface. */ export interface PromptSurface { /** Estimated tokens in the assembled system prompt. */ systemPromptTokens: number; /** Estimated tokens across the serialized active tool schemas. */ toolSchemaTokens: number; /** systemPromptTokens + toolSchemaTokens. */ totalTokens: number; /** Per-tool breakdown of the serialized schema estimate. */ tools: Array<{ name: string; tokens: number; }>; } /** * What one tool costs on every request: its serialized `{name, description, * parameters}`, the three fields a provider re-sends each turn. * * Exported because the surface is worth showing for a tool that is *off* too — * `/settings` prices each toggle with it, and a disabled tool has no entry in a * measured surface precisely because it currently costs nothing. */ export declare function measureToolSchemaTokens(tool: ToolInfo): number; /** * Measure the fixed per-turn surface a session sends on every request: the * assembled system prompt plus the serialized schemas (name, description, * parameters) of the active tools. Providers add their own envelope on top, * so treat the result as a floor estimate. */ export declare function measurePromptSurface(session: { systemPrompt: string; getActiveToolNames(): string[]; getAllTools(): ToolInfo[]; }): PromptSurface; //# sourceMappingURL=light.d.ts.map