nolo-cli 0.172.0-alpha.3 → 0.173.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 (83) hide show
  1. package/{_executeModel-P7OE5QLM.js → _executeModel-KT7NUYZC.js} +20 -19
  2. package/{agentDeleteCommand-3CCYENZM.js → agentDeleteCommand-SVGYPFU5.js} +25 -24
  3. package/{agentEmailCommands-VH6GRZ4S.js → agentEmailCommands-TBZJC37X.js} +27 -26
  4. package/{agentListCommands-FCSA7YV3.js → agentListCommands-CD7CLGH4.js} +16 -15
  5. package/{agentMachineCommands-VEBNXOLD.js → agentMachineCommands-DQBUP3I5.js} +14 -13
  6. package/{agentProviderCommands-TWVILNAN.js → agentProviderCommands-FXEMNSZ2.js} +2 -2
  7. package/{agentRecordCommands-MGCNHOJ3.js → agentRecordCommands-4PY33TAJ.js} +25 -24
  8. package/{agentRunCommand-UMVA6KSF.js → agentRunCommand-P7BC5M3Z.js} +26 -25
  9. package/{agentRuntimeLocal-2JOFHEXA.js → agentRuntimeLocal-XGBQ7JK2.js} +12 -11
  10. package/{agentSlice-AXI53QZB.js → agentSlice-NL7LRTLO.js} +1 -1
  11. package/{appDeleteCommands-BNQKVEIA.js → appDeleteCommands-VBH3YLIO.js} +15 -14
  12. package/{appDeployCommands-V5WQ2ZBR.js → appDeployCommands-3MZXLEKN.js} +15 -14
  13. package/{appDeployStatusCommands-QA5GFIUU.js → appDeployStatusCommands-FAWWEEOT.js} +15 -14
  14. package/{appGetCommands-U3SDB4TE.js → appGetCommands-VMMCATHU.js} +15 -14
  15. package/{appListCommands-DMHPABYC.js → appListCommands-NHM6PAIX.js} +15 -14
  16. package/{authCommand-BSOLJFPV.js → authCommand-KQ7GWCXK.js} +8 -4
  17. package/{chunk-U5UZ7IPM.js → chunk-25A6K2YP.js} +3 -3
  18. package/{chunk-4TTEZGP3.js → chunk-3TAVX6CD.js} +39 -22
  19. package/{chunk-ZCXK773F.js → chunk-4RYUMDOM.js} +2 -2
  20. package/{chunk-BIF4B4ON.js → chunk-64MLOS7B.js} +1 -1
  21. package/{chunk-CDDFEVZ5.js → chunk-73NYJAJS.js} +10 -10
  22. package/{chunk-I33CJERI.js → chunk-7QQOOHDG.js} +2 -2
  23. package/{chunk-BKCR2JHG.js → chunk-7ZGMQZ5D.js} +0 -45
  24. package/{chunk-3RF4DIQW.js → chunk-AFFHPBEU.js} +7 -7
  25. package/{chunk-EEFX46WP.js → chunk-ASGIXFB6.js} +1 -1
  26. package/{chunk-CRQGEMKZ.js → chunk-AV67EUU4.js} +13 -13
  27. package/{chunk-XWEAIAO2.js → chunk-BAXCQF6H.js} +1 -1
  28. package/{chunk-QPUKYKMH.js → chunk-BGQZLBMJ.js} +4 -101
  29. package/{chunk-7YN3HYWC.js → chunk-BYNWE72R.js} +15 -13
  30. package/{chunk-U4C2R3PV.js → chunk-CLY56QIC.js} +3 -3
  31. package/{chunk-AJ52EA72.js → chunk-D2J22QSE.js} +1 -1
  32. package/{chunk-2FOT26E6.js → chunk-ENIQIEAF.js} +1 -1
  33. package/{chunk-RU4KURIK.js → chunk-FJ76E5ZM.js} +2 -2
  34. package/chunk-FX33MFLW.js +103 -0
  35. package/{chunk-SIZPFDPU.js → chunk-GXFAZGZ6.js} +2 -2
  36. package/{chunk-EW6GOYKQ.js → chunk-J33JIJK7.js} +2 -2
  37. package/{chunk-ZQ545VNM.js → chunk-JDWJ64VG.js} +4 -4
  38. package/{chunk-OQ3DOBYB.js → chunk-JOUFPRE4.js} +178 -2
  39. package/{chunk-55HS2GQD.js → chunk-KBGWPSY6.js} +3 -3
  40. package/{chunk-CK4GWPSD.js → chunk-KPSNHLFI.js} +3 -5
  41. package/{chunk-3SF6NB4R.js → chunk-N2N63HTQ.js} +2 -2
  42. package/{chunk-KSCX7GME.js → chunk-O2LB346J.js} +3 -3
  43. package/{chunk-XWX5ZGWR.js → chunk-O3OJRN5Z.js} +89 -24
  44. package/{chunk-UVP7VL6F.js → chunk-P34IX26T.js} +1 -1
  45. package/{chunk-TZ6CCFRL.js → chunk-QWNMFO5E.js} +3 -3
  46. package/{chunk-TY7GIRX6.js → chunk-RUKAOMXD.js} +1 -1
  47. package/{chunk-7TBARDLF.js → chunk-T7HBI3WZ.js} +1 -1
  48. package/{chunk-6KS4TTCI.js → chunk-TLBTPKDD.js} +10 -10
  49. package/chunk-UKZX3NHN.js +48 -0
  50. package/{chunk-XKL2RXV6.js → chunk-VETQRONK.js} +13 -11
  51. package/{chunk-TOLFIE2I.js → chunk-W7S5CUGI.js} +3 -3
  52. package/{chunk-S4SA4INB.js → chunk-WBA4HAFS.js} +2 -2
  53. package/{chunk-XBJIESNS.js → chunk-XAFCJN32.js} +2 -2
  54. package/{chunk-VVMACDVS.js → chunk-Y3BUTWUJ.js} +1 -1
  55. package/{chunk-KNDA4K34.js → chunk-YBTP3PUM.js} +1 -1
  56. package/{commandRegistry-FDWLTWIQ.js → commandRegistry-UVXIFHUI.js} +49 -49
  57. package/{contentThunks-AAGKCQCZ.js → contentThunks-I4HNLTQY.js} +6 -5
  58. package/{createAgentAutomationAction-2K7M6ACJ.js → createAgentAutomationAction-GS5LQ52L.js} +6 -5
  59. package/{createDialogAction-RFQJMLEO.js → createDialogAction-5WNACKWC.js} +7 -6
  60. package/{createPageAction-MBDADKFQ.js → createPageAction-S7MGYSMU.js} +6 -5
  61. package/{dialogCommands-E5I4ORXJ.js → dialogCommands-OK3L6SAI.js} +15 -14
  62. package/{dialogSlice-MHZCAC4E.js → dialogSlice-R62QV2OE.js} +5 -4
  63. package/{docCreateCommands-SMX7DXUS.js → docCreateCommands-NMCMJPQX.js} +14 -13
  64. package/{docDeleteCommands-MFPBAHFH.js → docDeleteCommands-46FMFRZU.js} +15 -14
  65. package/{docReadCommands-ZOWLKFAF.js → docReadCommands-6NPY5P67.js} +14 -13
  66. package/{docStore-IUFAMRVZ.js → docStore-X5P4UGTZ.js} +1 -1
  67. package/{docUpdateCommands-4THL5VLI.js → docUpdateCommands-UDT4QLPL.js} +14 -13
  68. package/{handleSendMessageAction-OS6NNC3U.js → handleSendMessageAction-IVQMBROO.js} +13 -13
  69. package/index.js +4 -4
  70. package/{localRuntimeAdapter-XQ4PAAIT.js → localRuntimeAdapter-LY5MOJN4.js} +23 -22
  71. package/{machineCommands-UHGFVPD2.js → machineCommands-KYTNSAIN.js} +24 -23
  72. package/{machineWsRunDispatch-BAFZOC6Z.js → machineWsRunDispatch-ZR3GCQMH.js} +24 -23
  73. package/package.json +1 -1
  74. package/{providerPresetApply-5K4PBX4J.js → providerPresetApply-MBMGCNKZ.js} +1 -2
  75. package/{providerRegistry-K5MSZ3Y5.js → providerRegistry-P4KYS6SE.js} +1 -2
  76. package/{readlineWorkspace-ISBZZPR2.js → readlineWorkspace-SNA6I5UK.js} +29 -28
  77. package/{runAgentClientLoop-H4KCCJOV.js → runAgentClientLoop-6G7JORHJ.js} +18 -17
  78. package/{spaceCommands-PVEPGFHX.js → spaceCommands-SEWFBY53.js} +14 -13
  79. package/{streamAgentChatTurn-4PX74Z36.js → streamAgentChatTurn-EJDRXKAQ.js} +24 -22
  80. package/{tools-546KDFWP.js → tools-K3IZ7U5G.js} +12 -12
  81. package/{tuiSummaryLlmCaller-LA7NUKUJ.js → tuiSummaryLlmCaller-2MC6SXZT.js} +8 -7
  82. package/{updateDialogTitleAction-LIS3EPHP.js → updateDialogTitleAction-YO67K72J.js} +6 -5
  83. package/chunk-TSCI6X6C.js +0 -185
@@ -5,7 +5,7 @@ import {
5
5
  refreshOpenAiCodexToken,
6
6
  resolveServerSyncConfig,
7
7
  xaiRefresh
8
- } from "./chunk-AJ52EA72.js";
8
+ } from "./chunk-D2J22QSE.js";
9
9
  import {
10
10
  clearCredentialAvailability,
11
11
  markCredentialUnavailable,
@@ -64,7 +64,7 @@ import {
64
64
  import {
65
65
  inlineImageUrlsForCustomProvider,
66
66
  prepareTools
67
- } from "./chunk-ZCXK773F.js";
67
+ } from "./chunk-4RYUMDOM.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-6KS4TTCI.js";
89
+ } from "./chunk-TLBTPKDD.js";
90
90
  import {
91
91
  deriveCredentialGroup,
92
92
  deriveCustomProviderCredentialGroup
93
- } from "./chunk-CK4GWPSD.js";
93
+ } from "./chunk-KPSNHLFI.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-SIZPFDPU.js";
100
+ } from "./chunk-GXFAZGZ6.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-XKL2RXV6.js";
109
+ } from "./chunk-VETQRONK.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-TOLFIE2I.js";
116
+ } from "./chunk-W7S5CUGI.js";
117
117
  import {
118
118
  isTombstoneRecord
119
119
  } from "./chunk-D2MDMY2M.js";
@@ -170,7 +170,7 @@ import {
170
170
  runExecShellGates,
171
171
  validateConfiguredRootExecutionLease,
172
172
  verifyOwnerRouteAck
173
- } from "./chunk-7YN3HYWC.js";
173
+ } from "./chunk-BYNWE72R.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-XWX5ZGWR.js";
185
+ } from "./chunk-O3OJRN5Z.js";
186
186
  import {
187
187
  PlatformStreamInterruptedError,
188
188
  buildPlatformChatCompletionRequest,
@@ -193,30 +193,32 @@ import {
193
193
  readPlatformChatSseCompletion,
194
194
  resolvePlatformChatProviderConfig,
195
195
  shouldUsePlatformChatProvider
196
- } from "./chunk-KSCX7GME.js";
196
+ } from "./chunk-O2LB346J.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-EW6GOYKQ.js";
203
+ } from "./chunk-J33JIJK7.js";
204
204
  import {
205
205
  resolveHistoricalToolContentCap
206
206
  } from "./chunk-2WZXXAQD.js";
207
207
  import {
208
208
  resolveAgentImageInputSupport
209
- } from "./chunk-I33CJERI.js";
209
+ } from "./chunk-7QQOOHDG.js";
210
210
  import {
211
- EMPTY_TOOL_RESULT_TEXT,
212
211
  collectStablePromptPrefix,
213
212
  convertMessagesToResponsesInput,
214
213
  findAgentStatePairingIssues,
215
- hadToolImages,
216
214
  stablePromptCacheKey,
217
- toResponsesTools,
215
+ toResponsesTools
216
+ } from "./chunk-BGQZLBMJ.js";
217
+ import {
218
+ EMPTY_TOOL_RESULT_TEXT,
219
+ hadToolImages,
218
220
  toolImages
219
- } from "./chunk-QPUKYKMH.js";
221
+ } from "./chunk-FX33MFLW.js";
220
222
  import {
221
223
  buildNoloWorkspaceOpenAiTools,
222
224
  filterClientNoloWorkspaceToolNames,
@@ -237,18 +239,20 @@ import {
237
239
  } from "./chunk-2MBTWINN.js";
238
240
  import {
239
241
  normalizeUsage
240
- } from "./chunk-7TBARDLF.js";
242
+ } from "./chunk-T7HBI3WZ.js";
241
243
  import {
242
244
  isDevinOAuthAgent
243
245
  } from "./chunk-5ZUL4CUO.js";
244
246
  import {
245
247
  createProviderCallTimingTracker,
246
248
  finalizeProviderCallTiming,
247
- isOAuthApiKeyRef,
248
249
  observeMeaningfulProviderResponse,
249
250
  observeMeaningfulProviderResponseAt,
250
251
  withProviderCallTimingFields
251
- } from "./chunk-BKCR2JHG.js";
252
+ } from "./chunk-7ZGMQZ5D.js";
253
+ import {
254
+ isOAuthApiKeyRef
255
+ } from "./chunk-UKZX3NHN.js";
252
256
  import {
253
257
  clipCompactText
254
258
  } from "./chunk-5MMAK75Q.js";
@@ -353,7 +357,7 @@ import {
353
357
  } from "./chunk-LCBAMY2M.js";
354
358
  import {
355
359
  isAntigravityOAuthAgent
356
- } from "./chunk-TSCI6X6C.js";
360
+ } from "./chunk-JOUFPRE4.js";
357
361
  import {
358
362
  buildProviderSessionHeaders,
359
363
  resolvePlatformAuthToken
@@ -2971,7 +2975,13 @@ function buildGeminiCustomNativeProvider(p) {
2971
2975
  return { ok: true, mimeType: image.headers.get("content-type") ?? "application/octet-stream", bytes: new Uint8Array(await image.arrayBuffer()) };
2972
2976
  }
2973
2977
  });
2974
- const body = buildGeminiGenerateContentRequest({ messages: inlineResult.messages, tools, maxTokens: typeof agentConfig.max_tokens === "number" ? agentConfig.max_tokens : void 0, temperature: typeof agentConfig.temperature === "number" ? agentConfig.temperature : void 0, attachSkipThoughtSignature: resolveGeminiModelQuirks(model).allowsThoughtSignatureSentinel });
2978
+ const supportsToolImages = resolveAgentImageInputSupport({
2979
+ ...agentConfig,
2980
+ provider: agentConfig.provider ?? "google",
2981
+ model,
2982
+ hasVision: agentConfig.hasVision ?? false
2983
+ });
2984
+ const body = buildGeminiGenerateContentRequest({ messages: inlineResult.messages, tools, maxTokens: typeof agentConfig.max_tokens === "number" ? agentConfig.max_tokens : void 0, temperature: typeof agentConfig.temperature === "number" ? agentConfig.temperature : void 0, attachSkipThoughtSignature: resolveGeminiModelQuirks(model).allowsThoughtSignatureSentinel, supportsToolImages });
2975
2985
  log("provider.request.start", { agentKey: agentConfig.key, transport, requestUrl: nativeEndpoint, model, messageCount: messages.length, toolCount: tools.length, requestedToolNames });
2976
2986
  const response = await fetchImpl(nativeEndpoint, { method: "POST", headers: { "Content-Type": "application/json", ...customNativeAuthHeaders("gemini", apiKey, apiKeyHeader), ...buildProviderSessionHeaders({ endpoint, sessionId: options?.dialogId ?? fallbackSessionId }) }, body: JSON.stringify(body), signal: options?.signal ? AbortSignal.any([options.signal, AbortSignal.timeout(options.timeoutMs ?? 12e4)]) : AbortSignal.timeout(options?.timeoutMs ?? 12e4) });
2977
2987
  if (!response.ok) {
@@ -3514,12 +3524,19 @@ var resolveGeminiNativeToolTransport = async (ctx) => {
3514
3524
  model: providerConfig.model,
3515
3525
  complete: async (messages, options) => {
3516
3526
  const model = providerConfig.model;
3527
+ const supportsToolImages = resolveAgentImageInputSupport({
3528
+ provider: providerConfig.usageProvider ?? providerConfig.provider,
3529
+ model: providerConfig.model,
3530
+ customProviderUrl: providerConfig.endpoint,
3531
+ hasVision: agentConfig.hasVision ?? false
3532
+ });
3517
3533
  const requestBody = buildGeminiGenerateContentRequest({
3518
3534
  messages,
3519
3535
  tools,
3520
3536
  maxTokens: typeof agentConfig.max_tokens === "number" ? agentConfig.max_tokens : void 0,
3521
3537
  temperature: typeof agentConfig.temperature === "number" ? agentConfig.temperature : void 0,
3522
- attachSkipThoughtSignature: resolveGeminiModelQuirks(model).allowsThoughtSignatureSentinel
3538
+ attachSkipThoughtSignature: resolveGeminiModelQuirks(model).allowsThoughtSignatureSentinel,
3539
+ supportsToolImages
3523
3540
  });
3524
3541
  const url = `https://generativelanguage.googleapis.com/v1beta/models/${model}:streamGenerateContent?alt=sse`;
3525
3542
  logLocalRuntimeDiagnostic("provider.request.start", {
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  toolRegistry
3
- } from "./chunk-6KS4TTCI.js";
3
+ } from "./chunk-TLBTPKDD.js";
4
4
  import {
5
5
  runtime_default
6
- } from "./chunk-XKL2RXV6.js";
6
+ } from "./chunk-VETQRONK.js";
7
7
  import {
8
8
  canonicalizeToolNames
9
9
  } from "./chunk-5EBLANFT.js";
@@ -2,7 +2,7 @@ import {
2
2
  deleteDialog,
3
3
  runtime_default,
4
4
  toast
5
- } from "./chunk-XKL2RXV6.js";
5
+ } from "./chunk-VETQRONK.js";
6
6
  import {
7
7
  getCurrentSpaceId,
8
8
  getCurrentSpaceIdRaw,
@@ -5,7 +5,7 @@ import {
5
5
  inlineImageUrlsForCustomProvider,
6
6
  prepareTools,
7
7
  shouldInlineImageUrlsForAgent
8
- } from "./chunk-ZCXK773F.js";
8
+ } from "./chunk-4RYUMDOM.js";
9
9
  import {
10
10
  CONFIRMATION_INPUT_KEYS,
11
11
  INVALID_TOOL_ARGS_REPLACEMENT,
@@ -14,16 +14,16 @@ import {
14
14
  performFetchRequest,
15
15
  sanitizeOutboundMessages,
16
16
  stripModelToolArgs
17
- } from "./chunk-ZQ545VNM.js";
17
+ } from "./chunk-JDWJ64VG.js";
18
18
  import {
19
19
  findToolExecutor,
20
20
  toolDefinitionsByName
21
- } from "./chunk-6KS4TTCI.js";
21
+ } from "./chunk-TLBTPKDD.js";
22
22
  import {
23
23
  classifyApiError,
24
24
  classifyGenerationError,
25
25
  extractErrorDiagnostics
26
- } from "./chunk-RU4KURIK.js";
26
+ } from "./chunk-FJ76E5ZM.js";
27
27
  import {
28
28
  createSSEParser,
29
29
  createToolRunId,
@@ -32,7 +32,7 @@ import {
32
32
  toolRunSetPending,
33
33
  toolRunStarted,
34
34
  toolRunSucceeded
35
- } from "./chunk-SIZPFDPU.js";
35
+ } from "./chunk-GXFAZGZ6.js";
36
36
  import {
37
37
  getPublicImageAgentMode
38
38
  } from "./chunk-VIDPVFP3.js";
@@ -42,10 +42,10 @@ import {
42
42
  messageStreaming,
43
43
  toolResultNeedsUserConfirmation,
44
44
  updateToolMessage
45
- } from "./chunk-XKL2RXV6.js";
45
+ } from "./chunk-VETQRONK.js";
46
46
  import {
47
47
  streamAgentChatTurn
48
- } from "./chunk-TOLFIE2I.js";
48
+ } from "./chunk-W7S5CUGI.js";
49
49
  import {
50
50
  getCurrentSpaceId
51
51
  } from "./chunk-ZJ7UHBJS.js";
@@ -85,13 +85,13 @@ import {
85
85
  } from "./chunk-56GBUMO5.js";
86
86
  import {
87
87
  normalizeChatCompletionsBodyForProvider
88
- } from "./chunk-QPUKYKMH.js";
88
+ } from "./chunk-BGQZLBMJ.js";
89
89
  import {
90
90
  EMPTY_ASSISTANT_REPAIR_PROMPT
91
- } from "./chunk-7TBARDLF.js";
91
+ } from "./chunk-T7HBI3WZ.js";
92
92
  import {
93
93
  getModelInfo
94
- } from "./chunk-BKCR2JHG.js";
94
+ } from "./chunk-7ZGMQZ5D.js";
95
95
  import {
96
96
  isAbortError
97
97
  } from "./chunk-7DPNBQSV.js";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  resolveAgentCallPlan
3
- } from "./chunk-XBJIESNS.js";
3
+ } from "./chunk-XAFCJN32.js";
4
4
  import {
5
5
  SUBSCRIPTION_OAUTH_PROVIDERS
6
- } from "./chunk-OQ3DOBYB.js";
6
+ } from "./chunk-JOUFPRE4.js";
7
7
  import {
8
8
  findModelConfig,
9
9
  getProviderByModelName
@@ -10,49 +10,6 @@ import {
10
10
  import {
11
11
  isPlatformManagedProvider
12
12
  } from "./chunk-5KTQVMCX.js";
13
- import {
14
- asTrimmedLowercaseString
15
- } from "./chunk-QSJ3HFEF.js";
16
-
17
- // packages/agent-runtime/serverProxyPolicy.ts
18
- var OAUTH_APIKEY_REFS = /* @__PURE__ */ new Set([
19
- "antigravity",
20
- "xai",
21
- "chatgpt",
22
- "claude",
23
- "cursor"
24
- ]);
25
- function isGoogleFamilyProvider(provider) {
26
- const normalized = asTrimmedLowercaseString(provider);
27
- return normalized === "google" || normalized.startsWith("google-");
28
- }
29
- function isOAuthApiKeyRef(value) {
30
- const ref = asTrimmedLowercaseString(value);
31
- return ref.length > 0 && OAUTH_APIKEY_REFS.has(ref);
32
- }
33
- function shouldUseServerProxy(agentConfig, requestProvider) {
34
- const effectiveProvider = (requestProvider || agentConfig.provider || "").toLowerCase();
35
- if (isGoogleFamilyProvider(effectiveProvider)) {
36
- return true;
37
- }
38
- if (isOAuthApiKeyRef(agentConfig.apiKeyRef)) {
39
- return true;
40
- }
41
- if (agentConfig.apiSource === "custom" && isRemoteCustomEndpoint(agentConfig.customProviderUrl)) {
42
- return true;
43
- }
44
- return !!agentConfig.useServerProxy;
45
- }
46
- var LOCAL_HOSTS = /* @__PURE__ */ new Set(["127.0.0.1", "localhost", "::1", "0.0.0.0"]);
47
- function isRemoteCustomEndpoint(url) {
48
- if (typeof url !== "string") return false;
49
- try {
50
- const host = new URL(url).hostname.toLowerCase().replace(/^\[|\]$/g, "");
51
- return !LOCAL_HOSTS.has(host);
52
- } catch {
53
- return false;
54
- }
55
- }
56
13
 
57
14
  // packages/core/chat/messageContentSerialize.ts
58
15
  var serializeMessageContent = (content, imagePlaceholder = "[\u56FE\u7247]") => {
@@ -1062,8 +1019,6 @@ export {
1062
1019
  findModelContextWindow,
1063
1020
  getModelContextWindow,
1064
1021
  getModelInfo,
1065
- isOAuthApiKeyRef,
1066
- shouldUseServerProxy,
1067
1022
  sha256Hex,
1068
1023
  serializeMessageContent,
1069
1024
  resolveCompressionTriggerRatio,
@@ -7,7 +7,7 @@ import {
7
7
  mergeReferences,
8
8
  resolveReferenceAssets,
9
9
  resolveToolsFromKeys
10
- } from "./chunk-RU4KURIK.js";
10
+ } from "./chunk-FJ76E5ZM.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-SIZPFDPU.js";
23
+ } from "./chunk-GXFAZGZ6.js";
24
24
  import {
25
25
  resolveToolBaseUrl
26
26
  } from "./chunk-MYOH447Z.js";
@@ -32,15 +32,15 @@ import {
32
32
  } from "./chunk-TDNAAXUQ.js";
33
33
  import {
34
34
  getDocState
35
- } from "./chunk-3SF6NB4R.js";
35
+ } from "./chunk-N2N63HTQ.js";
36
36
  import {
37
37
  getTableState
38
- } from "./chunk-BIF4B4ON.js";
38
+ } from "./chunk-64MLOS7B.js";
39
39
  import {
40
40
  PERSONALIZATION_DIALOG_CATEGORY,
41
41
  buildPersonalizationDialogPolicyContext,
42
42
  selectAllMsgs
43
- } from "./chunk-XKL2RXV6.js";
43
+ } from "./chunk-VETQRONK.js";
44
44
  import {
45
45
  getCurrentSpaceIdRaw,
46
46
  getViewMode
@@ -76,11 +76,11 @@ import {
76
76
  } from "./chunk-WJZOQR2J.js";
77
77
  import {
78
78
  extractReferenceKeysFromMessage
79
- } from "./chunk-7TBARDLF.js";
79
+ } from "./chunk-T7HBI3WZ.js";
80
80
  import {
81
81
  getModelContextWindow,
82
82
  planContextUsage
83
- } from "./chunk-BKCR2JHG.js";
83
+ } from "./chunk-7ZGMQZ5D.js";
84
84
  import {
85
85
  asRecordOrEmpty
86
86
  } from "./chunk-KX6YBIHG.js";
@@ -5,7 +5,7 @@ import {
5
5
  } from "./chunk-NBTY7YJF.js";
6
6
  import {
7
7
  resolveCliLocalRuntimeKeyCapability
8
- } from "./chunk-6KS4TTCI.js";
8
+ } from "./chunk-TLBTPKDD.js";
9
9
  import {
10
10
  HIGH_RISK_MUTATION_TOOL_NAMES
11
11
  } from "./chunk-2GRXE3YJ.js";
@@ -9,7 +9,7 @@ import {
9
9
  resolveRawAgentInput,
10
10
  resolveServerUrl,
11
11
  writeUsage
12
- } from "./chunk-EEFX46WP.js";
12
+ } from "./chunk-ASGIXFB6.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-4TTEZGP3.js";
34
+ } from "./chunk-3TAVX6CD.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-UVP7VL6F.js";
67
+ } from "./chunk-P34IX26T.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-6KS4TTCI.js";
82
+ } from "./chunk-TLBTPKDD.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-SIZPFDPU.js";
89
+ } from "./chunk-GXFAZGZ6.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-S4SA4INB.js";
98
+ } from "./chunk-WBA4HAFS.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-XKL2RXV6.js";
106
+ } from "./chunk-VETQRONK.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-7YN3HYWC.js";
118
+ } from "./chunk-BYNWE72R.js";
119
119
  import {
120
120
  resolveAgentRuntimeConfigFromRecord
121
- } from "./chunk-EW6GOYKQ.js";
121
+ } from "./chunk-J33JIJK7.js";
122
122
  import {
123
123
  createThinkParserState,
124
124
  flushThinkParser,
@@ -143,10 +143,10 @@ import {
143
143
  } from "./chunk-JLR5NWP2.js";
144
144
  import {
145
145
  normalizeUsage
146
- } from "./chunk-7TBARDLF.js";
146
+ } from "./chunk-T7HBI3WZ.js";
147
147
  import {
148
148
  isOAuthApiKeyRef
149
- } from "./chunk-BKCR2JHG.js";
149
+ } from "./chunk-UKZX3NHN.js";
150
150
  import {
151
151
  clipCompactText
152
152
  } from "./chunk-5MMAK75Q.js";
@@ -223,7 +223,7 @@ import {
223
223
  } from "./chunk-Y6ROFCZO.js";
224
224
  import {
225
225
  isAntigravityOAuthAgent
226
- } from "./chunk-TSCI6X6C.js";
226
+ } from "./chunk-JOUFPRE4.js";
227
227
  import {
228
228
  resolveClientVersion
229
229
  } from "./chunk-I2QHI2XM.js";
@@ -11376,7 +11376,7 @@ function isBalanceExhaustedError(error) {
11376
11376
 
11377
11377
  // packages/cli/client/agentRun.ts
11378
11378
  async function loadRunLocalAgentTurn() {
11379
- const { runLocalAgentTurn } = await import("./agentRuntimeLocal-2JOFHEXA.js");
11379
+ const { runLocalAgentTurn } = await import("./agentRuntimeLocal-XGBQ7JK2.js");
11380
11380
  return runLocalAgentTurn;
11381
11381
  }
11382
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();
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  readDbRecord,
3
3
  writeAgentRecord
4
- } from "./chunk-UVP7VL6F.js";
4
+ } from "./chunk-P34IX26T.js";
5
5
  import {
6
6
  buildSkillSummaryMarker
7
7
  } from "./chunk-VF4K2QE6.js";
@@ -1,6 +1,9 @@
1
+ import {
2
+ projectOpenAiToolImages
3
+ } from "./chunk-FX33MFLW.js";
1
4
  import {
2
5
  getModelContextWindow
3
- } from "./chunk-BKCR2JHG.js";
6
+ } from "./chunk-7ZGMQZ5D.js";
4
7
  import {
5
8
  isRecord
6
9
  } from "./chunk-KUG52IAP.js";
@@ -232,54 +235,6 @@ var extractToolCallsFromResponseOutput = (response) => {
232
235
  return calls;
233
236
  };
234
237
 
235
- // packages/agent-runtime/toolImages.ts
236
- var EMPTY_TOOL_RESULT_TEXT = "[Tool completed without output]";
237
- var TOOL_HAD_IMAGES = "toolHadImages";
238
- function hadToolImages(message) {
239
- return message.tool_result_metadata?.[TOOL_HAD_IMAGES] === true || toolImages(message).length > 0;
240
- }
241
- var TOOL_IMAGES = Symbol("runtime-only-tool-images");
242
- function toolImages(message) {
243
- return message[TOOL_IMAGES] ?? [];
244
- }
245
- function withoutToolImages(message) {
246
- if (!(TOOL_IMAGES in message)) return message;
247
- const { [TOOL_IMAGES]: _images, ...textOnly } = message;
248
- return _images?.length ? {
249
- ...textOnly,
250
- tool_result_metadata: {
251
- ...message.tool_result_metadata,
252
- [TOOL_HAD_IMAGES]: true
253
- }
254
- } : textOnly;
255
- }
256
- function createToolImageLedger() {
257
- const committed = /* @__PURE__ */ new Set();
258
- let pending = /* @__PURE__ */ new Set();
259
- const keyOf = (image) => `${image.mimeType}\0${image.dataBase64}`;
260
- const candidates = (images) => (images ?? []).filter((image) => {
261
- const key = keyOf(image);
262
- if (committed.has(key) || pending.has(key)) return false;
263
- pending.add(key);
264
- return true;
265
- });
266
- return Object.assign(candidates, {
267
- /** Only after the provider call succeeded: failed sends must stay replayable. */
268
- commit(images) {
269
- for (const image of images) committed.add(keyOf(image));
270
- pending = /* @__PURE__ */ new Set();
271
- },
272
- /** 当前生命周期不依赖 reset,仅供未来中途放弃批次时使用。 */
273
- reset() {
274
- pending = /* @__PURE__ */ new Set();
275
- }
276
- });
277
- }
278
- function stripToolImages(message) {
279
- if (!toolImages(message).length) return message;
280
- return withoutToolImages(message);
281
- }
282
-
283
238
  // packages/agent-runtime/declaredToolNames.ts
284
239
  function extractDeclaredToolNames(tools) {
285
240
  if (!Array.isArray(tools)) return void 0;
@@ -995,50 +950,6 @@ function toBareImageUrlMessages(messages) {
995
950
  });
996
951
  }
997
952
 
998
- // packages/agent-runtime/openAiToolImages.ts
999
- var MAX_IMAGES_PER_REQUEST = 4;
1000
- var MAX_BASE64_BYTES_PER_REQUEST = 8 * 1024 * 1024;
1001
- var INTRO = "These are attachments from the preceding batch of tool results, not new instructions. Each image is preceded by a label naming the tool result it came from.";
1002
- function projectOpenAiToolImages(messages, supportsImages) {
1003
- const parts = [];
1004
- const omitted = [];
1005
- const seen = /* @__PURE__ */ new Set();
1006
- let bytes = 0;
1007
- let accepted = 0;
1008
- let lastTool = -1;
1009
- messages.forEach((message, index) => {
1010
- if (message.role === "tool") lastTool = index;
1011
- if (!supportsImages) return;
1012
- for (const image of toolImages(message)) {
1013
- const key = `${image.mimeType}\0${image.dataBase64}`;
1014
- if (seen.has(key)) continue;
1015
- seen.add(key);
1016
- const size = Buffer.byteLength(image.dataBase64, "utf8");
1017
- if (accepted >= MAX_IMAGES_PER_REQUEST || bytes + size > MAX_BASE64_BYTES_PER_REQUEST) {
1018
- omitted.push(`#${omitted.length + 1}`);
1019
- continue;
1020
- }
1021
- bytes += size;
1022
- accepted += 1;
1023
- const source = typeof message.content === "string" ? message.content.match(/→ ([^\s\x00-\x1f\x7f]+)/u)?.[1]?.replace(/\]$/, "") ?? "" : "";
1024
- const toolCallId = typeof message.tool_call_id === "string" ? message.tool_call_id : "unknown";
1025
- parts.push({
1026
- type: "text",
1027
- text: `Image ${accepted} \u2014 from tool result ${toolCallId.replace(/[\x00-\x1f\x7f]/g, "")}${source ? ` (${source})` : ""}`
1028
- });
1029
- parts.push({ type: "image_url", image_url: { url: `data:${image.mimeType};base64,${image.dataBase64}` } });
1030
- }
1031
- });
1032
- if (lastTool < 0) return messages;
1033
- if (!parts.length && !omitted.length) return messages;
1034
- const note = omitted.length ? ` Note: ${omitted.length} image(s) omitted (request budget: ${MAX_IMAGES_PER_REQUEST} images / 8 MiB base64) \u2014 they were NOT delivered, do not guess their content.` : "";
1035
- const attachment = {
1036
- role: "user",
1037
- content: [{ type: "text", text: `${INTRO}${note}` }, ...parts]
1038
- };
1039
- return [...messages.slice(0, lastTool + 1), attachment, ...messages.slice(lastTool + 1)];
1040
- }
1041
-
1042
953
  // packages/agent-runtime/openAiCompatibleMessages.ts
1043
954
  function isGeminiCompatibleTarget(provider, model) {
1044
955
  const p = (provider ?? "").trim().toLowerCase();
@@ -1268,14 +1179,6 @@ var normalizeChatCompletionsBodyForProvider = ({
1268
1179
  };
1269
1180
 
1270
1181
  export {
1271
- EMPTY_TOOL_RESULT_TEXT,
1272
- TOOL_HAD_IMAGES,
1273
- hadToolImages,
1274
- TOOL_IMAGES,
1275
- toolImages,
1276
- withoutToolImages,
1277
- createToolImageLedger,
1278
- stripToolImages,
1279
1182
  scanTruncation,
1280
1183
  classifyUnparsableToolArgs,
1281
1184
  markDowngradedToolTurnOrigin,