nolo-cli 0.159.0-alpha.3 → 0.159.0-alpha.4

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 (123) hide show
  1. package/{_executeModel-SHA5BWRT.js → _executeModel-3HHZYHHB.js} +38 -37
  2. package/accountResolver-55EDKEIK.js +1 -1
  3. package/action-GPPJC5TI.js +1 -1
  4. package/{addContentAction-BI6RDRTQ.js → addContentAction-XJQEJ4XW.js} +6 -6
  5. package/{addDialogAgentAction-4RJYUSIK.js → addDialogAgentAction-5WZX5CAY.js} +5 -5
  6. package/{agentDeleteCommand-VU3BA264.js → agentDeleteCommand-VXWLHIUC.js} +55 -55
  7. package/{agentEmailCommands-WUANEGTM.js → agentEmailCommands-2TQN6UIZ.js} +55 -55
  8. package/{agentListCommands-3YNO6UP4.js → agentListCommands-44UDONIY.js} +30 -30
  9. package/{agentMachineCommands-ONGZXXQW.js → agentMachineCommands-KH7OSRWP.js} +25 -23
  10. package/{agentPullCommand-FA43RBRU.js → agentPullCommand-GXXEDOSA.js} +4 -4
  11. package/{agentRecordCommands-DXXA2RET.js → agentRecordCommands-6BNH5KK2.js} +49 -49
  12. package/{agentRunCommand-WY77TJ72.js → agentRunCommand-7MFXU4GK.js} +52 -52
  13. package/{agentRunControl-PPYWJRIJ.js → agentRunControl-USFIAK7X.js} +4 -4
  14. package/{agentRuntimeLocal-NHC5DQPJ.js → agentRuntimeLocal-BAQON6BB.js} +13 -11
  15. package/{agentSlice-MIOEV36T.js → agentSlice-YT3VCCEW.js} +6 -6
  16. package/{appDeleteCommands-VQYCXZRF.js → appDeleteCommands-R73W7UJM.js} +22 -20
  17. package/{appDeployCommands-OKSJDVEY.js → appDeployCommands-F65F6N63.js} +22 -20
  18. package/{appDeployStatusCommands-UFGNZS6G.js → appDeployStatusCommands-CTRCXJJX.js} +22 -20
  19. package/{appGetCommands-3HNO5WLF.js → appGetCommands-VTQERXLK.js} +22 -20
  20. package/{appListCommands-H33BIZHJ.js → appListCommands-MY3WFDYA.js} +22 -20
  21. package/{authCommand-MSINEFHH.js → authCommand-3Z52KJID.js} +14 -14
  22. package/{authCommands-AMNIAKEG.js → authCommands-QOCKVPX3.js} +5 -5
  23. package/{builtinSkillRegistry-H3AY27TR.js → builtinSkillRegistry-LJV7FHNI.js} +4 -4
  24. package/{chunk-GCLZBOB6.js → chunk-2ZYCNT2O.js} +29 -29
  25. package/{chunk-XBLZ5IFE.js → chunk-3GTVM7NJ.js} +17 -17
  26. package/{chunk-US6MKPE7.js → chunk-3L5MSPWX.js} +1 -1
  27. package/{chunk-QYAYO5JA.js → chunk-4L4K6YR7.js} +1 -1
  28. package/{chunk-P5QACQDK.js → chunk-62TBKWTV.js} +1 -1
  29. package/{chunk-YLMMECCH.js → chunk-6XIE5ZGI.js} +1 -1
  30. package/{chunk-NT3LMOSE.js → chunk-B5JIGIKM.js} +27 -22
  31. package/{chunk-J2ATF74A.js → chunk-BAWAKW7X.js} +1 -1
  32. package/{chunk-ZVQHBIWV.js → chunk-CDLP56BS.js} +7 -7
  33. package/{chunk-ZIGIN5IX.js → chunk-DD2EOI6S.js} +1 -1
  34. package/{chunk-OON4OBWI.js → chunk-DLV3H464.js} +7 -7
  35. package/{chunk-DWBY333O.js → chunk-DT7EWFTY.js} +5 -5
  36. package/{chunk-IRTOYSA2.js → chunk-ESMZW5PE.js} +1 -1
  37. package/{chunk-ZJG7YU3I.js → chunk-F3SOW2EU.js} +46 -1
  38. package/{chunk-FZYTJOAQ.js → chunk-F5WASHQA.js} +27 -29
  39. package/{chunk-BFI6JGF6.js → chunk-FB5WLEOD.js} +11 -11
  40. package/{chunk-FBSDWUOJ.js → chunk-FCUKCVKN.js} +4 -4
  41. package/{chunk-FY4SDK2E.js → chunk-FDLDMJTM.js} +1 -1
  42. package/{chunk-PKC7D6SX.js → chunk-FFHV45HO.js} +3 -3
  43. package/{chunk-TMYAT2MD.js → chunk-FZYKQFBQ.js} +3 -3
  44. package/{chunk-MJKKEGF5.js → chunk-HBW2XA3L.js} +12 -12
  45. package/{chunk-CSCSMGQI.js → chunk-HW7EBEC5.js} +15 -191
  46. package/{chunk-5MPS5OOY.js → chunk-I7S63QUU.js} +1 -1
  47. package/{chunk-CON6SI7N.js → chunk-IF7V3CBU.js} +1 -1
  48. package/{chunk-GSKVOMBU.js → chunk-JDKSYQQN.js} +4 -4
  49. package/{chunk-M2P3OGXZ.js → chunk-JWEXJ573.js} +2 -2
  50. package/{chunk-SPKLALBU.js → chunk-MAYW6V3E.js} +1 -1
  51. package/{chunk-NDZOXXIM.js → chunk-NHEWV5FD.js} +1 -1
  52. package/{chunk-2NROMJBM.js → chunk-NWKPVIHL.js} +7 -7
  53. package/{chunk-NUE735UT.js → chunk-O2IWR23M.js} +1 -1
  54. package/{chunk-NNE5NIW2.js → chunk-OLVOR45M.js} +2 -2
  55. package/{chunk-CVSKYIXX.js → chunk-QXZH5UDF.js} +2 -2
  56. package/{chunk-QO436IJ5.js → chunk-QZIOZDM6.js} +9 -9
  57. package/{chunk-V4AK4IVZ.js → chunk-R2KWTENX.js} +3 -3
  58. package/{chunk-C3WXTFRP.js → chunk-RIHQGFFA.js} +1 -1
  59. package/{chunk-ZAB4R7LU.js → chunk-SCQT4CRF.js} +40 -42
  60. package/{chunk-DC3SZCRR.js → chunk-SH3XD4E2.js} +2 -2
  61. package/{chunk-RJBHRIEL.js → chunk-TK2AX7M6.js} +43 -45
  62. package/chunk-TT644UJD.js +188 -0
  63. package/{chunk-QOYJE6NX.js → chunk-U34KT53V.js} +28 -10
  64. package/{chunk-DFWLD7WU.js → chunk-ULQAD7ZY.js} +18 -6
  65. package/{chunk-RE5I35J7.js → chunk-VXS4YYJ2.js} +6 -6
  66. package/{chunk-JZX2XLKC.js → chunk-YCRROBDY.js} +1 -1
  67. package/{chunk-E46SJRWA.js → chunk-YNOXGQ7X.js} +13 -13
  68. package/{chunk-6MH6PWVJ.js → chunk-YR47Y7CN.js} +6 -6
  69. package/{chunk-C47WM5SD.js → chunk-ZAV4YVEA.js} +1 -1
  70. package/{commandRegistry-DAM7RV6E.js → commandRegistry-3JCFSTBQ.js} +83 -83
  71. package/{contentThunks-WLKR5KQ6.js → contentThunks-QBL5NK2W.js} +14 -15
  72. package/{createAgentAutomationAction-AI2HZHLE.js → createAgentAutomationAction-5UWBLR2N.js} +14 -15
  73. package/{createDialogAction-AU4IWDR3.js → createDialogAction-NJ2LE7KC.js} +18 -19
  74. package/{createPageAction-CAXS6ZUJ.js → createPageAction-7T3RINS2.js} +16 -17
  75. package/{dbSlice-DC2J53RC.js → dbSlice-6PVPY44C.js} +5 -5
  76. package/{deleteFile-KYWEMNFX.js → deleteFile-YM6NDPAR.js} +3 -3
  77. package/{dialogCommands-2QMR63AY.js → dialogCommands-FDQPV6GO.js} +27 -25
  78. package/{dialogSlice-QEP5EUON.js → dialogSlice-GQMTD4HR.js} +13 -14
  79. package/{docCreateCommands-EG3KFJGO.js → docCreateCommands-Z5KKWS2C.js} +24 -22
  80. package/{docDeleteCommands-MAM2BLCP.js → docDeleteCommands-YTGMEQ4I.js} +25 -23
  81. package/{docReadCommands-XVX2VLVM.js → docReadCommands-SK2CLD2S.js} +24 -22
  82. package/{docStore-WTXUKAQB.js → docStore-PM5PYKPZ.js} +6 -6
  83. package/{docUpdateCommands-JURMHPS5.js → docUpdateCommands-SI4PL2L3.js} +24 -22
  84. package/{handleSendMessageAction-7MAFLFOD.js → handleSendMessageAction-EQ3U6K5N.js} +31 -28
  85. package/index.js +7 -7
  86. package/{localRuntimeAdapter-DSO3Y5ZS.js → localRuntimeAdapter-TVIGJ3PU.js} +46 -46
  87. package/{localRuntimeAuthority-JDAD7CB6.js → localRuntimeAuthority-BPN5OAQG.js} +2 -2
  88. package/{localRuntimeDb-CVC62PM5.js → localRuntimeDb-QIVAXMUL.js} +1 -1
  89. package/{machineCommands-DWILXGTZ.js → machineCommands-EYP73LBU.js} +51 -51
  90. package/{machineWsRunDispatch-NJJZ34JJ.js → machineWsRunDispatch-6QWYWIHP.js} +47 -47
  91. package/{memberThunks-2DWKLE6W.js → memberThunks-AZINUM4S.js} +8 -8
  92. package/package.json +1 -1
  93. package/{read-L7QEJETH.js → read-7JPIWRBQ.js} +3 -3
  94. package/{readDocTool-QELXV2GW.js → readDocTool-AAQTB2Y3.js} +1 -1
  95. package/{readlineWorkspace-STK57SSQ.js → readlineWorkspace-QBN246OU.js} +80 -80
  96. package/{removeDialogAgentAction-376XSUP2.js → removeDialogAgentAction-RMVRILLK.js} +6 -6
  97. package/{runAgentClientLoop-6OD2CTYG.js → runAgentClientLoop-EXIQDX7G.js} +36 -35
  98. package/{runtimeDoctorCommands-HEN5IPIH.js → runtimeDoctorCommands-MMCP4B4U.js} +11 -11
  99. package/{setDialogExtraReferencesAction-QBDSH63D.js → setDialogExtraReferencesAction-L3V7JTMG.js} +6 -6
  100. package/{setPrimaryDialogAgentAction-537QFGW3.js → setPrimaryDialogAgentAction-X52JQGTJ.js} +6 -6
  101. package/{settingThunks-4Z43ZSAT.js → settingThunks-N6XFWPOU.js} +5 -5
  102. package/{spaceCommands-WPCHZKEY.js → spaceCommands-5WANPZMM.js} +24 -22
  103. package/{streamAgentChatTurn-BOATI5H3.js → streamAgentChatTurn-DI2334G3.js} +132 -72
  104. package/{switchDialogAgentAction-CSO6AKRL.js → switchDialogAgentAction-ZJ5CGU7J.js} +5 -5
  105. package/{tools-FPKQX2J6.js → tools-23VQGJOX.js} +27 -28
  106. package/{tuiSummaryLlmCaller-PEYFTAVL.js → tuiSummaryLlmCaller-FESHBDTT.js} +4 -4
  107. package/{updateCommands-LXZLG44Y.js → updateCommands-KALLBWJE.js} +3 -3
  108. package/{updateDialogTitleAction-WAH5KADA.js → updateDialogTitleAction-AGAYHWS7.js} +14 -15
  109. package/chunk-UKZX3NHN.js +0 -48
  110. package/{agentGrantCommands-HOJ3JBBQ.js → agentGrantCommands-5DPHYEKP.js} +3 -3
  111. package/{agentProviderCommands-CUBOAVPB.js → agentProviderCommands-CXBHNONN.js} +3 -3
  112. package/{chromeOpsCommands-3Z34RKSE.js → chromeOpsCommands-GZVVK7HU.js} +4 -4
  113. package/{chunk-2SGAI64X.js → chunk-43OFVLWJ.js} +4 -4
  114. package/{chunk-XETG4RIX.js → chunk-AETZ7AD6.js} +4 -4
  115. package/{chunk-YNCJYU4X.js → chunk-G3VYRPTV.js} +4 -4
  116. package/{chunk-2IXDJNZI.js → chunk-GAGGEA7D.js} +3 -3
  117. package/{chunk-O4KVUI4W.js → chunk-KABQ74UQ.js} +3 -3
  118. package/{chunk-TCQPBZUL.js → chunk-QA2C5NKI.js} +3 -3
  119. package/{chunk-42W7LKBM.js → chunk-QV3VGSX6.js} +3 -3
  120. package/{chunk-4RJJDA57.js → chunk-WR37DI7R.js} +3 -3
  121. package/{memoryCommands-CUNBFRVS.js → memoryCommands-ZS3VQJAL.js} +3 -3
  122. package/{offlineMarxistsAgentCommand-2QTHJCHV.js → offlineMarxistsAgentCommand-3GLX4QQY.js} +3 -3
  123. package/{tableCommands-LBH3QPPO.js → tableCommands-IVC5S7Y3.js} +11 -11
@@ -5,7 +5,7 @@ import {
5
5
  refreshOpenAiCodexToken,
6
6
  resolveServerSyncConfig,
7
7
  xaiRefresh
8
- } from "./chunk-YNCJYU4X.js";
8
+ } from "./chunk-G3VYRPTV.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-NNE5NIW2.js";
67
+ } from "./chunk-OLVOR45M.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-GCLZBOB6.js";
89
+ } from "./chunk-2ZYCNT2O.js";
90
90
  import {
91
91
  deriveCredentialGroup,
92
92
  deriveCustomProviderCredentialGroup
93
- } from "./chunk-RE5I35J7.js";
93
+ } from "./chunk-VXS4YYJ2.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-FBSDWUOJ.js";
100
+ } from "./chunk-FCUKCVKN.js";
101
101
  import {
102
102
  applyBuiltinAgentRuntimeOverride,
103
103
  applyTokenUsageToDayStats,
@@ -106,17 +106,14 @@ import {
106
106
  resolveBuiltinPlatformAgentConfig,
107
107
  runKeyed,
108
108
  validateAskChoiceInput
109
- } from "./chunk-FZYTJOAQ.js";
110
- import {
111
- isOAuthApiKeyRef
112
- } from "./chunk-UKZX3NHN.js";
109
+ } from "./chunk-F5WASHQA.js";
113
110
  import {
114
111
  BUILTIN_DIALOG_LLM_CHAT_FALLBACK_MODEL,
115
112
  BUILTIN_TITLE_LLM_CONFIG
116
113
  } from "./chunk-523DITKR.js";
117
114
  import {
118
115
  fetchServerSyncedCredential
119
- } from "./chunk-DWBY333O.js";
116
+ } from "./chunk-DT7EWFTY.js";
120
117
  import {
121
118
  isTombstoneRecord
122
119
  } from "./chunk-D2MDMY2M.js";
@@ -129,7 +126,7 @@ import {
129
126
  applySystemBuiltinSkillFilter,
130
127
  expandEnabledPacks,
131
128
  resolveEffectiveEnabledPacks
132
- } from "./chunk-JZX2XLKC.js";
129
+ } from "./chunk-YCRROBDY.js";
133
130
  import {
134
131
  DEFAULT_HYBRID_READ_TIMEOUT_MS,
135
132
  Duration_exports,
@@ -173,7 +170,7 @@ import {
173
170
  runExecShellGates,
174
171
  validateConfiguredRootExecutionLease,
175
172
  verifyOwnerRouteAck
176
- } from "./chunk-NT3LMOSE.js";
173
+ } from "./chunk-B5JIGIKM.js";
177
174
  import {
178
175
  accumulateGeminiChunks,
179
176
  buildGeminiGenerateContentRequest,
@@ -196,24 +193,24 @@ import {
196
193
  readPlatformChatSseCompletion,
197
194
  resolvePlatformChatProviderConfig,
198
195
  shouldUsePlatformChatProvider
199
- } from "./chunk-CVSKYIXX.js";
196
+ } from "./chunk-QXZH5UDF.js";
200
197
  import {
201
198
  readSseDataValues,
202
199
  readSseFrames
203
200
  } from "./chunk-HNUWUO75.js";
204
201
  import {
205
202
  resolveAgentRuntimeConfigFromRecord
206
- } from "./chunk-DFWLD7WU.js";
203
+ } from "./chunk-ULQAD7ZY.js";
207
204
  import {
208
205
  resolveHistoricalToolContentCap
209
- } from "./chunk-QOYJE6NX.js";
206
+ } from "./chunk-U34KT53V.js";
210
207
  import {
211
208
  collectStablePromptPrefix,
212
209
  convertMessagesToResponsesInput,
213
210
  findAgentStatePairingIssues,
214
211
  stablePromptCacheKey,
215
212
  toResponsesTools
216
- } from "./chunk-QYAYO5JA.js";
213
+ } from "./chunk-4L4K6YR7.js";
217
214
  import {
218
215
  buildNoloWorkspaceOpenAiTools,
219
216
  parseNoloWorkspaceToolArguments,
@@ -230,8 +227,9 @@ import {
230
227
  normalizeDialogTitle
231
228
  } from "./chunk-2MBTWINN.js";
232
229
  import {
230
+ isOAuthApiKeyRef,
233
231
  normalizeUsage
234
- } from "./chunk-ZJG7YU3I.js";
232
+ } from "./chunk-F3SOW2EU.js";
235
233
  import {
236
234
  isDevinOAuthAgent
237
235
  } from "./chunk-5ZUL4CUO.js";
@@ -241,7 +239,7 @@ import {
241
239
  observeMeaningfulProviderResponse,
242
240
  observeMeaningfulProviderResponseAt,
243
241
  withProviderCallTimingFields
244
- } from "./chunk-TCQPBZUL.js";
242
+ } from "./chunk-QA2C5NKI.js";
245
243
  import {
246
244
  clipCompactText
247
245
  } from "./chunk-5MMAK75Q.js";
@@ -280,9 +278,6 @@ import {
280
278
  dialogMessagePrefix,
281
279
  dialogMessageRange
282
280
  } from "./chunk-5EMSBTQ6.js";
283
- import {
284
- isAntigravityOAuthAgent
285
- } from "./chunk-SQX235S2.js";
286
281
  import {
287
282
  ackRunRecord,
288
283
  appendRunQueue,
@@ -303,7 +298,7 @@ import {
303
298
  terminateRunProcess,
304
299
  transitionRunToTerminal,
305
300
  withQueueLock
306
- } from "./chunk-42W7LKBM.js";
301
+ } from "./chunk-QV3VGSX6.js";
307
302
  import {
308
303
  TASK_PREVIEW_MAX,
309
304
  formatListRunsCard,
@@ -320,6 +315,27 @@ import {
320
315
  import {
321
316
  estimateTokenCount
322
317
  } from "./chunk-PSCNXBYA.js";
318
+ import {
319
+ getDefaultCliLocalRuntimeDb
320
+ } from "./chunk-FDLDMJTM.js";
321
+ import {
322
+ getLogger
323
+ } from "./chunk-EYLGAEB4.js";
324
+ import {
325
+ isCompiledBinary,
326
+ parseUserIdFromAuthToken,
327
+ resolveAuthToken,
328
+ resolveServerUrl
329
+ } from "./chunk-A7GB5UGH.js";
330
+ import {
331
+ DEFAULT_NOLO_SERVER_URL
332
+ } from "./chunk-OLZBQWZU.js";
333
+ import {
334
+ NOLO_CLUSTER_SERVERS
335
+ } from "./chunk-LCBAMY2M.js";
336
+ import {
337
+ isAntigravityOAuthAgent
338
+ } from "./chunk-SQX235S2.js";
323
339
  import {
324
340
  buildProviderSessionHeaders,
325
341
  resolvePlatformAuthToken
@@ -342,24 +358,6 @@ import {
342
358
  import {
343
359
  toErrorMessage
344
360
  } from "./chunk-HNMXYYJR.js";
345
- import {
346
- getDefaultCliLocalRuntimeDb
347
- } from "./chunk-FY4SDK2E.js";
348
- import {
349
- getLogger
350
- } from "./chunk-EYLGAEB4.js";
351
- import {
352
- isCompiledBinary,
353
- parseUserIdFromAuthToken,
354
- resolveAuthToken,
355
- resolveServerUrl
356
- } from "./chunk-A7GB5UGH.js";
357
- import {
358
- DEFAULT_NOLO_SERVER_URL
359
- } from "./chunk-OLZBQWZU.js";
360
- import {
361
- NOLO_CLUSTER_SERVERS
362
- } from "./chunk-LCBAMY2M.js";
363
361
  import {
364
362
  isLoopbackUrl
365
363
  } from "./chunk-4SN6J65J.js";
@@ -10768,7 +10766,7 @@ function createCliLocalRuntimeAdapter(deps) {
10768
10766
  const recordRunExecutionIsolation = async () => {
10769
10767
  try {
10770
10768
  const { writeFileSync: writeFileSync4, mkdirSync: mkdirSync4 } = await import("node:fs");
10771
- const { resolveRunsDir } = await import("./agentRunControl-PPYWJRIJ.js");
10769
+ const { resolveRunsDir } = await import("./agentRunControl-USFIAK7X.js");
10772
10770
  const fact = resolveLocalRunExecutionIsolationFact({
10773
10771
  // F1:显式点名宿主执行的 run 在审计里必须与 docker 沙盒区分开
10774
10772
  // (reason: host-explicit-writes vs docker-workload)。
@@ -10800,7 +10798,7 @@ function createCliLocalRuntimeAdapter(deps) {
10800
10798
  dockerWorkloadReleased = true;
10801
10799
  dockerWorkloadLoad = null;
10802
10800
  if (loaded) {
10803
- const { resolveRunsDir } = await import("./agentRunControl-PPYWJRIJ.js");
10801
+ const { resolveRunsDir } = await import("./agentRunControl-USFIAK7X.js");
10804
10802
  const exportRunDiff = deps.exportDockerRunDiffArtifact ?? exportDockerRunDiffArtifact;
10805
10803
  const warn = (message) => process.stderr.write(`[nolo] ${message}
10806
10804
  `);
@@ -6,11 +6,11 @@ import {
6
6
  buildBuiltinObjectSkillDbKey,
7
7
  buildBuiltinObjectSkillPageContent,
8
8
  buildCodeWorkDiscipline
9
- } from "./chunk-JZX2XLKC.js";
9
+ } from "./chunk-YCRROBDY.js";
10
10
  import {
11
11
  buildSkillDocMarkdown,
12
12
  resolvePageSkillMetadata
13
- } from "./chunk-XETG4RIX.js";
13
+ } from "./chunk-AETZ7AD6.js";
14
14
  import {
15
15
  nolotusId
16
16
  } from "./chunk-Y6ORVLSS.js";
@@ -9,10 +9,10 @@ import {
9
9
  resolveRawAgentInput,
10
10
  resolveServerUrl,
11
11
  writeUsage
12
- } from "./chunk-C47WM5SD.js";
12
+ } from "./chunk-ZAV4YVEA.js";
13
13
  import {
14
14
  getReadableCliDb
15
- } from "./chunk-P5QACQDK.js";
15
+ } from "./chunk-62TBKWTV.js";
16
16
  import {
17
17
  createCliLocalRuntimeAdapter,
18
18
  detectCurrentMachineId,
@@ -27,7 +27,7 @@ import {
27
27
  resolveBoundMachineId,
28
28
  resolveFileWriteGateEnabled,
29
29
  resolveLocalUserId
30
- } from "./chunk-ZAB4R7LU.js";
30
+ } from "./chunk-SCQT4CRF.js";
31
31
  import {
32
32
  clearCredentialAvailability,
33
33
  readCredentialEntry,
@@ -60,7 +60,7 @@ import {
60
60
  import {
61
61
  readDbRecord,
62
62
  resolveAgentRecordFromHybridStore
63
- } from "./chunk-O4KVUI4W.js";
63
+ } from "./chunk-KABQ74UQ.js";
64
64
  import {
65
65
  isLocalCliAgentKey
66
66
  } from "./chunk-NBTY7YJF.js";
@@ -75,14 +75,14 @@ import {
75
75
  } from "./chunk-BMQ2MJUK.js";
76
76
  import {
77
77
  resolveCliLocalRuntimeKeyCapability
78
- } from "./chunk-GCLZBOB6.js";
78
+ } from "./chunk-2ZYCNT2O.js";
79
79
  import {
80
80
  isTransientFetchError
81
81
  } from "./chunk-KFHREHUQ.js";
82
82
  import {
83
83
  parseUiCard,
84
84
  uiCardFallback
85
- } from "./chunk-FBSDWUOJ.js";
85
+ } from "./chunk-FCUKCVKN.js";
86
86
  import {
87
87
  isGatewayHttpStatus
88
88
  } from "./chunk-NF64D32W.js";
@@ -91,7 +91,7 @@ import {
91
91
  chooseMemoryOwners,
92
92
  loadMemoryCandidatesFromDb,
93
93
  resolveAgentMemoryPolicy
94
- } from "./chunk-GSKVOMBU.js";
94
+ } from "./chunk-JDKSYQQN.js";
95
95
  import {
96
96
  API_REPORTED_COST_MULTIPLIER,
97
97
  estimateMessagesTokens,
@@ -99,22 +99,22 @@ import {
99
99
  resolveAgentContextWindow,
100
100
  resolveOccupancy,
101
101
  resolveOccupancyWindow
102
- } from "./chunk-FZYTJOAQ.js";
102
+ } from "./chunk-F5WASHQA.js";
103
103
  import {
104
- isOAuthApiKeyRef
105
- } from "./chunk-UKZX3NHN.js";
104
+ buildSkillDiscoveryContextLayer
105
+ } from "./chunk-AU7AXHUL.js";
106
106
  import {
107
107
  parseExternalSkillMarkdown,
108
108
  parseSkillDocProtocol
109
- } from "./chunk-XETG4RIX.js";
109
+ } from "./chunk-AETZ7AD6.js";
110
110
  import {
111
111
  LOCAL_AGENT_CONFIG_MISSING_CODE,
112
112
  LOCAL_TURN_ABORTED_CODE,
113
113
  readActionGate
114
- } from "./chunk-NT3LMOSE.js";
114
+ } from "./chunk-B5JIGIKM.js";
115
115
  import {
116
116
  resolveAgentRuntimeConfigFromRecord
117
- } from "./chunk-DFWLD7WU.js";
117
+ } from "./chunk-ULQAD7ZY.js";
118
118
  import {
119
119
  createThinkParserState,
120
120
  flushThinkParser,
@@ -136,8 +136,9 @@ import {
136
136
  resolveCredentialKeyWithFallback
137
137
  } from "./chunk-3MZAGMYY.js";
138
138
  import {
139
+ isOAuthApiKeyRef,
139
140
  normalizeUsage
140
- } from "./chunk-ZJG7YU3I.js";
141
+ } from "./chunk-F3SOW2EU.js";
141
142
  import {
142
143
  clipCompactText
143
144
  } from "./chunk-5MMAK75Q.js";
@@ -148,6 +149,13 @@ import {
148
149
  normalizeRuntimeToolPolicyOverride,
149
150
  resolveEffectiveRuntimeToolPolicy
150
151
  } from "./chunk-LIQJTQRN.js";
152
+ import {
153
+ buildAgentsMdLayer,
154
+ buildMemoryOverlayLayer,
155
+ buildMemoryUseGuidanceLayer,
156
+ partitionScopedBlocks,
157
+ renderTurnContextBlocksWithScope
158
+ } from "./chunk-VEA7H5FG.js";
151
159
  import {
152
160
  BUILTIN_NOLO_AGENT_KEY,
153
161
  BUILTIN_NOLO_AGENT_NAME,
@@ -161,9 +169,6 @@ import {
161
169
  createMemoryKey,
162
170
  ulid
163
171
  } from "./chunk-5EMSBTQ6.js";
164
- import {
165
- isAntigravityOAuthAgent
166
- } from "./chunk-SQX235S2.js";
167
172
  import {
168
173
  createRunActivityTracker,
169
174
  createShellApprovalChild,
@@ -176,7 +181,7 @@ import {
176
181
  serverOriginForDialog,
177
182
  settleRunTerminalAuthoritatively,
178
183
  spawnLocalBackgroundRun
179
- } from "./chunk-42W7LKBM.js";
184
+ } from "./chunk-QV3VGSX6.js";
180
185
  import {
181
186
  formatAgentListCard,
182
187
  formatFinishedRunCard,
@@ -187,26 +192,14 @@ import {
187
192
  formatStopRunCard,
188
193
  isAgentRunTerminalStatus
189
194
  } from "./chunk-PJNFNEJE.js";
190
- import {
191
- resolveClientVersion
192
- } from "./chunk-PIG2IUVZ.js";
193
- import {
194
- findModelConfig
195
- } from "./chunk-6EQD4AQL.js";
196
- import {
197
- asTrimmedString
198
- } from "./chunk-3EUW3WEO.js";
199
195
  import {
200
196
  isCliAuthorityBrokerProtocolError,
201
197
  isCliAuthorityBrokerTimeoutError,
202
198
  isCliAuthorityBrokerUnavailableError
203
199
  } from "./chunk-EXAJ6DCR.js";
204
- import {
205
- toErrorMessage
206
- } from "./chunk-HNMXYYJR.js";
207
200
  import {
208
201
  getDefaultCliLocalRuntimeDb
209
- } from "./chunk-FY4SDK2E.js";
202
+ } from "./chunk-FDLDMJTM.js";
210
203
  import {
211
204
  getLogger,
212
205
  normalizeError
@@ -214,13 +207,28 @@ import {
214
207
  import {
215
208
  resolveAuthToken
216
209
  } from "./chunk-A7GB5UGH.js";
217
- import {
218
- asOptionalTrimmedString
219
- } from "./chunk-G3SUCT4W.js";
220
210
  import {
221
211
  readPipeText,
222
212
  spawnProcess
223
213
  } from "./chunk-Y6ROFCZO.js";
214
+ import {
215
+ isAntigravityOAuthAgent
216
+ } from "./chunk-SQX235S2.js";
217
+ import {
218
+ resolveClientVersion
219
+ } from "./chunk-PIG2IUVZ.js";
220
+ import {
221
+ findModelConfig
222
+ } from "./chunk-6EQD4AQL.js";
223
+ import {
224
+ asTrimmedString
225
+ } from "./chunk-3EUW3WEO.js";
226
+ import {
227
+ toErrorMessage
228
+ } from "./chunk-HNMXYYJR.js";
229
+ import {
230
+ asOptionalTrimmedString
231
+ } from "./chunk-G3SUCT4W.js";
224
232
  import {
225
233
  CLIENT_VERSION_TOO_OLD_CODE,
226
234
  NOLO_CLIENT_VERSION_HEADER,
@@ -229,16 +237,6 @@ import {
229
237
  import {
230
238
  asTrimmedLowercaseString
231
239
  } from "./chunk-QSJ3HFEF.js";
232
- import {
233
- buildSkillDiscoveryContextLayer
234
- } from "./chunk-AU7AXHUL.js";
235
- import {
236
- buildAgentsMdLayer,
237
- buildMemoryOverlayLayer,
238
- buildMemoryUseGuidanceLayer,
239
- partitionScopedBlocks,
240
- renderTurnContextBlocksWithScope
241
- } from "./chunk-VEA7H5FG.js";
242
240
 
243
241
  // packages/agent-runtime/modelLayerOverride.ts
244
242
  var MODEL_LAYER_KEYS = [
@@ -11181,7 +11179,7 @@ function isBalanceExhaustedError(error) {
11181
11179
 
11182
11180
  // packages/cli/client/agentRun.ts
11183
11181
  async function loadRunLocalAgentTurn() {
11184
- const { runLocalAgentTurn } = await import("./agentRuntimeLocal-NHC5DQPJ.js");
11182
+ const { runLocalAgentTurn } = await import("./agentRuntimeLocal-BAQON6BB.js");
11185
11183
  return runLocalAgentTurn;
11186
11184
  }
11187
11185
  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();
@@ -0,0 +1,188 @@
1
+ import {
2
+ shouldUseServerProxy
3
+ } from "./chunk-F3SOW2EU.js";
4
+ import {
5
+ ANTIGRAVITY_CLOUD_CODE_BASE_URL,
6
+ isAntigravityCloudCodeBaseUrl,
7
+ isAntigravityOAuthAgent
8
+ } from "./chunk-SQX235S2.js";
9
+ import {
10
+ isOpenAiResponsesModel,
11
+ resolvePlatformChatCompletionsEndpoint,
12
+ resolvePlatformResponsesEndpoint
13
+ } from "./chunk-V7PCFWX3.js";
14
+ import {
15
+ findModelConfig
16
+ } from "./chunk-6EQD4AQL.js";
17
+ import {
18
+ asOptionalTrimmedString
19
+ } from "./chunk-G3SUCT4W.js";
20
+ import {
21
+ asTrimmedLowercaseString
22
+ } from "./chunk-QSJ3HFEF.js";
23
+
24
+ // packages/agent-runtime/agentCallPlan.ts
25
+ var CODEX_RESPONSES_URL = "https://chatgpt.com/backend-api/codex/responses";
26
+ var CURSOR_AGENT_URL = "https://api2.cursor.sh/agent.v1.AgentService/Run";
27
+ var DEVIN_CONNECT_URL = "https://server.codeium.com/exa.api_server_pb.ApiServerService/GetChatMessage";
28
+ function resolveClientWire(plan) {
29
+ if (plan.upstreamWire === "gemini-cca") return "chat.completions";
30
+ if (plan.upstreamWire === "anthropic-messages") return "chat.completions";
31
+ if (plan.upstreamWire === "cursor-connect") return "chat.completions";
32
+ if (plan.upstreamWire === "devin-connect") return "chat.completions";
33
+ if (plan.upstreamWire === "custom-gemini") return "chat.completions";
34
+ if (plan.upstreamWire === "custom-openai-responses") return "chat.completions";
35
+ if (plan.upstreamWire === "custom-anthropic-messages") return "chat.completions";
36
+ if (plan.upstreamWire === "responses" && plan.authMethod.kind === "oauth" && plan.authMethod.ref === "chatgpt") {
37
+ return "chat.completions";
38
+ }
39
+ return plan.upstreamWire;
40
+ }
41
+ var XAI_CHAT_COMPLETIONS_URL = "https://api.x.ai/v1/chat/completions";
42
+ var ANTHROPIC_MESSAGES_URL = "https://api.anthropic.com/v1/messages";
43
+ var CODEX_REQUIRED_HEADERS = [
44
+ "chatgpt-account-id",
45
+ "OpenAI-Beta",
46
+ "originator",
47
+ "version"
48
+ ];
49
+ var ANTIGRAVITY_REQUIRED_HEADERS = [
50
+ "User-Agent"
51
+ // antigravity-specific UA (matches getAntigravityUserAgent)
52
+ ];
53
+ function agentShouldUseServerProxy(agentConfig) {
54
+ return shouldUseServerProxy(agentConfig);
55
+ }
56
+ function resolveCustomUpstreamWire(endpoint, nativeProtocol) {
57
+ const responsesEndpoint = endpoint.includes("/responses");
58
+ if (nativeProtocol === "openai-responses" && responsesEndpoint) return "responses";
59
+ if (nativeProtocol === "gemini") return "custom-gemini";
60
+ if (nativeProtocol === "openai-responses") return "custom-openai-responses";
61
+ if (nativeProtocol === "anthropic-messages") return "custom-anthropic-messages";
62
+ return responsesEndpoint ? "responses" : "chat.completions";
63
+ }
64
+ function hasOwnCustomProviderKey(agentConfig) {
65
+ const endpoint = asOptionalTrimmedString(agentConfig.customProviderUrl);
66
+ if (!endpoint) return false;
67
+ if (isAntigravityCloudCodeBaseUrl(endpoint)) return false;
68
+ return Boolean(asOptionalTrimmedString(agentConfig.apiKey));
69
+ }
70
+ function resolveAgentCallPlan(agentConfig, _env) {
71
+ const apiKeyRef = asTrimmedLowercaseString(agentConfig.apiKeyRef);
72
+ const provider = asTrimmedLowercaseString(
73
+ agentConfig.provider ?? agentConfig.apiSource
74
+ );
75
+ const ownCustomKeyWins = hasOwnCustomProviderKey(agentConfig);
76
+ const oauthApiKeyRef = ownCustomKeyWins ? "" : apiKeyRef;
77
+ if (!ownCustomKeyWins && isAntigravityOAuthAgent(agentConfig)) {
78
+ return {
79
+ authMethod: { kind: "oauth", ref: "antigravity" },
80
+ transport: "server-proxy",
81
+ upstreamWire: "gemini-cca",
82
+ endpoint: ANTIGRAVITY_CLOUD_CODE_BASE_URL,
83
+ requiredHeaders: [...ANTIGRAVITY_REQUIRED_HEADERS],
84
+ vendor: provider || "google-antigravity"
85
+ };
86
+ }
87
+ if (oauthApiKeyRef === "chatgpt") {
88
+ return {
89
+ authMethod: { kind: "oauth", ref: "chatgpt" },
90
+ transport: "server-proxy",
91
+ upstreamWire: "responses",
92
+ endpoint: CODEX_RESPONSES_URL,
93
+ requiredHeaders: [...CODEX_REQUIRED_HEADERS],
94
+ vendor: provider || "openai"
95
+ };
96
+ }
97
+ if (oauthApiKeyRef === "claude") {
98
+ return {
99
+ authMethod: { kind: "oauth", ref: "claude" },
100
+ transport: "server-proxy",
101
+ upstreamWire: "anthropic-messages",
102
+ endpoint: ANTHROPIC_MESSAGES_URL,
103
+ requiredHeaders: ["anthropic-version", "anthropic-beta"],
104
+ vendor: provider || "anthropic"
105
+ };
106
+ }
107
+ if (oauthApiKeyRef === "xai") {
108
+ return {
109
+ authMethod: { kind: "oauth", ref: "xai" },
110
+ transport: "server-proxy",
111
+ upstreamWire: "chat.completions",
112
+ endpoint: XAI_CHAT_COMPLETIONS_URL,
113
+ requiredHeaders: [],
114
+ vendor: provider || "xai"
115
+ };
116
+ }
117
+ if (oauthApiKeyRef === "cursor") {
118
+ return {
119
+ authMethod: { kind: "oauth", ref: "cursor" },
120
+ transport: "server-proxy",
121
+ upstreamWire: "cursor-connect",
122
+ endpoint: CURSOR_AGENT_URL,
123
+ requiredHeaders: [
124
+ "x-cursor-client-version",
125
+ "x-cursor-client-type",
126
+ "x-ghost-mode"
127
+ ],
128
+ vendor: provider || "cursor"
129
+ };
130
+ }
131
+ if (oauthApiKeyRef === "devin" || !ownCustomKeyWins && provider === "devin") {
132
+ return {
133
+ authMethod: { kind: "oauth", ref: "devin" },
134
+ transport: "server-proxy",
135
+ upstreamWire: "devin-connect",
136
+ endpoint: DEVIN_CONNECT_URL,
137
+ requiredHeaders: ["connect-protocol-version"],
138
+ vendor: provider || "devin"
139
+ };
140
+ }
141
+ if (agentConfig.cliProvider || agentConfig.apiSource === "cli" || provider === "cli") {
142
+ return {
143
+ authMethod: { kind: "cli", provider: agentConfig.cliProvider || provider || "codex" },
144
+ transport: "direct",
145
+ upstreamWire: "cli",
146
+ endpoint: "",
147
+ requiredHeaders: [],
148
+ vendor: provider || "cli"
149
+ };
150
+ }
151
+ if (agentConfig.customProviderUrl || agentConfig.apiSource === "custom") {
152
+ const transport2 = agentShouldUseServerProxy(agentConfig) ? "server-proxy" : "direct";
153
+ const endpoint2 = asOptionalTrimmedString(agentConfig.customProviderUrl) ?? "";
154
+ const upstreamWire2 = resolveCustomUpstreamWire(
155
+ endpoint2,
156
+ findModelConfig(provider, agentConfig.model ?? "")?.nativeProtocol
157
+ );
158
+ return {
159
+ authMethod: { kind: "custom-key" },
160
+ transport: transport2,
161
+ upstreamWire: upstreamWire2,
162
+ endpoint: endpoint2,
163
+ requiredHeaders: [],
164
+ vendor: provider || "custom"
165
+ };
166
+ }
167
+ const transport = agentShouldUseServerProxy(agentConfig) ? "server-proxy" : "direct";
168
+ const useResponses = isOpenAiResponsesModel({
169
+ provider,
170
+ model: agentConfig.model,
171
+ endpointKey: agentConfig.endpointKey
172
+ });
173
+ const upstreamWire = useResponses ? "responses" : "chat.completions";
174
+ const endpoint = upstreamWire === "responses" ? resolvePlatformResponsesEndpoint(provider, agentConfig.model) ?? "" : resolvePlatformChatCompletionsEndpoint(provider, agentConfig.model) ?? "";
175
+ return {
176
+ authMethod: { kind: "platform-key" },
177
+ transport,
178
+ upstreamWire,
179
+ endpoint,
180
+ requiredHeaders: [],
181
+ vendor: provider || "openai"
182
+ };
183
+ }
184
+
185
+ export {
186
+ resolveClientWire,
187
+ resolveAgentCallPlan
188
+ };
@@ -1,3 +1,9 @@
1
+ import {
2
+ resolveAgentCallPlan
3
+ } from "./chunk-TT644UJD.js";
4
+ import {
5
+ SUBSCRIPTION_OAUTH_PROVIDERS
6
+ } from "./chunk-EWO77ZGF.js";
1
7
  import {
2
8
  findModelConfig,
3
9
  getProviderByModelName
@@ -90,16 +96,18 @@ var lookupKnownModelVision = (provider, model) => {
90
96
  if (provider && provider !== "custom") {
91
97
  const direct = findModelConfig(provider, candidate);
92
98
  if (direct && typeof direct.hasVision === "boolean") return direct.hasVision;
93
- }
94
- const detected = getProviderByModelName(candidate);
95
- if (detected) {
96
- const found = findModelConfig(detected, candidate)?.hasVision;
97
- if (found !== void 0) return found;
99
+ } else {
100
+ const detected = getProviderByModelName(candidate);
101
+ if (detected) {
102
+ const found = findModelConfig(detected, candidate)?.hasVision;
103
+ if (found !== void 0) return found;
104
+ }
98
105
  }
99
106
  if (candidate.includes("/")) {
100
107
  const slash = candidate.indexOf("/");
101
108
  const modelProvider = candidate.slice(0, slash).toLowerCase();
102
109
  const modelName = candidate.slice(slash + 1);
110
+ if (provider && provider !== "custom" && provider !== modelProvider) continue;
103
111
  const nested = findModelConfig(modelProvider, modelName);
104
112
  if (nested && typeof nested.hasVision === "boolean") return nested.hasVision;
105
113
  }
@@ -108,12 +116,22 @@ var lookupKnownModelVision = (provider, model) => {
108
116
  };
109
117
  var resolveAgentImageInputSupport = (agent) => {
110
118
  if (!agent) return true;
111
- const provider = asTrimmedLowercaseString(agent.provider) || null;
119
+ const provider = asTrimmedLowercaseString(agent.provider) || asTrimmedLowercaseString(agent.apiSource) || null;
112
120
  const model = asOptionalTrimmedString(agent.model) ?? "";
113
- const catalogHasVision = lookupKnownModelVision(
114
- provider,
115
- model
116
- );
121
+ const { authMethod } = resolveAgentCallPlan({
122
+ key: "",
123
+ provider: agent.provider ?? void 0,
124
+ apiSource: agent.apiSource ?? void 0,
125
+ cliProvider: agent.cliProvider ?? void 0,
126
+ model,
127
+ apiKeyRef: agent.apiKeyRef ?? void 0,
128
+ customProviderUrl: agent.customProviderUrl ?? void 0,
129
+ apiKey: agent.apiKey ?? void 0,
130
+ useServerProxy: agent.useServerProxy ?? void 0
131
+ });
132
+ const catalogHasVision = authMethod.kind === "oauth" ? SUBSCRIPTION_OAUTH_PROVIDERS.find((entry) => entry.apiKeyRef === authMethod.ref)?.modelOptions.find(
133
+ (entry) => [model, stripEffortSuffix(model), stripPreviewSuffix(model)].includes(entry.id)
134
+ )?.hasVision : lookupKnownModelVision(provider, model);
117
135
  if (catalogHasVision !== void 0) {
118
136
  return catalogHasVision;
119
137
  }