nairon-bench 0.0.39 → 0.0.40

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.
Files changed (2) hide show
  1. package/dist/index.js +40 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -19719,6 +19719,30 @@ async function runHackathonReport(args) {
19719
19719
  consola.start(`Generating AI-nativeness report for ${harnessLabel} (last ${hoursAgo} hours)...`);
19720
19720
  try {
19721
19721
  const report = await generateHackathonReport(projectDir, since, until, harness);
19722
+ if (report.summary.totalSessions === 0 && harness && harness !== "all") {
19723
+ consola.warn(`No sessions found for harness "${harness}".`);
19724
+ consola.info(`Try running with --harness all to include sessions from all AI tools.`);
19725
+ consola.info(`Or check that your AI tool's session logs exist in the expected location.`);
19726
+ const allReport = await generateHackathonReport(projectDir, since, until, "all");
19727
+ if (allReport.summary.totalSessions > 0) {
19728
+ consola.info(`Found ${allReport.summary.totalSessions} sessions from other harnesses.`);
19729
+ const useAll = await consola.prompt("Use all sessions instead?", {
19730
+ type: "confirm",
19731
+ initial: true
19732
+ });
19733
+ if (useAll) {
19734
+ const newReport = allReport;
19735
+ if (args.publish) {
19736
+ await publishReport(newReport);
19737
+ return;
19738
+ }
19739
+ const format3 = args.format || "terminal";
19740
+ const output2 = format3 === "md" || format3 === "markdown" ? formatReportAsMarkdown(newReport) : format3 === "json" ? formatReportAsJSON(newReport) : formatReportAsTerminal(newReport);
19741
+ console.log(output2);
19742
+ return;
19743
+ }
19744
+ }
19745
+ }
19722
19746
  if (args.publish) {
19723
19747
  await publishReport(report);
19724
19748
  return;
@@ -19764,6 +19788,21 @@ async function publishReport(report) {
19764
19788
  consola.info("Alternatively, use `nb report --hackathon --format md` for local markdown.");
19765
19789
  return;
19766
19790
  }
19791
+ if (report.summary.totalSessions === 0) {
19792
+ consola.warn("Publishing report with 0 sessions detected.");
19793
+ consola.info("This may result in incomplete data. Common causes:");
19794
+ consola.info(" - Selected harness doesn't match your AI tool");
19795
+ consola.info(" - Session logs not found in expected location");
19796
+ consola.info(" - Time range doesn't include recent sessions");
19797
+ const proceed = await consola.prompt("Continue publishing anyway?", {
19798
+ type: "confirm",
19799
+ initial: false
19800
+ });
19801
+ if (!proceed) {
19802
+ consola.info("Aborted. Try running with --harness all");
19803
+ return;
19804
+ }
19805
+ }
19767
19806
  consola.start("Publishing report...");
19768
19807
  const markdownContent = formatReportAsMarkdown(report);
19769
19808
  const basePayload = {
@@ -23593,7 +23632,7 @@ var setupCommand = defineCommand2({
23593
23632
  // package.json
23594
23633
  var package_default = {
23595
23634
  name: "nairon-bench",
23596
- version: "0.0.39",
23635
+ version: "0.0.40",
23597
23636
  description: "AI workflow benchmarking CLI",
23598
23637
  type: "module",
23599
23638
  bin: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nairon-bench",
3
- "version": "0.0.39",
3
+ "version": "0.0.40",
4
4
  "description": "AI workflow benchmarking CLI",
5
5
  "type": "module",
6
6
  "bin": {