nolo-cli 0.105.0 → 0.106.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 (115) hide show
  1. package/{_executeModel-JXG5TLPE.js → _executeModel-EP6HAX3W.js} +38 -37
  2. package/{addContentAction-J3DLDV64.js → addContentAction-NZZNAVCB.js} +4 -4
  3. package/{addDialogAgentAction-PHIXJCF2.js → addDialogAgentAction-5HVGEIXI.js} +4 -4
  4. package/{agentDeleteCommand-2AWJGHXG.js → agentDeleteCommand-M25A6UGB.js} +45 -45
  5. package/{agentEmailCommands-VV5OSILE.js → agentEmailCommands-RUL4NL64.js} +46 -46
  6. package/{agentListCommands-OQMRBDWP.js → agentListCommands-KSPFKHFO.js} +23 -24
  7. package/{agentMachineCommands-3VLLR6RL.js → agentMachineCommands-IHBB6PHD.js} +20 -21
  8. package/{agentProviderCommands-XPJYZSCE.js → agentProviderCommands-ND4S2Q6Q.js} +1 -1
  9. package/{agentRecordCommands-GPIARVOW.js → agentRecordCommands-7OKIBN6H.js} +45 -45
  10. package/{agentRunCommand-LRJTZ7IM.js → agentRunCommand-GBKJTQQU.js} +45 -45
  11. package/{agentRuntimeLocal-PV6AZOEU.js → agentRuntimeLocal-E5HXZNXZ.js} +18 -19
  12. package/{agentSlice-6R3JKS6I.js → agentSlice-7T3ZLYET.js} +4 -4
  13. package/{appDeleteCommands-WEX73P5R.js → appDeleteCommands-TTJUYTQN.js} +21 -22
  14. package/{appDeployCommands-7BAXWA4M.js → appDeployCommands-65WYK2TQ.js} +21 -22
  15. package/{appDeployStatusCommands-EJ6A2U4X.js → appDeployStatusCommands-U4XESYYG.js} +21 -22
  16. package/{appGetCommands-SB355OEX.js → appGetCommands-VNHZZC4D.js} +21 -22
  17. package/{appListCommands-TSZDPIKJ.js → appListCommands-O667ZEU6.js} +21 -22
  18. package/{authCommand-5PB3YRVV.js → authCommand-SUHHTVHA.js} +8 -8
  19. package/{builtinSkillRegistry-SBBWTANC.js → builtinSkillRegistry-PUGT65WS.js} +5 -5
  20. package/{chunk-Z5NGE5DH.js → chunk-2NGKYC3L.js} +3 -3
  21. package/{chunk-S2NSK7AZ.js → chunk-3SXZ6SUC.js} +4 -4
  22. package/{chunk-NSBID7PR.js → chunk-3VKDWQMJ.js} +2 -2
  23. package/{chunk-QKTESDWK.js → chunk-4VDS344D.js} +3 -3
  24. package/{chunk-7KVZ5LDQ.js → chunk-5F7UKMLN.js} +8 -4
  25. package/{chunk-BB7LVBTS.js → chunk-6AIURTE7.js} +3 -3
  26. package/{chunk-HP57OUJO.js → chunk-7I25CBT5.js} +31 -5
  27. package/{chunk-NSAFG343.js → chunk-AM4G3LDJ.js} +59 -47
  28. package/{chunk-NTR4SD3P.js → chunk-AZB6HR4I.js} +13 -48
  29. package/{chunk-AFH5QC6R.js → chunk-BIH7KCDJ.js} +3 -3
  30. package/{chunk-UA324D4O.js → chunk-BPLIXNC6.js} +1 -1
  31. package/{chunk-YK5MHOWM.js → chunk-CEQ75WPL.js} +1 -1
  32. package/{chunk-K6U4NKFJ.js → chunk-DBKRC5O2.js} +1 -1
  33. package/{chunk-UWXDA7L5.js → chunk-DJ3JABG5.js} +22 -37
  34. package/{chunk-HYXABXCZ.js → chunk-DSXRVBTA.js} +98 -21
  35. package/{chunk-3Q7NEHAR.js → chunk-EBS4FKW4.js} +1 -1
  36. package/{chunk-ZBHR642M.js → chunk-EHGIEGLI.js} +161 -43
  37. package/{chunk-YVU4XVJD.js → chunk-FJKZSR5P.js} +1 -1
  38. package/{chunk-54VPQTOA.js → chunk-GMP3NBAA.js} +5 -7
  39. package/{chunk-3BXNTXYI.js → chunk-GU7DC2TD.js} +2 -1
  40. package/{chunk-FGSJ3YMD.js → chunk-HNA5KV37.js} +5 -5
  41. package/{chunk-CYSYR67N.js → chunk-I5YMDACN.js} +1 -1
  42. package/{chunk-WJ3B6FX6.js → chunk-IXH3HKY2.js} +0 -8
  43. package/{chunk-Y3PMXGLH.js → chunk-IYIXAIEB.js} +197 -92
  44. package/{chunk-RWX7AY7J.js → chunk-JWNBEIME.js} +1 -1
  45. package/{chunk-VVJ2ENLY.js → chunk-LGWABBTZ.js} +4 -4
  46. package/{chunk-QYUBY3OZ.js → chunk-LOPP5VT6.js} +1 -1
  47. package/{chunk-GSKPJIHY.js → chunk-LUBFABMJ.js} +2 -6
  48. package/{chunk-BNGW5ASC.js → chunk-LYLO5U3H.js} +15 -2
  49. package/{chunk-L5WOICCV.js → chunk-MJ3CRU77.js} +22 -6
  50. package/{chunk-AWVP7PPG.js → chunk-NTNKA5VL.js} +1 -1
  51. package/{chunk-EP7BWZ4B.js → chunk-OAXBDMT7.js} +1 -1
  52. package/{chunk-4DPP773Q.js → chunk-ODTBO4W6.js} +9 -6
  53. package/{chunk-B7APRSPS.js → chunk-OQ5IVGCV.js} +3 -3
  54. package/{chunk-EKPKW6RM.js → chunk-OYTWDOQV.js} +3 -3
  55. package/{chunk-P5GCTVGV.js → chunk-OZ2IIIRP.js} +2 -2
  56. package/{chunk-D2GQE6AF.js → chunk-PFLF4R4E.js} +1 -1
  57. package/{chunk-RILRSUGC.js → chunk-QDH32WF5.js} +1 -1
  58. package/{chunk-VCAQFMVN.js → chunk-QVAWUJAJ.js} +1 -1
  59. package/{chunk-27ONFIEY.js → chunk-SJ7CUF65.js} +2 -2
  60. package/{chunk-CNA27EMD.js → chunk-SYEBIZOF.js} +1 -1
  61. package/{chunk-ZSUDOTPL.js → chunk-TLKXNTQJ.js} +3 -3
  62. package/{chunk-A4SQRTZ6.js → chunk-TLYSGGPG.js} +1 -1
  63. package/chunk-UM7TA3K4.js +1008 -0
  64. package/{chunk-BZ7NPA6G.js → chunk-VBG7GWWR.js} +218 -6
  65. package/{chunk-DZ7R5V3Y.js → chunk-VBQGO5NX.js} +1 -1
  66. package/{chunk-44CU7CKA.js → chunk-VYKXIHRP.js} +181 -34
  67. package/chunk-VZLO4XJD.js +17 -0
  68. package/{chunk-IEJ5YDA4.js → chunk-WMWYWYK2.js} +2 -2
  69. package/{chunk-LWXE6IFU.js → chunk-XDQ7PHU3.js} +31 -196
  70. package/{chunk-AFSY3ZMB.js → chunk-XGOHDYM2.js} +1 -1
  71. package/{chunk-2WJ57RJA.js → chunk-XLWMNFBZ.js} +1 -1
  72. package/{chunk-3F424ASC.js → chunk-YFU5EELM.js} +1 -1
  73. package/{chunk-QMXJ5KDJ.js → chunk-YQFLBS6A.js} +13 -13
  74. package/{chunk-CFHWVEUJ.js → chunk-ZVGXD7UJ.js} +2 -2
  75. package/{chunk-4WMMIL66.js → chunk-ZYM73IHG.js} +3 -2
  76. package/{commandRegistry-QU62WJQX.js → commandRegistry-6QIAUQDS.js} +49 -49
  77. package/{contentThunks-VGV3JJVB.js → contentThunks-5DDMUQ7B.js} +17 -16
  78. package/{createAgentAutomationAction-ZNVLI4WV.js → createAgentAutomationAction-NQ6AZM42.js} +17 -16
  79. package/{createDialogAction-TTUA46DT.js → createDialogAction-QZ6X4A7O.js} +20 -19
  80. package/{createPageAction-KUFSC5XW.js → createPageAction-NCGEJBVK.js} +17 -16
  81. package/{dbSlice-MYEETO73.js → dbSlice-RCZ7NRAF.js} +3 -3
  82. package/{dialogCommands-DRDPEOTL.js → dialogCommands-OGQLEF63.js} +21 -22
  83. package/{dialogSlice-V2SVSTIV.js → dialogSlice-GIKNUHNW.js} +30 -17
  84. package/{docCreateCommands-M26CFDDQ.js → docCreateCommands-RW6LNYT6.js} +20 -21
  85. package/{docDeleteCommands-LRZHCKVX.js → docDeleteCommands-Z742TRNY.js} +21 -22
  86. package/{docReadCommands-6QJSISHK.js → docReadCommands-5DIGA42Y.js} +20 -21
  87. package/{docStore-4RWAFNDM.js → docStore-6GUOZH52.js} +4 -4
  88. package/{docUpdateCommands-W4KU4U5T.js → docUpdateCommands-ZFZ2QEVK.js} +20 -21
  89. package/{getPricing-NMMFT3YI.js → getPricing-QVSNUFZ6.js} +3 -3
  90. package/{handleSendMessageAction-VEWLGB5Z.js → handleSendMessageAction-B2VXOLMM.js} +16 -15
  91. package/index.js +3 -3
  92. package/{machineCommands-AEHHCJEW.js → machineCommands-AI3N7JHQ.js} +44 -44
  93. package/{machineWsRunDispatch-MY2KHS36.js → machineWsRunDispatch-RPF2D6VV.js} +44 -44
  94. package/{memberThunks-EE6TI3TV.js → memberThunks-YICJI4IS.js} +4 -4
  95. package/{models-ZPU5EDF4.js → models-FTNFVO3D.js} +2 -2
  96. package/package.json +1 -1
  97. package/{providerPresetApply-TEBH7FDX.js → providerPresetApply-OJJXQ7NM.js} +6 -6
  98. package/{providerRegistry-CBJLNCET.js → providerRegistry-DXFBDCGQ.js} +6 -6
  99. package/{read-PJIT2YEJ.js → read-XMBM52Y4.js} +2 -2
  100. package/{readDocTool-DRSXHGNL.js → readDocTool-LAQHKCVT.js} +1 -1
  101. package/{readlineWorkspace-7Q6MITLV.js → readlineWorkspace-EPUCVZ73.js} +48 -48
  102. package/{removeDialogAgentAction-IN4WUKJJ.js → removeDialogAgentAction-HDUI2MU3.js} +5 -5
  103. package/{runAgentClientLoop-H2JALUVD.js → runAgentClientLoop-OXQMDGAN.js} +36 -35
  104. package/{setDialogExtraReferencesAction-VDRF7LPK.js → setDialogExtraReferencesAction-ADBVOP4O.js} +5 -5
  105. package/{setPrimaryDialogAgentAction-RO6LIWJ4.js → setPrimaryDialogAgentAction-PXVXQJ62.js} +5 -5
  106. package/{settingThunks-3OPOLOIA.js → settingThunks-G2MJRKUE.js} +6 -6
  107. package/{spaceCommands-UBLL5EF2.js → spaceCommands-Z662QYY6.js} +20 -21
  108. package/{streamAgentChatTurn-FFJWW3FD.js → streamAgentChatTurn-YJYEJHP7.js} +40 -46
  109. package/{switchDialogAgentAction-MVF2JNE7.js → switchDialogAgentAction-Z3RZACGF.js} +4 -4
  110. package/{toolApiClient-EJT6TMFG.js → toolApiClient-AD7CXTA4.js} +3 -2
  111. package/{tools-AZRYLYNK.js → tools-GHI3WBEI.js} +32 -31
  112. package/{tuiSummaryLlmCaller-7S5HJ3MT.js → tuiSummaryLlmCaller-WTC6GCQC.js} +11 -12
  113. package/{updateDialogTitleAction-5WXTRUJM.js → updateDialogTitleAction-GJCNWTPY.js} +17 -16
  114. package/chunk-M7VLQGQP.js +0 -405
  115. package/chunk-NKWIS6G2.js +0 -442
@@ -1,6 +1,9 @@
1
+ import {
2
+ normalizeMediaConfirmExecutionRevision
3
+ } from "./chunk-VZLO4XJD.js";
1
4
  import {
2
5
  getActiveDialogKey
3
- } from "./chunk-BZ7NPA6G.js";
6
+ } from "./chunk-VBG7GWWR.js";
4
7
  import {
5
8
  compactWhitespace
6
9
  } from "./chunk-DWLEOOGR.js";
@@ -115,18 +118,31 @@ var ToolApiError = class extends Error {
115
118
  status;
116
119
  code;
117
120
  details;
121
+ upperCredits;
122
+ /**
123
+ * 服务端在本次 409 里下发的执行代次(扁平 error.executionRevision,旧形状兼容
124
+ * error.details.executionRevision)。只转述服务端本次的值,绝不另行 GET 补齐。
125
+ * 真值判据复用 normalizeMediaConfirmExecutionRevision(缺失/非法一律缺席,不造值)。
126
+ */
127
+ executionRevision;
118
128
  constructor(message, options) {
119
129
  super(message);
120
130
  this.name = "ToolApiError";
121
131
  this.status = options?.status;
122
132
  this.code = options?.code;
123
133
  this.details = options?.details;
134
+ this.upperCredits = options?.upperCredits;
135
+ this.executionRevision = normalizeMediaConfirmExecutionRevision(
136
+ options?.executionRevision
137
+ );
124
138
  }
125
139
  };
126
140
  var buildToolRequestHeaders = (thunkApi, options = {}) => {
127
141
  const { withAuth = false, agentKey } = options;
128
142
  const { token } = getRequestConfig(thunkApi);
129
- const headers = { "Content-Type": "application/json" };
143
+ const headers = {
144
+ "Content-Type": "application/json"
145
+ };
130
146
  if (withAuth && token) {
131
147
  headers["Authorization"] = `Bearer ${token}`;
132
148
  }
@@ -150,10 +166,12 @@ async function callToolApi(thunkApi, path, body, options = {}) {
150
166
  if (!baseUrl) throw new Error("\u65E0\u6CD5\u83B7\u53D6\u5DE5\u5177\u670D\u52A1\u5668\u5730\u5740\u3002");
151
167
  const url = `${baseUrl}${path}`;
152
168
  const headers = buildToolRequestHeaders(thunkApi, options);
169
+ const method = options.method ?? "POST";
153
170
  const response = await fetch(url, {
154
- method: "POST",
171
+ method,
155
172
  headers,
156
- body: JSON.stringify(maybeAttachDialogId(thunkApi, body))
173
+ ...options.signal ? { signal: options.signal } : {},
174
+ ...method === "GET" ? {} : { body: JSON.stringify(maybeAttachDialogId(thunkApi, body)) }
157
175
  });
158
176
  const contentType = response.headers.get("content-type");
159
177
  const responseText = await response.text();
@@ -161,6 +179,8 @@ async function callToolApi(thunkApi, path, body, options = {}) {
161
179
  let errorMessage = `API \u8BF7\u6C42\u5931\u8D25\uFF0C\u72B6\u6001\u7801: ${response.status}`;
162
180
  let errorCode;
163
181
  let errorDetails;
182
+ let upperCredits;
183
+ let errorExecutionRevision;
164
184
  try {
165
185
  const errorData = JSON.parse(responseText);
166
186
  const err = errorData?.error;
@@ -168,6 +188,10 @@ async function callToolApi(thunkApi, path, body, options = {}) {
168
188
  errorMessage += `: ${err.message ?? JSON.stringify(err)}`;
169
189
  errorCode = typeof err.code === "string" ? err.code : void 0;
170
190
  errorDetails = err.details;
191
+ if (typeof err.upperCredits === "number") {
192
+ upperCredits = err.upperCredits;
193
+ }
194
+ errorExecutionRevision = err.executionRevision ?? err.details?.executionRevision;
171
195
  }
172
196
  } catch {
173
197
  errorCode = looksLikeHtmlResponse(responseText, contentType) ? "HTML_ERROR_RESPONSE" : "NON_JSON_ERROR_RESPONSE";
@@ -182,7 +206,9 @@ async function callToolApi(thunkApi, path, body, options = {}) {
182
206
  throw new ToolApiError(errorMessage, {
183
207
  status: response.status,
184
208
  code: errorCode,
185
- details: errorDetails
209
+ details: errorDetails,
210
+ upperCredits,
211
+ executionRevision: errorExecutionRevision
186
212
  });
187
213
  }
188
214
  try {
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  toolRegistry
3
- } from "./chunk-LWXE6IFU.js";
3
+ } from "./chunk-XDQ7PHU3.js";
4
4
  import {
5
5
  runtime_default
6
- } from "./chunk-44CU7CKA.js";
6
+ } from "./chunk-VYKXIHRP.js";
7
7
  import {
8
8
  canonicalizeToolNames
9
9
  } from "./chunk-IHPDK6UD.js";
10
10
  import {
11
11
  isNoloHostedProvider
12
- } from "./chunk-Y3PMXGLH.js";
12
+ } from "./chunk-IYIXAIEB.js";
13
13
  import {
14
14
  asTrimmedLowercaseString
15
15
  } from "./chunk-QSJ3HFEF.js";
@@ -18,6 +18,8 @@ import {
18
18
  } from "./chunk-KUG52IAP.js";
19
19
 
20
20
  // packages/ai/chat/inlineImageUrlsForCustomProvider.ts
21
+ var INLINE_IMAGE_MAX_BYTES = 5 * 1024 * 1024;
22
+ var INLINE_IMAGE_TOTAL_MAX_BYTES = 20 * 1024 * 1024;
21
23
  var FILE_CONTENT_PATH = "/api/v1/db/file/content/";
22
24
  var shouldInlineImageUrlsForAgent = (agentConfig) => {
23
25
  const apiSource = agentConfig?.apiSource?.toLowerCase();
@@ -29,14 +31,14 @@ var shouldInlineImageUrlsForAgent = (agentConfig) => {
29
31
  };
30
32
  var isInlineCandidate = (url) => /^https?:\/\//i.test(url) && url.includes(FILE_CONTENT_PATH);
31
33
  var bytesToBase64 = (bytes) => {
32
- let binary = "";
33
- for (const byte of bytes) {
34
- binary += String.fromCharCode(byte);
34
+ const chunks = [];
35
+ for (let offset = 0; offset < bytes.length; offset += 32768) {
36
+ chunks.push(String.fromCharCode.apply(null, Array.from(bytes.subarray(offset, offset + 32768))));
35
37
  }
36
- return btoa(binary);
38
+ return btoa(chunks.join(""));
37
39
  };
38
- var defaultFetchImage = async (url) => {
39
- const response = await fetch(url);
40
+ var defaultFetchImage = async (url, signal, _maxBytes) => {
41
+ const response = await fetch(url, { signal });
40
42
  if (!response.ok) {
41
43
  return {
42
44
  ok: false,
@@ -50,59 +52,69 @@ var defaultFetchImage = async (url) => {
50
52
  bytes
51
53
  };
52
54
  };
53
- var cloneImagePartWithDataUrl = async (part, fetchImage, isAllowedImageUrl) => {
55
+ var cloneImagePartWithDataUrl = async (part, fetchImage, options, usedBytes) => {
54
56
  const url = part?.image_url?.url;
55
- if (typeof url !== "string" || !isInlineCandidate(url) || isAllowedImageUrl && !isAllowedImageUrl(url)) {
57
+ if (typeof url !== "string" || !isInlineCandidate(url) || options.isAllowedImageUrl && !options.isAllowedImageUrl(url)) return part;
58
+ if (options.signal?.aborted) throw new DOMException("The operation was aborted", "AbortError");
59
+ const remaining = options.maxTotalBytes === void 0 ? void 0 : options.maxTotalBytes - usedBytes.value;
60
+ const fetchLimit = options.maxBytes === void 0 ? remaining : remaining === void 0 ? options.maxBytes : Math.min(options.maxBytes, remaining);
61
+ const result = await fetchImage(url, options.signal, fetchLimit);
62
+ if (options.signal?.aborted) throw new DOMException("The operation was aborted", "AbortError");
63
+ if (result.skippedSize !== void 0) {
64
+ const reason = options.maxBytes !== void 0 && result.skippedSize > options.maxBytes ? "per-image" : "total-budget";
65
+ options.onSkipTooLarge?.(url, result.skippedSize, reason);
56
66
  return part;
57
67
  }
58
- const result = await fetchImage(url);
59
68
  if (!result.ok || !result.bytes) return part;
60
- const mimeType = result.mimeType || "application/octet-stream";
61
- return {
62
- ...part,
63
- image_url: {
64
- ...part.image_url,
65
- url: `data:${mimeType};base64,${bytesToBase64(result.bytes)}`
66
- }
67
- };
69
+ if (options.maxBytes !== void 0 && result.bytes.byteLength > options.maxBytes) {
70
+ options.onSkipTooLarge?.(url, result.bytes.byteLength, "per-image");
71
+ return part;
72
+ }
73
+ if (options.maxTotalBytes !== void 0 && usedBytes.value + result.bytes.byteLength > options.maxTotalBytes) {
74
+ options.onSkipTooLarge?.(url, result.bytes.byteLength, "total-budget");
75
+ return part;
76
+ }
77
+ usedBytes.value += result.bytes.byteLength;
78
+ const mimeType = (result.mimeType || "application/octet-stream").split(";")[0].trim() || "application/octet-stream";
79
+ return { ...part, image_url: { ...part.image_url, url: `data:${mimeType};base64,${bytesToBase64(result.bytes)}` } };
68
80
  };
69
81
  var inlineImageUrlsForCustomProvider = async (bodyData, options) => {
70
82
  if (!options.shouldInline) return bodyData;
71
83
  const body = bodyData;
72
84
  if (!Array.isArray(body?.messages)) return bodyData;
73
85
  const fetchImage = options.fetchImage ?? defaultFetchImage;
74
- let changed = false;
75
- const messages = [];
76
- for (const message of body.messages) {
77
- if (!Array.isArray(message?.content)) {
78
- messages.push(message);
79
- continue;
86
+ const fetched = /* @__PURE__ */ new Map();
87
+ const fetchOnce = (url, signal, maxBytes) => {
88
+ let result = fetched.get(url);
89
+ if (!result) {
90
+ result = fetchImage(url, signal, maxBytes);
91
+ fetched.set(url, result);
80
92
  }
81
- const content = await Promise.all(
82
- message.content.map(async (part) => {
83
- if (part?.type !== "image_url") return part;
84
- return cloneImagePartWithDataUrl(
85
- part,
86
- fetchImage,
87
- options.isAllowedImageUrl
88
- );
89
- })
90
- );
91
- let messageChanged = false;
92
- for (let i = 0; i < content.length; i++) {
93
- if (content[i] !== message.content[i]) {
93
+ return result;
94
+ };
95
+ const usedBytes = { value: 0 };
96
+ let changed = false;
97
+ const messages = [...body.messages];
98
+ for (let mi = messages.length - 1; mi >= 0; mi--) {
99
+ const message = messages[mi];
100
+ if (!Array.isArray(message?.content)) continue;
101
+ const content = [...message.content];
102
+ for (let pi = content.length - 1; pi >= 0; pi--) {
103
+ const part = content[pi];
104
+ if (part?.type !== "image_url") continue;
105
+ if (options.maxTotalBytes !== void 0 && usedBytes.value >= options.maxTotalBytes) {
106
+ if (typeof part?.image_url?.url === "string" && isInlineCandidate(part.image_url.url)) options.onSkipTooLarge?.(part.image_url.url, void 0, "total-budget");
107
+ continue;
108
+ }
109
+ const cloned = await cloneImagePartWithDataUrl(part, fetchOnce, options, usedBytes);
110
+ if (cloned !== part) {
111
+ content[pi] = cloned;
94
112
  changed = true;
95
- messageChanged = true;
96
- break;
97
113
  }
98
114
  }
99
- messages.push(messageChanged ? { ...message, content } : message);
115
+ if (content.some((part, index) => part !== message.content[index])) messages[mi] = { ...message, content };
100
116
  }
101
- if (!changed) return bodyData;
102
- return {
103
- ...body,
104
- messages
105
- };
117
+ return changed ? { ...body, messages } : bodyData;
106
118
  };
107
119
 
108
120
  // packages/ai/tools/toolSchemaCompatibility.ts
@@ -28,7 +28,7 @@ import {
28
28
  t,
29
29
  toolLabel,
30
30
  toolLabelVariants
31
- } from "./chunk-UWXDA7L5.js";
31
+ } from "./chunk-DJ3JABG5.js";
32
32
  import {
33
33
  clearCredentialAvailability,
34
34
  readCredentialEntry,
@@ -54,7 +54,7 @@ import {
54
54
  import {
55
55
  readDbRecord,
56
56
  resolveAgentRecordFromHybridStore
57
- } from "./chunk-AFSY3ZMB.js";
57
+ } from "./chunk-XGOHDYM2.js";
58
58
  import {
59
59
  isLocalCliAgentKey
60
60
  } from "./chunk-SV5IJK6K.js";
@@ -83,7 +83,7 @@ import {
83
83
  chooseMemoryOwners,
84
84
  loadMemoryCandidatesFromDb,
85
85
  resolveAgentMemoryPolicy
86
- } from "./chunk-FGSJ3YMD.js";
86
+ } from "./chunk-HNA5KV37.js";
87
87
  import {
88
88
  createRunActivityTracker,
89
89
  popSingleQueueMessage,
@@ -113,7 +113,7 @@ import {
113
113
  import {
114
114
  API_REPORTED_COST_MULTIPLIER,
115
115
  parseUiAskChoiceContent
116
- } from "./chunk-44CU7CKA.js";
116
+ } from "./chunk-VYKXIHRP.js";
117
117
  import {
118
118
  isOAuthApiKeyRef
119
119
  } from "./chunk-UKZX3NHN.js";
@@ -128,10 +128,10 @@ import {
128
128
  LOCAL_AGENT_CONFIG_MISSING_CODE,
129
129
  LOCAL_TURN_ABORTED_CODE,
130
130
  readActionGate
131
- } from "./chunk-ZBHR642M.js";
131
+ } from "./chunk-EHGIEGLI.js";
132
132
  import {
133
133
  resolveAgentRuntimeConfigFromRecord
134
- } from "./chunk-CFHWVEUJ.js";
134
+ } from "./chunk-ZVGXD7UJ.js";
135
135
  import {
136
136
  createThinkParserState,
137
137
  flushThinkParser,
@@ -149,7 +149,7 @@ import {
149
149
  DEFAULT_CONTEXT_WINDOW,
150
150
  getModelContextWindow,
151
151
  normalizeUsage
152
- } from "./chunk-L5WOICCV.js";
152
+ } from "./chunk-MJ3CRU77.js";
153
153
  import {
154
154
  clipCompactText
155
155
  } from "./chunk-5MMAK75Q.js";
@@ -165,13 +165,13 @@ import {
165
165
  } from "./chunk-HDLLCBRF.js";
166
166
  import {
167
167
  isAntigravityOAuthAgent
168
- } from "./chunk-UA324D4O.js";
168
+ } from "./chunk-BPLIXNC6.js";
169
169
  import {
170
170
  resolveClientVersion
171
- } from "./chunk-27ONFIEY.js";
171
+ } from "./chunk-SJ7CUF65.js";
172
172
  import {
173
173
  findModelConfig
174
- } from "./chunk-3BXNTXYI.js";
174
+ } from "./chunk-GU7DC2TD.js";
175
175
  import {
176
176
  toErrorMessage
177
177
  } from "./chunk-HNMXYYJR.js";
@@ -190,7 +190,7 @@ import {
190
190
  CLIENT_VERSION_TOO_OLD_CODE,
191
191
  NOLO_CLIENT_VERSION_HEADER,
192
192
  buildClientVersionUpgradeMessage
193
- } from "./chunk-Y3PMXGLH.js";
193
+ } from "./chunk-IYIXAIEB.js";
194
194
  import {
195
195
  asTrimmedLowercaseString
196
196
  } from "./chunk-QSJ3HFEF.js";
@@ -198,7 +198,7 @@ import {
198
198
  BUILTIN_NOLO_AGENT_KEY,
199
199
  BUILTIN_NOLO_AGENT_NAME,
200
200
  builtinAgentCatalogEntryById
201
- } from "./chunk-BNGW5ASC.js";
201
+ } from "./chunk-LYLO5U3H.js";
202
202
  import {
203
203
  parsePublicAgentId
204
204
  } from "./chunk-M2EJHDJP.js";
@@ -9627,8 +9627,6 @@ function formatNormalToolDuration(elapsedMs) {
9627
9627
  function formatNormalToolLine(event, pending, colorEnabled) {
9628
9628
  if (event.type === "tool-call") return "";
9629
9629
  const toolName = event.toolName || pending?.toolName || "tool";
9630
- const todoBlock = formatTodoListForCli(event, colorEnabled);
9631
- if (todoBlock) return todoBlock;
9632
9630
  if (event.type === "tool-result" && (event.toolName === "ask_user" || event.metadata?.uiAskChoice)) {
9633
9631
  const block = formatUiAskChoiceBlock(event, colorEnabled);
9634
9632
  if (block) return block;
@@ -9691,39 +9689,6 @@ function resolveLoadSkillName(event) {
9691
9689
  if (match?.[1]) return match[1];
9692
9690
  return argName || "skill";
9693
9691
  }
9694
- function formatTodoListForCli(event, colorEnabled) {
9695
- if (event.type !== "tool-result" || event.toolName !== "setTodoList") {
9696
- return void 0;
9697
- }
9698
- let raw = event.metadata?.displayData;
9699
- let parsed = typeof raw === "object" && raw !== null;
9700
- if (typeof raw === "string") {
9701
- try {
9702
- raw = JSON.parse(raw);
9703
- parsed = true;
9704
- } catch {
9705
- raw = void 0;
9706
- }
9707
- }
9708
- if (!parsed && typeof event.content === "string") {
9709
- try {
9710
- raw = JSON.parse(event.content);
9711
- parsed = true;
9712
- } catch {
9713
- raw = void 0;
9714
- }
9715
- }
9716
- const todos = Array.isArray(raw?.todos) ? raw.todos : void 0;
9717
- if (!todos) return void 0;
9718
- if (todos.length === 0) return "\u2611 Todo\n (empty)\n";
9719
- const lines = todos.map((todo) => {
9720
- const status = todo?.status === "done" ? "\u2713" : todo?.status === "in_progress" ? "\u25D0" : "\u25CB";
9721
- const title = typeof todo?.title === "string" ? todo.title : "Untitled task";
9722
- return ` ${status} ${title}`;
9723
- });
9724
- const text = [`\u2611 Todo (${todos.length})`, ...lines].join("\n") + "\n";
9725
- return colorEnabled ? themeText(text, "chrome") : text;
9726
- }
9727
9692
  function formatLoadSkillBlock(event, colorEnabled, opts) {
9728
9693
  if (event.type !== "tool-result" || event.toolName !== "loadSkill") return null;
9729
9694
  const skillName = resolveLoadSkillName(event);
@@ -10722,7 +10687,7 @@ function findCollapsedPasteSpanAt(buffer, pos, opts = {}) {
10722
10687
  // packages/cli/client/agentRun.ts
10723
10688
  import { ulid as ulid2 } from "ulid";
10724
10689
  async function loadRunLocalAgentTurn() {
10725
- const { runLocalAgentTurn } = await import("./agentRuntimeLocal-PV6AZOEU.js");
10690
+ const { runLocalAgentTurn } = await import("./agentRuntimeLocal-E5HXZNXZ.js");
10726
10691
  return runLocalAgentTurn;
10727
10692
  }
10728
10693
  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();
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  isImageUrlPart,
3
3
  isOllamaEndpoint
4
- } from "./chunk-M7VLQGQP.js";
4
+ } from "./chunk-UM7TA3K4.js";
5
5
  import {
6
6
  AGENT_SELECTION_PRIORITY_INSTRUCTIONS
7
7
  } from "./chunk-SJKULPGX.js";
8
8
  import {
9
9
  getModelContextWindow
10
- } from "./chunk-L5WOICCV.js";
10
+ } from "./chunk-MJ3CRU77.js";
11
11
  import {
12
12
  estimateTokenCount
13
13
  } from "./chunk-PSCNXBYA.js";
@@ -18,7 +18,7 @@ import {
18
18
  PLATFORM_HOSTED_KIMI_K3_MODEL,
19
19
  isFireworksKimiModel,
20
20
  isNoloHostedProvider
21
- } from "./chunk-Y3PMXGLH.js";
21
+ } from "./chunk-IYIXAIEB.js";
22
22
  import {
23
23
  asTrimmedLowercaseString
24
24
  } from "./chunk-QSJ3HFEF.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  trimTrailingSlash
3
- } from "./chunk-27ONFIEY.js";
3
+ } from "./chunk-SJ7CUF65.js";
4
4
  import {
5
5
  toErrorMessage
6
6
  } from "./chunk-HNMXYYJR.js";
@@ -5,7 +5,7 @@ import {
5
5
  getAntigravityUserAgent,
6
6
  readAntigravityProjectId,
7
7
  resolveAntigravityCloudCodeBaseUrl
8
- } from "./chunk-UA324D4O.js";
8
+ } from "./chunk-BPLIXNC6.js";
9
9
  import {
10
10
  asOptionalTrimmedString
11
11
  } from "./chunk-G3SUCT4W.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  generatePkcePair,
3
3
  startCallbackServer
4
- } from "./chunk-2WJ57RJA.js";
4
+ } from "./chunk-XLWMNFBZ.js";
5
5
  import {
6
6
  toErrorMessage
7
7
  } from "./chunk-HNMXYYJR.js";
@@ -4,7 +4,7 @@ import {
4
4
  refreshAntigravityOAuthToken,
5
5
  refreshOpenAiCodexToken,
6
6
  xaiRefresh
7
- } from "./chunk-2WJ57RJA.js";
7
+ } from "./chunk-XLWMNFBZ.js";
8
8
  import {
9
9
  createChromeConnectorClientResolver,
10
10
  createVerifiedChromeConnectorClient,
@@ -38,14 +38,14 @@ import {
38
38
  } from "./chunk-VIWDGTDA.js";
39
39
  import {
40
40
  inferCaptureIntent
41
- } from "./chunk-VCAQFMVN.js";
41
+ } from "./chunk-QVAWUJAJ.js";
42
42
  import {
43
43
  buildCliPrompt
44
44
  } from "./chunk-ATNTHIZI.js";
45
45
  import {
46
46
  inlineImageUrlsForCustomProvider,
47
47
  prepareTools
48
- } from "./chunk-NSAFG343.js";
48
+ } from "./chunk-AM4G3LDJ.js";
49
49
  import {
50
50
  getServerProviderSecret
51
51
  } from "./chunk-HS7MLR74.js";
@@ -61,20 +61,19 @@ import {
61
61
  readXhsProfileFunc,
62
62
  readXhsProfileFunctionSchema,
63
63
  rememberMemoryFunctionSchema,
64
- resolveAgentRequiredPackIds,
65
- setTodoListFunc
66
- } from "./chunk-LWXE6IFU.js";
64
+ resolveAgentRequiredPackIds
65
+ } from "./chunk-XDQ7PHU3.js";
67
66
  import {
68
67
  deriveCredentialGroup,
69
68
  deriveCustomProviderCredentialGroup
70
- } from "./chunk-QKTESDWK.js";
69
+ } from "./chunk-4VDS344D.js";
71
70
  import {
72
71
  fetchWithTransientRetry,
73
72
  isTransientFetchError
74
73
  } from "./chunk-AOTBKDRK.js";
75
74
  import {
76
75
  getModelPricing
77
- } from "./chunk-4DPP773Q.js";
76
+ } from "./chunk-ODTBO4W6.js";
78
77
  import {
79
78
  ackRunRecord,
80
79
  appendRunQueue,
@@ -115,14 +114,14 @@ import {
115
114
  prepareTokenUsageData,
116
115
  resolveBuiltinPlatformAgentConfig,
117
116
  runKeyed
118
- } from "./chunk-44CU7CKA.js";
117
+ } from "./chunk-VYKXIHRP.js";
119
118
  import {
120
119
  BUILTIN_DIALOG_LLM_CHAT_FALLBACK_MODEL,
121
120
  BUILTIN_TITLE_LLM_CONFIG
122
121
  } from "./chunk-523DITKR.js";
123
122
  import {
124
123
  fetchServerSyncedCredential
125
- } from "./chunk-S2NSK7AZ.js";
124
+ } from "./chunk-3SXZ6SUC.js";
126
125
  import {
127
126
  FORCED_TOOLS,
128
127
  addDefaultLightWebToolsForConfiguredAgents,
@@ -132,7 +131,7 @@ import {
132
131
  applySystemBuiltinSkillFilter,
133
132
  expandEnabledPacks,
134
133
  resolveEffectiveEnabledPacks
135
- } from "./chunk-GSKPJIHY.js";
134
+ } from "./chunk-LUBFABMJ.js";
136
135
  import {
137
136
  DEFAULT_HYBRID_READ_TIMEOUT_MS,
138
137
  Duration_exports,
@@ -163,7 +162,7 @@ import {
163
162
  readDevinUpstreamFailure,
164
163
  resolveOpenAiCompatibleProviderConfig,
165
164
  resolveSessionKey
166
- } from "./chunk-ZBHR642M.js";
165
+ } from "./chunk-EHGIEGLI.js";
167
166
  import {
168
167
  accumulateGeminiChunks,
169
168
  buildGeminiGenerateContentRequest,
@@ -174,7 +173,7 @@ import {
174
173
  parseUpstreamErrorBody,
175
174
  resolveAntigravityFinishReason,
176
175
  shouldUseGeminiNativeToolRoute
177
- } from "./chunk-YK5MHOWM.js";
176
+ } from "./chunk-CEQ75WPL.js";
178
177
  import {
179
178
  PlatformStreamInterruptedError,
180
179
  buildPlatformChatCompletionRequest,
@@ -185,14 +184,14 @@ import {
185
184
  readPlatformChatSseCompletion,
186
185
  resolvePlatformChatProviderConfig,
187
186
  shouldUsePlatformChatProvider
188
- } from "./chunk-54VPQTOA.js";
187
+ } from "./chunk-GMP3NBAA.js";
189
188
  import {
190
189
  readSseDataValues
191
190
  } from "./chunk-GMZLP5DV.js";
192
191
  import {
193
192
  resolveAgentRuntimeConfigFromRecord,
194
193
  resolveHistoricalToolContentCap
195
- } from "./chunk-CFHWVEUJ.js";
194
+ } from "./chunk-ZVGXD7UJ.js";
196
195
  import {
197
196
  isDevinOAuthAgent
198
197
  } from "./chunk-5ZUL4CUO.js";
@@ -201,7 +200,7 @@ import {
201
200
  convertMessagesToResponsesInput,
202
201
  stablePromptCacheKey,
203
202
  toResponsesTools
204
- } from "./chunk-M7VLQGQP.js";
203
+ } from "./chunk-UM7TA3K4.js";
205
204
  import {
206
205
  buildNoloWorkspaceOpenAiTools,
207
206
  parseNoloWorkspaceToolArguments,
@@ -219,14 +218,14 @@ import {
219
218
  } from "./chunk-2MBTWINN.js";
220
219
  import {
221
220
  normalizeUsage
222
- } from "./chunk-L5WOICCV.js";
221
+ } from "./chunk-MJ3CRU77.js";
223
222
  import {
224
223
  createProviderCallTimingTracker,
225
224
  finalizeProviderCallTiming,
226
225
  observeMeaningfulProviderResponse,
227
226
  observeMeaningfulProviderResponseAt,
228
227
  withProviderCallTimingFields
229
- } from "./chunk-IEJ5YDA4.js";
228
+ } from "./chunk-WMWYWYK2.js";
230
229
  import {
231
230
  clipCompactText
232
231
  } from "./chunk-5MMAK75Q.js";
@@ -257,15 +256,15 @@ import {
257
256
  } from "./chunk-LWLNLZC5.js";
258
257
  import {
259
258
  isAntigravityOAuthAgent
260
- } from "./chunk-UA324D4O.js";
259
+ } from "./chunk-BPLIXNC6.js";
261
260
  import {
262
261
  resolvePlatformAuthToken
263
- } from "./chunk-27ONFIEY.js";
262
+ } from "./chunk-SJ7CUF65.js";
264
263
  import {
265
264
  anthropicOAuthModelMaxOutputTokens,
266
265
  getModelConfig,
267
266
  isAdaptiveThinkingModelId
268
- } from "./chunk-3BXNTXYI.js";
267
+ } from "./chunk-GU7DC2TD.js";
269
268
  import {
270
269
  toErrorMessage
271
270
  } from "./chunk-HNMXYYJR.js";
@@ -282,7 +281,7 @@ import {
282
281
  import {
283
282
  isNoloHostedProvider,
284
283
  isPlatformHostedImageModel
285
- } from "./chunk-Y3PMXGLH.js";
284
+ } from "./chunk-IYIXAIEB.js";
286
285
  import {
287
286
  asTrimmedLowercaseString
288
287
  } from "./chunk-QSJ3HFEF.js";
@@ -297,7 +296,7 @@ import {
297
296
  builtinAgentCatalogEntryById,
298
297
  isRetiredCatalogEntry,
299
298
  isSystemBuiltinTrustedAgentKey
300
- } from "./chunk-BNGW5ASC.js";
299
+ } from "./chunk-LYLO5U3H.js";
301
300
  import {
302
301
  parsePublicAgentId,
303
302
  parseSystemAgentId,
@@ -6758,20 +6757,6 @@ function buildLocalToolExecutors(args) {
6758
6757
  controlAgentRun: createCliControlAgentRunExecutor({
6759
6758
  env: args.env
6760
6759
  }),
6761
- setTodoList: async (call) => {
6762
- const parsedArgs = typeof call?.arguments === "string" ? (() => {
6763
- try {
6764
- return JSON.parse(call.arguments);
6765
- } catch {
6766
- return {};
6767
- }
6768
- })() : call?.arguments || {};
6769
- const res = await setTodoListFunc(parsedArgs);
6770
- return {
6771
- content: JSON.stringify(res.rawData),
6772
- metadata: { displayData: res.displayData }
6773
- };
6774
- },
6775
6760
  ...args.pastedTextStore ? { readPastedText: createReadPastedTextExecutor(args.pastedTextStore) } : {},
6776
6761
  // Nolo Browser Connector: the CLI drives the user's real Chrome through the same verified
6777
6762
  // client + executor as the desktop runtime (before this, every chrome_* call answered