@cleocode/caamp 2026.5.122 → 2026.5.123

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4435,6 +4435,24 @@ import { existsSync as existsSync14 } from "fs";
4435
4435
  import { readdir as readdir2, readFile as readFile7 } from "fs/promises";
4436
4436
  import { join as join8 } from "path";
4437
4437
  import matter from "gray-matter";
4438
+ function toJsonCompatibleYamlValue(value) {
4439
+ if (value instanceof Date) {
4440
+ if (Number.isNaN(value.getTime())) {
4441
+ return String(value);
4442
+ }
4443
+ const iso = value.toISOString();
4444
+ return iso.endsWith("T00:00:00.000Z") ? iso.slice(0, 10) : iso;
4445
+ }
4446
+ if (Array.isArray(value)) {
4447
+ return value.map((item) => toJsonCompatibleYamlValue(item));
4448
+ }
4449
+ if (value && typeof value === "object") {
4450
+ return Object.fromEntries(
4451
+ Object.entries(value).map(([key, item]) => [key, toJsonCompatibleYamlValue(item)])
4452
+ );
4453
+ }
4454
+ return value;
4455
+ }
4438
4456
  async function parseSkillFile(filePath) {
4439
4457
  try {
4440
4458
  const content = await readFile7(filePath, "utf-8");
@@ -4442,15 +4460,20 @@ async function parseSkillFile(filePath) {
4442
4460
  if (!data.name || !data.description) {
4443
4461
  return null;
4444
4462
  }
4463
+ const normalizedMetadata = toJsonCompatibleYamlValue(data.metadata);
4445
4464
  const allowedTools = data["allowed-tools"] ?? data.allowedTools;
4465
+ const scalarString = (value) => {
4466
+ if (value === void 0 || value === null) return void 0;
4467
+ return String(toJsonCompatibleYamlValue(value));
4468
+ };
4446
4469
  return {
4447
- name: String(data.name),
4448
- description: String(data.description),
4449
- license: data.license ? String(data.license) : void 0,
4450
- compatibility: data.compatibility ? String(data.compatibility) : void 0,
4451
- metadata: data.metadata,
4470
+ name: scalarString(data.name) ?? "",
4471
+ description: scalarString(data.description) ?? "",
4472
+ license: scalarString(data.license),
4473
+ compatibility: scalarString(data.compatibility),
4474
+ metadata: normalizedMetadata,
4452
4475
  allowedTools: typeof allowedTools === "string" ? allowedTools.split(/\s+/) : Array.isArray(allowedTools) ? allowedTools.map(String) : void 0,
4453
- version: data.version ? String(data.version) : void 0
4476
+ version: scalarString(data.version)
4454
4477
  };
4455
4478
  } catch {
4456
4479
  return null;
@@ -4723,4 +4746,4 @@ export {
4723
4746
  discoverSkillsMulti,
4724
4747
  validateSkill
4725
4748
  };
4726
- //# sourceMappingURL=chunk-RTK4A3WY.js.map
4749
+ //# sourceMappingURL=chunk-QUAT7JH6.js.map