nairon-bench 0.0.28 → 0.0.29
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/index.js +35 -7
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -14665,13 +14665,14 @@ init_client();
|
|
|
14665
14665
|
import { existsSync as existsSync7, readdirSync as readdirSync3, readFileSync as readFileSync6, statSync as statSync2 } from "node:fs";
|
|
14666
14666
|
import { homedir as homedir5 } from "node:os";
|
|
14667
14667
|
import { join as join7, basename as basename2 } from "node:path";
|
|
14668
|
-
async function collectReportData(projectDir, since, until = new Date) {
|
|
14668
|
+
async function collectReportData(projectDir, since, until = new Date, harness) {
|
|
14669
14669
|
const projectName = basename2(projectDir);
|
|
14670
|
-
const [commits,
|
|
14670
|
+
const [commits, allSessions, mcpConfigs] = await Promise.all([
|
|
14671
14671
|
collectGitCommits(projectDir, since, until),
|
|
14672
14672
|
collectAllSessions(since, until, projectDir),
|
|
14673
14673
|
collectMCPConfigs()
|
|
14674
14674
|
]);
|
|
14675
|
+
const sessions = harness && harness !== "all" ? allSessions.filter((s2) => s2.agent === harness) : allSessions;
|
|
14675
14676
|
const allPrompts = sessions.flatMap((s2) => s2.prompts);
|
|
14676
14677
|
const toolUsage = buildToolUsageMap(sessions);
|
|
14677
14678
|
const stats = calculateStats(sessions, allPrompts);
|
|
@@ -18360,8 +18361,8 @@ function renderGitBlameMarkdown(analysis) {
|
|
|
18360
18361
|
}
|
|
18361
18362
|
|
|
18362
18363
|
// src/lib/hackathon-report.ts
|
|
18363
|
-
async function generateHackathonReport(projectDir, since, until = new Date) {
|
|
18364
|
-
const data = await collectReportData(projectDir, since, until);
|
|
18364
|
+
async function generateHackathonReport(projectDir, since, until = new Date, harness) {
|
|
18365
|
+
const data = await collectReportData(projectDir, since, until, harness);
|
|
18365
18366
|
const sdlcAnalysis = analyzeSDLC(data);
|
|
18366
18367
|
const promptAnalysis = analyzePrompts(data);
|
|
18367
18368
|
const effectivenessProfile = analyzeEffectiveness(data);
|
|
@@ -18873,6 +18874,10 @@ var reportCommand = defineCommand2({
|
|
|
18873
18874
|
description: "Generate hackathon submission report (last 48 hours)",
|
|
18874
18875
|
default: false
|
|
18875
18876
|
},
|
|
18877
|
+
harness: {
|
|
18878
|
+
type: "string",
|
|
18879
|
+
description: "AI harness to analyze: claude-code, opencode, cursor, or all"
|
|
18880
|
+
},
|
|
18876
18881
|
since: {
|
|
18877
18882
|
type: "string",
|
|
18878
18883
|
description: "Time range: 48h, 7d, 30d, or ISO date"
|
|
@@ -18933,6 +18938,16 @@ var reportCommand = defineCommand2({
|
|
|
18933
18938
|
month: "30d"
|
|
18934
18939
|
};
|
|
18935
18940
|
args.since = sinceMap[choice];
|
|
18941
|
+
const harness = await consola.prompt("Which AI harness did you use?", {
|
|
18942
|
+
type: "select",
|
|
18943
|
+
options: [
|
|
18944
|
+
{ value: "claude-code", label: "Claude Code" },
|
|
18945
|
+
{ value: "opencode", label: "OpenCode" },
|
|
18946
|
+
{ value: "cursor", label: "Cursor" },
|
|
18947
|
+
{ value: "all", label: "All (combine sessions from all harnesses)" }
|
|
18948
|
+
]
|
|
18949
|
+
});
|
|
18950
|
+
args.harness = harness;
|
|
18936
18951
|
const format2 = await consola.prompt("Output format?", {
|
|
18937
18952
|
type: "select",
|
|
18938
18953
|
options: [
|
|
@@ -18983,12 +18998,25 @@ var reportCommand = defineCommand2({
|
|
|
18983
18998
|
});
|
|
18984
18999
|
async function runHackathonReport(args) {
|
|
18985
19000
|
const projectDir = process.cwd();
|
|
19001
|
+
let harness = args.harness;
|
|
19002
|
+
if (!harness) {
|
|
19003
|
+
harness = await consola.prompt("Which AI harness did you use?", {
|
|
19004
|
+
type: "select",
|
|
19005
|
+
options: [
|
|
19006
|
+
{ value: "claude-code", label: "Claude Code" },
|
|
19007
|
+
{ value: "opencode", label: "OpenCode" },
|
|
19008
|
+
{ value: "cursor", label: "Cursor" },
|
|
19009
|
+
{ value: "all", label: "All (combine sessions from all harnesses)" }
|
|
19010
|
+
]
|
|
19011
|
+
});
|
|
19012
|
+
}
|
|
18986
19013
|
const since = parseSince2(args.since || (args.hackathon ? "48h" : "7d"));
|
|
18987
19014
|
const until = new Date;
|
|
18988
19015
|
const hoursAgo = Math.round((until.getTime() - since.getTime()) / (1000 * 60 * 60));
|
|
18989
|
-
|
|
19016
|
+
const harnessLabel = harness === "all" ? "all harnesses" : harness;
|
|
19017
|
+
consola.start(`Generating AI-nativeness report for ${harnessLabel} (last ${hoursAgo} hours)...`);
|
|
18990
19018
|
try {
|
|
18991
|
-
const report = await generateHackathonReport(projectDir, since, until);
|
|
19019
|
+
const report = await generateHackathonReport(projectDir, since, until, harness);
|
|
18992
19020
|
if (args.publish) {
|
|
18993
19021
|
await publishReport(report);
|
|
18994
19022
|
return;
|
|
@@ -22848,7 +22876,7 @@ var setupCommand = defineCommand2({
|
|
|
22848
22876
|
// package.json
|
|
22849
22877
|
var package_default = {
|
|
22850
22878
|
name: "nairon-bench",
|
|
22851
|
-
version: "0.0.
|
|
22879
|
+
version: "0.0.29",
|
|
22852
22880
|
description: "AI workflow benchmarking CLI",
|
|
22853
22881
|
type: "module",
|
|
22854
22882
|
bin: {
|