@nathapp/nax 0.43.0 → 0.43.1
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/bin/nax.ts +11 -1
- package/dist/nax.js +9 -3
- package/package.json +1 -1
package/bin/nax.ts
CHANGED
|
@@ -69,7 +69,7 @@ import { unlockCommand } from "../src/commands/unlock";
|
|
|
69
69
|
import { DEFAULT_CONFIG, findProjectDir, loadConfig, validateDirectory } from "../src/config";
|
|
70
70
|
import { run } from "../src/execution";
|
|
71
71
|
import { loadHooksConfig } from "../src/hooks";
|
|
72
|
-
import { type LogLevel, initLogger } from "../src/logger";
|
|
72
|
+
import { type LogLevel, initLogger, resetLogger } from "../src/logger";
|
|
73
73
|
import { countStories, loadPRD } from "../src/prd";
|
|
74
74
|
import { PipelineEventEmitter, type StoryDisplayState, renderTui } from "../src/tui";
|
|
75
75
|
import { NAX_VERSION } from "../src/version";
|
|
@@ -344,6 +344,13 @@ program
|
|
|
344
344
|
// Run plan phase if --plan flag is set (AC-4: runs plan then execute)
|
|
345
345
|
if (options.plan && options.from) {
|
|
346
346
|
try {
|
|
347
|
+
// Initialize plan logger before calling planCommand — writes to features/<feature>/plan-<ts>.jsonl
|
|
348
|
+
mkdirSync(featureDir, { recursive: true });
|
|
349
|
+
const planLogId = new Date().toISOString().replace(/:/g, "-").replace(/\..+/, "");
|
|
350
|
+
const planLogPath = join(featureDir, `plan-${planLogId}.jsonl`);
|
|
351
|
+
initLogger({ level: "info", filePath: planLogPath, useChalk: false, headless: true });
|
|
352
|
+
console.log(chalk.dim(` [Plan log: ${planLogPath}]`));
|
|
353
|
+
|
|
347
354
|
console.log(chalk.dim(" [Planning phase: generating PRD from spec]"));
|
|
348
355
|
const generatedPrdPath = await planCommand(workdir, config, {
|
|
349
356
|
from: options.from,
|
|
@@ -391,6 +398,9 @@ program
|
|
|
391
398
|
process.exit(1);
|
|
392
399
|
}
|
|
393
400
|
|
|
401
|
+
// Reset plan logger (if plan phase ran) so the run logger can be initialized fresh
|
|
402
|
+
resetLogger();
|
|
403
|
+
|
|
394
404
|
// Create run directory and JSONL log file path
|
|
395
405
|
const runsDir = join(featureDir, "runs");
|
|
396
406
|
mkdirSync(runsDir, { recursive: true });
|
package/dist/nax.js
CHANGED
|
@@ -21968,7 +21968,7 @@ var package_default;
|
|
|
21968
21968
|
var init_package = __esm(() => {
|
|
21969
21969
|
package_default = {
|
|
21970
21970
|
name: "@nathapp/nax",
|
|
21971
|
-
version: "0.43.
|
|
21971
|
+
version: "0.43.1",
|
|
21972
21972
|
description: "AI Coding Agent Orchestrator \u2014 loops until done",
|
|
21973
21973
|
type: "module",
|
|
21974
21974
|
bin: {
|
|
@@ -22041,8 +22041,8 @@ var init_version = __esm(() => {
|
|
|
22041
22041
|
NAX_VERSION = package_default.version;
|
|
22042
22042
|
NAX_COMMIT = (() => {
|
|
22043
22043
|
try {
|
|
22044
|
-
if (/^[0-9a-f]{6,10}$/.test("
|
|
22045
|
-
return "
|
|
22044
|
+
if (/^[0-9a-f]{6,10}$/.test("82a45aa"))
|
|
22045
|
+
return "82a45aa";
|
|
22046
22046
|
} catch {}
|
|
22047
22047
|
try {
|
|
22048
22048
|
const result = Bun.spawnSync(["git", "rev-parse", "--short", "HEAD"], {
|
|
@@ -76807,6 +76807,11 @@ program2.command("run").description("Run the orchestration loop for a feature").
|
|
|
76807
76807
|
const prdPath = join43(featureDir, "prd.json");
|
|
76808
76808
|
if (options.plan && options.from) {
|
|
76809
76809
|
try {
|
|
76810
|
+
mkdirSync6(featureDir, { recursive: true });
|
|
76811
|
+
const planLogId = new Date().toISOString().replace(/:/g, "-").replace(/\..+/, "");
|
|
76812
|
+
const planLogPath = join43(featureDir, `plan-${planLogId}.jsonl`);
|
|
76813
|
+
initLogger({ level: "info", filePath: planLogPath, useChalk: false, headless: true });
|
|
76814
|
+
console.log(source_default.dim(` [Plan log: ${planLogPath}]`));
|
|
76810
76815
|
console.log(source_default.dim(" [Planning phase: generating PRD from spec]"));
|
|
76811
76816
|
const generatedPrdPath = await planCommand(workdir, config2, {
|
|
76812
76817
|
from: options.from,
|
|
@@ -76841,6 +76846,7 @@ program2.command("run").description("Run the orchestration loop for a feature").
|
|
|
76841
76846
|
console.error(source_default.red(`Feature "${options.feature}" not found or missing prd.json`));
|
|
76842
76847
|
process.exit(1);
|
|
76843
76848
|
}
|
|
76849
|
+
resetLogger();
|
|
76844
76850
|
const runsDir = join43(featureDir, "runs");
|
|
76845
76851
|
mkdirSync6(runsDir, { recursive: true });
|
|
76846
76852
|
const runId = new Date().toISOString().replace(/:/g, "-").replace(/\..+/, "");
|