@code-yeongyu/senpi
Version:
Coding agent CLI with read, bash, edit, write tools and session management
47 lines • 1.72 kB
TypeScript
import type { Tool } from "@earendil-works/pi-ai";
import type { DynamicSystemPromptPart } from "./dynamic-prompt/build.ts";
import type { BuildSystemPromptOptions } from "./extensions/types.ts";
import type { PromptSizeStartupNotes } from "./prompt-size-startup.ts";
export interface PromptSizeEntry {
readonly name: string;
readonly source: string;
readonly bytes: number;
readonly estimatedTokens: number;
readonly boundingSettings: readonly string[] | null;
readonly count?: number;
readonly rewritten?: boolean;
readonly files?: readonly PromptSizeEntry[];
readonly topTools?: readonly {
readonly name: string;
readonly bytes: number;
}[];
}
export interface PromptSizeReport extends Partial<PromptSizeStartupNotes> {
readonly sections: readonly PromptSizeEntry[];
readonly total: {
readonly bytes: number;
readonly estimatedTokens: number;
};
readonly presetPartsMismatch?: {
readonly names: readonly string[];
readonly note: string;
};
}
/** Metadata only; prompt text never escapes into the report. */
export declare class PromptSizeAccounting {
#private;
constructor(input: {
readonly base: string;
readonly options: BuildSystemPromptOptions;
readonly parts: readonly DynamicSystemPromptPart[];
readonly extensionNames: ReadonlyMap<string, string>;
});
observe(contribution: {
readonly path: string;
readonly before: string;
readonly after: string;
readonly parts?: readonly DynamicSystemPromptPart[];
}): void;
report(tools: readonly Tool[]): PromptSizeReport;
}
//# sourceMappingURL=prompt-size-report.d.ts.map