@nathapp/nax 0.57.1 → 0.57.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.
- package/dist/nax.js +42 -47
- package/package.json +1 -1
package/dist/nax.js
CHANGED
|
@@ -20915,11 +20915,6 @@ async function loadConfig(startDir, cliOverrides) {
|
|
|
20915
20915
|
const projDir = startDir ? basename(startDir) === PROJECT_NAX_DIR ? startDir : findProjectDir(startDir) : findProjectDir();
|
|
20916
20916
|
const projectRoot = startDir ? basename(startDir) === PROJECT_NAX_DIR ? dirname(startDir) : startDir : process.cwd();
|
|
20917
20917
|
const profileName = await resolveProfileName(cliOverrides ?? {}, process.env, projectRoot);
|
|
20918
|
-
if (profileName !== "default") {
|
|
20919
|
-
const profileData = await loadProfile(profileName, projectRoot);
|
|
20920
|
-
rawConfig = deepMergeConfig(rawConfig, profileData);
|
|
20921
|
-
await loadProfileEnv(profileName, projectRoot);
|
|
20922
|
-
}
|
|
20923
20918
|
const globalConfRaw = await loadJsonFile(globalConfigPath(), "config");
|
|
20924
20919
|
if (globalConfRaw) {
|
|
20925
20920
|
const { profile: _gProfile, ...globalConfStripped } = globalConfRaw;
|
|
@@ -20934,6 +20929,11 @@ async function loadConfig(startDir, cliOverrides) {
|
|
|
20934
20929
|
rawConfig = deepMergeConfig(rawConfig, resolvedProjConf);
|
|
20935
20930
|
}
|
|
20936
20931
|
}
|
|
20932
|
+
if (profileName !== "default") {
|
|
20933
|
+
const profileData = await loadProfile(profileName, projectRoot);
|
|
20934
|
+
rawConfig = deepMergeConfig(rawConfig, profileData);
|
|
20935
|
+
await loadProfileEnv(profileName, projectRoot);
|
|
20936
|
+
}
|
|
20937
20937
|
if (cliOverrides) {
|
|
20938
20938
|
rawConfig = deepMergeConfig(rawConfig, cliOverrides);
|
|
20939
20939
|
}
|
|
@@ -22342,7 +22342,7 @@ var package_default;
|
|
|
22342
22342
|
var init_package = __esm(() => {
|
|
22343
22343
|
package_default = {
|
|
22344
22344
|
name: "@nathapp/nax",
|
|
22345
|
-
version: "0.57.
|
|
22345
|
+
version: "0.57.2",
|
|
22346
22346
|
description: "AI Coding Agent Orchestrator \u2014 loops until done",
|
|
22347
22347
|
type: "module",
|
|
22348
22348
|
bin: {
|
|
@@ -22421,8 +22421,8 @@ var init_version = __esm(() => {
|
|
|
22421
22421
|
NAX_VERSION = package_default.version;
|
|
22422
22422
|
NAX_COMMIT = (() => {
|
|
22423
22423
|
try {
|
|
22424
|
-
if (/^[0-9a-f]{6,10}$/.test("
|
|
22425
|
-
return "
|
|
22424
|
+
if (/^[0-9a-f]{6,10}$/.test("2ffb62ec"))
|
|
22425
|
+
return "2ffb62ec";
|
|
22426
22426
|
} catch {}
|
|
22427
22427
|
try {
|
|
22428
22428
|
const result = Bun.spawnSync(["git", "rev-parse", "--short", "HEAD"], {
|
|
@@ -35522,6 +35522,8 @@ async function handleRunCompletion(options) {
|
|
|
35522
35522
|
totalStories: finalCounts.total,
|
|
35523
35523
|
passedStories: finalCounts.passed,
|
|
35524
35524
|
failedStories: finalCounts.failed,
|
|
35525
|
+
skippedStories: finalCounts.skipped,
|
|
35526
|
+
pausedStories: finalCounts.paused,
|
|
35525
35527
|
durationMs,
|
|
35526
35528
|
totalCost
|
|
35527
35529
|
});
|
|
@@ -35973,8 +35975,8 @@ function wireReporters(bus, pluginRegistry, runId, startTime) {
|
|
|
35973
35975
|
storySummary: {
|
|
35974
35976
|
completed: ev.passedStories,
|
|
35975
35977
|
failed: ev.failedStories,
|
|
35976
|
-
skipped:
|
|
35977
|
-
paused:
|
|
35978
|
+
skipped: ev.skippedStories,
|
|
35979
|
+
paused: ev.pausedStories
|
|
35978
35980
|
}
|
|
35979
35981
|
});
|
|
35980
35982
|
} catch (err) {
|
|
@@ -37468,6 +37470,12 @@ async function executeUnified(ctx, initialPrd) {
|
|
|
37468
37470
|
wireInteraction(pipelineEventBus, ctx.interactionChain, ctx.config);
|
|
37469
37471
|
wireEventsWriter(pipelineEventBus, ctx.feature, ctx.runId, ctx.workdir);
|
|
37470
37472
|
wireRegistry(pipelineEventBus, ctx.feature, ctx.runId, ctx.workdir);
|
|
37473
|
+
pipelineEventBus.emit({
|
|
37474
|
+
type: "run:started",
|
|
37475
|
+
feature: ctx.feature,
|
|
37476
|
+
totalStories: initialPrd.userStories.length,
|
|
37477
|
+
workdir: ctx.workdir
|
|
37478
|
+
});
|
|
37471
37479
|
const buildResult2 = (exitReason) => ({
|
|
37472
37480
|
prd,
|
|
37473
37481
|
iterations,
|
|
@@ -38398,7 +38406,6 @@ async function setupRun(options) {
|
|
|
38398
38406
|
prdPath,
|
|
38399
38407
|
workdir,
|
|
38400
38408
|
config: config2,
|
|
38401
|
-
hooks,
|
|
38402
38409
|
feature,
|
|
38403
38410
|
dryRun,
|
|
38404
38411
|
statusFile,
|
|
@@ -38504,7 +38511,6 @@ async function setupRun(options) {
|
|
|
38504
38511
|
naxVersion: NAX_VERSION,
|
|
38505
38512
|
naxCommit: NAX_COMMIT
|
|
38506
38513
|
});
|
|
38507
|
-
await fireHook(hooks, "on-start", hookCtx(feature), workdir);
|
|
38508
38514
|
const { initializeRun: initializeRun2 } = await Promise.resolve().then(() => (init_run_initialization(), exports_run_initialization));
|
|
38509
38515
|
const initResult = await initializeRun2({
|
|
38510
38516
|
config: config2,
|
|
@@ -38532,7 +38538,6 @@ async function setupRun(options) {
|
|
|
38532
38538
|
var _runSetupDeps;
|
|
38533
38539
|
var init_run_setup = __esm(() => {
|
|
38534
38540
|
init_errors();
|
|
38535
|
-
init_hooks();
|
|
38536
38541
|
init_interaction();
|
|
38537
38542
|
init_logger2();
|
|
38538
38543
|
init_event_bus();
|
|
@@ -38582,24 +38587,26 @@ async function cleanupRun(options) {
|
|
|
38582
38587
|
const logger = getSafeLogger();
|
|
38583
38588
|
const { runId, startTime, totalCost, storiesCompleted, prd, pluginRegistry, workdir, interactionChain } = options;
|
|
38584
38589
|
const durationMs = Date.now() - startTime;
|
|
38585
|
-
|
|
38586
|
-
|
|
38587
|
-
|
|
38588
|
-
|
|
38589
|
-
|
|
38590
|
-
|
|
38591
|
-
|
|
38592
|
-
|
|
38593
|
-
|
|
38594
|
-
|
|
38595
|
-
|
|
38596
|
-
|
|
38597
|
-
|
|
38598
|
-
|
|
38599
|
-
|
|
38600
|
-
|
|
38601
|
-
|
|
38602
|
-
|
|
38590
|
+
if (!options.runCompleted) {
|
|
38591
|
+
const finalCounts = countStories(prd);
|
|
38592
|
+
const reporters = pluginRegistry.getReporters();
|
|
38593
|
+
for (const reporter of reporters) {
|
|
38594
|
+
if (reporter.onRunEnd) {
|
|
38595
|
+
try {
|
|
38596
|
+
await reporter.onRunEnd({
|
|
38597
|
+
runId,
|
|
38598
|
+
totalDurationMs: durationMs,
|
|
38599
|
+
totalCost,
|
|
38600
|
+
storySummary: {
|
|
38601
|
+
completed: storiesCompleted,
|
|
38602
|
+
failed: finalCounts.failed,
|
|
38603
|
+
skipped: finalCounts.skipped,
|
|
38604
|
+
paused: finalCounts.paused
|
|
38605
|
+
}
|
|
38606
|
+
});
|
|
38607
|
+
} catch (error48) {
|
|
38608
|
+
logger?.warn("plugins", `Reporter '${reporter.name}' onRunEnd failed`, { error: error48 });
|
|
38609
|
+
}
|
|
38603
38610
|
}
|
|
38604
38611
|
}
|
|
38605
38612
|
}
|
|
@@ -74180,21 +74187,6 @@ async function runExecutionPhase(options, prd, pluginRegistry) {
|
|
|
74180
74187
|
options.statusWriter.setRunStatus("running");
|
|
74181
74188
|
options.statusWriter.setCurrentStory(null);
|
|
74182
74189
|
await options.statusWriter.update(totalCost, iterations);
|
|
74183
|
-
const reporters = pluginRegistry.getReporters();
|
|
74184
|
-
for (const reporter of reporters) {
|
|
74185
|
-
if (reporter.onRunStart) {
|
|
74186
|
-
try {
|
|
74187
|
-
await reporter.onRunStart({
|
|
74188
|
-
runId: options.runId,
|
|
74189
|
-
feature: options.feature,
|
|
74190
|
-
totalStories: prd.userStories.length,
|
|
74191
|
-
startTime: options.startedAt
|
|
74192
|
-
});
|
|
74193
|
-
} catch (error48) {
|
|
74194
|
-
logger?.warn("plugins", `Reporter '${reporter.name}' onRunStart failed`, { error: error48 });
|
|
74195
|
-
}
|
|
74196
|
-
}
|
|
74197
|
-
}
|
|
74198
74190
|
logger?.info("execution", `Starting ${options.feature}`, {
|
|
74199
74191
|
totalStories: prd.userStories.length,
|
|
74200
74192
|
doneStories: prd.userStories.filter((s) => s.status === "passed").length,
|
|
@@ -74308,6 +74300,7 @@ async function run(options) {
|
|
|
74308
74300
|
let iterations = 0;
|
|
74309
74301
|
let storiesCompleted = 0;
|
|
74310
74302
|
let totalCost = 0;
|
|
74303
|
+
let runCompleted = false;
|
|
74311
74304
|
const allStoryMetrics = [];
|
|
74312
74305
|
const logger = getSafeLogger();
|
|
74313
74306
|
const registry2 = createAgentRegistry(config2);
|
|
@@ -74400,6 +74393,7 @@ async function run(options) {
|
|
|
74400
74393
|
agentGetFn
|
|
74401
74394
|
});
|
|
74402
74395
|
const { durationMs } = completionResult;
|
|
74396
|
+
runCompleted = true;
|
|
74403
74397
|
return {
|
|
74404
74398
|
success: isComplete(prd),
|
|
74405
74399
|
iterations,
|
|
@@ -74435,7 +74429,8 @@ async function run(options) {
|
|
|
74435
74429
|
feature,
|
|
74436
74430
|
prdPath,
|
|
74437
74431
|
branch,
|
|
74438
|
-
version: NAX_VERSION
|
|
74432
|
+
version: NAX_VERSION,
|
|
74433
|
+
runCompleted
|
|
74439
74434
|
});
|
|
74440
74435
|
logger2?.debug("execution", "Runner finally \u2014 cleanupRun done, run() returning");
|
|
74441
74436
|
}
|