/** * ContextGenerator — markdown summaries for agent prompt injection. * * Ranks facts by confidence, then connectedness, then freshness; assembles * the spec'd sections and trims to a token budget (≈4 chars/token). Entities * below the stale-confidence floor are excluded unless explicitly requested * (KG Req 6.1–6.5, 7.5). * * @module */ import type { ContextOutput } from './types.js'; import type { KnowledgeIndex } from './index/knowledge-index.js'; export type ContextScope = { type: 'full'; } | { type: 'phase'; phase: string; } | { type: 'file'; path: string; }; export interface ContextOptions { maxTokens?: number; includeStale?: boolean; } /** Default token budget for generated context (KG Req 6.4). */ export declare const DEFAULT_MAX_TOKENS = 2000; export declare class ContextGenerator { private readonly index; constructor(index: KnowledgeIndex); generate(scope: ContextScope, options?: ContextOptions): ContextOutput; private entitiesForScope; } /** Rough token estimate: 1 token ≈ 4 characters. */ export declare function estimateTokens(text: string): number; //# sourceMappingURL=context-generator.d.ts.map