nolo-cli 0.47.0-alpha.2 → 0.47.0-alpha.3
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/{agentEmailCommands-LQKO5GRW.js → agentEmailCommands-TNFWV6XO.js} +3 -3
- package/{agentMachineCommands-P5K454CN.js → agentMachineCommands-OENA64ZO.js} +1 -1
- package/{agentRecordCommands-Z4QYCNP4.js → agentRecordCommands-JLN2EWGC.js} +3 -3
- package/{agentRunCommand-HV3Y34B5.js → agentRunCommand-CQM7DINV.js} +4 -4
- package/{agentRunControl-LHXOP4IU.js → agentRunControl-4GHHSXFZ.js} +1 -1
- package/{agentSuperviseCommands-IMRZ56RC.js → agentSuperviseCommands-VB6BUS5H.js} +2 -2
- package/{chunk-25J3BB35.js → chunk-3N2KFW63.js} +47 -7
- package/{chunk-HOM6NILS.js → chunk-5OUK7FZE.js} +1 -1
- package/{chunk-JEGPB5H2.js → chunk-5TNI2BMD.js} +1 -1
- package/{chunk-Q6DMA2OM.js → chunk-GYXN23QE.js} +23 -17
- package/{chunk-7XZ5GXSN.js → chunk-J3UALFHL.js} +1 -1
- package/{chunk-AEXP2UZT.js → chunk-WHVQA7PJ.js} +8 -2
- package/{chunk-MWT2BBCH.js → chunk-XLIHNL4X.js} +3 -3
- package/{dialogCommands-6E5P35DG.js → dialogCommands-COU5C635.js} +3 -1
- package/index.js +26 -26
- package/{machineCommands-QCE4KLGR.js → machineCommands-MHKXEUGC.js} +3 -3
- package/{machineWsRunDispatch-FBRMGU5D.js → machineWsRunDispatch-ZV736PJZ.js} +3 -3
- package/package.json +1 -1
- package/{readlineWorkspace-2TACWKMN.js → readlineWorkspace-L3IFOIIV.js} +9 -9
|
@@ -8,8 +8,8 @@ import {
|
|
|
8
8
|
} from "./chunk-LYGNQHUW.js";
|
|
9
9
|
import {
|
|
10
10
|
runAgentCreateCommand
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import "./chunk-
|
|
11
|
+
} from "./chunk-5OUK7FZE.js";
|
|
12
|
+
import "./chunk-GYXN23QE.js";
|
|
13
13
|
import "./chunk-I4JISVWK.js";
|
|
14
14
|
import "./chunk-NI2BS6UD.js";
|
|
15
15
|
import {
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
resolveCliAgentKeyInput
|
|
25
25
|
} from "./chunk-EKLRRZIN.js";
|
|
26
26
|
import "./chunk-JDSUTNYY.js";
|
|
27
|
-
import "./chunk-
|
|
27
|
+
import "./chunk-WHVQA7PJ.js";
|
|
28
28
|
import "./chunk-JBTJAPUF.js";
|
|
29
29
|
import "./chunk-AYXSUBVC.js";
|
|
30
30
|
import "./chunk-ATNTHIZI.js";
|
|
@@ -83,7 +83,7 @@ async function defaultExecuteCli(provider, prompt, options) {
|
|
|
83
83
|
return executeCli(provider, prompt, options);
|
|
84
84
|
}
|
|
85
85
|
async function forwardConnectorRunMessage(machine, message, pushMessage, executeCli, env, fetchImpl) {
|
|
86
|
-
const { handleConnectorRunMessage } = await import("./machineWsRunDispatch-
|
|
86
|
+
const { handleConnectorRunMessage } = await import("./machineWsRunDispatch-ZV736PJZ.js");
|
|
87
87
|
return handleConnectorRunMessage(message, pushMessage, executeCli, env, fetchImpl);
|
|
88
88
|
}
|
|
89
89
|
async function detectLaunchableMachineInfo() {
|
|
@@ -2,8 +2,8 @@ import {
|
|
|
2
2
|
runAgentCreateCommand,
|
|
3
3
|
runAgentReadCommand,
|
|
4
4
|
runAgentUpdateCommand
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-5OUK7FZE.js";
|
|
6
|
+
import "./chunk-GYXN23QE.js";
|
|
7
7
|
import "./chunk-I4JISVWK.js";
|
|
8
8
|
import "./chunk-NI2BS6UD.js";
|
|
9
9
|
import "./chunk-43CXXVJD.js";
|
|
@@ -11,7 +11,7 @@ import "./chunk-DQLYEGP7.js";
|
|
|
11
11
|
import "./chunk-OYNDYVSE.js";
|
|
12
12
|
import "./chunk-EKLRRZIN.js";
|
|
13
13
|
import "./chunk-JDSUTNYY.js";
|
|
14
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-WHVQA7PJ.js";
|
|
15
15
|
import "./chunk-JBTJAPUF.js";
|
|
16
16
|
import "./chunk-AYXSUBVC.js";
|
|
17
17
|
import "./chunk-ATNTHIZI.js";
|
|
@@ -5,12 +5,12 @@ import {
|
|
|
5
5
|
prependSubjectDialogMarker,
|
|
6
6
|
resolveWorkflowReference,
|
|
7
7
|
runAgentRunCommand
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-XLIHNL4X.js";
|
|
9
|
+
import "./chunk-J3UALFHL.js";
|
|
10
10
|
import {
|
|
11
11
|
parseAgentRunArgs
|
|
12
12
|
} from "./chunk-LYGNQHUW.js";
|
|
13
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-GYXN23QE.js";
|
|
14
14
|
import "./chunk-I4JISVWK.js";
|
|
15
15
|
import "./chunk-NI2BS6UD.js";
|
|
16
16
|
import "./chunk-43CXXVJD.js";
|
|
@@ -18,7 +18,7 @@ import "./chunk-DQLYEGP7.js";
|
|
|
18
18
|
import "./chunk-OYNDYVSE.js";
|
|
19
19
|
import "./chunk-EKLRRZIN.js";
|
|
20
20
|
import "./chunk-JDSUTNYY.js";
|
|
21
|
-
import "./chunk-
|
|
21
|
+
import "./chunk-WHVQA7PJ.js";
|
|
22
22
|
import "./chunk-ESHYE7WU.js";
|
|
23
23
|
import "./chunk-JBTJAPUF.js";
|
|
24
24
|
import "./chunk-LTRXGFMS.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
generateRunReport,
|
|
3
3
|
parseDoDResultsFromMarkdown
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-J3UALFHL.js";
|
|
5
5
|
import {
|
|
6
6
|
checkStaleRun,
|
|
7
7
|
finalizeRunRecord,
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
resolveRunsDir,
|
|
13
13
|
spawnLocalBackgroundRun,
|
|
14
14
|
terminateRunProcess
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-WHVQA7PJ.js";
|
|
16
16
|
import "./chunk-KXKQO4Q6.js";
|
|
17
17
|
import {
|
|
18
18
|
toErrorMessage
|
|
@@ -5170,7 +5170,12 @@ async function readDialogSnapshot(args) {
|
|
|
5170
5170
|
};
|
|
5171
5171
|
} catch (error) {
|
|
5172
5172
|
localFailure = describeLocalDialogFailure(error);
|
|
5173
|
-
if (!isLevelNotFoundError(error) && !isLevelDbOpenUnavailableError(error))
|
|
5173
|
+
if (!isLevelNotFoundError(error) && !isLevelDbOpenUnavailableError(error)) {
|
|
5174
|
+
const enriched = error;
|
|
5175
|
+
enriched.dialogId = args.dialogId;
|
|
5176
|
+
if (localFailure) enriched.local = localFailure;
|
|
5177
|
+
throw enriched;
|
|
5178
|
+
}
|
|
5174
5179
|
}
|
|
5175
5180
|
try {
|
|
5176
5181
|
const result = await tryHttpDialogCandidates({
|
|
@@ -5184,8 +5189,9 @@ async function readDialogSnapshot(args) {
|
|
|
5184
5189
|
});
|
|
5185
5190
|
return { ...result, candidateBases };
|
|
5186
5191
|
} catch (error) {
|
|
5192
|
+
const enriched = error;
|
|
5193
|
+
enriched.dialogId = args.dialogId;
|
|
5187
5194
|
if (localFailure) {
|
|
5188
|
-
const enriched = error;
|
|
5189
5195
|
enriched.local = localFailure;
|
|
5190
5196
|
const attemptedPaths = localFailure.paths ?? [localFailure.path];
|
|
5191
5197
|
enriched.message = `${enriched.message}; local read attempted (${attemptedPaths.join(" \u2192 ")}): ${localFailure.reason}`;
|
|
@@ -5427,7 +5433,36 @@ async function readSpaceDialogRecords(args) {
|
|
|
5427
5433
|
return { spaceId, records, failures };
|
|
5428
5434
|
}
|
|
5429
5435
|
var MAX_ATTEMPT_LINES = 5;
|
|
5430
|
-
function
|
|
5436
|
+
function isCleanDialogNotFoundFailure(error) {
|
|
5437
|
+
if (typeof error !== "object" || error === null) return false;
|
|
5438
|
+
const attempts = Array.isArray(error.attempts) ? error.attempts : [];
|
|
5439
|
+
const hasHttp = attempts.length > 0;
|
|
5440
|
+
if (hasHttp) {
|
|
5441
|
+
const allHttp404 = attempts.every((attempt) => attempt.status === 404);
|
|
5442
|
+
if (!allHttp404) return false;
|
|
5443
|
+
}
|
|
5444
|
+
const localFailure = error.local;
|
|
5445
|
+
if (localFailure) {
|
|
5446
|
+
if (localFailure.attempts && localFailure.attempts.length > 0) {
|
|
5447
|
+
const allLocalClean = localFailure.attempts.every(
|
|
5448
|
+
(a) => a.status === "miss" || a.status === "missing" || a.status === "locked"
|
|
5449
|
+
);
|
|
5450
|
+
if (!allLocalClean) return false;
|
|
5451
|
+
} else {
|
|
5452
|
+
return false;
|
|
5453
|
+
}
|
|
5454
|
+
}
|
|
5455
|
+
return hasHttp || Boolean(localFailure);
|
|
5456
|
+
}
|
|
5457
|
+
function formatDialogReadFailure(error, fallbackDialogId) {
|
|
5458
|
+
const targetId = typeof error === "object" && error !== null && typeof error.dialogId === "string" && error.dialogId || fallbackDialogId;
|
|
5459
|
+
if (isCleanDialogNotFoundFailure(error)) {
|
|
5460
|
+
logger.debug(
|
|
5461
|
+
{ error, dialogId: targetId },
|
|
5462
|
+
"dialog not found across all local and HTTP candidates"
|
|
5463
|
+
);
|
|
5464
|
+
return targetId ? `[nolo] dialog ${targetId} not found` : `[nolo] dialog not found`;
|
|
5465
|
+
}
|
|
5431
5466
|
const message = toErrorMessage(error);
|
|
5432
5467
|
const attempts = typeof error === "object" && error !== null && Array.isArray(error.attempts) ? error.attempts : [];
|
|
5433
5468
|
const lines = [`[nolo] dialog read failed: ${message}`];
|
|
@@ -5448,7 +5483,7 @@ function formatDialogReadFailure(error) {
|
|
|
5448
5483
|
}
|
|
5449
5484
|
if (localFailure.locked) {
|
|
5450
5485
|
lines.push(
|
|
5451
|
-
" - \
|
|
5486
|
+
" - \u672C\u5730\u5E93\u6B63\u88AB\u67D0\u4E2A\u8FDB\u7A0B\u6301\u6709 LevelDB \u6392\u4ED6\u9501\uFF08\u5E38\u5E38\u5C31\u662F\u5F53\u524D TUI \u5BBF\u4E3B\u8FDB\u7A0B\u81EA\u5DF1\uFF0C\u672C\u5730\u53EA\u8BFB\u5728\u6301\u9501\u671F\u95F4\u4E0D\u53EF\u7528\uFF09\uFF1B\u8BF7\u901A\u8FC7 server \u7AEF\u70B9\u8BFB\u53D6\u8BE5 dialog\u3002"
|
|
5452
5487
|
);
|
|
5453
5488
|
}
|
|
5454
5489
|
}
|
|
@@ -5522,7 +5557,9 @@ async function runDialogReadCommand(args, deps = {}) {
|
|
|
5522
5557
|
dialogId: target.dialogId,
|
|
5523
5558
|
dialogKey: target.dialogKey,
|
|
5524
5559
|
fetchImpl: deps.fetchImpl ?? fetch,
|
|
5525
|
-
limit
|
|
5560
|
+
limit,
|
|
5561
|
+
readLocalDialog: deps.readLocalDialog,
|
|
5562
|
+
readLocalDialogAtDbPath: deps.readLocalDialogAtDbPath
|
|
5526
5563
|
});
|
|
5527
5564
|
const orderedMsgs = Array.isArray(read.msgs) ? [...read.msgs].reverse() : read.msgs;
|
|
5528
5565
|
const lastAssistantMessage = Array.isArray(orderedMsgs) ? [...orderedMsgs].reverse().find((message) => message?.role === "assistant" || message?.authorRole === "assistant") : null;
|
|
@@ -5583,7 +5620,7 @@ async function runDialogReadCommand(args, deps = {}) {
|
|
|
5583
5620
|
output.write("\n");
|
|
5584
5621
|
return 0;
|
|
5585
5622
|
} catch (error) {
|
|
5586
|
-
output.write(`${formatDialogReadFailure(error)}
|
|
5623
|
+
output.write(`${formatDialogReadFailure(error, target.dialogId)}
|
|
5587
5624
|
`);
|
|
5588
5625
|
return 1;
|
|
5589
5626
|
}
|
|
@@ -5619,7 +5656,9 @@ async function runDialogStatusCommand(args, deps = {}) {
|
|
|
5619
5656
|
dialogId: target.dialogId,
|
|
5620
5657
|
dialogKey: target.dialogKey,
|
|
5621
5658
|
fetchImpl: deps.fetchImpl ?? fetch,
|
|
5622
|
-
limit: 1
|
|
5659
|
+
limit: 1,
|
|
5660
|
+
readLocalDialog: deps.readLocalDialog,
|
|
5661
|
+
readLocalDialogAtDbPath: deps.readLocalDialogAtDbPath
|
|
5623
5662
|
});
|
|
5624
5663
|
output.write(renderCompactDialogStatus({
|
|
5625
5664
|
...read.meta ?? {},
|
|
@@ -6033,6 +6072,7 @@ export {
|
|
|
6033
6072
|
isScheduledDialog,
|
|
6034
6073
|
isLevelDbOpenUnavailableError,
|
|
6035
6074
|
readDialogSnapshot,
|
|
6075
|
+
isCleanDialogNotFoundFailure,
|
|
6036
6076
|
runDialogReadCommand,
|
|
6037
6077
|
runDialogStatusCommand,
|
|
6038
6078
|
runDialogQueryCommand,
|
|
@@ -43,7 +43,7 @@ import {
|
|
|
43
43
|
spawnLocalBackgroundRun,
|
|
44
44
|
terminateRunProcess,
|
|
45
45
|
withQueueLock
|
|
46
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-WHVQA7PJ.js";
|
|
47
47
|
import {
|
|
48
48
|
inferCaptureIntent
|
|
49
49
|
} from "./chunk-AYXSUBVC.js";
|
|
@@ -10706,15 +10706,14 @@ function buildRunStatusPayload(reconciled, deps, opts = {}) {
|
|
|
10706
10706
|
startedAt: reconciled.startedAt,
|
|
10707
10707
|
endedAt: reconciled.endedAt ?? null,
|
|
10708
10708
|
exitCode: reconciled.exitCode ?? null,
|
|
10709
|
-
//
|
|
10710
|
-
// via `nolo dialog read <dialogId>`.
|
|
10711
|
-
//
|
|
10712
|
-
//
|
|
10713
|
-
|
|
10714
|
-
|
|
10715
|
-
|
|
10716
|
-
|
|
10717
|
-
...reconciled.dialogId ? { dialogId: reconciled.dialogId } : {},
|
|
10709
|
+
// Non-ephemeral runs expose dialogId so the caller can read the
|
|
10710
|
+
// agent's actual output via `nolo dialog read <dialogId>`. Ephemeral
|
|
10711
|
+
// runs do not persist a dialog (their ephemeral dialogId is synthetic)
|
|
10712
|
+
// and instead return `{ ephemeral: true, dialogNote: ... }`.
|
|
10713
|
+
...reconciled.ephemeral ? {
|
|
10714
|
+
ephemeral: true,
|
|
10715
|
+
dialogNote: "\u6B64 run \u672A\u6301\u4E45\u5316 dialog\uFF0C\u7ED3\u679C\u89C1 run \u8F93\u51FA"
|
|
10716
|
+
} : reconciled.dialogId ? { dialogId: reconciled.dialogId } : {},
|
|
10718
10717
|
...reportExists ? { reportPath } : {},
|
|
10719
10718
|
// Progress is what makes tailLines:0 an actual answer to "is it
|
|
10720
10719
|
// stuck?". Without it a poll returns `running` and a pid, so the only
|
|
@@ -10777,6 +10776,7 @@ ${JSON.stringify(args.input)}`;
|
|
|
10777
10776
|
...dodCommands && dodCommands.length > 0 ? { dodCommands } : {},
|
|
10778
10777
|
cwd: deps.cwd ?? process.cwd(),
|
|
10779
10778
|
message,
|
|
10779
|
+
...args.ephemeral === true ? { ephemeral: true } : {},
|
|
10780
10780
|
output: noopOutput
|
|
10781
10781
|
},
|
|
10782
10782
|
deps
|
|
@@ -10830,7 +10830,7 @@ ${JSON.stringify(args.input)}`;
|
|
|
10830
10830
|
};
|
|
10831
10831
|
}
|
|
10832
10832
|
async function spawnContinuationRun(reconciled, userInput, deps) {
|
|
10833
|
-
if (!reconciled.dialogId) {
|
|
10833
|
+
if (!reconciled.ephemeral && !reconciled.dialogId) {
|
|
10834
10834
|
throw new Error("\u8BE5 run \u65E0\u5173\u8054 dialog\uFF0C\u65E0\u6CD5\u7EED\u8DD1\u3002");
|
|
10835
10835
|
}
|
|
10836
10836
|
const agentKey = reconciled.agentKey;
|
|
@@ -10838,12 +10838,14 @@ async function spawnContinuationRun(reconciled, userInput, deps) {
|
|
|
10838
10838
|
const rawArgs = [
|
|
10839
10839
|
"--agent",
|
|
10840
10840
|
agentKey,
|
|
10841
|
-
|
|
10842
|
-
|
|
10841
|
+
// 仅非 ephemeral 且确有 dialogId 时才续接原 dialog。ephemeral 不落盘,
|
|
10842
|
+
// 其 dialogId 是合成的,绝不能透传给子进程 --continue(子进程读不到必然
|
|
10843
|
+
// 全链路 404);续跑转为开一个新的 ephemeral run。
|
|
10844
|
+
...!reconciled.ephemeral && reconciled.dialogId ? ["--continue", reconciled.dialogId] : [],
|
|
10843
10845
|
"--msg-file",
|
|
10844
10846
|
"PLACEHOLDER",
|
|
10845
10847
|
"--bg",
|
|
10846
|
-
...reconciled.ephemeral
|
|
10848
|
+
...reconciled.ephemeral ? ["--ephemeral"] : []
|
|
10847
10849
|
];
|
|
10848
10850
|
const { runId: newRunId, batchId: resolvedBatchId } = await spawnLocalBackgroundRun(
|
|
10849
10851
|
{
|
|
@@ -10856,6 +10858,7 @@ async function spawnContinuationRun(reconciled, userInput, deps) {
|
|
|
10856
10858
|
...reconciled.parentDialogId ? { parentDialogId: reconciled.parentDialogId } : {},
|
|
10857
10859
|
cwd: reconciled.cwd ?? deps.cwd ?? process.cwd(),
|
|
10858
10860
|
message: userInput,
|
|
10861
|
+
...reconciled.ephemeral ? { ephemeral: true } : {},
|
|
10859
10862
|
output: noopOutput
|
|
10860
10863
|
},
|
|
10861
10864
|
deps
|
|
@@ -10867,7 +10870,8 @@ async function spawnContinuationRun(reconciled, userInput, deps) {
|
|
|
10867
10870
|
content: JSON.stringify({
|
|
10868
10871
|
runId: reconciled.runId,
|
|
10869
10872
|
newRunId,
|
|
10870
|
-
dialogId
|
|
10873
|
+
// ephemeral 的 dialogId 是合成的(不落盘),不外泄;调用方按 ephemeral 语义处理。
|
|
10874
|
+
...reconciled.ephemeral ? { ephemeral: true } : { dialogId: reconciled.dialogId },
|
|
10871
10875
|
mode: "continue",
|
|
10872
10876
|
status: "running",
|
|
10873
10877
|
...agentName ? { agentName } : {},
|
|
@@ -11030,7 +11034,8 @@ function createCliControlAgentRunExecutor(deps = {}) {
|
|
|
11030
11034
|
return {
|
|
11031
11035
|
content: JSON.stringify({
|
|
11032
11036
|
runId: reconciled.runId,
|
|
11033
|
-
|
|
11037
|
+
// ephemeral 不外泄合成 dialogId;非 ephemeral 保持原 dialogId 透出。
|
|
11038
|
+
...reconciled.ephemeral ? { ephemeral: true } : afterCheck.dialogId || reconciled.dialogId ? { dialogId: afterCheck.dialogId ?? reconciled.dialogId } : {},
|
|
11034
11039
|
mode: "enqueue",
|
|
11035
11040
|
consumed: true,
|
|
11036
11041
|
status: afterCheck.status,
|
|
@@ -11052,7 +11057,8 @@ function createCliControlAgentRunExecutor(deps = {}) {
|
|
|
11052
11057
|
return {
|
|
11053
11058
|
content: JSON.stringify({
|
|
11054
11059
|
runId: reconciled.runId,
|
|
11055
|
-
|
|
11060
|
+
// ephemeral 不外泄合成 dialogId(enqueue 场景同样收敛)。
|
|
11061
|
+
...reconciled.ephemeral ? { ephemeral: true } : reconciled.dialogId ? { dialogId: reconciled.dialogId } : {},
|
|
11056
11062
|
mode: "enqueue",
|
|
11057
11063
|
queued: queuedCount,
|
|
11058
11064
|
status: "running",
|
|
@@ -777,7 +777,8 @@ async function spawnLocalBackgroundRun(input, deps = {}) {
|
|
|
777
777
|
batchId,
|
|
778
778
|
...typeof input.parentDialogId === "string" && input.parentDialogId.trim() ? { parentDialogId: input.parentDialogId.trim() } : {},
|
|
779
779
|
...dodCommands && dodCommands.length > 0 ? { dodCommands } : {},
|
|
780
|
-
...spawnHead ? { spawnHead } : {}
|
|
780
|
+
...spawnHead ? { spawnHead } : {},
|
|
781
|
+
...input.ephemeral ? { ephemeral: true } : {}
|
|
781
782
|
};
|
|
782
783
|
fs.writeFileSync(recordPath, JSON.stringify(record, null, 2));
|
|
783
784
|
const rawArgsWithQueue = (input.rawArgs ?? []).some(
|
|
@@ -1164,8 +1165,13 @@ function printStatusOnce(record, deps) {
|
|
|
1164
1165
|
`);
|
|
1165
1166
|
if (typeof record.exitCode === "number") deps.output.write(`exitCode: ${record.exitCode}
|
|
1166
1167
|
`);
|
|
1167
|
-
if (record.
|
|
1168
|
+
if (record.ephemeral) {
|
|
1169
|
+
deps.output.write(`dialog: ephemeral (no persisted child dialog)
|
|
1168
1170
|
`);
|
|
1171
|
+
} else if (record.dialogId) {
|
|
1172
|
+
deps.output.write(`dialog: ${record.dialogId}
|
|
1173
|
+
`);
|
|
1174
|
+
}
|
|
1169
1175
|
if (record.note) deps.output.write(`note: ${record.note}
|
|
1170
1176
|
`);
|
|
1171
1177
|
const activitySummary = formatActivitySummary(record.activity);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
generateRunReport
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-J3UALFHL.js";
|
|
4
4
|
import {
|
|
5
5
|
buildLocalRunEnv,
|
|
6
6
|
isFullstackCodingAgentRef,
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
parseAgentRunEvent,
|
|
21
21
|
t,
|
|
22
22
|
toolLabel
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-GYXN23QE.js";
|
|
24
24
|
import {
|
|
25
25
|
getReadableCliDb
|
|
26
26
|
} from "./chunk-43CXXVJD.js";
|
|
@@ -43,7 +43,7 @@ import {
|
|
|
43
43
|
readRunRecord,
|
|
44
44
|
resolveRunQueuePath,
|
|
45
45
|
spawnLocalBackgroundRun
|
|
46
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-WHVQA7PJ.js";
|
|
47
47
|
import {
|
|
48
48
|
resolveMachineId
|
|
49
49
|
} from "./chunk-ESHYE7WU.js";
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import {
|
|
2
|
+
isCleanDialogNotFoundFailure,
|
|
2
3
|
isLevelDbOpenUnavailableError,
|
|
3
4
|
isScheduledDialog,
|
|
4
5
|
normalizeDialogRecord,
|
|
@@ -9,7 +10,7 @@ import {
|
|
|
9
10
|
runDialogReadCommand,
|
|
10
11
|
runDialogStatusCommand,
|
|
11
12
|
sortDialogs
|
|
12
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-3N2KFW63.js";
|
|
13
14
|
import "./chunk-ID4G2MAR.js";
|
|
14
15
|
import "./chunk-Q24S4NDF.js";
|
|
15
16
|
import "./chunk-DQLYEGP7.js";
|
|
@@ -72,6 +73,7 @@ import "./chunk-CF7PE763.js";
|
|
|
72
73
|
import "./chunk-G3SUCT4W.js";
|
|
73
74
|
import "./chunk-4VNS5WPM.js";
|
|
74
75
|
export {
|
|
76
|
+
isCleanDialogNotFoundFailure,
|
|
75
77
|
isLevelDbOpenUnavailableError,
|
|
76
78
|
isScheduledDialog,
|
|
77
79
|
normalizeDialogRecord,
|
package/index.js
CHANGED
|
@@ -127,7 +127,7 @@ function createDaemonShortcutCommand(path, description, command2) {
|
|
|
127
127
|
// packages/cli/agentInternalCommandEntries.ts
|
|
128
128
|
function getAgentInternalCommandEntries() {
|
|
129
129
|
const createAgentRunCommand = (path, description) => createContextCommand(path, description, async (args2, ctx) => {
|
|
130
|
-
const { runAgentRunCommand } = await import("./agentRunCommand-
|
|
130
|
+
const { runAgentRunCommand } = await import("./agentRunCommand-CQM7DINV.js");
|
|
131
131
|
return runAgentRunCommand(args2, {
|
|
132
132
|
env: ctx.env,
|
|
133
133
|
scriptDir: ctx.scriptDir,
|
|
@@ -143,7 +143,7 @@ function getAgentInternalCommandEntries() {
|
|
|
143
143
|
return runAgentListCommand(args2, deps);
|
|
144
144
|
}),
|
|
145
145
|
createEnvCommand(["agent", "create"], "Create a new agent", async (args2, deps) => {
|
|
146
|
-
const { runAgentCreateCommand } = await import("./agentRecordCommands-
|
|
146
|
+
const { runAgentCreateCommand } = await import("./agentRecordCommands-JLN2EWGC.js");
|
|
147
147
|
return runAgentCreateCommand(args2, deps);
|
|
148
148
|
}),
|
|
149
149
|
createEnvCommand(["agent", "models"], "List models available on an OpenAI-compatible provider", async (args2, deps) => {
|
|
@@ -155,32 +155,32 @@ function getAgentInternalCommandEntries() {
|
|
|
155
155
|
return runAgentPullCommand(args2, deps);
|
|
156
156
|
}),
|
|
157
157
|
createEnvCommand(["agent", "read"], "Read a single agent", async (args2, deps) => {
|
|
158
|
-
const { runAgentReadCommand } = await import("./agentRecordCommands-
|
|
158
|
+
const { runAgentReadCommand } = await import("./agentRecordCommands-JLN2EWGC.js");
|
|
159
159
|
return runAgentReadCommand(args2, deps);
|
|
160
160
|
}),
|
|
161
161
|
createAgentRunCommand(["agent", "run"], "Run an agent"),
|
|
162
162
|
createEnvCommand(["agent", "ps"], "List active and recent local agent runs (--json for machine-readable output)", async (_args, deps) => {
|
|
163
|
-
const { runAgentPsCommand } = await import("./agentRunControl-
|
|
163
|
+
const { runAgentPsCommand } = await import("./agentRunControl-4GHHSXFZ.js");
|
|
164
164
|
return runAgentPsCommand(_args, { ...deps, output: process.stdout });
|
|
165
165
|
}),
|
|
166
166
|
createEnvCommand(["agent", "status"], "Show status of a local agent run (--json, --watch, --interval-ms N)", async (args2, deps) => {
|
|
167
|
-
const { runAgentStatusCommand } = await import("./agentRunControl-
|
|
167
|
+
const { runAgentStatusCommand } = await import("./agentRunControl-4GHHSXFZ.js");
|
|
168
168
|
return runAgentStatusCommand(args2, { ...deps, output: process.stdout });
|
|
169
169
|
}),
|
|
170
170
|
createEnvCommand(["agent", "logs"], "Show logs of a local agent run", async (args2, deps) => {
|
|
171
|
-
const { runAgentLogsCommand } = await import("./agentRunControl-
|
|
171
|
+
const { runAgentLogsCommand } = await import("./agentRunControl-4GHHSXFZ.js");
|
|
172
172
|
return runAgentLogsCommand(args2, { ...deps, output: process.stdout });
|
|
173
173
|
}),
|
|
174
174
|
createEnvCommand(["agent", "stop"], "Stop a local agent run", async (args2, deps) => {
|
|
175
|
-
const { runAgentStopCommand } = await import("./agentRunControl-
|
|
175
|
+
const { runAgentStopCommand } = await import("./agentRunControl-4GHHSXFZ.js");
|
|
176
176
|
return runAgentStopCommand(args2, { ...deps, output: process.stdout });
|
|
177
177
|
}),
|
|
178
178
|
createEnvCommand(["agent", "kill"], "Kill a local agent run", async (args2, deps) => {
|
|
179
|
-
const { runAgentKillCommand } = await import("./agentRunControl-
|
|
179
|
+
const { runAgentKillCommand } = await import("./agentRunControl-4GHHSXFZ.js");
|
|
180
180
|
return runAgentKillCommand(args2, { ...deps, output: process.stdout });
|
|
181
181
|
}),
|
|
182
182
|
createContextCommand(["agent", "supervise"], "Supervise serial task execution with watchdog and retries", async (args2, ctx) => {
|
|
183
|
-
const { runAgentSuperviseCommand } = await import("./agentSuperviseCommands-
|
|
183
|
+
const { runAgentSuperviseCommand } = await import("./agentSuperviseCommands-VB6BUS5H.js");
|
|
184
184
|
return runAgentSuperviseCommand(args2, {
|
|
185
185
|
env: ctx.env,
|
|
186
186
|
scriptDir: ctx.scriptDir,
|
|
@@ -193,26 +193,26 @@ function getAgentInternalCommandEntries() {
|
|
|
193
193
|
return runSetupOfflineMarxistsAgentCommand(args2, deps);
|
|
194
194
|
}),
|
|
195
195
|
createEnvCommand(["agent", "update"], "Update agent fields", async (args2, deps) => {
|
|
196
|
-
const { runAgentUpdateCommand } = await import("./agentRecordCommands-
|
|
196
|
+
const { runAgentUpdateCommand } = await import("./agentRecordCommands-JLN2EWGC.js");
|
|
197
197
|
return runAgentUpdateCommand(args2, deps);
|
|
198
198
|
}),
|
|
199
199
|
createEnvCommand(["agent", "email", "provision"], "Provision a controlled inbox for an agent", async (args2, deps) => {
|
|
200
|
-
const { runAgentEmailProvisionCommand } = await import("./agentEmailCommands-
|
|
200
|
+
const { runAgentEmailProvisionCommand } = await import("./agentEmailCommands-TNFWV6XO.js");
|
|
201
201
|
return runAgentEmailProvisionCommand(args2, deps);
|
|
202
202
|
}),
|
|
203
203
|
createEnvCommand(["agent", "email", "bind"], "Bind an existing email address to an agent", async (args2, deps) => {
|
|
204
|
-
const { runAgentEmailBindCommand } = await import("./agentEmailCommands-
|
|
204
|
+
const { runAgentEmailBindCommand } = await import("./agentEmailCommands-TNFWV6XO.js");
|
|
205
205
|
return runAgentEmailBindCommand(args2, deps);
|
|
206
206
|
}),
|
|
207
207
|
createEnvCommand(["agent", "email", "transfer"], "Transfer an email identity from one agent to another (cross-account)", async (args2, deps) => {
|
|
208
|
-
const { runAgentEmailTransferCommand } = await import("./agentEmailCommands-
|
|
208
|
+
const { runAgentEmailTransferCommand } = await import("./agentEmailCommands-TNFWV6XO.js");
|
|
209
209
|
return runAgentEmailTransferCommand(args2, deps);
|
|
210
210
|
}),
|
|
211
211
|
createEnvCommand(
|
|
212
212
|
["agent", "email", "create-and-provision"],
|
|
213
213
|
"Create an agent and provision its controlled inbox",
|
|
214
214
|
async (args2, deps) => {
|
|
215
|
-
const { runAgentEmailCreateAndProvisionCommand } = await import("./agentEmailCommands-
|
|
215
|
+
const { runAgentEmailCreateAndProvisionCommand } = await import("./agentEmailCommands-TNFWV6XO.js");
|
|
216
216
|
return runAgentEmailCreateAndProvisionCommand(args2, deps);
|
|
217
217
|
}
|
|
218
218
|
),
|
|
@@ -233,15 +233,15 @@ function getAgentInternalCommandEntries() {
|
|
|
233
233
|
return runAgentRevokeGrantCommand(args2, deps);
|
|
234
234
|
}),
|
|
235
235
|
createEnvCommand(["agent", "bind-current"], "Bind an agent to this machine", async (args2, deps) => {
|
|
236
|
-
const { runAgentBindCurrentCommand } = await import("./agentMachineCommands-
|
|
236
|
+
const { runAgentBindCurrentCommand } = await import("./agentMachineCommands-OENA64ZO.js");
|
|
237
237
|
return runAgentBindCurrentCommand(args2, deps);
|
|
238
238
|
}),
|
|
239
239
|
createEnvCommand(["agent", "smoke-current"], "Smoke test a bound agent through this machine", async (args2, deps) => {
|
|
240
|
-
const { runAgentSmokeCurrentCommand } = await import("./agentMachineCommands-
|
|
240
|
+
const { runAgentSmokeCurrentCommand } = await import("./agentMachineCommands-OENA64ZO.js");
|
|
241
241
|
return runAgentSmokeCurrentCommand(args2, deps);
|
|
242
242
|
}),
|
|
243
243
|
createEnvCommand(["agent", "runtime-doctor"], "Diagnose current machine runtime compatibility", async (args2, deps) => {
|
|
244
|
-
const { runAgentRuntimeDoctorCommand } = await import("./agentMachineCommands-
|
|
244
|
+
const { runAgentRuntimeDoctorCommand } = await import("./agentMachineCommands-OENA64ZO.js");
|
|
245
245
|
return runAgentRuntimeDoctorCommand(args2, deps);
|
|
246
246
|
}),
|
|
247
247
|
createAgentRunCommand(["agent", "chat"], "Chat with an agent")
|
|
@@ -278,23 +278,23 @@ function getAppInternalCommandEntries() {
|
|
|
278
278
|
function getDialogInternalCommandEntries() {
|
|
279
279
|
return [
|
|
280
280
|
createEnvCommand(["dialog", "list"], "List dialogs (default --limit 50; --all/--limit 0 full; --jsonl streams)", async (args2, deps) => {
|
|
281
|
-
const { runDialogListCommand } = await import("./dialogCommands-
|
|
281
|
+
const { runDialogListCommand } = await import("./dialogCommands-COU5C635.js");
|
|
282
282
|
return runDialogListCommand(args2, deps);
|
|
283
283
|
}),
|
|
284
284
|
createEnvCommand(["dialog", "delete"], "Delete one or more dialogs", async (args2, deps) => {
|
|
285
|
-
const { runDialogDeleteCommand } = await import("./dialogCommands-
|
|
285
|
+
const { runDialogDeleteCommand } = await import("./dialogCommands-COU5C635.js");
|
|
286
286
|
return runDialogDeleteCommand(args2, deps);
|
|
287
287
|
}),
|
|
288
288
|
createEnvCommand(["dialog", "query"], "Query dialogs by subject refs (default --limit 50; --all full; --jsonl streams)", async (args2, deps) => {
|
|
289
|
-
const { runDialogQueryCommand } = await import("./dialogCommands-
|
|
289
|
+
const { runDialogQueryCommand } = await import("./dialogCommands-COU5C635.js");
|
|
290
290
|
return runDialogQueryCommand(args2, deps);
|
|
291
291
|
}),
|
|
292
292
|
createEnvCommand(["dialog", "read"], "Read a dialog", async (args2, deps) => {
|
|
293
|
-
const { runDialogReadCommand } = await import("./dialogCommands-
|
|
293
|
+
const { runDialogReadCommand } = await import("./dialogCommands-COU5C635.js");
|
|
294
294
|
return runDialogReadCommand(args2, deps);
|
|
295
295
|
}),
|
|
296
296
|
createEnvCommand(["dialog", "status"], "Read compact dialog status", async (args2, deps) => {
|
|
297
|
-
const { runDialogStatusCommand } = await import("./dialogCommands-
|
|
297
|
+
const { runDialogStatusCommand } = await import("./dialogCommands-COU5C635.js");
|
|
298
298
|
return runDialogStatusCommand(args2, deps);
|
|
299
299
|
})
|
|
300
300
|
];
|
|
@@ -426,15 +426,15 @@ function getSystemInternalCommandEntries(renderHelpText2) {
|
|
|
426
426
|
return runWhoamiCommand({ args: args2, env: ctx.env });
|
|
427
427
|
}),
|
|
428
428
|
createEntrypointEnvCommand(["connect"], "Send machine heartbeats or hold a connector websocket", async (args2, deps) => {
|
|
429
|
-
const { runMachineConnectCommand } = await import("./machineCommands-
|
|
429
|
+
const { runMachineConnectCommand } = await import("./machineCommands-MHKXEUGC.js");
|
|
430
430
|
return runMachineConnectCommand(args2, deps);
|
|
431
431
|
}),
|
|
432
432
|
createDaemonShortcutCommand(["daemon"], "Run the connector daemon shortcut", async (args2, deps) => {
|
|
433
|
-
const { runMachineConnectCommand } = await import("./machineCommands-
|
|
433
|
+
const { runMachineConnectCommand } = await import("./machineCommands-MHKXEUGC.js");
|
|
434
434
|
return runMachineConnectCommand(args2, deps);
|
|
435
435
|
}),
|
|
436
436
|
createEnvCommand(["machine", "status"], "List machines registered to the current profile", async (args2, deps) => {
|
|
437
|
-
const { runMachineStatusCommand } = await import("./machineCommands-
|
|
437
|
+
const { runMachineStatusCommand } = await import("./machineCommands-MHKXEUGC.js");
|
|
438
438
|
return runMachineStatusCommand(args2, deps);
|
|
439
439
|
}),
|
|
440
440
|
createEnvCommand(["doctor", "runtime"], "Diagnose local-first agent runtime selection", async (args2, deps) => {
|
|
@@ -824,7 +824,7 @@ async function runScript(script, forwardedArgs, env) {
|
|
|
824
824
|
return proc.exited;
|
|
825
825
|
}
|
|
826
826
|
async function launchTuiWorkspace(args2) {
|
|
827
|
-
const { startTuiWorkspace } = await import("./readlineWorkspace-
|
|
827
|
+
const { startTuiWorkspace } = await import("./readlineWorkspace-L3IFOIIV.js");
|
|
828
828
|
const { createTuiSummaryLlmCaller } = await import("./tuiSummaryLlmCaller-NBTWT57U.js");
|
|
829
829
|
return startTuiWorkspace({
|
|
830
830
|
...args2,
|
|
@@ -2,19 +2,19 @@ import {
|
|
|
2
2
|
buildMachinePermissionPromptBlock,
|
|
3
3
|
handleConnectorRunMessage,
|
|
4
4
|
resolveMachineRunPermissionPolicy
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-5TNI2BMD.js";
|
|
6
6
|
import {
|
|
7
7
|
isConnectorWebSocketAuthError,
|
|
8
8
|
isConnectorWebSocketRetryableError,
|
|
9
9
|
resolveConnectorWebSocketTarget
|
|
10
10
|
} from "./chunk-MQRZ5QUH.js";
|
|
11
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-GYXN23QE.js";
|
|
12
12
|
import "./chunk-I4JISVWK.js";
|
|
13
13
|
import "./chunk-NI2BS6UD.js";
|
|
14
14
|
import "./chunk-OYNDYVSE.js";
|
|
15
15
|
import "./chunk-EKLRRZIN.js";
|
|
16
16
|
import "./chunk-JDSUTNYY.js";
|
|
17
|
-
import "./chunk-
|
|
17
|
+
import "./chunk-WHVQA7PJ.js";
|
|
18
18
|
import {
|
|
19
19
|
detectMachineInfo
|
|
20
20
|
} from "./chunk-ESHYE7WU.js";
|
|
@@ -11,14 +11,14 @@ import {
|
|
|
11
11
|
runtimeWorkspacePermissionPolicy,
|
|
12
12
|
scopePermissionPolicyToRuntimeWorkspace,
|
|
13
13
|
summarizeAgentConfigForLogs
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import "./chunk-
|
|
14
|
+
} from "./chunk-5TNI2BMD.js";
|
|
15
|
+
import "./chunk-GYXN23QE.js";
|
|
16
16
|
import "./chunk-I4JISVWK.js";
|
|
17
17
|
import "./chunk-NI2BS6UD.js";
|
|
18
18
|
import "./chunk-OYNDYVSE.js";
|
|
19
19
|
import "./chunk-EKLRRZIN.js";
|
|
20
20
|
import "./chunk-JDSUTNYY.js";
|
|
21
|
-
import "./chunk-
|
|
21
|
+
import "./chunk-WHVQA7PJ.js";
|
|
22
22
|
import "./chunk-JBTJAPUF.js";
|
|
23
23
|
import "./chunk-AYXSUBVC.js";
|
|
24
24
|
import "./chunk-ATNTHIZI.js";
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
normalizeDialogRecord,
|
|
4
4
|
readDialogSnapshot,
|
|
5
5
|
sortDialogs
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-3N2KFW63.js";
|
|
7
7
|
import {
|
|
8
8
|
ANSI_ESCAPE_REGEX,
|
|
9
9
|
COLLAPSED_PASTE_PLACEHOLDER_RE,
|
|
@@ -64,7 +64,7 @@ import {
|
|
|
64
64
|
wrapTextToLines,
|
|
65
65
|
wrapTranscriptLine,
|
|
66
66
|
wrapTranscriptLineWithLayout
|
|
67
|
-
} from "./chunk-
|
|
67
|
+
} from "./chunk-XLIHNL4X.js";
|
|
68
68
|
import {
|
|
69
69
|
listFavoriteAgentIdsAcrossServers,
|
|
70
70
|
listLocalCachedAgents,
|
|
@@ -77,7 +77,7 @@ import {
|
|
|
77
77
|
listUserRecordsFromServers,
|
|
78
78
|
readLiveDbRecordAfterTombstoneMerge
|
|
79
79
|
} from "./chunk-Q24S4NDF.js";
|
|
80
|
-
import "./chunk-
|
|
80
|
+
import "./chunk-J3UALFHL.js";
|
|
81
81
|
import "./chunk-LYGNQHUW.js";
|
|
82
82
|
import {
|
|
83
83
|
createCliLocalRuntimeAdapter,
|
|
@@ -86,7 +86,7 @@ import {
|
|
|
86
86
|
readTimestamp,
|
|
87
87
|
setCliLocale,
|
|
88
88
|
t
|
|
89
|
-
} from "./chunk-
|
|
89
|
+
} from "./chunk-GYXN23QE.js";
|
|
90
90
|
import "./chunk-I4JISVWK.js";
|
|
91
91
|
import "./chunk-NI2BS6UD.js";
|
|
92
92
|
import {
|
|
@@ -108,7 +108,7 @@ import {
|
|
|
108
108
|
isRunRecordClaimed,
|
|
109
109
|
listRunRecords,
|
|
110
110
|
readRunRecord
|
|
111
|
-
} from "./chunk-
|
|
111
|
+
} from "./chunk-WHVQA7PJ.js";
|
|
112
112
|
import "./chunk-ESHYE7WU.js";
|
|
113
113
|
import "./chunk-JBTJAPUF.js";
|
|
114
114
|
import "./chunk-LTRXGFMS.js";
|
|
@@ -2442,12 +2442,12 @@ function describeRun(record, nowMs = Date.now()) {
|
|
|
2442
2442
|
if (verbose && typeof record.exitCode === "number") {
|
|
2443
2443
|
lines.push(`exitCode: ${record.exitCode}`);
|
|
2444
2444
|
}
|
|
2445
|
-
if (record.
|
|
2446
|
-
lines.push(`childDialogId: ${record.dialogId}`);
|
|
2447
|
-
} else if (record.ephemeral) {
|
|
2445
|
+
if (record.ephemeral) {
|
|
2448
2446
|
lines.push(`ephemeral: true (no persisted child dialog)`);
|
|
2447
|
+
} else if (record.dialogId) {
|
|
2448
|
+
lines.push(`childDialogId: ${record.dialogId}`);
|
|
2449
2449
|
} else {
|
|
2450
|
-
lines.push(`childDialogId: missing (result unpersisted
|
|
2450
|
+
lines.push(`childDialogId: missing (result unpersisted)`);
|
|
2451
2451
|
}
|
|
2452
2452
|
const duration = runDuration(record, nowMs);
|
|
2453
2453
|
if (duration) lines.push(`duration: ${duration}`);
|