refactor(packages): rename rules-core to rules-engine

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
YeonGyu-Kim
2026-05-21 11:10:51 +09:00
parent 7c7aa28160
commit 4bbf1d9388
32 changed files with 28 additions and 28 deletions
+26
View File
@@ -0,0 +1,26 @@
import type { AgentsMdCache, DirectoryScanEntry, RuleFileCandidate, RuleScanCache, RuleScanCacheStats } from "./types";
export function createRuleScanCache(): RuleScanCache {
const candidateCache = new Map<string, readonly RuleFileCandidate[]>();
const directoryCache = new Map<string, readonly DirectoryScanEntry[]>();
return {
get: (key) => candidateCache.get(key),
set: (key, value) => candidateCache.set(key, value),
getDirScan: (dir) => directoryCache.get(dir),
setDirScan: (dir, entries) => directoryCache.set(dir, entries),
stats: (): RuleScanCacheStats => ({ candidateEntries: candidateCache.size, directoryEntries: directoryCache.size }),
clear: () => {
candidateCache.clear();
directoryCache.clear();
},
};
}
export function createAgentsMdCache(): AgentsMdCache {
const cache = new Map<string, readonly string[]>();
return {
get: (key) => cache.get(key),
set: (key, value) => cache.set(key, value),
clear: () => cache.clear(),
};
}