refactor: drop pnpm skill installer

This commit is contained in:
Peter Steinberger
2025-12-20 17:39:54 +01:00
parent adc2900aff
commit 4ee292a952
3 changed files with 1 additions and 17 deletions

View File

@@ -62,7 +62,7 @@ Fields under `metadata.clawdis`:
- `requires.env` — list; env var must exist **or** be provided in config.
- `requires.config` — list of `clawdis.json` paths that must be truthy.
- `primaryEnv` — env var name associated with `skills.<name>.apiKey`.
- `install` — optional array of installer specs used by the macOS Skills UI (brew/node/go/pnpm/shell).
- `install` — optional array of installer specs used by the macOS Skills UI (brew/node/go/shell).
Installer example:

View File

@@ -86,18 +86,6 @@ function buildInstallCommand(
return { argv: null, shell: null, error: "missing go module" };
return { argv: ["go", "install", spec.module], shell: null };
}
case "pnpm": {
if (!spec.repoPath || !spec.script) {
return {
argv: null,
shell: null,
error: "missing pnpm repoPath/script",
};
}
const repoPath = resolveUserPath(spec.repoPath);
const cmd = `cd ${JSON.stringify(repoPath)} && pnpm install && pnpm run ${JSON.stringify(spec.script)}`;
return { argv: null, shell: cmd };
}
case "shell": {
if (!spec.command)
return { argv: null, shell: null, error: "missing shell command" };

View File

@@ -76,14 +76,12 @@ function selectPreferredInstallSpec(
const brewSpec = findKind("brew");
const nodeSpec = findKind("node");
const goSpec = findKind("go");
const pnpmSpec = findKind("pnpm");
const shellSpec = findKind("shell");
if (prefs.preferBrew && hasBinary("brew") && brewSpec) return brewSpec;
if (nodeSpec) return nodeSpec;
if (brewSpec) return brewSpec;
if (goSpec) return goSpec;
if (pnpmSpec) return pnpmSpec;
if (shellSpec) return shellSpec;
return indexed[0];
}
@@ -110,8 +108,6 @@ function normalizeInstallOptions(
label = `Install ${spec.package} (${prefs.nodeManager})`;
} else if (spec.kind === "go" && spec.module) {
label = `Install ${spec.module} (go)`;
} else if (spec.kind === "pnpm" && spec.repoPath) {
label = `Install ${spec.repoPath} (pnpm)`;
} else {
label = "Run installer";
}