fix(core,cli): harden install engine and argument parsing

- Reject unknown flags with exit 2 and never write on --dry-run, even in a TTY
- Treat files already matching the new content as up to date after an interrupted update
- Remove unmodified orphan files from older versions, keep and report modified ones and shared paths
- Degrade malformed manifests instead of blocking installs; readIfExists only maps ENOENT/ENOTDIR to null
- Block downgrades from older CLIs (semver), honor uninstall --scope, dedupe targets, fix next-step output and table width
- Deeper package verification, LF normalization for .mjs, MIT LICENSE
This commit is contained in:
Yun Chan 2026-10-09 18:18:49 +09:00
parent 97f2c241e4
commit eecd3f03ff
29 changed files with 867 additions and 124 deletions

View file

@ -25,8 +25,6 @@ const skill: SkillSource = {
version: "9.9.9",
skillMd: ['---', 'name: designpaca', 'description: "테스트용"', '---', '', BODY, ''].join("\n"),
files: new Map([["references/tokens.md", "# 토큰\n"]]),
body: BODY,
description: "테스트용",
};
const env = { home, cwd };
@ -156,7 +154,10 @@ test("windsurf: 네이티브 스킬 경로에 싣는다 — 본문 크기 제한
// 예전 규칙 파일 방식은 12,000자 상한 때문에 실제 스킬(본문 25KB)이 막혔다.
// 네이티브 스킬은 본문을 통째로 프롬프트에 넣지 않으므로 큰 본문도 설치돼야 한다.
const huge: SkillSource = { ...skill, body: "가".repeat(13_000) };
const huge: SkillSource = {
...skill,
skillMd: `${skill.skillMd}${"가".repeat(13_000)}`,
};
const hugePlan = await planInstall("windsurf", "project", huge, env);
assert.ok(!hugePlan.blocked, "본문이 크다고 막히면 안 된다");