import { BASIC_CORE_PROMPT_MATERIAL_ID, type DefinedPromptMaterial, type PromptPackBudget, type PromptPackError, type PromptPackMaterialKind, type PromptPackMaterialSourceCategory, type PromptPackSegmentKind } from "./promptDefiner.js";
export type PromptAssemblerOrdering = "input-order" | "priority-desc";
export type PromptPackSegmentStability = "static" | "semi-stable" | "dynamic";
export type PromptPackSegmentCachePolicy = "cacheable-prefix" | "cacheable-readonly" | "dynamic-no-cache";
export type PromptPackSegment = {
    segmentId: string;
    segmentKind: PromptPackSegmentKind;
    stability: PromptPackSegmentStability;
    cachePolicy: PromptPackSegmentCachePolicy;
    segmentHash: string;
    estimatedTokens: number;
    materialRefs: readonly string[];
    sourceRefs: readonly string[];
    providerHints: Readonly<Record<string, unknown>>;
};
export type PromptPackCachePlan = {
    kind: "praxis.promptPack.cachePlan";
    format: "praxis.promptPack.cachePlan.v1";
    strategy: "stable-segment-prefix";
    orderedSegmentKinds: readonly PromptPackSegmentKind[];
    providerVisibleSegmentKinds: readonly PromptPackSegmentKind[];
    segments: readonly PromptPackSegment[];
    cacheablePrefixSegmentKinds: readonly PromptPackSegmentKind[];
    dynamicSegmentKinds: readonly PromptPackSegmentKind[];
    cacheUnit: "prompt-pack-section";
    cachePriority: readonly ["context-quality", "cost", "latency"];
    cacheRiskWarnings: readonly string[];
    providerPayloadCreated: false;
};
export type PromptPackCacheTelemetry = {
    inputTokens?: number;
    cachedInputTokens?: number;
    cacheHitRate?: number;
    segmentHashes: Readonly<Record<string, string>>;
    cacheMissReasons: readonly string[];
};
export type PromptAssemblerRequest = {
    runtimeId?: string;
    sessionId?: string;
    targetModel?: string;
    materials?: readonly DefinedPromptMaterial[];
    budget?: PromptPackBudget;
    ordering?: PromptAssemblerOrdering;
    allowUntrustedInjection?: boolean;
};
export type PromptTrimRecord = {
    materialId: string;
    reason: "max-materials" | "max-material-characters" | "max-estimated-tokens";
    originalEstimatedTokens: number;
    keptEstimatedTokens: number;
};
export type PromptInjectionRecord = {
    materialId: string;
    source: string;
    action: "allowed-trusted" | "allowed-untrusted-by-request";
};
export type AssembledPromptMaterial = {
    id: string;
    kind: PromptPackMaterialKind;
    text: string;
    source: string;
    sourceCategory: PromptPackMaterialSourceCategory;
    priority: number;
    estimatedTokens: number;
    trusted: boolean;
    scope?: string;
    metadata: Readonly<Record<string, string | number | boolean | object>>;
    protected: boolean;
    promptSegmentKind: PromptPackSegmentKind;
    internalOnly: boolean;
};
export type AssembledPromptToolDeclaration = {
    materialId: string;
    name: string;
    description: string;
    inputSchema: Readonly<Record<string, unknown>>;
    metadata: Readonly<Record<string, unknown>>;
};
export type AssembledPromptToolResult = {
    materialId: string;
    callId?: string;
    name?: string;
    content: string;
    metadata: Readonly<Record<string, unknown>>;
};
export type AssembledPromptToolState = {
    materialId: string;
    callId?: string;
    name?: string;
    arguments?: string;
    metadata: Readonly<Record<string, unknown>>;
};
export type AssembledPromptToolPack = {
    policies: readonly AssembledPromptMaterial[];
    declarations: readonly AssembledPromptToolDeclaration[];
    results: readonly AssembledPromptToolResult[];
    callStates: readonly AssembledPromptToolState[];
};
export type PromptMaterialSourceRecord = {
    materialId: string;
    source: string;
    sourceCategory: PromptPackMaterialSourceCategory;
    kind: PromptPackMaterialKind;
    trusted: boolean;
};
export type StandardPromptPack = {
    kind: "praxis.promptPack";
    format: "praxis.promptPack.assembled.v1";
    runtimeId: string;
    sessionId: string;
    targetModel?: string;
    basicCorePromptMaterialId: typeof BASIC_CORE_PROMPT_MATERIAL_ID;
    materials: readonly AssembledPromptMaterial[];
    toolPack: AssembledPromptToolPack;
    renderedText: string;
    json: Readonly<{
        materials: readonly AssembledPromptMaterial[];
        toolPack: AssembledPromptToolPack;
    }>;
    sourceRecords: readonly PromptMaterialSourceRecord[];
    materialSourceCategories: readonly PromptPackMaterialSourceCategory[];
    segments: readonly PromptPackSegment[];
    cachePlan: PromptPackCachePlan;
    cacheTelemetry: PromptPackCacheTelemetry;
    trimRecords: readonly PromptTrimRecord[];
    injectionRecords: readonly PromptInjectionRecord[];
    totalEstimatedTokens: number;
    lowering: {
        mapper: "pending";
        providerPayloadCreated: false;
    };
    unsafeSideEffects: false;
};
export type PromptAssemblerResult = {
    ok: true;
    promptPack: StandardPromptPack;
    events: readonly string[];
} | {
    ok: false;
    error: PromptPackError;
    events: readonly string[];
};
export declare const promptAssemblerDescriptor: {
    readonly capability: "prompt-assembler";
    readonly route: "agent_executionEngine.promptPack";
    readonly purpose: "assemble Praxis internal PromptPack constructs into governed text and JSON pack forms";
    readonly providerPayloadCreated: false;
    readonly unsafeSideEffects: false;
};
export declare function assemblePromptPack(request?: PromptAssemblerRequest): PromptAssemblerResult;
