function isNodeReadableStream(value: unknown): value is NodeJS.ReadableStream { returnBoolean(value && typeof (value as NodeJS.ReadableStream).pipe === "function");
}
function resolveDownloadTargetDir(entry: SkillEntry, spec: SkillInstallSpec): string { const safeRoot = resolveSkillToolsRootDir(entry); const raw = spec.targetDir?.trim(); if (!raw) { return safeRoot;
}
// Treat non-absolute paths as relative to the per-skill tools root. const resolved =
raw.startsWith("~") || path.isAbsolute(raw) || isWindowsDrivePath(raw)
? resolveUserPath(raw)
: path.resolve(safeRoot, raw);
if (!isWithinDir(safeRoot, resolved)) { thrownew Error(
`Refusing to install outside the skill tools directory. targetDir="${raw}" resolves to "${resolved}". Allowed root: "${safeRoot}".`,
);
} return resolved;
}
function resolveArchiveType(spec: SkillInstallSpec, filename: string): string | undefined { const explicit = normalizeOptionalLowercaseString(spec.archive); if (explicit) { return explicit;
} const lower = normalizeOptionalLowercaseString(filename); if (!lower) { return undefined;
} if (lower.endsWith(".tar.gz") || lower.endsWith(".tgz")) { return"tar.gz";
} if (lower.endsWith(".tar.bz2") || lower.endsWith(".tbz2")) { return"tar.bz2";
} if (lower.endsWith(".zip")) { return"zip";
} return undefined;
}
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.12Bemerkung:
(vorverarbeitet am 2026-05-26)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.