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:
parent
97f2c241e4
commit
eecd3f03ff
29 changed files with 867 additions and 124 deletions
|
|
@ -17,6 +17,8 @@ import { anyExists, scopeRoot, skillDirActions } from "./common.ts";
|
|||
* 전역 ~/.gemini/config/skills/<이름>/
|
||||
*
|
||||
* 전역 경로는 Antigravity Global Discovery 가 탐색하는 표준 위치(~/.gemini/config/skills)다.
|
||||
* 공식 문서상 Antigravity CLI 는 전역 경로가 별도(~/.gemini/antigravity-cli/skills)라 이 타깃의 전역 설치를
|
||||
* 읽지 못할 수 있다. 과거에 CLI 경로로 바꿨다가 되돌린 이력이 있어 경로 결정은 보류했다(감사 F049).
|
||||
*
|
||||
* 프론트매터 요구사항: `description` 필수, `name` 필수.
|
||||
* 우리 SKILL.md 는 둘 다 갖고 있다.
|
||||
|
|
|
|||
|
|
@ -22,25 +22,11 @@ export function skillDirActions(root: string, skill: SkillSource): FileAction[]
|
|||
return actions;
|
||||
}
|
||||
|
||||
/** references 를 별도 디렉터리로 내보내는 타깃(Cursor·AGENTS.md)용 */
|
||||
export function referenceActions(root: string, skill: SkillSource): FileAction[] {
|
||||
const actions: FileAction[] = [];
|
||||
for (const [rel, content] of skill.files) {
|
||||
actions.push({ kind: "write", path: path.join(root, ...rel.split("/")), content });
|
||||
}
|
||||
actions.push({
|
||||
kind: "write",
|
||||
path: path.join(root, ".designpaca_version"),
|
||||
content: `${skill.version}\n`,
|
||||
});
|
||||
return actions;
|
||||
}
|
||||
|
||||
/**
|
||||
* 본문의 `references/...` 상대 경로를 실제 설치 위치로 바꾼다.
|
||||
*
|
||||
* Claude Code·Codex 는 스킬 디렉터리를 통째로 복사하므로 상대 경로가 그대로 맞다.
|
||||
* Cursor·Windsurf·AGENTS.md 는 본문만 다른 자리로 옮기고 references 는 별도 디렉터리에 풀기
|
||||
* AGENTS.md 어댑터는 본문만 다른 자리로 옮기고 references 는 별도 디렉터리에 풀기
|
||||
* 때문에, 재작성하지 않으면 본문이 가리키는 경로가 전부 존재하지 않는 곳을 가리킨다.
|
||||
*/
|
||||
export function rewriteRefPaths(body: string, prefix: string): string {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue