nolo-cli 0.171.0-alpha.1 → 0.172.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. package/{_executeModel-YJW2HPFY.js → _executeModel-PVY4AXG4.js} +18 -18
  2. package/{agentDeleteCommand-O3EG3HS4.js → agentDeleteCommand-QYNICESQ.js} +20 -19
  3. package/{agentEmailCommands-AIWZNMRW.js → agentEmailCommands-QEJHRESH.js} +22 -21
  4. package/{agentListCommands-377PQ6K4.js → agentListCommands-MGMBNFAS.js} +14 -13
  5. package/{agentMachineCommands-TYL7KKSL.js → agentMachineCommands-SKOAHGVC.js} +11 -10
  6. package/{agentRecordCommands-YPRND72K.js → agentRecordCommands-2NVWBDQN.js} +21 -20
  7. package/{agentRunCommand-T7AQKKH5.js → agentRunCommand-2LHV37FZ.js} +22 -21
  8. package/{agentRuntimeLocal-7ZE2ZQAL.js → agentRuntimeLocal-K3777H5R.js} +10 -9
  9. package/{agentSlice-BHH2DZKN.js → agentSlice-QMOFHPJR.js} +1 -1
  10. package/{appDeleteCommands-LHOX4HM3.js → appDeleteCommands-3HZNWZ2V.js} +10 -9
  11. package/{appDeployCommands-A6CQQTI3.js → appDeployCommands-Q5BIBQE2.js} +10 -9
  12. package/{appDeployStatusCommands-7TTNQODL.js → appDeployStatusCommands-ZZFFVM3W.js} +10 -9
  13. package/{appGetCommands-22F4E37N.js → appGetCommands-7AAOXZQK.js} +10 -9
  14. package/{appListCommands-WCDOJUVV.js → appListCommands-H76IX2X5.js} +10 -9
  15. package/{chunk-Q7UPF643.js → chunk-2FAQDT6E.js} +1 -1
  16. package/chunk-2WZXXAQD.js +57 -0
  17. package/{chunk-BJWOOJX5.js → chunk-3XUE7WJA.js} +27 -23
  18. package/{chunk-7MBN2JZ5.js → chunk-54YLFF7P.js} +3 -3
  19. package/{chunk-CEYUVQYU.js → chunk-7OQ7IDU3.js} +13 -11
  20. package/{chunk-O3FUFEUI.js → chunk-7TBARDLF.js} +1 -46
  21. package/{chunk-SC5TDLTP.js → chunk-BE42X662.js} +4 -4
  22. package/{chunk-XHR22EKE.js → chunk-BKCR2JHG.js} +48 -3
  23. package/{chunk-EPMWJ7X7.js → chunk-CFLYUFMA.js} +8 -8
  24. package/{chunk-MIME4XKU.js → chunk-DNQ55DHN.js} +11 -11
  25. package/{chunk-X2Q5GT5J.js → chunk-EK3LIELB.js} +2 -2
  26. package/{chunk-AUGBRK3P.js → chunk-HBUKJB3W.js} +9 -2
  27. package/{chunk-JHXY4H3P.js → chunk-I33CJERI.js} +2 -57
  28. package/{chunk-K2NTGYVK.js → chunk-ISMHFI2Y.js} +1 -1
  29. package/{chunk-UPC23AAN.js → chunk-JCILHZJZ.js} +4 -4
  30. package/{chunk-AGAB26VE.js → chunk-JIGBVOHH.js} +10 -10
  31. package/{chunk-C2OYZYJ7.js → chunk-KUA3PPFK.js} +3 -3
  32. package/{chunk-6OYC7NDH.js → chunk-ME7N4YHG.js} +44 -55
  33. package/{chunk-P4V35AFD.js → chunk-MOOQN57G.js} +2 -2
  34. package/{chunk-BQSW7453.js → chunk-MTAWQNSU.js} +1 -1
  35. package/{chunk-22FIHMYU.js → chunk-PPR6G2U2.js} +2 -2
  36. package/{chunk-7L2HZQNN.js → chunk-SHPY7A3P.js} +101 -2
  37. package/{chunk-7CDMXZJA.js → chunk-TI7ZIWYR.js} +3 -3
  38. package/{chunk-ZJ66I757.js → chunk-UMVEB5QT.js} +9 -9
  39. package/{chunk-DWQD3JTX.js → chunk-UU4TLYRZ.js} +1 -1
  40. package/{chunk-WPOSH6PA.js → chunk-VAQ3EGPC.js} +2 -2
  41. package/{chunk-6OC2YMGH.js → chunk-XBJIESNS.js} +1 -1
  42. package/{chunk-UIVOLTFM.js → chunk-XUZQCRSA.js} +2 -2
  43. package/{chunk-72T5DXRH.js → chunk-YEOFTC2H.js} +8 -2
  44. package/{commandRegistry-EAPXP4BC.js → commandRegistry-D3V6AB3G.js} +40 -40
  45. package/{contentThunks-SJAKJV4V.js → contentThunks-P2GNXUKN.js} +6 -6
  46. package/{createAgentAutomationAction-IBSAZBSP.js → createAgentAutomationAction-PQA43W2W.js} +6 -6
  47. package/{createDialogAction-MQDTLASD.js → createDialogAction-ITOZ5TAM.js} +7 -7
  48. package/{createPageAction-EOPBBQMH.js → createPageAction-IKB3LOMU.js} +6 -6
  49. package/{dialogCommands-SV4M5HAV.js → dialogCommands-IZAQB6GY.js} +10 -9
  50. package/{dialogSlice-6CC3YDDL.js → dialogSlice-Y6WIZWTC.js} +5 -5
  51. package/{docCreateCommands-UC2CPMH7.js → docCreateCommands-U25MRSOL.js} +10 -9
  52. package/{docDeleteCommands-SRPTGMZ2.js → docDeleteCommands-F46A6FJZ.js} +10 -9
  53. package/{docReadCommands-U3TDUPOY.js → docReadCommands-DITPVWA3.js} +10 -9
  54. package/{docStore-RSBDE3UH.js → docStore-HRNZKKVS.js} +1 -1
  55. package/{docUpdateCommands-G5J5UKGP.js → docUpdateCommands-O447KO7Z.js} +10 -9
  56. package/{handleSendMessageAction-EM43KNSP.js → handleSendMessageAction-4OVVUVJ4.js} +13 -12
  57. package/index.js +4 -4
  58. package/{localRuntimeAdapter-N5WDXYSY.js → localRuntimeAdapter-CL3QW3OJ.js} +20 -19
  59. package/{machineCommands-L34XTTLG.js → machineCommands-T3VQCFHT.js} +21 -20
  60. package/{machineWsRunDispatch-IKI7FGKI.js → machineWsRunDispatch-IGX4UK4C.js} +21 -20
  61. package/package.json +1 -1
  62. package/{readlineWorkspace-ZANIHEDR.js → readlineWorkspace-3IZBF57U.js} +23 -22
  63. package/{runAgentClientLoop-HPF2WFFQ.js → runAgentClientLoop-RUBF4JIP.js} +16 -16
  64. package/{spaceCommands-6KPBWGGE.js → spaceCommands-FSATGIKW.js} +10 -9
  65. package/{streamAgentChatTurn-3SNWCCK2.js → streamAgentChatTurn-N7UJ6FFK.js} +23 -22
  66. package/{tools-7SMCO2GW.js → tools-Z7EJ6KIM.js} +11 -11
  67. package/{tuiSummaryLlmCaller-H6WX54WY.js → tuiSummaryLlmCaller-ZETARZOH.js} +10 -4
  68. package/{updateDialogTitleAction-XIMLNROU.js → updateDialogTitleAction-CEFNJE4T.js} +6 -6
@@ -4,7 +4,7 @@ import {
4
4
  import {
5
5
  getModelContextWindow,
6
6
  normalizeTimingMs
7
- } from "./chunk-XHR22EKE.js";
7
+ } from "./chunk-BKCR2JHG.js";
8
8
  import {
9
9
  BUILTIN_NOLO_AGENT_KEY
10
10
  } from "./chunk-LOEO7LRC.js";
@@ -28,49 +28,6 @@ import {
28
28
  import {
29
29
  asOptionalTrimmedString
30
30
  } from "./chunk-G3SUCT4W.js";
31
- import {
32
- asTrimmedLowercaseString
33
- } from "./chunk-QSJ3HFEF.js";
34
-
35
- // packages/agent-runtime/serverProxyPolicy.ts
36
- var OAUTH_APIKEY_REFS = /* @__PURE__ */ new Set([
37
- "antigravity",
38
- "xai",
39
- "chatgpt",
40
- "claude",
41
- "cursor"
42
- ]);
43
- function isGoogleFamilyProvider(provider) {
44
- const normalized = asTrimmedLowercaseString(provider);
45
- return normalized === "google" || normalized.startsWith("google-");
46
- }
47
- function isOAuthApiKeyRef(value) {
48
- const ref = asTrimmedLowercaseString(value);
49
- return ref.length > 0 && OAUTH_APIKEY_REFS.has(ref);
50
- }
51
- function shouldUseServerProxy(agentConfig, requestProvider) {
52
- const effectiveProvider = (requestProvider || agentConfig.provider || "").toLowerCase();
53
- if (isGoogleFamilyProvider(effectiveProvider)) {
54
- return true;
55
- }
56
- if (isOAuthApiKeyRef(agentConfig.apiKeyRef)) {
57
- return true;
58
- }
59
- if (agentConfig.apiSource === "custom" && isRemoteCustomEndpoint(agentConfig.customProviderUrl)) {
60
- return true;
61
- }
62
- return !!agentConfig.useServerProxy;
63
- }
64
- var LOCAL_HOSTS = /* @__PURE__ */ new Set(["127.0.0.1", "localhost", "::1", "0.0.0.0"]);
65
- function isRemoteCustomEndpoint(url) {
66
- if (typeof url !== "string") return false;
67
- try {
68
- const host = new URL(url).hostname.toLowerCase().replace(/^\[|\]$/g, "");
69
- return !LOCAL_HOSTS.has(host);
70
- } catch {
71
- return false;
72
- }
73
- }
74
31
 
75
32
  // packages/agent-runtime/devin/devinChannelWindows.ts
76
33
  var DEVIN_CHANNEL_CONTEXT_WINDOWS = {
@@ -420,8 +377,6 @@ var extractReferenceKeysFromMessage = (msg) => {
420
377
  export {
421
378
  DEFAULT_AUTO_EXECUTION_PROFILE,
422
379
  resolveAutoExecutionProfile,
423
- isOAuthApiKeyRef,
424
- shouldUseServerProxy,
425
380
  readCacheReadInputTokens,
426
381
  readCacheCreationInputTokens,
427
382
  devinChannelContextWindow,
@@ -11,12 +11,15 @@ import {
11
11
  } from "./chunk-JLR5NWP2.js";
12
12
  import {
13
13
  isOAuthApiKeyRef
14
- } from "./chunk-O3FUFEUI.js";
14
+ } from "./chunk-BKCR2JHG.js";
15
15
  import {
16
16
  isOwnedAgentKey,
17
17
  ownedAgentKey,
18
18
  publicAgentKey
19
19
  } from "./chunk-M2EJHDJP.js";
20
+ import {
21
+ getModelAbility
22
+ } from "./chunk-HLAL63BZ.js";
20
23
  import {
21
24
  isSubscriptionEndpoint,
22
25
  isSubscriptionOAuthCredential
@@ -24,9 +27,6 @@ import {
24
27
  import {
25
28
  isAntigravityOAuthAgent
26
29
  } from "./chunk-TSCI6X6C.js";
27
- import {
28
- getModelAbility
29
- } from "./chunk-HLAL63BZ.js";
30
30
 
31
31
  // packages/ai/agent/agentBilling.ts
32
32
  function resolveBillingSource(candidate) {
@@ -1,15 +1,58 @@
1
1
  import {
2
2
  estimateTokenCount
3
3
  } from "./chunk-PSCNXBYA.js";
4
- import {
5
- MODEL_LOOKUP_MAP
6
- } from "./chunk-GC64WGMD.js";
7
4
  import {
8
5
  ALL_MODELS
9
6
  } from "./chunk-HLAL63BZ.js";
7
+ import {
8
+ MODEL_LOOKUP_MAP
9
+ } from "./chunk-GC64WGMD.js";
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
+ }
13
56
 
14
57
  // packages/core/chat/messageContentSerialize.ts
15
58
  var serializeMessageContent = (content, imagePlaceholder = "[\u56FE\u7247]") => {
@@ -1019,6 +1062,8 @@ export {
1019
1062
  findModelContextWindow,
1020
1063
  getModelContextWindow,
1021
1064
  getModelInfo,
1065
+ isOAuthApiKeyRef,
1066
+ shouldUseServerProxy,
1022
1067
  sha256Hex,
1023
1068
  serializeMessageContent,
1024
1069
  resolveCompressionTriggerRatio,
@@ -7,7 +7,7 @@ import {
7
7
  mergeReferences,
8
8
  resolveReferenceAssets,
9
9
  resolveToolsFromKeys
10
- } from "./chunk-X2Q5GT5J.js";
10
+ } from "./chunk-EK3LIELB.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-P4V35AFD.js";
23
+ } from "./chunk-MOOQN57G.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-WPOSH6PA.js";
35
+ } from "./chunk-VAQ3EGPC.js";
36
36
  import {
37
37
  getTableState
38
- } from "./chunk-BQSW7453.js";
38
+ } from "./chunk-MTAWQNSU.js";
39
39
  import {
40
40
  PERSONALIZATION_DIALOG_CATEGORY,
41
41
  buildPersonalizationDialogPolicyContext,
42
42
  selectAllMsgs
43
- } from "./chunk-MIME4XKU.js";
43
+ } from "./chunk-DNQ55DHN.js";
44
44
  import {
45
45
  getCurrentSpaceIdRaw,
46
46
  getViewMode
@@ -69,18 +69,18 @@ import {
69
69
  } from "./chunk-WXOKJP3W.js";
70
70
  import {
71
71
  projectToolMessageContent
72
- } from "./chunk-JHXY4H3P.js";
72
+ } from "./chunk-2WZXXAQD.js";
73
73
  import {
74
74
  attachmentKind,
75
75
  normalizeAttachmentPart
76
76
  } from "./chunk-WJZOQR2J.js";
77
77
  import {
78
78
  extractReferenceKeysFromMessage
79
- } from "./chunk-O3FUFEUI.js";
79
+ } from "./chunk-7TBARDLF.js";
80
80
  import {
81
81
  getModelContextWindow,
82
82
  planContextUsage
83
- } from "./chunk-XHR22EKE.js";
83
+ } from "./chunk-BKCR2JHG.js";
84
84
  import {
85
85
  asRecordOrEmpty
86
86
  } from "./chunk-KX6YBIHG.js";
@@ -11,7 +11,7 @@ import {
11
11
  } from "./chunk-QYPE3TS3.js";
12
12
  import {
13
13
  runLlm
14
- } from "./chunk-7MBN2JZ5.js";
14
+ } from "./chunk-54YLFF7P.js";
15
15
  import {
16
16
  getApproxPricePerImage
17
17
  } from "./chunk-4JH2UMJR.js";
@@ -101,10 +101,9 @@ import {
101
101
  asOptionalJsonRecord,
102
102
  devinChannelContextWindow,
103
103
  extractReferenceKeysFromMessage,
104
- isOAuthApiKeyRef,
105
104
  normalizeUsage,
106
105
  resolveAutoExecutionProfile
107
- } from "./chunk-O3FUFEUI.js";
106
+ } from "./chunk-7TBARDLF.js";
108
107
  import {
109
108
  isDevinOAuthAgent
110
109
  } from "./chunk-5ZUL4CUO.js";
@@ -119,9 +118,10 @@ import {
119
118
  formatFileOperationsFromMessages,
120
119
  formatMessagesForSummaryWithTruncation,
121
120
  getModelInfo,
121
+ isOAuthApiKeyRef,
122
122
  planCompression,
123
123
  serializeMessageContent
124
- } from "./chunk-XHR22EKE.js";
124
+ } from "./chunk-BKCR2JHG.js";
125
125
  import {
126
126
  asRecordOrEmpty
127
127
  } from "./chunk-KX6YBIHG.js";
@@ -11062,7 +11062,7 @@ var messageSlice = createSliceWithThunks({
11062
11062
  runtimeOptions: args.runtimeOptions
11063
11063
  });
11064
11064
  if (agentKeyToUse) {
11065
- const { streamAgentChatTurn } = await import("./agentSlice-BHH2DZKN.js");
11065
+ const { streamAgentChatTurn } = await import("./agentSlice-QMOFHPJR.js");
11066
11066
  await dispatch(
11067
11067
  streamAgentChatTurn({
11068
11068
  agentKey: agentKeyToUse,
@@ -13879,7 +13879,7 @@ var deleteDialogThunk = async (payload, thunkApi) => {
13879
13879
  }
13880
13880
  if (isCurrentDialog) {
13881
13881
  await thunkApi.dispatch(resetMsgs());
13882
- const { clearPendingAttachments: clearPendingAttachments2 } = await import("./dialogSlice-6CC3YDDL.js");
13882
+ const { clearPendingAttachments: clearPendingAttachments2 } = await import("./dialogSlice-Y6WIZWTC.js");
13883
13883
  dispatch(clearPendingAttachments2());
13884
13884
  }
13885
13885
  return { dialogKey, isCurrentDialog, attachmentPlan };
@@ -13887,15 +13887,15 @@ var deleteDialogThunk = async (payload, thunkApi) => {
13887
13887
 
13888
13888
  // packages/chat/dialog/dialogSlice.ts
13889
13889
  var runCreateDialogAction = async (args, thunkApi) => {
13890
- const { createDialogAction } = await import("./createDialogAction-MQDTLASD.js");
13890
+ const { createDialogAction } = await import("./createDialogAction-ITOZ5TAM.js");
13891
13891
  return createDialogAction(args, thunkApi);
13892
13892
  };
13893
13893
  var runCreateAgentAutomationAction = async (args, thunkApi) => {
13894
- const { createAgentAutomationAction } = await import("./createAgentAutomationAction-IBSAZBSP.js");
13894
+ const { createAgentAutomationAction } = await import("./createAgentAutomationAction-PQA43W2W.js");
13895
13895
  return createAgentAutomationAction(args, thunkApi);
13896
13896
  };
13897
13897
  var runUpdateDialogTitleAction = async (args, thunkApi) => {
13898
- const { updateDialogTitleAction } = await import("./updateDialogTitleAction-XIMLNROU.js");
13898
+ const { updateDialogTitleAction } = await import("./updateDialogTitleAction-CEFNJE4T.js");
13899
13899
  return updateDialogTitleAction(args, thunkApi);
13900
13900
  };
13901
13901
  var runAddDialogAgentAction = async (args, thunkApi) => {
@@ -13919,7 +13919,7 @@ var runSetDialogExtraReferencesAction = async (args, thunkApi) => {
13919
13919
  return setDialogExtraReferencesAction(args, thunkApi);
13920
13920
  };
13921
13921
  var runHandleSendMessageAction = async (args, thunkApi) => {
13922
- const { handleSendMessageAction } = await import("./handleSendMessageAction-EM43KNSP.js");
13922
+ const { handleSendMessageAction } = await import("./handleSendMessageAction-4OVVUVJ4.js");
13923
13923
  return handleSendMessageAction(args, thunkApi);
13924
13924
  };
13925
13925
  function clearDialogState() {
@@ -13932,7 +13932,7 @@ var createPageAndAddReference = createAsyncThunk(
13932
13932
  async (payload, { dispatch, getState, rejectWithValue }) => {
13933
13933
  const { slateData, jsonData, title, type, fileId, groupId, dialogKey } = payload;
13934
13934
  try {
13935
- const { createDocState } = await import("./docStore-RSBDE3UH.js");
13935
+ const { createDocState } = await import("./docStore-HRNZKKVS.js");
13936
13936
  const pageKey = await createDocState(
13937
13937
  { slateData, title },
13938
13938
  { dispatch, getState }
@@ -2,7 +2,7 @@ import {
2
2
  clipMultilineText,
3
3
  fetchAndSerializeTable,
4
4
  waitForAbortableDelay
5
- } from "./chunk-P4V35AFD.js";
5
+ } from "./chunk-MOOQN57G.js";
6
6
  import {
7
7
  isGatewayHttpStatus
8
8
  } from "./chunk-NF64D32W.js";
@@ -21,7 +21,7 @@ import {
21
21
  } from "./chunk-AGIM7IMJ.js";
22
22
  import {
23
23
  fetchAndCacheMessages
24
- } from "./chunk-MIME4XKU.js";
24
+ } from "./chunk-DNQ55DHN.js";
25
25
  import {
26
26
  createSpaceKey
27
27
  } from "./chunk-UAD2WT54.js";
@@ -1,6 +1,10 @@
1
1
  import {
2
2
  resolveAgentImageInputSupport
3
- } from "./chunk-JHXY4H3P.js";
3
+ } from "./chunk-I33CJERI.js";
4
+ import {
5
+ TOOL_HAD_IMAGES,
6
+ hadToolImages
7
+ } from "./chunk-SHPY7A3P.js";
4
8
  import {
5
9
  asOptionalFiniteNumber
6
10
  } from "./chunk-WWC7I6TA.js";
@@ -375,6 +379,10 @@ function sanitizeChatMessage(value) {
375
379
  };
376
380
  const toolCallId = asOptionalTrimmedString(value.tool_call_id) ?? asOptionalTrimmedString(value.toolCallId);
377
381
  if (toolCallId) message.tool_call_id = toolCallId;
382
+ const metadata = isRecord(value.tool_result_metadata) ? value.tool_result_metadata : value.metadata;
383
+ if (role === "tool" && (hadToolImages(value) || isRecord(metadata) && metadata[TOOL_HAD_IMAGES] === true)) {
384
+ message.tool_result_metadata = { [TOOL_HAD_IMAGES]: true };
385
+ }
378
386
  const toolCalls = sanitizeToolCalls(value.tool_calls);
379
387
  if (toolCalls) message.tool_calls = toolCalls;
380
388
  if (typeof value.reasoning_content === "string" && value.reasoning_content) {
@@ -427,7 +435,6 @@ function assertDesktopAgentRuntimeTurnBodyHasNoRawSecrets(body) {
427
435
  export {
428
436
  extractImageUrlsFromMessages,
429
437
  hasImageInRuntimeMessages,
430
- IMAGE_OMITTED_PLACEHOLDER,
431
438
  stripImagePartsFromMessages,
432
439
  stripImagePartsForTextOnlyAgent,
433
440
  resolveAgentRuntimeConfigFromRecord,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  resolveAgentCallPlan
3
- } from "./chunk-6OC2YMGH.js";
3
+ } from "./chunk-XBJIESNS.js";
4
4
  import {
5
5
  SUBSCRIPTION_OAUTH_PROVIDERS
6
6
  } from "./chunk-OQ3DOBYB.js";
@@ -94,61 +94,6 @@ var resolveAgentImageInputSupport = (agent) => {
94
94
  return true;
95
95
  };
96
96
 
97
- // packages/ai/agent/toolOutputPolicy.ts
98
- var MAX_IN_TURN_TOOL_CONTENT_CHARS = 4e3;
99
- var DEFAULT_TOOL_OUTPUT_PROFILE = {
100
- maxChars: MAX_IN_TURN_TOOL_CONTENT_CHARS,
101
- headRatio: 0.5
102
- };
103
- var TOOL_OUTPUT_PROFILES = {
104
- readFile: { maxChars: 4800, headRatio: 0.68, historicalMaxChars: 4800 },
105
- read_file: { maxChars: 4800, headRatio: 0.68, historicalMaxChars: 4800 },
106
- readWorkspaceFile: { maxChars: 4800, headRatio: 0.68, historicalMaxChars: 4800 },
107
- globFiles: { maxChars: 2800, headRatio: 0.85 },
108
- execShell: { maxChars: 4e3, headRatio: 0.35 },
109
- runCommand: { maxChars: 4e3, headRatio: 0.35 },
110
- launchProcess: { maxChars: 2800, headRatio: 0.35 },
111
- editFile: { maxChars: 1200, headRatio: 0.62 },
112
- writeFile: { maxChars: 1e3, headRatio: 0.62 },
113
- readPastedText: { maxChars: 4800, headRatio: 0.5, historicalMaxChars: 4800 },
114
- // loadSkill 内联的是文档正文(SKILL.md 全文),与 readFile 同类,不该因为工具名未登记就退回
115
- // DEFAULT 的 4000。历史事故(nolo-plan omitted middle)正是 headRatio 0.5 掐掉中段,把
116
- // 「MUST / 禁止」所在的中段静默省略。取 4800(与 readFile 同级),不激进放大;headRatio 同 DEFAULT。
117
- loadSkill: { maxChars: 4800, headRatio: 0.5 }
118
- };
119
- function resolveToolOutputProfile(toolName) {
120
- return (toolName ? TOOL_OUTPUT_PROFILES[toolName] : void 0) ?? DEFAULT_TOOL_OUTPUT_PROFILE;
121
- }
122
- function resolveHistoricalToolContentCap(toolName, historicalMaxChars) {
123
- const profile = toolName ? TOOL_OUTPUT_PROFILES[toolName] : void 0;
124
- return profile?.historicalMaxChars !== void 0 ? Math.max(historicalMaxChars, profile.historicalMaxChars) : historicalMaxChars;
125
- }
126
- function projectToolMessageContent(input) {
127
- const { content, toolName } = input;
128
- const maxChars = resolveToolOutputProfile(toolName).maxChars;
129
- if (content.length <= maxChars) return content;
130
- return clipToolText(
131
- content,
132
- maxChars,
133
- resolveToolOutputProfile(toolName).headRatio,
134
- `
135
- \u2026[\u622A\u65AD\uFF0C\u539F\u59CB\u957F\u5EA6 ${content.length} \u5B57\u7B26]`
136
- );
137
- }
138
- function clipToolText(content, maxChars, headRatio, marker = "\n\n[... tool output middle omitted; head/tail preserved ...]\n\n") {
139
- const normalized = content.replace(/\r\n/g, "\n").trim();
140
- if (normalized.length <= maxChars) return normalized;
141
- if (maxChars <= marker.length + 2) return normalized.slice(0, maxChars);
142
- const available = maxChars - marker.length;
143
- const headChars = Math.max(1, Math.floor(available * headRatio));
144
- const tailChars = Math.max(1, available - headChars);
145
- return `${normalized.slice(0, headChars)}${marker}${normalized.slice(-tailChars)}`;
146
- }
147
-
148
97
  export {
149
- resolveAgentImageInputSupport,
150
- resolveToolOutputProfile,
151
- resolveHistoricalToolContentCap,
152
- projectToolMessageContent,
153
- clipToolText
98
+ resolveAgentImageInputSupport
154
99
  };
@@ -7,7 +7,7 @@ import {
7
7
  } from "./chunk-OPNHKULV.js";
8
8
  import {
9
9
  deriveCredentialGroup
10
- } from "./chunk-SC5TDLTP.js";
10
+ } from "./chunk-BE42X662.js";
11
11
  import {
12
12
  isTombstoneRecord
13
13
  } from "./chunk-D2MDMY2M.js";
@@ -3,10 +3,10 @@ import {
3
3
  } from "./chunk-HS7MLR74.js";
4
4
  import {
5
5
  performServerProxyFetchWithRetry
6
- } from "./chunk-X2Q5GT5J.js";
6
+ } from "./chunk-EK3LIELB.js";
7
7
  import {
8
8
  fetchServerSyncedCredential
9
- } from "./chunk-7MBN2JZ5.js";
9
+ } from "./chunk-54YLFF7P.js";
10
10
  import {
11
11
  buildSkillGuidancePromptBlock
12
12
  } from "./chunk-3LNVSFTH.js";
@@ -32,11 +32,11 @@ import {
32
32
  resolveReasoningReplayOptions,
33
33
  shouldStripReasoningContentForOutbound,
34
34
  stablePromptCacheKey
35
- } from "./chunk-7L2HZQNN.js";
35
+ } from "./chunk-SHPY7A3P.js";
36
36
  import {
37
37
  resolveAgentCallPlan,
38
38
  resolveClientWire
39
- } from "./chunk-6OC2YMGH.js";
39
+ } from "./chunk-XBJIESNS.js";
40
40
  import {
41
41
  createFileCredentialBroker
42
42
  } from "./chunk-76YUTLOT.js";
@@ -5,7 +5,7 @@ import {
5
5
  inlineImageUrlsForCustomProvider,
6
6
  prepareTools,
7
7
  shouldInlineImageUrlsForAgent
8
- } from "./chunk-22FIHMYU.js";
8
+ } from "./chunk-PPR6G2U2.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-UPC23AAN.js";
17
+ } from "./chunk-JCILHZJZ.js";
18
18
  import {
19
19
  findToolExecutor,
20
20
  toolDefinitionsByName
21
- } from "./chunk-ZJ66I757.js";
21
+ } from "./chunk-UMVEB5QT.js";
22
22
  import {
23
23
  classifyApiError,
24
24
  classifyGenerationError,
25
25
  extractErrorDiagnostics
26
- } from "./chunk-X2Q5GT5J.js";
26
+ } from "./chunk-EK3LIELB.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-P4V35AFD.js";
35
+ } from "./chunk-MOOQN57G.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-MIME4XKU.js";
45
+ } from "./chunk-DNQ55DHN.js";
46
46
  import {
47
47
  streamAgentChatTurn
48
- } from "./chunk-7MBN2JZ5.js";
48
+ } from "./chunk-54YLFF7P.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-7L2HZQNN.js";
88
+ } from "./chunk-SHPY7A3P.js";
89
89
  import {
90
90
  EMPTY_ASSISTANT_REPAIR_PROMPT
91
- } from "./chunk-O3FUFEUI.js";
91
+ } from "./chunk-7TBARDLF.js";
92
92
  import {
93
93
  getModelInfo
94
- } from "./chunk-XHR22EKE.js";
94
+ } from "./chunk-BKCR2JHG.js";
95
95
  import {
96
96
  isAbortError
97
97
  } from "./chunk-7DPNBQSV.js";
@@ -1,16 +1,16 @@
1
1
  import {
2
2
  createCliLocalRuntimeAdapter,
3
3
  summarizeEndpoint
4
- } from "./chunk-BJWOOJX5.js";
4
+ } from "./chunk-3XUE7WJA.js";
5
5
  import {
6
6
  t
7
7
  } from "./chunk-TDX2L4W2.js";
8
8
  import {
9
9
  clipMultilineText
10
- } from "./chunk-P4V35AFD.js";
10
+ } from "./chunk-MOOQN57G.js";
11
11
  import {
12
12
  runLocalAgentTurn
13
- } from "./chunk-6OYC7NDH.js";
13
+ } from "./chunk-ME7N4YHG.js";
14
14
  import {
15
15
  applyToolSurfaceConstraints
16
16
  } from "./chunk-6J227QXV.js";