nolo-cli 0.170.1 → 0.171.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 (100) hide show
  1. package/{_executeModel-7J6IIHWQ.js → _executeModel-YJW2HPFY.js} +29 -29
  2. package/{agentDeleteCommand-F66NIWCF.js → agentDeleteCommand-O3EG3HS4.js} +37 -37
  3. package/{agentEmailCommands-M4SHODDA.js → agentEmailCommands-AIWZNMRW.js} +41 -41
  4. package/{agentListCommands-4BBFWXHX.js → agentListCommands-377PQ6K4.js} +25 -25
  5. package/{agentMachineCommands-R55P5SZY.js → agentMachineCommands-TYL7KKSL.js} +21 -21
  6. package/{agentProviderCommands-4USYTCL3.js → agentProviderCommands-TWVILNAN.js} +2 -2
  7. package/{agentRecordCommands-PDWACZFR.js → agentRecordCommands-YPRND72K.js} +37 -37
  8. package/{agentRunCommand-U2F74LTS.js → agentRunCommand-T7AQKKH5.js} +38 -38
  9. package/{agentRunControl-EI3BGJFM.js → agentRunControl-SBHIICUQ.js} +5 -5
  10. package/{agentRuntimeLocal-7EZYBR6X.js → agentRuntimeLocal-7ZE2ZQAL.js} +19 -19
  11. package/{agentSlice-UN7ZHCAM.js → agentSlice-BHH2DZKN.js} +3 -3
  12. package/{appDeleteCommands-WS3UFMCB.js → appDeleteCommands-LHOX4HM3.js} +22 -22
  13. package/{appDeployCommands-W5B7I73P.js → appDeployCommands-A6CQQTI3.js} +22 -22
  14. package/{appDeployStatusCommands-UEHNV2GU.js → appDeployStatusCommands-7TTNQODL.js} +22 -22
  15. package/{appGetCommands-XJOBVREN.js → appGetCommands-22F4E37N.js} +22 -22
  16. package/{appListCommands-BISQV6BQ.js → appListCommands-WCDOJUVV.js} +22 -22
  17. package/{authCommand-H35CPF25.js → authCommand-BSOLJFPV.js} +12 -12
  18. package/{builtinSkillRegistry-LJV7FHNI.js → builtinSkillRegistry-V76JTNCJ.js} +2 -2
  19. package/{chunk-2AZSL4GL.js → chunk-22FIHMYU.js} +3 -3
  20. package/{chunk-SH3XD4E2.js → chunk-3LNVSFTH.js} +2 -1
  21. package/{chunk-SAZSXMTR.js → chunk-6OC2YMGH.js} +4 -4
  22. package/{chunk-2DXGW4UO.js → chunk-6OYC7NDH.js} +160 -37
  23. package/{chunk-7NKZA46B.js → chunk-72T5DXRH.js} +4 -4
  24. package/{chunk-3USFOET4.js → chunk-7CDMXZJA.js} +3 -3
  25. package/{chunk-DI7ZFGDQ.js → chunk-7L2HZQNN.js} +2 -2
  26. package/{chunk-XLBQQ5SB.js → chunk-7MBN2JZ5.js} +4 -4
  27. package/{chunk-FQU23S3P.js → chunk-AGAB26VE.js} +11 -11
  28. package/{chunk-G3VYRPTV.js → chunk-AJ52EA72.js} +4 -4
  29. package/{chunk-JPPQ3GUO.js → chunk-APB44JID.js} +3 -3
  30. package/{chunk-CEXJ6Y3C.js → chunk-AUGBRK3P.js} +2 -1
  31. package/{chunk-WC7UXON2.js → chunk-BJWOOJX5.js} +89 -36
  32. package/{chunk-URO44BCD.js → chunk-BQSW7453.js} +1 -1
  33. package/{chunk-Z6HR75HX.js → chunk-C2OYZYJ7.js} +3 -3
  34. package/{chunk-IMMA7QFE.js → chunk-CAAH5LNN.js} +2 -2
  35. package/{chunk-O2AY3CVI.js → chunk-CEYUVQYU.js} +16 -16
  36. package/{chunk-URW5UM6Y.js → chunk-CI5DVWU7.js} +1 -1
  37. package/{chunk-WVREKHHJ.js → chunk-DWQD3JTX.js} +3 -3
  38. package/{chunk-45IOFLGH.js → chunk-EPMWJ7X7.js} +11 -11
  39. package/{chunk-IOFLVIKF.js → chunk-EWLPIR2S.js} +1 -1
  40. package/{chunk-6EQD4AQL.js → chunk-GC64WGMD.js} +1 -1
  41. package/{chunk-FYYSDHVQ.js → chunk-HLAL63BZ.js} +1 -1
  42. package/{chunk-PIG2IUVZ.js → chunk-I2QHI2XM.js} +2 -2
  43. package/{chunk-BSKTDOGA.js → chunk-JHXY4H3P.js} +56 -56
  44. package/{chunk-7VWWGKEQ.js → chunk-K2NTGYVK.js} +3 -3
  45. package/{chunk-I7S63QUU.js → chunk-KNDA4K34.js} +1 -1
  46. package/{chunk-CMRP4XHV.js → chunk-MIME4XKU.js} +12 -12
  47. package/{chunk-HEC32F3G.js → chunk-O3FUFEUI.js} +1 -1
  48. package/{chunk-KJETBEEN.js → chunk-OPNHKULV.js} +1 -1
  49. package/{chunk-EWO77ZGF.js → chunk-OQ3DOBYB.js} +3 -3
  50. package/{chunk-WLPUUBFR.js → chunk-P4V35AFD.js} +3 -3
  51. package/{chunk-DHNQA4VI.js → chunk-Q7UPF643.js} +1 -1
  52. package/{chunk-TOUKACDK.js → chunk-RATR6VCP.js} +1 -1
  53. package/{chunk-XITIONPS.js → chunk-SC5TDLTP.js} +6 -6
  54. package/{chunk-LEZLJTQ4.js → chunk-SUBKVXFM.js} +1 -1
  55. package/{chunk-ZPKUJROL.js → chunk-TDNAAXUQ.js} +2 -2
  56. package/{chunk-SQX235S2.js → chunk-TSCI6X6C.js} +1 -1
  57. package/{chunk-V7PCFWX3.js → chunk-TVGX5QIN.js} +2 -2
  58. package/{chunk-XLQFVHNX.js → chunk-TYQZRSL6.js} +1 -1
  59. package/{chunk-46OQD3AP.js → chunk-UIVOLTFM.js} +4 -4
  60. package/{chunk-3ELX6JK5.js → chunk-UPC23AAN.js} +10 -10
  61. package/{chunk-MFVOJ6KF.js → chunk-W6E5IXIP.js} +3 -3
  62. package/{chunk-HZMWJUSD.js → chunk-WPOSH6PA.js} +2 -2
  63. package/{chunk-YCRROBDY.js → chunk-WXOKJP3W.js} +2 -1
  64. package/{chunk-CEQFVBI2.js → chunk-X2Q5GT5J.js} +3 -3
  65. package/{chunk-ASSNAASW.js → chunk-XHR22EKE.js} +5 -5
  66. package/{chunk-KMDDG73K.js → chunk-XWX5ZGWR.js} +1 -1
  67. package/{chunk-QW6SSF7V.js → chunk-ZJ66I757.js} +15 -15
  68. package/{commandRegistry-3XBG7JHS.js → commandRegistry-EAPXP4BC.js} +56 -56
  69. package/{contentThunks-OO3MJAED.js → contentThunks-SJAKJV4V.js} +11 -11
  70. package/{createAgentAutomationAction-F3O6FJ5W.js → createAgentAutomationAction-IBSAZBSP.js} +11 -11
  71. package/{createDialogAction-UBQKDUK5.js → createDialogAction-MQDTLASD.js} +13 -13
  72. package/{createPageAction-RDEDO4GF.js → createPageAction-EOPBBQMH.js} +11 -11
  73. package/{dialogCommands-P5HSDZ7T.js → dialogCommands-SV4M5HAV.js} +23 -23
  74. package/{dialogSlice-WZCWWYR3.js → dialogSlice-6CC3YDDL.js} +10 -10
  75. package/{docCreateCommands-B2M3MGX7.js → docCreateCommands-UC2CPMH7.js} +21 -21
  76. package/{docDeleteCommands-NHCUX4XL.js → docDeleteCommands-SRPTGMZ2.js} +22 -22
  77. package/{docReadCommands-FOLST4JD.js → docReadCommands-U3TDUPOY.js} +21 -21
  78. package/{docStore-PTSCGC6T.js → docStore-RSBDE3UH.js} +1 -1
  79. package/{docUpdateCommands-YZT2PQP2.js → docUpdateCommands-G5J5UKGP.js} +21 -21
  80. package/{getPricing-XQ3N3RBP.js → getPricing-2UPNNW3Y.js} +3 -3
  81. package/{handleSendMessageAction-3YMQS6XO.js → handleSendMessageAction-EM43KNSP.js} +23 -23
  82. package/index.js +4 -4
  83. package/{localRuntimeAdapter-ZIAOTUBE.js → localRuntimeAdapter-N5WDXYSY.js} +35 -35
  84. package/{machineCommands-3LSEP24P.js → machineCommands-L34XTTLG.js} +36 -36
  85. package/{machineWsRunDispatch-7A3TSH4Q.js → machineWsRunDispatch-IKI7FGKI.js} +36 -36
  86. package/{models-PZQC7VV4.js → models-UUNO6DOL.js} +2 -2
  87. package/package.json +1 -1
  88. package/{providerPresetApply-PKUOHQJT.js → providerPresetApply-5K4PBX4J.js} +6 -6
  89. package/{providerRegistry-HNQLIFN2.js → providerRegistry-K5MSZ3Y5.js} +6 -6
  90. package/{readlineWorkspace-OFBP6OA7.js → readlineWorkspace-ZANIHEDR.js} +44 -44
  91. package/{runAgentClientLoop-F6EQK26A.js → runAgentClientLoop-HPF2WFFQ.js} +27 -27
  92. package/{runtimeDoctorCommands-LYMJEM4F.js → runtimeDoctorCommands-DXJH5HIB.js} +6 -6
  93. package/{secretCommands-DNY56NSU.js → secretCommands-7S6REMJV.js} +2 -2
  94. package/{spaceCommands-XESXH5CW.js → spaceCommands-6KPBWGGE.js} +21 -21
  95. package/{streamAgentChatTurn-KXELVHFR.js → streamAgentChatTurn-3SNWCCK2.js} +33 -33
  96. package/{tools-FMNDEVTZ.js → tools-7SMCO2GW.js} +21 -21
  97. package/{tuiSummaryLlmCaller-FQOEF4IE.js → tuiSummaryLlmCaller-H6WX54WY.js} +8 -8
  98. package/{updateDialogTitleAction-65R3Y22L.js → updateDialogTitleAction-XIMLNROU.js} +11 -11
  99. package/{chunk-CGFNDIKK.js → chunk-5KTQVMCX.js} +0 -0
  100. package/{chunk-UHTDNB5Y.js → chunk-76YUTLOT.js} +3 -3
@@ -1,3 +1,6 @@
1
+ import {
2
+ writeOAuthCredential
3
+ } from "./chunk-ZWQUWF6W.js";
1
4
  import {
2
5
  buildEnvFromProfile,
3
6
  loadProfileConfig
@@ -15,7 +18,7 @@ import {
15
18
  getAntigravityUserAgent,
16
19
  normalizeAntigravityTokenPayload,
17
20
  refreshAntigravityToken
18
- } from "./chunk-SQX235S2.js";
21
+ } from "./chunk-TSCI6X6C.js";
19
22
  import {
20
23
  asOptionalFiniteNumber
21
24
  } from "./chunk-WWC7I6TA.js";
@@ -28,9 +31,6 @@ import {
28
31
  import {
29
32
  toErrorMessage
30
33
  } from "./chunk-HNMXYYJR.js";
31
- import {
32
- writeOAuthCredential
33
- } from "./chunk-ZWQUWF6W.js";
34
34
 
35
35
  // packages/cli/oauth/callback-server.ts
36
36
  import { createServer } from "node:http";
@@ -1,9 +1,9 @@
1
- import {
2
- resolvePlatformAuthToken
3
- } from "./chunk-PIG2IUVZ.js";
4
1
  import {
5
2
  getCredentialsDir
6
3
  } from "./chunk-ZWQUWF6W.js";
4
+ import {
5
+ resolvePlatformAuthToken
6
+ } from "./chunk-I2QHI2XM.js";
7
7
 
8
8
  // packages/cli/client/authGuidance.ts
9
9
  import { readdirSync } from "node:fs";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  resolveAgentImageInputSupport
3
- } from "./chunk-BSKTDOGA.js";
3
+ } from "./chunk-JHXY4H3P.js";
4
4
  import {
5
5
  asOptionalFiniteNumber
6
6
  } from "./chunk-WWC7I6TA.js";
@@ -427,6 +427,7 @@ function assertDesktopAgentRuntimeTurnBodyHasNoRawSecrets(body) {
427
427
  export {
428
428
  extractImageUrlsFromMessages,
429
429
  hasImageInRuntimeMessages,
430
+ IMAGE_OMITTED_PLACEHOLDER,
430
431
  stripImagePartsFromMessages,
431
432
  stripImagePartsForTextOnlyAgent,
432
433
  resolveAgentRuntimeConfigFromRecord,
@@ -5,7 +5,7 @@ import {
5
5
  refreshOpenAiCodexToken,
6
6
  resolveServerSyncConfig,
7
7
  xaiRefresh
8
- } from "./chunk-G3VYRPTV.js";
8
+ } from "./chunk-AJ52EA72.js";
9
9
  import {
10
10
  clearCredentialAvailability,
11
11
  markCredentialUnavailable,
@@ -54,7 +54,7 @@ import {
54
54
  } from "./chunk-BU2YQBV4.js";
55
55
  import {
56
56
  applyPublicAgentCatalogOverride
57
- } from "./chunk-MFVOJ6KF.js";
57
+ } from "./chunk-W6E5IXIP.js";
58
58
  import {
59
59
  buildCliPrompt
60
60
  } from "./chunk-ATNTHIZI.js";
@@ -64,7 +64,7 @@ import {
64
64
  import {
65
65
  inlineImageUrlsForCustomProvider,
66
66
  prepareTools
67
- } from "./chunk-2AZSL4GL.js";
67
+ } from "./chunk-22FIHMYU.js";
68
68
  import {
69
69
  getServerProviderSecret
70
70
  } from "./chunk-HS7MLR74.js";
@@ -86,18 +86,18 @@ import {
86
86
  resolveCliLocalRuntimeKeyCapability,
87
87
  resolveCliLocalSpawnDispatch,
88
88
  resolveStartAgentRunCwd
89
- } from "./chunk-QW6SSF7V.js";
89
+ } from "./chunk-ZJ66I757.js";
90
90
  import {
91
91
  deriveCredentialGroup,
92
92
  deriveCustomProviderCredentialGroup
93
- } from "./chunk-XITIONPS.js";
93
+ } from "./chunk-SC5TDLTP.js";
94
94
  import {
95
95
  fetchWithTransientRetry,
96
96
  isTransientFetchError
97
97
  } from "./chunk-KFHREHUQ.js";
98
98
  import {
99
99
  resolveAgentRequiredPackIds
100
- } from "./chunk-WLPUUBFR.js";
100
+ } from "./chunk-P4V35AFD.js";
101
101
  import {
102
102
  applyBuiltinAgentRuntimeOverride,
103
103
  applyTokenUsageToDayStats,
@@ -106,14 +106,14 @@ import {
106
106
  resolveBuiltinPlatformAgentConfig,
107
107
  runKeyed,
108
108
  validateAskChoiceInput
109
- } from "./chunk-CMRP4XHV.js";
109
+ } from "./chunk-MIME4XKU.js";
110
110
  import {
111
111
  BUILTIN_DIALOG_LLM_CHAT_FALLBACK_MODEL,
112
112
  BUILTIN_TITLE_LLM_CONFIG
113
113
  } from "./chunk-523DITKR.js";
114
114
  import {
115
115
  fetchServerSyncedCredential
116
- } from "./chunk-XLBQQ5SB.js";
116
+ } from "./chunk-7MBN2JZ5.js";
117
117
  import {
118
118
  isTombstoneRecord
119
119
  } from "./chunk-D2MDMY2M.js";
@@ -126,7 +126,7 @@ import {
126
126
  applySystemBuiltinSkillFilter,
127
127
  expandEnabledPacks,
128
128
  resolveEffectiveEnabledPacks
129
- } from "./chunk-YCRROBDY.js";
129
+ } from "./chunk-WXOKJP3W.js";
130
130
  import {
131
131
  DEFAULT_HYBRID_READ_TIMEOUT_MS,
132
132
  Duration_exports,
@@ -168,9 +168,10 @@ import {
168
168
  resolveSessionKey,
169
169
  responsesStreamFailureStatus,
170
170
  runExecShellGates,
171
+ toolImages,
171
172
  validateConfiguredRootExecutionLease,
172
173
  verifyOwnerRouteAck
173
- } from "./chunk-2DXGW4UO.js";
174
+ } from "./chunk-6OYC7NDH.js";
174
175
  import {
175
176
  accumulateGeminiChunks,
176
177
  buildGeminiGenerateContentRequest,
@@ -182,7 +183,7 @@ import {
182
183
  resolveAntigravityFinishReason,
183
184
  resolveGeminiModelQuirks,
184
185
  shouldUseGeminiNativeToolRoute
185
- } from "./chunk-KMDDG73K.js";
186
+ } from "./chunk-XWX5ZGWR.js";
186
187
  import {
187
188
  PlatformStreamInterruptedError,
188
189
  buildPlatformChatCompletionRequest,
@@ -193,24 +194,26 @@ import {
193
194
  readPlatformChatSseCompletion,
194
195
  resolvePlatformChatProviderConfig,
195
196
  shouldUsePlatformChatProvider
196
- } from "./chunk-7NKZA46B.js";
197
+ } from "./chunk-72T5DXRH.js";
197
198
  import {
198
199
  readSseDataValues,
199
200
  readSseFrames
200
201
  } from "./chunk-HNUWUO75.js";
201
202
  import {
203
+ IMAGE_OMITTED_PLACEHOLDER,
202
204
  resolveAgentRuntimeConfigFromRecord
203
- } from "./chunk-CEXJ6Y3C.js";
205
+ } from "./chunk-AUGBRK3P.js";
204
206
  import {
207
+ resolveAgentImageInputSupport,
205
208
  resolveHistoricalToolContentCap
206
- } from "./chunk-BSKTDOGA.js";
209
+ } from "./chunk-JHXY4H3P.js";
207
210
  import {
208
211
  collectStablePromptPrefix,
209
212
  convertMessagesToResponsesInput,
210
213
  findAgentStatePairingIssues,
211
214
  stablePromptCacheKey,
212
215
  toResponsesTools
213
- } from "./chunk-DI7ZFGDQ.js";
216
+ } from "./chunk-7L2HZQNN.js";
214
217
  import {
215
218
  buildNoloWorkspaceOpenAiTools,
216
219
  filterClientNoloWorkspaceToolNames,
@@ -231,7 +234,7 @@ import {
231
234
  import {
232
235
  isOAuthApiKeyRef,
233
236
  normalizeUsage
234
- } from "./chunk-HEC32F3G.js";
237
+ } from "./chunk-O3FUFEUI.js";
235
238
  import {
236
239
  isDevinOAuthAgent
237
240
  } from "./chunk-5ZUL4CUO.js";
@@ -241,7 +244,7 @@ import {
241
244
  observeMeaningfulProviderResponse,
242
245
  observeMeaningfulProviderResponseAt,
243
246
  withProviderCallTimingFields
244
- } from "./chunk-ASSNAASW.js";
247
+ } from "./chunk-XHR22EKE.js";
245
248
  import {
246
249
  clipCompactText
247
250
  } from "./chunk-5MMAK75Q.js";
@@ -255,13 +258,19 @@ import {
255
258
  } from "./chunk-LIQJTQRN.js";
256
259
  import {
257
260
  createFileCredentialBroker
258
- } from "./chunk-UHTDNB5Y.js";
261
+ } from "./chunk-76YUTLOT.js";
259
262
  import {
260
263
  asRecordOrEmpty
261
264
  } from "./chunk-KX6YBIHG.js";
262
265
  import {
263
266
  isAbortError
264
267
  } from "./chunk-7DPNBQSV.js";
268
+ import {
269
+ createOAuthTokenStore,
270
+ isTokenExpired,
271
+ readOAuthCredential,
272
+ resolveFreshAccessToken
273
+ } from "./chunk-ZWQUWF6W.js";
265
274
  import {
266
275
  canonicalizeToolNames
267
276
  } from "./chunk-5EBLANFT.js";
@@ -303,7 +312,7 @@ import {
303
312
  terminateRunProcess,
304
313
  transitionRunToTerminal,
305
314
  withQueueLock
306
- } from "./chunk-URW5UM6Y.js";
315
+ } from "./chunk-CI5DVWU7.js";
307
316
  import {
308
317
  TASK_PREVIEW_MAX,
309
318
  formatListRunsCard,
@@ -340,16 +349,16 @@ import {
340
349
  } from "./chunk-LCBAMY2M.js";
341
350
  import {
342
351
  isAntigravityOAuthAgent
343
- } from "./chunk-SQX235S2.js";
352
+ } from "./chunk-TSCI6X6C.js";
344
353
  import {
345
354
  buildProviderSessionHeaders,
346
355
  resolvePlatformAuthToken
347
- } from "./chunk-PIG2IUVZ.js";
356
+ } from "./chunk-I2QHI2XM.js";
348
357
  import {
349
358
  anthropicOAuthModelMaxOutputTokens,
350
359
  findModelConfig,
351
360
  isAdaptiveThinkingModelId
352
- } from "./chunk-6EQD4AQL.js";
361
+ } from "./chunk-GC64WGMD.js";
353
362
  import {
354
363
  CLI_PROVIDER_VALUES,
355
364
  isCliProvider
@@ -375,12 +384,6 @@ import {
375
384
  import {
376
385
  asTrimmedLowercaseString
377
386
  } from "./chunk-QSJ3HFEF.js";
378
- import {
379
- createOAuthTokenStore,
380
- isTokenExpired,
381
- readOAuthCredential,
382
- resolveFreshAccessToken
383
- } from "./chunk-ZWQUWF6W.js";
384
387
 
385
388
  // packages/agent-runtime/anthropicMessagesProvider.ts
386
389
  import { randomUUID } from "node:crypto";
@@ -742,6 +745,22 @@ function foldIntoTrailingToolResult(blocks, extra) {
742
745
  last.content = [...existing, ...extra];
743
746
  return true;
744
747
  }
748
+ function assertNonEmptyToolResults(messages) {
749
+ const placeholder = "[Tool completed without output]";
750
+ for (const message of messages) {
751
+ if (!Array.isArray(message.content)) continue;
752
+ for (const block of message.content) {
753
+ if (!block || block.type !== "tool_result") continue;
754
+ if (typeof block.content === "string") {
755
+ if (block.content.trim() === "") block.content = placeholder;
756
+ } else if (Array.isArray(block.content)) {
757
+ if (block.content.length === 0) block.content = placeholder;
758
+ } else if (block.content === void 0 || block.content === null) {
759
+ block.content = placeholder;
760
+ }
761
+ }
762
+ }
763
+ }
745
764
  function hasClaudeCodeIdentity(system) {
746
765
  return system.some((block) => {
747
766
  if (!block || typeof block !== "object") return false;
@@ -787,7 +806,23 @@ function buildAnthropicMessagesBody(args) {
787
806
  pushMessage(messages, "user", [{
788
807
  type: "tool_result",
789
808
  tool_use_id: toolUseId,
790
- content: typeof message.content === "string" ? message.content : JSON.stringify(message.content ?? "")
809
+ content: (() => {
810
+ const text = typeof message.content === "string" ? message.content : JSON.stringify(message.content ?? "");
811
+ const images = toolImages(message);
812
+ if (!images.length) return text;
813
+ if (!resolveAgentImageInputSupport(args.agentConfig)) {
814
+ return [{ type: "text", text: `${text}
815
+ ${IMAGE_OMITTED_PLACEHOLDER}` }];
816
+ }
817
+ return [
818
+ ...text.trim() ? [{ type: "text", text }] : [],
819
+ ...images.map((image) => ({ type: "image", source: {
820
+ type: "base64",
821
+ media_type: image.mimeType,
822
+ data: image.dataBase64
823
+ } }))
824
+ ];
825
+ })()
791
826
  }]);
792
827
  }
793
828
  continue;
@@ -817,6 +852,7 @@ function buildAnthropicMessagesBody(args) {
817
852
  }
818
853
  pushMessage(messages, role, blocks);
819
854
  }
855
+ assertNonEmptyToolResults(messages);
820
856
  if (!hasClaudeCodeIdentity(system)) {
821
857
  system.unshift({ type: "text", text: CLAUDE_CODE_SYSTEM_INSTRUCTION });
822
858
  }
@@ -1028,7 +1064,8 @@ function buildPreparedAgentCacheKey(args) {
1028
1064
  const systemBuiltinSkillsKey = args.systemBuiltinSkills ? JSON.stringify(
1029
1065
  Object.keys(args.systemBuiltinSkills).sort().map((key) => [key, args.systemBuiltinSkills?.[key]])
1030
1066
  ) : "default";
1031
- return `${args.userId}\0${args.agentRef}\0${args.cwd}\0${systemBuiltinSkillsKey}`;
1067
+ const wakeKey = args.wake !== void 0 ? args.wake ? "wake:1" : "wake:0" : "";
1068
+ return `${args.userId}\0${args.agentRef}\0${args.cwd}\0${systemBuiltinSkillsKey}${wakeKey ? `\0${wakeKey}` : ""}`;
1032
1069
  }
1033
1070
  function clearCliLocalRuntimePreparedAgentCache() {
1034
1071
  preparedAgentRuntimeCache.clear();
@@ -12169,7 +12206,7 @@ function createCliLocalRuntimeAdapter(deps) {
12169
12206
  const recordRunExecutionIsolation = async () => {
12170
12207
  try {
12171
12208
  const { writeFileSync: writeFileSync4, mkdirSync: mkdirSync4 } = await import("node:fs");
12172
- const { resolveRunsDir: resolveRunsDir2 } = await import("./agentRunControl-EI3BGJFM.js");
12209
+ const { resolveRunsDir: resolveRunsDir2 } = await import("./agentRunControl-SBHIICUQ.js");
12173
12210
  const fact = resolveLocalRunExecutionIsolationFact({
12174
12211
  // F1:显式点名宿主执行的 run 在审计里必须与 docker 沙盒区分开
12175
12212
  // (reason: host-explicit-writes vs docker-workload)。
@@ -12201,7 +12238,7 @@ function createCliLocalRuntimeAdapter(deps) {
12201
12238
  dockerWorkloadReleased = true;
12202
12239
  dockerWorkloadLoad = null;
12203
12240
  if (loaded) {
12204
- const { resolveRunsDir: resolveRunsDir2 } = await import("./agentRunControl-EI3BGJFM.js");
12241
+ const { resolveRunsDir: resolveRunsDir2 } = await import("./agentRunControl-SBHIICUQ.js");
12205
12242
  const exportRunDiff = deps.exportDockerRunDiffArtifact ?? exportDockerRunDiffArtifact;
12206
12243
  const warn = (message) => process.stderr.write(`[nolo] ${message}
12207
12244
  `);
@@ -12347,12 +12384,13 @@ function createCliLocalRuntimeAdapter(deps) {
12347
12384
  } catch {
12348
12385
  }
12349
12386
  }
12350
- const cacheKey = buildPreparedAgentCacheKey({
12387
+ const cacheKey = `${buildPreparedAgentCacheKey({
12351
12388
  userId,
12352
12389
  agentRef,
12353
12390
  cwd: normalizeRuntimeCacheCwd(workspaceRoot),
12354
- systemBuiltinSkills
12355
- });
12391
+ systemBuiltinSkills,
12392
+ wake: hasRunWakeChannel(deps.env)
12393
+ })}:${dockerRuntimeEnabled ? "docker" : instaboxRuntimeEnabled ? "instabox" : "host"}`;
12356
12394
  const cached = deps.pastedTextStore ? void 0 : preparedAgentRuntimeCache.get(cacheKey);
12357
12395
  if (cached) {
12358
12396
  activeAgentToolNames = cached.activeAgentToolNames;
@@ -12376,7 +12414,17 @@ function createCliLocalRuntimeAdapter(deps) {
12376
12414
  deps.env,
12377
12415
  systemBuiltinSkills
12378
12416
  ) : [];
12379
- const effectiveToolNames = [...requestedToolNames, ...additionalToolNames];
12417
+ let effectiveToolNames = [...requestedToolNames, ...additionalToolNames];
12418
+ const backendExecutionToolNames = dockerRuntimeEnabled ? dockerExecutionToolNames : instaboxRuntimeEnabled ? LOCAL_INSTABOX_TOOL_NAMES : null;
12419
+ if (backendExecutionToolNames) {
12420
+ effectiveToolNames = effectiveToolNames.filter((toolName) => {
12421
+ const normalized = normalizeLocalToolName(toolName);
12422
+ if (WORKSPACE_TOOL_NAMES.includes(normalized)) {
12423
+ return backendExecutionToolNames.includes(normalized);
12424
+ }
12425
+ return true;
12426
+ });
12427
+ }
12380
12428
  activeAgentToolNames = buildLocalPolicyToolNames({
12381
12429
  agentKey: agentConfig?.key,
12382
12430
  toolNames: effectiveToolNames,
@@ -12392,10 +12440,15 @@ function createCliLocalRuntimeAdapter(deps) {
12392
12440
  localToolExecutors = buildCurrentToolExecutors(agentConfig?.key);
12393
12441
  const exposedAgentConfig = agentConfig ? {
12394
12442
  ...agentConfig,
12443
+ toolNames: activeAgentToolNames,
12395
12444
  exposedToolNames: activeAgentToolNames,
12396
12445
  toolSurface: {
12397
12446
  ...agentConfig.toolSurface ?? {},
12398
12447
  finalToolNames: activeAgentToolNames
12448
+ },
12449
+ runScopedToolSurface: {
12450
+ ...agentConfig.runScopedToolSurface ?? {},
12451
+ finalToolNames: activeAgentToolNames
12399
12452
  }
12400
12453
  } : agentConfig;
12401
12454
  if (exposedAgentConfig && !deps.pastedTextStore) {
@@ -2,7 +2,7 @@ import {
2
2
  deleteDialog,
3
3
  runtime_default,
4
4
  toast
5
- } from "./chunk-CMRP4XHV.js";
5
+ } from "./chunk-MIME4XKU.js";
6
6
  import {
7
7
  getCurrentSpaceId,
8
8
  getCurrentSpaceIdRaw,
@@ -1,16 +1,16 @@
1
1
  import {
2
2
  createCliLocalRuntimeAdapter,
3
3
  summarizeEndpoint
4
- } from "./chunk-WC7UXON2.js";
4
+ } from "./chunk-BJWOOJX5.js";
5
5
  import {
6
6
  t
7
7
  } from "./chunk-TDX2L4W2.js";
8
8
  import {
9
9
  clipMultilineText
10
- } from "./chunk-WLPUUBFR.js";
10
+ } from "./chunk-P4V35AFD.js";
11
11
  import {
12
12
  runLocalAgentTurn
13
- } from "./chunk-2DXGW4UO.js";
13
+ } from "./chunk-6OYC7NDH.js";
14
14
  import {
15
15
  applyToolSurfaceConstraints
16
16
  } from "./chunk-6J227QXV.js";
@@ -7,7 +7,7 @@ import {
7
7
  listUserRecordsFromServers,
8
8
  readDbRecordFromServers,
9
9
  readLiveDbRecordAfterTombstoneMerge
10
- } from "./chunk-LEZLJTQ4.js";
10
+ } from "./chunk-SUBKVXFM.js";
11
11
  import {
12
12
  parsePositiveFiniteNumberOrFallback
13
13
  } from "./chunk-Y5GCAMGP.js";
@@ -42,7 +42,7 @@ import {
42
42
  } from "./chunk-I42VC5KR.js";
43
43
  import {
44
44
  resolveRunsDir
45
- } from "./chunk-URW5UM6Y.js";
45
+ } from "./chunk-CI5DVWU7.js";
46
46
  import {
47
47
  getDefaultCliLocalRuntimeDb
48
48
  } from "./chunk-GAGGEA7D.js";
@@ -9,7 +9,7 @@ import {
9
9
  resolveRawAgentInput,
10
10
  resolveServerUrl,
11
11
  writeUsage
12
- } from "./chunk-DHNQA4VI.js";
12
+ } from "./chunk-Q7UPF643.js";
13
13
  import {
14
14
  getReadableCliDb
15
15
  } from "./chunk-62TBKWTV.js";
@@ -31,7 +31,7 @@ import {
31
31
  resolveFileWriteGateEnabled,
32
32
  resolveLocalUserId,
33
33
  validateInstaboxWorkspaceSelection
34
- } from "./chunk-WC7UXON2.js";
34
+ } from "./chunk-BJWOOJX5.js";
35
35
  import {
36
36
  clearCredentialAvailability,
37
37
  readEffectiveCredentialEntry,
@@ -64,7 +64,7 @@ import {
64
64
  import {
65
65
  readDbRecord,
66
66
  resolveAgentRecordFromHybridStore
67
- } from "./chunk-KJETBEEN.js";
67
+ } from "./chunk-OPNHKULV.js";
68
68
  import {
69
69
  isLocalCliAgentKey
70
70
  } from "./chunk-NBTY7YJF.js";
@@ -79,14 +79,14 @@ import {
79
79
  } from "./chunk-BMQ2MJUK.js";
80
80
  import {
81
81
  resolveCliLocalRuntimeKeyCapability
82
- } from "./chunk-QW6SSF7V.js";
82
+ } from "./chunk-ZJ66I757.js";
83
83
  import {
84
84
  isTransientFetchError
85
85
  } from "./chunk-KFHREHUQ.js";
86
86
  import {
87
87
  parseUiCard,
88
88
  uiCardFallback
89
- } from "./chunk-WLPUUBFR.js";
89
+ } from "./chunk-P4V35AFD.js";
90
90
  import {
91
91
  isGatewayHttpStatus
92
92
  } from "./chunk-NF64D32W.js";
@@ -95,7 +95,7 @@ import {
95
95
  chooseMemoryOwners,
96
96
  loadMemoryCandidatesFromDb,
97
97
  resolveAgentMemoryPolicy
98
- } from "./chunk-46OQD3AP.js";
98
+ } from "./chunk-UIVOLTFM.js";
99
99
  import {
100
100
  API_REPORTED_COST_MULTIPLIER,
101
101
  estimateMessagesTokens,
@@ -103,7 +103,7 @@ import {
103
103
  resolveAgentContextWindow,
104
104
  resolveOccupancy,
105
105
  resolveOccupancyWindow
106
- } from "./chunk-CMRP4XHV.js";
106
+ } from "./chunk-MIME4XKU.js";
107
107
  import {
108
108
  buildSkillDiscoveryContextLayer
109
109
  } from "./chunk-AU7AXHUL.js";
@@ -115,10 +115,10 @@ import {
115
115
  LOCAL_AGENT_CONFIG_MISSING_CODE,
116
116
  LOCAL_TURN_ABORTED_CODE,
117
117
  readActionGate
118
- } from "./chunk-2DXGW4UO.js";
118
+ } from "./chunk-6OYC7NDH.js";
119
119
  import {
120
120
  resolveAgentRuntimeConfigFromRecord
121
- } from "./chunk-CEXJ6Y3C.js";
121
+ } from "./chunk-AUGBRK3P.js";
122
122
  import {
123
123
  createThinkParserState,
124
124
  flushThinkParser,
@@ -144,7 +144,7 @@ import {
144
144
  import {
145
145
  isOAuthApiKeyRef,
146
146
  normalizeUsage
147
- } from "./chunk-HEC32F3G.js";
147
+ } from "./chunk-O3FUFEUI.js";
148
148
  import {
149
149
  clipCompactText
150
150
  } from "./chunk-5MMAK75Q.js";
@@ -189,7 +189,7 @@ import {
189
189
  serverOriginForDialog,
190
190
  settleRunTerminalAuthoritatively,
191
191
  spawnLocalBackgroundRun
192
- } from "./chunk-URW5UM6Y.js";
192
+ } from "./chunk-CI5DVWU7.js";
193
193
  import {
194
194
  formatAgentListCard,
195
195
  formatFinishedRunCard,
@@ -221,13 +221,13 @@ import {
221
221
  } from "./chunk-Y6ROFCZO.js";
222
222
  import {
223
223
  isAntigravityOAuthAgent
224
- } from "./chunk-SQX235S2.js";
224
+ } from "./chunk-TSCI6X6C.js";
225
225
  import {
226
226
  resolveClientVersion
227
- } from "./chunk-PIG2IUVZ.js";
227
+ } from "./chunk-I2QHI2XM.js";
228
228
  import {
229
229
  findModelConfig
230
- } from "./chunk-6EQD4AQL.js";
230
+ } from "./chunk-GC64WGMD.js";
231
231
  import {
232
232
  asTrimmedString
233
233
  } from "./chunk-3EUW3WEO.js";
@@ -241,7 +241,7 @@ import {
241
241
  CLIENT_VERSION_TOO_OLD_CODE,
242
242
  NOLO_CLIENT_VERSION_HEADER,
243
243
  buildClientVersionUpgradeMessage
244
- } from "./chunk-CGFNDIKK.js";
244
+ } from "./chunk-5KTQVMCX.js";
245
245
  import {
246
246
  asTrimmedLowercaseString
247
247
  } from "./chunk-QSJ3HFEF.js";
@@ -11374,7 +11374,7 @@ function isBalanceExhaustedError(error) {
11374
11374
 
11375
11375
  // packages/cli/client/agentRun.ts
11376
11376
  async function loadRunLocalAgentTurn() {
11377
- const { runLocalAgentTurn } = await import("./agentRuntimeLocal-7EZYBR6X.js");
11377
+ const { runLocalAgentTurn } = await import("./agentRuntimeLocal-7ZE2ZQAL.js");
11378
11378
  return runLocalAgentTurn;
11379
11379
  }
11380
11380
  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();
@@ -8,7 +8,7 @@ import {
8
8
  } from "./chunk-WACI5I6V.js";
9
9
  import {
10
10
  resolvePlatformAuthToken
11
- } from "./chunk-PIG2IUVZ.js";
11
+ } from "./chunk-I2QHI2XM.js";
12
12
 
13
13
  // packages/cli/client/originShellApprovalTransport.ts
14
14
  import { realpathSync } from "node:fs";
@@ -6,7 +6,7 @@ import {
6
6
  } from "./chunk-62TBKWTV.js";
7
7
  import {
8
8
  clearCliLocalRuntimePreparedAgentCache
9
- } from "./chunk-WC7UXON2.js";
9
+ } from "./chunk-BJWOOJX5.js";
10
10
  import {
11
11
  readCredentialAvailability
12
12
  } from "./chunk-R4BMKAR5.js";
@@ -19,7 +19,7 @@ import {
19
19
  resolveAgentRecordFromHybridStore,
20
20
  sanitizeAgentRecordForCliOutput,
21
21
  writeAgentRecord
22
- } from "./chunk-KJETBEEN.js";
22
+ } from "./chunk-OPNHKULV.js";
23
23
  import {
24
24
  resolveCliAgentKeyInput
25
25
  } from "./chunk-NBTY7YJF.js";
@@ -244,7 +244,7 @@ async function runAgentCreateCommand(args, deps = {}) {
244
244
  let verifyResult;
245
245
  if (parsed.verify) {
246
246
  try {
247
- const { verifyCustomProvider } = await import("./agentProviderCommands-4USYTCL3.js");
247
+ const { verifyCustomProvider } = await import("./agentProviderCommands-TWVILNAN.js");
248
248
  const rec = built.nextRecord;
249
249
  verifyResult = await verifyCustomProvider({
250
250
  providerUrl: rec.customProviderUrl,
@@ -7,7 +7,7 @@ import {
7
7
  mergeReferences,
8
8
  resolveReferenceAssets,
9
9
  resolveToolsFromKeys
10
- } from "./chunk-CEQFVBI2.js";
10
+ } from "./chunk-X2Q5GT5J.js";
11
11
  import {
12
12
  UI_CARD_ENVELOPE_MAX_BYTES,
13
13
  getAllToolRuns,
@@ -20,7 +20,7 @@ import {
20
20
  selectSpaceContextLevel,
21
21
  selectUserTonePreset,
22
22
  uiCardFallback
23
- } from "./chunk-WLPUUBFR.js";
23
+ } from "./chunk-P4V35AFD.js";
24
24
  import {
25
25
  resolveToolBaseUrl
26
26
  } from "./chunk-MYOH447Z.js";
@@ -29,18 +29,18 @@ import {
29
29
  getModelPricing,
30
30
  getPrices,
31
31
  hasExplicitAgentPricing
32
- } from "./chunk-ZPKUJROL.js";
32
+ } from "./chunk-TDNAAXUQ.js";
33
33
  import {
34
34
  getDocState
35
- } from "./chunk-HZMWJUSD.js";
35
+ } from "./chunk-WPOSH6PA.js";
36
36
  import {
37
37
  getTableState
38
- } from "./chunk-URO44BCD.js";
38
+ } from "./chunk-BQSW7453.js";
39
39
  import {
40
40
  PERSONALIZATION_DIALOG_CATEGORY,
41
41
  buildPersonalizationDialogPolicyContext,
42
42
  selectAllMsgs
43
- } from "./chunk-CMRP4XHV.js";
43
+ } from "./chunk-MIME4XKU.js";
44
44
  import {
45
45
  getCurrentSpaceIdRaw,
46
46
  getViewMode
@@ -66,21 +66,21 @@ import {
66
66
  expandEnabledPackPromptPatches,
67
67
  expandEnabledPacks,
68
68
  resolveEffectiveEnabledPacks
69
- } from "./chunk-YCRROBDY.js";
69
+ } from "./chunk-WXOKJP3W.js";
70
70
  import {
71
71
  projectToolMessageContent
72
- } from "./chunk-BSKTDOGA.js";
72
+ } from "./chunk-JHXY4H3P.js";
73
73
  import {
74
74
  attachmentKind,
75
75
  normalizeAttachmentPart
76
76
  } from "./chunk-WJZOQR2J.js";
77
77
  import {
78
78
  extractReferenceKeysFromMessage
79
- } from "./chunk-HEC32F3G.js";
79
+ } from "./chunk-O3FUFEUI.js";
80
80
  import {
81
81
  getModelContextWindow,
82
82
  planContextUsage
83
- } from "./chunk-ASSNAASW.js";
83
+ } from "./chunk-XHR22EKE.js";
84
84
  import {
85
85
  asRecordOrEmpty
86
86
  } from "./chunk-KX6YBIHG.js";
@@ -113,7 +113,7 @@ import {
113
113
  import {
114
114
  getModelConfig,
115
115
  getProviderByModelName
116
- } from "./chunk-6EQD4AQL.js";
116
+ } from "./chunk-GC64WGMD.js";
117
117
  import {
118
118
  isRecord
119
119
  } from "./chunk-KUG52IAP.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  readDbRecord,
3
3
  writeAgentRecord
4
- } from "./chunk-KJETBEEN.js";
4
+ } from "./chunk-OPNHKULV.js";
5
5
  import {
6
6
  buildSkillSummaryMarker
7
7
  } from "./chunk-VF4K2QE6.js";