Impressum skills.ts
Interaktion und PortierbarkeitJAVA
import { randomUUID } from "node:crypto"; import fs from "node:fs/promises"; import path from "node:path"; import { bumpSkillsSnapshotVersion } from "../api.js"; import { assertSkillContentSafe, scanSkillContent } from "./scanner.js"; import type { SkillProposal, SkillScanFinding } from "./types.js";
export async function writeSupportFile(params: {
workspaceDir: string;
skillName: string;
relativePath: string;
content: string;
maxBytes: number;
}): Promise<string> { const name = assertValidSkillName(params.skillName); const parts = params.relativePath.split(/[\\/]+/).filter(Boolean); if (parts.length < 2 || !SUPPORT_DIRS.has(parts[0])) { thrownew Error(`support file path must start with ${Array.from(SUPPORT_DIRS).join(", ")}`);
} if (parts.some((part) => part === "." || part === "..")) { thrownew Error("support file path escapes skill directory");
} if (Buffer.byteLength(params.content, "utf8") > params.maxBytes) { thrownew Error(`support file exceeds ${params.maxBytes} bytes`);
}
assertSkillContentSafe(params.content); const root = skillDir(params.workspaceDir, name); const target = path.resolve(root, ...parts); if (!target.startsWith(`${root}${path.sep}`)) { thrownew Error("support file path escapes skill directory");
}
await atomicWrite(target, `${params.content.trimEnd()}\n`); return target;
}
Messung V0.5 in Prozent
¤ 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:
(Wie Sie bei der Firma Beratungs- und Dienstleistungen beauftragen können 2026-10-11)
¤
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.