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:
parent
ee3bef2ce5
commit
9bcb45cbd3
122 changed files with 5836 additions and 831 deletions
21
packages/cli/scripts/skill-allowlist.mjs
Normal file
21
packages/cli/scripts/skill-allowlist.mjs
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
// 사용자 설치물(dist/skill → 각 하네스의 스킬 디렉터리)에 실을 파일의 허용 목록.
|
||||
// bundle-skill.mjs(복사 시)와 verify-package.mjs(배포 직전)가 같은 규칙을 쓴다.
|
||||
//
|
||||
// 이유: 예전에는 packages/skill 아래를 통째로 복사해서 추적되지 않은 스크래치·.env·로컬 메모가
|
||||
// 로컬 publish 때 npm 에 실릴 수 있었고, 개발용 계약 테스트(design-gate-contract.test.mjs)가
|
||||
// 모든 사용자 스킬 디렉터리에 설치됐다. 새 종류의 파일을 실으려면 여기서 명시적으로 연다.
|
||||
|
||||
/** posix 상대 경로(rel) 가 설치물에 들어가도 되는가 */
|
||||
export function isAllowedSkillFile(rel) {
|
||||
const parts = rel.split("/");
|
||||
if (parts.some((p) => p.startsWith(".") && p !== ".designpaca_version")) return false;
|
||||
if (/\.test\.[cm]?[jt]s$/.test(rel)) return false;
|
||||
if (parts.length === 1) {
|
||||
return ["SKILL.md", "CHANGELOG.md", "THIRD_PARTY_NOTICES.md", ".designpaca_version"].includes(rel);
|
||||
}
|
||||
const [top] = parts;
|
||||
if (top === "references") return rel.endsWith(".md");
|
||||
if (top === "agents") return /\.ya?ml$/.test(rel);
|
||||
if (top === "tools") return parts.length === 2 && rel.endsWith(".mjs");
|
||||
return false;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue