@nathapp/nax 0.54.9 → 0.54.10
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 +76 -13
- package/package.json +1 -1
package/dist/nax.js
CHANGED
|
@@ -22370,7 +22370,7 @@ var package_default;
|
|
|
22370
22370
|
var init_package = __esm(() => {
|
|
22371
22371
|
package_default = {
|
|
22372
22372
|
name: "@nathapp/nax",
|
|
22373
|
-
version: "0.54.
|
|
22373
|
+
version: "0.54.10",
|
|
22374
22374
|
description: "AI Coding Agent Orchestrator \u2014 loops until done",
|
|
22375
22375
|
type: "module",
|
|
22376
22376
|
bin: {
|
|
@@ -22449,8 +22449,8 @@ var init_version = __esm(() => {
|
|
|
22449
22449
|
NAX_VERSION = package_default.version;
|
|
22450
22450
|
NAX_COMMIT = (() => {
|
|
22451
22451
|
try {
|
|
22452
|
-
if (/^[0-9a-f]{6,10}$/.test("
|
|
22453
|
-
return "
|
|
22452
|
+
if (/^[0-9a-f]{6,10}$/.test("cf3ead2"))
|
|
22453
|
+
return "cf3ead2";
|
|
22454
22454
|
} catch {}
|
|
22455
22455
|
try {
|
|
22456
22456
|
const result = Bun.spawnSync(["git", "rev-parse", "--short", "HEAD"], {
|
|
@@ -23200,14 +23200,22 @@ ${this.sanitizeMarkdown(request.detail)}
|
|
|
23200
23200
|
if (!this.botToken)
|
|
23201
23201
|
return [];
|
|
23202
23202
|
try {
|
|
23203
|
-
const
|
|
23204
|
-
|
|
23205
|
-
|
|
23206
|
-
|
|
23207
|
-
|
|
23208
|
-
|
|
23209
|
-
|
|
23210
|
-
|
|
23203
|
+
const controller = new AbortController;
|
|
23204
|
+
const timer = setTimeout(() => controller.abort(), 8000);
|
|
23205
|
+
let response;
|
|
23206
|
+
try {
|
|
23207
|
+
response = await fetch(`https://api.telegram.org/bot${this.botToken}/getUpdates`, {
|
|
23208
|
+
method: "POST",
|
|
23209
|
+
headers: { "Content-Type": "application/json" },
|
|
23210
|
+
body: JSON.stringify({
|
|
23211
|
+
offset: this.lastUpdateId + 1,
|
|
23212
|
+
timeout: 1
|
|
23213
|
+
}),
|
|
23214
|
+
signal: controller.signal
|
|
23215
|
+
});
|
|
23216
|
+
} finally {
|
|
23217
|
+
clearTimeout(timer);
|
|
23218
|
+
}
|
|
23211
23219
|
if (!response.ok) {
|
|
23212
23220
|
const errorBody = await response.text().catch(() => "");
|
|
23213
23221
|
throw new Error(`Telegram getUpdates error (${response.status}): ${errorBody || response.statusText}`);
|
|
@@ -23289,7 +23297,8 @@ ${this.sanitizeMarkdown(request.detail)}
|
|
|
23289
23297
|
body: JSON.stringify({
|
|
23290
23298
|
chat_id: this.chatId,
|
|
23291
23299
|
message_id: lastId,
|
|
23292
|
-
text: "\u23F1 EXPIRED \u2014 Interaction timed out"
|
|
23300
|
+
text: "\u23F1 EXPIRED \u2014 Interaction timed out",
|
|
23301
|
+
reply_markup: { inline_keyboard: [] }
|
|
23293
23302
|
})
|
|
23294
23303
|
});
|
|
23295
23304
|
} catch {} finally {
|
|
@@ -24014,8 +24023,10 @@ async function checkStoryAmbiguity(context, config2, chain) {
|
|
|
24014
24023
|
async function checkReviewGate(context, config2, chain) {
|
|
24015
24024
|
if (!isTriggerEnabled("review-gate", config2))
|
|
24016
24025
|
return true;
|
|
24026
|
+
const { fallback } = getTriggerConfig("review-gate", config2);
|
|
24017
24027
|
const response = await executeTrigger("review-gate", context, config2, chain);
|
|
24018
|
-
|
|
24028
|
+
const effectiveAction = chain.applyFallback(response, fallback);
|
|
24029
|
+
return effectiveAction === "approve";
|
|
24019
24030
|
}
|
|
24020
24031
|
async function checkStoryOversized(context, config2, chain) {
|
|
24021
24032
|
if (!isTriggerEnabled("story-oversized", config2))
|
|
@@ -31119,6 +31130,27 @@ var init_stages = __esm(() => {
|
|
|
31119
31130
|
preRunPipeline = [acceptanceSetupStage];
|
|
31120
31131
|
});
|
|
31121
31132
|
|
|
31133
|
+
// src/utils/gitignore.ts
|
|
31134
|
+
var NAX_GITIGNORE_ENTRIES;
|
|
31135
|
+
var init_gitignore = __esm(() => {
|
|
31136
|
+
NAX_GITIGNORE_ENTRIES = [
|
|
31137
|
+
".nax-verifier-verdict.json",
|
|
31138
|
+
"nax.lock",
|
|
31139
|
+
".nax/**/runs/",
|
|
31140
|
+
".nax/metrics.json",
|
|
31141
|
+
".nax/features/*/status.json",
|
|
31142
|
+
".nax/features/*/plan/",
|
|
31143
|
+
".nax/features/*/acp-sessions.json",
|
|
31144
|
+
".nax/features/*/interactions/",
|
|
31145
|
+
".nax/features/*/progress.txt",
|
|
31146
|
+
".nax/features/*/acceptance-refined.json",
|
|
31147
|
+
".nax-pids",
|
|
31148
|
+
".nax-wt/",
|
|
31149
|
+
"**/.nax-acceptance*",
|
|
31150
|
+
"**/.nax/features/*/"
|
|
31151
|
+
];
|
|
31152
|
+
});
|
|
31153
|
+
|
|
31122
31154
|
// src/cli/init-context.ts
|
|
31123
31155
|
var exports_init_context = {};
|
|
31124
31156
|
__export(exports_init_context, {
|
|
@@ -35160,9 +35192,38 @@ __export(exports_manager, {
|
|
|
35160
35192
|
WorktreeManager: () => WorktreeManager
|
|
35161
35193
|
});
|
|
35162
35194
|
import { existsSync as existsSync32, symlinkSync } from "fs";
|
|
35195
|
+
import { mkdir as mkdir4 } from "fs/promises";
|
|
35163
35196
|
import { join as join50 } from "path";
|
|
35164
35197
|
|
|
35165
35198
|
class WorktreeManager {
|
|
35199
|
+
async ensureGitExcludes(projectRoot) {
|
|
35200
|
+
const logger = getSafeLogger();
|
|
35201
|
+
const infoDir = join50(projectRoot, ".git", "info");
|
|
35202
|
+
const excludePath = join50(infoDir, "exclude");
|
|
35203
|
+
try {
|
|
35204
|
+
await mkdir4(infoDir, { recursive: true });
|
|
35205
|
+
let existing = "";
|
|
35206
|
+
if (existsSync32(excludePath)) {
|
|
35207
|
+
existing = await Bun.file(excludePath).text();
|
|
35208
|
+
}
|
|
35209
|
+
const missing = NAX_GITIGNORE_ENTRIES.filter((entry) => !existing.includes(entry));
|
|
35210
|
+
if (missing.length === 0)
|
|
35211
|
+
return;
|
|
35212
|
+
const section = `
|
|
35213
|
+
# nax \u2014 generated files (auto-added by nax parallel)
|
|
35214
|
+
${missing.join(`
|
|
35215
|
+
`)}
|
|
35216
|
+
`;
|
|
35217
|
+
await Bun.write(excludePath, existing + section);
|
|
35218
|
+
logger?.info("worktree", "Updated .git/info/exclude with nax entries", {
|
|
35219
|
+
added: missing.length
|
|
35220
|
+
});
|
|
35221
|
+
} catch (error48) {
|
|
35222
|
+
logger?.warn("worktree", "Failed to update .git/info/exclude", {
|
|
35223
|
+
error: errorMessage(error48)
|
|
35224
|
+
});
|
|
35225
|
+
}
|
|
35226
|
+
}
|
|
35166
35227
|
async create(projectRoot, storyId) {
|
|
35167
35228
|
validateStoryId(storyId);
|
|
35168
35229
|
const worktreePath = join50(projectRoot, ".nax-wt", storyId);
|
|
@@ -35304,6 +35365,7 @@ var _managerDeps;
|
|
|
35304
35365
|
var init_manager = __esm(() => {
|
|
35305
35366
|
init_logger2();
|
|
35306
35367
|
init_bun_deps();
|
|
35368
|
+
init_gitignore();
|
|
35307
35369
|
_managerDeps = {
|
|
35308
35370
|
spawn
|
|
35309
35371
|
};
|
|
@@ -70315,6 +70377,7 @@ async function exportPromptCommand(options) {
|
|
|
70315
70377
|
// src/cli/init.ts
|
|
70316
70378
|
init_paths();
|
|
70317
70379
|
init_logger2();
|
|
70380
|
+
init_gitignore();
|
|
70318
70381
|
init_init_context();
|
|
70319
70382
|
// src/cli/plugins.ts
|
|
70320
70383
|
init_loader4();
|