aiwg
Version:
Deployment tool and support utility for AI context. Copies agents, skills, commands, rules, and behaviors into the paths each AI platform reads (Claude Code, Codex, Copilot, Cursor, Warp, OpenClaw, and 6 more) so one source of truth works across 10 platfo
72 lines • 1.77 kB
TypeScript
/**
* RLM Result Cache — Type Definitions
*
* @implements #1203
* @see .aiwg/architecture/adr-rlm-index-features-impl-plan.md
*/
/** One artifact contributing to a cache key. */
export interface CacheInput {
artifactId: string;
contentHash: string;
}
/** Composite key inputs that fully determine a cache entry. */
export interface CacheKey {
inputs: CacheInput[];
query: string;
subPrompt: string;
model: string;
aggregateStrategy: string;
}
/** Cache manifest — which artifacts contributed. */
export interface CacheManifest {
inputs: CacheInput[];
}
/** Cache metadata — query, prompt, model, cost. */
export interface CacheMetadata {
hash: string;
query: string;
subPrompt: string;
model: string;
aggregateStrategy: string;
createdAt: string;
tokensIn?: number;
tokensOut?: number;
costUsd?: number;
}
/** Materialized cache entry on disk. */
export interface CacheEntry {
hash: string;
result: unknown;
manifest: CacheManifest;
metadata: CacheMetadata;
}
/** Cache list row (compact summary). */
export interface CacheEntrySummary {
hash: string;
model: string;
query: string;
createdAt: string;
ageDays: number;
inputCount: number;
costUsd: number | null;
}
/** Cache statistics. */
export interface CacheStats {
totalEntries: number;
totalSizeKb: number;
oldestAgeDays: number | null;
newestAgeDays: number | null;
totalCostUsd: number;
}
/** Eviction policy options. */
export interface EvictionOptions {
olderThanDays?: number;
hash?: string;
}
/** Eviction result. */
export interface EvictionResult {
evictedCount: number;
evictedBytes: number;
hashes: string[];
}
//# sourceMappingURL=types.d.ts.map