nolo-cli 0.169.0-alpha.1 → 0.170.0-alpha.1
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-7J6IIHWQ.js → _executeModel-6PME6D4C.js} +25 -25
- package/{agentDeleteCommand-4RAEG26P.js → agentDeleteCommand-EKJD2CUS.js} +33 -33
- package/{agentEmailCommands-MS6MACO5.js → agentEmailCommands-RJTAA4BU.js} +35 -35
- package/{agentListCommands-4BBFWXHX.js → agentListCommands-NRNBGHJT.js} +21 -21
- package/{agentMachineCommands-4OQUFTD2.js → agentMachineCommands-E3SC3UEK.js} +19 -19
- package/{agentProviderCommands-4USYTCL3.js → agentProviderCommands-TWVILNAN.js} +2 -2
- package/{agentRecordCommands-YNLE7IBY.js → agentRecordCommands-N6SAR2LT.js} +33 -33
- package/{agentRunCommand-76DUQVWC.js → agentRunCommand-L5SRXCUP.js} +34 -34
- package/{agentRunControl-QBONJVI4.js → agentRunControl-SBHIICUQ.js} +7 -5
- package/{agentRuntimeLocal-7EZYBR6X.js → agentRuntimeLocal-JHIG3HF7.js} +17 -17
- package/{agentSlice-UN7ZHCAM.js → agentSlice-2ZMQ4KVG.js} +1 -1
- package/{appDeleteCommands-WS3UFMCB.js → appDeleteCommands-E2UE3R24.js} +20 -20
- package/{appDeployCommands-W5B7I73P.js → appDeployCommands-BOF6NBNC.js} +20 -20
- package/{appDeployStatusCommands-UEHNV2GU.js → appDeployStatusCommands-YYN4TQOV.js} +20 -20
- package/{appGetCommands-XJOBVREN.js → appGetCommands-7IPMVGR3.js} +20 -20
- package/{appListCommands-BISQV6BQ.js → appListCommands-2T4KQCAO.js} +20 -20
- package/{authCommand-H35CPF25.js → authCommand-V426ZGG2.js} +8 -8
- package/{chunk-BSKTDOGA.js → chunk-24WNRCCO.js} +3 -3
- package/{chunk-FQU23S3P.js → chunk-3DV3V7RI.js} +11 -11
- package/{chunk-AIHY74D3.js → chunk-47NIK3N5.js} +3 -3
- package/{chunk-WLPUUBFR.js → chunk-4OZD67JO.js} +2 -2
- package/{chunk-QW6SSF7V.js → chunk-4S4FWSMN.js} +12 -12
- package/{chunk-2DXGW4UO.js → chunk-5ESQFL6P.js} +9 -9
- package/{chunk-JPPQ3GUO.js → chunk-5Y3KXG5K.js} +1 -1
- package/{chunk-ASSNAASW.js → chunk-7ZGMQZ5D.js} +3 -3
- package/{chunk-URO44BCD.js → chunk-BLCK4HGZ.js} +1 -1
- package/{chunk-O4R4M4M5.js → chunk-CAAH5LNN.js} +2 -2
- package/{chunk-WO5P2HTX.js → chunk-CI5DVWU7.js} +70 -26
- package/{chunk-I7S63QUU.js → chunk-DPCJTC5B.js} +1 -1
- package/{chunk-IOFLVIKF.js → chunk-EWLPIR2S.js} +1 -1
- package/{chunk-6EQD4AQL.js → chunk-GC64WGMD.js} +1 -1
- package/{chunk-FYYSDHVQ.js → chunk-HLAL63BZ.js} +1 -1
- package/{chunk-3USFOET4.js → chunk-HQDLNI57.js} +3 -3
- package/{chunk-PIG2IUVZ.js → chunk-I2QHI2XM.js} +2 -2
- package/{chunk-46OQD3AP.js → chunk-IRXW3ZGE.js} +3 -3
- package/{chunk-CEXJ6Y3C.js → chunk-JNPJ67TZ.js} +1 -1
- package/{chunk-DI7ZFGDQ.js → chunk-K7BBHQH7.js} +2 -2
- package/{chunk-B4VCTNZL.js → chunk-KZGUC5N4.js} +22 -22
- package/{chunk-2AZSL4GL.js → chunk-L3L2HDHT.js} +3 -3
- package/{chunk-7VWWGKEQ.js → chunk-O53IEDAL.js} +3 -3
- package/{chunk-KJETBEEN.js → chunk-OPNHKULV.js} +1 -1
- package/{chunk-EWO77ZGF.js → chunk-OQ3DOBYB.js} +3 -3
- package/{chunk-TOUKACDK.js → chunk-RATR6VCP.js} +1 -1
- package/{chunk-HZMWJUSD.js → chunk-RP6YUMFM.js} +2 -2
- package/{chunk-LEZLJTQ4.js → chunk-SUBKVXFM.js} +1 -1
- package/{chunk-SAZSXMTR.js → chunk-SZGJEMTC.js} +4 -4
- package/{chunk-ZPKUJROL.js → chunk-TDNAAXUQ.js} +2 -2
- package/{chunk-SQX235S2.js → chunk-TSCI6X6C.js} +1 -1
- package/{chunk-V7PCFWX3.js → chunk-TVGX5QIN.js} +2 -2
- package/{chunk-XLBQQ5SB.js → chunk-TWOTBHEN.js} +3 -3
- package/{chunk-XLQFVHNX.js → chunk-TYQZRSL6.js} +1 -1
- package/{chunk-3URJF2TW.js → chunk-VAS64JGT.js} +3 -3
- package/{chunk-DHNQA4VI.js → chunk-VEOTS5RX.js} +1 -1
- package/{chunk-HEC32F3G.js → chunk-VN44QPWB.js} +1 -1
- package/{chunk-MFVOJ6KF.js → chunk-W6E5IXIP.js} +3 -3
- package/{chunk-XITIONPS.js → chunk-WEMVPAYW.js} +4 -4
- package/{chunk-3ELX6JK5.js → chunk-WU4JTQRE.js} +8 -8
- package/{chunk-G3VYRPTV.js → chunk-XHH46PLP.js} +1 -1
- package/{chunk-7NKZA46B.js → chunk-XVO6M6W2.js} +4 -4
- package/{chunk-KMDDG73K.js → chunk-XWX5ZGWR.js} +1 -1
- package/{chunk-45IOFLGH.js → chunk-XZJLEVFG.js} +10 -10
- package/{chunk-CMRP4XHV.js → chunk-YIPWD7ZO.js} +12 -12
- package/{chunk-RKKJ6SVM.js → chunk-Z4XD4IR7.js} +18 -16
- package/{chunk-CEQFVBI2.js → chunk-ZMMGRJAJ.js} +2 -2
- package/{commandRegistry-PDKCQHG3.js → commandRegistry-STXOC6TH.js} +55 -55
- package/{contentThunks-OO3MJAED.js → contentThunks-VUSRUMEN.js} +9 -9
- package/{createAgentAutomationAction-F3O6FJ5W.js → createAgentAutomationAction-I4N55IOA.js} +9 -9
- package/{createDialogAction-UBQKDUK5.js → createDialogAction-4SH55WZK.js} +10 -10
- package/{createPageAction-RDEDO4GF.js → createPageAction-EXFA5U3J.js} +9 -9
- package/{dialogCommands-6POPB6FB.js → dialogCommands-TFQ2565H.js} +21 -21
- package/{dialogSlice-WZCWWYR3.js → dialogSlice-ADJ3IIBU.js} +8 -8
- package/{docCreateCommands-B2M3MGX7.js → docCreateCommands-YGPCBD7R.js} +19 -19
- package/{docDeleteCommands-NHCUX4XL.js → docDeleteCommands-GPZQZBRG.js} +20 -20
- package/{docReadCommands-FOLST4JD.js → docReadCommands-KL4TEA2P.js} +19 -19
- package/{docStore-PTSCGC6T.js → docStore-6SKEPSKB.js} +1 -1
- package/{docUpdateCommands-YZT2PQP2.js → docUpdateCommands-NVPR2H5R.js} +19 -19
- package/{getPricing-XQ3N3RBP.js → getPricing-2UPNNW3Y.js} +3 -3
- package/{handleSendMessageAction-3YMQS6XO.js → handleSendMessageAction-T4PCH565.js} +19 -19
- package/index.js +4 -4
- package/{localRuntimeAdapter-6P7JHQOK.js → localRuntimeAdapter-IOYT4WQZ.js} +31 -31
- package/{machineCommands-CTE5QJBU.js → machineCommands-T3VQ5ZSC.js} +32 -32
- package/{machineWsRunDispatch-7CRVOKDC.js → machineWsRunDispatch-MC2ATAN6.js} +32 -32
- package/{models-PZQC7VV4.js → models-UUNO6DOL.js} +2 -2
- package/package.json +1 -1
- package/{providerPresetApply-PKUOHQJT.js → providerPresetApply-5K4PBX4J.js} +6 -6
- package/{providerRegistry-HNQLIFN2.js → providerRegistry-K5MSZ3Y5.js} +6 -6
- package/{readlineWorkspace-3WLNCNV4.js → readlineWorkspace-VWGKBL65.js} +40 -40
- package/{runAgentClientLoop-F6EQK26A.js → runAgentClientLoop-V6N5TFJ5.js} +23 -23
- package/{runtimeDoctorCommands-LYMJEM4F.js → runtimeDoctorCommands-MRIVZU4W.js} +5 -5
- package/{spaceCommands-XESXH5CW.js → spaceCommands-PDXZVD6O.js} +19 -19
- package/{streamAgentChatTurn-KXELVHFR.js → streamAgentChatTurn-RGSV5DZS.js} +29 -29
- package/{tools-FMNDEVTZ.js → tools-UOB4UXHK.js} +17 -17
- package/{tuiSummaryLlmCaller-FQOEF4IE.js → tuiSummaryLlmCaller-M2AORGW6.js} +8 -8
- package/{updateDialogTitleAction-65R3Y22L.js → updateDialogTitleAction-KTZFCYF2.js} +9 -9
- /package/{chunk-CGFNDIKK.js → chunk-5KTQVMCX.js} +0 -0
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
} from "./chunk-WACI5I6V.js";
|
|
9
9
|
import {
|
|
10
10
|
resolvePlatformAuthToken
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-I2QHI2XM.js";
|
|
12
12
|
|
|
13
13
|
// packages/cli/client/originShellApprovalTransport.ts
|
|
14
14
|
import { realpathSync } from "node:fs";
|
|
@@ -828,7 +828,7 @@ function scanActiveReservations(reservationsDir, deps) {
|
|
|
828
828
|
} catch {
|
|
829
829
|
}
|
|
830
830
|
const reused = expectedStart && actualStart && Number.isFinite(actualStart.getTime()) && actualStart.toISOString() !== expectedStart;
|
|
831
|
-
if (!alive || reused || record.status === "active" && ageMs >= startupWindowMs) {
|
|
831
|
+
if (!alive || reused || record.status === "active" && !!expectedStart && record.childIdentity !== "unverified" && ageMs >= startupWindowMs) {
|
|
832
832
|
updateReservationFile(filePath, fs, (r) => {
|
|
833
833
|
r.status = "reclaimed";
|
|
834
834
|
r.reclaimedAt = new Date(nowMs).toISOString();
|
|
@@ -909,14 +909,14 @@ function reserveHostMemory(deps) {
|
|
|
909
909
|
const validStart = !!params.processStartedAt && Number.isFinite(Date.parse(params.processStartedAt));
|
|
910
910
|
locked(() => updateReservationFile(recordPath, fs, (r) => {
|
|
911
911
|
if (r.status !== "reserved") throw new Error("Reservation is not reserved");
|
|
912
|
+
r.status = "active";
|
|
913
|
+
r.childIdentity = validStart ? "verified" : "unverified";
|
|
912
914
|
if (validStart) {
|
|
913
|
-
r.status = "active";
|
|
914
915
|
r.childStartedAt = params.processStartedAt;
|
|
915
916
|
}
|
|
916
917
|
if (params.runId) r.runId = params.runId;
|
|
917
918
|
if (typeof params.pid === "number") r.childPid = params.pid;
|
|
918
919
|
}));
|
|
919
|
-
if (!validStart) throw new Error("Child starttime unknown; reservation retained");
|
|
920
920
|
},
|
|
921
921
|
release(reason) {
|
|
922
922
|
locked(() => updateReservationFile(recordPath, fs, (r) => {
|
|
@@ -1472,6 +1472,17 @@ function writeRunRecord(record, deps = {}) {
|
|
|
1472
1472
|
}
|
|
1473
1473
|
fs.writeFileSync(path, payload);
|
|
1474
1474
|
}
|
|
1475
|
+
function reportRunProcessIdentity(runId, deps = {}) {
|
|
1476
|
+
const processStartedAt = new Date(Date.now() - process.uptime() * 1e3).toISOString();
|
|
1477
|
+
withRunRecordLock(runId, deps, () => {
|
|
1478
|
+
const record = readRunRecord(runId, deps);
|
|
1479
|
+
if (!record || record.pid !== void 0 && record.pid !== process.pid) return;
|
|
1480
|
+
record.pid = process.pid;
|
|
1481
|
+
record.processStartedAt = processStartedAt;
|
|
1482
|
+
record.processIdentity = "verified";
|
|
1483
|
+
writeRunRecord(record, deps);
|
|
1484
|
+
}, { strict: true });
|
|
1485
|
+
}
|
|
1475
1486
|
var FILE_EDIT_TOOL_NAMES = /* @__PURE__ */ new Set(["writeFile", "editFile"]);
|
|
1476
1487
|
var DEFAULT_ACTIVITY_WRITE_INTERVAL_MS = 2e3;
|
|
1477
1488
|
function createRunActivityTracker(runId, deps = {}, options = {}) {
|
|
@@ -1932,7 +1943,8 @@ async function spawnLocalBackgroundRun(input, deps = {}) {
|
|
|
1932
1943
|
fs: reservationFs,
|
|
1933
1944
|
now: resolvedDeps.now,
|
|
1934
1945
|
readHostMemory: () => hostMemory = (resolvedDeps.readHostMemory ?? readHostMemory)(),
|
|
1935
|
-
|
|
1946
|
+
// Admission remains conservative for existing reservations; no OS probes on startup.
|
|
1947
|
+
getProcessStartTime: () => null,
|
|
1936
1948
|
withLock: (id, fn, opts) => withRunRecordLock(id, resolvedDeps, fn, opts)
|
|
1937
1949
|
});
|
|
1938
1950
|
proc = spawn(execPath, childArgs, {
|
|
@@ -1966,24 +1978,17 @@ async function spawnLocalBackgroundRun(input, deps = {}) {
|
|
|
1966
1978
|
});
|
|
1967
1979
|
const hostMemoryNotice = emitHostMemoryNotice(hostMemory, input.output);
|
|
1968
1980
|
if (typeof proc.pid === "number") {
|
|
1969
|
-
let processStartedAt;
|
|
1970
|
-
try {
|
|
1971
|
-
processStartedAt = (resolvedDeps.getProcessStartTime ?? defaultGetProcessStartTime)(proc.pid);
|
|
1972
|
-
if (processStartedAt && !Number.isFinite(processStartedAt.getTime())) processStartedAt = null;
|
|
1973
|
-
} catch {
|
|
1974
|
-
processStartedAt = null;
|
|
1975
|
-
}
|
|
1976
1981
|
withRunRecordLock(runId, resolvedDeps, () => {
|
|
1977
1982
|
const latest = readRunRecord(runId, resolvedDeps) ?? record;
|
|
1978
1983
|
latest.pid = proc.pid;
|
|
1979
|
-
|
|
1984
|
+
latest.processIdentity ??= "unverified";
|
|
1980
1985
|
writeRunRecord(latest, resolvedDeps);
|
|
1981
1986
|
return true;
|
|
1982
1987
|
}, { strict: true });
|
|
1983
1988
|
try {
|
|
1984
1989
|
const persisted = readRunRecord(runId, resolvedDeps);
|
|
1985
|
-
reservation.associate({ runId, pid: proc.pid, processStartedAt: processStartedAt
|
|
1986
|
-
if (persisted?.pid !== proc.pid
|
|
1990
|
+
reservation.associate({ runId, pid: proc.pid, processStartedAt: persisted?.processStartedAt });
|
|
1991
|
+
if (persisted?.pid !== proc.pid) throw new Error("Child identity persistence failed: pid not bound");
|
|
1987
1992
|
} catch (error) {
|
|
1988
1993
|
throw new Error(`[host-memory-reservation] child ${proc.pid}, run ${runId}: association failed: ${error}`);
|
|
1989
1994
|
}
|
|
@@ -2187,12 +2192,14 @@ function isPidGone(pid, deps = {}) {
|
|
|
2187
2192
|
return error.code === "ESRCH";
|
|
2188
2193
|
}
|
|
2189
2194
|
}
|
|
2190
|
-
function defaultGetProcessStartTime(pid) {
|
|
2195
|
+
function defaultGetProcessStartTime(pid, deps = {}) {
|
|
2191
2196
|
if (!Number.isSafeInteger(pid) || pid <= 0) return null;
|
|
2192
2197
|
try {
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
const
|
|
2198
|
+
const execFileSync = deps.execFileSync ?? nodeExecFileSync;
|
|
2199
|
+
if ((deps.platform ?? process.platform) === "win32") {
|
|
2200
|
+
const systemRoot = (deps.env ?? process.env).SystemRoot;
|
|
2201
|
+
const shell = systemRoot ? join2(systemRoot, "System32", "WindowsPowerShell", "v1.0", "powershell.exe") : "powershell.exe";
|
|
2202
|
+
const output2 = execFileSync(shell, [
|
|
2196
2203
|
"-NoProfile",
|
|
2197
2204
|
"-NonInteractive",
|
|
2198
2205
|
"-Command",
|
|
@@ -2207,7 +2214,7 @@ function defaultGetProcessStartTime(pid) {
|
|
|
2207
2214
|
const date = new Date(output2);
|
|
2208
2215
|
return Number.isFinite(date.getTime()) ? date : null;
|
|
2209
2216
|
}
|
|
2210
|
-
const output =
|
|
2217
|
+
const output = execFileSync("ps", ["-o", "lstart=", "-p", String(pid)], {
|
|
2211
2218
|
encoding: "utf8",
|
|
2212
2219
|
stdio: ["ignore", "pipe", "ignore"],
|
|
2213
2220
|
timeout: 1e3,
|
|
@@ -2228,6 +2235,14 @@ function defaultGetProcessStartTime(pid) {
|
|
|
2228
2235
|
}
|
|
2229
2236
|
var MAX_PROCESS_START_TIME_DIFF_MS = 3e4;
|
|
2230
2237
|
var MAX_PERSISTED_PROCESS_START_TIME_DIFF_MS = 2e3;
|
|
2238
|
+
function probeProcessStartTime(pid, deps) {
|
|
2239
|
+
try {
|
|
2240
|
+
const date = deps.getProcessStartTime ? deps.getProcessStartTime(pid) : defaultGetProcessStartTime(pid, deps);
|
|
2241
|
+
return date && Number.isFinite(date.getTime()) ? date : null;
|
|
2242
|
+
} catch {
|
|
2243
|
+
return null;
|
|
2244
|
+
}
|
|
2245
|
+
}
|
|
2231
2246
|
var ORPHAN_HEARTBEAT_GRACE_MS = 1e4;
|
|
2232
2247
|
function readTimestampMs(value) {
|
|
2233
2248
|
if (!value) return null;
|
|
@@ -2235,8 +2250,7 @@ function readTimestampMs(value) {
|
|
|
2235
2250
|
return Number.isNaN(ms) ? null : ms;
|
|
2236
2251
|
}
|
|
2237
2252
|
function isPidReused(pid, expectedStartedAt, deps = {}, maxDiffMs = MAX_PROCESS_START_TIME_DIFF_MS) {
|
|
2238
|
-
const
|
|
2239
|
-
const procStartTime = getStartTime(pid);
|
|
2253
|
+
const procStartTime = probeProcessStartTime(pid, deps);
|
|
2240
2254
|
if (!procStartTime) {
|
|
2241
2255
|
return false;
|
|
2242
2256
|
}
|
|
@@ -2253,7 +2267,7 @@ function checkStaleRun(runId, deps = {}) {
|
|
|
2253
2267
|
const pidGone = isPidGone(record.pid, deps);
|
|
2254
2268
|
const expectedStartedAt = record.processStartedAt ?? record.startedAt;
|
|
2255
2269
|
const maxStartTimeDiffMs = record.processStartedAt ? MAX_PERSISTED_PROCESS_START_TIME_DIFF_MS : MAX_PROCESS_START_TIME_DIFF_MS;
|
|
2256
|
-
const pidReused = !pidGone && isPidReused(record.pid, expectedStartedAt, deps, maxStartTimeDiffMs);
|
|
2270
|
+
const pidReused = !pidGone && record.processIdentity !== "unverified" && isPidReused(record.pid, expectedStartedAt, deps, maxStartTimeDiffMs);
|
|
2257
2271
|
if (!pidGone && !pidReused) return record;
|
|
2258
2272
|
const now = deps.now ?? (() => /* @__PURE__ */ new Date());
|
|
2259
2273
|
const heartbeatAt = readTimestampMs(record.activity?.updatedAt);
|
|
@@ -2621,8 +2635,30 @@ async function terminateRunProcess(record, initialSignal, deps) {
|
|
|
2621
2635
|
const sleep = deps.sleep ?? ((ms) => new Promise((r) => setTimeout(r, ms)));
|
|
2622
2636
|
const nowMs = () => deps.now ? deps.now().getTime() : Date.now();
|
|
2623
2637
|
const signalGroup = (sig) => {
|
|
2638
|
+
const fail = (reason) => {
|
|
2639
|
+
throw new Error(`Run ${record.runId}, pid ${pid}, platform ${deps.platform ?? process.platform}: \u8EAB\u4EFD\u672A\u9A8C\u8BC1\uFF0C\u65E0\u6CD5\u5B89\u5168\u7EC8\u6B62 (${reason}). \u53EF\u5148\u786E\u8BA4\u8FDB\u7A0B\u72B6\u6001\u6216\u91CD\u542F\u8BE5 run\uFF1B\u786E\u8BA4\u8EAB\u4EFD\u540E\u91CD\u8BD5 stop/kill\u3002`);
|
|
2640
|
+
};
|
|
2641
|
+
const expectedMs = readTimestampMs(record.processStartedAt ?? record.startedAt);
|
|
2642
|
+
if (expectedMs === null) fail("no trusted process start baseline");
|
|
2643
|
+
const maxDiffMs = record.processStartedAt ? MAX_PERSISTED_PROCESS_START_TIME_DIFF_MS : MAX_PROCESS_START_TIME_DIFF_MS;
|
|
2644
|
+
const actual = probeProcessStartTime(pid, deps);
|
|
2645
|
+
if (!actual || Math.abs(actual.getTime() - expectedMs) > maxDiffMs) {
|
|
2646
|
+
fail("identity probe failed or PID start time mismatch");
|
|
2647
|
+
}
|
|
2648
|
+
const persisted = withRunRecordLock(record.runId, deps, () => {
|
|
2649
|
+
const latest = readRunRecord(record.runId, deps);
|
|
2650
|
+
if (latest) {
|
|
2651
|
+
if (latest.pid !== pid || latest.processStartedAt !== record.processStartedAt || latest.startedAt !== record.startedAt) {
|
|
2652
|
+
fail("record changed");
|
|
2653
|
+
}
|
|
2654
|
+
latest.processIdentity = "verified";
|
|
2655
|
+
writeRunRecord(latest, deps);
|
|
2656
|
+
}
|
|
2657
|
+
return true;
|
|
2658
|
+
}, { strict: true });
|
|
2659
|
+
if (persisted !== true) fail("identity persistence lock contended");
|
|
2624
2660
|
try {
|
|
2625
|
-
if (process.platform !== "win32") {
|
|
2661
|
+
if ((deps.platform ?? process.platform) !== "win32") {
|
|
2626
2662
|
kill(-pid, sig);
|
|
2627
2663
|
} else {
|
|
2628
2664
|
kill(pid, sig);
|
|
@@ -2666,7 +2702,7 @@ async function runSignalCommand(args, signal, verb, deps) {
|
|
|
2666
2702
|
`);
|
|
2667
2703
|
return 1;
|
|
2668
2704
|
}
|
|
2669
|
-
const reconciled = checkStaleRun(record.runId, deps) ?? record;
|
|
2705
|
+
const reconciled = record.status === "running" && typeof record.pid === "number" && isPidGone(record.pid, deps) ? checkStaleRun(record.runId, deps) ?? record : record;
|
|
2670
2706
|
if (isAgentRunTerminalStatus(reconciled.status)) {
|
|
2671
2707
|
deps.output.write(`Run ${reconciled.runId} is already ${reconciled.status}.
|
|
2672
2708
|
`);
|
|
@@ -2677,7 +2713,14 @@ async function runSignalCommand(args, signal, verb, deps) {
|
|
|
2677
2713
|
`);
|
|
2678
2714
|
return 1;
|
|
2679
2715
|
}
|
|
2680
|
-
|
|
2716
|
+
let confirmed;
|
|
2717
|
+
try {
|
|
2718
|
+
confirmed = await terminateRunProcess(reconciled, signal, deps);
|
|
2719
|
+
} catch (error) {
|
|
2720
|
+
deps.output.write(`${error instanceof Error ? error.message : String(error)}
|
|
2721
|
+
`);
|
|
2722
|
+
return 1;
|
|
2723
|
+
}
|
|
2681
2724
|
if (!confirmed) {
|
|
2682
2725
|
deps.output.write(
|
|
2683
2726
|
`Failed to ${verb} ${record.runId} (pid ${record.pid}): process still alive after SIGKILL.
|
|
@@ -2743,6 +2786,7 @@ export {
|
|
|
2743
2786
|
defaultGenerateBatchId,
|
|
2744
2787
|
withRunRecordLock,
|
|
2745
2788
|
writeRunRecord,
|
|
2789
|
+
reportRunProcessIdentity,
|
|
2746
2790
|
createRunActivityTracker,
|
|
2747
2791
|
readRunRecord,
|
|
2748
2792
|
backfillRunRecordParentDialog,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
fetchReferenceContents,
|
|
3
3
|
resolveReferenceAssets
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-ZMMGRJAJ.js";
|
|
5
5
|
import {
|
|
6
6
|
updateTokensAction
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-YIPWD7ZO.js";
|
|
8
8
|
import {
|
|
9
9
|
applyUpdateTokensFulfilled
|
|
10
10
|
} from "./chunk-OWYYDMGJ.js";
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
extractReasoningFromResponseOutput,
|
|
13
13
|
extractTextFromResponseOutput,
|
|
14
14
|
extractToolCallsFromResponseOutput
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-K7BBHQH7.js";
|
|
16
16
|
import {
|
|
17
17
|
isRecord
|
|
18
18
|
} from "./chunk-KUG52IAP.js";
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
resolvePlatformHostedCredentialProvider,
|
|
5
5
|
resolvePlatformProxyChatGatewayEndpoint,
|
|
6
6
|
resolvePlatformResponsesEndpoint
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-TVGX5QIN.js";
|
|
8
8
|
import {
|
|
9
9
|
CLI_PROVIDER_VALUES
|
|
10
10
|
} from "./chunk-5BHQICF2.js";
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
CLIENT_VERSION_TOO_OLD_CODE,
|
|
22
22
|
buildClientVersionGateErrorDetail,
|
|
23
23
|
evaluatePlatformHostedClientVersionGate
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-5KTQVMCX.js";
|
|
25
25
|
import {
|
|
26
26
|
asTrimmedLowercaseString
|
|
27
27
|
} from "./chunk-QSJ3HFEF.js";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
addContentToSpace
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-BLCK4HGZ.js";
|
|
4
4
|
import {
|
|
5
5
|
format,
|
|
6
6
|
prepareAndPersistMessage,
|
|
7
7
|
uiAskChoiceFunc,
|
|
8
8
|
uiAskChoiceFunctionSchema
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-YIPWD7ZO.js";
|
|
10
10
|
import {
|
|
11
11
|
formatISO
|
|
12
12
|
} from "./chunk-ZRAU6T47.js";
|
|
@@ -52,7 +52,7 @@ import {
|
|
|
52
52
|
import {
|
|
53
53
|
PLATFORM_HOSTED_DEEPSEEK_FLASH_MODEL,
|
|
54
54
|
PLATFORM_HOSTED_KIMI_PROVIDER
|
|
55
|
-
} from "./chunk-
|
|
55
|
+
} from "./chunk-5KTQVMCX.js";
|
|
56
56
|
|
|
57
57
|
// packages/chat/dialog/objectAssistantRegistry.ts
|
|
58
58
|
var OBJECT_ASSISTANT_TO_SKILL = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getModelContextWindow
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-7ZGMQZ5D.js";
|
|
4
4
|
import {
|
|
5
5
|
isRecord
|
|
6
6
|
} from "./chunk-KUG52IAP.js";
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
PLATFORM_HOSTED_KIMI_K3_MODEL,
|
|
12
12
|
isFireworksKimiModel,
|
|
13
13
|
isNoloHostedProvider
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-5KTQVMCX.js";
|
|
15
15
|
import {
|
|
16
16
|
asTrimmedLowercaseString
|
|
17
17
|
} from "./chunk-QSJ3HFEF.js";
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
refreshOpenAiCodexToken,
|
|
6
6
|
resolveServerSyncConfig,
|
|
7
7
|
xaiRefresh
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-XHH46PLP.js";
|
|
9
9
|
import {
|
|
10
10
|
clearCredentialAvailability,
|
|
11
11
|
markCredentialUnavailable,
|
|
@@ -54,7 +54,7 @@ import {
|
|
|
54
54
|
} from "./chunk-BU2YQBV4.js";
|
|
55
55
|
import {
|
|
56
56
|
applyPublicAgentCatalogOverride
|
|
57
|
-
} from "./chunk-
|
|
57
|
+
} from "./chunk-W6E5IXIP.js";
|
|
58
58
|
import {
|
|
59
59
|
buildCliPrompt
|
|
60
60
|
} from "./chunk-ATNTHIZI.js";
|
|
@@ -64,7 +64,7 @@ import {
|
|
|
64
64
|
import {
|
|
65
65
|
inlineImageUrlsForCustomProvider,
|
|
66
66
|
prepareTools
|
|
67
|
-
} from "./chunk-
|
|
67
|
+
} from "./chunk-L3L2HDHT.js";
|
|
68
68
|
import {
|
|
69
69
|
getServerProviderSecret
|
|
70
70
|
} from "./chunk-HS7MLR74.js";
|
|
@@ -86,18 +86,18 @@ import {
|
|
|
86
86
|
resolveCliLocalRuntimeKeyCapability,
|
|
87
87
|
resolveCliLocalSpawnDispatch,
|
|
88
88
|
resolveStartAgentRunCwd
|
|
89
|
-
} from "./chunk-
|
|
89
|
+
} from "./chunk-4S4FWSMN.js";
|
|
90
90
|
import {
|
|
91
91
|
deriveCredentialGroup,
|
|
92
92
|
deriveCustomProviderCredentialGroup
|
|
93
|
-
} from "./chunk-
|
|
93
|
+
} from "./chunk-WEMVPAYW.js";
|
|
94
94
|
import {
|
|
95
95
|
fetchWithTransientRetry,
|
|
96
96
|
isTransientFetchError
|
|
97
97
|
} from "./chunk-KFHREHUQ.js";
|
|
98
98
|
import {
|
|
99
99
|
resolveAgentRequiredPackIds
|
|
100
|
-
} from "./chunk-
|
|
100
|
+
} from "./chunk-4OZD67JO.js";
|
|
101
101
|
import {
|
|
102
102
|
applyBuiltinAgentRuntimeOverride,
|
|
103
103
|
applyTokenUsageToDayStats,
|
|
@@ -106,14 +106,14 @@ import {
|
|
|
106
106
|
resolveBuiltinPlatformAgentConfig,
|
|
107
107
|
runKeyed,
|
|
108
108
|
validateAskChoiceInput
|
|
109
|
-
} from "./chunk-
|
|
109
|
+
} from "./chunk-YIPWD7ZO.js";
|
|
110
110
|
import {
|
|
111
111
|
BUILTIN_DIALOG_LLM_CHAT_FALLBACK_MODEL,
|
|
112
112
|
BUILTIN_TITLE_LLM_CONFIG
|
|
113
113
|
} from "./chunk-523DITKR.js";
|
|
114
114
|
import {
|
|
115
115
|
fetchServerSyncedCredential
|
|
116
|
-
} from "./chunk-
|
|
116
|
+
} from "./chunk-TWOTBHEN.js";
|
|
117
117
|
import {
|
|
118
118
|
isTombstoneRecord
|
|
119
119
|
} from "./chunk-D2MDMY2M.js";
|
|
@@ -170,7 +170,7 @@ import {
|
|
|
170
170
|
runExecShellGates,
|
|
171
171
|
validateConfiguredRootExecutionLease,
|
|
172
172
|
verifyOwnerRouteAck
|
|
173
|
-
} from "./chunk-
|
|
173
|
+
} from "./chunk-5ESQFL6P.js";
|
|
174
174
|
import {
|
|
175
175
|
accumulateGeminiChunks,
|
|
176
176
|
buildGeminiGenerateContentRequest,
|
|
@@ -182,7 +182,7 @@ import {
|
|
|
182
182
|
resolveAntigravityFinishReason,
|
|
183
183
|
resolveGeminiModelQuirks,
|
|
184
184
|
shouldUseGeminiNativeToolRoute
|
|
185
|
-
} from "./chunk-
|
|
185
|
+
} from "./chunk-XWX5ZGWR.js";
|
|
186
186
|
import {
|
|
187
187
|
PlatformStreamInterruptedError,
|
|
188
188
|
buildPlatformChatCompletionRequest,
|
|
@@ -193,24 +193,24 @@ import {
|
|
|
193
193
|
readPlatformChatSseCompletion,
|
|
194
194
|
resolvePlatformChatProviderConfig,
|
|
195
195
|
shouldUsePlatformChatProvider
|
|
196
|
-
} from "./chunk-
|
|
196
|
+
} from "./chunk-XVO6M6W2.js";
|
|
197
197
|
import {
|
|
198
198
|
readSseDataValues,
|
|
199
199
|
readSseFrames
|
|
200
200
|
} from "./chunk-HNUWUO75.js";
|
|
201
201
|
import {
|
|
202
202
|
resolveAgentRuntimeConfigFromRecord
|
|
203
|
-
} from "./chunk-
|
|
203
|
+
} from "./chunk-JNPJ67TZ.js";
|
|
204
204
|
import {
|
|
205
205
|
resolveHistoricalToolContentCap
|
|
206
|
-
} from "./chunk-
|
|
206
|
+
} from "./chunk-24WNRCCO.js";
|
|
207
207
|
import {
|
|
208
208
|
collectStablePromptPrefix,
|
|
209
209
|
convertMessagesToResponsesInput,
|
|
210
210
|
findAgentStatePairingIssues,
|
|
211
211
|
stablePromptCacheKey,
|
|
212
212
|
toResponsesTools
|
|
213
|
-
} from "./chunk-
|
|
213
|
+
} from "./chunk-K7BBHQH7.js";
|
|
214
214
|
import {
|
|
215
215
|
buildNoloWorkspaceOpenAiTools,
|
|
216
216
|
filterClientNoloWorkspaceToolNames,
|
|
@@ -231,7 +231,7 @@ import {
|
|
|
231
231
|
import {
|
|
232
232
|
isOAuthApiKeyRef,
|
|
233
233
|
normalizeUsage
|
|
234
|
-
} from "./chunk-
|
|
234
|
+
} from "./chunk-VN44QPWB.js";
|
|
235
235
|
import {
|
|
236
236
|
isDevinOAuthAgent
|
|
237
237
|
} from "./chunk-5ZUL4CUO.js";
|
|
@@ -241,7 +241,7 @@ import {
|
|
|
241
241
|
observeMeaningfulProviderResponse,
|
|
242
242
|
observeMeaningfulProviderResponseAt,
|
|
243
243
|
withProviderCallTimingFields
|
|
244
|
-
} from "./chunk-
|
|
244
|
+
} from "./chunk-7ZGMQZ5D.js";
|
|
245
245
|
import {
|
|
246
246
|
clipCompactText
|
|
247
247
|
} from "./chunk-5MMAK75Q.js";
|
|
@@ -303,7 +303,7 @@ import {
|
|
|
303
303
|
terminateRunProcess,
|
|
304
304
|
transitionRunToTerminal,
|
|
305
305
|
withQueueLock
|
|
306
|
-
} from "./chunk-
|
|
306
|
+
} from "./chunk-CI5DVWU7.js";
|
|
307
307
|
import {
|
|
308
308
|
TASK_PREVIEW_MAX,
|
|
309
309
|
formatListRunsCard,
|
|
@@ -340,16 +340,16 @@ import {
|
|
|
340
340
|
} from "./chunk-LCBAMY2M.js";
|
|
341
341
|
import {
|
|
342
342
|
isAntigravityOAuthAgent
|
|
343
|
-
} from "./chunk-
|
|
343
|
+
} from "./chunk-TSCI6X6C.js";
|
|
344
344
|
import {
|
|
345
345
|
buildProviderSessionHeaders,
|
|
346
346
|
resolvePlatformAuthToken
|
|
347
|
-
} from "./chunk-
|
|
347
|
+
} from "./chunk-I2QHI2XM.js";
|
|
348
348
|
import {
|
|
349
349
|
anthropicOAuthModelMaxOutputTokens,
|
|
350
350
|
findModelConfig,
|
|
351
351
|
isAdaptiveThinkingModelId
|
|
352
|
-
} from "./chunk-
|
|
352
|
+
} from "./chunk-GC64WGMD.js";
|
|
353
353
|
import {
|
|
354
354
|
CLI_PROVIDER_VALUES,
|
|
355
355
|
isCliProvider
|
|
@@ -12169,7 +12169,7 @@ function createCliLocalRuntimeAdapter(deps) {
|
|
|
12169
12169
|
const recordRunExecutionIsolation = async () => {
|
|
12170
12170
|
try {
|
|
12171
12171
|
const { writeFileSync: writeFileSync4, mkdirSync: mkdirSync4 } = await import("node:fs");
|
|
12172
|
-
const { resolveRunsDir: resolveRunsDir2 } = await import("./agentRunControl-
|
|
12172
|
+
const { resolveRunsDir: resolveRunsDir2 } = await import("./agentRunControl-SBHIICUQ.js");
|
|
12173
12173
|
const fact = resolveLocalRunExecutionIsolationFact({
|
|
12174
12174
|
// F1:显式点名宿主执行的 run 在审计里必须与 docker 沙盒区分开
|
|
12175
12175
|
// (reason: host-explicit-writes vs docker-workload)。
|
|
@@ -12201,7 +12201,7 @@ function createCliLocalRuntimeAdapter(deps) {
|
|
|
12201
12201
|
dockerWorkloadReleased = true;
|
|
12202
12202
|
dockerWorkloadLoad = null;
|
|
12203
12203
|
if (loaded) {
|
|
12204
|
-
const { resolveRunsDir: resolveRunsDir2 } = await import("./agentRunControl-
|
|
12204
|
+
const { resolveRunsDir: resolveRunsDir2 } = await import("./agentRunControl-SBHIICUQ.js");
|
|
12205
12205
|
const exportRunDiff = deps.exportDockerRunDiffArtifact ?? exportDockerRunDiffArtifact;
|
|
12206
12206
|
const warn = (message) => process.stderr.write(`[nolo] ${message}
|
|
12207
12207
|
`);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
toolRegistry
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-4S4FWSMN.js";
|
|
4
4
|
import {
|
|
5
5
|
runtime_default
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-YIPWD7ZO.js";
|
|
7
7
|
import {
|
|
8
8
|
canonicalizeToolNames
|
|
9
9
|
} from "./chunk-5EBLANFT.js";
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
} from "./chunk-KUG52IAP.js";
|
|
13
13
|
import {
|
|
14
14
|
isNoloHostedProvider
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-5KTQVMCX.js";
|
|
16
16
|
import {
|
|
17
17
|
asTrimmedLowercaseString
|
|
18
18
|
} from "./chunk-QSJ3HFEF.js";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
listUserRecordsFromServers,
|
|
3
3
|
readLiveDbRecordAfterTombstoneMerge
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-SUBKVXFM.js";
|
|
5
5
|
import {
|
|
6
6
|
agentRecordHasConfiguredCredential
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-OPNHKULV.js";
|
|
8
8
|
import {
|
|
9
9
|
deriveCredentialGroup
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-WEMVPAYW.js";
|
|
11
11
|
import {
|
|
12
12
|
isTombstoneRecord
|
|
13
13
|
} from "./chunk-D2MDMY2M.js";
|
|
@@ -556,7 +556,7 @@ async function buildCreatedAgentRecord(args) {
|
|
|
556
556
|
const resolvedAgentInput = resolveCliAgentKeyInput(args.parsed.agentInput);
|
|
557
557
|
const agentKey = resolvedAgentInput.startsWith("agent-") ? resolvedAgentInput : createAgentKey.private(userId || "local", resolvedAgentInput);
|
|
558
558
|
if (args.parsed.presetId) {
|
|
559
|
-
const { resolveProviderPresetFields } = await import("./providerPresetApply-
|
|
559
|
+
const { resolveProviderPresetFields } = await import("./providerPresetApply-5K4PBX4J.js");
|
|
560
560
|
const fields = resolveProviderPresetFields(args.parsed.presetId);
|
|
561
561
|
if (fields.kind === "manual") {
|
|
562
562
|
throw new Error(
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ANTIGRAVITY_CLOUD_CODE_BASE_URL
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-TSCI6X6C.js";
|
|
4
4
|
import {
|
|
5
5
|
commandCodeModels,
|
|
6
6
|
kimiCodeModels,
|
|
@@ -11,13 +11,13 @@ import {
|
|
|
11
11
|
qwenTokenPlanModels,
|
|
12
12
|
stepfunModels,
|
|
13
13
|
stepfunStepPlanModels
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-GC64WGMD.js";
|
|
15
15
|
import {
|
|
16
16
|
PLATFORM_HOSTED_DEEPSEEK_FLASH_OFF_PEAK_PRICE,
|
|
17
17
|
PLATFORM_HOSTED_DEEPSEEK_FLASH_PEAK_PRICE,
|
|
18
18
|
PLATFORM_HOSTED_DEEPSEEK_PRO_OFF_PEAK_PRICE,
|
|
19
19
|
PLATFORM_HOSTED_DEEPSEEK_PRO_PEAK_PRICE
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-5KTQVMCX.js";
|
|
21
21
|
import {
|
|
22
22
|
asTrimmedLowercaseString
|
|
23
23
|
} from "./chunk-QSJ3HFEF.js";
|
|
@@ -333,7 +333,7 @@ async function saveDocState(arg, { dispatch, getState }) {
|
|
|
333
333
|
).unwrap();
|
|
334
334
|
if (dbSpaceId) {
|
|
335
335
|
try {
|
|
336
|
-
const { updateContentTitle } = await import("./contentThunks-
|
|
336
|
+
const { updateContentTitle } = await import("./contentThunks-VUSRUMEN.js");
|
|
337
337
|
await dispatch(
|
|
338
338
|
updateContentTitle({
|
|
339
339
|
spaceId: dbSpaceId,
|
|
@@ -372,7 +372,7 @@ async function saveDocState(arg, { dispatch, getState }) {
|
|
|
372
372
|
}
|
|
373
373
|
}
|
|
374
374
|
async function createDocState(args, thunkApi) {
|
|
375
|
-
const { createPageAction } = await import("./createPageAction-
|
|
375
|
+
const { createPageAction } = await import("./createPageAction-EXFA5U3J.js");
|
|
376
376
|
return createPageAction(args, thunkApi);
|
|
377
377
|
}
|
|
378
378
|
function subscribe(listener) {
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import {
|
|
2
2
|
shouldUseServerProxy
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-VN44QPWB.js";
|
|
4
4
|
import {
|
|
5
5
|
ANTIGRAVITY_CLOUD_CODE_BASE_URL,
|
|
6
6
|
isAntigravityCloudCodeBaseUrl,
|
|
7
7
|
isAntigravityOAuthAgent
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-TSCI6X6C.js";
|
|
9
9
|
import {
|
|
10
10
|
isOpenAiResponsesModel,
|
|
11
11
|
resolvePlatformChatCompletionsEndpoint,
|
|
12
12
|
resolvePlatformResponsesEndpoint
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-TVGX5QIN.js";
|
|
14
14
|
import {
|
|
15
15
|
findModelConfig
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-GC64WGMD.js";
|
|
17
17
|
import {
|
|
18
18
|
asOptionalTrimmedString
|
|
19
19
|
} from "./chunk-G3SUCT4W.js";
|