nolo-cli 0.263.0-alpha.1 → 0.264.0-alpha.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/{_executeModel-GZEGNZDC.js → _executeModel-YQNZNR2Y.js} +15 -15
- package/{agentDeleteCommand-PYQFS2IO.js → agentDeleteCommand-S5FVPYKT.js} +13 -13
- package/{agentEmailCommands-MSPYHNQA.js → agentEmailCommands-ZEFMGVKM.js} +14 -14
- package/{agentMachineCommands-HHH7DR26.js → agentMachineCommands-COJD2KPZ.js} +2 -2
- package/{agentRecordCommands-ANOOR7DX.js → agentRecordCommands-JZ35AC5A.js} +14 -14
- package/{agentRun-P6GEVWAT.js → agentRun-UIO43TUG.js} +14 -14
- package/{agentRunCommand-SF4QKUF2.js → agentRunCommand-ATLKKD6O.js} +15 -15
- package/{agentSlice-NWSWCYRW.js → agentSlice-HHNKNNYM.js} +1 -1
- package/{chunk-6S4VPBSW.js → chunk-4RUQ2PFX.js} +4 -4
- package/{chunk-L4KZCAIJ.js → chunk-4UNN45DS.js} +5 -5
- package/{chunk-KUZSTAE3.js → chunk-7422ZLGL.js} +7 -7
- package/{chunk-KTK64ZZN.js → chunk-7E6YXSFZ.js} +2 -2
- package/{chunk-JUMQJSQF.js → chunk-DALXH7BG.js} +211 -177
- package/{chunk-OV47NSYQ.js → chunk-DBCWXGOC.js} +8 -8
- package/{chunk-DPFHC2DK.js → chunk-DBEOW57U.js} +2 -2
- package/{chunk-YSYTCIFN.js → chunk-EBH4RFJ6.js} +216 -33
- package/{chunk-5MGXBQ3H.js → chunk-EODBQPRM.js} +2 -2
- package/{chunk-BUO76CEE.js → chunk-HXEO5DNV.js} +2 -2
- package/chunk-JDMWYVUF.js +449 -0
- package/{chunk-WWE3TYSA.js → chunk-LTQ6ECCF.js} +3 -3
- package/{chunk-ZMOKHBV5.js → chunk-LYPJYBE5.js} +2 -2
- package/{chunk-OLJSB44A.js → chunk-MALPQFGT.js} +6 -6
- package/{chunk-QAUBNGF2.js → chunk-OKPOQGQJ.js} +3 -3
- package/{chunk-6KA4XDEI.js → chunk-PDSXYHNI.js} +2 -2
- package/{chunk-QHSF7SPP.js → chunk-QAU6KM2U.js} +1 -1
- package/{chunk-ZZOXGB2Z.js → chunk-QAW6BEWQ.js} +6 -6
- package/{chunk-Z7TB2J74.js → chunk-T3MWVUBE.js} +1 -1
- package/{chunk-JTRU7WEG.js → chunk-TGVVE5BA.js} +177 -44
- package/{chunk-PJVJIDTH.js → chunk-TKLBBR7P.js} +3 -3
- package/{chunk-CQNGHKSG.js → chunk-U7OULUMF.js} +3 -3
- package/{chunk-WJ5IXN23.js → chunk-ZCMAKAZM.js} +1 -1
- package/{chunk-XCPC4RXE.js → chunk-ZSZBHRLP.js} +4 -4
- package/{cliExecutor-Z62UBJ5S.js → cliExecutor-N3445G2Z.js} +1 -1
- package/{commandRegistry-ZEZY7MPW.js → commandRegistry-ENNFT77C.js} +18 -18
- package/{contentThunks-N3DDKRNJ.js → contentThunks-ERA42OXW.js} +4 -4
- package/{createAgentAutomationAction-W3B6KOIW.js → createAgentAutomationAction-DMD2VDPI.js} +4 -4
- package/{createDialogAction-V6WA7USR.js → createDialogAction-3SPOJQAK.js} +5 -5
- package/{createPageAction-P2HDHBCU.js → createPageAction-AVXUMZVT.js} +5 -5
- package/{deleteDbKey-TDXLWHVF.js → deleteDbKey-KV6MYBAI.js} +5 -5
- package/{dialogSlice-TEV6XXOO.js → dialogSlice-Q7H2YVNO.js} +2 -2
- package/{docStore-OVBEONC7.js → docStore-GWPFDV6Y.js} +1 -1
- package/{handleSendMessageAction-5GZ44SKK.js → handleSendMessageAction-FHGUFT2X.js} +9 -9
- package/{hostCredentialCreate-WOLFFVCM.js → hostCredentialCreate-2VEYBXJV.js} +14 -14
- package/index.js +3 -3
- package/{localAutomationCommands-L333FJPR.js → localAutomationCommands-XSK7SM7I.js} +1 -1
- package/{localAutomationRuntime-CIHGJBSC.js → localAutomationRuntime-5WBO7HGQ.js} +1 -1
- package/{localRuntimeAdapter-6WNR7IYN.js → localRuntimeAdapter-Y6H6XRIH.js} +13 -13
- package/{machineCommands-CP7NCD6O.js → machineCommands-RVB5OG2X.js} +16 -16
- package/{machineWsRunDispatch-YIAY2LPK.js → machineWsRunDispatch-Y5SJGCEE.js} +14 -14
- package/{memberThunks-TD76IFGA.js → memberThunks-NEZRAW5K.js} +18 -175
- package/package.json +1 -1
- package/{projectArchive-KJRBIY3O.js → projectArchive-WE3VVPZ2.js} +5 -5
- package/{readlineWorkspace-2PLTEZDM.js → readlineWorkspace-ZH5FGDMI.js} +18 -18
- package/{runAgentClientLoop-IBWSCK2D.js → runAgentClientLoop-2SFASHDS.js} +13 -13
- package/{streamAgentChatTurn-JAAROGLD.js → streamAgentChatTurn-KOUWITHH.js} +15 -15
- package/{tools-TCOYT5DJ.js → tools-WN4AVSNS.js} +10 -10
- package/{updateDialogTitleAction-O3TRFRIH.js → updateDialogTitleAction-XOSLNRT3.js} +4 -4
- package/chunk-EHFDVQF5.js +0 -247
|
@@ -960,6 +960,7 @@ ${entry.content.trim()}`).join("\n\n");
|
|
|
960
960
|
}
|
|
961
961
|
async start() {
|
|
962
962
|
this.assertNotRetired();
|
|
963
|
+
assertAgyAcpAllowed();
|
|
963
964
|
const binPath = this.config.binPath || process.env.AGY_BIN || "agy";
|
|
964
965
|
const cwd = this.config.cwd || process.cwd();
|
|
965
966
|
const args = ["acp"];
|
|
@@ -1458,6 +1459,7 @@ ${error.message}`));
|
|
|
1458
1459
|
}
|
|
1459
1460
|
};
|
|
1460
1461
|
var agyAcpSessions = /* @__PURE__ */ new Map();
|
|
1462
|
+
var activeAgyPrintCount = 0;
|
|
1461
1463
|
function isAgyAcpEnabled(env = process.env) {
|
|
1462
1464
|
const raw = (env.NOLO_AGY_ACP ?? "").trim().toLowerCase();
|
|
1463
1465
|
return !(raw === "0" || raw === "false" || raw === "off" || raw === "no");
|
|
@@ -1479,12 +1481,31 @@ function assertAgyPrintAllowed(label) {
|
|
|
1479
1481
|
`${label} blocked: an agy ACP session is active on this machine. Local agy runs only one stable delegated session at a time; wait for the interactive session to finish (or close that dialog) and retry, or dispatch to another provider.`
|
|
1480
1482
|
);
|
|
1481
1483
|
}
|
|
1484
|
+
function assertAgyAcpAllowed() {
|
|
1485
|
+
if (activeAgyPrintCount <= 0) return;
|
|
1486
|
+
throw new CliProviderQuotaError(
|
|
1487
|
+
"agy",
|
|
1488
|
+
"agy ACP blocked: an agy --print run is active on this machine. Local agy runs only one stable delegated session at a time; wait for the print run to finish and retry, or dispatch to another provider."
|
|
1489
|
+
);
|
|
1490
|
+
}
|
|
1491
|
+
function acquireAgyPrintSlot(label) {
|
|
1492
|
+
assertAgyPrintAllowed(label);
|
|
1493
|
+
activeAgyPrintCount += 1;
|
|
1494
|
+
let released = false;
|
|
1495
|
+
return () => {
|
|
1496
|
+
if (released) return;
|
|
1497
|
+
released = true;
|
|
1498
|
+
activeAgyPrintCount = Math.max(0, activeAgyPrintCount - 1);
|
|
1499
|
+
};
|
|
1500
|
+
}
|
|
1482
1501
|
function getAgyAcpSession(key, config) {
|
|
1483
1502
|
const existing = agyAcpSessions.get(key);
|
|
1484
1503
|
if (existing) {
|
|
1504
|
+
if (!existing.isOccupyingSlot()) assertAgyAcpAllowed();
|
|
1485
1505
|
existing.updateConfig(config);
|
|
1486
1506
|
return existing;
|
|
1487
1507
|
}
|
|
1508
|
+
assertAgyAcpAllowed();
|
|
1488
1509
|
if (liveSessionCount() > 0) {
|
|
1489
1510
|
throw new CliProviderQuotaError(
|
|
1490
1511
|
"agy",
|
|
@@ -2325,87 +2346,93 @@ function executeAgy(prompt, options) {
|
|
|
2325
2346
|
yolo = true,
|
|
2326
2347
|
reasoningEffort
|
|
2327
2348
|
} = options;
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
|
|
2331
|
-
|
|
2332
|
-
|
|
2333
|
-
|
|
2334
|
-
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
|
|
2344
|
-
|
|
2345
|
-
|
|
2346
|
-
|
|
2347
|
-
|
|
2348
|
-
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
-
|
|
2362
|
-
|
|
2349
|
+
const releasePrintSlot = acquireAgyPrintSlot("agy --print");
|
|
2350
|
+
let promise;
|
|
2351
|
+
try {
|
|
2352
|
+
promise = new Promise((resolve3, reject) => {
|
|
2353
|
+
const args = [
|
|
2354
|
+
"--add-dir",
|
|
2355
|
+
cwd,
|
|
2356
|
+
"--print=" + prompt,
|
|
2357
|
+
"--output-format",
|
|
2358
|
+
"json",
|
|
2359
|
+
"--print-timeout",
|
|
2360
|
+
formatCliTimeout(timeout)
|
|
2361
|
+
];
|
|
2362
|
+
if (options.model) args.push("--model", options.model);
|
|
2363
|
+
if (reasoningEffort) args.push("--effort", mapAgyEffort(reasoningEffort));
|
|
2364
|
+
if (yolo) {
|
|
2365
|
+
args.push("--dangerously-skip-permissions");
|
|
2366
|
+
}
|
|
2367
|
+
const start = Date.now();
|
|
2368
|
+
const proc = spawnCliProcess("agy", args, {
|
|
2369
|
+
cwd,
|
|
2370
|
+
env: buildCliProcessEnv(options.env),
|
|
2371
|
+
stdio: ["ignore", "pipe", "pipe"],
|
|
2372
|
+
detached: process.platform !== "win32",
|
|
2373
|
+
signal: options.signal
|
|
2374
|
+
}, reject);
|
|
2375
|
+
const stdout = createUtf8Collector();
|
|
2376
|
+
const stderr = createUtf8Collector();
|
|
2377
|
+
let timer;
|
|
2378
|
+
let settled = false;
|
|
2379
|
+
const clearTimers = () => {
|
|
2380
|
+
if (timer) clearTimeout(timer);
|
|
2381
|
+
};
|
|
2382
|
+
if (timeout > 0) {
|
|
2383
|
+
timer = setTimeout(() => {
|
|
2384
|
+
if (settled) return;
|
|
2385
|
+
settled = true;
|
|
2386
|
+
reject(stoppingCliError(buildAgyTimeoutError(timeout, stdout.end(), stderr.end()), proc));
|
|
2387
|
+
}, timeout + 1e3);
|
|
2388
|
+
}
|
|
2389
|
+
proc.stdout.on("data", (data) => {
|
|
2390
|
+
stdout.write(data);
|
|
2391
|
+
});
|
|
2392
|
+
proc.stderr.on("data", (data) => {
|
|
2393
|
+
stderr.write(data);
|
|
2394
|
+
});
|
|
2395
|
+
onCliClose(proc, resolve3, reject, (resolve4, reject2, code) => {
|
|
2396
|
+
if (settled) {
|
|
2397
|
+
clearTimers();
|
|
2398
|
+
return;
|
|
2399
|
+
}
|
|
2363
2400
|
settled = true;
|
|
2364
|
-
reject(stoppingCliError(buildAgyTimeoutError(timeout, stdout.end(), stderr.end()), proc));
|
|
2365
|
-
}, timeout + 1e3);
|
|
2366
|
-
}
|
|
2367
|
-
proc.stdout.on("data", (data) => {
|
|
2368
|
-
stdout.write(data);
|
|
2369
|
-
});
|
|
2370
|
-
proc.stderr.on("data", (data) => {
|
|
2371
|
-
stderr.write(data);
|
|
2372
|
-
});
|
|
2373
|
-
onCliClose(proc, resolve3, reject, (resolve4, reject2, code) => {
|
|
2374
|
-
if (settled) {
|
|
2375
2401
|
clearTimers();
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
|
|
2380
|
-
|
|
2381
|
-
|
|
2382
|
-
|
|
2383
|
-
|
|
2384
|
-
|
|
2385
|
-
|
|
2386
|
-
|
|
2402
|
+
const stdoutText = stdout.end();
|
|
2403
|
+
const stderrText = stderr.end();
|
|
2404
|
+
if (code !== 0 && code !== null) {
|
|
2405
|
+
console.error("[cliExecutor] agy process exited with non-zero code:", code, "stderr:", stderrText);
|
|
2406
|
+
const quota = detectCliProviderQuotaLimit("agy", stdoutText, stderrText, code);
|
|
2407
|
+
if (quota.limited) {
|
|
2408
|
+
reject2(new CliProviderQuotaError("agy", quota.message || "Agy reported quota/limit"));
|
|
2409
|
+
return;
|
|
2410
|
+
}
|
|
2411
|
+
reject2(new Error(`Antigravity CLI exited with code ${code}
|
|
2412
|
+
stderr: ${stderrText}`));
|
|
2387
2413
|
return;
|
|
2388
2414
|
}
|
|
2389
|
-
|
|
2390
|
-
|
|
2391
|
-
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
|
|
2397
|
-
|
|
2398
|
-
|
|
2415
|
+
const parsed = parseAgyJsonResult(stdoutText);
|
|
2416
|
+
resolve4({
|
|
2417
|
+
text: (parsed?.response ?? stdoutText).trim(),
|
|
2418
|
+
raw: stdoutText,
|
|
2419
|
+
elapsed: Date.now() - start,
|
|
2420
|
+
...parsed?.usage ? { usage: parsed.usage } : {}
|
|
2421
|
+
});
|
|
2422
|
+
});
|
|
2423
|
+
proc.on("error", (err) => {
|
|
2424
|
+
if (settled) return;
|
|
2425
|
+
settled = true;
|
|
2426
|
+
clearTimers();
|
|
2427
|
+
console.error("[cliExecutor] agy process error event:", err);
|
|
2428
|
+
reject(proc.pid ? stoppingCliError(err, proc) : err);
|
|
2399
2429
|
});
|
|
2400
2430
|
});
|
|
2401
|
-
|
|
2402
|
-
|
|
2403
|
-
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
reject(proc.pid ? stoppingCliError(err, proc) : err);
|
|
2407
|
-
});
|
|
2408
|
-
});
|
|
2431
|
+
} catch (err) {
|
|
2432
|
+
releasePrintSlot();
|
|
2433
|
+
throw err;
|
|
2434
|
+
}
|
|
2435
|
+
return promise.finally(releasePrintSlot);
|
|
2409
2436
|
}
|
|
2410
2437
|
function executeAgyStreaming(prompt, options) {
|
|
2411
2438
|
const {
|
|
@@ -2416,109 +2443,116 @@ function executeAgyStreaming(prompt, options) {
|
|
|
2416
2443
|
reasoningEffort,
|
|
2417
2444
|
onChunk
|
|
2418
2445
|
} = options;
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
|
|
2422
|
-
|
|
2423
|
-
|
|
2424
|
-
|
|
2425
|
-
|
|
2426
|
-
|
|
2427
|
-
|
|
2428
|
-
|
|
2429
|
-
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
|
|
2443
|
-
|
|
2444
|
-
|
|
2445
|
-
|
|
2446
|
-
|
|
2447
|
-
|
|
2448
|
-
|
|
2449
|
-
|
|
2450
|
-
|
|
2451
|
-
|
|
2452
|
-
|
|
2453
|
-
|
|
2454
|
-
|
|
2455
|
-
|
|
2456
|
-
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
|
|
2462
|
-
|
|
2463
|
-
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
-
|
|
2467
|
-
|
|
2468
|
-
|
|
2469
|
-
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
|
|
2473
|
-
event
|
|
2474
|
-
|
|
2475
|
-
|
|
2476
|
-
|
|
2477
|
-
|
|
2478
|
-
|
|
2479
|
-
|
|
2480
|
-
|
|
2481
|
-
|
|
2482
|
-
|
|
2483
|
-
|
|
2484
|
-
|
|
2485
|
-
|
|
2486
|
-
|
|
2487
|
-
|
|
2488
|
-
|
|
2489
|
-
|
|
2490
|
-
|
|
2491
|
-
|
|
2492
|
-
|
|
2493
|
-
|
|
2494
|
-
|
|
2495
|
-
|
|
2496
|
-
|
|
2497
|
-
|
|
2498
|
-
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
|
|
2508
|
-
const
|
|
2509
|
-
|
|
2446
|
+
const releasePrintSlot = acquireAgyPrintSlot("agy --print");
|
|
2447
|
+
let promise;
|
|
2448
|
+
try {
|
|
2449
|
+
promise = new Promise((resolve3, reject) => {
|
|
2450
|
+
const args = [
|
|
2451
|
+
"--add-dir",
|
|
2452
|
+
cwd,
|
|
2453
|
+
"--print=" + prompt,
|
|
2454
|
+
"--output-format",
|
|
2455
|
+
"stream-json",
|
|
2456
|
+
"--print-timeout",
|
|
2457
|
+
formatCliTimeout(timeout)
|
|
2458
|
+
];
|
|
2459
|
+
if (model) args.push("--model", model);
|
|
2460
|
+
if (reasoningEffort) args.push("--effort", mapAgyEffort(reasoningEffort));
|
|
2461
|
+
if (yolo) args.push("--dangerously-skip-permissions");
|
|
2462
|
+
const start = Date.now();
|
|
2463
|
+
const proc = spawnCliProcess("agy", args, {
|
|
2464
|
+
cwd,
|
|
2465
|
+
env: buildCliProcessEnv(options.env),
|
|
2466
|
+
stdio: ["ignore", "pipe", "pipe"],
|
|
2467
|
+
detached: process.platform !== "win32",
|
|
2468
|
+
signal: options.signal
|
|
2469
|
+
});
|
|
2470
|
+
const stdout = createUtf8Collector();
|
|
2471
|
+
const stderr = createUtf8Collector();
|
|
2472
|
+
let pending = "";
|
|
2473
|
+
let answer = "";
|
|
2474
|
+
let agyUsage;
|
|
2475
|
+
let settled = false;
|
|
2476
|
+
let timer;
|
|
2477
|
+
let detachAbort = () => {
|
|
2478
|
+
};
|
|
2479
|
+
const finish = (callback) => {
|
|
2480
|
+
if (settled) return;
|
|
2481
|
+
settled = true;
|
|
2482
|
+
if (timer) clearTimeout(timer);
|
|
2483
|
+
detachAbort();
|
|
2484
|
+
callback();
|
|
2485
|
+
};
|
|
2486
|
+
const fail = (error) => {
|
|
2487
|
+
if (settled) return;
|
|
2488
|
+
finish(() => reject(stoppingCliError(error, proc)));
|
|
2489
|
+
};
|
|
2490
|
+
detachAbort = attachCliAbortSignal(proc, options.signal, (error) => {
|
|
2491
|
+
finish(() => reject(error));
|
|
2492
|
+
});
|
|
2493
|
+
if (!settled && timeout > 0) {
|
|
2494
|
+
timer = setTimeout(() => {
|
|
2495
|
+
fail(buildAgyTimeoutError(timeout, stdout.end(), stderr.end()));
|
|
2496
|
+
}, timeout + 1e3);
|
|
2497
|
+
}
|
|
2498
|
+
const consumeLine = (line) => {
|
|
2499
|
+
if (settled || !line.trim()) return;
|
|
2500
|
+
let event;
|
|
2501
|
+
try {
|
|
2502
|
+
event = JSON.parse(line);
|
|
2503
|
+
} catch {
|
|
2504
|
+
return;
|
|
2505
|
+
}
|
|
2506
|
+
const usageSource = event?.event === "result" ? event.result?.usage : event?.event === "step_update" ? event.step_update?.usage : void 0;
|
|
2507
|
+
const normalizedUsage = normalizeAgyUsage(usageSource);
|
|
2508
|
+
if (normalizedUsage) agyUsage = normalizedUsage;
|
|
2509
|
+
if (event?.event !== "step_update" || event.step_update?.step_type !== "agent_response" || typeof event.step_update.text_delta !== "string") return;
|
|
2510
|
+
const delta = event.step_update.text_delta;
|
|
2511
|
+
if (!delta) return;
|
|
2512
|
+
answer += delta;
|
|
2513
|
+
try {
|
|
2514
|
+
onChunk(delta);
|
|
2515
|
+
} catch (error) {
|
|
2516
|
+
fail(error);
|
|
2517
|
+
}
|
|
2518
|
+
};
|
|
2519
|
+
proc.stdout.on("data", (data) => {
|
|
2520
|
+
if (settled) return;
|
|
2521
|
+
pending += stdout.write(data);
|
|
2522
|
+
const lines = pending.split("\n");
|
|
2523
|
+
pending = lines.pop() ?? "";
|
|
2524
|
+
for (const line of lines) consumeLine(line);
|
|
2525
|
+
});
|
|
2526
|
+
proc.stderr.on("data", (data) => {
|
|
2527
|
+
if (!settled) stderr.write(data);
|
|
2528
|
+
});
|
|
2529
|
+
onCliClose(proc, resolve3, reject, (resolve4, reject2, code, signal) => {
|
|
2530
|
+
if (settled) return;
|
|
2531
|
+
pending += stdout.finish();
|
|
2532
|
+
consumeLine(pending);
|
|
2533
|
+
if (settled) return;
|
|
2534
|
+
const raw = stdout.end();
|
|
2535
|
+
const stderrText = stderr.end();
|
|
2536
|
+
if (code !== 0 || signal) {
|
|
2537
|
+
const quota = detectCliProviderQuotaLimit("agy", raw, stderrText, code);
|
|
2538
|
+
finish(() => reject2(quota.limited ? new CliProviderQuotaError("agy", quota.message || "Agy reported quota/limit") : new Error(`Antigravity CLI exited with ${signal ? `signal ${signal}` : `code ${code}`}
|
|
2510
2539
|
stderr: ${stderrText}`)));
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
|
|
2516
|
-
|
|
2517
|
-
|
|
2518
|
-
|
|
2540
|
+
return;
|
|
2541
|
+
}
|
|
2542
|
+
finish(() => resolve4({
|
|
2543
|
+
text: answer.trim(),
|
|
2544
|
+
raw,
|
|
2545
|
+
elapsed: Date.now() - start,
|
|
2546
|
+
...agyUsage ? { usage: agyUsage } : {}
|
|
2547
|
+
}));
|
|
2548
|
+
});
|
|
2549
|
+
proc.on("error", (error) => fail(error));
|
|
2519
2550
|
});
|
|
2520
|
-
|
|
2521
|
-
|
|
2551
|
+
} catch (err) {
|
|
2552
|
+
releasePrintSlot();
|
|
2553
|
+
throw err;
|
|
2554
|
+
}
|
|
2555
|
+
return promise.finally(releasePrintSlot);
|
|
2522
2556
|
}
|
|
2523
2557
|
function executeQoder(prompt, options) {
|
|
2524
2558
|
const {
|
|
@@ -3008,7 +3042,7 @@ async function executeAgyAcpTurn(session, userInput, options, onChunk) {
|
|
|
3008
3042
|
// 用 resolveCliExecution 的产物:非原生 systemPrompt 的 provider 已经被内联进 prompt,
|
|
3009
3043
|
// 这里再传一份会让 ACP 的 buildPromptText 前置第二次(首轮系统提示重复)。
|
|
3010
3044
|
systemPrompt: resolved.options.systemPrompt,
|
|
3011
|
-
yolo:
|
|
3045
|
+
yolo: resolved.options.yolo
|
|
3012
3046
|
});
|
|
3013
3047
|
const result = await acp.prompt(resolved.prompt, {
|
|
3014
3048
|
signal: resolved.options.signal,
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
} from "./chunk-FGXG6OLW.js";
|
|
13
13
|
import {
|
|
14
14
|
runLlm
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-TKLBBR7P.js";
|
|
16
16
|
import {
|
|
17
17
|
nolotusId
|
|
18
18
|
} from "./chunk-IB5AR52X.js";
|
|
@@ -13664,7 +13664,7 @@ var editUserMessageAndReplay = messageOperation(
|
|
|
13664
13664
|
runtimeOptions: args.runtimeOptions
|
|
13665
13665
|
});
|
|
13666
13666
|
if (agentKeyToUse) {
|
|
13667
|
-
const { streamAgentChatTurn } = await import("./agentSlice-
|
|
13667
|
+
const { streamAgentChatTurn } = await import("./agentSlice-HHNKNNYM.js");
|
|
13668
13668
|
await dispatch(
|
|
13669
13669
|
streamAgentChatTurn({
|
|
13670
13670
|
agentKey: agentKeyToUse,
|
|
@@ -14930,7 +14930,7 @@ var deleteDialogThunk = async (payload, thunkApi) => {
|
|
|
14930
14930
|
}
|
|
14931
14931
|
if (isCurrentDialog) {
|
|
14932
14932
|
await thunkApi.dispatch(resetMsgs());
|
|
14933
|
-
const { clearPendingAttachments: clearPendingAttachments2 } = await import("./dialogSlice-
|
|
14933
|
+
const { clearPendingAttachments: clearPendingAttachments2 } = await import("./dialogSlice-Q7H2YVNO.js");
|
|
14934
14934
|
dispatch(clearPendingAttachments2());
|
|
14935
14935
|
}
|
|
14936
14936
|
return { dialogKey, isCurrentDialog, attachmentPlan };
|
|
@@ -14938,15 +14938,15 @@ var deleteDialogThunk = async (payload, thunkApi) => {
|
|
|
14938
14938
|
|
|
14939
14939
|
// packages/chat/dialog/dialogSlice.ts
|
|
14940
14940
|
var runCreateDialogAction = async (args, thunkApi) => {
|
|
14941
|
-
const { createDialogAction } = await import("./createDialogAction-
|
|
14941
|
+
const { createDialogAction } = await import("./createDialogAction-3SPOJQAK.js");
|
|
14942
14942
|
return createDialogAction(args, thunkApi);
|
|
14943
14943
|
};
|
|
14944
14944
|
var runCreateAgentAutomationAction = async (args, thunkApi) => {
|
|
14945
|
-
const { createAgentAutomationAction } = await import("./createAgentAutomationAction-
|
|
14945
|
+
const { createAgentAutomationAction } = await import("./createAgentAutomationAction-DMD2VDPI.js");
|
|
14946
14946
|
return createAgentAutomationAction(args, thunkApi);
|
|
14947
14947
|
};
|
|
14948
14948
|
var runUpdateDialogTitleAction = async (args, thunkApi) => {
|
|
14949
|
-
const { updateDialogTitleAction } = await import("./updateDialogTitleAction-
|
|
14949
|
+
const { updateDialogTitleAction } = await import("./updateDialogTitleAction-XOSLNRT3.js");
|
|
14950
14950
|
return updateDialogTitleAction(args, thunkApi);
|
|
14951
14951
|
};
|
|
14952
14952
|
var runAddDialogAgentAction = async (args, thunkApi) => {
|
|
@@ -14970,7 +14970,7 @@ var runSetDialogExtraReferencesAction = async (args, thunkApi) => {
|
|
|
14970
14970
|
return setDialogExtraReferencesAction(args, thunkApi);
|
|
14971
14971
|
};
|
|
14972
14972
|
var runHandleSendMessageAction = async (args, thunkApi) => {
|
|
14973
|
-
const { handleSendMessageAction } = await import("./handleSendMessageAction-
|
|
14973
|
+
const { handleSendMessageAction } = await import("./handleSendMessageAction-FHGUFT2X.js");
|
|
14974
14974
|
return handleSendMessageAction(args, thunkApi);
|
|
14975
14975
|
};
|
|
14976
14976
|
function clearDialogState() {
|
|
@@ -14983,7 +14983,7 @@ var createPageAndAddReference = createActionAsyncThunk(
|
|
|
14983
14983
|
async (payload, { dispatch, getState, rejectWithValue }) => {
|
|
14984
14984
|
const { slateData, jsonData, title, type, fileId, groupId, dialogKey } = payload;
|
|
14985
14985
|
try {
|
|
14986
|
-
const { createDocState } = await import("./docStore-
|
|
14986
|
+
const { createDocState } = await import("./docStore-GWPFDV6Y.js");
|
|
14987
14987
|
const pageKey = await createDocState(
|
|
14988
14988
|
{ slateData, title },
|
|
14989
14989
|
{ dispatch, getState }
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
toolRegistry
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-EBH4RFJ6.js";
|
|
4
4
|
import {
|
|
5
5
|
INLINE_IMAGE_MAX_BYTES,
|
|
6
6
|
INLINE_IMAGE_TOTAL_MAX_BYTES,
|
|
7
7
|
runtime_default
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-DBCWXGOC.js";
|
|
9
9
|
import {
|
|
10
10
|
canonicalizeToolNames
|
|
11
11
|
} from "./chunk-HJTI7RZV.js";
|