import type { PromptPackMaterialDraft } from "../../agent_executionEngine/promptPack/promptDefiner.js";
import type { AgentManifest, ToolSpec } from "../runtimeAgentManifest.js";
export type BaseToolContextExposureMode = "allOpen" | "autoFolded" | "manualCoarse" | "manualFine" | "semiAuto" | "intelligent" | "none";
export type BaseToolContextNodeKind = "root" | "family" | "group" | "tool";
export type BaseToolContextHeatWeights = {
    family: number;
    group: number;
    tool: number;
};
export type BaseToolContextUsageRecord = {
    toolId: string;
    count?: number;
};
export type BaseToolContextHeatState = {
    kind: "praxis.baseTool.contextHeatState";
    agentId: string;
    sessionId?: string;
    updatedAt: string;
    usage: readonly Required<BaseToolContextUsageRecord>[];
};
export type BaseToolContextSelection = {
    families?: readonly string[];
    groups?: readonly string[];
    toolIds?: readonly string[];
};
export type BaseToolContextFoldingOptions = {
    mode?: BaseToolContextExposureMode;
    manual?: BaseToolContextSelection;
    auto?: BaseToolContextSelection;
    usage?: readonly BaseToolContextUsageRecord[];
    heatWeights?: Partial<BaseToolContextHeatWeights>;
    keepExpandedScore?: number;
    includeToolMarkdown?: boolean;
};
export type BaseToolContextTreeNode = {
    nodeId: string;
    kind: BaseToolContextNodeKind;
    label: string;
    family?: string;
    group?: string;
    toolId?: string;
    title: string;
    summary: string;
    score: number;
    expanded: boolean;
    children: readonly BaseToolContextTreeNode[];
};
export type BaseToolContextTree = {
    kind: "praxis.baseTool.contextTree";
    mode: BaseToolContextExposureMode;
    root: BaseToolContextTreeNode;
    expandedNodeIds: readonly string[];
    foldedNodeIds: readonly string[];
    selectedToolIds: readonly string[];
    mountedToolCount: number;
    materials: readonly PromptPackMaterialDraft[];
};
export declare function createBaseToolContextHeatState(input: {
    agentId: string;
    sessionId?: string;
    usage?: readonly BaseToolContextUsageRecord[];
    updatedAt?: string;
}): BaseToolContextHeatState;
export declare function applyBaseToolContextUsage(state: BaseToolContextHeatState, usage: readonly BaseToolContextUsageRecord[], updatedAt: string): BaseToolContextHeatState;
export declare function createBaseToolContextTree(tools: readonly ToolSpec[], options?: BaseToolContextFoldingOptions): BaseToolContextTree;
export declare function createBaseToolContextPromptMaterials(input: {
    manifest: AgentManifest;
    usage?: readonly BaseToolContextUsageRecord[];
    options?: BaseToolContextFoldingOptions;
}): readonly PromptPackMaterialDraft[];
export declare const baseToolContextFoldingDescriptor: {
    readonly surface: "runtime.execEngine.baseToolContextFolding";
    readonly contextShape: "baseTool_index/family/group/tool";
    readonly defaultMode: "intelligent";
    readonly mutatesHost: false;
    readonly executesTools: false;
    readonly promptSegmentKind: "toolDeclarations";
};
