@nathapp/nax 0.66.3 → 0.66.4

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/nax.js +11 -61
  2. package/package.json +1 -1
package/dist/nax.js CHANGED
@@ -24509,8 +24509,7 @@ async function autoCommitIfDirty(workdir, stage, role, storyId) {
24509
24509
  dirtyFiles: statusOutput.trim().split(`
24510
24510
  `).length
24511
24511
  });
24512
- const addArgs = isSubdir ? ["git", "add", "."] : ["git", "add", "-A"];
24513
- const addProc = _gitDeps.spawn(addArgs, { cwd: workdir, stdout: "pipe", stderr: "pipe" });
24512
+ const addProc = _gitDeps.spawn(["git", "add", "-A"], { cwd: realGitRoot, stdout: "pipe", stderr: "pipe" });
24514
24513
  await addProc.exited;
24515
24514
  const commitProc = _gitDeps.spawn(["git", "commit", "-m", `chore(${storyId}): auto-commit after ${role} session`], {
24516
24515
  cwd: workdir,
@@ -35645,9 +35644,9 @@ async function runTrackedSession(state, id, runner, request) {
35645
35644
  ...request,
35646
35645
  runOptions: {
35647
35646
  ...request.runOptions,
35648
- onSessionEstablished: (protocolIds2, sessionName2) => {
35647
+ onSessionEstablished: (protocolIds, sessionName) => {
35649
35648
  try {
35650
- state.bindHandle(id, sessionName2, protocolIds2);
35649
+ state.bindHandle(id, sessionName, protocolIds);
35651
35650
  } catch (err) {
35652
35651
  getLogger().warn("session", "bindHandle via onSessionEstablished failed", {
35653
35652
  storyId: state.sessions.get(id)?.storyId,
@@ -35655,7 +35654,7 @@ async function runTrackedSession(state, id, runner, request) {
35655
35654
  error: err instanceof Error ? err.message : String(err)
35656
35655
  });
35657
35656
  }
35658
- callerCallback?.(protocolIds2, sessionName2);
35657
+ callerCallback?.(protocolIds, sessionName);
35659
35658
  }
35660
35659
  }
35661
35660
  };
@@ -35730,38 +35729,6 @@ async function runTrackedSession(state, id, runner, request) {
35730
35729
  if (current?.state === "RUNNING") {
35731
35730
  state.transition(id, result.success ? "COMPLETED" : "FAILED");
35732
35731
  }
35733
- const protocolIds = result.protocolIds ?? current?.protocolIds;
35734
- const turn = Math.max(result.internalRoundTrips ?? 1, 1);
35735
- const sessionName = state.nameFor({
35736
- workdir: pre.workdir,
35737
- featureName: pre.featureName,
35738
- storyId: pre.storyId,
35739
- role: pre.role
35740
- });
35741
- const event = {
35742
- kind: "session-turn",
35743
- sessionName,
35744
- sessionRole: pre.role,
35745
- prompt: request.runOptions.prompt,
35746
- response: result.output,
35747
- agentName: pre.agent ?? state.defaultAgent,
35748
- stage,
35749
- storyId: pre.storyId,
35750
- featureName: pre.featureName,
35751
- workdir: pre.workdir,
35752
- resolvedPermissions,
35753
- turn,
35754
- protocolIds: {
35755
- sessionId: protocolIds?.sessionId ?? null,
35756
- recordId: protocolIds?.recordId ?? null
35757
- },
35758
- origin: "runTrackedSession",
35759
- tokenUsage: result.tokenUsage,
35760
- exactCostUsd: result.exactCostUsd,
35761
- durationMs: Date.now() - startedAt,
35762
- timestamp: Date.now()
35763
- };
35764
- state.dispatchEvents.emitDispatch(event);
35765
35732
  return result;
35766
35733
  }
35767
35734
  var init_manager_run = __esm(() => {
@@ -39538,27 +39505,10 @@ async function runReview(opts) {
39538
39505
  const uncommittedFiles = naxIgnoreIndex ? naxIgnoreIndex.filter(afterRuntimeFilter, workdir) : afterRuntimeFilter;
39539
39506
  if (uncommittedFiles.length > 0) {
39540
39507
  const fileList = uncommittedFiles.join(", ");
39541
- logger?.warn("review", `Uncommitted changes detected before review: ${fileList}`);
39542
- return {
39543
- success: false,
39544
- checks: [
39545
- {
39546
- check: "git-clean",
39547
- success: false,
39548
- command: "git diff --name-only HEAD",
39549
- exitCode: 1,
39550
- output: uncommittedFiles.join(`
39551
- `),
39552
- durationMs: 0
39553
- }
39554
- ],
39555
- totalDurationMs: Date.now() - startTime,
39556
- failureReason: `Working tree has uncommitted changes:
39557
- ${uncommittedFiles.map((f) => ` - ${f}`).join(`
39558
- `)}
39559
-
39560
- Stage and commit these files before running review.`
39561
- };
39508
+ logger?.warn("review", `Uncommitted changes detected before review (proceeding): ${fileList}`, {
39509
+ storyId,
39510
+ uncommittedCount: uncommittedFiles.length
39511
+ });
39562
39512
  }
39563
39513
  for (const checkName of config2.checks) {
39564
39514
  if (retrySkipChecks?.has(checkName)) {
@@ -57296,7 +57246,7 @@ var package_default;
57296
57246
  var init_package = __esm(() => {
57297
57247
  package_default = {
57298
57248
  name: "@nathapp/nax",
57299
- version: "0.66.3",
57249
+ version: "0.66.4",
57300
57250
  description: "AI Coding Agent Orchestrator \u2014 loops until done",
57301
57251
  type: "module",
57302
57252
  bin: {
@@ -57389,8 +57339,8 @@ var init_version = __esm(() => {
57389
57339
  NAX_VERSION = package_default.version;
57390
57340
  NAX_COMMIT = (() => {
57391
57341
  try {
57392
- if (/^[0-9a-f]{6,10}$/.test("58f561eb"))
57393
- return "58f561eb";
57342
+ if (/^[0-9a-f]{6,10}$/.test("1e75fa0d"))
57343
+ return "1e75fa0d";
57394
57344
  } catch {}
57395
57345
  try {
57396
57346
  const result = Bun.spawnSync(["git", "rev-parse", "--short", "HEAD"], {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nathapp/nax",
3
- "version": "0.66.3",
3
+ "version": "0.66.4",
4
4
  "description": "AI Coding Agent Orchestrator — loops until done",
5
5
  "type": "module",
6
6
  "bin": {