UNPKG

@phren/cli

Version:

Knowledge layer for AI agents - CLI, MCP server, and data layer

30 lines (29 loc) • 1.3 kB
import type { FindingCitation } from "./citation.js"; export interface CitationFreshness { state: "current" | "changed" | "unknown"; checkedAt: string; head?: string; lastCommit?: { sha: string; summary: string; authoredAt: string; } | null; } export interface CitationFreshnessOptions { phrenPath?: string; projectRemote?: string | null; } export type FreshnessCitation = FindingCitation & { projectRemote?: string | null; }; /** Reads persisted resolutions and checks only; never runs git or accesses the network. Changed evidence survives refresh failures for seven days. */ export declare function cachedCitationFreshness(citation: FreshnessCitation, opts?: CitationFreshnessOptions): CitationFreshness | undefined; interface RefreshOptions extends CitationFreshnessOptions { budgetMs: number; signal?: AbortSignal; fetchImpl?: typeof fetch; } /** Best effort, bounded, and deduplicated per cache key, including background Hook polls. */ export declare function refreshCitationFreshness(citations: readonly FreshnessCitation[], opts: RefreshOptions): Promise<Map<FreshnessCitation, CitationFreshness>>; export declare function citationFreshnessAnnotation(citation: FindingCitation, value?: CitationFreshness): string; export {};