nolo-cli 0.30.0-alpha.1 → 0.30.0-alpha.11

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 (97) hide show
  1. package/{_executeModel-VBHHG7LT.js → _executeModel-5ARVVUIK.js} +29 -28
  2. package/{action-FENWPT3C.js → action-HI3VRQLP.js} +7 -7
  3. package/{addContentAction-Z5S5ZQ7I.js → addContentAction-NCURJ6PK.js} +6 -6
  4. package/{addDialogAgentAction-VUNVD2XR.js → addDialogAgentAction-RCY4ECF4.js} +5 -5
  5. package/{agentDeleteCommand-LLGZXUYJ.js → agentDeleteCommand-5Q6TDCJU.js} +23 -22
  6. package/{agentEmailCommands-LC2FPN6G.js → agentEmailCommands-DSX4BJ2I.js} +34 -33
  7. package/{agentListCommands-A6OBQ3QX.js → agentListCommands-S66HL5RO.js} +25 -24
  8. package/{agentMachineCommands-4O4Q5B5X.js → agentMachineCommands-ULCQ5ZNN.js} +23 -22
  9. package/{agentRecordCommands-W22RIQRV.js → agentRecordCommands-2AA3GEGO.js} +33 -32
  10. package/{agentRunCommand-V4OBU4FB.js → agentRunCommand-3KOT77XY.js} +33 -32
  11. package/{agentRuntimeLocal-I57YSGH4.js → agentRuntimeLocal-7TMDJD4S.js} +20 -19
  12. package/{agentSlice-3ZHY7RAO.js → agentSlice-6IQRQZX3.js} +6 -6
  13. package/{appDeleteCommands-DJJF466K.js → appDeleteCommands-UUDIWLNE.js} +24 -23
  14. package/{appDeployCommands-WJZGIOEZ.js → appDeployCommands-CO6SZ7YP.js} +24 -23
  15. package/{appDeployStatusCommands-ICYXUJNO.js → appDeployStatusCommands-QEVKVECJ.js} +24 -23
  16. package/{appGetCommands-UOCWYJPV.js → appGetCommands-3YSCCLK4.js} +24 -23
  17. package/{appListCommands-EOKWTXPW.js → appListCommands-FBJAFZKK.js} +24 -23
  18. package/{authCommand-H5KE7K7K.js → authCommand-3ADNCFKD.js} +5 -5
  19. package/{chunk-G6VITLCZ.js → chunk-2CYGIPJH.js} +2 -2
  20. package/{chunk-UTQZ73QQ.js → chunk-2HQ4OG6N.js} +1 -1
  21. package/{chunk-ZFTCLBEX.js → chunk-2IJAKBK2.js} +3 -1
  22. package/{chunk-DI6MXJK5.js → chunk-2SOQY5L6.js} +16 -14
  23. package/{chunk-Q24P6TUS.js → chunk-43EPBPZ2.js} +1 -1
  24. package/{chunk-GAGUBI42.js → chunk-4F77PJBR.js} +5 -5
  25. package/{chunk-R5V5G73M.js → chunk-5RDLGLAP.js} +0 -1
  26. package/{chunk-FS5TTXPS.js → chunk-6JH2DF7J.js} +3 -3
  27. package/{chunk-HI7QZNWX.js → chunk-ARPAHODF.js} +4 -4
  28. package/{chunk-IZ3CBMD5.js → chunk-ATK5WJOA.js} +4 -4
  29. package/{chunk-2XM5KUNE.js → chunk-BIPRFBC2.js} +2 -2
  30. package/{chunk-OYK7PA5U.js → chunk-CYRMUTGB.js} +6 -6
  31. package/{chunk-T3Y5EMJS.js → chunk-EBNSAABL.js} +1 -1
  32. package/{chunk-CV6I4HBA.js → chunk-EDWM6D6L.js} +1 -1
  33. package/{chunk-VSTUQGLT.js → chunk-EIQDGAAE.js} +147 -1
  34. package/{chunk-G5JHHUAK.js → chunk-F3MP7CP6.js} +1 -1
  35. package/{chunk-446VANPP.js → chunk-G5GVZAXF.js} +4 -4
  36. package/{chunk-UKC5HU2C.js → chunk-GKXS4F2I.js} +5 -5
  37. package/{chunk-66O5MZYH.js → chunk-GVPMJPCT.js} +1 -1
  38. package/{chunk-SWOTB2TX.js → chunk-IPSPETAL.js} +40 -33
  39. package/{chunk-TJYWZ3LO.js → chunk-J3LHGBNO.js} +2 -2
  40. package/{chunk-DKRT67FG.js → chunk-KGEVMUMI.js} +3 -3
  41. package/{chunk-A4JDTA5T.js → chunk-LAXMH7JY.js} +6 -6
  42. package/chunk-LEVCXTDN.js +5558 -0
  43. package/{chunk-3RIWR23B.js → chunk-N2IX3ZYK.js} +1 -1
  44. package/{chunk-W2YKDXT7.js → chunk-NZBH7FTB.js} +1 -1
  45. package/{chunk-7CD24PU4.js → chunk-OIW2RJ74.js} +5 -5
  46. package/{chunk-YWGSCF37.js → chunk-PACNSC37.js} +1 -1
  47. package/{chunk-56IUA7RU.js → chunk-PIC6Z7VI.js} +1 -1
  48. package/{chunk-MMCVBEAD.js → chunk-Q243PXRU.js} +25 -23
  49. package/{chunk-SZ5CBYMZ.js → chunk-QBOW6RZN.js} +2 -2
  50. package/{chunk-DCWBP2O7.js → chunk-R5Y4XELF.js} +10 -10
  51. package/{chunk-HLG6GAUD.js → chunk-RWJPDKPB.js} +1 -1
  52. package/{chunk-GVKTKT3O.js → chunk-S2BMRBR2.js} +3 -3
  53. package/{chunk-QLV2GKU5.js → chunk-T4X4GCYT.js} +7 -5
  54. package/{chunk-L3VQOVKK.js → chunk-TXVSNFHC.js} +3 -3
  55. package/{chunk-YLADSPDU.js → chunk-V54H24CQ.js} +2 -2
  56. package/{chunk-KW47OSRJ.js → chunk-VQ4QPCKE.js} +50 -70
  57. package/{chunk-KWKD3BCC.js → chunk-W3UDJJMA.js} +11 -11
  58. package/{chunk-XD5NQEOH.js → chunk-WTPC3XD4.js} +1 -1
  59. package/{chunk-MEUZFIAJ.js → chunk-XORE26Z4.js} +1 -1
  60. package/chunk-YLC42PIE.js +7889 -0
  61. package/{chunk-BOL2D2JW.js → chunk-ZJ2WITOO.js} +2 -2
  62. package/{chunk-DWQNDGO7.js → chunk-ZJH3LKEW.js} +2 -2
  63. package/{createAgentAutomationAction-3GMH6ORX.js → createAgentAutomationAction-EYNYY2LB.js} +12 -11
  64. package/{createDialogAction-R5MCL4RE.js → createDialogAction-OUIRWYZP.js} +13 -12
  65. package/{createPageAction-QYTG656R.js → createPageAction-2I5PHJFF.js} +12 -11
  66. package/{dbSlice-OBV7VFCF.js → dbSlice-BBL3PEVW.js} +5 -5
  67. package/{deleteFile-AC45HYSM.js → deleteFile-RJTEPOT4.js} +3 -3
  68. package/{dialogCommands-NUQGIXVZ.js → dialogCommands-5CL4QYQ7.js} +24 -23
  69. package/{dialogSlice-CFDECXEU.js → dialogSlice-EKKVFKBJ.js} +11 -11
  70. package/{docCreateCommands-UNFCXB5N.js → docCreateCommands-QHCLYGNW.js} +23 -22
  71. package/{docDeleteCommands-NG5IVKE5.js → docDeleteCommands-DS6KOU6N.js} +24 -23
  72. package/{docReadCommands-6J7MUUX6.js → docReadCommands-FRI5DAKH.js} +23 -22
  73. package/{docStore-MZZWJM4F.js → docStore-V7EJS4PX.js} +13 -12
  74. package/{docUpdateCommands-6AW3VZOX.js → docUpdateCommands-RQO5ZTXT.js} +23 -22
  75. package/{getPricing-XQYSSVV6.js → getPricing-67TQVKFV.js} +2 -2
  76. package/{handleSendMessageAction-IU2QNTLM.js → handleSendMessageAction-KCF7KII4.js} +11 -11
  77. package/index.js +58 -58
  78. package/{machineCommands-Z2QEWTHZ.js → machineCommands-IAGAKTHV.js} +32 -31
  79. package/{machineWsRunDispatch-SJTYHZHN.js → machineWsRunDispatch-JGKC2HEK.js} +32 -31
  80. package/package.json +1 -1
  81. package/{read-QK7ZRX6G.js → read-64OQDO3I.js} +3 -3
  82. package/{readDocTool-EYDMVRBL.js → readDocTool-MXM3T6PE.js} +1 -1
  83. package/{readlineWorkspace-EY3BPXIU.js → readlineWorkspace-5AQHHIBK.js} +94 -56
  84. package/{removeDialogAgentAction-TBW3UZJW.js → removeDialogAgentAction-NEKVAMSH.js} +7 -7
  85. package/{runAgentClientLoop-N3YDLTMS.js → runAgentClientLoop-6OGPS6SI.js} +25 -24
  86. package/{setDialogExtraReferencesAction-Q3ANF2NR.js → setDialogExtraReferencesAction-WTOHQDIV.js} +6 -6
  87. package/{setPrimaryDialogAgentAction-FQ5R3EFJ.js → setPrimaryDialogAgentAction-LDJOYC4F.js} +7 -7
  88. package/{settingSlice-JKKV2T7O.js → settingSlice-4M37TN7V.js} +6 -6
  89. package/{spaceCommands-R6AEQNLG.js → spaceCommands-VTDNKTSF.js} +207 -25
  90. package/{spaceSlice-MCH7RLLP.js → spaceSlice-LGUZMB7Y.js} +12 -11
  91. package/{streamAgentChatTurn-Q4U2CVMI.js → streamAgentChatTurn-TIGCZUNZ.js} +30 -28
  92. package/{switchDialogAgentAction-QQGVE4SL.js → switchDialogAgentAction-XVWGKR2Z.js} +5 -5
  93. package/{tableCommands-PRJNWN6Q.js → tableCommands-RJZ3V4TF.js} +1 -1
  94. package/{tools-Y3UBLLYW.js → tools-BQAOPYMR.js} +20 -19
  95. package/{tuiSummaryLlmCaller-4474IBTI.js → tuiSummaryLlmCaller-YQBN5IMG.js} +3 -3
  96. package/{updateDialogTitleAction-3J7GH67I.js → updateDialogTitleAction-E6HMEDPH.js} +15 -13
  97. package/chunk-THTAR67C.js +0 -16338
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  requireTokenUser
3
- } from "./chunk-SZ5CBYMZ.js";
3
+ } from "./chunk-QBOW6RZN.js";
4
4
  import {
5
5
  resolveServerUrl
6
6
  } from "./chunk-A7GB5UGH.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  i18n_default,
3
3
  toolRegistry
4
- } from "./chunk-SWOTB2TX.js";
4
+ } from "./chunk-IPSPETAL.js";
5
5
  import {
6
6
  isNoloHostedProvider
7
7
  } from "./chunk-CAENRKNJ.js";
@@ -7,20 +7,20 @@ import {
7
7
  import {
8
8
  clipMultilineText,
9
9
  fetchAndSerializeTable
10
- } from "./chunk-OYK7PA5U.js";
10
+ } from "./chunk-CYRMUTGB.js";
11
11
  import {
12
12
  slateToSimplifiedMarkdown
13
13
  } from "./chunk-SWYMCHM7.js";
14
14
  import {
15
15
  estimateTokenCount,
16
16
  fetchAndCacheMessages
17
- } from "./chunk-THTAR67C.js";
17
+ } from "./chunk-LEVCXTDN.js";
18
18
  import {
19
19
  createSpaceKey
20
- } from "./chunk-YLADSPDU.js";
20
+ } from "./chunk-V54H24CQ.js";
21
21
  import {
22
22
  read
23
- } from "./chunk-A4JDTA5T.js";
23
+ } from "./chunk-LAXMH7JY.js";
24
24
  import {
25
25
  asTrimmedLowercaseString
26
26
  } from "./chunk-QSJ3HFEF.js";
@@ -29,7 +29,7 @@ import {
29
29
  } from "./chunk-TOW4E763.js";
30
30
  import {
31
31
  getRuntimeServerContext
32
- } from "./chunk-ZFTCLBEX.js";
32
+ } from "./chunk-2IJAKBK2.js";
33
33
  import {
34
34
  extractCategorizedMentions
35
35
  } from "./chunk-VP4WJWKW.js";
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-CWMSB67P.js";
4
4
  import {
5
5
  getModelConfig
6
- } from "./chunk-VSTUQGLT.js";
6
+ } from "./chunk-EIQDGAAE.js";
7
7
  import {
8
8
  asOptionalFiniteNumber
9
9
  } from "./chunk-WWC7I6TA.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  buildLocalAgentLookupKeys,
3
3
  shouldReadAgentKeyRemotely
4
- } from "./chunk-66O5MZYH.js";
4
+ } from "./chunk-GVPMJPCT.js";
5
5
  import {
6
6
  resolveCliAgentKeyInput
7
7
  } from "./chunk-K6QEHQZ3.js";
@@ -4,7 +4,7 @@ import {
4
4
  refreshAntigravityOAuthToken,
5
5
  refreshOpenAiCodexToken,
6
6
  xaiRefresh
7
- } from "./chunk-T3Y5EMJS.js";
7
+ } from "./chunk-EBNSAABL.js";
8
8
  import {
9
9
  ackRunRecord,
10
10
  checkStaleRun,
@@ -26,7 +26,7 @@ import {
26
26
  } from "./chunk-WJRJDX2W.js";
27
27
  import {
28
28
  buildLocalAgentLookupKeys
29
- } from "./chunk-66O5MZYH.js";
29
+ } from "./chunk-GVPMJPCT.js";
30
30
  import {
31
31
  LOCAL_CODEX_AGENT_ID,
32
32
  LOCAL_CODEX_AGENT_KEY,
@@ -53,7 +53,7 @@ import {
53
53
  readOpenAiCompatibleSseCompletion,
54
54
  resolveAgentNextAvailableAt,
55
55
  resolveOpenAiCompatibleProviderConfig
56
- } from "./chunk-UKC5HU2C.js";
56
+ } from "./chunk-GKXS4F2I.js";
57
57
  import {
58
58
  buildPlatformChatCompletionRequest,
59
59
  canUsePlatformChatProvider,
@@ -63,7 +63,7 @@ import {
63
63
  readSseDataValues,
64
64
  resolvePlatformChatProviderConfig,
65
65
  shouldUsePlatformChatProvider
66
- } from "./chunk-MEUZFIAJ.js";
66
+ } from "./chunk-XORE26Z4.js";
67
67
  import {
68
68
  buildCliPrompt
69
69
  } from "./chunk-ATNTHIZI.js";
@@ -73,25 +73,25 @@ import {
73
73
  import {
74
74
  inlineImageUrlsForCustomProvider,
75
75
  prepareTools
76
- } from "./chunk-W2YKDXT7.js";
76
+ } from "./chunk-NZBH7FTB.js";
77
77
  import {
78
78
  inferCaptureIntent,
79
79
  resolveHistoricalToolContentCap,
80
80
  summarizeToolArguments
81
- } from "./chunk-KW47OSRJ.js";
81
+ } from "./chunk-VQ4QPCKE.js";
82
82
  import {
83
83
  getAntigravityUserAgent,
84
84
  isAntigravityOAuthAgent,
85
85
  readAntigravityProjectId,
86
86
  resolveAntigravityCloudCodeBaseUrl
87
- } from "./chunk-TJYWZ3LO.js";
87
+ } from "./chunk-J3LHGBNO.js";
88
88
  import {
89
89
  convertMessagesToResponsesInput,
90
90
  toResponsesTools
91
91
  } from "./chunk-D34RI6NI.js";
92
92
  import {
93
93
  resolvePlatformAuthToken
94
- } from "./chunk-XD5NQEOH.js";
94
+ } from "./chunk-WTPC3XD4.js";
95
95
  import {
96
96
  buildDialogFallbackTitleFromUserInput,
97
97
  normalizeDialogTitle
@@ -103,7 +103,7 @@ import {
103
103
  readXhsProfileFunctionSchema,
104
104
  rememberMemoryFunctionSchema,
105
105
  setTodoListFunc
106
- } from "./chunk-SWOTB2TX.js";
106
+ } from "./chunk-IPSPETAL.js";
107
107
  import {
108
108
  createDrainExhaustedResponse,
109
109
  isCoreDrainingBody,
@@ -127,13 +127,13 @@ import {
127
127
  parseNoloWorkspaceToolArguments,
128
128
  resolveAgentRequiredPackIds,
129
129
  resolveRuntimeToolSurfaceForAgent
130
- } from "./chunk-OYK7PA5U.js";
130
+ } from "./chunk-CYRMUTGB.js";
131
131
  import {
132
132
  applyTokenUsageToDayStats,
133
133
  prepareTokenUsageData,
134
134
  resolveBuiltinPlatformAgentConfig,
135
135
  runKeyed
136
- } from "./chunk-THTAR67C.js";
136
+ } from "./chunk-LEVCXTDN.js";
137
137
  import {
138
138
  BUILTIN_TITLE_LLM_CONFIG,
139
139
  clipCompactText
@@ -144,7 +144,7 @@ import {
144
144
  resolveCurrentRunRuntimeToolPolicy,
145
145
  resolveLocalWorkspaceExecutorOptionsFromPolicy,
146
146
  resolveRequestedRuntimeToolNames
147
- } from "./chunk-GAGUBI42.js";
147
+ } from "./chunk-4F77PJBR.js";
148
148
  import {
149
149
  createOAuthTokenStore,
150
150
  isTokenExpired,
@@ -162,7 +162,7 @@ import {
162
162
  } from "./chunk-DWLEOOGR.js";
163
163
  import {
164
164
  isAdaptiveThinkingModelId
165
- } from "./chunk-VSTUQGLT.js";
165
+ } from "./chunk-EIQDGAAE.js";
166
166
  import {
167
167
  isCompiledBinary,
168
168
  parseUserIdFromAuthToken
@@ -175,7 +175,7 @@ import {
175
175
  } from "./chunk-QSJ3HFEF.js";
176
176
  import {
177
177
  isSystemBuiltinTrustedAgentKey
178
- } from "./chunk-DWQNDGO7.js";
178
+ } from "./chunk-ZJH3LKEW.js";
179
179
  import {
180
180
  NOLO_CLUSTER_SERVERS
181
181
  } from "./chunk-LCBAMY2M.js";
@@ -3091,7 +3091,7 @@ function extractInlineDataParts(content) {
3091
3091
  function convertOpenAiMessagesToGemini(messages, options) {
3092
3092
  const contents = [];
3093
3093
  const systemTexts = [];
3094
- const toolNamesById = /* @__PURE__ */ new Map();
3094
+ let toolCallIndex = 0;
3095
3095
  let pendingFunctionCalls = [];
3096
3096
  const pushOrMergeContent = (role, parts) => {
3097
3097
  if (parts.length === 0) return;
@@ -3105,8 +3105,12 @@ function convertOpenAiMessagesToGemini(messages, options) {
3105
3105
  const flushPendingFunctionCalls = () => {
3106
3106
  if (pendingFunctionCalls.length === 0) return;
3107
3107
  const dummyResponses = pendingFunctionCalls.map(
3108
- ({ name }) => ({
3109
- functionResponse: { name, response: { output: "{}" } }
3108
+ ({ name, id }) => ({
3109
+ functionResponse: {
3110
+ name,
3111
+ response: { output: "{}" },
3112
+ ...id ? { id } : {}
3113
+ }
3110
3114
  })
3111
3115
  );
3112
3116
  pendingFunctionCalls = [];
@@ -3144,16 +3148,14 @@ function convertOpenAiMessagesToGemini(messages, options) {
3144
3148
  content
3145
3149
  );
3146
3150
  const toolCalls = "tool_calls" in raw && Array.isArray(raw.tool_calls) ? raw.tool_calls ?? [] : [];
3147
- if (text) pushOrMergeContent("model", [{ text }]);
3148
- if (toolCalls.length > 0 && contents.length > 0 && contents[contents.length - 1]?.role !== "user") {
3149
- contents.push({ role: "user", parts: [{ text: "" }] });
3150
- }
3151
3151
  const parts = [];
3152
+ if (text) {
3153
+ parts.push({ text });
3154
+ }
3152
3155
  for (const call of toolCalls) {
3153
3156
  const name = call?.function?.name?.trim();
3154
3157
  if (!name) continue;
3155
- const id = call.id?.trim() || `${name}_${toolNamesById.size}`;
3156
- toolNamesById.set(id, name);
3158
+ const id = call.id?.trim() || `${name}_${toolCallIndex++}`;
3157
3159
  pendingFunctionCalls.push({ name, id });
3158
3160
  const realSignature = typeof call.thought_signature === "string" && call.thought_signature ? call.thought_signature : void 0;
3159
3161
  const isFirstFunctionCallPart = !parts.some(
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  readDbRecord,
3
3
  writeAgentRecord
4
- } from "./chunk-56IUA7RU.js";
4
+ } from "./chunk-PIC6Z7VI.js";
5
5
  import {
6
6
  createSpaceKey
7
- } from "./chunk-YLADSPDU.js";
7
+ } from "./chunk-V54H24CQ.js";
8
8
  import {
9
9
  buildSkillSummaryMarker
10
10
  } from "./chunk-VF4K2QE6.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  ANTIGRAVITY_CLOUD_CODE_BASE_URL,
3
3
  isAntigravityOAuthAgent
4
- } from "./chunk-TJYWZ3LO.js";
4
+ } from "./chunk-J3LHGBNO.js";
5
5
  import {
6
6
  buildCurrentTimeBlock,
7
7
  buildIdentityBlock,
@@ -9,7 +9,7 @@ import {
9
9
  requiresBareImageUrl,
10
10
  resolveToolGuidedSections,
11
11
  toBareImageUrlMessages
12
- } from "./chunk-7CD24PU4.js";
12
+ } from "./chunk-OIW2RJ74.js";
13
13
  import {
14
14
  convertMessagesToResponsesInput,
15
15
  preserveAgentStateFields
@@ -19,14 +19,14 @@ import {
19
19
  isOpenAiResponsesModel,
20
20
  resolvePlatformChatCompletionsEndpoint,
21
21
  resolvePlatformResponsesEndpoint
22
- } from "./chunk-XD5NQEOH.js";
22
+ } from "./chunk-WTPC3XD4.js";
23
23
  import {
24
24
  MEMORY_USE_GUIDANCE,
25
25
  wrapHistoricalSummaryWithReplayGuard
26
26
  } from "./chunk-4PWB7JRR.js";
27
27
  import {
28
28
  waitForAbortableDelay
29
- } from "./chunk-SWOTB2TX.js";
29
+ } from "./chunk-IPSPETAL.js";
30
30
  import {
31
31
  createDrainExhaustedResponse,
32
32
  isCoreDrainingBody,
@@ -36,15 +36,15 @@ import {
36
36
  } from "./chunk-Z5MXSEOJ.js";
37
37
  import {
38
38
  resolveBuiltinSkillPage
39
- } from "./chunk-OYK7PA5U.js";
39
+ } from "./chunk-CYRMUTGB.js";
40
40
  import {
41
41
  estimateTokenCount,
42
42
  shouldUseServerProxy
43
- } from "./chunk-THTAR67C.js";
43
+ } from "./chunk-LEVCXTDN.js";
44
44
  import {
45
45
  createFileCredentialBroker,
46
46
  fetchServerSyncedCredential
47
- } from "./chunk-GAGUBI42.js";
47
+ } from "./chunk-4F77PJBR.js";
48
48
  import {
49
49
  toErrorMessage
50
50
  } from "./chunk-HNMXYYJR.js";
@@ -52,7 +52,7 @@ import {
52
52
  clampReasoningEffort,
53
53
  getModelConfig,
54
54
  isModelSupportReasoningEffort
55
- } from "./chunk-VSTUQGLT.js";
55
+ } from "./chunk-EIQDGAAE.js";
56
56
  import {
57
57
  isDeepInfraKimiModel,
58
58
  isFireworksKimiModel,
@@ -60,13 +60,13 @@ import {
60
60
  } from "./chunk-CAENRKNJ.js";
61
61
  import {
62
62
  read
63
- } from "./chunk-A4JDTA5T.js";
63
+ } from "./chunk-LAXMH7JY.js";
64
64
  import {
65
65
  asTrimmedLowercaseString
66
66
  } from "./chunk-QSJ3HFEF.js";
67
67
  import {
68
68
  isAbortError
69
- } from "./chunk-R5V5G73M.js";
69
+ } from "./chunk-5RDLGLAP.js";
70
70
  import {
71
71
  API_ENDPOINTS
72
72
  } from "./chunk-LCBAMY2M.js";
@@ -2,7 +2,7 @@ import {
2
2
  deleteDbRecord,
3
3
  queryUserRecords,
4
4
  readDbRecord
5
- } from "./chunk-56IUA7RU.js";
5
+ } from "./chunk-PIC6Z7VI.js";
6
6
  import {
7
7
  mergeAndDedupUserData
8
8
  } from "./chunk-KQHGZWSV.js";
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  listUserRecordsFromServers,
3
3
  readLiveDbRecordAfterTombstoneMerge
4
- } from "./chunk-HLG6GAUD.js";
4
+ } from "./chunk-RWJPDKPB.js";
5
5
  import {
6
6
  agentRecordHasConfiguredCredential
7
- } from "./chunk-56IUA7RU.js";
7
+ } from "./chunk-PIC6Z7VI.js";
8
8
  import {
9
9
  toSafeAgentSummary
10
- } from "./chunk-UTQZ73QQ.js";
10
+ } from "./chunk-2HQ4OG6N.js";
11
11
  import {
12
12
  PUBLIC_AGENT_KEY_PREFIX,
13
13
  isOwnedAgentKey,
@@ -2,11 +2,13 @@ import {
2
2
  buildBuiltinObjectSkillReference
3
3
  } from "./chunk-DCDL3GC4.js";
4
4
  import {
5
- addContentToSpace,
5
+ addContentToSpace
6
+ } from "./chunk-YLC42PIE.js";
7
+ import {
6
8
  prepareAndPersistMessage,
7
9
  uiAskChoiceFunc,
8
10
  uiAskChoiceFunctionSchema
9
- } from "./chunk-THTAR67C.js";
11
+ } from "./chunk-LEVCXTDN.js";
10
12
  import {
11
13
  require_date_fns
12
14
  } from "./chunk-M76ECQRD.js";
@@ -21,16 +23,16 @@ import {
21
23
  removeCachedEntity,
22
24
  upsertSSREntity,
23
25
  write
24
- } from "./chunk-A4JDTA5T.js";
26
+ } from "./chunk-LAXMH7JY.js";
25
27
  import {
26
28
  extractCustomId
27
29
  } from "./chunk-TOW4E763.js";
28
30
  import {
29
31
  selectIdentityUserId
30
- } from "./chunk-ZFTCLBEX.js";
32
+ } from "./chunk-2IJAKBK2.js";
31
33
  import {
32
34
  isDevelopment
33
- } from "./chunk-R5V5G73M.js";
35
+ } from "./chunk-5RDLGLAP.js";
34
36
  import {
35
37
  createAgentKey,
36
38
  createDialogKey,
@@ -7,11 +7,11 @@ import {
7
7
  listUserRecordsFromServers,
8
8
  readDbRecordFromServers,
9
9
  readLiveDbRecordAfterTombstoneMerge
10
- } from "./chunk-HLG6GAUD.js";
10
+ } from "./chunk-RWJPDKPB.js";
11
11
  import {
12
12
  buildDialogAttachmentPlan,
13
13
  extractFileContentIds
14
- } from "./chunk-THTAR67C.js";
14
+ } from "./chunk-LEVCXTDN.js";
15
15
  import {
16
16
  toErrorMessage
17
17
  } from "./chunk-HNMXYYJR.js";
@@ -25,7 +25,7 @@ import {
25
25
  } from "./chunk-A7GB5UGH.js";
26
26
  import {
27
27
  parsePositiveFiniteNumberOrFallback
28
- } from "./chunk-446VANPP.js";
28
+ } from "./chunk-G5GVZAXF.js";
29
29
  import {
30
30
  asRecordOrEmpty
31
31
  } from "./chunk-KX6YBIHG.js";
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  patch,
3
3
  read
4
- } from "./chunk-A4JDTA5T.js";
4
+ } from "./chunk-LAXMH7JY.js";
5
5
  import {
6
6
  DEVICE_LOCAL_OWNER_ID,
7
7
  isDeviceLocalSpaceBody,
8
8
  selectIdentityUserId
9
- } from "./chunk-ZFTCLBEX.js";
9
+ } from "./chunk-2IJAKBK2.js";
10
10
 
11
11
  // packages/create/space/spaceKeys.ts
12
12
  var SEPARATOR = "-";
@@ -9,15 +9,15 @@ import {
9
9
  buildRuntimeGuidanceBlocks,
10
10
  fetchReferenceContents,
11
11
  resolveToolGuidedSections
12
- } from "./chunk-7CD24PU4.js";
12
+ } from "./chunk-OIW2RJ74.js";
13
13
  import {
14
14
  getAllToolRuns,
15
15
  resolveAgentRecommendedSkillNames,
16
16
  resolveAgentRequiredPackIds
17
- } from "./chunk-OYK7PA5U.js";
17
+ } from "./chunk-CYRMUTGB.js";
18
18
  import {
19
19
  getDocState
20
- } from "./chunk-FS5TTXPS.js";
20
+ } from "./chunk-6JH2DF7J.js";
21
21
  import {
22
22
  resolveToolBaseUrl
23
23
  } from "./chunk-44HACRCK.js";
@@ -26,7 +26,12 @@ import {
26
26
  getModelPricing,
27
27
  getPrices,
28
28
  hasExplicitAgentPricing
29
- } from "./chunk-YWGSCF37.js";
29
+ } from "./chunk-PACNSC37.js";
30
+ import {
31
+ selectCurrentTable,
32
+ selectTableRows,
33
+ selectViewMode
34
+ } from "./chunk-YLC42PIE.js";
30
35
  import {
31
36
  PERSONALIZATION_DIALOG_CATEGORY,
32
37
  buildPersonalizationDialogPolicyContext,
@@ -37,12 +42,8 @@ import {
37
42
  planContextUsage,
38
43
  resolveBuiltinPlatformAgentConfig,
39
44
  selectAllMsgs,
40
- selectCurrentTable,
41
- selectCurrentUserBalance,
42
- selectTableRows,
43
- selectViewMode,
44
45
  serializeMessageContent
45
- } from "./chunk-THTAR67C.js";
46
+ } from "./chunk-LEVCXTDN.js";
46
47
  import {
47
48
  clipCompactText
48
49
  } from "./chunk-OB6FBSH3.js";
@@ -56,7 +57,7 @@ import {
56
57
  findModelConfig,
57
58
  getModelConfig,
58
59
  getProviderByModelName
59
- } from "./chunk-VSTUQGLT.js";
60
+ } from "./chunk-EIQDGAAE.js";
60
61
  import {
61
62
  PLATFORM_HOSTED_QWEN_37_FLASH_MODEL
62
63
  } from "./chunk-CAENRKNJ.js";
@@ -68,26 +69,27 @@ import {
68
69
  selectKnowledgeCaptureLevel,
69
70
  selectSpaceContextLevel,
70
71
  selectUserTonePreset
71
- } from "./chunk-446VANPP.js";
72
+ } from "./chunk-G5GVZAXF.js";
72
73
  import {
73
74
  asRecordOrEmpty
74
75
  } from "./chunk-KX6YBIHG.js";
75
76
  import {
76
77
  read,
77
78
  selectById
78
- } from "./chunk-A4JDTA5T.js";
79
+ } from "./chunk-LAXMH7JY.js";
79
80
  import {
80
81
  asTrimmedLowercaseString
81
82
  } from "./chunk-QSJ3HFEF.js";
82
83
  import {
83
84
  PUBLIC_QWEN_37_FLASH_AGENT_KEY
84
- } from "./chunk-DWQNDGO7.js";
85
+ } from "./chunk-ZJH3LKEW.js";
85
86
  import {
86
87
  extractCustomId
87
88
  } from "./chunk-TOW4E763.js";
88
89
  import {
90
+ selectIdentityUserBalance,
89
91
  selectIdentityUserId
90
- } from "./chunk-ZFTCLBEX.js";
92
+ } from "./chunk-2IJAKBK2.js";
91
93
  import {
92
94
  isRecord
93
95
  } from "./chunk-KUG52IAP.js";
@@ -858,11 +860,6 @@ var buildEditingContextSummary = (state, runtimeOptions) => {
858
860
  };
859
861
 
860
862
  // packages/ai/llm/agentCapabilities.ts
861
- var isCustomAgent = (agent) => {
862
- const apiSource = agent.apiSource?.toLowerCase();
863
- const provider = agent.provider?.toLowerCase();
864
- return apiSource === "custom" || provider === "custom";
865
- };
866
863
  var ANTIGRAVITY_EFFORT_SUFFIXES = [
867
864
  "-tiered",
868
865
  "-extra-low",
@@ -893,21 +890,21 @@ var lookupKnownModelVision = (provider, model) => {
893
890
  const strippedPreview = stripPreviewSuffix(model);
894
891
  if (strippedPreview !== model) candidates.push(strippedPreview);
895
892
  for (const candidate of candidates) {
896
- if (provider) {
893
+ if (provider && provider !== "custom") {
897
894
  const direct = findModelConfig(provider, candidate);
898
- if (direct) return direct.hasVision;
895
+ if (direct && typeof direct.hasVision === "boolean") return direct.hasVision;
899
896
  }
900
897
  const detected = getProviderByModelName(candidate);
901
898
  if (detected) {
902
899
  const found = findModelConfig(detected, candidate)?.hasVision;
903
900
  if (found !== void 0) return found;
904
901
  }
905
- if (!provider && candidate.includes("/")) {
902
+ if (candidate.includes("/")) {
906
903
  const slash = candidate.indexOf("/");
907
904
  const modelProvider = candidate.slice(0, slash).toLowerCase();
908
905
  const modelName = candidate.slice(slash + 1);
909
906
  const nested = findModelConfig(modelProvider, modelName);
910
- if (nested) return nested.hasVision;
907
+ if (nested && typeof nested.hasVision === "boolean") return nested.hasVision;
911
908
  }
912
909
  }
913
910
  return void 0;
@@ -916,18 +913,13 @@ var resolveAgentImageInputSupport = (agent) => {
916
913
  if (!agent) return true;
917
914
  const provider = asTrimmedLowercaseString(agent.provider) || null;
918
915
  const model = asOptionalTrimmedString(agent.model) ?? "";
919
- const custom = isCustomAgent(agent);
920
916
  const catalogHasVision = lookupKnownModelVision(
921
- custom ? null : provider,
917
+ provider,
922
918
  model
923
919
  );
924
- if (!custom && catalogHasVision !== void 0) {
920
+ if (catalogHasVision !== void 0) {
925
921
  return catalogHasVision;
926
922
  }
927
- if (custom) {
928
- if (catalogHasVision === true) return true;
929
- return true;
930
- }
931
923
  if (typeof agent.hasVision === "boolean") {
932
924
  return agent.hasVision;
933
925
  }
@@ -1219,7 +1211,7 @@ ${content}
1219
1211
  return output;
1220
1212
  };
1221
1213
  var validateAccessAndBalance = (agentConfig, state) => {
1222
- const userBalance = selectCurrentUserBalance(state);
1214
+ const userBalance = selectIdentityUserBalance(state);
1223
1215
  const currentUserId = selectIdentityUserId(state);
1224
1216
  const isCustomApi = agentConfig.apiSource === "custom";
1225
1217
  const isCliApi = agentConfig.apiSource === "cli";
@@ -2887,13 +2879,35 @@ async function runLocalAgentTurn(input) {
2887
2879
  input: input.input,
2888
2880
  contextReferenceResolver: input.adapter.host === "cli" ? input.contextReferenceResolver : void 0
2889
2881
  });
2890
- const messages = builtMessages.messages;
2882
+ let messages = builtMessages.messages;
2891
2883
  const supportsImages = resolveAgentImageInputSupport({
2892
2884
  apiSource: agentConfig.apiSource,
2893
2885
  provider: agentConfig.provider,
2894
2886
  model: agentConfig.model,
2895
2887
  hasVision: agentConfig.hasVision
2896
2888
  });
2889
+ if (!supportsImages && hasImageInRuntimeMessages(messages)) {
2890
+ const imageUrls = extractImageUrlsFromMessages(messages);
2891
+ const preprocessed = await preprocessImagesForTextOnlyAgent(
2892
+ messages,
2893
+ (urls) => describeImageWithLocalProvider(input.adapter, urls)
2894
+ );
2895
+ if (preprocessed !== messages) {
2896
+ messages = preprocessed;
2897
+ emitLoopEvent(input, {
2898
+ kind: "image-preprocessed",
2899
+ atMs: Date.now(),
2900
+ imageCount: imageUrls.length
2901
+ });
2902
+ } else {
2903
+ messages = filterImagePartsFromMessages(messages, false);
2904
+ emitLoopEvent(input, {
2905
+ kind: "image-downgraded",
2906
+ reason: "no-vision",
2907
+ atMs: Date.now()
2908
+ });
2909
+ }
2910
+ }
2897
2911
  const userInputText = extractUserInputText(input.input);
2898
2912
  let toolCallCount = 0;
2899
2913
  let result;
@@ -2904,7 +2918,6 @@ async function runLocalAgentTurn(input) {
2904
2918
  let round = 0;
2905
2919
  let emptyAssistantRepairPending = false;
2906
2920
  let emptyAssistantRepairUsed = false;
2907
- let imageDowngradeNotified = false;
2908
2921
  let skipFinalAppend = false;
2909
2922
  let partialContent = "";
2910
2923
  try {
@@ -2913,43 +2926,10 @@ async function runLocalAgentTurn(input) {
2913
2926
  partialContent = "";
2914
2927
  throwIfAborted(input);
2915
2928
  const preparedMessages = prepareMessagesForProviderCall(messages);
2916
- let baseRequestMessages;
2917
- if (!supportsImages && hasImageInRuntimeMessages(preparedMessages.messages)) {
2918
- const imageUrls = extractImageUrlsFromMessages(preparedMessages.messages);
2919
- const preprocessed = await preprocessImagesForTextOnlyAgent(
2920
- preparedMessages.messages,
2921
- (urls) => describeImageWithLocalProvider(input.adapter, urls)
2922
- );
2923
- if (preprocessed !== preparedMessages.messages) {
2924
- baseRequestMessages = preprocessed;
2925
- if (!imageDowngradeNotified) {
2926
- imageDowngradeNotified = true;
2927
- emitLoopEvent(input, {
2928
- kind: "image-preprocessed",
2929
- atMs: Date.now(),
2930
- imageCount: imageUrls.length
2931
- });
2932
- }
2933
- } else {
2934
- baseRequestMessages = filterImagePartsFromMessages(
2935
- preparedMessages.messages,
2936
- supportsImages
2937
- );
2938
- if (!imageDowngradeNotified) {
2939
- imageDowngradeNotified = true;
2940
- emitLoopEvent(input, {
2941
- kind: "image-downgraded",
2942
- reason: "no-vision",
2943
- atMs: Date.now()
2944
- });
2945
- }
2946
- }
2947
- } else {
2948
- baseRequestMessages = filterImagePartsFromMessages(
2949
- preparedMessages.messages,
2950
- supportsImages
2951
- );
2952
- }
2929
+ const baseRequestMessages = filterImagePartsFromMessages(
2930
+ preparedMessages.messages,
2931
+ supportsImages
2932
+ );
2953
2933
  const requestMessages = emptyAssistantRepairPending ? [...baseRequestMessages, { role: "user", content: EMPTY_ASSISTANT_REPAIR_PROMPT }] : baseRequestMessages;
2954
2934
  const contextMetrics = {
2955
2935
  ...preparedMessages.metrics,