@quatronic/sdk 0.7.0 → 0.7.1-rc.2

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.
@@ -377,6 +377,10 @@ ${CLAUDE_MD_IMPORT}
377
377
  detached: [...detached].sort(),
378
378
  files: Object.fromEntries([...tree].map(([rel, c]) => [rel, hashContent(c)]))
379
379
  };
380
+ const skillsIn = (rels) => new Set([...rels].map(skillOf).filter((n) => n !== void 0 && !detached.has(n)));
381
+ const before = skillsIn(Object.keys(known));
382
+ const after = skillsIn(tree.keys());
383
+ const touched = skillsIn([...writes.keys(), ...deletes]);
380
384
  const manifestText = renderManifest(manifest);
381
385
  if (s.read(MANIFEST_PATH) === void 0 || normalise(s.read(MANIFEST_PATH)) !== manifestText) {
382
386
  writes.set(MANIFEST_PATH, manifestText);
@@ -387,6 +391,9 @@ ${CLAUDE_MD_IMPORT}
387
391
  edited: edited.sort(),
388
392
  adopted: adopted.sort(),
389
393
  legacyRemoved: legacyRemoved.sort(),
394
+ skillsAdded: [...after].filter((n) => !before.has(n)).sort(),
395
+ skillsUpdated: [...after].filter((n) => before.has(n) && touched.has(n)).sort(),
396
+ skillsRemoved: [...before].filter((n) => !after.has(n)).sort(),
390
397
  manifest,
391
398
  claudeMd: claudeMd === s.claudeMd ? void 0 : claudeMd,
392
399
  claudeMdRenamed: claudeMdRenamed.sort(([a], [b]) => a.localeCompare(b)),
@@ -403,12 +410,18 @@ function renderReport(p, opts) {
403
410
  const lines = [
404
411
  "### Qore skills",
405
412
  "",
406
- `Synced the managed skills for \`@quatronic/sdk@${p.manifest.sdkVersion}\` (runtime \`${f.runtime}\`, auth \`${f.auth}\`, database \`${f.db ? "yes" : "no"}\`${opts.inferred ? ", inferred from the app \u2014 pin with `qore-skills sync --features`" : ", pinned in the manifest"}).`
413
+ `${opts.check ? "Out of date: `qore-skills sync` would update" : "Synced"} the managed skills for \`@quatronic/sdk@${p.manifest.sdkVersion}\` (runtime \`${f.runtime}\`, auth \`${f.auth}\`, database \`${f.db ? "yes" : "no"}\`${opts.inferred ? ", inferred from the app \u2014 pin with `qore-skills sync --features`" : ", pinned in the manifest"}).`
407
414
  ];
408
415
  const managedWrites = [...p.writes.keys()].filter((r) => r !== MANIFEST_PATH);
409
416
  if (!managedWrites.length && !p.deletes.length && p.claudeMd === void 0) {
410
417
  lines.push("", "No skill content changed.");
411
418
  }
419
+ const skills = (title, names) => {
420
+ if (names.length) lines.push("", `**${title}:** ${names.map((n) => `\`${n}\``).join(", ")}`);
421
+ };
422
+ skills("Skills added", p.skillsAdded);
423
+ skills("Skills updated", p.skillsUpdated);
424
+ skills("Skills removed", p.skillsRemoved);
412
425
  const section = (title, items, note) => {
413
426
  if (!items.length) return;
414
427
  lines.push("", `**${title}** ${note}`, "", ...items.map((i) => `- \`.claude/${i}\``));
@@ -571,7 +584,7 @@ function main(argv = process.argv.slice(2)) {
571
584
  return 0;
572
585
  }
573
586
  const { plan: p, inferred } = plan(args.cwd, args.features);
574
- const report = renderReport(p, { inferred });
587
+ const report = renderReport(p, { inferred, check: args.cmd === "check" });
575
588
  if (args.cmd === "check") {
576
589
  const changed = planChanges(p);
577
590
  if (args.json) {
@@ -376,6 +376,10 @@ ${CLAUDE_MD_IMPORT}
376
376
  detached: [...detached].sort(),
377
377
  files: Object.fromEntries([...tree].map(([rel, c]) => [rel, hashContent(c)]))
378
378
  };
379
+ const skillsIn = (rels) => new Set([...rels].map(skillOf).filter((n) => n !== void 0 && !detached.has(n)));
380
+ const before = skillsIn(Object.keys(known));
381
+ const after = skillsIn(tree.keys());
382
+ const touched = skillsIn([...writes.keys(), ...deletes]);
379
383
  const manifestText = renderManifest(manifest);
380
384
  if (s.read(MANIFEST_PATH) === void 0 || normalise(s.read(MANIFEST_PATH)) !== manifestText) {
381
385
  writes.set(MANIFEST_PATH, manifestText);
@@ -386,6 +390,9 @@ ${CLAUDE_MD_IMPORT}
386
390
  edited: edited.sort(),
387
391
  adopted: adopted.sort(),
388
392
  legacyRemoved: legacyRemoved.sort(),
393
+ skillsAdded: [...after].filter((n) => !before.has(n)).sort(),
394
+ skillsUpdated: [...after].filter((n) => before.has(n) && touched.has(n)).sort(),
395
+ skillsRemoved: [...before].filter((n) => !after.has(n)).sort(),
389
396
  manifest,
390
397
  claudeMd: claudeMd === s.claudeMd ? void 0 : claudeMd,
391
398
  claudeMdRenamed: claudeMdRenamed.sort(([a], [b]) => a.localeCompare(b)),
@@ -402,12 +409,18 @@ function renderReport(p, opts) {
402
409
  const lines = [
403
410
  "### Qore skills",
404
411
  "",
405
- `Synced the managed skills for \`@quatronic/sdk@${p.manifest.sdkVersion}\` (runtime \`${f.runtime}\`, auth \`${f.auth}\`, database \`${f.db ? "yes" : "no"}\`${opts.inferred ? ", inferred from the app \u2014 pin with `qore-skills sync --features`" : ", pinned in the manifest"}).`
412
+ `${opts.check ? "Out of date: `qore-skills sync` would update" : "Synced"} the managed skills for \`@quatronic/sdk@${p.manifest.sdkVersion}\` (runtime \`${f.runtime}\`, auth \`${f.auth}\`, database \`${f.db ? "yes" : "no"}\`${opts.inferred ? ", inferred from the app \u2014 pin with `qore-skills sync --features`" : ", pinned in the manifest"}).`
406
413
  ];
407
414
  const managedWrites = [...p.writes.keys()].filter((r) => r !== MANIFEST_PATH);
408
415
  if (!managedWrites.length && !p.deletes.length && p.claudeMd === void 0) {
409
416
  lines.push("", "No skill content changed.");
410
417
  }
418
+ const skills = (title, names) => {
419
+ if (names.length) lines.push("", `**${title}:** ${names.map((n) => `\`${n}\``).join(", ")}`);
420
+ };
421
+ skills("Skills added", p.skillsAdded);
422
+ skills("Skills updated", p.skillsUpdated);
423
+ skills("Skills removed", p.skillsRemoved);
411
424
  const section = (title, items, note) => {
412
425
  if (!items.length) return;
413
426
  lines.push("", `**${title}** ${note}`, "", ...items.map((i) => `- \`.claude/${i}\``));
@@ -567,7 +580,7 @@ function main(argv = process.argv.slice(2)) {
567
580
  return 0;
568
581
  }
569
582
  const { plan: p, inferred } = plan(args.cwd, args.features);
570
- const report = renderReport(p, { inferred });
583
+ const report = renderReport(p, { inferred, check: args.cmd === "check" });
571
584
  if (args.cmd === "check") {
572
585
  const changed = planChanges(p);
573
586
  if (args.json) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quatronic/sdk",
3
- "version": "0.7.0",
3
+ "version": "0.7.1-rc.2",
4
4
  "type": "module",
5
5
  "private": false,
6
6
  "publishConfig": {