nolo-cli 0.66.0-alpha.4 → 0.67.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.
Files changed (62) hide show
  1. package/{_executeModel-UYF2UEIG.js → _executeModel-C5K4UL5I.js} +13 -13
  2. package/{agentDeleteCommand-7SWSSU4X.js → agentDeleteCommand-7RESZDRC.js} +6 -6
  3. package/{agentEmailCommands-UAF3YDG6.js → agentEmailCommands-KES5FG2E.js} +15 -15
  4. package/{agentListCommands-473D3OB3.js → agentListCommands-VFBLREFU.js} +8 -8
  5. package/{agentMachineCommands-NWHVKMP7.js → agentMachineCommands-UJ77TKWZ.js} +6 -6
  6. package/{agentRecordCommands-G5ZQQNEC.js → agentRecordCommands-MZBPYUGL.js} +15 -15
  7. package/{agentRunCommand-ZTRT252J.js → agentRunCommand-R3RWG53B.js} +15 -15
  8. package/{agentRuntimeLocal-3JLUMWN7.js → agentRuntimeLocal-BD7R3OJL.js} +3 -3
  9. package/{agentSlice-RPMDYBLC.js → agentSlice-UP66DIC2.js} +1 -1
  10. package/{appDeleteCommands-SCJZAMUA.js → appDeleteCommands-X3UF4ZHF.js} +7 -7
  11. package/{appDeployCommands-RVBQZJUT.js → appDeployCommands-MFHLJIYZ.js} +7 -7
  12. package/{appDeployStatusCommands-BUPLMNTO.js → appDeployStatusCommands-BGXSUHY6.js} +7 -7
  13. package/{appGetCommands-NQ34IZRG.js → appGetCommands-KEA6FZTF.js} +7 -7
  14. package/{appListCommands-KZHI5DQM.js → appListCommands-CZGMZW3L.js} +7 -7
  15. package/{chatQueueReduxAdapter-2Z6DYXAG.js → chatQueueReduxAdapter-VVXE2NXW.js} +2 -2
  16. package/{chunk-J2WQUFGG.js → chunk-5DUAG5G7.js} +40 -24
  17. package/{chunk-FHAGENAS.js → chunk-AUKZOZFG.js} +1 -1
  18. package/{chunk-76JYRUX4.js → chunk-AVJQ4TDL.js} +14 -1
  19. package/{chunk-UZPQSVM6.js → chunk-B62OSA77.js} +1 -1
  20. package/{chunk-XOPPOOTE.js → chunk-BG7ZGBKH.js} +5 -4
  21. package/{chunk-6AAQCFLQ.js → chunk-CLZYOOI3.js} +8 -8
  22. package/{chunk-4SCMOQRM.js → chunk-FPT2E44F.js} +2 -2
  23. package/{chunk-G2MPS44L.js → chunk-HPRMNGAM.js} +1 -1
  24. package/{chunk-YDNDUOB5.js → chunk-IF6UQNAK.js} +1 -1
  25. package/{chunk-RNYLWVME.js → chunk-IOZR6BLM.js} +3 -3
  26. package/{chunk-37XDGCY7.js → chunk-JWO3RQSH.js} +1 -1
  27. package/{chunk-BWHZ4H2Q.js → chunk-MN2XJEWL.js} +7 -7
  28. package/{chunk-HUZUAHZ6.js → chunk-NFTTUZ3L.js} +2 -2
  29. package/{chunk-UMIARYFE.js → chunk-OHJWIXXW.js} +3 -3
  30. package/{chunk-P7OOB7QP.js → chunk-Q4OT2DC7.js} +1 -1
  31. package/{chunk-CTCW7U7N.js → chunk-Q6FF2MCK.js} +1 -1
  32. package/{chunk-XCNSZUQA.js → chunk-QPXRNDI3.js} +2 -2
  33. package/{chunk-ZSR7L46Q.js → chunk-RCNQCXPM.js} +43 -27
  34. package/{chunk-PEZJEQAO.js → chunk-T7PQFKJU.js} +105 -35
  35. package/{chunk-6B2AUXKR.js → chunk-TTTW4DIT.js} +5 -5
  36. package/{chunk-5P6YOSF3.js → chunk-UBWLW3KY.js} +4 -4
  37. package/{chunk-6X5B2VF5.js → chunk-UFTOGLCE.js} +1 -1
  38. package/{chunk-GVYMHBG3.js → chunk-UNAVSDC5.js} +1 -1
  39. package/{chunk-RRY4U37C.js → chunk-UZXOOSHF.js} +7 -7
  40. package/{chunk-RJ2SAFB5.js → chunk-V3ZKNK5D.js} +550 -1
  41. package/{contentThunks-GMRDVLFD.js → contentThunks-BHML6O7K.js} +3 -3
  42. package/{createAgentAutomationAction-CH6Q7JMD.js → createAgentAutomationAction-K5YJO4IA.js} +3 -3
  43. package/{createDialogAction-ARYHXJ2V.js → createDialogAction-SFMZLPS4.js} +4 -4
  44. package/{createPageAction-RAPK4J4H.js → createPageAction-UD7BSFQS.js} +3 -3
  45. package/{dialogCommands-JAAYSIOE.js → dialogCommands-2ABSL4ND.js} +7 -7
  46. package/{dialogSlice-CJNADK2R.js → dialogSlice-DEC5GV6X.js} +2 -2
  47. package/{docCreateCommands-U5OCW42O.js → docCreateCommands-2QZCW4HZ.js} +6 -6
  48. package/{docDeleteCommands-6RAGSIKC.js → docDeleteCommands-WKZKQAKM.js} +7 -7
  49. package/{docReadCommands-ID6VUNQD.js → docReadCommands-WMKJCR4Q.js} +6 -6
  50. package/{docStore-6ZFYOHQT.js → docStore-IBPCRTTX.js} +1 -1
  51. package/{docUpdateCommands-UIC4LWFG.js → docUpdateCommands-KPLM63NK.js} +6 -6
  52. package/{handleSendMessageAction-36NZDUHT.js → handleSendMessageAction-C7CZNGMB.js} +2 -2
  53. package/index.js +40 -40
  54. package/{machineCommands-25QIEYZQ.js → machineCommands-6BG3AHT5.js} +14 -14
  55. package/{machineWsRunDispatch-HWYVWOIE.js → machineWsRunDispatch-G2KJ6NQF.js} +14 -14
  56. package/package.json +1 -1
  57. package/{readlineWorkspace-22XWLYEH.js → readlineWorkspace-5LZ3EDIQ.js} +18 -18
  58. package/{runAgentClientLoop-NYNYXB5C.js → runAgentClientLoop-CICP3O2T.js} +11 -11
  59. package/{spaceCommands-VWJ2BUYK.js → spaceCommands-NQOIERT6.js} +6 -6
  60. package/{streamAgentChatTurn-EK4UVC2Y.js → streamAgentChatTurn-QUD4FY5I.js} +12 -12
  61. package/{tools-U4GOB2KS.js → tools-MAP6O2YZ.js} +8 -8
  62. package/{updateDialogTitleAction-EXREKMC5.js → updateDialogTitleAction-L6CCRVUK.js} +3 -3
@@ -39,7 +39,7 @@ import {
39
39
  requiresBareImageUrl,
40
40
  resolveToolGuidedSections,
41
41
  toBareImageUrlMessages
42
- } from "./chunk-76JYRUX4.js";
42
+ } from "./chunk-AVJQ4TDL.js";
43
43
  import {
44
44
  convertMessagesToResponsesInput,
45
45
  extractReasoningFromResponseOutput,
@@ -60,14 +60,19 @@ import {
60
60
  buildProviderExecutionPlan
61
61
  } from "./chunk-VLQRD7ZJ.js";
62
62
  import {
63
+ BRIDGE_STREAM_MAX_CHARS,
64
+ DEFAULT_READ_DIALOG_MAX_RESPONSE_CHARS,
63
65
  NOLO_WORKSPACE_TOOL_NAMES,
64
66
  applyToolSurfaceConstraints,
67
+ buildDialogReadEnvelope,
65
68
  buildNoloWorkspaceCommandArgs,
69
+ createStreamingDialogReadProjector,
66
70
  noloPositiveIntegerString,
67
71
  noloStringArg,
68
72
  parseNoloWorkspaceToolArguments,
73
+ readTextStreamUpToChars,
69
74
  resolveNoloDialogInput
70
- } from "./chunk-RJ2SAFB5.js";
75
+ } from "./chunk-V3ZKNK5D.js";
71
76
  import {
72
77
  buildDialogFallbackTitleFromUserInput
73
78
  } from "./chunk-2MBTWINN.js";
@@ -13210,7 +13215,7 @@ ${metadataText}` : "";
13210
13215
  content: contentForProjection,
13211
13216
  toolName: args2.toolName
13212
13217
  });
13213
- spillNote = `; spillFile=${spill.displayPath}; totalLines=${spill.totalLines}`;
13218
+ spillNote = `; spillFile=${spill.displayPath}; totalLines=${spill.totalLines}; hint=read full output via readFile`;
13214
13219
  } catch {
13215
13220
  }
13216
13221
  }
@@ -15675,6 +15680,7 @@ async function executeLocalToolWithPolicy(args2) {
15675
15680
  import { existsSync as existsSync3 } from "node:fs";
15676
15681
  import { createHash as createHash3 } from "node:crypto";
15677
15682
  import { lstat, mkdir, readdir as readdir2, readFile as readFile3, realpath, stat as stat3, writeFile } from "node:fs/promises";
15683
+ import { homedir } from "node:os";
15678
15684
  import { dirname, isAbsolute as isAbsolute2, relative as relative3, resolve as resolve4, sep } from "node:path";
15679
15685
  import { spawn as spawnChildProcess3 } from "node:child_process";
15680
15686
 
@@ -17434,11 +17440,11 @@ function buildWorkspacePathProperty() {
17434
17440
  return {
17435
17441
  type: "string",
17436
17442
  minLength: 1,
17437
- description: "Path relative to the workspace root. Defaults to workspace root when omitted."
17443
+ description: "Path relative to the workspace root. Absolute paths and ~/ (home directory) are also accepted. Defaults to workspace root when omitted."
17438
17444
  };
17439
17445
  }
17440
17446
  function buildReadWorkspaceDescription() {
17441
- return "Read a UTF-8 text file inside the workspace. Use lines for focused range reads after search to save tokens. A range already delivered earlier for an unchanged file answers with a short notice instead of resending (force:true refetches).";
17447
+ return "Read a UTF-8 text file inside the workspace. Absolute paths and ~/ are also accepted (runtime spill files can be read directly). Use lines for focused range reads after search to save tokens. A range already delivered earlier for an unchanged file answers with a short notice instead of resending (force:true refetches).";
17442
17448
  }
17443
17449
  function buildReadWorkspaceParameters() {
17444
17450
  const path = buildWorkspacePathProperty();
@@ -18259,9 +18265,14 @@ async function resolveRuntimeOwnedSpillPath(targetPath) {
18259
18265
  return null;
18260
18266
  }
18261
18267
  }
18268
+ function expandHomePath(requestedPath) {
18269
+ if (requestedPath === "~") return homedir();
18270
+ if (requestedPath.startsWith("~/")) return resolve4(homedir(), requestedPath.slice(2));
18271
+ return requestedPath;
18272
+ }
18262
18273
  async function resolveLocalWorkspaceToolPath(args2) {
18263
18274
  const workspaceRoot = resolve4(args2.workspaceRoot);
18264
- const targetPath = resolve4(workspaceRoot, args2.requestedPath);
18275
+ const targetPath = resolve4(workspaceRoot, expandHomePath(args2.requestedPath));
18265
18276
  const insideWorkspace = isPathInsideWorkspace({ workspaceRoot, targetPath });
18266
18277
  const trustedSpillPath = !insideWorkspace && args2.allowRuntimeOwnedSpill === true ? await resolveRuntimeOwnedSpillPath(targetPath) : null;
18267
18278
  if (!insideWorkspace && trustedSpillPath === null) {
@@ -19102,8 +19113,7 @@ function buildLocalDialogWritePlan(args2) {
19102
19113
 
19103
19114
  // packages/agent-runtime/noloWorkspaceTools.node.ts
19104
19115
  async function readNoloProcessStream(readable) {
19105
- if (!readable) return "";
19106
- return new Response(readable).text();
19116
+ return readTextStreamUpToChars(readable, BRIDGE_STREAM_MAX_CHARS);
19107
19117
  }
19108
19118
  async function runNoloWorkspaceCliTool(call, args2) {
19109
19119
  const cliArgs = buildNoloWorkspaceCommandArgs(call);
@@ -19123,16 +19133,18 @@ async function runNoloWorkspaceCliTool(call, args2) {
19123
19133
  readNoloProcessStream(proc.stderr),
19124
19134
  proc.exited
19125
19135
  ]);
19126
- const content = `${stdout}${stderr}`;
19136
+ const content = `${stdout.text}${stderr.text}`;
19127
19137
  if (exitCode !== 0) {
19128
19138
  throw new Error(content.trim() || `nolo ${cliArgs.join(" ")} exited ${exitCode}`);
19129
19139
  }
19140
+ const bridgedOutputTruncated = stdout.truncated || stderr.truncated;
19130
19141
  return {
19131
19142
  content,
19132
19143
  metadata: {
19133
19144
  [args2.metadataKind ?? "noloWorkspaceTool"]: true,
19134
19145
  command: ["nolo", ...cliArgs].join(" "),
19135
- exitCode
19146
+ exitCode,
19147
+ ...bridgedOutputTruncated ? { bridgedOutputTruncated: true } : {}
19136
19148
  }
19137
19149
  };
19138
19150
  }
@@ -19148,7 +19160,7 @@ async function readDialogInProcess(call, store, env) {
19148
19160
  const { dbKey: dialogKey, dialogId } = resolveNoloDialogInput(dialogInput, userId);
19149
19161
  const meta = await store.read(dialogKey, { remote: false });
19150
19162
  if (mode === "status") {
19151
- const result5 = {
19163
+ const result4 = {
19152
19164
  dialogId,
19153
19165
  dialogKey,
19154
19166
  meta,
@@ -19157,35 +19169,39 @@ async function readDialogInProcess(call, store, env) {
19157
19169
  source: "in-process"
19158
19170
  };
19159
19171
  return {
19160
- content: JSON.stringify(result5, null, 2),
19172
+ content: JSON.stringify(result4, null, 2),
19161
19173
  metadata: { noloWorkspaceTool: true, readDialog: true, inProcess: true, mode: "status" }
19162
19174
  };
19163
19175
  }
19164
19176
  const limitNum = noloPositiveIntegerString(args2.limit);
19165
19177
  const limit = limitNum ? Number(limitNum) : void 0;
19166
- const rawMessages = [];
19178
+ const projector = createStreamingDialogReadProjector({
19179
+ maxResponseChars: DEFAULT_READ_DIALOG_MAX_RESPONSE_CHARS,
19180
+ ...limit !== void 0 ? { maxMessages: limit } : {}
19181
+ });
19167
19182
  if (store.iterator) {
19168
19183
  const { start, end: end3 } = dialogMessageRange(dialogId);
19169
19184
  for await (const [, value] of store.iterator({ gte: start, lte: end3 })) {
19170
- const message = localDialogMessageRecordToRuntimeMessage(value);
19185
+ const message = localDialogMessageRecordToRuntimeMessage(value) ?? value;
19171
19186
  if (message) {
19172
- rawMessages.push(message);
19173
- } else if (value) {
19174
- rawMessages.push(value);
19187
+ projector.addMessage(message);
19175
19188
  }
19176
19189
  }
19177
19190
  }
19178
- const messages = limit !== void 0 && rawMessages.length > limit ? rawMessages.slice(rawMessages.length - limit) : rawMessages;
19179
- const result4 = {
19180
- dialogId,
19181
- dialogKey,
19182
- meta,
19183
- messages,
19184
- messagesCount: messages.length,
19185
- source: "in-process"
19186
- };
19191
+ const projected = projector.finish(meta);
19192
+ const built = buildDialogReadEnvelope({
19193
+ meta: projected.meta,
19194
+ messages: projected.messages,
19195
+ stats: projected.stats,
19196
+ envelope: {
19197
+ dialogId,
19198
+ dialogKey,
19199
+ messagesCount: projected.stats.messagesReturned,
19200
+ source: "in-process"
19201
+ }
19202
+ });
19187
19203
  return {
19188
- content: JSON.stringify(result4, null, 2),
19204
+ content: built.serialized,
19189
19205
  metadata: { noloWorkspaceTool: true, readDialog: true, inProcess: true }
19190
19206
  };
19191
19207
  }
@@ -7,7 +7,7 @@ import {
7
7
  listUserRecordsFromServers,
8
8
  readDbRecordFromServers,
9
9
  readLiveDbRecordAfterTombstoneMerge
10
- } from "./chunk-P7OOB7QP.js";
10
+ } from "./chunk-Q4OT2DC7.js";
11
11
  import {
12
12
  fetchWithTransientRetry
13
13
  } from "./chunk-5XTOKQLW.js";
@@ -26,6 +26,11 @@ import {
26
26
  resolveLocalDialogDbCandidates,
27
27
  resolveServerDbPath
28
28
  } from "./chunk-GLKOYSRU.js";
29
+ import {
30
+ boundSummaryText,
31
+ buildDialogReadEnvelope,
32
+ projectDialogReadForAgent
33
+ } from "./chunk-V3ZKNK5D.js";
29
34
  import {
30
35
  toErrorMessage
31
36
  } from "./chunk-HNMXYYJR.js";
@@ -204,7 +209,8 @@ var VALUE_FLAGS = /* @__PURE__ */ new Set([
204
209
  "--subject-role",
205
210
  "--token",
206
211
  "--machine-key",
207
- "--user"
212
+ "--user",
213
+ "--max-response-chars"
208
214
  ]);
209
215
  function hasFlag(args, flag) {
210
216
  return args.includes(flag);
@@ -416,6 +422,10 @@ Options:
416
422
  --server <url> Prefer this server when reading by raw dialog id.
417
423
  --token <jwt> Override AUTH_TOKEN.
418
424
  --user <userId> Override dialog owner for raw dialog ids.
425
+ --max-response-chars <n>
426
+ Cap the serialized response for agent/automation callers
427
+ (shared budget projection; oversized fields are head-truncated
428
+ with projection stats). Omit for the default full human export.
419
429
 
420
430
  Reads dialog metadata and messages as JSON.
421
431
  `);
@@ -467,6 +477,12 @@ function readDialogLimitArg(args, fallback) {
467
477
  if (!raw) return fallback;
468
478
  return parsePositiveIntegerOrFallback(raw, fallback);
469
479
  }
480
+ function readDialogMaxResponseCharsArg(args) {
481
+ const raw = readOption(args, "--max-response-chars");
482
+ if (!raw) return null;
483
+ const parsed = Number(raw);
484
+ return Number.isFinite(parsed) && parsed > 0 ? Math.floor(parsed) : null;
485
+ }
470
486
  function readDialogOwnerId(args, env, authToken) {
471
487
  return readOption(args, "--user") ?? env.USER_ID ?? parseUserIdFromAuthToken(authToken) ?? "";
472
488
  }
@@ -1247,12 +1263,66 @@ async function runDialogReadCommand(args, deps = {}) {
1247
1263
  readLocalDialogAtDbPath: deps.readLocalDialogAtDbPath
1248
1264
  });
1249
1265
  const orderedMsgs = Array.isArray(read.msgs) ? [...read.msgs].reverse() : read.msgs;
1250
- const lastAssistantMessage = Array.isArray(orderedMsgs) ? [...orderedMsgs].reverse().find((message) => message?.role === "assistant" || message?.authorRole === "assistant") : null;
1251
- const toolMessages = Array.isArray(orderedMsgs) ? orderedMsgs.filter((message) => message?.role === "tool" || message?.authorRole === "tool") : [];
1266
+ const agentMaxResponseChars = readDialogMaxResponseCharsArg(args);
1267
+ const agentProjection = agentMaxResponseChars && Array.isArray(orderedMsgs) ? projectDialogReadForAgent({
1268
+ meta: read.meta,
1269
+ messages: orderedMsgs,
1270
+ options: { maxResponseChars: agentMaxResponseChars }
1271
+ }) : null;
1272
+ const outputMeta = agentProjection ? agentProjection.meta : read.meta;
1273
+ const outputMsgs = agentProjection ? agentProjection.messages : orderedMsgs;
1274
+ const lastAssistantMessage = Array.isArray(outputMsgs) ? [...outputMsgs].reverse().find((message) => message?.role === "assistant" || message?.authorRole === "assistant") : null;
1275
+ const toolMessages = Array.isArray(outputMsgs) ? outputMsgs.filter((message) => message?.role === "tool" || message?.authorRole === "tool") : [];
1252
1276
  const toolNamesFromMessages = toolMessages.map((message) => toToolName(message?.toolName ?? message?.name)).filter(Boolean);
1253
- const toolsUsed = Array.isArray(read.meta?.toolsUsed) && read.meta.toolsUsed.length > 0 ? read.meta.toolsUsed.map((tool) => toToolName(tool)).filter(Boolean) : uniq(toolNamesFromMessages);
1254
- const writtenFiles = Array.isArray(read.meta?.writtenFiles) && read.meta.writtenFiles.length > 0 ? uniq(asTrimmedNonEmptyStringArray(read.meta.writtenFiles)) : deriveWrittenFiles(toolMessages);
1255
- const toolErrors = Array.isArray(read.meta?.toolErrors) && read.meta.toolErrors.length > 0 ? uniq(asTrimmedNonEmptyStringArray(read.meta.toolErrors)) : deriveToolErrors(toolMessages);
1277
+ const toolsUsed = Array.isArray(outputMeta?.toolsUsed) && outputMeta.toolsUsed.length > 0 ? outputMeta.toolsUsed.map((tool) => toToolName(tool)).filter(Boolean) : uniq(toolNamesFromMessages);
1278
+ const writtenFiles = Array.isArray(outputMeta?.writtenFiles) && outputMeta.writtenFiles.length > 0 ? uniq(asTrimmedNonEmptyStringArray(outputMeta.writtenFiles)) : deriveWrittenFiles(toolMessages);
1279
+ const toolErrors = Array.isArray(outputMeta?.toolErrors) && outputMeta.toolErrors.length > 0 ? uniq(asTrimmedNonEmptyStringArray(outputMeta.toolErrors)) : deriveToolErrors(toolMessages);
1280
+ const toolSummary = {
1281
+ metaToolsCount: toolsUsed.length,
1282
+ metaToolsUnique: [...new Set(toolsUsed)],
1283
+ toolMessageCount: toolMessages.length,
1284
+ toolNamesFromMessages: [...new Set(toolNamesFromMessages)],
1285
+ toolMessageCountsByName: countByName(toolNamesFromMessages)
1286
+ };
1287
+ if (agentProjection && agentMaxResponseChars) {
1288
+ const newestAssistant = Array.isArray(outputMsgs) ? [...outputMsgs].reverse().find(
1289
+ (message) => message?.role === "assistant" || message?.authorRole === "assistant"
1290
+ ) : null;
1291
+ const lastAssistantSummary = newestAssistant ? {
1292
+ role: newestAssistant?.role ?? newestAssistant?.authorRole ?? null,
1293
+ contentHead: boundSummaryText(
1294
+ typeof newestAssistant?.content === "string" ? newestAssistant.content : newestAssistant?.content ? JSON.stringify(newestAssistant.content) : "",
1295
+ 200
1296
+ )
1297
+ } : null;
1298
+ const built = buildDialogReadEnvelope({
1299
+ meta: read.meta,
1300
+ messages: agentProjection.messages,
1301
+ stats: agentProjection.stats,
1302
+ envelope: {
1303
+ source: read.source,
1304
+ base: read.resolvedBase,
1305
+ triedBases: read.candidateBases,
1306
+ httpAttempts: read.attempts,
1307
+ spaceId: target.spaceId ?? null,
1308
+ dialogId: target.dialogId,
1309
+ dialogKey: target.dialogKey,
1310
+ userId: target.userId ?? null,
1311
+ messagesCount: agentProjection.stats.messagesReturned
1312
+ },
1313
+ summary: {
1314
+ writtenFiles,
1315
+ toolsUsed,
1316
+ toolErrors,
1317
+ toolSummary,
1318
+ lastAssistantMessage: lastAssistantSummary
1319
+ },
1320
+ options: { maxResponseChars: agentMaxResponseChars }
1321
+ });
1322
+ output.write(built.serialized);
1323
+ output.write("\n");
1324
+ return 0;
1325
+ }
1256
1326
  output.write(JSON.stringify({
1257
1327
  source: read.source,
1258
1328
  base: read.resolvedBase,
@@ -1262,31 +1332,31 @@ async function runDialogReadCommand(args, deps = {}) {
1262
1332
  dialogId: target.dialogId,
1263
1333
  dialogKey: target.dialogKey,
1264
1334
  userId: target.userId,
1265
- title: read.meta?.title ?? null,
1266
- cybots: Array.isArray(read.meta?.cybots) ? read.meta.cybots : [],
1267
- category: read.meta?.category ?? null,
1268
- inheritedFromDialogKey: read.meta?.inheritedFromDialogKey ?? null,
1269
- inheritedFromDialogTitle: read.meta?.inheritedFromDialogTitle ?? null,
1270
- parentDialogId: read.meta?.parentDialogId ?? null,
1271
- rootDialogId: read.meta?.rootDialogId ?? null,
1272
- triggerType: read.meta?.triggerType ?? null,
1273
- executionMode: read.meta?.executionMode ?? null,
1274
- threadKind: read.meta?.threadKind ?? null,
1275
- presentationIntent: read.meta?.presentationIntent ?? null,
1276
- parentThreadId: read.meta?.parentThreadId ?? null,
1277
- rootThreadId: read.meta?.rootThreadId ?? null,
1278
- runtimeBinding: read.meta?.runtimeBinding ?? null,
1279
- runtimeContext: read.meta?.runtimeContext ?? null,
1280
- parentWake: read.meta?.parentWake ?? null,
1281
- subjectRefs: Array.isArray(read.meta?.subjectRefs) ? read.meta.subjectRefs : [],
1282
- status: read.meta?.status,
1283
- errorMessage: read.meta?.errorMessage ?? null,
1284
- runtimeCheckpoint: read.meta?.runtimeCheckpoint ?? null,
1285
- durationMs: read.meta?.durationMs,
1286
- finishedAt: read.meta?.finishedAt,
1287
- createdAt: read.meta?.createdAt,
1288
- updatedAt: read.meta?.updatedAt,
1289
- artifacts: read.meta?.artifacts ?? null,
1335
+ title: outputMeta?.title ?? null,
1336
+ cybots: Array.isArray(outputMeta?.cybots) ? outputMeta.cybots : [],
1337
+ category: outputMeta?.category ?? null,
1338
+ inheritedFromDialogKey: outputMeta?.inheritedFromDialogKey ?? null,
1339
+ inheritedFromDialogTitle: outputMeta?.inheritedFromDialogTitle ?? null,
1340
+ parentDialogId: outputMeta?.parentDialogId ?? null,
1341
+ rootDialogId: outputMeta?.rootDialogId ?? null,
1342
+ triggerType: outputMeta?.triggerType ?? null,
1343
+ executionMode: outputMeta?.executionMode ?? null,
1344
+ threadKind: outputMeta?.threadKind ?? null,
1345
+ presentationIntent: outputMeta?.presentationIntent ?? null,
1346
+ parentThreadId: outputMeta?.parentThreadId ?? null,
1347
+ rootThreadId: outputMeta?.rootThreadId ?? null,
1348
+ runtimeBinding: outputMeta?.runtimeBinding ?? null,
1349
+ runtimeContext: outputMeta?.runtimeContext ?? null,
1350
+ parentWake: outputMeta?.parentWake ?? null,
1351
+ subjectRefs: Array.isArray(outputMeta?.subjectRefs) ? outputMeta.subjectRefs : [],
1352
+ status: outputMeta?.status,
1353
+ errorMessage: outputMeta?.errorMessage ?? null,
1354
+ runtimeCheckpoint: outputMeta?.runtimeCheckpoint ?? null,
1355
+ durationMs: outputMeta?.durationMs,
1356
+ finishedAt: outputMeta?.finishedAt,
1357
+ createdAt: outputMeta?.createdAt,
1358
+ updatedAt: outputMeta?.updatedAt,
1359
+ artifacts: outputMeta?.artifacts ?? null,
1290
1360
  writtenFiles,
1291
1361
  toolsUsed,
1292
1362
  toolErrors,
@@ -1297,10 +1367,10 @@ async function runDialogReadCommand(args, deps = {}) {
1297
1367
  toolNamesFromMessages: [...new Set(toolNamesFromMessages)],
1298
1368
  toolMessageCountsByName: countByName(toolNamesFromMessages)
1299
1369
  },
1300
- agentReply: read.meta?.agentReply ?? null,
1301
- messagesCount: Array.isArray(orderedMsgs) ? orderedMsgs.length : 0,
1370
+ agentReply: outputMeta?.agentReply ?? null,
1371
+ messagesCount: Array.isArray(outputMsgs) ? outputMsgs.length : 0,
1302
1372
  lastAssistantMessage,
1303
- messages: orderedMsgs
1373
+ messages: outputMsgs
1304
1374
  }, null, 2));
1305
1375
  output.write("\n");
1306
1376
  return 0;
@@ -5,14 +5,14 @@ import {
5
5
  inlineImageUrlsForCustomProvider,
6
6
  prepareTools,
7
7
  shouldInlineImageUrlsForAgent
8
- } from "./chunk-GVYMHBG3.js";
8
+ } from "./chunk-UNAVSDC5.js";
9
9
  import {
10
10
  INVALID_TOOL_ARGS_REPLACEMENT,
11
11
  buildInvalidToolCallSelfHealResult,
12
12
  parseToolCallArguments,
13
13
  performFetchRequest,
14
14
  sanitizeOutboundMessages
15
- } from "./chunk-XOPPOOTE.js";
15
+ } from "./chunk-BG7ZGBKH.js";
16
16
  import {
17
17
  createSSEParser,
18
18
  createToolRunId,
@@ -23,7 +23,7 @@ import {
23
23
  toolRunSetPending,
24
24
  toolRunStarted,
25
25
  toolRunSucceeded
26
- } from "./chunk-J2WQUFGG.js";
26
+ } from "./chunk-5DUAG5G7.js";
27
27
  import {
28
28
  getPublicImageAgentMode
29
29
  } from "./chunk-VIDPVFP3.js";
@@ -35,10 +35,10 @@ import {
35
35
  messageStreamEnd,
36
36
  messageStreaming,
37
37
  updateToolMessage
38
- } from "./chunk-6AAQCFLQ.js";
38
+ } from "./chunk-CLZYOOI3.js";
39
39
  import {
40
40
  streamAgentChatTurn
41
- } from "./chunk-UMIARYFE.js";
41
+ } from "./chunk-OHJWIXXW.js";
42
42
  import {
43
43
  addActiveController,
44
44
  removeActiveController,
@@ -1,16 +1,16 @@
1
1
  import {
2
2
  createCliLocalRuntimeAdapter,
3
3
  summarizeEndpoint
4
- } from "./chunk-BWHZ4H2Q.js";
4
+ } from "./chunk-MN2XJEWL.js";
5
5
  import {
6
6
  clipMultilineText
7
- } from "./chunk-J2WQUFGG.js";
7
+ } from "./chunk-5DUAG5G7.js";
8
8
  import {
9
9
  runLocalAgentTurn
10
- } from "./chunk-ZSR7L46Q.js";
10
+ } from "./chunk-RCNQCXPM.js";
11
11
  import {
12
12
  applyToolSurfaceConstraints
13
- } from "./chunk-RJ2SAFB5.js";
13
+ } from "./chunk-V3ZKNK5D.js";
14
14
  import {
15
15
  resolveLocalRuntimeEnvFromPolicy
16
16
  } from "./chunk-3JQ2NRYU.js";
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-YYLHWIW6.js";
4
4
  import {
5
5
  compareAgentSelection
6
- } from "./chunk-RJ2SAFB5.js";
6
+ } from "./chunk-V3ZKNK5D.js";
7
7
  import {
8
8
  getModelAbility
9
9
  } from "./chunk-6IT5ECCC.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  i18n_default,
3
3
  toolRegistry
4
- } from "./chunk-J2WQUFGG.js";
4
+ } from "./chunk-5DUAG5G7.js";
5
5
  import {
6
6
  canonicalizeToolNames
7
7
  } from "./chunk-O6OSWFZQ.js";
@@ -27,7 +27,7 @@ import {
27
27
  resolveLocalUserId,
28
28
  t,
29
29
  toolLabel
30
- } from "./chunk-BWHZ4H2Q.js";
30
+ } from "./chunk-MN2XJEWL.js";
31
31
  import {
32
32
  createRunActivityTracker,
33
33
  popSingleQueueMessage,
@@ -47,7 +47,7 @@ import {
47
47
  import {
48
48
  readDbRecord,
49
49
  resolveAgentRecordFromHybridStore
50
- } from "./chunk-FHAGENAS.js";
50
+ } from "./chunk-AUKZOZFG.js";
51
51
  import {
52
52
  isLocalCliAgentKey
53
53
  } from "./chunk-SPAQ4PVV.js";
@@ -63,7 +63,7 @@ import {
63
63
  } from "./chunk-LTRXGFMS.js";
64
64
  import {
65
65
  formatAgentListCard
66
- } from "./chunk-J2WQUFGG.js";
66
+ } from "./chunk-5DUAG5G7.js";
67
67
  import {
68
68
  isTransientFetchError
69
69
  } from "./chunk-5XTOKQLW.js";
@@ -84,12 +84,12 @@ import {
84
84
  chooseMemoryOwners,
85
85
  loadMemoryCandidatesFromDb,
86
86
  resolveAgentMemoryPolicy
87
- } from "./chunk-4SCMOQRM.js";
87
+ } from "./chunk-FPT2E44F.js";
88
88
  import {
89
89
  API_REPORTED_COST_MULTIPLIER,
90
90
  normalizeUsage,
91
91
  parseUiAskChoiceContent
92
- } from "./chunk-6AAQCFLQ.js";
92
+ } from "./chunk-CLZYOOI3.js";
93
93
  import {
94
94
  isOAuthApiKeyRef
95
95
  } from "./chunk-YYLHWIW6.js";
@@ -112,7 +112,7 @@ import {
112
112
  LOCAL_AGENT_CONFIG_MISSING_CODE,
113
113
  LOCAL_TURN_ABORTED_CODE,
114
114
  readActionGate
115
- } from "./chunk-ZSR7L46Q.js";
115
+ } from "./chunk-RCNQCXPM.js";
116
116
  import {
117
117
  resolveAgentRuntimeConfigFromRecord
118
118
  } from "./chunk-Y7PULBIA.js";
@@ -5176,7 +5176,7 @@ function findCollapsedPasteSpanAt(buffer, pos, opts = {}) {
5176
5176
  // packages/cli/client/agentRun.ts
5177
5177
  import { ulid } from "ulid";
5178
5178
  async function loadRunLocalAgentTurn() {
5179
- const { runLocalAgentTurn } = await import("./agentRuntimeLocal-3JLUMWN7.js");
5179
+ const { runLocalAgentTurn } = await import("./agentRuntimeLocal-BD7R3OJL.js");
5180
5180
  return runLocalAgentTurn;
5181
5181
  }
5182
5182
  var stripDebugNoise = (s) => s.replace(/\s*raw="[\s\S]*"/g, "").replace(/\s*raw=\S+/g, "").replace(/\s*headers=\[[^\]]*\]/g, "").replace(/\s*headers=\S+/g, "").trim();