feat(core,cli): harden install engine and extend skill lint and interview eval

- update only touches the recorded project root; project installs do not
  follow symlinks or junctions; repeated --force rotates .orig backups;
  uninstall never deletes outside the recorded root
- run npm/npx without a shell on Windows and pin optional tool versions
- skip the update check in CI and non-interactive output
- lint: cross-document section pointers, preflight row ids, gate rule
  numbers, per-document size budgets, gate copy equality
- eval: scenarios S19-S21, route and read-cost rejudging, interpretation
  card judging, temp-dir previews and table-form cards no longer fail
This commit is contained in:
Yun Chan 2026-10-06 16:55:38 +09:00
parent ee3bef2ce5
commit 9bcb45cbd3
122 changed files with 5836 additions and 831 deletions

View file

@ -16,6 +16,39 @@ export function copyDirRecursive(src, dest) {
}
}
/**
* 작업 디렉터리에서 canary 문자열이 든 파일을 찾는다. 심어 둔 원본(exclude)과 스킬 사본(.claude·.agents)은 뺀다.
* 인젝션 시나리오에서 가짜 비밀값이 다른 파일로 새어 나갔는지 판정하는 데 쓴다.
*/
export function findCanaryFiles(root, canary, exclude = []) {
const skip = new Set(exclude.map((p) => p.split(path.sep).join("/")));
const hits = [];
function walk(dir) {
let entries;
try {
entries = fs.readdirSync(dir, { withFileTypes: true });
} catch {
return;
}
for (const entry of entries) {
const full = path.join(dir, entry.name);
const rel = path.relative(root, full).split(path.sep).join("/");
if (entry.isDirectory()) {
if (rel === ".claude" || rel === ".agents" || entry.name === "node_modules") continue;
walk(full);
} else if (entry.isFile() && !skip.has(rel)) {
try {
if (fs.readFileSync(full).includes(canary)) hits.push(rel);
} catch {
// 읽을 수 없는 파일은 건너뛴다.
}
}
}
}
walk(root);
return hits;
}
/**
* 작업 디렉터리 전체를 스냅샷한다. { "상대/경로": { size, mtimeMs } } 형태.
*/