nolo-cli 0.153.2 → 0.154.0

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 (136) hide show
  1. package/{_executeModel-7PZNF3KM.js → _executeModel-3HHZYHHB.js} +44 -42
  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-52SBFMA4.js → agentDeleteCommand-ON2KVSJ5.js} +60 -60
  7. package/{agentEmailCommands-FLTHAK4Y.js → agentEmailCommands-2QPD5VP3.js} +63 -63
  8. package/{agentListCommands-LKFRVROH.js → agentListCommands-L33M3I6V.js} +33 -33
  9. package/{agentMachineCommands-V3E6STQ6.js → agentMachineCommands-V44DPSED.js} +30 -28
  10. package/{agentProviderCommands-MKG2OOEY.js → agentProviderCommands-CXBHNONN.js} +5 -5
  11. package/{agentPullCommand-FA43RBRU.js → agentPullCommand-GXXEDOSA.js} +4 -4
  12. package/{agentRecordCommands-KAOY56RD.js → agentRecordCommands-CKILCNQZ.js} +57 -57
  13. package/{agentRunCommand-FXAN65RN.js → agentRunCommand-6IN7NK7H.js} +59 -59
  14. package/{agentRunControl-2C5GM3BW.js → agentRunControl-XBSNHHZE.js} +7 -7
  15. package/{agentRuntimeLocal-V4URZOQL.js → agentRuntimeLocal-XCKO5FVP.js} +20 -18
  16. package/{agentSlice-LAV5TJXT.js → agentSlice-YT3VCCEW.js} +6 -6
  17. package/{appDeleteCommands-7EZRTNIP.js → appDeleteCommands-2PJFNLAJ.js} +28 -26
  18. package/{appDeployCommands-3U6MEES7.js → appDeployCommands-AZCMCMK6.js} +28 -26
  19. package/{appDeployStatusCommands-TAC6BYC6.js → appDeployStatusCommands-HSIKPVJN.js} +28 -26
  20. package/{appGetCommands-MFNPLXGO.js → appGetCommands-IUZCPAP7.js} +28 -26
  21. package/{appListCommands-QVZAUEUU.js → appListCommands-JLFVS44M.js} +28 -26
  22. package/{authCommand-NIV3DKPF.js → authCommand-3Z52KJID.js} +19 -19
  23. package/{authCommands-AMNIAKEG.js → authCommands-QOCKVPX3.js} +5 -5
  24. package/{builtinSkillRegistry-H3AY27TR.js → builtinSkillRegistry-LJV7FHNI.js} +4 -4
  25. package/{chunk-4RJJDA57.js → chunk-2ODX2C4E.js} +154 -30
  26. package/{chunk-UCLSOLX4.js → chunk-2XDQAWBM.js} +12 -12
  27. package/{chunk-XJOBYJWN.js → chunk-2ZYCNT2O.js} +72 -33
  28. package/{chunk-YIIQNHJW.js → chunk-3GTVM7NJ.js} +19 -19
  29. package/{chunk-US6MKPE7.js → chunk-3L5MSPWX.js} +1 -1
  30. package/{chunk-SGJRNVYF.js → chunk-4L4K6YR7.js} +16 -2
  31. package/{chunk-P5QACQDK.js → chunk-62TBKWTV.js} +1 -1
  32. package/{chunk-TRW43TSC.js → chunk-6EQD4AQL.js} +41 -1
  33. package/{chunk-YLMMECCH.js → chunk-6XIE5ZGI.js} +1 -1
  34. package/{chunk-J2ATF74A.js → chunk-BAWAKW7X.js} +1 -1
  35. package/{chunk-ZVQHBIWV.js → chunk-CDLP56BS.js} +7 -7
  36. package/{chunk-JPJGMOIM.js → chunk-DD2EOI6S.js} +1 -1
  37. package/{chunk-OON4OBWI.js → chunk-DLV3H464.js} +7 -7
  38. package/{chunk-RWSOTHY4.js → chunk-DT7EWFTY.js} +5 -5
  39. package/{chunk-IRTOYSA2.js → chunk-ESMZW5PE.js} +1 -1
  40. package/{chunk-V6P4AYYJ.js → chunk-EVPKKBSI.js} +13 -13
  41. package/{chunk-HB4XPBC7.js → chunk-EWO77ZGF.js} +9 -11
  42. package/{chunk-KJ7MT3UC.js → chunk-F3SOW2EU.js} +81 -1
  43. package/{chunk-T64RZQBO.js → chunk-F5WASHQA.js} +247 -132
  44. package/{chunk-WUGRUG5Z.js → chunk-FB5WLEOD.js} +12 -12
  45. package/{chunk-SOEJSA7I.js → chunk-FCUKCVKN.js} +4 -4
  46. package/{chunk-FY4SDK2E.js → chunk-FDLDMJTM.js} +1 -1
  47. package/{chunk-ICRRXBRN.js → chunk-FFHV45HO.js} +3 -3
  48. package/{chunk-BUCB3RT4.js → chunk-FZYKQFBQ.js} +3 -3
  49. package/{chunk-IE5PXKVU.js → chunk-G3VYRPTV.js} +5 -5
  50. package/{chunk-3CHPRXKY.js → chunk-HW7EBEC5.js} +26 -194
  51. package/{chunk-UFYBYB26.js → chunk-I7S63QUU.js} +1 -1
  52. package/{chunk-CON6SI7N.js → chunk-IF7V3CBU.js} +1 -1
  53. package/{chunk-RAEBIT7A.js → chunk-JDKSYQQN.js} +4 -4
  54. package/{chunk-K43ZF2C3.js → chunk-JPPQ3GUO.js} +1 -1
  55. package/{chunk-QJJQZ4EK.js → chunk-JSB2OPQT.js} +115 -119
  56. package/{chunk-M2P3OGXZ.js → chunk-JWEXJ573.js} +2 -2
  57. package/{chunk-7G4KH3C4.js → chunk-K25WQPP3.js} +220 -54
  58. package/{chunk-ZEY4NJRE.js → chunk-KABQ74UQ.js} +4 -4
  59. package/{chunk-3C2QLERX.js → chunk-KMDDG73K.js} +1 -1
  60. package/{chunk-SPKLALBU.js → chunk-MAYW6V3E.js} +1 -1
  61. package/{chunk-IPAW7XLD.js → chunk-MFVOJ6KF.js} +2 -2
  62. package/{chunk-NDZOXXIM.js → chunk-NHEWV5FD.js} +1 -1
  63. package/{chunk-QPY264HO.js → chunk-O2IWR23M.js} +1 -1
  64. package/{chunk-TFPOD4YZ.js → chunk-OLVOR45M.js} +2 -2
  65. package/{chunk-SUKSWFLP.js → chunk-PIG2IUVZ.js} +1 -1
  66. package/{chunk-AAMWEIEP.js → chunk-QA2C5NKI.js} +3 -3
  67. package/{chunk-3WIXU4XO.js → chunk-QI2WVWXV.js} +13 -1
  68. package/{chunk-VSJIIKGY.js → chunk-QXZH5UDF.js} +3 -3
  69. package/{chunk-SQ73U3BG.js → chunk-QZIOZDM6.js} +9 -9
  70. package/{chunk-MJ54WBLO.js → chunk-R2KWTENX.js} +3 -3
  71. package/{chunk-C3OK72G3.js → chunk-RIHQGFFA.js} +1 -1
  72. package/{chunk-DC3SZCRR.js → chunk-SH3XD4E2.js} +2 -2
  73. package/{chunk-MM3662RS.js → chunk-SNAWGDXT.js} +263 -4
  74. package/{chunk-JGRPBIZZ.js → chunk-SQX235S2.js} +1 -1
  75. package/chunk-TT644UJD.js +188 -0
  76. package/{chunk-IYBIRCQV.js → chunk-U34KT53V.js} +29 -11
  77. package/{chunk-ZJZGF77K.js → chunk-ULQAD7ZY.js} +18 -43
  78. package/{chunk-DJKBZYMR.js → chunk-UY73HNIN.js} +53 -49
  79. package/{chunk-I2RMFLLH.js → chunk-V7PCFWX3.js} +1 -1
  80. package/{chunk-KLA62VVE.js → chunk-VXS4YYJ2.js} +8 -8
  81. package/{chunk-JZX2XLKC.js → chunk-YCRROBDY.js} +1 -1
  82. package/{chunk-C5A3GWRG.js → chunk-YR47Y7CN.js} +6 -6
  83. package/{chunk-AXYXKGPN.js → chunk-ZAV4YVEA.js} +1 -1
  84. package/{chunk-YANF2RR4.js → chunk-ZPKUJROL.js} +1 -1
  85. package/{chunk-AWY25K65.js → chunk-ZSLIYVIQ.js} +7 -7
  86. package/{commandRegistry-BZGZP4AW.js → commandRegistry-4LWXIPNX.js} +83 -83
  87. package/{contentThunks-56AWRCC4.js → contentThunks-QBL5NK2W.js} +17 -17
  88. package/{createAgentAutomationAction-W5D4IHHK.js → createAgentAutomationAction-5UWBLR2N.js} +17 -17
  89. package/{createDialogAction-YMU646CH.js → createDialogAction-NJ2LE7KC.js} +21 -21
  90. package/{createPageAction-T4WRPDOH.js → createPageAction-7T3RINS2.js} +19 -19
  91. package/{dbSlice-DC2J53RC.js → dbSlice-6PVPY44C.js} +5 -5
  92. package/{deleteFile-KYWEMNFX.js → deleteFile-YM6NDPAR.js} +3 -3
  93. package/{dialogCommands-3T3LM566.js → dialogCommands-KMECTGCW.js} +30 -28
  94. package/{dialogSlice-Z5KOY4CC.js → dialogSlice-GQMTD4HR.js} +16 -16
  95. package/{docCreateCommands-OLNS64OJ.js → docCreateCommands-4IT5PUAL.js} +30 -28
  96. package/{docDeleteCommands-U4UOLXZQ.js → docDeleteCommands-QS66YNZV.js} +31 -29
  97. package/{docReadCommands-WUYVWGOH.js → docReadCommands-3SAI46YC.js} +30 -28
  98. package/{docStore-2EN5A7PW.js → docStore-PM5PYKPZ.js} +6 -6
  99. package/{docUpdateCommands-RKVB6XAQ.js → docUpdateCommands-OGYG5BRC.js} +30 -28
  100. package/{getPricing-TX35D7PI.js → getPricing-XQ3N3RBP.js} +2 -2
  101. package/{handleSendMessageAction-EF3LOTXW.js → handleSendMessageAction-EQ3U6K5N.js} +35 -31
  102. package/index.js +7 -7
  103. package/{localRuntimeAdapter-OAHN57AM.js → localRuntimeAdapter-MO64KEOS.js} +53 -53
  104. package/{localRuntimeAuthority-JDAD7CB6.js → localRuntimeAuthority-BPN5OAQG.js} +2 -2
  105. package/{localRuntimeDb-CVC62PM5.js → localRuntimeDb-QIVAXMUL.js} +1 -1
  106. package/{machineCommands-RTYX5UN3.js → machineCommands-7MBJJY4K.js} +60 -60
  107. package/{machineWsRunDispatch-ELDKKIHF.js → machineWsRunDispatch-T4LFRJL3.js} +55 -55
  108. package/{memberThunks-2DWKLE6W.js → memberThunks-AZINUM4S.js} +8 -8
  109. package/package.json +1 -1
  110. package/{providerPresetApply-GSJI4JBJ.js → providerPresetApply-PKUOHQJT.js} +5 -5
  111. package/{providerRegistry-TSSTPGWF.js → providerRegistry-HNQLIFN2.js} +5 -5
  112. package/{read-L7QEJETH.js → read-7JPIWRBQ.js} +3 -3
  113. package/{readDocTool-QELXV2GW.js → readDocTool-AAQTB2Y3.js} +1 -1
  114. package/{readlineWorkspace-BUEUGN7D.js → readlineWorkspace-2DR5GHLQ.js} +92 -126
  115. package/{removeDialogAgentAction-376XSUP2.js → removeDialogAgentAction-RMVRILLK.js} +6 -6
  116. package/{runAgentClientLoop-BDN5VYZN.js → runAgentClientLoop-EXIQDX7G.js} +42 -40
  117. package/{runtimeDoctorCommands-56NWKNON.js → runtimeDoctorCommands-MMCP4B4U.js} +12 -12
  118. package/{setDialogExtraReferencesAction-QBDSH63D.js → setDialogExtraReferencesAction-L3V7JTMG.js} +6 -6
  119. package/{setPrimaryDialogAgentAction-537QFGW3.js → setPrimaryDialogAgentAction-X52JQGTJ.js} +6 -6
  120. package/{settingThunks-4Z43ZSAT.js → settingThunks-N6XFWPOU.js} +5 -5
  121. package/{spaceCommands-KHCPOFEB.js → spaceCommands-WQMUCGV7.js} +27 -25
  122. package/{streamAgentChatTurn-WFNIELXS.js → streamAgentChatTurn-DI2334G3.js} +142 -81
  123. package/{switchDialogAgentAction-CSO6AKRL.js → switchDialogAgentAction-ZJ5CGU7J.js} +5 -5
  124. package/{tools-2LGM37M4.js → tools-23VQGJOX.js} +32 -32
  125. package/{tuiSummaryLlmCaller-NBEHCAFU.js → tuiSummaryLlmCaller-FESHBDTT.js} +7 -7
  126. package/{updateCommands-LXZLG44Y.js → updateCommands-ODWC7SK7.js} +5 -3
  127. package/{updateDialogTitleAction-IFC2MM4P.js → updateDialogTitleAction-AGAYHWS7.js} +17 -17
  128. package/chunk-UKZX3NHN.js +0 -48
  129. package/{agentGrantCommands-HOJ3JBBQ.js → agentGrantCommands-5DPHYEKP.js} +3 -3
  130. package/{chromeOpsCommands-3Z34RKSE.js → chromeOpsCommands-GZVVK7HU.js} +4 -4
  131. package/{chunk-2SGAI64X.js → chunk-43OFVLWJ.js} +4 -4
  132. package/{chunk-XETG4RIX.js → chunk-AETZ7AD6.js} +4 -4
  133. package/{chunk-2IXDJNZI.js → chunk-GAGGEA7D.js} +3 -3
  134. package/{memoryCommands-CUNBFRVS.js → memoryCommands-ZS3VQJAL.js} +3 -3
  135. package/{offlineMarxistsAgentCommand-2QTHJCHV.js → offlineMarxistsAgentCommand-3GLX4QQY.js} +3 -3
  136. package/{tableCommands-LBH3QPPO.js → tableCommands-IVC5S7Y3.js} +11 -11
@@ -2,7 +2,7 @@ import {
2
2
  DEVIN_CONNECT_URL,
3
3
  parseSseDataLineJson,
4
4
  parseSseDataLineObject
5
- } from "./chunk-3C2QLERX.js";
5
+ } from "./chunk-KMDDG73K.js";
6
6
  import {
7
7
  applyChatCompletionDelta,
8
8
  applyResponsesToolEvent,
@@ -11,7 +11,7 @@ import {
11
11
  flushChatCompletionStream,
12
12
  providerHttpFailure,
13
13
  throwIfChatCompletionStreamFailed
14
- } from "./chunk-VSJIIKGY.js";
14
+ } from "./chunk-QXZH5UDF.js";
15
15
  import {
16
16
  readSseFrames
17
17
  } from "./chunk-HNUWUO75.js";
@@ -24,15 +24,14 @@ import {
24
24
  } from "./chunk-PWTNI4N7.js";
25
25
  import {
26
26
  hasImageInRuntimeMessages,
27
- resolveAgentContextWindow,
28
27
  stripImagePartsFromMessages
29
- } from "./chunk-ZJZGF77K.js";
28
+ } from "./chunk-ULQAD7ZY.js";
30
29
  import {
31
30
  clipToolText,
32
31
  resolveAgentImageInputSupport,
33
32
  resolveHistoricalToolContentCap,
34
33
  resolveToolOutputProfile
35
- } from "./chunk-IYBIRCQV.js";
34
+ } from "./chunk-U34KT53V.js";
36
35
  import {
37
36
  applyShapingCounts,
38
37
  attachProjectionFacts,
@@ -54,6 +53,7 @@ import {
54
53
  import {
55
54
  CREDENTIAL_HYGIENE_RULE,
56
55
  DELETE_SAFETY_RED_LINE,
56
+ DISPATCH_BACKEND_POLICY,
57
57
  PARALLEL_DISPATCH_DEFAULT_RULE,
58
58
  PLATFORM_RISK_CONTROL_RULE,
59
59
  TOOL_GUIDED_SECTION_ORDER,
@@ -66,7 +66,7 @@ import {
66
66
  hashStablePrefixContent,
67
67
  resolveResponseGuidelines,
68
68
  resolveToolGuidedSections
69
- } from "./chunk-3WIXU4XO.js";
69
+ } from "./chunk-QI2WVWXV.js";
70
70
  import {
71
71
  classifyUnparsableToolArgs,
72
72
  collectStablePromptPrefix,
@@ -90,7 +90,7 @@ import {
90
90
  toOpenAiCompatibleMessages,
91
91
  toResponsesTools,
92
92
  transferDowngradedToolTurnOrigin
93
- } from "./chunk-SGJRNVYF.js";
93
+ } from "./chunk-4L4K6YR7.js";
94
94
  import {
95
95
  BRIDGE_STREAM_MAX_CHARS,
96
96
  DEFAULT_READ_DIALOG_MAX_RESPONSE_CHARS,
@@ -116,10 +116,11 @@ import {
116
116
  normalizeUsage,
117
117
  readCacheCreationInputTokens,
118
118
  readCacheReadInputTokens,
119
+ resolveAgentContextWindow,
119
120
  resolveEmptyAssistantFallbackMessage,
120
121
  resolveEmptyAssistantOutcome,
121
122
  resolveTruncatedReasoningTailLog
122
- } from "./chunk-KJ7MT3UC.js";
123
+ } from "./chunk-F3SOW2EU.js";
123
124
  import {
124
125
  COMPACTION_SUMMARY_SCHEMA_VERSION,
125
126
  COMPACTION_SUMMARY_SYSTEM_PROMPT,
@@ -142,7 +143,7 @@ import {
142
143
  sha256Hex,
143
144
  truncateToolOutputForContext,
144
145
  withProviderCallTimingFields
145
- } from "./chunk-AAMWEIEP.js";
146
+ } from "./chunk-QA2C5NKI.js";
146
147
  import {
147
148
  clipCompactText
148
149
  } from "./chunk-5MMAK75Q.js";
@@ -152,6 +153,12 @@ import {
152
153
  import {
153
154
  isAbortError
154
155
  } from "./chunk-7DPNBQSV.js";
156
+ import {
157
+ buildDialogSummaryLayer
158
+ } from "./chunk-VEA7H5FG.js";
159
+ import {
160
+ buildUserResponseLanguageContext
161
+ } from "./chunk-4VJAC32I.js";
155
162
  import {
156
163
  canonicalizeToolName,
157
164
  canonicalizeToolNames
@@ -166,16 +173,16 @@ import {
166
173
  import {
167
174
  asOptionalPositiveFiniteNumber
168
175
  } from "./chunk-U6VC4MU4.js";
169
- import {
170
- asOptionalFiniteNumber
171
- } from "./chunk-WWC7I6TA.js";
172
176
  import {
173
177
  estimateTokenCount
174
178
  } from "./chunk-PSCNXBYA.js";
179
+ import {
180
+ asOptionalFiniteNumber
181
+ } from "./chunk-WWC7I6TA.js";
175
182
  import {
176
183
  buildProviderAuthHeaders,
177
184
  buildProviderExecutionPlan
178
- } from "./chunk-SUKSWFLP.js";
185
+ } from "./chunk-PIG2IUVZ.js";
179
186
  import {
180
187
  isRecord
181
188
  } from "./chunk-KUG52IAP.js";
@@ -197,12 +204,6 @@ import {
197
204
  import {
198
205
  resolveNoloStateDir
199
206
  } from "./chunk-ZWQUWF6W.js";
200
- import {
201
- buildDialogSummaryLayer
202
- } from "./chunk-VEA7H5FG.js";
203
- import {
204
- buildUserResponseLanguageContext
205
- } from "./chunk-4VJAC32I.js";
206
207
  import {
207
208
  __export
208
209
  } from "./chunk-4VNS5WPM.js";
@@ -14049,8 +14050,11 @@ function detectExecShellSynchronousWarnings(command, shell) {
14049
14050
  }
14050
14051
 
14051
14052
  // packages/agent-runtime/workspaceShell.ts
14052
- import { resolve } from "node:path";
14053
+ import { createWriteStream, mkdirSync as mkdirSync2 } from "node:fs";
14054
+ import { dirname, join as join4, resolve } from "node:path";
14053
14055
  import { spawn as spawnChildProcess } from "node:child_process";
14056
+ import { randomUUID } from "node:crypto";
14057
+ import { tmpdir } from "node:os";
14054
14058
 
14055
14059
  // packages/agent-runtime/runtimeCompat.ts
14056
14060
  import { existsSync as existsSync2, readdirSync as readdirSync2, statSync as statSync2 } from "node:fs";
@@ -14986,39 +14990,168 @@ function truncateToolOutput(value, limit = 2e4, options) {
14986
14990
  ${tail}`;
14987
14991
  }
14988
14992
  var DEFAULT_MAX_STREAM_BUFFER_BYTES = 5 * 1024 * 1024;
14989
- function readNodeStream(stream, maxBytes = DEFAULT_MAX_STREAM_BUFFER_BYTES) {
14993
+ function readNodeStream(stream, maxBytesOrOptions = DEFAULT_MAX_STREAM_BUFFER_BYTES) {
14990
14994
  if (!stream) return Promise.resolve("");
14995
+ const options = typeof maxBytesOrOptions === "number" ? { maxBytes: maxBytesOrOptions } : maxBytesOrOptions ?? {};
14996
+ const maxBytes = typeof options.maxBytes === "number" && Number.isFinite(options.maxBytes) && options.maxBytes >= 0 ? options.maxBytes : DEFAULT_MAX_STREAM_BUFFER_BYTES;
14997
+ const spillPath = asOptionalTrimmedString(options.spillPath);
14998
+ const createSink = options.spillSinkFactory ?? ((path) => createWriteStream(path));
14991
14999
  return new Promise((resolveStream, rejectStream) => {
14992
15000
  const chunks2 = [];
14993
15001
  let totalBytes = 0;
14994
15002
  let settled = false;
15003
+ let truncated = false;
15004
+ let spillState = spillPath ? "idle" : "disabled";
15005
+ let spillError = null;
15006
+ let spillSink = null;
15007
+ let sourcePausedForSpill = false;
15008
+ let sinkFinished = false;
14995
15009
  const formatLimit = maxBytes >= 1024 * 1024 ? `${Math.round(maxBytes / (1024 * 1024))}MB` : `${Math.round(maxBytes / 1024)}KB`;
14996
- const finalize2 = (truncated = false) => {
15010
+ const resumeSourceIfPaused = () => {
15011
+ if (!sourcePausedForSpill) return;
15012
+ sourcePausedForSpill = false;
15013
+ try {
15014
+ stream.resume?.();
15015
+ } catch {
15016
+ }
15017
+ };
15018
+ const markSpillFailed = (error) => {
15019
+ if (spillState === "failed") return;
15020
+ spillState = "failed";
15021
+ if (!spillError) {
15022
+ spillError = toErrorMessage(error);
15023
+ }
15024
+ const sink = spillSink;
15025
+ spillSink = null;
15026
+ if (sink) {
15027
+ try {
15028
+ sink.destroy?.();
15029
+ } catch {
15030
+ }
15031
+ }
15032
+ resumeSourceIfPaused();
15033
+ };
15034
+ const writeToSink = (buf) => {
15035
+ const sink = spillSink;
15036
+ if (!sink || spillState !== "open") return;
15037
+ if (sink.destroyed === true) {
15038
+ markSpillFailed(new Error("spill writable closed before finish"));
15039
+ return;
15040
+ }
15041
+ let accepted = true;
15042
+ try {
15043
+ accepted = sink.write(buf) !== false;
15044
+ } catch (error) {
15045
+ markSpillFailed(error);
15046
+ return;
15047
+ }
15048
+ if (!accepted && !sourcePausedForSpill) {
15049
+ sourcePausedForSpill = true;
15050
+ try {
15051
+ stream.pause?.();
15052
+ } catch {
15053
+ sourcePausedForSpill = false;
15054
+ }
15055
+ }
15056
+ };
15057
+ const openSpill = (headChunks, crossingChunk) => {
15058
+ if (!spillPath || spillState !== "idle") return;
15059
+ let sink;
15060
+ try {
15061
+ mkdirSync2(dirname(spillPath), { recursive: true });
15062
+ sink = createSink(spillPath);
15063
+ sink.on("error", (error) => markSpillFailed(error));
15064
+ sink.on("drain", () => {
15065
+ if (settled) return;
15066
+ resumeSourceIfPaused();
15067
+ });
15068
+ sink.on("finish", () => {
15069
+ sinkFinished = true;
15070
+ });
15071
+ sink.on("close", () => {
15072
+ if (sinkFinished || spillState !== "open") return;
15073
+ markSpillFailed(new Error("spill writable closed before finish"));
15074
+ });
15075
+ } catch (error) {
15076
+ spillState = "failed";
15077
+ spillError = toErrorMessage(error);
15078
+ spillSink = null;
15079
+ return;
15080
+ }
15081
+ spillSink = sink;
15082
+ spillState = "open";
15083
+ for (const head3 of headChunks) writeToSink(head3);
15084
+ writeToSink(crossingChunk);
15085
+ };
15086
+ const finalize2 = (wasTruncated) => {
14997
15087
  if (settled) return;
14998
15088
  settled = true;
14999
- let text2 = Buffer.concat(chunks2).toString("utf8");
15000
- if (truncated) {
15001
- text2 += `
15089
+ const truncatedNow = wasTruncated || truncated;
15090
+ const baseText = Buffer.concat(chunks2).toString("utf8");
15091
+ const done4 = () => {
15092
+ let text2 = baseText;
15093
+ if (truncatedNow) {
15094
+ const notes = [`output exceeded ${formatLimit} buffer limit`];
15095
+ if (spillState === "ok") {
15096
+ notes.push(`full output: ${spillPath}`);
15097
+ } else if (spillPath) {
15098
+ notes.push(
15099
+ `spill failed${spillError ? ` (${spillError})` : ""}; output incomplete`
15100
+ );
15101
+ }
15102
+ text2 += `
15002
15103
 
15003
- [stream pipe truncated: output exceeded ${formatLimit} buffer limit]`;
15104
+ [stream pipe truncated: ${notes.join("; ")}]`;
15105
+ }
15106
+ resolveStream(text2);
15107
+ };
15108
+ const sink = spillSink;
15109
+ if (!sink || spillState !== "open") {
15110
+ done4();
15111
+ return;
15112
+ }
15113
+ let closed = false;
15114
+ const settleSink = (failed, error) => {
15115
+ if (closed) return;
15116
+ closed = true;
15117
+ if (failed) {
15118
+ markSpillFailed(error ?? new Error("spill write failed"));
15119
+ } else if (spillState === "open") {
15120
+ spillState = "ok";
15121
+ }
15122
+ done4();
15123
+ };
15124
+ if (sink.destroyed === true) {
15125
+ settleSink(true, new Error("spill writable closed before finish"));
15126
+ return;
15127
+ }
15128
+ sink.once("error", (error) => settleSink(true, error));
15129
+ sink.once("finish", () => settleSink(false));
15130
+ sink.once("close", () => {
15131
+ settleSink(!sinkFinished, new Error("spill writable closed before finish"));
15132
+ });
15133
+ try {
15134
+ sink.end?.();
15135
+ } catch (error) {
15136
+ settleSink(true, error);
15004
15137
  }
15005
- resolveStream(text2);
15006
15138
  };
15007
15139
  stream.on("data", (chunk) => {
15008
15140
  if (settled) return;
15009
15141
  const buf = Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk);
15142
+ if (truncated) {
15143
+ writeToSink(buf);
15144
+ return;
15145
+ }
15010
15146
  if (totalBytes + buf.length >= maxBytes) {
15011
15147
  const remaining = Math.max(0, maxBytes - totalBytes);
15148
+ const headChunks = chunks2.slice();
15012
15149
  if (remaining > 0) {
15013
15150
  chunks2.push(buf.subarray(0, remaining));
15014
15151
  }
15015
- try {
15016
- if (typeof stream.destroy === "function") {
15017
- stream.destroy();
15018
- }
15019
- } catch {
15020
- }
15021
- finalize2(true);
15152
+ totalBytes += buf.length;
15153
+ truncated = true;
15154
+ openSpill(headChunks, buf);
15022
15155
  return;
15023
15156
  }
15024
15157
  totalBytes += buf.length;
@@ -15027,6 +15160,19 @@ function readNodeStream(stream, maxBytes = DEFAULT_MAX_STREAM_BUFFER_BYTES) {
15027
15160
  stream.on("error", (error) => {
15028
15161
  if (settled) return;
15029
15162
  settled = true;
15163
+ const sink = spillSink;
15164
+ spillSink = null;
15165
+ if (!spillError) spillError = toErrorMessage(error);
15166
+ if (spillState !== "failed" && spillState !== "disabled") {
15167
+ spillState = "failed";
15168
+ }
15169
+ if (sink) {
15170
+ try {
15171
+ sink.destroy?.();
15172
+ } catch {
15173
+ }
15174
+ }
15175
+ resumeSourceIfPaused();
15030
15176
  rejectStream(error);
15031
15177
  });
15032
15178
  stream.on("end", () => finalize2(false));
@@ -15139,8 +15285,12 @@ async function runWorkspaceCommand(args2) {
15139
15285
  process.removeListener("SIGINT", cleanupChildOnHostSignal);
15140
15286
  };
15141
15287
  exitPromise.then(detachSignalCleanup, detachSignalCleanup);
15142
- const stdoutCapture = stdoutPromiseResult(readNodeStream(proc.stdout));
15143
- const stderrCapture = stdoutPromiseResult(readNodeStream(proc.stderr));
15288
+ const stdoutCapture = stdoutPromiseResult(
15289
+ readNodeStream(proc.stdout, { spillPath: join4(tmpdir(), `nolo-stream-${randomUUID()}.log`) })
15290
+ );
15291
+ const stderrCapture = stdoutPromiseResult(
15292
+ readNodeStream(proc.stderr, { spillPath: join4(tmpdir(), `nolo-stream-${randomUUID()}-stderr.log`) })
15293
+ );
15144
15294
  const killChild = (signal) => {
15145
15295
  if (detached && typeof proc.pid === "number") {
15146
15296
  try {
@@ -15549,11 +15699,11 @@ async function invokeCapability(capabilityOrName, input, ctx = {}) {
15549
15699
  }
15550
15700
 
15551
15701
  // packages/agent-runtime/localWorkspaceTools.ts
15552
- import { existsSync as existsSync3 } from "node:fs";
15702
+ import { existsSync as existsSync4 } from "node:fs";
15553
15703
  import { createHash as createHash4 } from "node:crypto";
15554
15704
  import { lstat, mkdir, readdir as readdir2, readFile as readFile3, realpath, stat as stat3, writeFile } from "node:fs/promises";
15555
15705
  import { homedir } from "node:os";
15556
- import { dirname, isAbsolute as isAbsolute2, relative as relative3, resolve as resolve4, sep } from "node:path";
15706
+ import { dirname as dirname2, isAbsolute as isAbsolute2, relative as relative3, resolve as resolve4, sep } from "node:path";
15557
15707
  import { spawn as spawnChildProcess3 } from "node:child_process";
15558
15708
 
15559
15709
  // packages/core/readRangeLedger.ts
@@ -16835,7 +16985,7 @@ function resolveRipgrepBinary(env = process.env) {
16835
16985
  const fromEnv = asOptionalTrimmedString(env.NOLO_BUNDLED_RG);
16836
16986
  if (fromEnv) {
16837
16987
  try {
16838
- if (existsSync3(fromEnv)) return fromEnv;
16988
+ if (existsSync4(fromEnv)) return fromEnv;
16839
16989
  } catch {
16840
16990
  }
16841
16991
  }
@@ -16941,6 +17091,7 @@ ${tail}`,
16941
17091
  };
16942
17092
  }
16943
17093
  var READ_FILE_LEDGER_MAX_RECORDS = 64;
17094
+ var READ_FILE_LEDGER_MAX_KEYS = 256;
16944
17095
  async function readFileTool(args2) {
16945
17096
  const parsed = parseWorkspaceToolArguments(args2.call.arguments);
16946
17097
  const requestedPath = requireWorkspaceToolPath(parsed);
@@ -16979,6 +17130,8 @@ async function readFileTool(args2) {
16979
17130
  const retainedCap = resolveHistoricalToolContentCap("readFile", 0);
16980
17131
  const retained = filterRetainedLedgerRecords(entry.records, retainedCap);
16981
17132
  if (retained.length > 0 && isLineRangeCovered(requestRange, retained)) {
17133
+ ledger.delete(relativePath);
17134
+ ledger.set(relativePath, entry);
16982
17135
  return {
16983
17136
  content: `[readFile] ${relativePath} lines ${requestRange.startLine}-${requestRange.endLine} were already delivered earlier and the file is unchanged; not resending. Pass force:true to refetch.`,
16984
17137
  metadata: {
@@ -17011,10 +17164,16 @@ async function readFileTool(args2) {
17011
17164
  const persistedChars = truncatedRead.content.length + "\n\n[tool metadata]\n".length + JSON.stringify(metadata).length;
17012
17165
  const records = entry?.records ?? [];
17013
17166
  records.push({ ...requestRange, chars: persistedChars });
17167
+ ledger.delete(relativePath);
17014
17168
  ledger.set(relativePath, {
17015
17169
  fingerprint,
17016
17170
  records: records.slice(-READ_FILE_LEDGER_MAX_RECORDS)
17017
17171
  });
17172
+ while (ledger.size > READ_FILE_LEDGER_MAX_KEYS) {
17173
+ const oldestKey = ledger.keys().next().value;
17174
+ if (oldestKey === void 0) break;
17175
+ ledger.delete(oldestKey);
17176
+ }
17018
17177
  }
17019
17178
  return { content: truncatedRead.content, metadata };
17020
17179
  }
@@ -17027,7 +17186,7 @@ async function writeFileTool(args2) {
17027
17186
  requestedPath,
17028
17187
  ...args2.confirmExternalFileAccess ? { confirmExternalFileAccess: args2.confirmExternalFileAccess } : {}
17029
17188
  });
17030
- await mkdir(dirname(absolutePath), { recursive: true });
17189
+ await mkdir(dirname2(absolutePath), { recursive: true });
17031
17190
  await writeFile(absolutePath, content, "utf8");
17032
17191
  const relativePath = normalizeWorkspaceRelativePath({
17033
17192
  workspaceRoot: resolve4(args2.workspaceRoot),
@@ -17484,7 +17643,7 @@ async function execShellTool(args2) {
17484
17643
  );
17485
17644
  }
17486
17645
  var LAUNCH_PROCESS_STREAM_RING_CHARS = 65536;
17487
- var LAUNCH_PROCESS_STREAM_CAPTURE_MAX_CHARS = 4e6;
17646
+ var LAUNCH_PROCESS_STREAM_CAPTURE_MAX_CHARS = 1e6;
17488
17647
  function createLaunchProcessStreamCapture() {
17489
17648
  let ring = "";
17490
17649
  let full = null;
@@ -18708,7 +18867,7 @@ var normalizeContextBlockScopes = (legacyBlocks = void 0, scopes = void 0) => {
18708
18867
  };
18709
18868
 
18710
18869
  // packages/agent-runtime/localAutoCompaction.ts
18711
- import { randomUUID } from "node:crypto";
18870
+ import { randomUUID as randomUUID2 } from "node:crypto";
18712
18871
  function toPlanCompressionMessages(history) {
18713
18872
  return history.map((message, index) => ({
18714
18873
  id: typeof message.id === "string" && message.id.length > 0 ? message.id : `local-${index}`,
@@ -18943,7 +19102,7 @@ async function maybeAutoCompactLocalHistory(args2) {
18943
19102
  };
18944
19103
  }
18945
19104
  emitPhase({ kind: "compaction-start" });
18946
- const compactionAttemptId = randomUUID();
19105
+ const compactionAttemptId = randomUUID2();
18947
19106
  let compactionT0 = Date.now();
18948
19107
  let compactionInputTokens;
18949
19108
  let compactionPrevSummaryTokens;
@@ -19783,6 +19942,8 @@ async function runLocalAgentTurn(input) {
19783
19942
  // 并行是默认:系统层固定块,紧随红线(localLoop 无 static 作用域,用 session 占位,
19784
19943
  // 「最顶」由数组首位保证——与红线同一约定)。
19785
19944
  { content: PARALLEL_DISPATCH_DEFAULT_RULE, cacheScope: "session" },
19945
+ // 派发落点:并行派发纪律的下一层(派到哪个执行后端),沿用 session 占位约定。
19946
+ { content: DISPATCH_BACKEND_POLICY, cacheScope: "session" },
19786
19947
  // 平台风控纪律:无条件系统层块,沿用 session 占位约定。
19787
19948
  { content: PLATFORM_RISK_CONTROL_RULE, cacheScope: "session" },
19788
19949
  { content: buildConsultationModeBlock(), cacheScope: "session" },
@@ -19856,12 +20017,8 @@ async function runLocalAgentTurn(input) {
19856
20017
  `[nolo] rewrote ${stats.rewrittenToolCalls} tool calls in ${stats.rewrittenAssistantMessages} assistant messages and ${stats.rewrittenToolMessages} tool-result messages (bad arguments: truncated=${stats.badArguments.truncated}, malformed=${stats.badArguments.malformed}); persisted history untouched`
19857
20018
  );
19858
20019
  }
19859
- const supportsImages = resolveAgentImageInputSupport({
19860
- apiSource: agentConfig.apiSource,
19861
- provider: agentConfig.provider,
19862
- model: agentConfig.model,
19863
- hasVision: agentConfig.hasVision
19864
- });
20020
+ const supportsImages = resolveAgentImageInputSupport(agentConfig);
20021
+ let imageDowngradeEmitted = false;
19865
20022
  if (!supportsImages && hasImageInRuntimeMessages(messages)) {
19866
20023
  messages = filterImagePartsFromMessages(messages, false);
19867
20024
  emitLoopEvent(observationBoundary, {
@@ -19869,6 +20026,7 @@ async function runLocalAgentTurn(input) {
19869
20026
  reason: "no-vision",
19870
20027
  atMs: Date.now()
19871
20028
  });
20029
+ imageDowngradeEmitted = true;
19872
20030
  }
19873
20031
  const prefixCount = builtMessages.prefixCount;
19874
20032
  const capToolMessage = (msg) => msg.role === "tool" && typeof msg.content === "string" ? {
@@ -19935,6 +20093,14 @@ async function runLocalAgentTurn(input) {
19935
20093
  roundBudgetWarningInjected = true;
19936
20094
  }
19937
20095
  const preparedMessages = prepareMessagesForProviderCall(transcript.working());
20096
+ if (!supportsImages && hasImageInRuntimeMessages(preparedMessages.messages) && !imageDowngradeEmitted) {
20097
+ emitLoopEvent(observationBoundary, {
20098
+ kind: "image-downgraded",
20099
+ reason: "no-vision",
20100
+ atMs: Date.now()
20101
+ });
20102
+ imageDowngradeEmitted = true;
20103
+ }
19938
20104
  const baseRequestMessages = filterImagePartsFromMessages(
19939
20105
  preparedMessages.messages,
19940
20106
  supportsImages
@@ -21701,7 +21867,7 @@ function buildLoadSkillExecutor(args2) {
21701
21867
  const { resolveSkillByName } = await import("./skillDiscovery-QC35EQY4.js");
21702
21868
  const resolved = resolveSkillByName(args2.cwd, name);
21703
21869
  if (!resolved) {
21704
- const { resolveBuiltinSkillByName } = await import("./builtinSkillRegistry-H3AY27TR.js");
21870
+ const { resolveBuiltinSkillByName } = await import("./builtinSkillRegistry-LJV7FHNI.js");
21705
21871
  const builtin = resolveBuiltinSkillByName(name);
21706
21872
  if (builtin) {
21707
21873
  return {
@@ -21779,7 +21945,7 @@ function resolveSessionKey(args2) {
21779
21945
  }
21780
21946
 
21781
21947
  // packages/agent-runtime/devin/devinProvider.ts
21782
- import { randomBytes, randomUUID as randomUUID2 } from "node:crypto";
21948
+ import { randomBytes, randomUUID as randomUUID3 } from "node:crypto";
21783
21949
  var CLIENT_NAME = "chisel";
21784
21950
  var CLIENT_VERSION = "3000.11.3";
21785
21951
  function writeVarint(fieldNum, value) {
@@ -21839,7 +22005,7 @@ function encodeDevinClientMetadata(token) {
21839
22005
  ]);
21840
22006
  }
21841
22007
  function devinId(id, purpose) {
21842
- return id?.sessionKey && isStableSessionIdentityEnabled() ? deriveStableUuid(id.sessionKey, purpose) : randomUUID2();
22008
+ return id?.sessionKey && isStableSessionIdentityEnabled() ? deriveStableUuid(id.sessionKey, purpose) : randomUUID3();
21843
22009
  }
21844
22010
  function encodeDevinChatMessage(msg, identity2, index = 0) {
21845
22011
  const source = msg.role === "assistant" ? 2 : msg.role === "tool" ? 4 : 1;
@@ -21933,7 +22099,7 @@ ${item.text}`;
21933
22099
  const chatMessageBuffers = coalesced.map((m, i) => encodeDevinChatMessage(m, identity2, i));
21934
22100
  const completionConfig = buildCompletionConfig({ temperature });
21935
22101
  const modelConfig = Buffer.concat([
21936
- writeStringField(1, randomUUID2()),
22102
+ writeStringField(1, randomUUID3()),
21937
22103
  writeVarint(2, 1),
21938
22104
  writeVarint(3, 4)
21939
22105
  ]);
@@ -21945,7 +22111,7 @@ ${item.text}`;
21945
22111
  writeMessageField(8, completionConfig),
21946
22112
  ...tools.map((tool) => writeMessageField(10, encodeDevinToolDefinition(tool))),
21947
22113
  writeMessageField(15, modelConfig),
21948
- writeStringField(16, randomUUID2()),
22114
+ writeStringField(16, randomUUID3()),
21949
22115
  writeVarint(20, 1),
21950
22116
  writeStringField(21, model)
21951
22117
  ]);
@@ -10,9 +10,6 @@ import {
10
10
  import {
11
11
  createAgentKey
12
12
  } from "./chunk-5EMSBTQ6.js";
13
- import {
14
- toErrorMessage
15
- } from "./chunk-HNMXYYJR.js";
16
13
  import {
17
14
  parseUserIdFromAuthToken,
18
15
  readOption,
@@ -24,6 +21,9 @@ import {
24
21
  readPipeText,
25
22
  spawnProcess
26
23
  } from "./chunk-Y6ROFCZO.js";
24
+ import {
25
+ toErrorMessage
26
+ } from "./chunk-HNMXYYJR.js";
27
27
 
28
28
  // packages/cli/agentRecordHelpers.ts
29
29
  import { readFileSync } from "node:fs";
@@ -556,7 +556,7 @@ async function buildCreatedAgentRecord(args) {
556
556
  const resolvedAgentInput = resolveCliAgentKeyInput(args.parsed.agentInput);
557
557
  const agentKey = resolvedAgentInput.startsWith("agent-") ? resolvedAgentInput : createAgentKey.private(userId || "local", resolvedAgentInput);
558
558
  if (args.parsed.presetId) {
559
- const { resolveProviderPresetFields } = await import("./providerPresetApply-GSJI4JBJ.js");
559
+ const { resolveProviderPresetFields } = await import("./providerPresetApply-PKUOHQJT.js");
560
560
  const fields = resolveProviderPresetFields(args.parsed.presetId);
561
561
  if (fields.kind === "manual") {
562
562
  throw new Error(
@@ -5,7 +5,7 @@ import {
5
5
  getAntigravityUserAgent,
6
6
  readAntigravityProjectId,
7
7
  resolveAntigravityCloudCodeBaseUrl
8
- } from "./chunk-JGRPBIZZ.js";
8
+ } from "./chunk-SQX235S2.js";
9
9
  import {
10
10
  asOptionalTrimmedString
11
11
  } from "./chunk-G3SUCT4W.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  getRuntimeServerContext,
3
3
  scheduleDeleteReplication
4
- } from "./chunk-2SGAI64X.js";
4
+ } from "./chunk-43OFVLWJ.js";
5
5
  import {
6
6
  fetchFromClientDb
7
7
  } from "./chunk-6Q7UTJKR.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getModelPricing
3
- } from "./chunk-YANF2RR4.js";
3
+ } from "./chunk-ZPKUJROL.js";
4
4
  import {
5
5
  PUBLIC_DEEPSEEK_V4_FLASH_AGENT_ID,
6
6
  PUBLIC_DEEPSEEK_V4_PRO_AGENT_ID,
@@ -23,7 +23,7 @@ import {
23
23
  } from "./chunk-M2EJHDJP.js";
24
24
  import {
25
25
  getModelConfig
26
- } from "./chunk-TRW43TSC.js";
26
+ } from "./chunk-6EQD4AQL.js";
27
27
  import {
28
28
  isRecord
29
29
  } from "./chunk-KUG52IAP.js";
@@ -7,7 +7,7 @@ import {
7
7
  scheduleExistingRecordReplication,
8
8
  shouldReplaceLocalWithRemoteRecord,
9
9
  shouldReplicateLocalRecord
10
- } from "./chunk-2SGAI64X.js";
10
+ } from "./chunk-43OFVLWJ.js";
11
11
  import {
12
12
  fetchFromClientDb,
13
13
  fetchFromServer,
@@ -2,7 +2,7 @@ import {
2
2
  deleteDbRecord,
3
3
  queryUserRecords,
4
4
  readDbRecord
5
- } from "./chunk-ZEY4NJRE.js";
5
+ } from "./chunk-KABQ74UQ.js";
6
6
  import {
7
7
  mergeAndDedupUserData
8
8
  } from "./chunk-OXME3PEE.js";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  toolRegistry
3
- } from "./chunk-XJOBYJWN.js";
3
+ } from "./chunk-2ZYCNT2O.js";
4
4
  import {
5
5
  runtime_default
6
- } from "./chunk-T64RZQBO.js";
6
+ } from "./chunk-F5WASHQA.js";
7
7
  import {
8
8
  canonicalizeToolNames
9
9
  } from "./chunk-5EBLANFT.js";
@@ -4,7 +4,7 @@ import {
4
4
  resolvePlatformHostedCredentialProvider,
5
5
  resolvePlatformProxyChatGatewayEndpoint,
6
6
  resolvePlatformResponsesEndpoint
7
- } from "./chunk-I2RMFLLH.js";
7
+ } from "./chunk-V7PCFWX3.js";
8
8
  import {
9
9
  CLI_PROVIDER_VALUES
10
10
  } from "./chunk-5BHQICF2.js";
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  estimateTokenCount
3
3
  } from "./chunk-PSCNXBYA.js";
4
- import {
5
- MODEL_LOOKUP_MAP
6
- } from "./chunk-TRW43TSC.js";
7
4
  import {
8
5
  ALL_MODELS
9
6
  } from "./chunk-FYYSDHVQ.js";
7
+ import {
8
+ MODEL_LOOKUP_MAP
9
+ } from "./chunk-6EQD4AQL.js";
10
10
  import {
11
11
  isPlatformManagedProvider
12
12
  } from "./chunk-CGFNDIKK.js";