@nathapp/nax 0.63.0-canary.1 → 0.63.0-canary.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 +18 -3
- package/package.json +1 -1
package/dist/nax.js
CHANGED
|
@@ -43430,7 +43430,7 @@ var package_default;
|
|
|
43430
43430
|
var init_package = __esm(() => {
|
|
43431
43431
|
package_default = {
|
|
43432
43432
|
name: "@nathapp/nax",
|
|
43433
|
-
version: "0.63.0-canary.
|
|
43433
|
+
version: "0.63.0-canary.2",
|
|
43434
43434
|
description: "AI Coding Agent Orchestrator \u2014 loops until done",
|
|
43435
43435
|
type: "module",
|
|
43436
43436
|
bin: {
|
|
@@ -43510,8 +43510,8 @@ var init_version = __esm(() => {
|
|
|
43510
43510
|
NAX_VERSION = package_default.version;
|
|
43511
43511
|
NAX_COMMIT = (() => {
|
|
43512
43512
|
try {
|
|
43513
|
-
if (/^[0-9a-f]{6,10}$/.test("
|
|
43514
|
-
return "
|
|
43513
|
+
if (/^[0-9a-f]{6,10}$/.test("acd83bd2"))
|
|
43514
|
+
return "acd83bd2";
|
|
43515
43515
|
} catch {}
|
|
43516
43516
|
try {
|
|
43517
43517
|
const result = Bun.spawnSync(["git", "rev-parse", "--short", "HEAD"], {
|
|
@@ -45036,6 +45036,18 @@ import { join as join53 } from "path";
|
|
|
45036
45036
|
|
|
45037
45037
|
class SessionManager {
|
|
45038
45038
|
_sessions = new Map;
|
|
45039
|
+
_persistDescriptor(descriptor) {
|
|
45040
|
+
if (!descriptor.scratchDir)
|
|
45041
|
+
return;
|
|
45042
|
+
_sessionManagerDeps.writeDescriptor(descriptor.scratchDir, descriptor).catch((err) => {
|
|
45043
|
+
getLogger().warn("session", "Failed to re-persist session descriptor", {
|
|
45044
|
+
storyId: descriptor.storyId,
|
|
45045
|
+
sessionId: descriptor.id,
|
|
45046
|
+
scratchDir: descriptor.scratchDir,
|
|
45047
|
+
error: err instanceof Error ? err.message : String(err)
|
|
45048
|
+
});
|
|
45049
|
+
});
|
|
45050
|
+
}
|
|
45039
45051
|
create(options) {
|
|
45040
45052
|
const now = _sessionManagerDeps.now();
|
|
45041
45053
|
const id = `sess-${_sessionManagerDeps.uuid()}`;
|
|
@@ -45104,6 +45116,7 @@ class SessionManager {
|
|
|
45104
45116
|
updated.completedStages = [...session.completedStages, options.completedStage];
|
|
45105
45117
|
}
|
|
45106
45118
|
this._sessions.set(id, updated);
|
|
45119
|
+
this._persistDescriptor(updated);
|
|
45107
45120
|
getLogger().debug("session", "Session transitioned", {
|
|
45108
45121
|
storyId: session.storyId,
|
|
45109
45122
|
sessionId: id,
|
|
@@ -45127,6 +45140,7 @@ class SessionManager {
|
|
|
45127
45140
|
lastActivityAt: _sessionManagerDeps.now()
|
|
45128
45141
|
};
|
|
45129
45142
|
this._sessions.set(id, updated);
|
|
45143
|
+
this._persistDescriptor(updated);
|
|
45130
45144
|
getLogger().debug("session", "Session handle bound", {
|
|
45131
45145
|
storyId: session.storyId,
|
|
45132
45146
|
sessionId: id,
|
|
@@ -45148,6 +45162,7 @@ class SessionManager {
|
|
|
45148
45162
|
lastActivityAt: _sessionManagerDeps.now()
|
|
45149
45163
|
};
|
|
45150
45164
|
this._sessions.set(id, updated);
|
|
45165
|
+
this._persistDescriptor(updated);
|
|
45151
45166
|
getLogger().info("session", "Session handed off to fallback agent", {
|
|
45152
45167
|
storyId: session.storyId,
|
|
45153
45168
|
sessionId: id,
|