nolo-cli 0.170.1 → 0.172.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 (101) hide show
  1. package/{_executeModel-7J6IIHWQ.js → _executeModel-PVY4AXG4.js} +29 -29
  2. package/{agentDeleteCommand-F66NIWCF.js → agentDeleteCommand-QYNICESQ.js} +38 -37
  3. package/{agentEmailCommands-M4SHODDA.js → agentEmailCommands-QEJHRESH.js} +42 -41
  4. package/{agentListCommands-4BBFWXHX.js → agentListCommands-MGMBNFAS.js} +24 -23
  5. package/{agentMachineCommands-R55P5SZY.js → agentMachineCommands-SKOAHGVC.js} +22 -21
  6. package/{agentProviderCommands-4USYTCL3.js → agentProviderCommands-TWVILNAN.js} +2 -2
  7. package/{agentRecordCommands-PDWACZFR.js → agentRecordCommands-2NVWBDQN.js} +38 -37
  8. package/{agentRunCommand-U2F74LTS.js → agentRunCommand-2LHV37FZ.js} +39 -38
  9. package/{agentRunControl-EI3BGJFM.js → agentRunControl-SBHIICUQ.js} +5 -5
  10. package/{agentRuntimeLocal-7EZYBR6X.js → agentRuntimeLocal-K3777H5R.js} +20 -19
  11. package/{agentSlice-UN7ZHCAM.js → agentSlice-QMOFHPJR.js} +3 -3
  12. package/{appDeleteCommands-WS3UFMCB.js → appDeleteCommands-3HZNWZ2V.js} +23 -22
  13. package/{appDeployCommands-W5B7I73P.js → appDeployCommands-Q5BIBQE2.js} +23 -22
  14. package/{appDeployStatusCommands-UEHNV2GU.js → appDeployStatusCommands-ZZFFVM3W.js} +23 -22
  15. package/{appGetCommands-XJOBVREN.js → appGetCommands-7AAOXZQK.js} +23 -22
  16. package/{appListCommands-BISQV6BQ.js → appListCommands-H76IX2X5.js} +23 -22
  17. package/{authCommand-H35CPF25.js → authCommand-BSOLJFPV.js} +12 -12
  18. package/{builtinSkillRegistry-LJV7FHNI.js → builtinSkillRegistry-V76JTNCJ.js} +2 -2
  19. package/{chunk-DHNQA4VI.js → chunk-2FAQDT6E.js} +1 -1
  20. package/chunk-2WZXXAQD.js +57 -0
  21. package/{chunk-SH3XD4E2.js → chunk-3LNVSFTH.js} +2 -1
  22. package/{chunk-WC7UXON2.js → chunk-3XUE7WJA.js} +95 -38
  23. package/{chunk-XLBQQ5SB.js → chunk-54YLFF7P.js} +4 -4
  24. package/{chunk-O2AY3CVI.js → chunk-7OQ7IDU3.js} +19 -17
  25. package/{chunk-HEC32F3G.js → chunk-7TBARDLF.js} +1 -46
  26. package/{chunk-G3VYRPTV.js → chunk-AJ52EA72.js} +4 -4
  27. package/{chunk-JPPQ3GUO.js → chunk-APB44JID.js} +3 -3
  28. package/{chunk-XITIONPS.js → chunk-BE42X662.js} +4 -4
  29. package/{chunk-ASSNAASW.js → chunk-BKCR2JHG.js} +48 -3
  30. package/{chunk-IMMA7QFE.js → chunk-CAAH5LNN.js} +2 -2
  31. package/{chunk-45IOFLGH.js → chunk-CFLYUFMA.js} +11 -11
  32. package/{chunk-URW5UM6Y.js → chunk-CI5DVWU7.js} +1 -1
  33. package/{chunk-CMRP4XHV.js → chunk-DNQ55DHN.js} +13 -13
  34. package/{chunk-CEQFVBI2.js → chunk-EK3LIELB.js} +3 -3
  35. package/{chunk-IOFLVIKF.js → chunk-EWLPIR2S.js} +1 -1
  36. package/{chunk-6EQD4AQL.js → chunk-GC64WGMD.js} +1 -1
  37. package/{chunk-CEXJ6Y3C.js → chunk-HBUKJB3W.js} +9 -1
  38. package/{chunk-FYYSDHVQ.js → chunk-HLAL63BZ.js} +1 -1
  39. package/{chunk-PIG2IUVZ.js → chunk-I2QHI2XM.js} +2 -2
  40. package/{chunk-BSKTDOGA.js → chunk-I33CJERI.js} +3 -58
  41. package/{chunk-7VWWGKEQ.js → chunk-ISMHFI2Y.js} +3 -3
  42. package/{chunk-3ELX6JK5.js → chunk-JCILHZJZ.js} +10 -10
  43. package/{chunk-FQU23S3P.js → chunk-JIGBVOHH.js} +11 -11
  44. package/{chunk-I7S63QUU.js → chunk-KNDA4K34.js} +1 -1
  45. package/{chunk-Z6HR75HX.js → chunk-KUA3PPFK.js} +3 -3
  46. package/{chunk-2DXGW4UO.js → chunk-ME7N4YHG.js} +142 -30
  47. package/{chunk-WLPUUBFR.js → chunk-MOOQN57G.js} +3 -3
  48. package/{chunk-URO44BCD.js → chunk-MTAWQNSU.js} +1 -1
  49. package/{chunk-KJETBEEN.js → chunk-OPNHKULV.js} +1 -1
  50. package/{chunk-EWO77ZGF.js → chunk-OQ3DOBYB.js} +3 -3
  51. package/{chunk-2AZSL4GL.js → chunk-PPR6G2U2.js} +3 -3
  52. package/{chunk-TOUKACDK.js → chunk-RATR6VCP.js} +1 -1
  53. package/{chunk-DI7ZFGDQ.js → chunk-SHPY7A3P.js} +102 -3
  54. package/{chunk-LEZLJTQ4.js → chunk-SUBKVXFM.js} +1 -1
  55. package/{chunk-ZPKUJROL.js → chunk-TDNAAXUQ.js} +2 -2
  56. package/{chunk-3USFOET4.js → chunk-TI7ZIWYR.js} +3 -3
  57. package/{chunk-SQX235S2.js → chunk-TSCI6X6C.js} +1 -1
  58. package/{chunk-V7PCFWX3.js → chunk-TVGX5QIN.js} +2 -2
  59. package/{chunk-XLQFVHNX.js → chunk-TYQZRSL6.js} +1 -1
  60. package/{chunk-QW6SSF7V.js → chunk-UMVEB5QT.js} +15 -15
  61. package/{chunk-WVREKHHJ.js → chunk-UU4TLYRZ.js} +3 -3
  62. package/{chunk-HZMWJUSD.js → chunk-VAQ3EGPC.js} +2 -2
  63. package/{chunk-MFVOJ6KF.js → chunk-W6E5IXIP.js} +3 -3
  64. package/{chunk-YCRROBDY.js → chunk-WXOKJP3W.js} +2 -1
  65. package/{chunk-SAZSXMTR.js → chunk-XBJIESNS.js} +4 -4
  66. package/{chunk-46OQD3AP.js → chunk-XUZQCRSA.js} +4 -4
  67. package/{chunk-KMDDG73K.js → chunk-XWX5ZGWR.js} +1 -1
  68. package/{chunk-7NKZA46B.js → chunk-YEOFTC2H.js} +10 -4
  69. package/{commandRegistry-3XBG7JHS.js → commandRegistry-D3V6AB3G.js} +56 -56
  70. package/{contentThunks-OO3MJAED.js → contentThunks-P2GNXUKN.js} +11 -11
  71. package/{createAgentAutomationAction-F3O6FJ5W.js → createAgentAutomationAction-PQA43W2W.js} +11 -11
  72. package/{createDialogAction-UBQKDUK5.js → createDialogAction-ITOZ5TAM.js} +13 -13
  73. package/{createPageAction-RDEDO4GF.js → createPageAction-IKB3LOMU.js} +11 -11
  74. package/{dialogCommands-P5HSDZ7T.js → dialogCommands-IZAQB6GY.js} +24 -23
  75. package/{dialogSlice-WZCWWYR3.js → dialogSlice-Y6WIZWTC.js} +10 -10
  76. package/{docCreateCommands-B2M3MGX7.js → docCreateCommands-U25MRSOL.js} +22 -21
  77. package/{docDeleteCommands-NHCUX4XL.js → docDeleteCommands-F46A6FJZ.js} +23 -22
  78. package/{docReadCommands-FOLST4JD.js → docReadCommands-DITPVWA3.js} +22 -21
  79. package/{docStore-PTSCGC6T.js → docStore-HRNZKKVS.js} +1 -1
  80. package/{docUpdateCommands-YZT2PQP2.js → docUpdateCommands-O447KO7Z.js} +22 -21
  81. package/{getPricing-XQ3N3RBP.js → getPricing-2UPNNW3Y.js} +3 -3
  82. package/{handleSendMessageAction-3YMQS6XO.js → handleSendMessageAction-4OVVUVJ4.js} +24 -23
  83. package/index.js +4 -4
  84. package/{localRuntimeAdapter-ZIAOTUBE.js → localRuntimeAdapter-CL3QW3OJ.js} +36 -35
  85. package/{machineCommands-3LSEP24P.js → machineCommands-T3VQCFHT.js} +37 -36
  86. package/{machineWsRunDispatch-7A3TSH4Q.js → machineWsRunDispatch-IGX4UK4C.js} +37 -36
  87. package/{models-PZQC7VV4.js → models-UUNO6DOL.js} +2 -2
  88. package/package.json +1 -1
  89. package/{providerPresetApply-PKUOHQJT.js → providerPresetApply-5K4PBX4J.js} +6 -6
  90. package/{providerRegistry-HNQLIFN2.js → providerRegistry-K5MSZ3Y5.js} +6 -6
  91. package/{readlineWorkspace-OFBP6OA7.js → readlineWorkspace-3IZBF57U.js} +45 -44
  92. package/{runAgentClientLoop-F6EQK26A.js → runAgentClientLoop-RUBF4JIP.js} +27 -27
  93. package/{runtimeDoctorCommands-LYMJEM4F.js → runtimeDoctorCommands-DXJH5HIB.js} +6 -6
  94. package/{secretCommands-DNY56NSU.js → secretCommands-7S6REMJV.js} +2 -2
  95. package/{spaceCommands-XESXH5CW.js → spaceCommands-FSATGIKW.js} +22 -21
  96. package/{streamAgentChatTurn-KXELVHFR.js → streamAgentChatTurn-N7UJ6FFK.js} +36 -35
  97. package/{tools-FMNDEVTZ.js → tools-Z7EJ6KIM.js} +21 -21
  98. package/{tuiSummaryLlmCaller-FQOEF4IE.js → tuiSummaryLlmCaller-ZETARZOH.js} +14 -8
  99. package/{updateDialogTitleAction-65R3Y22L.js → updateDialogTitleAction-CEFNJE4T.js} +11 -11
  100. package/{chunk-CGFNDIKK.js → chunk-5KTQVMCX.js} +0 -0
  101. package/{chunk-UHTDNB5Y.js → chunk-76YUTLOT.js} +3 -3
@@ -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-PPR6G2U2.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-UMVEB5QT.js";
90
90
  import {
91
91
  deriveCredentialGroup,
92
92
  deriveCustomProviderCredentialGroup
93
- } from "./chunk-XITIONPS.js";
93
+ } from "./chunk-BE42X662.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-MOOQN57G.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-DNQ55DHN.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-54YLFF7P.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,
@@ -170,7 +170,7 @@ import {
170
170
  runExecShellGates,
171
171
  validateConfiguredRootExecutionLease,
172
172
  verifyOwnerRouteAck
173
- } from "./chunk-2DXGW4UO.js";
173
+ } from "./chunk-ME7N4YHG.js";
174
174
  import {
175
175
  accumulateGeminiChunks,
176
176
  buildGeminiGenerateContentRequest,
@@ -182,7 +182,7 @@ import {
182
182
  resolveAntigravityFinishReason,
183
183
  resolveGeminiModelQuirks,
184
184
  shouldUseGeminiNativeToolRoute
185
- } from "./chunk-KMDDG73K.js";
185
+ } from "./chunk-XWX5ZGWR.js";
186
186
  import {
187
187
  PlatformStreamInterruptedError,
188
188
  buildPlatformChatCompletionRequest,
@@ -193,24 +193,30 @@ import {
193
193
  readPlatformChatSseCompletion,
194
194
  resolvePlatformChatProviderConfig,
195
195
  shouldUsePlatformChatProvider
196
- } from "./chunk-7NKZA46B.js";
196
+ } from "./chunk-YEOFTC2H.js";
197
197
  import {
198
198
  readSseDataValues,
199
199
  readSseFrames
200
200
  } from "./chunk-HNUWUO75.js";
201
201
  import {
202
202
  resolveAgentRuntimeConfigFromRecord
203
- } from "./chunk-CEXJ6Y3C.js";
203
+ } from "./chunk-HBUKJB3W.js";
204
204
  import {
205
205
  resolveHistoricalToolContentCap
206
- } from "./chunk-BSKTDOGA.js";
206
+ } from "./chunk-2WZXXAQD.js";
207
207
  import {
208
+ resolveAgentImageInputSupport
209
+ } from "./chunk-I33CJERI.js";
210
+ import {
211
+ EMPTY_TOOL_RESULT_TEXT,
208
212
  collectStablePromptPrefix,
209
213
  convertMessagesToResponsesInput,
210
214
  findAgentStatePairingIssues,
215
+ hadToolImages,
211
216
  stablePromptCacheKey,
212
- toResponsesTools
213
- } from "./chunk-DI7ZFGDQ.js";
217
+ toResponsesTools,
218
+ toolImages
219
+ } from "./chunk-SHPY7A3P.js";
214
220
  import {
215
221
  buildNoloWorkspaceOpenAiTools,
216
222
  filterClientNoloWorkspaceToolNames,
@@ -229,19 +235,19 @@ import {
229
235
  normalizeDialogTitle
230
236
  } from "./chunk-2MBTWINN.js";
231
237
  import {
232
- isOAuthApiKeyRef,
233
238
  normalizeUsage
234
- } from "./chunk-HEC32F3G.js";
239
+ } from "./chunk-7TBARDLF.js";
235
240
  import {
236
241
  isDevinOAuthAgent
237
242
  } from "./chunk-5ZUL4CUO.js";
238
243
  import {
239
244
  createProviderCallTimingTracker,
240
245
  finalizeProviderCallTiming,
246
+ isOAuthApiKeyRef,
241
247
  observeMeaningfulProviderResponse,
242
248
  observeMeaningfulProviderResponseAt,
243
249
  withProviderCallTimingFields
244
- } from "./chunk-ASSNAASW.js";
250
+ } from "./chunk-BKCR2JHG.js";
245
251
  import {
246
252
  clipCompactText
247
253
  } from "./chunk-5MMAK75Q.js";
@@ -255,13 +261,19 @@ import {
255
261
  } from "./chunk-LIQJTQRN.js";
256
262
  import {
257
263
  createFileCredentialBroker
258
- } from "./chunk-UHTDNB5Y.js";
264
+ } from "./chunk-76YUTLOT.js";
259
265
  import {
260
266
  asRecordOrEmpty
261
267
  } from "./chunk-KX6YBIHG.js";
262
268
  import {
263
269
  isAbortError
264
270
  } from "./chunk-7DPNBQSV.js";
271
+ import {
272
+ createOAuthTokenStore,
273
+ isTokenExpired,
274
+ readOAuthCredential,
275
+ resolveFreshAccessToken
276
+ } from "./chunk-ZWQUWF6W.js";
265
277
  import {
266
278
  canonicalizeToolNames
267
279
  } from "./chunk-5EBLANFT.js";
@@ -303,7 +315,7 @@ import {
303
315
  terminateRunProcess,
304
316
  transitionRunToTerminal,
305
317
  withQueueLock
306
- } from "./chunk-URW5UM6Y.js";
318
+ } from "./chunk-CI5DVWU7.js";
307
319
  import {
308
320
  TASK_PREVIEW_MAX,
309
321
  formatListRunsCard,
@@ -340,16 +352,16 @@ import {
340
352
  } from "./chunk-LCBAMY2M.js";
341
353
  import {
342
354
  isAntigravityOAuthAgent
343
- } from "./chunk-SQX235S2.js";
355
+ } from "./chunk-TSCI6X6C.js";
344
356
  import {
345
357
  buildProviderSessionHeaders,
346
358
  resolvePlatformAuthToken
347
- } from "./chunk-PIG2IUVZ.js";
359
+ } from "./chunk-I2QHI2XM.js";
348
360
  import {
349
361
  anthropicOAuthModelMaxOutputTokens,
350
362
  findModelConfig,
351
363
  isAdaptiveThinkingModelId
352
- } from "./chunk-6EQD4AQL.js";
364
+ } from "./chunk-GC64WGMD.js";
353
365
  import {
354
366
  CLI_PROVIDER_VALUES,
355
367
  isCliProvider
@@ -375,12 +387,6 @@ import {
375
387
  import {
376
388
  asTrimmedLowercaseString
377
389
  } from "./chunk-QSJ3HFEF.js";
378
- import {
379
- createOAuthTokenStore,
380
- isTokenExpired,
381
- readOAuthCredential,
382
- resolveFreshAccessToken
383
- } from "./chunk-ZWQUWF6W.js";
384
390
 
385
391
  // packages/agent-runtime/anthropicMessagesProvider.ts
386
392
  import { randomUUID } from "node:crypto";
@@ -742,6 +748,22 @@ function foldIntoTrailingToolResult(blocks, extra) {
742
748
  last.content = [...existing, ...extra];
743
749
  return true;
744
750
  }
751
+ function assertNonEmptyToolResults(messages) {
752
+ const placeholder = EMPTY_TOOL_RESULT_TEXT;
753
+ for (const message of messages) {
754
+ if (!Array.isArray(message.content)) continue;
755
+ for (const block of message.content) {
756
+ if (!block || block.type !== "tool_result") continue;
757
+ if (typeof block.content === "string") {
758
+ if (block.content.trim() === "") block.content = placeholder;
759
+ } else if (Array.isArray(block.content)) {
760
+ if (block.content.length === 0) block.content = placeholder;
761
+ } else if (block.content === void 0 || block.content === null) {
762
+ block.content = placeholder;
763
+ }
764
+ }
765
+ }
766
+ }
745
767
  function hasClaudeCodeIdentity(system) {
746
768
  return system.some((block) => {
747
769
  if (!block || typeof block !== "object") return false;
@@ -787,7 +809,24 @@ function buildAnthropicMessagesBody(args) {
787
809
  pushMessage(messages, "user", [{
788
810
  type: "tool_result",
789
811
  tool_use_id: toolUseId,
790
- content: typeof message.content === "string" ? message.content : JSON.stringify(message.content ?? "")
812
+ content: (() => {
813
+ const text = typeof message.content === "string" ? message.content : JSON.stringify(message.content ?? "");
814
+ const images = toolImages(message);
815
+ if (!hadToolImages(message)) return text;
816
+ const effective = text.trim() ? text : EMPTY_TOOL_RESULT_TEXT;
817
+ if (!images.length) return [{ type: "text", text: effective }];
818
+ if (!resolveAgentImageInputSupport(args.agentConfig)) {
819
+ return [{ type: "text", text: effective }];
820
+ }
821
+ return [
822
+ { type: "text", text: effective },
823
+ ...images.map((image) => ({ type: "image", source: {
824
+ type: "base64",
825
+ media_type: image.mimeType,
826
+ data: image.dataBase64
827
+ } }))
828
+ ];
829
+ })()
791
830
  }]);
792
831
  }
793
832
  continue;
@@ -817,6 +856,7 @@ function buildAnthropicMessagesBody(args) {
817
856
  }
818
857
  pushMessage(messages, role, blocks);
819
858
  }
859
+ assertNonEmptyToolResults(messages);
820
860
  if (!hasClaudeCodeIdentity(system)) {
821
861
  system.unshift({ type: "text", text: CLAUDE_CODE_SYSTEM_INSTRUCTION });
822
862
  }
@@ -1028,7 +1068,8 @@ function buildPreparedAgentCacheKey(args) {
1028
1068
  const systemBuiltinSkillsKey = args.systemBuiltinSkills ? JSON.stringify(
1029
1069
  Object.keys(args.systemBuiltinSkills).sort().map((key) => [key, args.systemBuiltinSkills?.[key]])
1030
1070
  ) : "default";
1031
- return `${args.userId}\0${args.agentRef}\0${args.cwd}\0${systemBuiltinSkillsKey}`;
1071
+ const wakeKey = args.wake !== void 0 ? args.wake ? "wake:1" : "wake:0" : "";
1072
+ return `${args.userId}\0${args.agentRef}\0${args.cwd}\0${systemBuiltinSkillsKey}${wakeKey ? `\0${wakeKey}` : ""}`;
1032
1073
  }
1033
1074
  function clearCliLocalRuntimePreparedAgentCache() {
1034
1075
  preparedAgentRuntimeCache.clear();
@@ -12169,7 +12210,7 @@ function createCliLocalRuntimeAdapter(deps) {
12169
12210
  const recordRunExecutionIsolation = async () => {
12170
12211
  try {
12171
12212
  const { writeFileSync: writeFileSync4, mkdirSync: mkdirSync4 } = await import("node:fs");
12172
- const { resolveRunsDir: resolveRunsDir2 } = await import("./agentRunControl-EI3BGJFM.js");
12213
+ const { resolveRunsDir: resolveRunsDir2 } = await import("./agentRunControl-SBHIICUQ.js");
12173
12214
  const fact = resolveLocalRunExecutionIsolationFact({
12174
12215
  // F1:显式点名宿主执行的 run 在审计里必须与 docker 沙盒区分开
12175
12216
  // (reason: host-explicit-writes vs docker-workload)。
@@ -12201,7 +12242,7 @@ function createCliLocalRuntimeAdapter(deps) {
12201
12242
  dockerWorkloadReleased = true;
12202
12243
  dockerWorkloadLoad = null;
12203
12244
  if (loaded) {
12204
- const { resolveRunsDir: resolveRunsDir2 } = await import("./agentRunControl-EI3BGJFM.js");
12245
+ const { resolveRunsDir: resolveRunsDir2 } = await import("./agentRunControl-SBHIICUQ.js");
12205
12246
  const exportRunDiff = deps.exportDockerRunDiffArtifact ?? exportDockerRunDiffArtifact;
12206
12247
  const warn = (message) => process.stderr.write(`[nolo] ${message}
12207
12248
  `);
@@ -12347,12 +12388,13 @@ function createCliLocalRuntimeAdapter(deps) {
12347
12388
  } catch {
12348
12389
  }
12349
12390
  }
12350
- const cacheKey = buildPreparedAgentCacheKey({
12391
+ const cacheKey = `${buildPreparedAgentCacheKey({
12351
12392
  userId,
12352
12393
  agentRef,
12353
12394
  cwd: normalizeRuntimeCacheCwd(workspaceRoot),
12354
- systemBuiltinSkills
12355
- });
12395
+ systemBuiltinSkills,
12396
+ wake: hasRunWakeChannel(deps.env)
12397
+ })}:${dockerRuntimeEnabled ? "docker" : instaboxRuntimeEnabled ? "instabox" : "host"}`;
12356
12398
  const cached = deps.pastedTextStore ? void 0 : preparedAgentRuntimeCache.get(cacheKey);
12357
12399
  if (cached) {
12358
12400
  activeAgentToolNames = cached.activeAgentToolNames;
@@ -12376,7 +12418,17 @@ function createCliLocalRuntimeAdapter(deps) {
12376
12418
  deps.env,
12377
12419
  systemBuiltinSkills
12378
12420
  ) : [];
12379
- const effectiveToolNames = [...requestedToolNames, ...additionalToolNames];
12421
+ let effectiveToolNames = [...requestedToolNames, ...additionalToolNames];
12422
+ const backendExecutionToolNames = dockerRuntimeEnabled ? dockerExecutionToolNames : instaboxRuntimeEnabled ? LOCAL_INSTABOX_TOOL_NAMES : null;
12423
+ if (backendExecutionToolNames) {
12424
+ effectiveToolNames = effectiveToolNames.filter((toolName) => {
12425
+ const normalized = normalizeLocalToolName(toolName);
12426
+ if (WORKSPACE_TOOL_NAMES.includes(normalized)) {
12427
+ return backendExecutionToolNames.includes(normalized);
12428
+ }
12429
+ return true;
12430
+ });
12431
+ }
12380
12432
  activeAgentToolNames = buildLocalPolicyToolNames({
12381
12433
  agentKey: agentConfig?.key,
12382
12434
  toolNames: effectiveToolNames,
@@ -12392,10 +12444,15 @@ function createCliLocalRuntimeAdapter(deps) {
12392
12444
  localToolExecutors = buildCurrentToolExecutors(agentConfig?.key);
12393
12445
  const exposedAgentConfig = agentConfig ? {
12394
12446
  ...agentConfig,
12447
+ toolNames: activeAgentToolNames,
12395
12448
  exposedToolNames: activeAgentToolNames,
12396
12449
  toolSurface: {
12397
12450
  ...agentConfig.toolSurface ?? {},
12398
12451
  finalToolNames: activeAgentToolNames
12452
+ },
12453
+ runScopedToolSurface: {
12454
+ ...agentConfig.runScopedToolSurface ?? {},
12455
+ finalToolNames: activeAgentToolNames
12399
12456
  }
12400
12457
  } : agentConfig;
12401
12458
  if (exposedAgentConfig && !deps.pastedTextStore) {
@@ -17,7 +17,7 @@ import {
17
17
  } from "./chunk-LIQJTQRN.js";
18
18
  import {
19
19
  createFileCredentialBroker
20
- } from "./chunk-UHTDNB5Y.js";
20
+ } from "./chunk-76YUTLOT.js";
21
21
  import {
22
22
  asRecordOrEmpty
23
23
  } from "./chunk-KX6YBIHG.js";
@@ -347,7 +347,7 @@ var slice = createSliceWithThunks({
347
347
  const overrides = {};
348
348
  if (args.systemPromptOverride !== void 0) overrides.prompt = args.systemPromptOverride;
349
349
  if (args.toolsOverride !== void 0) overrides.tools = args.toolsOverride;
350
- const { _executeModel } = await import("./_executeModel-7J6IIHWQ.js");
350
+ const { _executeModel } = await import("./_executeModel-PVY4AXG4.js");
351
351
  return _executeModel(
352
352
  {
353
353
  isStreaming: args.isStreaming ?? false,
@@ -368,7 +368,7 @@ var slice = createSliceWithThunks({
368
368
  * - 循环直到无工具调用或触发其他运行时停止条件
369
369
  */
370
370
  runAgent: create.asyncThunk(async (args, thunkApi) => {
371
- const { runAgentClientLoop } = await import("./runAgentClientLoop-F6EQK26A.js");
371
+ const { runAgentClientLoop } = await import("./runAgentClientLoop-RUBF4JIP.js");
372
372
  const { content: loopContent, toolCallCount } = await runAgentClientLoop(
373
373
  {
374
374
  agentKey: args.agentKey,
@@ -384,7 +384,7 @@ var slice = createSliceWithThunks({
384
384
  * 聊天轮次流式 Agent 调用
385
385
  */
386
386
  streamAgentChatTurn: create.asyncThunk(async (args, thunkApi) => {
387
- const { streamAgentChatTurnHandler } = await import("./streamAgentChatTurn-KXELVHFR.js");
387
+ const { streamAgentChatTurnHandler } = await import("./streamAgentChatTurn-N7UJ6FFK.js");
388
388
  return streamAgentChatTurnHandler(args, thunkApi);
389
389
  }),
390
390
  /**
@@ -9,7 +9,7 @@ import {
9
9
  resolveRawAgentInput,
10
10
  resolveServerUrl,
11
11
  writeUsage
12
- } from "./chunk-DHNQA4VI.js";
12
+ } from "./chunk-2FAQDT6E.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-3XUE7WJA.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-UMVEB5QT.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-MOOQN57G.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-XUZQCRSA.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-DNQ55DHN.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-ME7N4YHG.js";
119
119
  import {
120
120
  resolveAgentRuntimeConfigFromRecord
121
- } from "./chunk-CEXJ6Y3C.js";
121
+ } from "./chunk-HBUKJB3W.js";
122
122
  import {
123
123
  createThinkParserState,
124
124
  flushThinkParser,
@@ -142,9 +142,11 @@ import {
142
142
  resolveCredentialKeyWithFallback
143
143
  } from "./chunk-JLR5NWP2.js";
144
144
  import {
145
- isOAuthApiKeyRef,
146
145
  normalizeUsage
147
- } from "./chunk-HEC32F3G.js";
146
+ } from "./chunk-7TBARDLF.js";
147
+ import {
148
+ isOAuthApiKeyRef
149
+ } from "./chunk-BKCR2JHG.js";
148
150
  import {
149
151
  clipCompactText
150
152
  } from "./chunk-5MMAK75Q.js";
@@ -189,7 +191,7 @@ import {
189
191
  serverOriginForDialog,
190
192
  settleRunTerminalAuthoritatively,
191
193
  spawnLocalBackgroundRun
192
- } from "./chunk-URW5UM6Y.js";
194
+ } from "./chunk-CI5DVWU7.js";
193
195
  import {
194
196
  formatAgentListCard,
195
197
  formatFinishedRunCard,
@@ -221,13 +223,13 @@ import {
221
223
  } from "./chunk-Y6ROFCZO.js";
222
224
  import {
223
225
  isAntigravityOAuthAgent
224
- } from "./chunk-SQX235S2.js";
226
+ } from "./chunk-TSCI6X6C.js";
225
227
  import {
226
228
  resolveClientVersion
227
- } from "./chunk-PIG2IUVZ.js";
229
+ } from "./chunk-I2QHI2XM.js";
228
230
  import {
229
231
  findModelConfig
230
- } from "./chunk-6EQD4AQL.js";
232
+ } from "./chunk-GC64WGMD.js";
231
233
  import {
232
234
  asTrimmedString
233
235
  } from "./chunk-3EUW3WEO.js";
@@ -241,7 +243,7 @@ import {
241
243
  CLIENT_VERSION_TOO_OLD_CODE,
242
244
  NOLO_CLIENT_VERSION_HEADER,
243
245
  buildClientVersionUpgradeMessage
244
- } from "./chunk-CGFNDIKK.js";
246
+ } from "./chunk-5KTQVMCX.js";
245
247
  import {
246
248
  asTrimmedLowercaseString
247
249
  } from "./chunk-QSJ3HFEF.js";
@@ -11374,7 +11376,7 @@ function isBalanceExhaustedError(error) {
11374
11376
 
11375
11377
  // packages/cli/client/agentRun.ts
11376
11378
  async function loadRunLocalAgentTurn() {
11377
- const { runLocalAgentTurn } = await import("./agentRuntimeLocal-7EZYBR6X.js");
11379
+ const { runLocalAgentTurn } = await import("./agentRuntimeLocal-K3777H5R.js");
11378
11380
  return runLocalAgentTurn;
11379
11381
  }
11380
11382
  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();
@@ -4,7 +4,7 @@ import {
4
4
  import {
5
5
  getModelContextWindow,
6
6
  normalizeTimingMs
7
- } from "./chunk-ASSNAASW.js";
7
+ } from "./chunk-BKCR2JHG.js";
8
8
  import {
9
9
  BUILTIN_NOLO_AGENT_KEY
10
10
  } from "./chunk-LOEO7LRC.js";
@@ -28,49 +28,6 @@ import {
28
28
  import {
29
29
  asOptionalTrimmedString
30
30
  } from "./chunk-G3SUCT4W.js";
31
- import {
32
- asTrimmedLowercaseString
33
- } from "./chunk-QSJ3HFEF.js";
34
-
35
- // packages/agent-runtime/serverProxyPolicy.ts
36
- var OAUTH_APIKEY_REFS = /* @__PURE__ */ new Set([
37
- "antigravity",
38
- "xai",
39
- "chatgpt",
40
- "claude",
41
- "cursor"
42
- ]);
43
- function isGoogleFamilyProvider(provider) {
44
- const normalized = asTrimmedLowercaseString(provider);
45
- return normalized === "google" || normalized.startsWith("google-");
46
- }
47
- function isOAuthApiKeyRef(value) {
48
- const ref = asTrimmedLowercaseString(value);
49
- return ref.length > 0 && OAUTH_APIKEY_REFS.has(ref);
50
- }
51
- function shouldUseServerProxy(agentConfig, requestProvider) {
52
- const effectiveProvider = (requestProvider || agentConfig.provider || "").toLowerCase();
53
- if (isGoogleFamilyProvider(effectiveProvider)) {
54
- return true;
55
- }
56
- if (isOAuthApiKeyRef(agentConfig.apiKeyRef)) {
57
- return true;
58
- }
59
- if (agentConfig.apiSource === "custom" && isRemoteCustomEndpoint(agentConfig.customProviderUrl)) {
60
- return true;
61
- }
62
- return !!agentConfig.useServerProxy;
63
- }
64
- var LOCAL_HOSTS = /* @__PURE__ */ new Set(["127.0.0.1", "localhost", "::1", "0.0.0.0"]);
65
- function isRemoteCustomEndpoint(url) {
66
- if (typeof url !== "string") return false;
67
- try {
68
- const host = new URL(url).hostname.toLowerCase().replace(/^\[|\]$/g, "");
69
- return !LOCAL_HOSTS.has(host);
70
- } catch {
71
- return false;
72
- }
73
- }
74
31
 
75
32
  // packages/agent-runtime/devin/devinChannelWindows.ts
76
33
  var DEVIN_CHANNEL_CONTEXT_WINDOWS = {
@@ -420,8 +377,6 @@ var extractReferenceKeysFromMessage = (msg) => {
420
377
  export {
421
378
  DEFAULT_AUTO_EXECUTION_PROFILE,
422
379
  resolveAutoExecutionProfile,
423
- isOAuthApiKeyRef,
424
- shouldUseServerProxy,
425
380
  readCacheReadInputTokens,
426
381
  readCacheCreationInputTokens,
427
382
  devinChannelContextWindow,
@@ -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";
@@ -11,7 +11,7 @@ import {
11
11
  } from "./chunk-JLR5NWP2.js";
12
12
  import {
13
13
  isOAuthApiKeyRef
14
- } from "./chunk-HEC32F3G.js";
14
+ } from "./chunk-BKCR2JHG.js";
15
15
  import {
16
16
  isOwnedAgentKey,
17
17
  ownedAgentKey,
@@ -19,14 +19,14 @@ import {
19
19
  } from "./chunk-M2EJHDJP.js";
20
20
  import {
21
21
  getModelAbility
22
- } from "./chunk-FYYSDHVQ.js";
22
+ } from "./chunk-HLAL63BZ.js";
23
23
  import {
24
24
  isSubscriptionEndpoint,
25
25
  isSubscriptionOAuthCredential
26
- } from "./chunk-EWO77ZGF.js";
26
+ } from "./chunk-OQ3DOBYB.js";
27
27
  import {
28
28
  isAntigravityOAuthAgent
29
- } from "./chunk-SQX235S2.js";
29
+ } from "./chunk-TSCI6X6C.js";
30
30
 
31
31
  // packages/ai/agent/agentBilling.ts
32
32
  function resolveBillingSource(candidate) {