import type { ActivationStatusRecord } from './activation-types.js'; export declare const RUNTIME_V2_PRINCIPLE_BUDGET = 2000; export interface ActivatedPrinciple { principleId: string; text: string; artifactId: string; activationId: string; /** * 谁授权了这条激活 (INV-05, P0-G): * - owner: 经 approvals 队列 approve (derived join on artifact_id+channel) * - system_policy: PRI-811 Phase B 前的存量行 — 旧低风险渠道 policy 自动 * 激活 (无 approval 行);Phase B 起不再产生新的 system_policy 激活 * - undefined: 读取层无法判定 (旧数据/查询失败) — 渲染层不得声称 owner */ authority?: 'owner' | 'system_policy'; /** owner 授权时的决定者 (approvals.decided_by) */ approvedBy?: string; } export interface PromptActivationReaderResult { principles: ActivatedPrinciple[]; warnings: string[]; source: 'runtime_v2'; } export declare function isRecord(value: unknown): value is Record; export declare function filterPromptActivations(activations: ActivationStatusRecord[]): ActivationStatusRecord[]; export declare function resolvePrincipleFromArtifact(artifactRow: unknown, activation: ActivationStatusRecord): { ok: true; principle: ActivatedPrinciple; } | { ok: false; warning: string; }; export declare function trimToBudget(principles: ActivatedPrinciple[], budget: number, escapeFn?: (s: string) => string): { lines: string[]; injectedIds: Set; truncated: boolean; }; export interface RenderDirectivesOptions { /** XML-escape function applied to principle ids and texts. */ escapeFn?: (s: string) => string; /** * PRI-532 (SPEC §5.2): append the agent self-report instruction footer. * When a directive actually changes the agent's behavior this turn, the * agent appends one 📌 line echoing the directive id — captured by the * plugin's llm_output / before_message_write handlers. */ selfReportInstruction?: boolean; } export declare function renderPrinciplesToDirectives(principles: { principleId: string; text: string; artifactId: string; activationId: string; authority?: 'owner' | 'system_policy'; approvedBy?: string; }[], injectedIds: Set, options?: RenderDirectivesOptions): string; //# sourceMappingURL=prompt-activation-reader-contract.d.ts.map