import type { Skill } from "@earendil-works/pi-coding-agent"; import type { ConscienceConfig } from "./config.js"; export type LoadSkipReason = "load_denied" | "load_too_large" | "load_changed" | "load_failed" | "metadata_unsafe" | "already_supplied" | "no_policy" | "not_eligible" | "headroom_unknown"; export interface LoadResult { body: string | null; skillName: string; advertisedPath: string; resolvedPath: string; relativeRef: string; skipReason?: LoadSkipReason; bytesLoaded: number; } export interface ConsciencePolicy { questionHash: string; model: string; recommendThreshold: number; loadThreshold: number; } export declare function setActivePolicy(policy: ConsciencePolicy | null): void; /** Record a file's lstat identity at selection time (before judge). */ export declare function recordFileIdentity(skillName: string, filePath: string): void; /** Clear the identity cache (called on new prompt). */ export declare function clearFileIdentityCache(): void; export declare function getActivePolicy(): ConsciencePolicy | null; export declare function policyMatches(questionHash: string, model: string): boolean; /** * Rules 1-10: load a skill body from disk. */ export declare function loadSkillBody(skill: Skill, config: ConscienceConfig, opts: { pathRules?: readonly import("./config.js").PathRule[]; exemptRules: string[]; loadedBytes: number; remainingMs: number; consentGiven: boolean; projectTrusted: boolean; catalogName: string; catalogDescription: string; userInvoked: boolean; /** From ctx.getContextUsage()?.contextWindow, or null if unknown. */ contextWindow: number | null; /** Whether images are in the current context. */ hasImages: boolean; }): LoadResult; /** * Rule 8: build the custom message with complete body, identity, and relative-reference. */ export declare function buildLoadMessage(result: LoadResult): string;