nolo-cli 0.156.0-alpha.2 → 0.156.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 (164) hide show
  1. package/{_executeModel-5WS2PA62.js → _executeModel-3FMHTHSS.js} +55 -55
  2. package/{accountResolver-7RYB4D2P.js → accountResolver-55EDKEIK.js} +1 -1
  3. package/{action-ZJYUBXFC.js → action-GPPJC5TI.js} +5 -5
  4. package/{addContentAction-TVHB4526.js → addContentAction-XJQEJ4XW.js} +8 -8
  5. package/{addDialogAgentAction-FDPBU6K6.js → addDialogAgentAction-5WZX5CAY.js} +7 -7
  6. package/{agentDeleteCommand-MDC7OS3I.js → agentDeleteCommand-VRHLJZKX.js} +75 -76
  7. package/{agentEmailCommands-WN4EOPKQ.js → agentEmailCommands-YGBQXOL3.js} +78 -79
  8. package/{agentListCommands-G36AMSBR.js → agentListCommands-GOCGOQUB.js} +36 -36
  9. package/{agentMachineCommands-63GXO27A.js → agentMachineCommands-FBAWZYHI.js} +35 -32
  10. package/{agentProviderCommands-X2HQE6HY.js → agentProviderCommands-CXBHNONN.js} +5 -5
  11. package/{agentPullCommand-FA43RBRU.js → agentPullCommand-GXXEDOSA.js} +4 -4
  12. package/{agentRecordCommands-X4WJRHDW.js → agentRecordCommands-KAK2G56H.js} +72 -73
  13. package/{agentRunCommand-4YMIVVHF.js → agentRunCommand-62P3AGJA.js} +75 -75
  14. package/{agentRunControl-2C5GM3BW.js → agentRunControl-XBSNHHZE.js} +7 -7
  15. package/{agentRuntimeLocal-Q7ZOMZC7.js → agentRuntimeLocal-J6I63NZC.js} +21 -19
  16. package/{agentSlice-E3XS5FTQ.js → agentSlice-IZFU3WWH.js} +8 -8
  17. package/{appDeleteCommands-MMWT54BR.js → appDeleteCommands-KKLAK2UR.js} +31 -29
  18. package/{appDeployCommands-OIFXVDOF.js → appDeployCommands-PXWK4FAX.js} +31 -29
  19. package/{appDeployStatusCommands-OTXMSDFB.js → appDeployStatusCommands-3NGWDZTX.js} +31 -29
  20. package/{appGetCommands-JPY36ANL.js → appGetCommands-APWYPEO3.js} +31 -29
  21. package/{appListCommands-IHJGN36O.js → appListCommands-OP7IRALO.js} +31 -29
  22. package/{authCommand-J3XILHWW.js → authCommand-3Z52KJID.js} +22 -302
  23. package/{authCommands-77CHYBGF.js → authCommands-QOCKVPX3.js} +5 -5
  24. package/{builtinSkillRegistry-A6VSPJEJ.js → builtinSkillRegistry-LJV7FHNI.js} +4 -4
  25. package/{chromeCommands-OBBNJCLS.js → chromeCommands-IY4NVSXZ.js} +17 -10
  26. package/{chunk-SW4S4XYB.js → chunk-2AB2HA4M.js} +84 -34
  27. package/{chunk-H4KACZMG.js → chunk-2QQ7D3P5.js} +271 -138
  28. package/{chunk-C5VPAHIU.js → chunk-32ZKZET7.js} +1 -1
  29. package/{chunk-FPWT3RH2.js → chunk-36IWXF25.js} +22 -22
  30. package/{chunk-XPWGOTBQ.js → chunk-3L2WKC3W.js} +1 -8
  31. package/{chunk-3XZKV7QQ.js → chunk-3L5MSPWX.js} +1 -1
  32. package/{chunk-QLQ573SU.js → chunk-3M52COK5.js} +120 -0
  33. package/{chunk-Z6KQDSZW.js → chunk-43OFVLWJ.js} +6 -6
  34. package/{chunk-7A4LJCDR.js → chunk-4FDDVVCE.js} +5 -5
  35. package/{chunk-TJ2VPCBE.js → chunk-4JCAW7TO.js} +2 -2
  36. package/{chunk-6TF64IF2.js → chunk-4L4K6YR7.js} +16 -2
  37. package/{chunk-ZG73GDYU.js → chunk-5E5VB7PS.js} +332 -59
  38. package/{chunk-HKT6QXP3.js → chunk-5IKRTRRR.js} +5 -5
  39. package/{chunk-P5QACQDK.js → chunk-62TBKWTV.js} +1 -1
  40. package/{chunk-TRW43TSC.js → chunk-6EQD4AQL.js} +41 -1
  41. package/{chunk-RUNKPFM5.js → chunk-6QIBWOPT.js} +12 -8
  42. package/{chunk-YLMMECCH.js → chunk-6XIE5ZGI.js} +1 -1
  43. package/{chunk-7GC3EKUG.js → chunk-7PDNSQZC.js} +3 -3
  44. package/{chunk-DW7MGLMG.js → chunk-7YQQXP42.js} +35 -207
  45. package/{chunk-WZ6OU4NX.js → chunk-BAWAKW7X.js} +2 -2
  46. package/{chunk-UUPR3TD7.js → chunk-BL4HFN6L.js} +2 -4
  47. package/{chunk-2GGXHQIW.js → chunk-BLVSFYQ3.js} +4 -2
  48. package/{chunk-HP6O6LTV.js → chunk-CDLP56BS.js} +9 -9
  49. package/{chunk-4LRK5Q2Z.js → chunk-CI6YDDL2.js} +18 -17
  50. package/{chunk-5MM7NNO6.js → chunk-CNWKLQRL.js} +8 -3
  51. package/{chunk-UTIMX333.js → chunk-DJ2BOPJY.js} +1 -1
  52. package/{chunk-36OMEXXR.js → chunk-DLV3H464.js} +8 -8
  53. package/{chunk-X5SUT4CN.js → chunk-EDJND3FK.js} +6 -6
  54. package/{chunk-CE7PIHQD.js → chunk-ESMZW5PE.js} +3 -3
  55. package/{chunk-PSJWPSKS.js → chunk-EWO77ZGF.js} +9 -43
  56. package/{chunk-ZWG3C7VI.js → chunk-F3SOW2EU.js} +81 -1
  57. package/{chunk-FY4SDK2E.js → chunk-FDLDMJTM.js} +1 -1
  58. package/chunk-FTHF2P2I.js +2685 -0
  59. package/{chunk-7KYVUFDG.js → chunk-G3VYRPTV.js} +5 -267
  60. package/{chunk-NQ64VVAI.js → chunk-GXZZOTDM.js} +826 -689
  61. package/{chunk-6MJNEXUU.js → chunk-HGDKT2D6.js} +4 -0
  62. package/{chunk-6KVZAZJA.js → chunk-HRZW3SQN.js} +7 -7
  63. package/{chunk-B2EGWZJG.js → chunk-I7S63QUU.js} +1 -1
  64. package/{chunk-ROPSATAB.js → chunk-IF7V3CBU.js} +1 -1
  65. package/{chunk-T6CBQ6BN.js → chunk-INFHX73M.js} +1 -1
  66. package/{chunk-YBNHPX4S.js → chunk-IW64YHXL.js} +155 -31
  67. package/{chunk-VSOWPETY.js → chunk-JIAZK434.js} +10 -10
  68. package/{chunk-K43ZF2C3.js → chunk-JPPQ3GUO.js} +1 -1
  69. package/{chunk-TZTWMGE3.js → chunk-JWEXJ573.js} +3 -3
  70. package/{chunk-OH2M7WEU.js → chunk-K3N2DWLT.js} +3 -3
  71. package/{chunk-I2ZMGXXF.js → chunk-KFHREHUQ.js} +1 -1
  72. package/{chunk-3C2QLERX.js → chunk-KMDDG73K.js} +1 -1
  73. package/{chunk-EM3YOZJ4.js → chunk-L2JMH4I5.js} +3 -3
  74. package/{chunk-D4OWHT5Y.js → chunk-MAYW6V3E.js} +2 -2
  75. package/{chunk-IPAW7XLD.js → chunk-MFVOJ6KF.js} +2 -2
  76. package/{chunk-CBHGZRCE.js → chunk-MYOH447Z.js} +1 -1
  77. package/{chunk-6MPAEODB.js → chunk-NHEWV5FD.js} +17 -3
  78. package/{chunk-SUKSWFLP.js → chunk-PIG2IUVZ.js} +1 -1
  79. package/{chunk-WP6RXNE6.js → chunk-PNACBSRF.js} +134 -126
  80. package/{chunk-SEJ5OS6F.js → chunk-PXYBUFDB.js} +4 -0
  81. package/{chunk-SKPPKHD3.js → chunk-Q5LVXPGT.js} +2 -2
  82. package/{chunk-2MTE2PEH.js → chunk-QA2C5NKI.js} +5 -739
  83. package/{chunk-XFKZ3MCV.js → chunk-QFL42TMV.js} +251 -77
  84. package/{chunk-L6EQV5OC.js → chunk-QXZH5UDF.js} +3 -3
  85. package/{chunk-TNIX77YM.js → chunk-R5GO3YZP.js} +34 -1
  86. package/{chunk-4Z245KOA.js → chunk-SH3XD4E2.js} +8 -4
  87. package/{chunk-MM3662RS.js → chunk-SNAWGDXT.js} +263 -4
  88. package/{chunk-JGRPBIZZ.js → chunk-SQX235S2.js} +1 -1
  89. package/chunk-TT644UJD.js +188 -0
  90. package/{chunk-IYBIRCQV.js → chunk-U34KT53V.js} +29 -11
  91. package/{chunk-KOB75UNU.js → chunk-U5U4WAFS.js} +19 -3
  92. package/{chunk-ANJTRG52.js → chunk-ULQAD7ZY.js} +18 -43
  93. package/{chunk-FDT27L7S.js → chunk-UUPXTEZA.js} +19 -17
  94. package/{chunk-QDA4Y5O6.js → chunk-V67W64OY.js} +21 -17
  95. package/{chunk-I2RMFLLH.js → chunk-V7PCFWX3.js} +1 -1
  96. package/{chunk-HXHSTRGH.js → chunk-VYNMQ6HW.js} +0 -27
  97. package/{chunk-G47IPDOK.js → chunk-W7FGZRLK.js} +1 -1
  98. package/{chunk-7BSQK2UC.js → chunk-WRCZXJ4N.js} +2 -2
  99. package/{chunk-KX6LPG7W.js → chunk-WYJTNSVL.js} +9 -9
  100. package/chunk-Y5GCAMGP.js +9 -0
  101. package/{chunk-JZX2XLKC.js → chunk-YCRROBDY.js} +1 -1
  102. package/{chunk-SCJD2PNK.js → chunk-YPG7TUQD.js} +3 -3
  103. package/{chunk-YANF2RR4.js → chunk-ZPKUJROL.js} +1 -1
  104. package/{chunk-TYND6RDQ.js → chunk-ZZDVBZOP.js} +74 -3
  105. package/{commandRegistry-NE2JOCQT.js → commandRegistry-2DDDET7G.js} +88 -96
  106. package/{contentThunks-B3FRQGP7.js → contentThunks-5DNEHJ2Z.js} +21 -21
  107. package/{createAgentAutomationAction-T2YFJ6MY.js → createAgentAutomationAction-4SUS2EFX.js} +21 -21
  108. package/{createDialogAction-2NFGFBXW.js → createDialogAction-JSFXX6JE.js} +25 -25
  109. package/{createPageAction-LDAVZDN7.js → createPageAction-37HHOXZ2.js} +24 -25
  110. package/{dbSlice-5QGKMQLO.js → dbSlice-6PVPY44C.js} +7 -7
  111. package/{deleteFile-EW6QNRRT.js → deleteFile-YM6NDPAR.js} +5 -5
  112. package/{dialogCommands-H3K7PTF6.js → dialogCommands-ZJRMCP4S.js} +35 -32
  113. package/{dialogSlice-64S3J6CP.js → dialogSlice-2Z66AWEW.js} +20 -20
  114. package/{dist-NJC2W7I4.js → dist-Q2JSMAKA.js} +7 -361
  115. package/{docCreateCommands-KP64KMVL.js → docCreateCommands-KQHQNLRX.js} +32 -30
  116. package/{docDeleteCommands-C3F4SZSR.js → docDeleteCommands-O3DWFX2W.js} +33 -31
  117. package/{docReadCommands-7H6BDOUR.js → docReadCommands-2U2BUONC.js} +32 -30
  118. package/{docStore-NIP7OO4I.js → docStore-XMTUF3GX.js} +8 -8
  119. package/{docUpdateCommands-JDW4BRBH.js → docUpdateCommands-MF3C52XI.js} +32 -30
  120. package/{getPricing-TX35D7PI.js → getPricing-XQ3N3RBP.js} +2 -2
  121. package/{handleSendMessageAction-TOKA7ED7.js → handleSendMessageAction-4VFVXTF2.js} +43 -39
  122. package/index.js +8 -8
  123. package/{localRuntimeAdapter-OPPDLUG3.js → localRuntimeAdapter-KKIVRYVN.js} +70 -69
  124. package/{localRuntimeAuthority-JDAD7CB6.js → localRuntimeAuthority-BPN5OAQG.js} +2 -2
  125. package/{localRuntimeDb-CVC62PM5.js → localRuntimeDb-QIVAXMUL.js} +1 -1
  126. package/{machineCommands-OPLQR7XY.js → machineCommands-UHQVCOD3.js} +80 -79
  127. package/{machineWsRunDispatch-PTS42QDK.js → machineWsRunDispatch-TX4X7TOJ.js} +70 -71
  128. package/{memberThunks-KRV5YXOB.js → memberThunks-AZINUM4S.js} +10 -10
  129. package/package.json +6 -2
  130. package/{profileConfig-ZGOFORWV.js → profileConfig-KN3N2BLF.js} +7 -1
  131. package/{providerPresetApply-CRZFMQD5.js → providerPresetApply-PKUOHQJT.js} +5 -5
  132. package/{providerRegistry-7IS43D3X.js → providerRegistry-HNQLIFN2.js} +5 -5
  133. package/{read-5KAZHHDM.js → read-7JPIWRBQ.js} +5 -5
  134. package/{readDocTool-5QO34OSX.js → readDocTool-AAQTB2Y3.js} +1 -1
  135. package/{readlineWorkspace-3XC7SEMZ.js → readlineWorkspace-BFVB2ON5.js} +375 -200
  136. package/{removeDialogAgentAction-6X63HMI3.js → removeDialogAgentAction-RMVRILLK.js} +9 -9
  137. package/{runAgentClientLoop-5QIGEALK.js → runAgentClientLoop-HHLHNMBE.js} +59 -54
  138. package/{runtimeDoctorCommands-56NWKNON.js → runtimeDoctorCommands-MMCP4B4U.js} +12 -12
  139. package/{secretCommands-ZXZRLR3R.js → secretCommands-DNY56NSU.js} +11 -1
  140. package/{setDialogExtraReferencesAction-4MAYKKYW.js → setDialogExtraReferencesAction-L3V7JTMG.js} +8 -8
  141. package/{setPrimaryDialogAgentAction-EGBAMREH.js → setPrimaryDialogAgentAction-X52JQGTJ.js} +9 -9
  142. package/settingThunks-N6XFWPOU.js +923 -0
  143. package/{spaceCommands-JQN7D4FE.js → spaceCommands-NDPGHDMD.js} +29 -27
  144. package/{streamAgentChatTurn-456DWXNY.js → streamAgentChatTurn-KNPOLET7.js} +154 -95
  145. package/{switchDialogAgentAction-YBKTD6DO.js → switchDialogAgentAction-ZJ5CGU7J.js} +7 -7
  146. package/{tableCommands-U3QDY4L6.js → tableCommands-IVC5S7Y3.js} +11 -11
  147. package/{toolApiClient-7WSJJJBV.js → toolApiClient-HGNO53TC.js} +2 -2
  148. package/{tools-IWNXKK4Y.js → tools-ULA7XJQT.js} +43 -44
  149. package/{tuiSummaryLlmCaller-KLK6K3Q3.js → tuiSummaryLlmCaller-FESHBDTT.js} +7 -7
  150. package/{updateCommands-NQXAGFM7.js → updateCommands-FJHGWD3Q.js} +5 -3
  151. package/{updateDialogTitleAction-SX53FZWO.js → updateDialogTitleAction-VUIVBDAS.js} +21 -21
  152. package/{workloadLifecycle-36DXRZKU.js → workloadLifecycle-6O6PMISX.js} +2 -2
  153. package/chunk-IA7TRNNR.js +0 -11
  154. package/chunk-UKZX3NHN.js +0 -48
  155. package/chunk-VAZHH6FO.js +0 -7012
  156. package/chunk-W4S6OTSC.js +0 -35
  157. package/clipboardy-GCO3GT3I.js +0 -11793
  158. package/settingThunks-FTDRZNSJ.js +0 -1371
  159. package/{agentGrantCommands-HOJ3JBBQ.js → agentGrantCommands-5DPHYEKP.js} +3 -3
  160. package/{chromeOpsCommands-3Z34RKSE.js → chromeOpsCommands-GZVVK7HU.js} +4 -4
  161. package/{chunk-XETG4RIX.js → chunk-AETZ7AD6.js} +4 -4
  162. package/{chunk-2IXDJNZI.js → chunk-GAGGEA7D.js} +3 -3
  163. package/{memoryCommands-CUNBFRVS.js → memoryCommands-ZS3VQJAL.js} +3 -3
  164. package/{offlineMarxistsAgentCommand-2QTHJCHV.js → offlineMarxistsAgentCommand-3GLX4QQY.js} +3 -3
@@ -9,10 +9,10 @@ import {
9
9
  resolveRawAgentInput,
10
10
  resolveServerUrl,
11
11
  writeUsage
12
- } from "./chunk-KOB75UNU.js";
12
+ } from "./chunk-U5U4WAFS.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-NQ64VVAI.js";
30
+ } from "./chunk-GXZZOTDM.js";
31
31
  import {
32
32
  clearCredentialAvailability,
33
33
  readCredentialEntry,
@@ -39,7 +39,7 @@ import {
39
39
  t,
40
40
  toolLabel,
41
41
  toolLabelVariants
42
- } from "./chunk-SW4S4XYB.js";
42
+ } from "./chunk-2AB2HA4M.js";
43
43
  import {
44
44
  _appendEntityBatch,
45
45
  _appendEvidenceBatch,
@@ -54,10 +54,13 @@ import {
54
54
  loadMemoryVNextCatalog,
55
55
  putMemoryEvidenceVNext
56
56
  } from "./chunk-TY3TIUJK.js";
57
+ import {
58
+ parsePositiveFiniteNumberOrFallback
59
+ } from "./chunk-Y5GCAMGP.js";
57
60
  import {
58
61
  readDbRecord,
59
62
  resolveAgentRecordFromHybridStore
60
- } from "./chunk-HKT6QXP3.js";
63
+ } from "./chunk-5IKRTRRR.js";
61
64
  import {
62
65
  isLocalCliAgentKey
63
66
  } from "./chunk-NBTY7YJF.js";
@@ -72,49 +75,46 @@ import {
72
75
  } from "./chunk-BMQ2MJUK.js";
73
76
  import {
74
77
  resolveCliLocalRuntimeKeyCapability
75
- } from "./chunk-XFKZ3MCV.js";
78
+ } from "./chunk-QFL42TMV.js";
76
79
  import {
77
80
  isTransientFetchError
78
- } from "./chunk-I2ZMGXXF.js";
81
+ } from "./chunk-KFHREHUQ.js";
79
82
  import {
80
83
  parseUiCard,
81
84
  uiCardFallback
82
- } from "./chunk-RUNKPFM5.js";
85
+ } from "./chunk-6QIBWOPT.js";
83
86
  import {
84
87
  isGatewayHttpStatus
85
88
  } from "./chunk-NF64D32W.js";
86
- import {
87
- parsePositiveFiniteNumberOrFallback
88
- } from "./chunk-XPWGOTBQ.js";
89
89
  import {
90
90
  buildMemorySubjectsForAgent,
91
91
  chooseMemoryOwners,
92
92
  loadMemoryCandidatesFromDb,
93
93
  resolveAgentMemoryPolicy
94
- } from "./chunk-7A4LJCDR.js";
94
+ } from "./chunk-4FDDVVCE.js";
95
95
  import {
96
96
  API_REPORTED_COST_MULTIPLIER,
97
- parseUiAskChoiceContent
98
- } from "./chunk-H4KACZMG.js";
97
+ estimateMessagesTokens,
98
+ parseUiAskChoiceContent,
99
+ resolveAgentContextWindow,
100
+ resolveOccupancy,
101
+ resolveOccupancyWindow
102
+ } from "./chunk-2QQ7D3P5.js";
99
103
  import {
100
- isOAuthApiKeyRef
101
- } from "./chunk-UKZX3NHN.js";
104
+ buildSkillDiscoveryContextLayer
105
+ } from "./chunk-AU7AXHUL.js";
102
106
  import {
103
107
  parseExternalSkillMarkdown,
104
108
  parseSkillDocProtocol
105
- } from "./chunk-XETG4RIX.js";
109
+ } from "./chunk-AETZ7AD6.js";
106
110
  import {
107
111
  LOCAL_AGENT_CONFIG_MISSING_CODE,
108
112
  LOCAL_TURN_ABORTED_CODE,
109
113
  readActionGate
110
- } from "./chunk-ZG73GDYU.js";
114
+ } from "./chunk-5E5VB7PS.js";
111
115
  import {
112
- devinChannelContextWindow,
113
116
  resolveAgentRuntimeConfigFromRecord
114
- } from "./chunk-ANJTRG52.js";
115
- import {
116
- isDevinOAuthAgent
117
- } from "./chunk-5ZUL4CUO.js";
117
+ } from "./chunk-ULQAD7ZY.js";
118
118
  import {
119
119
  createThinkParserState,
120
120
  flushThinkParser,
@@ -136,11 +136,9 @@ import {
136
136
  resolveCredentialKeyWithFallback
137
137
  } from "./chunk-3MZAGMYY.js";
138
138
  import {
139
+ isOAuthApiKeyRef,
139
140
  normalizeUsage
140
- } from "./chunk-ZWG3C7VI.js";
141
- import {
142
- findModelContextWindow
143
- } from "./chunk-2MTE2PEH.js";
141
+ } from "./chunk-F3SOW2EU.js";
144
142
  import {
145
143
  clipCompactText
146
144
  } from "./chunk-5MMAK75Q.js";
@@ -151,6 +149,13 @@ import {
151
149
  normalizeRuntimeToolPolicyOverride,
152
150
  resolveEffectiveRuntimeToolPolicy
153
151
  } from "./chunk-LIQJTQRN.js";
152
+ import {
153
+ buildAgentsMdLayer,
154
+ buildMemoryOverlayLayer,
155
+ buildMemoryUseGuidanceLayer,
156
+ partitionScopedBlocks,
157
+ renderTurnContextBlocksWithScope
158
+ } from "./chunk-VEA7H5FG.js";
154
159
  import {
155
160
  BUILTIN_NOLO_AGENT_KEY,
156
161
  BUILTIN_NOLO_AGENT_NAME,
@@ -164,9 +169,6 @@ import {
164
169
  createMemoryKey,
165
170
  ulid
166
171
  } from "./chunk-5EMSBTQ6.js";
167
- import {
168
- isAntigravityOAuthAgent
169
- } from "./chunk-JGRPBIZZ.js";
170
172
  import {
171
173
  createRunActivityTracker,
172
174
  createShellApprovalChild,
@@ -179,7 +181,7 @@ import {
179
181
  serverOriginForDialog,
180
182
  settleRunTerminalAuthoritatively,
181
183
  spawnLocalBackgroundRun
182
- } from "./chunk-MM3662RS.js";
184
+ } from "./chunk-SNAWGDXT.js";
183
185
  import {
184
186
  formatAgentListCard,
185
187
  formatFinishedRunCard,
@@ -190,29 +192,14 @@ import {
190
192
  formatStopRunCard,
191
193
  isAgentRunTerminalStatus
192
194
  } from "./chunk-PJNFNEJE.js";
193
- import {
194
- estimateTokenCount
195
- } from "./chunk-PSCNXBYA.js";
196
- import {
197
- resolveClientVersion
198
- } from "./chunk-SUKSWFLP.js";
199
- import {
200
- findModelConfig
201
- } from "./chunk-TRW43TSC.js";
202
- import {
203
- asTrimmedString
204
- } from "./chunk-3EUW3WEO.js";
205
195
  import {
206
196
  isCliAuthorityBrokerProtocolError,
207
197
  isCliAuthorityBrokerTimeoutError,
208
198
  isCliAuthorityBrokerUnavailableError
209
199
  } from "./chunk-EXAJ6DCR.js";
210
- import {
211
- toErrorMessage
212
- } from "./chunk-HNMXYYJR.js";
213
200
  import {
214
201
  getDefaultCliLocalRuntimeDb
215
- } from "./chunk-FY4SDK2E.js";
202
+ } from "./chunk-FDLDMJTM.js";
216
203
  import {
217
204
  getLogger,
218
205
  normalizeError
@@ -220,13 +207,28 @@ import {
220
207
  import {
221
208
  resolveAuthToken
222
209
  } from "./chunk-A7GB5UGH.js";
223
- import {
224
- asOptionalTrimmedString
225
- } from "./chunk-G3SUCT4W.js";
226
210
  import {
227
211
  readPipeText,
228
212
  spawnProcess
229
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";
230
232
  import {
231
233
  CLIENT_VERSION_TOO_OLD_CODE,
232
234
  NOLO_CLIENT_VERSION_HEADER,
@@ -235,16 +237,6 @@ import {
235
237
  import {
236
238
  asTrimmedLowercaseString
237
239
  } from "./chunk-QSJ3HFEF.js";
238
- import {
239
- buildSkillDiscoveryContextLayer
240
- } from "./chunk-AU7AXHUL.js";
241
- import {
242
- buildAgentsMdLayer,
243
- buildMemoryOverlayLayer,
244
- buildMemoryUseGuidanceLayer,
245
- partitionScopedBlocks,
246
- renderTurnContextBlocksWithScope
247
- } from "./chunk-VEA7H5FG.js";
248
240
 
249
241
  // packages/agent-runtime/modelLayerOverride.ts
250
242
  var MODEL_LAYER_KEYS = [
@@ -434,40 +426,6 @@ ${cardText}` : cardText;
434
426
  // packages/chat/messages/attachmentWriteRollout.ts
435
427
  var ENABLE_REMOTE_ATTACHMENT_PART_WRITES = false;
436
428
 
437
- // packages/ai/context/contextOccupancy.ts
438
- function estimateMessagesTokens(messages) {
439
- return messages.reduce((total, message) => {
440
- const content = typeof message.content === "string" ? message.content : message.content == null ? "" : JSON.stringify(message.content);
441
- return total + estimateTokenCount(content) + 4;
442
- }, 0);
443
- }
444
- function historyTokensBeforeLatestAssistant(messages) {
445
- const total = estimateMessagesTokens(messages);
446
- const latest = messages[messages.length - 1];
447
- if (latest?.role !== "assistant") return total;
448
- return Math.max(0, total - estimateMessagesTokens([latest]));
449
- }
450
- function resolveOccupancy(input) {
451
- if (input.authoritativeInput !== void 0 && input.authoritativeInput > 0) {
452
- const generated = Math.max(0, input.generatedSinceAuthority ?? 0);
453
- return {
454
- tokens: input.authoritativeInput + generated,
455
- estimated: generated > 0
456
- };
457
- }
458
- return {
459
- tokens: Math.max(0, input.baselineEstimate ?? 0),
460
- estimated: true
461
- };
462
- }
463
- function resolveOccupancyWindow(ref) {
464
- if (!ref.model) return void 0;
465
- if (isDevinOAuthAgent(ref)) {
466
- return devinChannelContextWindow(ref.model) ?? findModelContextWindow(ref.model, ref.provider);
467
- }
468
- return findModelContextWindow(ref.model, ref.provider);
469
- }
470
-
471
429
  // packages/cli/client/tokenUsage.ts
472
430
  var PLATFORM_CREDIT_UNIT = "credits";
473
431
  var isUsableModelId = (model) => {
@@ -491,34 +449,10 @@ function resolveAgentModelIdentity(opts) {
491
449
  ...model ? { model } : {}
492
450
  };
493
451
  }
494
- function resolveAgentContextWindow(opts) {
452
+ function resolveAgentContextWindow2(opts) {
495
453
  const model = resolveEffectiveModel(opts);
496
454
  if (model) return resolveContextWindow(model);
497
- const byName = opts.agentName?.trim() ? resolveOccupancyWindow({ model: opts.agentName }) : void 0;
498
- if (byName !== void 0) return byName;
499
- const candidates = [
500
- ...modelSlugCandidates(opts.agentKey, 2),
501
- ...modelSlugCandidates(opts.agentName, 1)
502
- ];
503
- for (const candidate of candidates) {
504
- const window = resolveOccupancyWindow({ model: candidate });
505
- if (window !== void 0) return window;
506
- }
507
- return void 0;
508
- }
509
- var AGENT_KEY_PREFIX = /^agent-[a-z0-9]+-/i;
510
- function modelSlugCandidates(source, maxDrop) {
511
- const raw = source?.trim();
512
- if (!raw) return [];
513
- const base = raw.replace(/\s+/g, "-").toLowerCase();
514
- const seed = base.replace(AGENT_KEY_PREFIX, "");
515
- const out = [seed];
516
- if (seed !== base) out.push(base);
517
- const segments = seed.split("-");
518
- for (let drop = 1; drop <= maxDrop && drop < segments.length; drop++) {
519
- out.push(segments.slice(drop).join("-"));
520
- }
521
- return [...new Set(out.filter(Boolean))];
455
+ return resolveAgentContextWindow(opts);
522
456
  }
523
457
  var PROVIDER_LOOKUP_ORDER = [
524
458
  "openrouter",
@@ -11204,6 +11138,51 @@ function findCollapsedPasteSpanAt(buffer, pos, opts = {}) {
11204
11138
  return null;
11205
11139
  }
11206
11140
 
11141
+ // packages/cli/idleHeapRelease.ts
11142
+ var IDLE_HEAP_RELEASE_DELAY_MS = 2e3;
11143
+ function releaseHeapPages(options = {}) {
11144
+ const env = options.env ?? process.env;
11145
+ if (env.NOLO_TUI_IDLE_HEAP_RELEASE === "0") return;
11146
+ const bun = "bun" in options ? options.bun : globalThis.Bun;
11147
+ if (typeof bun?.gc !== "function" || typeof bun?.shrink !== "function") return;
11148
+ try {
11149
+ bun.gc(true);
11150
+ bun.shrink();
11151
+ } catch {
11152
+ }
11153
+ }
11154
+ function createIdleHeapReleaser(options = {}) {
11155
+ const env = options.env ?? process.env;
11156
+ const bun = "bun" in options ? options.bun : globalThis.Bun;
11157
+ const disabled = env.NOLO_TUI_IDLE_HEAP_RELEASE === "0" || typeof bun?.gc !== "function" || typeof bun?.shrink !== "function";
11158
+ if (disabled) return { schedule() {
11159
+ }, cancel() {
11160
+ } };
11161
+ const delayMs = options.delayMs ?? IDLE_HEAP_RELEASE_DELAY_MS;
11162
+ const setTimer = options.setTimer ?? ((fn, ms) => {
11163
+ const handle = setTimeout(fn, ms);
11164
+ handle.unref?.();
11165
+ return handle;
11166
+ });
11167
+ const clearTimer = options.clearTimer ?? ((handle) => clearTimeout(handle));
11168
+ let pending = null;
11169
+ const release = () => {
11170
+ pending = null;
11171
+ releaseHeapPages({ env, bun });
11172
+ };
11173
+ return {
11174
+ schedule() {
11175
+ if (pending !== null) clearTimer(pending);
11176
+ pending = setTimer(release, delayMs);
11177
+ },
11178
+ cancel() {
11179
+ if (pending === null) return;
11180
+ clearTimer(pending);
11181
+ pending = null;
11182
+ }
11183
+ };
11184
+ }
11185
+
11207
11186
  // packages/cli/client/agentRun.ts
11208
11187
  import { ulid as ulid2 } from "ulid";
11209
11188
 
@@ -11245,7 +11224,7 @@ function isBalanceExhaustedError(error) {
11245
11224
 
11246
11225
  // packages/cli/client/agentRun.ts
11247
11226
  async function loadRunLocalAgentTurn() {
11248
- const { runLocalAgentTurn } = await import("./agentRuntimeLocal-Q7ZOMZC7.js");
11227
+ const { runLocalAgentTurn } = await import("./agentRuntimeLocal-J6I63NZC.js");
11249
11228
  return runLocalAgentTurn;
11250
11229
  }
11251
11230
  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();
@@ -11342,7 +11321,8 @@ function buildDefaultLocalRuntimeAdapter(options) {
11342
11321
  // runtimeKey 接线:不传下去则本地 run 的 runtimeKey 在 agentRun 层就断了
11343
11322
  // ——adapter 收不到 → docker workload 永不创建,非 docker 云后端也不会
11344
11323
  // fail-closed(死代码)。
11345
- ...options.runtimeKey ? { runtimeKey: options.runtimeKey } : {}
11324
+ ...options.runtimeKey ? { runtimeKey: options.runtimeKey } : {},
11325
+ ...options.dockerWorkspaceMode ? { dockerWorkspaceMode: options.dockerWorkspaceMode } : {}
11346
11326
  });
11347
11327
  }
11348
11328
  function resolveLocalRuntimeAdapter(options) {
@@ -11350,7 +11330,8 @@ function resolveLocalRuntimeAdapter(options) {
11350
11330
  cwd: options.localRuntimeCwd,
11351
11331
  // 与 buildDefaultLocalRuntimeAdapter 同口径:注入式 factory 也必须拿到
11352
11332
  // runtimeKey,否则注入了 adapter 的本地 run 会静默丢掉 docker 语义。
11353
- ...options.runtimeKey ? { runtimeKey: options.runtimeKey } : {}
11333
+ ...options.runtimeKey ? { runtimeKey: options.runtimeKey } : {},
11334
+ ...options.dockerWorkspaceMode ? { dockerWorkspaceMode: options.dockerWorkspaceMode } : {}
11354
11335
  }) || buildDefaultLocalRuntimeAdapter(options);
11355
11336
  }
11356
11337
  function wrapAdapterEphemeral(adapter) {
@@ -12247,6 +12228,24 @@ async function runLocalAgentTurnForCli(options, settings) {
12247
12228
  }
12248
12229
  }
12249
12230
  async function runLocalAgentTurnForCliWithAdapter(options, settings, resolvedBaseAdapter) {
12231
+ try {
12232
+ return await executeLocalAgentTurnForCliWithAdapter(
12233
+ options,
12234
+ settings,
12235
+ resolvedBaseAdapter
12236
+ );
12237
+ } finally {
12238
+ try {
12239
+ if (typeof options.releaseHeapPages === "function") {
12240
+ options.releaseHeapPages();
12241
+ } else {
12242
+ releaseHeapPages({ env: options.env });
12243
+ }
12244
+ } catch {
12245
+ }
12246
+ }
12247
+ }
12248
+ async function executeLocalAgentTurnForCliWithAdapter(options, settings, resolvedBaseAdapter) {
12250
12249
  const baseAdapter = (() => {
12251
12250
  let adapter2 = resolvedBaseAdapter && options.modelOverride ? wrapLoadAgentConfigWithModelOverride(
12252
12251
  resolvedBaseAdapter,
@@ -12341,6 +12340,9 @@ async function runLocalAgentTurnForCliWithAdapter(options, settings, resolvedBas
12341
12340
  parentDialogId: options.parentDialogId,
12342
12341
  runtimeContext: runtimeContextWithOwnership,
12343
12342
  runKind: options.env.NOLO_AGENT_RUN_CHILD === "1" ? "subtask" : "interactive",
12343
+ // 展示能力由宿主声明(TUI=narrow),非交互 CLI/后台留空 → unknown;
12344
+ // 排版段只在能力已知时由 localLoop 注入,server 线不读该字段。
12345
+ ...options.responseViewport ? { responseViewport: options.responseViewport } : {},
12344
12346
  background: options.background,
12345
12347
  noStream: options.noStream,
12346
12348
  ...options.contextBlockScopes?.length ? { contextBlockScopes: options.contextBlockScopes } : options.extraContextBlocks?.length ? { contextBlocks: options.extraContextBlocks } : {},
@@ -15770,6 +15772,12 @@ async function runAgentRunCommand(args, deps) {
15770
15772
  } } : {},
15771
15773
  agentName: targetAgentKey,
15772
15774
  agentKey: targetAgentKey,
15775
+ // 当前执行链未提供可靠的最终展示能力,按约定使用 unknown(只注入行为段,不猜
15776
+ // 宽/窄屏;`stdout.isTTY` 只说明是不是终端,说明不了宽度)。这不表示宿主永远
15777
+ // 无法获得尺寸:将来接入时应传展示能力,不应由调用方拼接准则文本。
15778
+ // 放在 buildRunOptions 这个唯一构造点上,首轮 / quota fallback / 队列 drain
15779
+ // 三处 runner(...) 调用自动一致;远端分支走 server 线,不读该字段。
15780
+ responseViewport: "unknown",
15773
15781
  serverUrl: resolveServerUrl(env),
15774
15782
  message: formatTurnMessage(turnMessage),
15775
15783
  imageUrls: parsed.imageUrls.map(normalizeCliImageInput),
@@ -15789,6 +15797,7 @@ async function runAgentRunCommand(args, deps) {
15789
15797
  // runtimeKey 与 machine-shell 的组合已在 parseAgentRunArgs 入口显式拒绝,
15790
15798
  // 这里直接透传即可(不再静默丢弃参数)。
15791
15799
  ...parsed.runtimeKey ? { runtimeKey: parsed.runtimeKey } : {},
15800
+ ...parsed.dockerWorkspaceMode ? { dockerWorkspaceMode: parsed.dockerWorkspaceMode } : {},
15792
15801
  ...parsed.continueDialogId ? { continueDialogId: parsed.continueDialogId } : {},
15793
15802
  ...parsed.strictContinueHistory ? { strictContinueHistory: true } : {},
15794
15803
  ...parsed.spaceId ? { spaceId: parsed.spaceId } : {},
@@ -16059,10 +16068,8 @@ export {
16059
16068
  redactSecrets,
16060
16069
  safeAskText,
16061
16070
  TUI_TREE_MARKER,
16062
- estimateMessagesTokens,
16063
- historyTokensBeforeLatestAssistant,
16064
16071
  resolveAgentModelIdentity,
16065
- resolveAgentContextWindow,
16072
+ resolveAgentContextWindow2 as resolveAgentContextWindow,
16066
16073
  platformCreditsFromUsage,
16067
16074
  formatCreditsChip,
16068
16075
  formatTokenCount,
@@ -16070,6 +16077,7 @@ export {
16070
16077
  computeBaselineContextTokens,
16071
16078
  resolveContextUsage,
16072
16079
  renderTokenStatus,
16080
+ createIdleHeapReleaser,
16073
16081
  COLLAPSED_PASTE_PLACEHOLDER_RE,
16074
16082
  shouldCollapsePaste,
16075
16083
  createCollapsedPasteStore,
@@ -13,6 +13,9 @@ function getSessionSnapshotForState(state) {
13
13
  }
14
14
  return getBoundSessionSnapshot();
15
15
  }
16
+ function getSessionGenerationForState(state) {
17
+ return getSessionSnapshotForState(state)?.sessionGeneration;
18
+ }
16
19
 
17
20
  // packages/identity/selectors.local.ts
18
21
  var LOCAL_USER_ID = (typeof process !== "undefined" ? process.env?.NOLO_LOCAL_USER_ID : void 0) || (typeof process !== "undefined" ? process.env?.NOLO_USER_ID : void 0) || "local";
@@ -42,6 +45,7 @@ var selectIdentityUserBalance = (state) => void 0;
42
45
 
43
46
  export {
44
47
  getSessionSnapshotForState,
48
+ getSessionGenerationForState,
45
49
  selectIdentityUserId,
46
50
  selectIdentityToken,
47
51
  selectIdentityUser,
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  toolRegistry
3
- } from "./chunk-XFKZ3MCV.js";
3
+ } from "./chunk-QFL42TMV.js";
4
4
  import {
5
5
  runtime_default
6
- } from "./chunk-H4KACZMG.js";
6
+ } from "./chunk-2QQ7D3P5.js";
7
7
  import {
8
8
  canonicalizeToolNames
9
9
  } from "./chunk-5EBLANFT.js";