@nathapp/nax 0.83.7 → 0.84.0
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 +452 -380
- package/package.json +4 -5
package/dist/nax.js
CHANGED
|
@@ -2198,6 +2198,266 @@ function killProcessGroup(pid, signal) {
|
|
|
2198
2198
|
}
|
|
2199
2199
|
}
|
|
2200
2200
|
|
|
2201
|
+
// ../nax-agent/src/terminal-auth/open-url.ts
|
|
2202
|
+
import { spawn } from "child_process";
|
|
2203
|
+
function spawnDetached(command) {
|
|
2204
|
+
const [file, ...args] = command;
|
|
2205
|
+
const child = spawn(file ?? "", args, { stdio: "ignore", detached: true, windowsHide: true });
|
|
2206
|
+
child.on("error", () => {});
|
|
2207
|
+
child.unref();
|
|
2208
|
+
return child;
|
|
2209
|
+
}
|
|
2210
|
+
function openerFor(platform, url) {
|
|
2211
|
+
if (platform === "darwin")
|
|
2212
|
+
return ["open", url];
|
|
2213
|
+
if (platform === "win32")
|
|
2214
|
+
return ["cmd", "/c", "start", "", url];
|
|
2215
|
+
return ["xdg-open", url];
|
|
2216
|
+
}
|
|
2217
|
+
function openUrl(url) {
|
|
2218
|
+
try {
|
|
2219
|
+
_openUrlDeps.spawn(openerFor(_openUrlDeps.platform(), url));
|
|
2220
|
+
} catch {}
|
|
2221
|
+
}
|
|
2222
|
+
var _openUrlDeps;
|
|
2223
|
+
var init_open_url = __esm(() => {
|
|
2224
|
+
_openUrlDeps = {
|
|
2225
|
+
spawn: (command) => {
|
|
2226
|
+
spawnDetached(command);
|
|
2227
|
+
},
|
|
2228
|
+
platform: () => process.platform
|
|
2229
|
+
};
|
|
2230
|
+
});
|
|
2231
|
+
|
|
2232
|
+
// ../nax-agent/src/terminal-auth/prompt.ts
|
|
2233
|
+
function stdinOf() {
|
|
2234
|
+
return _terminalPromptDeps.stdin ?? process.stdin;
|
|
2235
|
+
}
|
|
2236
|
+
function keyAction(char, bufferEmpty, hasEmptyHook) {
|
|
2237
|
+
if (char === ETX || char === EOT)
|
|
2238
|
+
return { kind: "cancel" };
|
|
2239
|
+
if (char === CR || char === LF) {
|
|
2240
|
+
return bufferEmpty && hasEmptyHook ? { kind: "empty-submit" } : { kind: "submit" };
|
|
2241
|
+
}
|
|
2242
|
+
if (char === BACKSPACE)
|
|
2243
|
+
return { kind: "erase" };
|
|
2244
|
+
return { kind: "append" };
|
|
2245
|
+
}
|
|
2246
|
+
function applyEdit(action, char, buffer, echo, onEmptySubmit) {
|
|
2247
|
+
if (action.kind === "empty-submit") {
|
|
2248
|
+
onEmptySubmit?.();
|
|
2249
|
+
return buffer;
|
|
2250
|
+
}
|
|
2251
|
+
if (action.kind === "erase") {
|
|
2252
|
+
if (echo)
|
|
2253
|
+
_terminalPromptDeps.write("\b \b");
|
|
2254
|
+
return buffer.slice(0, -1);
|
|
2255
|
+
}
|
|
2256
|
+
if (echo)
|
|
2257
|
+
_terminalPromptDeps.write(char);
|
|
2258
|
+
return buffer + char;
|
|
2259
|
+
}
|
|
2260
|
+
function read(message, echo, onEmptySubmit, style) {
|
|
2261
|
+
const stdin = stdinOf();
|
|
2262
|
+
if (stdin.isTTY !== true)
|
|
2263
|
+
return Promise.reject(new PromptCancelledError);
|
|
2264
|
+
_terminalPromptDeps.write(`${style.accent("?")} ${message} `);
|
|
2265
|
+
return new Promise((resolve3, reject) => {
|
|
2266
|
+
let buffer = "";
|
|
2267
|
+
let settled = false;
|
|
2268
|
+
const cleanup = () => {
|
|
2269
|
+
if (settled)
|
|
2270
|
+
return;
|
|
2271
|
+
settled = true;
|
|
2272
|
+
stdin.removeListener("data", onData);
|
|
2273
|
+
stdin.removeListener("end", onEnd);
|
|
2274
|
+
stdin.removeListener("error", onEnd);
|
|
2275
|
+
stdin.setRawMode(false);
|
|
2276
|
+
stdin.pause();
|
|
2277
|
+
_terminalPromptDeps.write(`
|
|
2278
|
+
`);
|
|
2279
|
+
};
|
|
2280
|
+
const onEnd = () => {
|
|
2281
|
+
cleanup();
|
|
2282
|
+
reject(new PromptCancelledError);
|
|
2283
|
+
};
|
|
2284
|
+
const onData = (chunk) => {
|
|
2285
|
+
for (const char of chunk) {
|
|
2286
|
+
const action = keyAction(char, buffer.length === 0, onEmptySubmit !== undefined);
|
|
2287
|
+
if (action.kind === "cancel") {
|
|
2288
|
+
onEnd();
|
|
2289
|
+
return;
|
|
2290
|
+
}
|
|
2291
|
+
if (action.kind === "submit") {
|
|
2292
|
+
cleanup();
|
|
2293
|
+
resolve3(buffer);
|
|
2294
|
+
return;
|
|
2295
|
+
}
|
|
2296
|
+
buffer = applyEdit(action, char, buffer, echo, onEmptySubmit);
|
|
2297
|
+
}
|
|
2298
|
+
};
|
|
2299
|
+
stdin.setRawMode(true);
|
|
2300
|
+
stdin.resume();
|
|
2301
|
+
stdin.setEncoding("utf8");
|
|
2302
|
+
stdin.on("data", onData);
|
|
2303
|
+
stdin.once("end", onEnd);
|
|
2304
|
+
stdin.once("error", onEnd);
|
|
2305
|
+
});
|
|
2306
|
+
}
|
|
2307
|
+
function promptForSecret(message, style = PLAIN_STYLE) {
|
|
2308
|
+
return read(message, false, undefined, style);
|
|
2309
|
+
}
|
|
2310
|
+
function promptForLine(message, onEmptySubmit, style = PLAIN_STYLE) {
|
|
2311
|
+
return read(message, true, onEmptySubmit, style);
|
|
2312
|
+
}
|
|
2313
|
+
function promptForSelect(message, choices, style = PLAIN_STYLE) {
|
|
2314
|
+
const stdin = stdinOf();
|
|
2315
|
+
if (stdin.isTTY !== true)
|
|
2316
|
+
return Promise.reject(new PromptCancelledError);
|
|
2317
|
+
if (choices.length === 0)
|
|
2318
|
+
return Promise.reject(new PromptCancelledError);
|
|
2319
|
+
_terminalPromptDeps.write(`${style.accent("?")} ${message}
|
|
2320
|
+
`);
|
|
2321
|
+
return new Promise((resolve3, reject) => {
|
|
2322
|
+
let index = 0;
|
|
2323
|
+
let settled = false;
|
|
2324
|
+
let drawn = false;
|
|
2325
|
+
const render = () => {
|
|
2326
|
+
if (drawn)
|
|
2327
|
+
_terminalPromptDeps.write(`\x1B[${choices.length}A`);
|
|
2328
|
+
drawn = true;
|
|
2329
|
+
for (const [i, choice] of choices.entries()) {
|
|
2330
|
+
const active = i === index;
|
|
2331
|
+
const marker = active ? style.accent(">") : " ";
|
|
2332
|
+
const label = active ? style.accent(choice.label) : choice.label;
|
|
2333
|
+
_terminalPromptDeps.write(`\r\x1B[2K${marker} ${label}
|
|
2334
|
+
`);
|
|
2335
|
+
}
|
|
2336
|
+
};
|
|
2337
|
+
const cleanup = () => {
|
|
2338
|
+
if (settled)
|
|
2339
|
+
return;
|
|
2340
|
+
settled = true;
|
|
2341
|
+
stdin.removeListener("data", onData);
|
|
2342
|
+
stdin.removeListener("end", onEnd);
|
|
2343
|
+
stdin.removeListener("error", onEnd);
|
|
2344
|
+
stdin.setRawMode(false);
|
|
2345
|
+
stdin.pause();
|
|
2346
|
+
};
|
|
2347
|
+
const onEnd = () => {
|
|
2348
|
+
cleanup();
|
|
2349
|
+
reject(new PromptCancelledError);
|
|
2350
|
+
};
|
|
2351
|
+
const onData = (chunk) => {
|
|
2352
|
+
if (chunk.includes(ETX) || chunk.includes(EOT)) {
|
|
2353
|
+
onEnd();
|
|
2354
|
+
return;
|
|
2355
|
+
}
|
|
2356
|
+
if (chunk.includes(ARROW_UP)) {
|
|
2357
|
+
index = (index - 1 + choices.length) % choices.length;
|
|
2358
|
+
render();
|
|
2359
|
+
return;
|
|
2360
|
+
}
|
|
2361
|
+
if (chunk.includes(ARROW_DOWN)) {
|
|
2362
|
+
index = (index + 1) % choices.length;
|
|
2363
|
+
render();
|
|
2364
|
+
return;
|
|
2365
|
+
}
|
|
2366
|
+
if (chunk.includes(CR) || chunk.includes(LF)) {
|
|
2367
|
+
const chosen = choices[index];
|
|
2368
|
+
cleanup();
|
|
2369
|
+
resolve3(chosen.id);
|
|
2370
|
+
}
|
|
2371
|
+
};
|
|
2372
|
+
stdin.setRawMode(true);
|
|
2373
|
+
stdin.resume();
|
|
2374
|
+
stdin.setEncoding("utf8");
|
|
2375
|
+
stdin.on("data", onData);
|
|
2376
|
+
stdin.once("end", onEnd);
|
|
2377
|
+
stdin.once("error", onEnd);
|
|
2378
|
+
render();
|
|
2379
|
+
});
|
|
2380
|
+
}
|
|
2381
|
+
var ETX = "\x03", EOT = "\x04", CR = "\r", LF = `
|
|
2382
|
+
`, BACKSPACE = "\x7F", ARROW_UP = "\x1B[A", ARROW_DOWN = "\x1B[B", identity = (text) => text, PLAIN_STYLE, PromptCancelledError, _terminalPromptDeps;
|
|
2383
|
+
var init_prompt = __esm(() => {
|
|
2384
|
+
PLAIN_STYLE = { accent: identity, dim: identity, bold: identity };
|
|
2385
|
+
PromptCancelledError = class PromptCancelledError extends Error {
|
|
2386
|
+
constructor() {
|
|
2387
|
+
super("Prompt cancelled");
|
|
2388
|
+
this.name = "PromptCancelledError";
|
|
2389
|
+
}
|
|
2390
|
+
};
|
|
2391
|
+
_terminalPromptDeps = {
|
|
2392
|
+
stdin: undefined,
|
|
2393
|
+
write: (text) => process.stdout.write(text)
|
|
2394
|
+
};
|
|
2395
|
+
});
|
|
2396
|
+
|
|
2397
|
+
// ../nax-agent/src/terminal-auth/interaction.ts
|
|
2398
|
+
function createTerminalAuthInteraction(options) {
|
|
2399
|
+
const style = options.style ?? PLAIN_STYLE;
|
|
2400
|
+
const open = options.openUrl ?? openUrl;
|
|
2401
|
+
let pendingUrl;
|
|
2402
|
+
const manualCode = (message) => {
|
|
2403
|
+
const url = pendingUrl;
|
|
2404
|
+
if (url === undefined)
|
|
2405
|
+
return promptForLine(message, undefined, style);
|
|
2406
|
+
pendingUrl = undefined;
|
|
2407
|
+
options.log(style.dim("Press Enter to open it in your browser."));
|
|
2408
|
+
return promptForLine(message, () => {
|
|
2409
|
+
options.log(style.dim("Opening your browser..."));
|
|
2410
|
+
open(url);
|
|
2411
|
+
}, style);
|
|
2412
|
+
};
|
|
2413
|
+
return {
|
|
2414
|
+
prompt: async (prompt) => {
|
|
2415
|
+
if (prompt.type === "manual-code")
|
|
2416
|
+
return manualCode(prompt.message);
|
|
2417
|
+
if (prompt.type === "text")
|
|
2418
|
+
return promptForLine(prompt.message, undefined, style);
|
|
2419
|
+
if (prompt.type === "select") {
|
|
2420
|
+
return promptForSelect(prompt.message, prompt.options.map((option) => ({ id: option.id, label: option.label })), style);
|
|
2421
|
+
}
|
|
2422
|
+
return promptForSecret(prompt.message, style);
|
|
2423
|
+
},
|
|
2424
|
+
notify: (event) => {
|
|
2425
|
+
switch (event.type) {
|
|
2426
|
+
case "auth-url":
|
|
2427
|
+
options.log(`
|
|
2428
|
+
${style.bold("Open this URL to continue:")}
|
|
2429
|
+
${event.url}`);
|
|
2430
|
+
pendingUrl = event.url;
|
|
2431
|
+
return;
|
|
2432
|
+
case "device-code":
|
|
2433
|
+
options.log(`
|
|
2434
|
+
Go to ${event.verificationUri} and enter code ${style.bold(event.userCode)}`);
|
|
2435
|
+
return;
|
|
2436
|
+
case "info":
|
|
2437
|
+
options.log(event.message);
|
|
2438
|
+
for (const link of event.links ?? [])
|
|
2439
|
+
options.log(` ${link.label ?? "Link"}: ${link.url}`);
|
|
2440
|
+
return;
|
|
2441
|
+
case "progress":
|
|
2442
|
+
options.log(style.dim(event.message));
|
|
2443
|
+
return;
|
|
2444
|
+
default:
|
|
2445
|
+
}
|
|
2446
|
+
}
|
|
2447
|
+
};
|
|
2448
|
+
}
|
|
2449
|
+
var init_interaction = __esm(() => {
|
|
2450
|
+
init_open_url();
|
|
2451
|
+
init_prompt();
|
|
2452
|
+
});
|
|
2453
|
+
|
|
2454
|
+
// ../nax-agent/src/terminal-auth/index.ts
|
|
2455
|
+
var init_terminal_auth = __esm(() => {
|
|
2456
|
+
init_interaction();
|
|
2457
|
+
init_open_url();
|
|
2458
|
+
init_prompt();
|
|
2459
|
+
});
|
|
2460
|
+
|
|
2201
2461
|
// ../nax-agent/src/native/credentials/chained-store.ts
|
|
2202
2462
|
function createChainedCredentialStore(options) {
|
|
2203
2463
|
const served = new Map;
|
|
@@ -2348,37 +2608,37 @@ function classify2(previous, next) {
|
|
|
2348
2608
|
return "renewed";
|
|
2349
2609
|
return "changed";
|
|
2350
2610
|
}
|
|
2351
|
-
function identityData(providerId,
|
|
2611
|
+
function identityData(providerId, identity2) {
|
|
2352
2612
|
return {
|
|
2353
2613
|
providerId,
|
|
2354
|
-
kind:
|
|
2355
|
-
source:
|
|
2356
|
-
fingerprint:
|
|
2357
|
-
...
|
|
2614
|
+
kind: identity2.kind,
|
|
2615
|
+
source: identity2.source,
|
|
2616
|
+
fingerprint: identity2.fingerprint,
|
|
2617
|
+
...identity2.account !== undefined ? { account: identity2.account } : {}
|
|
2358
2618
|
};
|
|
2359
2619
|
}
|
|
2360
|
-
function replacementData(providerId,
|
|
2620
|
+
function replacementData(providerId, identity2, previous) {
|
|
2361
2621
|
return {
|
|
2362
|
-
...identityData(providerId,
|
|
2622
|
+
...identityData(providerId, identity2),
|
|
2363
2623
|
previousFingerprint: previous.fingerprint,
|
|
2364
2624
|
...previous.account !== undefined ? { previousAccount: previous.account } : {}
|
|
2365
2625
|
};
|
|
2366
2626
|
}
|
|
2367
|
-
function toStamp(
|
|
2627
|
+
function toStamp(identity2) {
|
|
2368
2628
|
return {
|
|
2369
|
-
fingerprint:
|
|
2370
|
-
source:
|
|
2371
|
-
...
|
|
2629
|
+
fingerprint: identity2.fingerprint,
|
|
2630
|
+
source: identity2.source,
|
|
2631
|
+
...identity2.account !== undefined ? { account: identity2.account } : {}
|
|
2372
2632
|
};
|
|
2373
2633
|
}
|
|
2374
2634
|
function createChangeGuard(inner, options) {
|
|
2375
2635
|
const identities = new Map;
|
|
2376
|
-
async function
|
|
2636
|
+
async function read2(providerId) {
|
|
2377
2637
|
const credential = await inner.read(providerId);
|
|
2378
2638
|
if (credential === undefined)
|
|
2379
2639
|
return;
|
|
2380
2640
|
const described = options.describe(providerId);
|
|
2381
|
-
const
|
|
2641
|
+
const identity2 = {
|
|
2382
2642
|
kind: credential.kind,
|
|
2383
2643
|
fingerprint: await fingerprintCredential(credential, options.salt),
|
|
2384
2644
|
source: described?.source ?? "file",
|
|
@@ -2386,39 +2646,39 @@ function createChangeGuard(inner, options) {
|
|
|
2386
2646
|
};
|
|
2387
2647
|
const previous = identities.get(providerId);
|
|
2388
2648
|
if (previous === undefined) {
|
|
2389
|
-
getSafeLogger()?.info("credentials", "credential.resolved", identityData(providerId,
|
|
2390
|
-
identities.set(providerId,
|
|
2649
|
+
getSafeLogger()?.info("credentials", "credential.resolved", identityData(providerId, identity2));
|
|
2650
|
+
identities.set(providerId, identity2);
|
|
2391
2651
|
return credential;
|
|
2392
2652
|
}
|
|
2393
|
-
const verdict = classify2(previous,
|
|
2653
|
+
const verdict = classify2(previous, identity2);
|
|
2394
2654
|
if (verdict === "renewed") {
|
|
2395
|
-
getSafeLogger()?.info("credentials", "credential.renewed", replacementData(providerId,
|
|
2655
|
+
getSafeLogger()?.info("credentials", "credential.renewed", replacementData(providerId, identity2, previous));
|
|
2396
2656
|
} else if (verdict === "changed") {
|
|
2397
2657
|
getSafeLogger()?.warn("credentials", "credential.changed", {
|
|
2398
|
-
...replacementData(providerId,
|
|
2658
|
+
...replacementData(providerId, identity2, previous),
|
|
2399
2659
|
onChange: options.onChange
|
|
2400
2660
|
});
|
|
2401
2661
|
if (options.onChange === "refuse") {
|
|
2402
|
-
throw new NaxError(`[credentials] Credential for ${providerId} changed from ${previous.fingerprint} to ${
|
|
2662
|
+
throw new NaxError(`[credentials] Credential for ${providerId} changed from ${previous.fingerprint} to ${identity2.fingerprint}`, "CREDENTIAL_CHANGED", {
|
|
2403
2663
|
stage: "credentials",
|
|
2404
2664
|
providerId,
|
|
2405
|
-
kind:
|
|
2406
|
-
source:
|
|
2407
|
-
fingerprint:
|
|
2665
|
+
kind: identity2.kind,
|
|
2666
|
+
source: identity2.source,
|
|
2667
|
+
fingerprint: identity2.fingerprint,
|
|
2408
2668
|
previousFingerprint: previous.fingerprint
|
|
2409
2669
|
});
|
|
2410
2670
|
}
|
|
2411
2671
|
}
|
|
2412
|
-
identities.set(providerId,
|
|
2672
|
+
identities.set(providerId, identity2);
|
|
2413
2673
|
return credential;
|
|
2414
2674
|
}
|
|
2415
2675
|
return {
|
|
2416
|
-
read,
|
|
2676
|
+
read: read2,
|
|
2417
2677
|
modify: (providerId, fn) => inner.modify(providerId, fn),
|
|
2418
2678
|
delete: (providerId) => inner.delete(providerId),
|
|
2419
2679
|
servedAuth: (providerId) => {
|
|
2420
|
-
const
|
|
2421
|
-
return
|
|
2680
|
+
const identity2 = identities.get(providerId);
|
|
2681
|
+
return identity2 === undefined ? undefined : toStamp(identity2);
|
|
2422
2682
|
}
|
|
2423
2683
|
};
|
|
2424
2684
|
}
|
|
@@ -2980,7 +3240,7 @@ function createExecCredentialSource(options) {
|
|
|
2980
3240
|
async function callHelper(providerId) {
|
|
2981
3241
|
return applyOutcome(providerId, outcomeOf(await runHelper(options.command, providerId, timeoutMs)));
|
|
2982
3242
|
}
|
|
2983
|
-
async function
|
|
3243
|
+
async function read2(providerId) {
|
|
2984
3244
|
if (declined.has(providerId))
|
|
2985
3245
|
return;
|
|
2986
3246
|
const lease = leases.get(providerId);
|
|
@@ -3002,7 +3262,7 @@ function createExecCredentialSource(options) {
|
|
|
3002
3262
|
return new NaxError(`[credentials] Cannot ${operation} the credential for ${providerId}: the exec helper owns it.`, "CREDENTIAL_MANAGED_BY_HELPER", { stage: "credentials", providerId, operation });
|
|
3003
3263
|
}
|
|
3004
3264
|
return {
|
|
3005
|
-
read,
|
|
3265
|
+
read: read2,
|
|
3006
3266
|
modify(providerId) {
|
|
3007
3267
|
throw managedByHelper(providerId, "modify");
|
|
3008
3268
|
},
|
|
@@ -3232,6 +3492,9 @@ async function importPiCredentials(options) {
|
|
|
3232
3492
|
async function listStoredProviders() {
|
|
3233
3493
|
return readStoredEntries();
|
|
3234
3494
|
}
|
|
3495
|
+
async function loginProviderIds() {
|
|
3496
|
+
return _authDeps.providerIds();
|
|
3497
|
+
}
|
|
3235
3498
|
async function removeStoredProvider(providerId) {
|
|
3236
3499
|
await naxCredentialStore().delete(providerId);
|
|
3237
3500
|
}
|
|
@@ -3704,8 +3967,8 @@ function createMemoryTranscriptStore() {
|
|
|
3704
3967
|
function transcriptModelIdentity(rawModel) {
|
|
3705
3968
|
return rawModel === undefined ? undefined : parseModelSpec(rawModel).model;
|
|
3706
3969
|
}
|
|
3707
|
-
function isForeignTranscript(doc,
|
|
3708
|
-
const { owner, model } =
|
|
3970
|
+
function isForeignTranscript(doc, identity2, sessionName) {
|
|
3971
|
+
const { owner, model } = identity2;
|
|
3709
3972
|
if (owner !== undefined && doc.owner !== owner) {
|
|
3710
3973
|
getLogger().debug("native-session", "Ignoring a transcript owned by another invocation", {
|
|
3711
3974
|
sessionName,
|
|
@@ -3714,7 +3977,7 @@ function isForeignTranscript(doc, identity, sessionName) {
|
|
|
3714
3977
|
});
|
|
3715
3978
|
return true;
|
|
3716
3979
|
}
|
|
3717
|
-
if (model !== undefined && doc.model !== undefined && doc.model !== model) {
|
|
3980
|
+
if (identity2.carryAcrossModels !== true && model !== undefined && doc.model !== undefined && doc.model !== model) {
|
|
3718
3981
|
getLogger().debug("native-session", "Ignoring a transcript written by another model", {
|
|
3719
3982
|
sessionName,
|
|
3720
3983
|
storedModel: doc.model,
|
|
@@ -3724,7 +3987,7 @@ function isForeignTranscript(doc, identity, sessionName) {
|
|
|
3724
3987
|
}
|
|
3725
3988
|
return false;
|
|
3726
3989
|
}
|
|
3727
|
-
function historyFromTranscript(doc,
|
|
3990
|
+
function historyFromTranscript(doc, identity2, sessionName) {
|
|
3728
3991
|
if (doc === null)
|
|
3729
3992
|
return [];
|
|
3730
3993
|
const version = doc.schemaVersion;
|
|
@@ -3734,14 +3997,14 @@ function historyFromTranscript(doc, identity, sessionName) {
|
|
|
3734
3997
|
if (!Array.isArray(doc.messages)) {
|
|
3735
3998
|
throw new NaxError(`transcript for session "${sessionName}" is unreadable: messages is not an array`, "TRANSCRIPT_CORRUPT", { stage: "native-session" });
|
|
3736
3999
|
}
|
|
3737
|
-
if (isForeignTranscript(doc,
|
|
4000
|
+
if (isForeignTranscript(doc, identity2, sessionName))
|
|
3738
4001
|
return [];
|
|
3739
4002
|
return doc.messages;
|
|
3740
4003
|
}
|
|
3741
|
-
function transcriptDocFor(messages,
|
|
4004
|
+
function transcriptDocFor(messages, identity2) {
|
|
3742
4005
|
return {
|
|
3743
|
-
...
|
|
3744
|
-
...
|
|
4006
|
+
...identity2.owner !== undefined ? { owner: identity2.owner } : {},
|
|
4007
|
+
...identity2.model !== undefined ? { model: identity2.model } : {},
|
|
3745
4008
|
savedAt: new Date().toISOString(),
|
|
3746
4009
|
messages: [...messages]
|
|
3747
4010
|
};
|
|
@@ -3818,11 +4081,11 @@ function createFileTranscriptStore(dir) {
|
|
|
3818
4081
|
}
|
|
3819
4082
|
};
|
|
3820
4083
|
}
|
|
3821
|
-
async function loadTranscript(dir, sessionName,
|
|
3822
|
-
return [...historyFromTranscript(await readTranscriptDoc(dir, sessionName),
|
|
4084
|
+
async function loadTranscript(dir, sessionName, identity2 = {}) {
|
|
4085
|
+
return [...historyFromTranscript(await readTranscriptDoc(dir, sessionName), identity2, sessionName)];
|
|
3823
4086
|
}
|
|
3824
|
-
async function saveTranscript(dir, sessionName, messages,
|
|
3825
|
-
await writeTranscriptDoc(dir, sessionName, transcriptDocFor(messages,
|
|
4087
|
+
async function saveTranscript(dir, sessionName, messages, identity2 = {}) {
|
|
4088
|
+
await writeTranscriptDoc(dir, sessionName, transcriptDocFor(messages, identity2));
|
|
3826
4089
|
}
|
|
3827
4090
|
async function retainTranscript(dir, sessionName) {
|
|
3828
4091
|
const stamp = new Date().toISOString().replace(/[:.]/g, "-");
|
|
@@ -4543,7 +4806,7 @@ async function openRepositoryInstructions(name, opts, store) {
|
|
|
4543
4806
|
if (doc === null || doc.schemaVersion !== undefined && doc.schemaVersion !== 1 || !Array.isArray(doc.messages))
|
|
4544
4807
|
return instructions;
|
|
4545
4808
|
const ownerMatches = opts.transcriptOwner === undefined || doc?.owner === opts.transcriptOwner;
|
|
4546
|
-
const modelMatches = doc?.model === undefined || doc.model === transcriptModelIdentity(opts.modelDef?.model);
|
|
4809
|
+
const modelMatches = opts.carryHistoryAcrossModels === true || doc?.model === undefined || doc.model === transcriptModelIdentity(opts.modelDef?.model);
|
|
4547
4810
|
if (ownerMatches && modelMatches) {
|
|
4548
4811
|
const directories = doc?.instructionDirectories;
|
|
4549
4812
|
if (Array.isArray(directories)) {
|
|
@@ -4596,6 +4859,7 @@ function createNativeSessionState() {
|
|
|
4596
4859
|
streamHooks: new Map,
|
|
4597
4860
|
failed: new Set,
|
|
4598
4861
|
transcriptOwners: new Map,
|
|
4862
|
+
carryHistoryAcrossModels: new Set,
|
|
4599
4863
|
compaction: new Map,
|
|
4600
4864
|
transportRetry: new Map,
|
|
4601
4865
|
spinBreakers: new Map,
|
|
@@ -4666,6 +4930,10 @@ async function openNativeSession(state, name, opts) {
|
|
|
4666
4930
|
state.transcriptOwners.set(name, opts.transcriptOwner);
|
|
4667
4931
|
else
|
|
4668
4932
|
state.transcriptOwners.delete(name);
|
|
4933
|
+
if (opts.carryHistoryAcrossModels === true)
|
|
4934
|
+
state.carryHistoryAcrossModels.add(name);
|
|
4935
|
+
else
|
|
4936
|
+
state.carryHistoryAcrossModels.delete(name);
|
|
4669
4937
|
recordSystemPrompt(state, name, opts.systemPrompt);
|
|
4670
4938
|
const instructions = await openRepositoryInstructions(name, opts, store);
|
|
4671
4939
|
state.repositoryInstructions.set(name, instructions);
|
|
@@ -4702,6 +4970,7 @@ function clearNativeSessionState(state, sessionName) {
|
|
|
4702
4970
|
state.timeouts.delete(sessionName);
|
|
4703
4971
|
state.scratchpadRoots.delete(sessionName);
|
|
4704
4972
|
state.transcriptOwners.delete(sessionName);
|
|
4973
|
+
state.carryHistoryAcrossModels.delete(sessionName);
|
|
4705
4974
|
state.streamHooks.delete(sessionName);
|
|
4706
4975
|
state.failed.delete(sessionName);
|
|
4707
4976
|
state.compaction.delete(sessionName);
|
|
@@ -5005,7 +5274,8 @@ function rewriteToolCallInput(messages, callId, input) {
|
|
|
5005
5274
|
role: "assistant",
|
|
5006
5275
|
content: lastAssistant.content,
|
|
5007
5276
|
toolCalls,
|
|
5008
|
-
...lastAssistant.thinking !== undefined ? { thinking: lastAssistant.thinking } : {}
|
|
5277
|
+
...lastAssistant.thinking !== undefined ? { thinking: lastAssistant.thinking } : {},
|
|
5278
|
+
...lastAssistant.origin !== undefined ? { origin: lastAssistant.origin } : {}
|
|
5009
5279
|
},
|
|
5010
5280
|
...messages.slice(lastAssistantIndex + 1)
|
|
5011
5281
|
];
|
|
@@ -24846,7 +25116,7 @@ function usageEvent(round, usage, costUsd) {
|
|
|
24846
25116
|
costUsd
|
|
24847
25117
|
};
|
|
24848
25118
|
}
|
|
24849
|
-
function
|
|
25119
|
+
function displayToolInput(input) {
|
|
24850
25120
|
const redacted = redactSecrets(capStrings(input, REDACTION_SCAN_BYTES));
|
|
24851
25121
|
let json2;
|
|
24852
25122
|
try {
|
|
@@ -24858,7 +25128,7 @@ function cappedInput(input) {
|
|
|
24858
25128
|
return redacted;
|
|
24859
25129
|
return { truncated: true, preview: cutToByteCap(json2, TOOL_CALL_INPUT_BYTES) };
|
|
24860
25130
|
}
|
|
24861
|
-
function
|
|
25131
|
+
function toolResultPreview(content) {
|
|
24862
25132
|
return cutToByteCap(redactSecrets(cutToByteCap(content, REDACTION_SCAN_BYTES)), TOOL_RESULT_PREVIEW_BYTES);
|
|
24863
25133
|
}
|
|
24864
25134
|
function createTurnEventEmitter(sink) {
|
|
@@ -24890,7 +25160,7 @@ function createTurnEventEmitter(sink) {
|
|
|
24890
25160
|
emit,
|
|
24891
25161
|
deltaSink: (round) => (delta) => emit({ ...delta, round }),
|
|
24892
25162
|
toolCall(call, recordedInput) {
|
|
24893
|
-
const input =
|
|
25163
|
+
const input = displayToolInput(recordedInput ?? call.input);
|
|
24894
25164
|
outstanding.set(call.id, (outstanding.get(call.id) ?? 0) + 1);
|
|
24895
25165
|
emit({ type: "tool_call", callId: call.id, name: call.name, input });
|
|
24896
25166
|
},
|
|
@@ -24906,7 +25176,7 @@ function createTurnEventEmitter(sink) {
|
|
|
24906
25176
|
type: "tool_result",
|
|
24907
25177
|
callId: result.toolCallId,
|
|
24908
25178
|
isError: result.isError === true,
|
|
24909
|
-
preview:
|
|
25179
|
+
preview: toolResultPreview(result.content)
|
|
24910
25180
|
});
|
|
24911
25181
|
},
|
|
24912
25182
|
flushUnanswered() {
|
|
@@ -25535,6 +25805,15 @@ async function maybeCompact(state, params) {
|
|
|
25535
25805
|
}
|
|
25536
25806
|
return { summarizeFailed: step.summarizeFailed };
|
|
25537
25807
|
}
|
|
25808
|
+
function originOf(raw) {
|
|
25809
|
+
if (raw === undefined)
|
|
25810
|
+
return;
|
|
25811
|
+
const spec = parseModelSpec(raw).model;
|
|
25812
|
+
const slash = spec.indexOf("/");
|
|
25813
|
+
if (slash <= 0 || slash === spec.length - 1)
|
|
25814
|
+
return;
|
|
25815
|
+
return { provider: spec.slice(0, slash), model: spec.slice(slash + 1) };
|
|
25816
|
+
}
|
|
25538
25817
|
async function runModelRoundTrip(state, params, summarizeFailed) {
|
|
25539
25818
|
const { handle, opts, deps, tools, loopEvents } = params;
|
|
25540
25819
|
const step = await completeWithRecovery({
|
|
@@ -25590,11 +25869,13 @@ async function runModelRoundTrip(state, params, summarizeFailed) {
|
|
|
25590
25869
|
state.output = assistantText;
|
|
25591
25870
|
const assistantToolCalls = afterResponse.toolCalls ?? res.toolCalls;
|
|
25592
25871
|
const assistantThinking = afterResponse.thinking ?? res.thinking;
|
|
25872
|
+
const origin = originOf(handle.modelDef?.model);
|
|
25593
25873
|
state.messages.push({
|
|
25594
25874
|
role: "assistant",
|
|
25595
25875
|
content: assistantText,
|
|
25596
25876
|
...assistantToolCalls !== undefined ? { toolCalls: assistantToolCalls } : {},
|
|
25597
|
-
...assistantThinking !== undefined ? { thinking: assistantThinking } : {}
|
|
25877
|
+
...assistantThinking !== undefined ? { thinking: assistantThinking } : {},
|
|
25878
|
+
...origin !== undefined ? { origin } : {}
|
|
25598
25879
|
});
|
|
25599
25880
|
if (assistantToolCalls === undefined || assistantToolCalls.length === 0) {
|
|
25600
25881
|
state.completedNormally = true;
|
|
@@ -25683,6 +25964,7 @@ var MAX_FOLLOW_UPS_PER_TURN = 3;
|
|
|
25683
25964
|
var init_turn_loop_round_trip = __esm(() => {
|
|
25684
25965
|
init_core();
|
|
25685
25966
|
init_infra();
|
|
25967
|
+
init_models();
|
|
25686
25968
|
init_turn_accumulator();
|
|
25687
25969
|
init_turn_compaction_step();
|
|
25688
25970
|
init_turn_complete_step();
|
|
@@ -25772,7 +26054,8 @@ async function runNativeTurn(handle, prompt, opts, deps) {
|
|
|
25772
26054
|
const { store } = transcript;
|
|
25773
26055
|
const transcriptIdentity = {
|
|
25774
26056
|
owner: deps.sessionState.transcriptOwners.get(handle.id),
|
|
25775
|
-
model: transcriptModelIdentity(handle.modelDef?.model)
|
|
26057
|
+
model: transcriptModelIdentity(handle.modelDef?.model),
|
|
26058
|
+
...deps.sessionState.carryHistoryAcrossModels.has(handle.id) ? { carryAcrossModels: true } : {}
|
|
25776
26059
|
};
|
|
25777
26060
|
let messages = [
|
|
25778
26061
|
...historyFromTranscript(await store.load(handle.id), transcriptIdentity, handle.id)
|
|
@@ -26409,7 +26692,8 @@ var init_native_backend_options = __esm(() => {
|
|
|
26409
26692
|
commandInterceptor: exports_external.custom(hasMethods2(["intercept"]), "must implement intercept").optional()
|
|
26410
26693
|
}).optional(),
|
|
26411
26694
|
bashApproval: exports_external.enum(["raw", "gated", "escalate"]).optional(),
|
|
26412
|
-
allowUnsandboxed: exports_external.boolean().optional()
|
|
26695
|
+
allowUnsandboxed: exports_external.boolean().optional(),
|
|
26696
|
+
carryHistoryAcrossModels: exports_external.boolean().optional()
|
|
26413
26697
|
});
|
|
26414
26698
|
});
|
|
26415
26699
|
|
|
@@ -26754,6 +27038,7 @@ var init_src = __esm(() => {
|
|
|
26754
27038
|
init_stderr_tail();
|
|
26755
27039
|
init_redact();
|
|
26756
27040
|
init_nax_error();
|
|
27041
|
+
init_terminal_auth();
|
|
26757
27042
|
init_native();
|
|
26758
27043
|
init_turn_event_emitter();
|
|
26759
27044
|
init_permissions();
|
|
@@ -29379,7 +29664,9 @@ __export(exports_internal, {
|
|
|
29379
29664
|
NATIVE_AGENT_NAME: () => NATIVE_AGENT_NAME,
|
|
29380
29665
|
NativeSessionUnsupportedError: () => NativeSessionUnsupportedError,
|
|
29381
29666
|
NaxError: () => NaxError,
|
|
29667
|
+
PLAIN_STYLE: () => PLAIN_STYLE,
|
|
29382
29668
|
PROVIDER_ID_RE: () => PROVIDER_ID_RE,
|
|
29669
|
+
PromptCancelledError: () => PromptCancelledError,
|
|
29383
29670
|
READ_CEILING: () => READ_CEILING,
|
|
29384
29671
|
RESERVED_TOOL_NAMES: () => RESERVED_TOOL_NAMES,
|
|
29385
29672
|
SANDBOX_GLOB_CHARS: () => SANDBOX_GLOB_CHARS,
|
|
@@ -29411,6 +29698,7 @@ __export(exports_internal, {
|
|
|
29411
29698
|
_grepDeps: () => _grepDeps,
|
|
29412
29699
|
_instructionAccessDeps: () => _instructionAccessDeps,
|
|
29413
29700
|
_launcherDeps: () => _launcherDeps,
|
|
29701
|
+
_openUrlDeps: () => _openUrlDeps,
|
|
29414
29702
|
_policyInputDeps: () => _policyInputDeps,
|
|
29415
29703
|
_probeDeps: () => _probeDeps,
|
|
29416
29704
|
_repositoryInstructionDeps: () => _repositoryInstructionDeps,
|
|
@@ -29428,6 +29716,7 @@ __export(exports_internal, {
|
|
|
29428
29716
|
_spillDeps: () => _spillDeps,
|
|
29429
29717
|
_srtBackendDeps: () => _srtBackendDeps,
|
|
29430
29718
|
_systemOneClientDeps: () => _systemOneClientDeps,
|
|
29719
|
+
_terminalPromptDeps: () => _terminalPromptDeps,
|
|
29431
29720
|
abortableSleep: () => abortableSleep,
|
|
29432
29721
|
adaptProviderTool: () => adaptProviderTool,
|
|
29433
29722
|
advertisedSchemaBytes: () => advertisedSchemaBytes,
|
|
@@ -29488,6 +29777,7 @@ __export(exports_internal, {
|
|
|
29488
29777
|
createRunCommandTool: () => createRunCommandTool,
|
|
29489
29778
|
createSpinBreaker: () => createSpinBreaker,
|
|
29490
29779
|
createSrtBackend: () => createSrtBackend,
|
|
29780
|
+
createTerminalAuthInteraction: () => createTerminalAuthInteraction,
|
|
29491
29781
|
createToolAuditSink: () => createToolAuditSink,
|
|
29492
29782
|
createTurnAccumulator: () => createTurnAccumulator,
|
|
29493
29783
|
credentialFaultCode: () => credentialFaultCode,
|
|
@@ -29553,6 +29843,7 @@ __export(exports_internal, {
|
|
|
29553
29843
|
listNaxEntries: () => listNaxEntries,
|
|
29554
29844
|
listStoredProviders: () => listStoredProviders,
|
|
29555
29845
|
loadTranscript: () => loadTranscript,
|
|
29846
|
+
loginProviderIds: () => loginProviderIds,
|
|
29556
29847
|
markNativeTurnOutcome: () => markNativeTurnOutcome,
|
|
29557
29848
|
maskForPrompt: () => maskForPrompt,
|
|
29558
29849
|
mcpRuleAdmits: () => mcpRuleAdmits,
|
|
@@ -29566,6 +29857,7 @@ __export(exports_internal, {
|
|
|
29566
29857
|
normalizeExec: () => normalizeExec,
|
|
29567
29858
|
normalizeManagerBinary: () => normalizeManagerBinary,
|
|
29568
29859
|
openNativeSession: () => openNativeSession,
|
|
29860
|
+
openUrl: () => openUrl,
|
|
29569
29861
|
parseGitlinks: () => parseGitlinks,
|
|
29570
29862
|
parseModelSpec: () => parseModelSpec,
|
|
29571
29863
|
parseNativeModel: () => parseNativeModel,
|
|
@@ -29578,6 +29870,9 @@ __export(exports_internal, {
|
|
|
29578
29870
|
prepareCompaction: () => prepareCompaction,
|
|
29579
29871
|
probeSandbox: () => probeSandbox,
|
|
29580
29872
|
probeSandboxOnce: () => probeSandboxOnce,
|
|
29873
|
+
promptForLine: () => promptForLine,
|
|
29874
|
+
promptForSecret: () => promptForSecret,
|
|
29875
|
+
promptForSelect: () => promptForSelect,
|
|
29581
29876
|
providerAttachesTo: () => providerAttachesTo,
|
|
29582
29877
|
providersWithoutCredentials: () => providersWithoutCredentials,
|
|
29583
29878
|
pruneRetainedTranscripts: () => pruneRetainedTranscripts,
|
|
@@ -29643,6 +29938,7 @@ __export(exports_internal, {
|
|
|
29643
29938
|
setAgentLogger: () => setAgentLogger,
|
|
29644
29939
|
shellQuoteArg: () => shellQuoteArg,
|
|
29645
29940
|
shouldCompact: () => shouldCompact,
|
|
29941
|
+
spawnDetached: () => spawnDetached,
|
|
29646
29942
|
spillRelativePath: () => spillRelativePath,
|
|
29647
29943
|
spinTerminalNotice: () => spinTerminalNotice,
|
|
29648
29944
|
strayCommonDirTripwire: () => strayCommonDirTripwire,
|
|
@@ -29741,6 +30037,7 @@ var init_internal = __esm(() => {
|
|
|
29741
30037
|
init_permissions();
|
|
29742
30038
|
init_sandbox();
|
|
29743
30039
|
init_agent_session_deps();
|
|
30040
|
+
init_terminal_auth();
|
|
29744
30041
|
init_credential_read_deny();
|
|
29745
30042
|
init_git();
|
|
29746
30043
|
init_git_commit();
|
|
@@ -30395,9 +30692,9 @@ ${c.gray(JSON.stringify(filtered, null, 2))}`;
|
|
|
30395
30692
|
}
|
|
30396
30693
|
function buildDefaultMeta(data, mode, level) {
|
|
30397
30694
|
const meta3 = [];
|
|
30398
|
-
const
|
|
30399
|
-
if (
|
|
30400
|
-
meta3.push(`${EMOJI.agent} ${
|
|
30695
|
+
const identity2 = [data.agentName, data.model].filter((v) => typeof v === "string" && v.length > 0);
|
|
30696
|
+
if (identity2.length > 0)
|
|
30697
|
+
meta3.push(`${EMOJI.agent} ${identity2.join("\xB7")}`);
|
|
30401
30698
|
if (typeof data.phaseIndex === "number" && typeof data.totalPhases === "number") {
|
|
30402
30699
|
meta3.push(`${data.phaseIndex}/${data.totalPhases}`);
|
|
30403
30700
|
}
|
|
@@ -36315,9 +36612,9 @@ function extractSpecStructure(specContent) {
|
|
|
36315
36612
|
const stories = [];
|
|
36316
36613
|
const warnings = [];
|
|
36317
36614
|
for (const declarations of collectStoryDeclarations(specContent)) {
|
|
36318
|
-
const
|
|
36319
|
-
stories.push(
|
|
36320
|
-
warnings.push(...
|
|
36615
|
+
const read2 = readDeclarations(declarations);
|
|
36616
|
+
stories.push(read2.story);
|
|
36617
|
+
warnings.push(...read2.warnings);
|
|
36321
36618
|
}
|
|
36322
36619
|
return { stories, warnings };
|
|
36323
36620
|
}
|
|
@@ -38554,7 +38851,7 @@ var package_default;
|
|
|
38554
38851
|
var init_package = __esm(() => {
|
|
38555
38852
|
package_default = {
|
|
38556
38853
|
name: "@nathapp/nax",
|
|
38557
|
-
version: "0.
|
|
38854
|
+
version: "0.84.0",
|
|
38558
38855
|
description: "AI Coding Agent Orchestrator \u2014 loops until done",
|
|
38559
38856
|
type: "module",
|
|
38560
38857
|
bin: {
|
|
@@ -38566,7 +38863,7 @@ var init_package = __esm(() => {
|
|
|
38566
38863
|
typecheck: "bun x tsc --noEmit && bun x tsc --noEmit -p tsconfig.test.json",
|
|
38567
38864
|
lint: "bun run lint:biome && bun run lint:checks",
|
|
38568
38865
|
"lint:biome": "bun scripts/quiet-run.ts bun x biome check --error-on-warnings --diagnostic-level=warn src/ bin/ test/ scripts/",
|
|
38569
|
-
"lint:checks": "bun run check:no-real-global-nax && bun run check:feature-dir-ssot && bun run check:alias-internals && bun run check:import-cycles && bun run check:nax-error && bun run check:logger-storyid && bun run check:log-format-layering && bun run check:file-sizes && bun run check:complexity && bun run check:no-control-bytes && bun run check:review-prompts && bun run check:nax-ai-imports && bun run check:sandbox-imports && bun run check:git-spawn-env && bun run check:bundle-externals && bun run check:op-tool-capability && bun run check:nax-artifacts-untracked && bun run check:story-workdir-access && bun run check:package-frame-derivation && bun run check:config-profile-threading && bun run check:dispatch-field-forwarding && bun run check:bash-dispatch-ask && bun run check:test-satellites && bun run check:
|
|
38866
|
+
"lint:checks": "bun run check:no-real-global-nax && bun run check:feature-dir-ssot && bun run check:alias-internals && bun run check:import-cycles && bun run check:nax-error && bun run check:logger-storyid && bun run check:log-format-layering && bun run check:file-sizes && bun run check:complexity && bun run check:no-control-bytes && bun run check:review-prompts && bun run check:nax-ai-imports && bun run check:sandbox-imports && bun run check:git-spawn-env && bun run check:bundle-externals && bun run check:op-tool-capability && bun run check:nax-artifacts-untracked && bun run check:story-workdir-access && bun run check:package-frame-derivation && bun run check:config-profile-threading && bun run check:dispatch-field-forwarding && bun run check:bash-dispatch-ask && bun run check:test-satellites && bun run check:lockstep && bun run check:package-boundaries && bun run check:usage-vocabulary",
|
|
38570
38867
|
"lint:json": "bun x biome check --error-on-warnings src/ bin/ test/ scripts/ --reporter json && bun run check:nax-error 1>&2 && bun run check:logger-storyid 1>&2",
|
|
38571
38868
|
"lint:fix": "bun x biome check --write src/ bin/ test/ scripts/",
|
|
38572
38869
|
"check:no-real-global-nax": "bun run ../repo-tooling/scripts/check-no-real-global-nax.ts",
|
|
@@ -38588,7 +38885,7 @@ var init_package = __esm(() => {
|
|
|
38588
38885
|
"check:no-control-bytes": "bun run ../repo-tooling/scripts/check-no-control-bytes.ts",
|
|
38589
38886
|
"check:review-prompts": "bun run scripts/check-review-prompts-generated.ts",
|
|
38590
38887
|
"check:nax-ai-imports": "bun run ../repo-tooling/scripts/check-nax-ai-imports.ts",
|
|
38591
|
-
"check:
|
|
38888
|
+
"check:lockstep": "bun run ../repo-tooling/scripts/check-lockstep.ts",
|
|
38592
38889
|
"check:sandbox-imports": "bun run ../repo-tooling/scripts/check-sandbox-imports.ts",
|
|
38593
38890
|
"check:git-spawn-env": "bun run ../repo-tooling/scripts/check-git-spawn-env.ts",
|
|
38594
38891
|
"check:bundle-externals": "bun run scripts/check-bundle-externals.ts",
|
|
@@ -38602,7 +38899,6 @@ var init_package = __esm(() => {
|
|
|
38602
38899
|
"check:bash-dispatch-ask": "bun run scripts/check-bash-dispatch-ask.ts",
|
|
38603
38900
|
"check:rules-drift": "bun scripts/quiet-run.ts bun run scripts/check-rules-drift.ts",
|
|
38604
38901
|
"gen:review-prompts": "bun run scripts/generate-review-prompts.ts",
|
|
38605
|
-
release: "bun scripts/release.ts",
|
|
38606
38902
|
test: "AGENT=1 bun run scripts/run-tests.ts",
|
|
38607
38903
|
"test:verbose": "bun run scripts/run-tests.ts",
|
|
38608
38904
|
"test:bail": "AGENT=1 bun run scripts/run-tests.ts --bail",
|
|
@@ -38642,7 +38938,7 @@ var init_package = __esm(() => {
|
|
|
38642
38938
|
"@agentclientprotocol/sdk": "~1.7.0",
|
|
38643
38939
|
"@anthropic-ai/sandbox-runtime": "0.0.77",
|
|
38644
38940
|
"@modelcontextprotocol/sdk": "^1.30.0",
|
|
38645
|
-
"@nathapp/nax-ai": "0.
|
|
38941
|
+
"@nathapp/nax-ai": "0.84.0",
|
|
38646
38942
|
chalk: "^5.6.2",
|
|
38647
38943
|
commander: "^13.1.0",
|
|
38648
38944
|
ink: "^6.7.0",
|
|
@@ -38872,9 +39168,9 @@ function cancellableDelay(ms, signal) {
|
|
|
38872
39168
|
signal?.addEventListener("abort", onAbort, { once: true });
|
|
38873
39169
|
});
|
|
38874
39170
|
}
|
|
38875
|
-
var
|
|
39171
|
+
var spawn2;
|
|
38876
39172
|
var init_bun_deps = __esm(() => {
|
|
38877
|
-
|
|
39173
|
+
spawn2 = Bun.spawn;
|
|
38878
39174
|
});
|
|
38879
39175
|
|
|
38880
39176
|
// src/agents/retry/failure-policy.ts
|
|
@@ -42479,7 +42775,7 @@ var init_nax_owned_paths = __esm(() => {
|
|
|
42479
42775
|
});
|
|
42480
42776
|
|
|
42481
42777
|
// src/review/diff-utils.ts
|
|
42482
|
-
var {spawn:
|
|
42778
|
+
var {spawn: spawn3 } = globalThis.Bun;
|
|
42483
42779
|
async function resolveNaxIgnorePathspecExcludes(workdir, options) {
|
|
42484
42780
|
if (options?.naxIgnoreIndex)
|
|
42485
42781
|
return options.naxIgnoreIndex.toPathspecExcludes(options.packageDir);
|
|
@@ -42632,7 +42928,7 @@ var init_diff_utils = __esm(() => {
|
|
|
42632
42928
|
init_path_filters();
|
|
42633
42929
|
ALWAYS_EXCLUDED = [...NAX_OWNED_REVIEW_EXCLUDE_PATHSPECS];
|
|
42634
42930
|
_diffUtilsDeps = {
|
|
42635
|
-
spawn:
|
|
42931
|
+
spawn: spawn3,
|
|
42636
42932
|
isGitRefValid,
|
|
42637
42933
|
getMergeBase,
|
|
42638
42934
|
timeoutMs: GIT_TIMEOUT_MS
|
|
@@ -56645,7 +56941,7 @@ function stripCarriageReturn(line) {
|
|
|
56645
56941
|
return line.endsWith("\r") ? line.slice(0, -1) : line;
|
|
56646
56942
|
}
|
|
56647
56943
|
var CONSEQUENCE = "? nax will run this project's plugins, hooks, MCP servers and test commands.", _trustPromptDeps;
|
|
56648
|
-
var
|
|
56944
|
+
var init_prompt2 = __esm(() => {
|
|
56649
56945
|
_trustPromptDeps = {
|
|
56650
56946
|
ask: async (question) => {
|
|
56651
56947
|
process.stderr.write(question);
|
|
@@ -56750,11 +57046,11 @@ async function removeFromStore(storePath, normalized) {
|
|
|
56750
57046
|
return { outcome: "removed", entry };
|
|
56751
57047
|
}
|
|
56752
57048
|
async function readFoldersForWrite(storePath) {
|
|
56753
|
-
const
|
|
56754
|
-
if (
|
|
56755
|
-
throw trustStoreUnreadableError(storePath,
|
|
57049
|
+
const read2 = await readTrustStore();
|
|
57050
|
+
if (read2.state === "unparseable") {
|
|
57051
|
+
throw trustStoreUnreadableError(storePath, read2.reason);
|
|
56756
57052
|
}
|
|
56757
|
-
return
|
|
57053
|
+
return read2.state === "ok" ? read2.file.folders : [];
|
|
56758
57054
|
}
|
|
56759
57055
|
async function writeTrustStore(storePath, file2) {
|
|
56760
57056
|
const tempPath = `${storePath}.${process.pid}.${randomUUID13()}.tmp`;
|
|
@@ -56833,7 +57129,7 @@ var _trustGateDeps;
|
|
|
56833
57129
|
var init_gate = __esm(() => {
|
|
56834
57130
|
init_errors4();
|
|
56835
57131
|
init_match();
|
|
56836
|
-
|
|
57132
|
+
init_prompt2();
|
|
56837
57133
|
init_registry4();
|
|
56838
57134
|
init_store2();
|
|
56839
57135
|
_trustGateDeps = {
|
|
@@ -56846,7 +57142,7 @@ var init_gate = __esm(() => {
|
|
|
56846
57142
|
var init_trust = __esm(() => {
|
|
56847
57143
|
init_gate();
|
|
56848
57144
|
init_match();
|
|
56849
|
-
|
|
57145
|
+
init_prompt2();
|
|
56850
57146
|
init_registry4();
|
|
56851
57147
|
init_store2();
|
|
56852
57148
|
});
|
|
@@ -57057,8 +57353,8 @@ var init_version = __esm(() => {
|
|
|
57057
57353
|
NAX_AI_VERSION = CATALOG_VERSION;
|
|
57058
57354
|
NAX_COMMIT = (() => {
|
|
57059
57355
|
try {
|
|
57060
|
-
if (/^[0-9a-f]{6,10}$/.test("
|
|
57061
|
-
return "
|
|
57356
|
+
if (/^[0-9a-f]{6,10}$/.test("eeb09eb"))
|
|
57357
|
+
return "eeb09eb";
|
|
57062
57358
|
} catch {}
|
|
57063
57359
|
try {
|
|
57064
57360
|
const result = Bun.spawnSync(["git", "rev-parse", "--short", "HEAD"], {
|
|
@@ -58265,9 +58561,9 @@ async function readProjectIdentity(projectKey) {
|
|
|
58265
58561
|
return null;
|
|
58266
58562
|
}
|
|
58267
58563
|
}
|
|
58268
|
-
async function writeProjectIdentity(projectKey,
|
|
58564
|
+
async function writeProjectIdentity(projectKey, identity2) {
|
|
58269
58565
|
const p = identityPath(projectKey);
|
|
58270
|
-
await Bun.write(p, JSON.stringify(
|
|
58566
|
+
await Bun.write(p, JSON.stringify(identity2, null, 2));
|
|
58271
58567
|
}
|
|
58272
58568
|
async function claimProjectIdentity(projectKey, workdir, remoteUrl) {
|
|
58273
58569
|
const existing2 = await readProjectIdentity(projectKey);
|
|
@@ -68835,7 +69131,7 @@ var require_cross_spawn = __commonJS(function(exports, module) {
|
|
|
68835
69131
|
var cp = __require("child_process");
|
|
68836
69132
|
var parse6 = require_parse();
|
|
68837
69133
|
var enoent = require_enoent();
|
|
68838
|
-
function
|
|
69134
|
+
function spawn4(command, args, options) {
|
|
68839
69135
|
const parsed = parse6(command, args, options);
|
|
68840
69136
|
const spawned = cp.spawn(parsed.command, parsed.args, parsed.options);
|
|
68841
69137
|
enoent.hookChildProcess(spawned, parsed);
|
|
@@ -68847,8 +69143,8 @@ var require_cross_spawn = __commonJS(function(exports, module) {
|
|
|
68847
69143
|
result.error = result.error || enoent.verifyENOENTSync(result.status, parsed);
|
|
68848
69144
|
return result;
|
|
68849
69145
|
}
|
|
68850
|
-
module.exports =
|
|
68851
|
-
module.exports.spawn =
|
|
69146
|
+
module.exports = spawn4;
|
|
69147
|
+
module.exports.spawn = spawn4;
|
|
68852
69148
|
module.exports.sync = spawnSync;
|
|
68853
69149
|
module.exports._parse = parse6;
|
|
68854
69150
|
module.exports._enoent = enoent;
|
|
@@ -69349,9 +69645,9 @@ function createMcpProviders(args) {
|
|
|
69349
69645
|
return [];
|
|
69350
69646
|
for (const [id] of servers)
|
|
69351
69647
|
validateProviderId(id);
|
|
69352
|
-
const
|
|
69648
|
+
const read2 = args.readLock ?? readMcpLock;
|
|
69353
69649
|
let lockPromise;
|
|
69354
|
-
const lock = () => lockPromise ??=
|
|
69650
|
+
const lock = () => lockPromise ??= read2(args.projectRoot);
|
|
69355
69651
|
return servers.map(([serverId, server]) => {
|
|
69356
69652
|
return {
|
|
69357
69653
|
id: serverId,
|
|
@@ -69597,7 +69893,7 @@ var init_executor = __esm(() => {
|
|
|
69597
69893
|
init_bun_deps();
|
|
69598
69894
|
init_trust();
|
|
69599
69895
|
init_internal();
|
|
69600
|
-
_executorDeps = { spawn };
|
|
69896
|
+
_executorDeps = { spawn: spawn2 };
|
|
69601
69897
|
DRAIN_TIMEOUT3 = Symbol("drain-timeout");
|
|
69602
69898
|
DEFAULT_STRIP_ENV_VARS = [];
|
|
69603
69899
|
});
|
|
@@ -70663,7 +70959,7 @@ ${r.output}`).join(""),
|
|
|
70663
70959
|
}
|
|
70664
70960
|
|
|
70665
70961
|
// src/quality/runner.ts
|
|
70666
|
-
var {spawn:
|
|
70962
|
+
var {spawn: spawn5 } = globalThis.Bun;
|
|
70667
70963
|
function createDrainDeadline(deadlineMs) {
|
|
70668
70964
|
let timeoutId;
|
|
70669
70965
|
const promise3 = new Promise((resolve31) => {
|
|
@@ -70837,7 +71133,7 @@ var init_runner = __esm(() => {
|
|
|
70837
71133
|
init_trust();
|
|
70838
71134
|
init_executor();
|
|
70839
71135
|
_qualityRunnerDeps = {
|
|
70840
|
-
spawn:
|
|
71136
|
+
spawn: spawn5
|
|
70841
71137
|
};
|
|
70842
71138
|
});
|
|
70843
71139
|
|
|
@@ -77645,7 +77941,7 @@ ${detail}`,
|
|
|
77645
77941
|
`);
|
|
77646
77942
|
}
|
|
77647
77943
|
var CLASSIFIER;
|
|
77648
|
-
var
|
|
77944
|
+
var init_prompt3 = __esm(() => {
|
|
77649
77945
|
CLASSIFIER = [
|
|
77650
77946
|
"Mark a finding for human judgment \u2014 and only such a finding \u2014 by adding a",
|
|
77651
77947
|
"`Judgment: yes \u2014 <why>` line to its block. Use it when the finding is a spec",
|
|
@@ -77660,7 +77956,7 @@ var init_prompt2 = __esm(() => {
|
|
|
77660
77956
|
var init_review = __esm(() => {
|
|
77661
77957
|
init_audit_gaps();
|
|
77662
77958
|
init_parse6();
|
|
77663
|
-
|
|
77959
|
+
init_prompt3();
|
|
77664
77960
|
});
|
|
77665
77961
|
|
|
77666
77962
|
// src/operations/finish-fix.ts
|
|
@@ -78351,7 +78647,7 @@ var init_new_package_setup = __esm(() => {
|
|
|
78351
78647
|
init_trust();
|
|
78352
78648
|
init_command_argv();
|
|
78353
78649
|
registry4 = new WeakMap;
|
|
78354
|
-
_newPackageSetupDeps = { spawn };
|
|
78650
|
+
_newPackageSetupDeps = { spawn: spawn2 };
|
|
78355
78651
|
});
|
|
78356
78652
|
|
|
78357
78653
|
// src/operations/gate-cwd.ts
|
|
@@ -78792,7 +79088,7 @@ var init_isolation2 = __esm(() => {
|
|
|
78792
79088
|
init_errors4();
|
|
78793
79089
|
init_logger2();
|
|
78794
79090
|
init_test_runners();
|
|
78795
|
-
_isolationDeps = { spawn, timeoutMs: GIT_TIMEOUT_MS3 };
|
|
79091
|
+
_isolationDeps = { spawn: spawn2, timeoutMs: GIT_TIMEOUT_MS3 };
|
|
78796
79092
|
SRC_PATTERNS = [/^src\//, /^lib\//, /^packages\//];
|
|
78797
79093
|
});
|
|
78798
79094
|
|
|
@@ -88013,7 +88309,7 @@ function contentText(content) {
|
|
|
88013
88309
|
return content.map(contentPart).filter((part) => part !== "").join(`
|
|
88014
88310
|
`);
|
|
88015
88311
|
}
|
|
88016
|
-
function
|
|
88312
|
+
function previewOf(call2, secrets) {
|
|
88017
88313
|
const fromContent = contentText(call2.content);
|
|
88018
88314
|
let raw = fromContent;
|
|
88019
88315
|
if (raw === "" && typeof call2.rawOutput === "string")
|
|
@@ -88088,7 +88384,7 @@ function createToolEvents(emit, secrets, now = Date.now) {
|
|
|
88088
88384
|
running.add(state.id);
|
|
88089
88385
|
const shown2 = announce(state);
|
|
88090
88386
|
if (status !== "in_progress")
|
|
88091
|
-
resolve35(shown2, status === "failed",
|
|
88387
|
+
resolve35(shown2, status === "failed", previewOf(shown2, secrets), resultBytesOf(shown2));
|
|
88092
88388
|
},
|
|
88093
88389
|
announce(toolCall) {
|
|
88094
88390
|
const state = merge2(toolCall);
|
|
@@ -88503,7 +88799,7 @@ function race(promise3, opts) {
|
|
|
88503
88799
|
}
|
|
88504
88800
|
|
|
88505
88801
|
// ../nax-agent-acp/src/client/launch.ts
|
|
88506
|
-
import { spawn as
|
|
88802
|
+
import { spawn as spawn6 } from "child_process";
|
|
88507
88803
|
import { accessSync as accessSync3, constants as constants3, statSync as statSync8 } from "fs";
|
|
88508
88804
|
import { delimiter as delimiter2, isAbsolute as isAbsolute25, join as join73 } from "path";
|
|
88509
88805
|
import { Readable as Readable2, Writable } from "stream";
|
|
@@ -88548,7 +88844,7 @@ function failedLaunch(stderr, error48) {
|
|
|
88548
88844
|
}
|
|
88549
88845
|
function trySpawn(request) {
|
|
88550
88846
|
try {
|
|
88551
|
-
return
|
|
88847
|
+
return spawn6(request.command, [...request.args], {
|
|
88552
88848
|
cwd: request.cwd,
|
|
88553
88849
|
env: { ...request.env },
|
|
88554
88850
|
stdio: "pipe",
|
|
@@ -92413,7 +92709,7 @@ var init_turn_interactions = __esm(() => {
|
|
|
92413
92709
|
});
|
|
92414
92710
|
|
|
92415
92711
|
// src/agents/interaction/index.ts
|
|
92416
|
-
var
|
|
92712
|
+
var init_interaction2 = __esm(() => {
|
|
92417
92713
|
init_output_parsing();
|
|
92418
92714
|
init_turn_interactions();
|
|
92419
92715
|
});
|
|
@@ -92470,7 +92766,7 @@ function createAskPort(slot, beatMs = AWAITING_HUMAN_BEAT_MS, audit) {
|
|
|
92470
92766
|
var STAGE = "acp", AWAITING_HUMAN_BEAT_MS = 30000;
|
|
92471
92767
|
var init_ask_port = __esm(() => {
|
|
92472
92768
|
init_logger2();
|
|
92473
|
-
|
|
92769
|
+
init_interaction2();
|
|
92474
92770
|
});
|
|
92475
92771
|
|
|
92476
92772
|
// src/agents/acp/profile-map.ts
|
|
@@ -93208,7 +93504,7 @@ var init_turn_loop2 = __esm(() => {
|
|
|
93208
93504
|
init_src();
|
|
93209
93505
|
init_errors4();
|
|
93210
93506
|
init_logger2();
|
|
93211
|
-
|
|
93507
|
+
init_interaction2();
|
|
93212
93508
|
init_turn();
|
|
93213
93509
|
init_failure_map();
|
|
93214
93510
|
init_pricing();
|
|
@@ -94359,17 +94655,17 @@ function formatEntryBlock(entry2) {
|
|
|
94359
94655
|
const commandLines = lines2.map((line, index) => index === 0 ? `${ENTRY_INDENT}$ ${line}` : `${COMMAND_CONTINUATION_INDENT}${line}`);
|
|
94360
94656
|
return [header, rootLine, ...commandLines];
|
|
94361
94657
|
}
|
|
94362
|
-
function toListJson(path10,
|
|
94363
|
-
const taint =
|
|
94364
|
-
const entries =
|
|
94658
|
+
function toListJson(path10, read2) {
|
|
94659
|
+
const taint = read2.file.taint === undefined ? null : read2.file.taint;
|
|
94660
|
+
const entries = read2.file.entries.map((entry2) => ({
|
|
94365
94661
|
...entry2,
|
|
94366
94662
|
id: approvalId(entry2)
|
|
94367
94663
|
}));
|
|
94368
94664
|
return {
|
|
94369
94665
|
path: path10,
|
|
94370
|
-
state:
|
|
94666
|
+
state: read2.state,
|
|
94371
94667
|
taint,
|
|
94372
|
-
droppedMalformed:
|
|
94668
|
+
droppedMalformed: read2.droppedMalformed,
|
|
94373
94669
|
entries
|
|
94374
94670
|
};
|
|
94375
94671
|
}
|
|
@@ -94413,12 +94709,12 @@ async function promptForConfirmation(question) {
|
|
|
94413
94709
|
resolve36(answer);
|
|
94414
94710
|
};
|
|
94415
94711
|
const onData = (char) => {
|
|
94416
|
-
if (char ===
|
|
94712
|
+
if (char === ETX2) {
|
|
94417
94713
|
finish(false);
|
|
94418
94714
|
_confirmDeps.exit(SIGINT_EXIT_CODE);
|
|
94419
94715
|
return;
|
|
94420
94716
|
}
|
|
94421
|
-
if (char ===
|
|
94717
|
+
if (char === EOT2) {
|
|
94422
94718
|
finish(false);
|
|
94423
94719
|
return;
|
|
94424
94720
|
}
|
|
@@ -94430,7 +94726,7 @@ async function promptForConfirmation(question) {
|
|
|
94430
94726
|
stdin.once("error", onClosed);
|
|
94431
94727
|
});
|
|
94432
94728
|
}
|
|
94433
|
-
var
|
|
94729
|
+
var ETX2 = "\x03", EOT2 = "\x04", SIGINT_EXIT_CODE = 130, _confirmDeps;
|
|
94434
94730
|
var init_confirm = __esm(() => {
|
|
94435
94731
|
init_source();
|
|
94436
94732
|
_confirmDeps = {
|
|
@@ -94451,26 +94747,26 @@ async function resolveApprovalsFile(workdir) {
|
|
|
94451
94747
|
async function approvalsListCommand(opts, deps = _approvalsCliDeps) {
|
|
94452
94748
|
try {
|
|
94453
94749
|
const path10 = await resolveApprovalsFile(opts.workdir);
|
|
94454
|
-
const
|
|
94750
|
+
const read2 = await deps.readApprovalsFileDetailed(path10);
|
|
94455
94751
|
if (opts.json) {
|
|
94456
|
-
deps.log(JSON.stringify(toListJson(path10,
|
|
94457
|
-
if (
|
|
94752
|
+
deps.log(JSON.stringify(toListJson(path10, read2)));
|
|
94753
|
+
if (read2.state === "unparseable")
|
|
94458
94754
|
deps.logErr(PARSE_WARNING);
|
|
94459
94755
|
return 0;
|
|
94460
94756
|
}
|
|
94461
|
-
if (
|
|
94757
|
+
if (read2.state === "missing") {
|
|
94462
94758
|
deps.log(missingNotice(path10));
|
|
94463
94759
|
return 0;
|
|
94464
94760
|
}
|
|
94465
|
-
if (
|
|
94761
|
+
if (read2.state === "unparseable") {
|
|
94466
94762
|
deps.logErr(PARSE_WARNING);
|
|
94467
94763
|
deps.log(missingNotice(path10));
|
|
94468
94764
|
return 0;
|
|
94469
94765
|
}
|
|
94470
|
-
const entries =
|
|
94471
|
-
const taint =
|
|
94472
|
-
if (
|
|
94473
|
-
deps.logErr(malformedEntriesWarning(
|
|
94766
|
+
const entries = read2.file.entries;
|
|
94767
|
+
const taint = read2.file.taint;
|
|
94768
|
+
if (read2.droppedMalformed > 0)
|
|
94769
|
+
deps.logErr(malformedEntriesWarning(read2.droppedMalformed));
|
|
94474
94770
|
deps.log(`Approvals store: ${path10}`);
|
|
94475
94771
|
deps.log(formatTrustLine(taint, deps.isProcessAlive));
|
|
94476
94772
|
deps.log(`${entries.length} remembered approvals`);
|
|
@@ -94492,12 +94788,12 @@ async function runPrecheck(opts, deps) {
|
|
|
94492
94788
|
try {
|
|
94493
94789
|
const path10 = await resolveApprovalsFile(opts.workdir);
|
|
94494
94790
|
if (opts.all) {
|
|
94495
|
-
const
|
|
94496
|
-
if (
|
|
94791
|
+
const read2 = await deps.readApprovalsFileDetailed(path10);
|
|
94792
|
+
if (read2.state === "missing" || read2.state === "ok" && read2.file.entries.length === 0) {
|
|
94497
94793
|
deps.log(missingNotice(path10));
|
|
94498
94794
|
return { kind: "empty", path: path10 };
|
|
94499
94795
|
}
|
|
94500
|
-
if (
|
|
94796
|
+
if (read2.state === "unparseable") {
|
|
94501
94797
|
deps.logErr("approvals.json could not be parsed; not rewriting it");
|
|
94502
94798
|
return { kind: "unparseable", path: path10 };
|
|
94503
94799
|
}
|
|
@@ -94792,227 +95088,9 @@ var init_auth_list = __esm(() => {
|
|
|
94792
95088
|
init_config();
|
|
94793
95089
|
});
|
|
94794
95090
|
|
|
94795
|
-
// src/cli/auth-prompt.ts
|
|
94796
|
-
function read(message, echo, onEmptySubmit) {
|
|
94797
|
-
const { stdin } = _authPromptDeps;
|
|
94798
|
-
if (stdin.isTTY !== true)
|
|
94799
|
-
return Promise.reject(new PromptCancelledError);
|
|
94800
|
-
_authPromptDeps.write(`${source_default.cyan("?")} ${message} `);
|
|
94801
|
-
return new Promise((resolve36, reject) => {
|
|
94802
|
-
let buffer = "";
|
|
94803
|
-
let settled2 = false;
|
|
94804
|
-
const cleanup = () => {
|
|
94805
|
-
if (settled2)
|
|
94806
|
-
return;
|
|
94807
|
-
settled2 = true;
|
|
94808
|
-
stdin.removeListener("data", onData);
|
|
94809
|
-
stdin.removeListener("end", onEnd);
|
|
94810
|
-
stdin.removeListener("error", onEnd);
|
|
94811
|
-
stdin.setRawMode(false);
|
|
94812
|
-
stdin.pause();
|
|
94813
|
-
_authPromptDeps.write(`
|
|
94814
|
-
`);
|
|
94815
|
-
};
|
|
94816
|
-
const onEnd = () => {
|
|
94817
|
-
cleanup();
|
|
94818
|
-
reject(new PromptCancelledError);
|
|
94819
|
-
};
|
|
94820
|
-
const onData = (chunk) => {
|
|
94821
|
-
for (const char of chunk) {
|
|
94822
|
-
if (char === ETX2 || char === EOT2) {
|
|
94823
|
-
cleanup();
|
|
94824
|
-
reject(new PromptCancelledError);
|
|
94825
|
-
return;
|
|
94826
|
-
}
|
|
94827
|
-
if (char === CR || char === LF) {
|
|
94828
|
-
if (buffer.length === 0 && onEmptySubmit !== undefined) {
|
|
94829
|
-
onEmptySubmit();
|
|
94830
|
-
continue;
|
|
94831
|
-
}
|
|
94832
|
-
cleanup();
|
|
94833
|
-
resolve36(buffer);
|
|
94834
|
-
return;
|
|
94835
|
-
}
|
|
94836
|
-
if (char === BACKSPACE) {
|
|
94837
|
-
buffer = buffer.slice(0, -1);
|
|
94838
|
-
if (echo)
|
|
94839
|
-
_authPromptDeps.write("\b \b");
|
|
94840
|
-
continue;
|
|
94841
|
-
}
|
|
94842
|
-
buffer += char;
|
|
94843
|
-
if (echo)
|
|
94844
|
-
_authPromptDeps.write(char);
|
|
94845
|
-
}
|
|
94846
|
-
};
|
|
94847
|
-
stdin.setRawMode(true);
|
|
94848
|
-
stdin.resume();
|
|
94849
|
-
stdin.setEncoding("utf8");
|
|
94850
|
-
stdin.on("data", onData);
|
|
94851
|
-
stdin.once("end", onEnd);
|
|
94852
|
-
stdin.once("error", onEnd);
|
|
94853
|
-
});
|
|
94854
|
-
}
|
|
94855
|
-
function promptForSecret(message) {
|
|
94856
|
-
return read(message, false);
|
|
94857
|
-
}
|
|
94858
|
-
function promptForLine(message, onEmptySubmit) {
|
|
94859
|
-
return read(message, true, onEmptySubmit);
|
|
94860
|
-
}
|
|
94861
|
-
function promptForSelect(message, choices) {
|
|
94862
|
-
const { stdin } = _authPromptDeps;
|
|
94863
|
-
if (stdin.isTTY !== true)
|
|
94864
|
-
return Promise.reject(new PromptCancelledError);
|
|
94865
|
-
if (choices.length === 0)
|
|
94866
|
-
return Promise.reject(new PromptCancelledError);
|
|
94867
|
-
_authPromptDeps.write(`${source_default.cyan("?")} ${message}
|
|
94868
|
-
`);
|
|
94869
|
-
return new Promise((resolve36, reject) => {
|
|
94870
|
-
let index = 0;
|
|
94871
|
-
let settled2 = false;
|
|
94872
|
-
let drawn = false;
|
|
94873
|
-
const render3 = () => {
|
|
94874
|
-
if (drawn)
|
|
94875
|
-
_authPromptDeps.write(`\x1B[${choices.length}A`);
|
|
94876
|
-
drawn = true;
|
|
94877
|
-
for (const [i, choice] of choices.entries()) {
|
|
94878
|
-
const active = i === index;
|
|
94879
|
-
const marker = active ? source_default.cyan(">") : " ";
|
|
94880
|
-
const label2 = active ? source_default.cyan(choice.label) : choice.label;
|
|
94881
|
-
_authPromptDeps.write(`\r\x1B[2K${marker} ${label2}
|
|
94882
|
-
`);
|
|
94883
|
-
}
|
|
94884
|
-
};
|
|
94885
|
-
const cleanup = () => {
|
|
94886
|
-
if (settled2)
|
|
94887
|
-
return;
|
|
94888
|
-
settled2 = true;
|
|
94889
|
-
stdin.removeListener("data", onData);
|
|
94890
|
-
stdin.removeListener("end", onEnd);
|
|
94891
|
-
stdin.removeListener("error", onEnd);
|
|
94892
|
-
stdin.setRawMode(false);
|
|
94893
|
-
stdin.pause();
|
|
94894
|
-
};
|
|
94895
|
-
const onEnd = () => {
|
|
94896
|
-
cleanup();
|
|
94897
|
-
reject(new PromptCancelledError);
|
|
94898
|
-
};
|
|
94899
|
-
const onData = (chunk) => {
|
|
94900
|
-
if (chunk.includes(ETX2) || chunk.includes(EOT2)) {
|
|
94901
|
-
cleanup();
|
|
94902
|
-
reject(new PromptCancelledError);
|
|
94903
|
-
return;
|
|
94904
|
-
}
|
|
94905
|
-
if (chunk.includes(ARROW_UP)) {
|
|
94906
|
-
index = (index - 1 + choices.length) % choices.length;
|
|
94907
|
-
render3();
|
|
94908
|
-
return;
|
|
94909
|
-
}
|
|
94910
|
-
if (chunk.includes(ARROW_DOWN)) {
|
|
94911
|
-
index = (index + 1) % choices.length;
|
|
94912
|
-
render3();
|
|
94913
|
-
return;
|
|
94914
|
-
}
|
|
94915
|
-
if (chunk.includes(CR) || chunk.includes(LF)) {
|
|
94916
|
-
const chosen = choices[index];
|
|
94917
|
-
cleanup();
|
|
94918
|
-
resolve36(chosen.id);
|
|
94919
|
-
}
|
|
94920
|
-
};
|
|
94921
|
-
stdin.setRawMode(true);
|
|
94922
|
-
stdin.resume();
|
|
94923
|
-
stdin.setEncoding("utf8");
|
|
94924
|
-
stdin.on("data", onData);
|
|
94925
|
-
stdin.once("end", onEnd);
|
|
94926
|
-
stdin.once("error", onEnd);
|
|
94927
|
-
render3();
|
|
94928
|
-
});
|
|
94929
|
-
}
|
|
94930
|
-
var ETX2 = "\x03", EOT2 = "\x04", CR = "\r", LF = `
|
|
94931
|
-
`, BACKSPACE = "\x7F", ARROW_UP = "\x1B[A", ARROW_DOWN = "\x1B[B", PromptCancelledError, _authPromptDeps;
|
|
94932
|
-
var init_auth_prompt = __esm(() => {
|
|
94933
|
-
init_source();
|
|
94934
|
-
PromptCancelledError = class PromptCancelledError extends Error {
|
|
94935
|
-
constructor() {
|
|
94936
|
-
super("Prompt cancelled");
|
|
94937
|
-
this.name = "PromptCancelledError";
|
|
94938
|
-
}
|
|
94939
|
-
};
|
|
94940
|
-
_authPromptDeps = {
|
|
94941
|
-
stdin: process.stdin,
|
|
94942
|
-
write: (text) => process.stdout.write(text)
|
|
94943
|
-
};
|
|
94944
|
-
});
|
|
94945
|
-
|
|
94946
|
-
// src/cli/open-url.ts
|
|
94947
|
-
function openerFor(platform, url2) {
|
|
94948
|
-
if (platform === "darwin")
|
|
94949
|
-
return ["open", url2];
|
|
94950
|
-
if (platform === "win32")
|
|
94951
|
-
return ["cmd", "/c", "start", "", url2];
|
|
94952
|
-
return ["xdg-open", url2];
|
|
94953
|
-
}
|
|
94954
|
-
function openUrl(url2) {
|
|
94955
|
-
try {
|
|
94956
|
-
_openUrlDeps.spawn(openerFor(_openUrlDeps.platform(), url2));
|
|
94957
|
-
} catch {}
|
|
94958
|
-
}
|
|
94959
|
-
var _openUrlDeps;
|
|
94960
|
-
var init_open_url = __esm(() => {
|
|
94961
|
-
_openUrlDeps = {
|
|
94962
|
-
spawn: (command2) => {
|
|
94963
|
-
Bun.spawn([...command2], { stdin: "ignore", stdout: "ignore", stderr: "ignore" });
|
|
94964
|
-
},
|
|
94965
|
-
platform: () => process.platform
|
|
94966
|
-
};
|
|
94967
|
-
});
|
|
94968
|
-
|
|
94969
95091
|
// src/cli/auth.ts
|
|
94970
95092
|
function terminalInteraction() {
|
|
94971
|
-
|
|
94972
|
-
return {
|
|
94973
|
-
prompt: async (prompt) => {
|
|
94974
|
-
if (prompt.type === "manual-code") {
|
|
94975
|
-
const url2 = pendingUrl;
|
|
94976
|
-
if (url2 === undefined)
|
|
94977
|
-
return promptForLine(prompt.message);
|
|
94978
|
-
pendingUrl = undefined;
|
|
94979
|
-
_cliAuthDeps.log(source_default.dim("Press Enter to open it in your browser."));
|
|
94980
|
-
return promptForLine(prompt.message, () => {
|
|
94981
|
-
_cliAuthDeps.log(source_default.dim("Opening your browser..."));
|
|
94982
|
-
openUrl(url2);
|
|
94983
|
-
});
|
|
94984
|
-
}
|
|
94985
|
-
if (prompt.type === "text")
|
|
94986
|
-
return promptForLine(prompt.message);
|
|
94987
|
-
if (prompt.type === "select") {
|
|
94988
|
-
return promptForSelect(prompt.message, prompt.options.map((option) => ({ id: option.id, label: option.label })));
|
|
94989
|
-
}
|
|
94990
|
-
return promptForSecret(prompt.message);
|
|
94991
|
-
},
|
|
94992
|
-
notify: (event) => {
|
|
94993
|
-
switch (event.type) {
|
|
94994
|
-
case "auth-url":
|
|
94995
|
-
_cliAuthDeps.log(`
|
|
94996
|
-
${source_default.bold("Open this URL to continue:")}
|
|
94997
|
-
${event.url}`);
|
|
94998
|
-
pendingUrl = event.url;
|
|
94999
|
-
return;
|
|
95000
|
-
case "device-code":
|
|
95001
|
-
_cliAuthDeps.log(`
|
|
95002
|
-
Go to ${event.verificationUri} and enter code ${source_default.bold(event.userCode)}`);
|
|
95003
|
-
return;
|
|
95004
|
-
case "info":
|
|
95005
|
-
_cliAuthDeps.log(event.message);
|
|
95006
|
-
for (const link2 of event.links ?? [])
|
|
95007
|
-
_cliAuthDeps.log(` ${link2.label ?? "Link"}: ${link2.url}`);
|
|
95008
|
-
return;
|
|
95009
|
-
case "progress":
|
|
95010
|
-
_cliAuthDeps.log(source_default.dim(event.message));
|
|
95011
|
-
return;
|
|
95012
|
-
default:
|
|
95013
|
-
}
|
|
95014
|
-
}
|
|
95015
|
-
};
|
|
95093
|
+
return createTerminalAuthInteraction({ log: (text) => _cliAuthDeps.log(text), style: CHALK_STYLE });
|
|
95016
95094
|
}
|
|
95017
95095
|
async function authLoginCommand(providerId, method) {
|
|
95018
95096
|
if (!_cliAuthDeps.isTTY()) {
|
|
@@ -95109,19 +95187,18 @@ async function authRmCommand(providerId) {
|
|
|
95109
95187
|
return 1;
|
|
95110
95188
|
}
|
|
95111
95189
|
}
|
|
95112
|
-
var _cliAuthDeps;
|
|
95190
|
+
var _cliAuthDeps, CHALK_STYLE;
|
|
95113
95191
|
var init_auth3 = __esm(() => {
|
|
95114
95192
|
init_src();
|
|
95115
95193
|
init_source();
|
|
95116
95194
|
init_config();
|
|
95117
95195
|
init_auth_list();
|
|
95118
|
-
init_auth_prompt();
|
|
95119
|
-
init_open_url();
|
|
95120
95196
|
_cliAuthDeps = {
|
|
95121
95197
|
log: (text) => console.log(text),
|
|
95122
95198
|
isTTY: () => process.stdin.isTTY === true,
|
|
95123
95199
|
collectAuthList
|
|
95124
95200
|
};
|
|
95201
|
+
CHALK_STYLE = { accent: source_default.cyan, dim: source_default.dim, bold: source_default.bold };
|
|
95125
95202
|
});
|
|
95126
95203
|
|
|
95127
95204
|
// src/cli/config-diff.ts
|
|
@@ -98041,7 +98118,7 @@ var init_triggers = __esm(() => {
|
|
|
98041
98118
|
});
|
|
98042
98119
|
|
|
98043
98120
|
// src/interaction/index.ts
|
|
98044
|
-
var
|
|
98121
|
+
var init_interaction3 = __esm(() => {
|
|
98045
98122
|
init_ask_link();
|
|
98046
98123
|
init_bridge_builder();
|
|
98047
98124
|
init_chain();
|
|
@@ -98117,7 +98194,7 @@ var _configJsonDeps;
|
|
|
98117
98194
|
var init_config_json = __esm(() => {
|
|
98118
98195
|
init_internal();
|
|
98119
98196
|
init_config();
|
|
98120
|
-
|
|
98197
|
+
init_interaction3();
|
|
98121
98198
|
init_config_display();
|
|
98122
98199
|
init_config_profile();
|
|
98123
98200
|
init_config_requirements();
|
|
@@ -100905,19 +100982,19 @@ function validateProjectName(name) {
|
|
|
100905
100982
|
return { valid: true };
|
|
100906
100983
|
}
|
|
100907
100984
|
async function checkInitCollision(name, currentWorkdir, currentRemote) {
|
|
100908
|
-
const
|
|
100909
|
-
if (!
|
|
100985
|
+
const identity2 = await readProjectIdentity(name);
|
|
100986
|
+
if (!identity2)
|
|
100910
100987
|
return { collision: false };
|
|
100911
|
-
const sameRemote = isSameProject(currentRemote,
|
|
100912
|
-
const sameWorkdir = !currentRemote && !
|
|
100988
|
+
const sameRemote = isSameProject(currentRemote, identity2.remoteUrl);
|
|
100989
|
+
const sameWorkdir = !currentRemote && !identity2.remoteUrl && currentWorkdir === identity2.workdir;
|
|
100913
100990
|
if (sameRemote || sameWorkdir)
|
|
100914
100991
|
return { collision: false };
|
|
100915
100992
|
return {
|
|
100916
100993
|
collision: true,
|
|
100917
100994
|
existing: {
|
|
100918
|
-
workdir:
|
|
100919
|
-
remoteUrl:
|
|
100920
|
-
lastSeen:
|
|
100995
|
+
workdir: identity2.workdir,
|
|
100996
|
+
remoteUrl: identity2.remoteUrl,
|
|
100997
|
+
lastSeen: identity2.lastSeen
|
|
100921
100998
|
}
|
|
100922
100999
|
};
|
|
100923
101000
|
}
|
|
@@ -101432,7 +101509,7 @@ var init_checks_cli = __esm(() => {
|
|
|
101432
101509
|
init_bun_deps();
|
|
101433
101510
|
init_agents();
|
|
101434
101511
|
_checkCliDeps = {
|
|
101435
|
-
spawn
|
|
101512
|
+
spawn: spawn2
|
|
101436
101513
|
};
|
|
101437
101514
|
});
|
|
101438
101515
|
|
|
@@ -103111,7 +103188,7 @@ var init_cleanup = __esm(() => {
|
|
|
103111
103188
|
init_bun_deps();
|
|
103112
103189
|
init_logger2();
|
|
103113
103190
|
_cleanupDeps = {
|
|
103114
|
-
spawn,
|
|
103191
|
+
spawn: spawn2,
|
|
103115
103192
|
sleep,
|
|
103116
103193
|
kill: process.kill.bind(process),
|
|
103117
103194
|
killProcessGroupFn: (pid, signal) => killProcessGroup(pid, signal)
|
|
@@ -108886,7 +108963,7 @@ var init_completion = __esm(() => {
|
|
|
108886
108963
|
init_engine();
|
|
108887
108964
|
init_fragments();
|
|
108888
108965
|
init_execution2();
|
|
108889
|
-
|
|
108966
|
+
init_interaction3();
|
|
108890
108967
|
init_logger2();
|
|
108891
108968
|
init_metrics();
|
|
108892
108969
|
init_prd();
|
|
@@ -109497,12 +109574,12 @@ var init_execution = __esm(() => {
|
|
|
109497
109574
|
init_engine();
|
|
109498
109575
|
init_errors4();
|
|
109499
109576
|
init_execution2();
|
|
109500
|
-
|
|
109577
|
+
init_interaction3();
|
|
109501
109578
|
init_logger2();
|
|
109502
109579
|
init_git2();
|
|
109503
109580
|
init_path_frame();
|
|
109504
109581
|
init_scope_files();
|
|
109505
|
-
|
|
109582
|
+
init_interaction3();
|
|
109506
109583
|
init_execution_helpers();
|
|
109507
109584
|
init_execution_helpers();
|
|
109508
109585
|
RUNTIME_CRASH_CODES = new Set(["CALL_OP_NO_OUTPUT", "CALL_OP_MAX_RETRIES"]);
|
|
@@ -109699,7 +109776,7 @@ var init_optimizer2 = __esm(() => {
|
|
|
109699
109776
|
|
|
109700
109777
|
// src/pipeline/stages/prompt.ts
|
|
109701
109778
|
var _promptStageDeps, promptStage;
|
|
109702
|
-
var
|
|
109779
|
+
var init_prompt4 = __esm(() => {
|
|
109703
109780
|
init_acceptance2();
|
|
109704
109781
|
init_engine();
|
|
109705
109782
|
init_logger2();
|
|
@@ -110057,7 +110134,7 @@ var init_stages = __esm(() => {
|
|
|
110057
110134
|
init_context3();
|
|
110058
110135
|
init_execution();
|
|
110059
110136
|
init_optimizer2();
|
|
110060
|
-
|
|
110137
|
+
init_prompt4();
|
|
110061
110138
|
init_queue_check();
|
|
110062
110139
|
init_routing2();
|
|
110063
110140
|
init_acceptance3();
|
|
@@ -110067,7 +110144,7 @@ var init_stages = __esm(() => {
|
|
|
110067
110144
|
init_context3();
|
|
110068
110145
|
init_execution();
|
|
110069
110146
|
init_optimizer2();
|
|
110070
|
-
|
|
110147
|
+
init_prompt4();
|
|
110071
110148
|
init_queue_check();
|
|
110072
110149
|
init_routing2();
|
|
110073
110150
|
defaultPipeline = new Proxy([], {
|
|
@@ -110694,7 +110771,7 @@ var init_pipeline_result_handler = __esm(() => {
|
|
|
110694
110771
|
init_escalation();
|
|
110695
110772
|
init_progress();
|
|
110696
110773
|
_resultHandlerDeps = {
|
|
110697
|
-
spawn,
|
|
110774
|
+
spawn: spawn2,
|
|
110698
110775
|
existsSync: existsSync25,
|
|
110699
110776
|
worktreeManager: new WorktreeManager,
|
|
110700
110777
|
mergeEngine: new MergeEngine(new WorktreeManager),
|
|
@@ -111445,7 +111522,7 @@ async function openAcceptanceFixScope(ctx, runtime2, storyId, packageDir) {
|
|
|
111445
111522
|
}
|
|
111446
111523
|
var _acceptanceFixScopeDeps;
|
|
111447
111524
|
var init_acceptance_fix_scope = __esm(() => {
|
|
111448
|
-
|
|
111525
|
+
init_interaction3();
|
|
111449
111526
|
init_path_frame();
|
|
111450
111527
|
_acceptanceFixScopeDeps = {
|
|
111451
111528
|
buildRunDispatchAskWiring
|
|
@@ -113192,7 +113269,7 @@ async function runDeferredRegression(options) {
|
|
|
113192
113269
|
var _regressionDeps;
|
|
113193
113270
|
var init_run_regression = __esm(() => {
|
|
113194
113271
|
init_findings();
|
|
113195
|
-
|
|
113272
|
+
init_interaction3();
|
|
113196
113273
|
init_logger2();
|
|
113197
113274
|
init_operations();
|
|
113198
113275
|
init_event_bus();
|
|
@@ -114487,15 +114564,15 @@ function createOtelReporterPlugin(cfg, deps, workdir) {
|
|
|
114487
114564
|
send: makeSendLogsBatch(resource)
|
|
114488
114565
|
});
|
|
114489
114566
|
const buildOrphanState = (startMs) => {
|
|
114490
|
-
const
|
|
114567
|
+
const identity2 = rootSpanIdentity();
|
|
114491
114568
|
const orphanAttrs = buildResourceAttributes({ serviceName: cfg.serviceName, runId: "orphan" });
|
|
114492
114569
|
return {
|
|
114493
|
-
...
|
|
114570
|
+
...identity2,
|
|
114494
114571
|
startMs,
|
|
114495
114572
|
feature: "",
|
|
114496
114573
|
project: "",
|
|
114497
114574
|
events: [],
|
|
114498
|
-
spanTree: createSpanTree(
|
|
114575
|
+
spanTree: createSpanTree(identity2.traceId, identity2.spanId),
|
|
114499
114576
|
spanQueue: makeSpanQueue(orphanAttrs),
|
|
114500
114577
|
metrics: createPhaseMetricsAggregator(),
|
|
114501
114578
|
storyBounds: new Map,
|
|
@@ -114573,7 +114650,7 @@ function createOtelReporterPlugin(cfg, deps, workdir) {
|
|
|
114573
114650
|
const reporter = {
|
|
114574
114651
|
name: STAGE8,
|
|
114575
114652
|
async onRunStart(event) {
|
|
114576
|
-
const
|
|
114653
|
+
const identity2 = rootSpanIdentity();
|
|
114577
114654
|
const runId = event.runId;
|
|
114578
114655
|
let gitBranch;
|
|
114579
114656
|
let gitSha;
|
|
@@ -114601,14 +114678,14 @@ function createOtelReporterPlugin(cfg, deps, workdir) {
|
|
|
114601
114678
|
git: { branch: gitBranch, sha: gitSha }
|
|
114602
114679
|
});
|
|
114603
114680
|
const state = {
|
|
114604
|
-
...
|
|
114681
|
+
...identity2,
|
|
114605
114682
|
startMs: Date.parse(event.startTime),
|
|
114606
114683
|
feature: event.feature,
|
|
114607
114684
|
project: event.project ?? "",
|
|
114608
114685
|
gitBranch,
|
|
114609
114686
|
gitSha,
|
|
114610
114687
|
events: [],
|
|
114611
|
-
spanTree: createSpanTree(
|
|
114688
|
+
spanTree: createSpanTree(identity2.traceId, identity2.spanId),
|
|
114612
114689
|
spanQueue: makeSpanQueue(resourceAttrs),
|
|
114613
114690
|
metrics: createPhaseMetricsAggregator(),
|
|
114614
114691
|
storyBounds: new Map,
|
|
@@ -118016,7 +118093,7 @@ var init_run_initialization = __esm(() => {
|
|
|
118016
118093
|
},
|
|
118017
118094
|
hasCommitsForStory: (workdir, storyId) => hasCommitsForStory(workdir, storyId),
|
|
118018
118095
|
runReview: (reviewConfig, workdir, executionConfig) => runReview({ config: reviewConfig, workdir, executionConfig }),
|
|
118019
|
-
spawn
|
|
118096
|
+
spawn: spawn2
|
|
118020
118097
|
};
|
|
118021
118098
|
});
|
|
118022
118099
|
|
|
@@ -118285,9 +118362,9 @@ async function resolveProjectAsync(options = {}) {
|
|
|
118285
118362
|
const identityFile = Bun.file(registryIdentityPath);
|
|
118286
118363
|
if (await identityFile.exists()) {
|
|
118287
118364
|
try {
|
|
118288
|
-
const
|
|
118289
|
-
if (typeof
|
|
118290
|
-
return resolveProject({ ...options, dir:
|
|
118365
|
+
const identity2 = await identityFile.json();
|
|
118366
|
+
if (typeof identity2.workdir === "string") {
|
|
118367
|
+
return resolveProject({ ...options, dir: identity2.workdir });
|
|
118291
118368
|
}
|
|
118292
118369
|
} catch {}
|
|
118293
118370
|
}
|
|
@@ -120853,7 +120930,7 @@ var init_run_setup = __esm(() => {
|
|
|
120853
120930
|
init_internal();
|
|
120854
120931
|
init_errors4();
|
|
120855
120932
|
init_rtk();
|
|
120856
|
-
|
|
120933
|
+
init_interaction3();
|
|
120857
120934
|
init_logger2();
|
|
120858
120935
|
init_event_bus();
|
|
120859
120936
|
init_prd();
|
|
@@ -121296,7 +121373,7 @@ async function cleanupSessionOnFailure(ctx, failAndClose2) {
|
|
|
121296
121373
|
}
|
|
121297
121374
|
|
|
121298
121375
|
// src/execution/deferred-review.ts
|
|
121299
|
-
var {spawn:
|
|
121376
|
+
var {spawn: spawn7 } = globalThis.Bun;
|
|
121300
121377
|
async function spawnGitWithDeadline(args, workdir) {
|
|
121301
121378
|
const proc = _deferredReviewDeps.spawn({
|
|
121302
121379
|
cmd: hardenedGitArgv(["git", ...args]),
|
|
@@ -121376,7 +121453,7 @@ var init_deferred_review = __esm(() => {
|
|
|
121376
121453
|
init_internal();
|
|
121377
121454
|
init_git2();
|
|
121378
121455
|
init_path_filters();
|
|
121379
|
-
_deferredReviewDeps = { spawn:
|
|
121456
|
+
_deferredReviewDeps = { spawn: spawn7 };
|
|
121380
121457
|
});
|
|
121381
121458
|
|
|
121382
121459
|
// src/execution/lifecycle/test-baseline-capture.ts
|
|
@@ -124665,7 +124742,7 @@ var _finishPhaseDeps;
|
|
|
124665
124742
|
var init_phase = __esm(() => {
|
|
124666
124743
|
init_internal();
|
|
124667
124744
|
init_forge();
|
|
124668
|
-
|
|
124745
|
+
init_interaction3();
|
|
124669
124746
|
init_logger2();
|
|
124670
124747
|
init_pipeline2();
|
|
124671
124748
|
init_runtime3();
|
|
@@ -125254,8 +125331,8 @@ function wireInteraction(bus, interactionChain, config2) {
|
|
|
125254
125331
|
u();
|
|
125255
125332
|
};
|
|
125256
125333
|
}
|
|
125257
|
-
var
|
|
125258
|
-
|
|
125334
|
+
var init_interaction4 = __esm(() => {
|
|
125335
|
+
init_interaction3();
|
|
125259
125336
|
init_logger2();
|
|
125260
125337
|
});
|
|
125261
125338
|
|
|
@@ -126556,7 +126633,7 @@ var init_unified_executor = __esm(() => {
|
|
|
126556
126633
|
init_runner2();
|
|
126557
126634
|
init_events_writer();
|
|
126558
126635
|
init_hooks2();
|
|
126559
|
-
|
|
126636
|
+
init_interaction4();
|
|
126560
126637
|
init_registry8();
|
|
126561
126638
|
init_reporters();
|
|
126562
126639
|
init_prd();
|
|
@@ -128861,7 +128938,7 @@ var init_plan_runtime = __esm(() => {
|
|
|
128861
128938
|
init_analyze();
|
|
128862
128939
|
init_config();
|
|
128863
128940
|
init_generator2();
|
|
128864
|
-
|
|
128941
|
+
init_interaction3();
|
|
128865
128942
|
init_logger2();
|
|
128866
128943
|
init_runtime3();
|
|
128867
128944
|
init_plan_helpers();
|
|
@@ -129017,7 +129094,7 @@ var init_context_builder = __esm(() => {
|
|
|
129017
129094
|
init_plan_runtime();
|
|
129018
129095
|
init_config();
|
|
129019
129096
|
init_errors4();
|
|
129020
|
-
|
|
129097
|
+
init_interaction3();
|
|
129021
129098
|
init_logger2();
|
|
129022
129099
|
init_feature_name();
|
|
129023
129100
|
init_spec_lint_gate();
|
|
@@ -132034,9 +132111,7 @@ __export(exports_cli, {
|
|
|
132034
132111
|
MAX_CANONICAL_RULE_GLOB_FILES: () => MAX_CANONICAL_RULE_GLOB_FILES,
|
|
132035
132112
|
MAX_DEAD_GLOB_SCAN_FILES: () => MAX_DEAD_GLOB_SCAN_FILES,
|
|
132036
132113
|
MAX_DEAD_GLOB_SCAN_TOTAL_ENTRIES: () => MAX_DEAD_GLOB_SCAN_TOTAL_ENTRIES,
|
|
132037
|
-
PromptCancelledError: () => PromptCancelledError,
|
|
132038
132114
|
_approvalsCliDeps: () => _approvalsCliDeps,
|
|
132039
|
-
_authPromptDeps: () => _authPromptDeps,
|
|
132040
132115
|
_cliAuthDeps: () => _cliAuthDeps,
|
|
132041
132116
|
_cliTrustDeps: () => _cliTrustDeps,
|
|
132042
132117
|
_confirmDeps: () => _confirmDeps,
|
|
@@ -132096,8 +132171,6 @@ __export(exports_cli, {
|
|
|
132096
132171
|
planMigration: () => planMigration,
|
|
132097
132172
|
pluginsListCommand: () => pluginsListCommand,
|
|
132098
132173
|
promptForConfirmation: () => promptForConfirmation,
|
|
132099
|
-
promptForLine: () => promptForLine,
|
|
132100
|
-
promptForSecret: () => promptForSecret,
|
|
132101
132174
|
promptsCommand: () => promptsCommand,
|
|
132102
132175
|
promptsInitCommand: () => promptsInitCommand,
|
|
132103
132176
|
registerApprovalsCommand: () => registerApprovalsCommand,
|
|
@@ -132137,7 +132210,6 @@ var init_cli2 = __esm(() => {
|
|
|
132137
132210
|
init_approvals();
|
|
132138
132211
|
init_approvals_format();
|
|
132139
132212
|
init_auth3();
|
|
132140
|
-
init_auth_prompt();
|
|
132141
132213
|
init_config2();
|
|
132142
132214
|
init_config_descriptions();
|
|
132143
132215
|
init_confirm();
|