nairon-bench 0.0.13 → 0.0.14
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 +89 -44
- package/package.json +15 -7
package/dist/index.js
CHANGED
|
@@ -30,7 +30,7 @@ var __export = (target, all) => {
|
|
|
30
30
|
var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
|
|
31
31
|
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
32
32
|
|
|
33
|
-
// ../../node_modules/consola/dist/core.mjs
|
|
33
|
+
// ../../node_modules/.bun/consola@3.4.2/node_modules/consola/dist/core.mjs
|
|
34
34
|
function isPlainObject$1(value) {
|
|
35
35
|
if (value === null || typeof value !== "object") {
|
|
36
36
|
return false;
|
|
@@ -429,7 +429,7 @@ var init_core = __esm(() => {
|
|
|
429
429
|
Consola.prototype.resume = Consola.prototype.resumeLogs;
|
|
430
430
|
});
|
|
431
431
|
|
|
432
|
-
// ../../node_modules/consola/dist/shared/consola.DRwqZj3T.mjs
|
|
432
|
+
// ../../node_modules/.bun/consola@3.4.2/node_modules/consola/dist/shared/consola.DRwqZj3T.mjs
|
|
433
433
|
import { formatWithOptions } from "node:util";
|
|
434
434
|
import { sep } from "node:path";
|
|
435
435
|
function parseStack(stack, message) {
|
|
@@ -507,7 +507,7 @@ ${indent}`);
|
|
|
507
507
|
var bracket = (x) => x ? `[${x}]` : "";
|
|
508
508
|
var init_consola_DRwqZj3T = () => {};
|
|
509
509
|
|
|
510
|
-
// ../../node_modules/consola/dist/shared/consola.DXBYu-KD.mjs
|
|
510
|
+
// ../../node_modules/.bun/consola@3.4.2/node_modules/consola/dist/shared/consola.DXBYu-KD.mjs
|
|
511
511
|
import * as tty from "node:tty";
|
|
512
512
|
function replaceClose(index, string, close, replace, head = string.slice(0, Math.max(0, index)) + replace, tail = string.slice(Math.max(0, index + close.length)), next = tail.indexOf(close)) {
|
|
513
513
|
return head + (next < 0 ? tail : replaceClose(next, tail, close, replace));
|
|
@@ -723,7 +723,7 @@ var init_consola_DXBYu_KD = __esm(() => {
|
|
|
723
723
|
};
|
|
724
724
|
});
|
|
725
725
|
|
|
726
|
-
// ../../node_modules/consola/dist/chunks/prompt.mjs
|
|
726
|
+
// ../../node_modules/.bun/consola@3.4.2/node_modules/consola/dist/chunks/prompt.mjs
|
|
727
727
|
var exports_prompt = {};
|
|
728
728
|
__export(exports_prompt, {
|
|
729
729
|
prompt: () => prompt,
|
|
@@ -1479,7 +1479,7 @@ var init_prompt = __esm(() => {
|
|
|
1479
1479
|
kCancel = Symbol.for("cancel");
|
|
1480
1480
|
});
|
|
1481
1481
|
|
|
1482
|
-
// ../../node_modules/consola/dist/index.mjs
|
|
1482
|
+
// ../../node_modules/.bun/consola@3.4.2/node_modules/consola/dist/index.mjs
|
|
1483
1483
|
import g$1 from "node:process";
|
|
1484
1484
|
function b() {
|
|
1485
1485
|
if (globalThis.process?.env)
|
|
@@ -1767,7 +1767,7 @@ ${indent}`);
|
|
|
1767
1767
|
consola = createConsola2();
|
|
1768
1768
|
});
|
|
1769
1769
|
|
|
1770
|
-
// ../../node_modules/ms/index.js
|
|
1770
|
+
// ../../node_modules/.bun/ms@2.1.3/node_modules/ms/index.js
|
|
1771
1771
|
var require_ms = __commonJS((exports, module) => {
|
|
1772
1772
|
var s2 = 1000;
|
|
1773
1773
|
var m2 = s2 * 60;
|
|
@@ -1877,7 +1877,7 @@ var require_ms = __commonJS((exports, module) => {
|
|
|
1877
1877
|
}
|
|
1878
1878
|
});
|
|
1879
1879
|
|
|
1880
|
-
// ../../node_modules/debug/src/common.js
|
|
1880
|
+
// ../../node_modules/.bun/debug@4.4.3/node_modules/debug/src/common.js
|
|
1881
1881
|
var require_common = __commonJS((exports, module) => {
|
|
1882
1882
|
function setup(env2) {
|
|
1883
1883
|
createDebug.debug = createDebug;
|
|
@@ -2052,7 +2052,7 @@ var require_common = __commonJS((exports, module) => {
|
|
|
2052
2052
|
module.exports = setup;
|
|
2053
2053
|
});
|
|
2054
2054
|
|
|
2055
|
-
// ../../node_modules/debug/src/browser.js
|
|
2055
|
+
// ../../node_modules/.bun/debug@4.4.3/node_modules/debug/src/browser.js
|
|
2056
2056
|
var require_browser = __commonJS((exports, module) => {
|
|
2057
2057
|
exports.formatArgs = formatArgs;
|
|
2058
2058
|
exports.save = save;
|
|
@@ -2212,7 +2212,7 @@ var require_browser = __commonJS((exports, module) => {
|
|
|
2212
2212
|
};
|
|
2213
2213
|
});
|
|
2214
2214
|
|
|
2215
|
-
// ../../node_modules/debug/src/node.js
|
|
2215
|
+
// ../../node_modules/.bun/debug@4.4.3/node_modules/debug/src/node.js
|
|
2216
2216
|
var require_node = __commonJS((exports, module) => {
|
|
2217
2217
|
var tty2 = __require("tty");
|
|
2218
2218
|
var util = __require("util");
|
|
@@ -2383,7 +2383,7 @@ var require_node = __commonJS((exports, module) => {
|
|
|
2383
2383
|
};
|
|
2384
2384
|
});
|
|
2385
2385
|
|
|
2386
|
-
// ../../node_modules/debug/src/index.js
|
|
2386
|
+
// ../../node_modules/.bun/debug@4.4.3/node_modules/debug/src/index.js
|
|
2387
2387
|
var require_src = __commonJS((exports, module) => {
|
|
2388
2388
|
if (typeof process === "undefined" || process.type === "renderer" || false || process.__nwjs) {
|
|
2389
2389
|
module.exports = require_browser();
|
|
@@ -2392,7 +2392,7 @@ var require_src = __commonJS((exports, module) => {
|
|
|
2392
2392
|
}
|
|
2393
2393
|
});
|
|
2394
2394
|
|
|
2395
|
-
// ../../node_modules/@kwsites/file-exists/dist/src/index.js
|
|
2395
|
+
// ../../node_modules/.bun/@kwsites+file-exists@1.1.1/node_modules/@kwsites/file-exists/dist/src/index.js
|
|
2396
2396
|
var require_src2 = __commonJS((exports) => {
|
|
2397
2397
|
var __importDefault = exports && exports.__importDefault || function(mod) {
|
|
2398
2398
|
return mod && mod.__esModule ? mod : { default: mod };
|
|
@@ -2433,7 +2433,7 @@ var require_src2 = __commonJS((exports) => {
|
|
|
2433
2433
|
exports.READABLE = exports.FILE + exports.FOLDER;
|
|
2434
2434
|
});
|
|
2435
2435
|
|
|
2436
|
-
// ../../node_modules/@kwsites/file-exists/dist/index.js
|
|
2436
|
+
// ../../node_modules/.bun/@kwsites+file-exists@1.1.1/node_modules/@kwsites/file-exists/dist/index.js
|
|
2437
2437
|
var require_dist = __commonJS((exports) => {
|
|
2438
2438
|
function __export2(m2) {
|
|
2439
2439
|
for (var p in m2)
|
|
@@ -2444,7 +2444,7 @@ var require_dist = __commonJS((exports) => {
|
|
|
2444
2444
|
__export2(require_src2());
|
|
2445
2445
|
});
|
|
2446
2446
|
|
|
2447
|
-
// ../../node_modules/@kwsites/promise-deferred/dist/index.js
|
|
2447
|
+
// ../../node_modules/.bun/@kwsites+promise-deferred@1.1.1/node_modules/@kwsites/promise-deferred/dist/index.js
|
|
2448
2448
|
var require_dist2 = __commonJS((exports) => {
|
|
2449
2449
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2450
2450
|
exports.createDeferred = exports.deferred = undefined;
|
|
@@ -2483,10 +2483,10 @@ var require_dist2 = __commonJS((exports) => {
|
|
|
2483
2483
|
exports.default = deferred;
|
|
2484
2484
|
});
|
|
2485
2485
|
|
|
2486
|
-
// ../../node_modules/convex/dist/esm/index.js
|
|
2486
|
+
// ../../node_modules/.bun/convex@1.31.7/node_modules/convex/dist/esm/index.js
|
|
2487
2487
|
var version = "1.31.7";
|
|
2488
2488
|
|
|
2489
|
-
// ../../node_modules/convex/dist/esm/values/base64.js
|
|
2489
|
+
// ../../node_modules/.bun/convex@1.31.7/node_modules/convex/dist/esm/values/base64.js
|
|
2490
2490
|
function getLens(b64) {
|
|
2491
2491
|
var len2 = b64.length;
|
|
2492
2492
|
if (len2 % 4 > 0) {
|
|
@@ -2570,7 +2570,7 @@ var init_base64 = __esm(() => {
|
|
|
2570
2570
|
revLookup[95] = 63;
|
|
2571
2571
|
});
|
|
2572
2572
|
|
|
2573
|
-
// ../../node_modules/convex/dist/esm/common/index.js
|
|
2573
|
+
// ../../node_modules/.bun/convex@1.31.7/node_modules/convex/dist/esm/common/index.js
|
|
2574
2574
|
function parseArgs2(args) {
|
|
2575
2575
|
if (args === undefined) {
|
|
2576
2576
|
return {};
|
|
@@ -2606,7 +2606,7 @@ function isSimpleObject(value) {
|
|
|
2606
2606
|
return isObject && isSimple;
|
|
2607
2607
|
}
|
|
2608
2608
|
|
|
2609
|
-
// ../../node_modules/convex/dist/esm/values/value.js
|
|
2609
|
+
// ../../node_modules/.bun/convex@1.31.7/node_modules/convex/dist/esm/values/value.js
|
|
2610
2610
|
function isSpecial(n2) {
|
|
2611
2611
|
return Number.isNaN(n2) || !Number.isFinite(n2) || Object.is(n2, -0);
|
|
2612
2612
|
}
|
|
@@ -2847,7 +2847,7 @@ var init_value = __esm(() => {
|
|
|
2847
2847
|
base64ToBigInt = DataView.prototype.getBigInt64 ? modernBase64ToBigInt : slowBase64ToBigInt;
|
|
2848
2848
|
});
|
|
2849
2849
|
|
|
2850
|
-
// ../../node_modules/convex/dist/esm/values/validators.js
|
|
2850
|
+
// ../../node_modules/.bun/convex@1.31.7/node_modules/convex/dist/esm/values/validators.js
|
|
2851
2851
|
function throwUndefinedValidatorError(context, fieldName) {
|
|
2852
2852
|
const fieldInfo = fieldName !== undefined ? ` for field "${fieldName}"` : "";
|
|
2853
2853
|
throw new Error(`A validator is undefined${fieldInfo} in ${context}. This is often caused by circular imports. See ${UNDEFINED_VALIDATOR_ERROR_URL} for details.`);
|
|
@@ -3182,7 +3182,7 @@ var init_validators = __esm(() => {
|
|
|
3182
3182
|
};
|
|
3183
3183
|
});
|
|
3184
3184
|
|
|
3185
|
-
// ../../node_modules/convex/dist/esm/values/validator.js
|
|
3185
|
+
// ../../node_modules/.bun/convex@1.31.7/node_modules/convex/dist/esm/values/validator.js
|
|
3186
3186
|
var v2;
|
|
3187
3187
|
var init_validator = __esm(() => {
|
|
3188
3188
|
init_validators();
|
|
@@ -3251,7 +3251,7 @@ var init_validator = __esm(() => {
|
|
|
3251
3251
|
};
|
|
3252
3252
|
});
|
|
3253
3253
|
|
|
3254
|
-
// ../../node_modules/convex/dist/esm/values/errors.js
|
|
3254
|
+
// ../../node_modules/.bun/convex@1.31.7/node_modules/convex/dist/esm/values/errors.js
|
|
3255
3255
|
var __defProp4, __defNormalProp2 = (obj, key, value) => (key in obj) ? __defProp4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value, __publicField2 = (obj, key, value) => __defNormalProp2(obj, typeof key !== "symbol" ? key + "" : key, value), _a2, _b, IDENTIFYING_FIELD, ConvexError;
|
|
3256
3256
|
var init_errors = __esm(() => {
|
|
3257
3257
|
init_value();
|
|
@@ -3268,13 +3268,13 @@ var init_errors = __esm(() => {
|
|
|
3268
3268
|
};
|
|
3269
3269
|
});
|
|
3270
3270
|
|
|
3271
|
-
// ../../node_modules/convex/dist/esm/values/index.js
|
|
3271
|
+
// ../../node_modules/.bun/convex@1.31.7/node_modules/convex/dist/esm/values/index.js
|
|
3272
3272
|
var init_values = __esm(() => {
|
|
3273
3273
|
init_value();
|
|
3274
3274
|
init_errors();
|
|
3275
3275
|
});
|
|
3276
3276
|
|
|
3277
|
-
// ../../node_modules/convex/dist/esm/browser/logging.js
|
|
3277
|
+
// ../../node_modules/.bun/convex@1.31.7/node_modules/convex/dist/esm/browser/logging.js
|
|
3278
3278
|
function prefix_for_source(source) {
|
|
3279
3279
|
switch (source) {
|
|
3280
3280
|
case "query":
|
|
@@ -3380,13 +3380,13 @@ var init_logging = __esm(() => {
|
|
|
3380
3380
|
__defProp5 = Object.defineProperty;
|
|
3381
3381
|
});
|
|
3382
3382
|
|
|
3383
|
-
// ../../node_modules/convex/dist/esm/server/functionName.js
|
|
3383
|
+
// ../../node_modules/.bun/convex@1.31.7/node_modules/convex/dist/esm/server/functionName.js
|
|
3384
3384
|
var functionName;
|
|
3385
3385
|
var init_functionName = __esm(() => {
|
|
3386
3386
|
functionName = Symbol.for("functionName");
|
|
3387
3387
|
});
|
|
3388
3388
|
|
|
3389
|
-
// ../../node_modules/convex/dist/esm/server/components/paths.js
|
|
3389
|
+
// ../../node_modules/.bun/convex@1.31.7/node_modules/convex/dist/esm/server/components/paths.js
|
|
3390
3390
|
function extractReferencePath(reference) {
|
|
3391
3391
|
return reference[toReferencePath] ?? null;
|
|
3392
3392
|
}
|
|
@@ -3418,7 +3418,7 @@ var init_paths = __esm(() => {
|
|
|
3418
3418
|
toReferencePath = Symbol.for("toReferencePath");
|
|
3419
3419
|
});
|
|
3420
3420
|
|
|
3421
|
-
// ../../node_modules/convex/dist/esm/server/api.js
|
|
3421
|
+
// ../../node_modules/.bun/convex@1.31.7/node_modules/convex/dist/esm/server/api.js
|
|
3422
3422
|
function getFunctionName(functionReference) {
|
|
3423
3423
|
const address = getFunctionAddress(functionReference);
|
|
3424
3424
|
if (address.name === undefined) {
|
|
@@ -3471,7 +3471,7 @@ var init_api = __esm(() => {
|
|
|
3471
3471
|
anyApi = createApi();
|
|
3472
3472
|
});
|
|
3473
3473
|
|
|
3474
|
-
// ../../node_modules/convex/dist/esm/browser/http_client.js
|
|
3474
|
+
// ../../node_modules/.bun/convex@1.31.7/node_modules/convex/dist/esm/browser/http_client.js
|
|
3475
3475
|
class ConvexHttpClient {
|
|
3476
3476
|
constructor(address, options) {
|
|
3477
3477
|
__publicField4(this, "address");
|
|
@@ -3791,15 +3791,15 @@ var init_http_client = __esm(() => {
|
|
|
3791
3791
|
__defProp6 = Object.defineProperty;
|
|
3792
3792
|
});
|
|
3793
3793
|
|
|
3794
|
-
// ../../node_modules/convex/dist/esm/browser/index-node.js
|
|
3794
|
+
// ../../node_modules/.bun/convex@1.31.7/node_modules/convex/dist/esm/browser/index-node.js
|
|
3795
3795
|
var init_index_node = __esm(() => {
|
|
3796
3796
|
init_http_client();
|
|
3797
3797
|
});
|
|
3798
3798
|
|
|
3799
|
-
// ../../node_modules/convex/dist/esm/server/search_filter_builder.js
|
|
3799
|
+
// ../../node_modules/.bun/convex@1.31.7/node_modules/convex/dist/esm/server/search_filter_builder.js
|
|
3800
3800
|
var init_search_filter_builder = () => {};
|
|
3801
3801
|
|
|
3802
|
-
// ../../node_modules/convex/dist/esm/server/pagination.js
|
|
3802
|
+
// ../../node_modules/.bun/convex@1.31.7/node_modules/convex/dist/esm/server/pagination.js
|
|
3803
3803
|
var paginationOptsValidator;
|
|
3804
3804
|
var init_pagination = __esm(() => {
|
|
3805
3805
|
init_validator();
|
|
@@ -3813,7 +3813,7 @@ var init_pagination = __esm(() => {
|
|
|
3813
3813
|
});
|
|
3814
3814
|
});
|
|
3815
3815
|
|
|
3816
|
-
// ../../node_modules/convex/dist/esm/server/components/index.js
|
|
3816
|
+
// ../../node_modules/.bun/convex@1.31.7/node_modules/convex/dist/esm/server/components/index.js
|
|
3817
3817
|
function createChildComponents(root, pathParts) {
|
|
3818
3818
|
const handler = {
|
|
3819
3819
|
get(_3, prop) {
|
|
@@ -3838,7 +3838,7 @@ var init_components = __esm(() => {
|
|
|
3838
3838
|
init_paths();
|
|
3839
3839
|
});
|
|
3840
3840
|
|
|
3841
|
-
// ../../node_modules/convex/dist/esm/server/index.js
|
|
3841
|
+
// ../../node_modules/.bun/convex@1.31.7/node_modules/convex/dist/esm/server/index.js
|
|
3842
3842
|
var init_server = __esm(() => {
|
|
3843
3843
|
init_api();
|
|
3844
3844
|
init_components();
|
|
@@ -3935,14 +3935,14 @@ var init_client = __esm(() => {
|
|
|
3935
3935
|
requireClerkId = requireGitHub;
|
|
3936
3936
|
});
|
|
3937
3937
|
|
|
3938
|
-
// ../../node_modules/citty/dist/index.mjs
|
|
3938
|
+
// ../../node_modules/.bun/citty@0.1.6/node_modules/citty/dist/index.mjs
|
|
3939
3939
|
init_dist();
|
|
3940
3940
|
|
|
3941
|
-
// ../../node_modules/consola/dist/utils.mjs
|
|
3941
|
+
// ../../node_modules/.bun/consola@3.4.2/node_modules/consola/dist/utils.mjs
|
|
3942
3942
|
init_consola_DXBYu_KD();
|
|
3943
3943
|
init_consola_DXBYu_KD();
|
|
3944
3944
|
|
|
3945
|
-
// ../../node_modules/citty/dist/index.mjs
|
|
3945
|
+
// ../../node_modules/.bun/citty@0.1.6/node_modules/citty/dist/index.mjs
|
|
3946
3946
|
function toArray(val) {
|
|
3947
3947
|
if (Array.isArray(val)) {
|
|
3948
3948
|
return val;
|
|
@@ -4369,7 +4369,7 @@ async function runMain(cmd, opts = {}) {
|
|
|
4369
4369
|
}
|
|
4370
4370
|
}
|
|
4371
4371
|
|
|
4372
|
-
// ../../node_modules/citty/dist/index.mjs
|
|
4372
|
+
// ../../node_modules/.bun/citty@0.1.6/node_modules/citty/dist/index.mjs
|
|
4373
4373
|
init_dist();
|
|
4374
4374
|
function defineCommand2(def) {
|
|
4375
4375
|
return def;
|
|
@@ -4380,7 +4380,7 @@ init_dist();
|
|
|
4380
4380
|
import { existsSync as existsSync5, mkdirSync as mkdirSync2, writeFileSync as writeFileSync2 } from "node:fs";
|
|
4381
4381
|
import { join as join5 } from "node:path";
|
|
4382
4382
|
|
|
4383
|
-
// ../../node_modules/simple-git/dist/esm/index.js
|
|
4383
|
+
// ../../node_modules/.bun/simple-git@3.30.0/node_modules/simple-git/dist/esm/index.js
|
|
4384
4384
|
var import_file_exists = __toESM(require_dist(), 1);
|
|
4385
4385
|
var import_debug = __toESM(require_src(), 1);
|
|
4386
4386
|
var import_promise_deferred = __toESM(require_dist2(), 1);
|
|
@@ -4396,7 +4396,7 @@ var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
|
4396
4396
|
var __esm2 = (fn, res) => function __init() {
|
|
4397
4397
|
return fn && (res = (0, fn[__getOwnPropNames2(fn)[0]])(fn = 0)), res;
|
|
4398
4398
|
};
|
|
4399
|
-
var __commonJS2 = (cb, mod) => function
|
|
4399
|
+
var __commonJS2 = (cb, mod) => function __require() {
|
|
4400
4400
|
return mod || (0, cb[__getOwnPropNames2(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
4401
4401
|
};
|
|
4402
4402
|
var __export2 = (target, all) => {
|
|
@@ -10093,6 +10093,7 @@ function calculateScanCost(agents, git) {
|
|
|
10093
10093
|
}
|
|
10094
10094
|
|
|
10095
10095
|
// src/commands/scan.ts
|
|
10096
|
+
var sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
|
|
10096
10097
|
var scanCommand = defineCommand2({
|
|
10097
10098
|
meta: {
|
|
10098
10099
|
name: "scan",
|
|
@@ -10134,43 +10135,81 @@ var scanCommand = defineCommand2({
|
|
|
10134
10135
|
const since = parseSince(args.since);
|
|
10135
10136
|
consola.log("");
|
|
10136
10137
|
consola.info("[1/5] Collecting data sources...");
|
|
10138
|
+
await sleep(200);
|
|
10139
|
+
consola.log(" Scanning git history...");
|
|
10137
10140
|
const git = await collectGit(projectDir, since);
|
|
10138
|
-
const agents = await collectAgentSessions(since);
|
|
10139
|
-
const tests = await collectTestResults(projectDir);
|
|
10140
10141
|
if (git) {
|
|
10141
|
-
consola.log(` ${git.commitCount} commits
|
|
10142
|
+
consola.log(` Found ${git.commitCount} commits from ${git.authors.length} authors`);
|
|
10142
10143
|
}
|
|
10144
|
+
await sleep(150);
|
|
10145
|
+
consola.log(" Reading AI session logs...");
|
|
10146
|
+
const agents = await collectAgentSessions(since);
|
|
10143
10147
|
if (agents) {
|
|
10144
|
-
consola.log(` ${agents.totalSessions} sessions
|
|
10148
|
+
consola.log(` Found ${agents.totalSessions} sessions (${formatTokens2(agents.totalTokens)} tokens)`);
|
|
10145
10149
|
}
|
|
10150
|
+
await sleep(150);
|
|
10151
|
+
consola.log(" Checking test results...");
|
|
10152
|
+
const tests = await collectTestResults(projectDir);
|
|
10146
10153
|
if (tests) {
|
|
10147
|
-
consola.log(` ${tests.totalTests} tests
|
|
10154
|
+
consola.log(` Found ${tests.totalTests} tests (${Math.round(tests.passRate * 100)}% pass rate)`);
|
|
10148
10155
|
}
|
|
10156
|
+
await sleep(200);
|
|
10149
10157
|
consola.log("");
|
|
10150
10158
|
consola.info("[2/5] Analyzing session patterns...");
|
|
10159
|
+
await sleep(300);
|
|
10160
|
+
if (agents && agents.totalSessions > 10) {
|
|
10161
|
+
const sessionCount = agents.totalSessions;
|
|
10162
|
+
const checkpoints = [25, 50, 75, 100];
|
|
10163
|
+
for (const pct of checkpoints) {
|
|
10164
|
+
const processed = Math.min(Math.floor(sessionCount * pct / 100), sessionCount);
|
|
10165
|
+
consola.log(` Processing session ${processed}/${sessionCount}...`);
|
|
10166
|
+
await sleep(100);
|
|
10167
|
+
}
|
|
10168
|
+
}
|
|
10151
10169
|
const analysis = analyzeWorkflow(agents, projectDir);
|
|
10170
|
+
await sleep(200);
|
|
10171
|
+
let foundIssues = false;
|
|
10152
10172
|
if (analysis.sessionPatterns.memoryLossCount > 0) {
|
|
10153
10173
|
consola.warn(` Memory loss: ${analysis.sessionPatterns.memoryLossCount} times/week`);
|
|
10174
|
+
foundIssues = true;
|
|
10154
10175
|
}
|
|
10155
10176
|
if (analysis.sessionPatterns.undoLoops > 0) {
|
|
10156
10177
|
consola.warn(` Undo loops: ${analysis.sessionPatterns.undoLoops} occurrences`);
|
|
10178
|
+
foundIssues = true;
|
|
10157
10179
|
}
|
|
10158
10180
|
if (analysis.sessionPatterns.frustrationCount > 0) {
|
|
10159
10181
|
consola.error(` High frustration: ${analysis.sessionPatterns.frustrationCount} sessions`);
|
|
10182
|
+
foundIssues = true;
|
|
10183
|
+
}
|
|
10184
|
+
if (!foundIssues) {
|
|
10185
|
+
consola.log(` No critical patterns detected`);
|
|
10160
10186
|
}
|
|
10161
10187
|
consola.log("");
|
|
10162
10188
|
consola.info("[3/5] Scanning context efficiency...");
|
|
10189
|
+
await sleep(250);
|
|
10190
|
+
consola.log(" Analyzing token usage patterns...");
|
|
10191
|
+
await sleep(150);
|
|
10192
|
+
consola.log(" Detecting context reuse...");
|
|
10193
|
+
await sleep(150);
|
|
10194
|
+
let contextIssues = false;
|
|
10163
10195
|
if (analysis.sessionPatterns.repeatedExplanations > 0) {
|
|
10164
10196
|
consola.warn(` Repeated explanations: ${analysis.sessionPatterns.repeatedExplanations}%`);
|
|
10197
|
+
contextIssues = true;
|
|
10165
10198
|
}
|
|
10166
10199
|
if (analysis.sessionPatterns.contextCompactions > 0) {
|
|
10167
10200
|
consola.error(` Context compactions: ${analysis.sessionPatterns.contextCompactions} times`);
|
|
10201
|
+
contextIssues = true;
|
|
10168
10202
|
}
|
|
10169
10203
|
if (analysis.efficiency.contextReuseRate < 0.7) {
|
|
10170
10204
|
consola.warn(` Context reuse rate: ${Math.round(analysis.efficiency.contextReuseRate * 100)}%`);
|
|
10205
|
+
contextIssues = true;
|
|
10206
|
+
}
|
|
10207
|
+
if (!contextIssues) {
|
|
10208
|
+
consola.log(` Context efficiency looks good`);
|
|
10171
10209
|
}
|
|
10172
10210
|
consola.log("");
|
|
10173
10211
|
consola.info("[4/5] Analyzing SDLC effectiveness...");
|
|
10212
|
+
await sleep(200);
|
|
10174
10213
|
const sdlcAnalysis = analyzeSDLCPhases(agents, git, tests, projectDir);
|
|
10175
10214
|
const phases = [
|
|
10176
10215
|
{ name: "Requirements", data: sdlcAnalysis.requirements },
|
|
@@ -10183,9 +10222,15 @@ var scanCommand = defineCommand2({
|
|
|
10183
10222
|
const score2 = phase.data.score;
|
|
10184
10223
|
const icon = score2 >= 70 ? "✓" : score2 >= 50 ? "⚠" : "✗";
|
|
10185
10224
|
consola.log(` ${icon} ${phase.name}: ${score2}/100`);
|
|
10225
|
+
await sleep(80);
|
|
10186
10226
|
}
|
|
10187
10227
|
consola.log("");
|
|
10188
10228
|
consola.info("[5/5] Generating optimizations...");
|
|
10229
|
+
await sleep(300);
|
|
10230
|
+
consola.log(" Calculating improvement opportunities...");
|
|
10231
|
+
await sleep(200);
|
|
10232
|
+
consola.log(" Ranking by impact...");
|
|
10233
|
+
await sleep(150);
|
|
10189
10234
|
consola.log("");
|
|
10190
10235
|
const score = computeNaironScore(git ?? undefined, agents ?? undefined, tests ?? undefined);
|
|
10191
10236
|
const scanCost = calculateScanCost(agents, git);
|
|
@@ -10938,7 +10983,7 @@ async function pollForAccessToken(deviceCode, interval, expiresIn) {
|
|
|
10938
10983
|
const expiresAt = startTime + expiresIn * 1000;
|
|
10939
10984
|
let pollInterval = Math.max(interval, 5) * 1000;
|
|
10940
10985
|
while (Date.now() < expiresAt) {
|
|
10941
|
-
await
|
|
10986
|
+
await sleep2(pollInterval);
|
|
10942
10987
|
const response = await fetch("https://github.com/login/oauth/access_token", {
|
|
10943
10988
|
method: "POST",
|
|
10944
10989
|
headers: {
|
|
@@ -10992,7 +11037,7 @@ async function fetchGitHubUser(accessToken) {
|
|
|
10992
11037
|
}
|
|
10993
11038
|
return await response.json();
|
|
10994
11039
|
}
|
|
10995
|
-
function
|
|
11040
|
+
function sleep2(ms) {
|
|
10996
11041
|
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
10997
11042
|
}
|
|
10998
11043
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nairon-bench",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.14",
|
|
4
4
|
"description": "AI workflow benchmarking CLI",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -14,12 +14,7 @@
|
|
|
14
14
|
"type": "git",
|
|
15
15
|
"url": "https://github.com/ObaidUr-Rahmaan/nairon-bench"
|
|
16
16
|
},
|
|
17
|
-
"keywords": [
|
|
18
|
-
"ai",
|
|
19
|
-
"benchmark",
|
|
20
|
-
"cli",
|
|
21
|
-
"workflow"
|
|
22
|
-
],
|
|
17
|
+
"keywords": ["ai", "benchmark", "cli", "workflow"],
|
|
23
18
|
"license": "MIT",
|
|
24
19
|
"scripts": {
|
|
25
20
|
"dev": "bun run src/index.ts",
|
|
@@ -36,5 +31,18 @@
|
|
|
36
31
|
"test:e2e": "bun test --test-name-pattern e2e",
|
|
37
32
|
"clean": "rm -rf dist",
|
|
38
33
|
"prepublishOnly": "bun run build"
|
|
34
|
+
},
|
|
35
|
+
"devDependencies": {
|
|
36
|
+
"@nairon-bench/shared": "workspace:*",
|
|
37
|
+
"@opentui/core": "^0.1.0",
|
|
38
|
+
"@opentui/react": "^0.1.0",
|
|
39
|
+
"@types/bun": "latest",
|
|
40
|
+
"citty": "^0.1.6",
|
|
41
|
+
"consola": "^3.4.0",
|
|
42
|
+
"convex": "^1.21.0",
|
|
43
|
+
"react": "^19.0.0",
|
|
44
|
+
"simple-git": "^3.27.0",
|
|
45
|
+
"tuistory": "^1.0.0",
|
|
46
|
+
"typescript": "^5.8.0"
|
|
39
47
|
}
|
|
40
48
|
}
|