@agentproto/corpus-cli 0.7.2 → 0.8.0

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.
package/dist/cli.mjs CHANGED
@@ -3632,7 +3632,7 @@ async function runReportPacks(args) {
3632
3632
  await reportFs.writeFile(file.path, file.content);
3633
3633
  }
3634
3634
  process.stdout.write(
3635
- `report packs \u2192 ${result.files.length} files \xB7 ${result.bibliography} sources
3635
+ `report packs \u2192 ${result.files.length} files \xB7 ${result.bibliography} sources \xB7 bib-sha ${result.bibliographySha}
3636
3636
  ` + result.chapters.map((c) => ` ${c.id}: ${c.entryCount}`).join("\n") + "\n"
3637
3637
  );
3638
3638
  return 0;
@@ -3677,12 +3677,21 @@ async function runReportStitch(args) {
3677
3677
  );
3678
3678
  }
3679
3679
  const reportFs = new NodeFsAdapter({ root });
3680
- const { content, wordCount } = await stitchReport({
3681
- config,
3682
- report: reportFs,
3683
- ...chaptersDir ? { chaptersDir } : {},
3684
- ...viewsDir ? { viewsDir } : {}
3685
- });
3680
+ let stitched;
3681
+ try {
3682
+ stitched = await stitchReport({
3683
+ config,
3684
+ report: reportFs,
3685
+ ...chaptersDir ? { chaptersDir } : {},
3686
+ ...viewsDir ? { viewsDir } : {}
3687
+ });
3688
+ } catch (err) {
3689
+ return fail(
3690
+ `report stitch failed: ${err instanceof Error ? err.message : String(err)}`,
3691
+ 1
3692
+ );
3693
+ }
3694
+ const { content, wordCount } = stitched;
3686
3695
  await reportFs.writeFile(out ?? "REPORT.md", content);
3687
3696
  process.stdout.write(`report stitch \u2192 ${out ?? "REPORT.md"} \xB7 ${wordCount} words
3688
3697
  `);