nolo-cli 0.250.0-alpha.1 → 0.252.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 (186) hide show
  1. package/{_executeModel-F4MT6OPO.js → _executeModel-D6G3B45S.js} +51 -51
  2. package/{action-WZTKEF5H.js → action-QQOQ2LP3.js} +3 -3
  3. package/{addContentAction-MLI6GOBV.js → addContentAction-MB22YIDV.js} +6 -6
  4. package/{addDialogAgentAction-ARGQM22H.js → addDialogAgentAction-KNTBVVGY.js} +5 -5
  5. package/{agentDeleteCommand-DBCRHB4S.js → agentDeleteCommand-YCWDGJSF.js} +87 -82
  6. package/{agentEmailCommands-T4PAJ4KG.js → agentEmailCommands-DTWD5FWC.js} +87 -82
  7. package/{agentListCommands-5ULWKQ3E.js → agentListCommands-JTOONLYL.js} +233 -46
  8. package/{agentMachineCommands-65QUOCEY.js → agentMachineCommands-25X7OTLQ.js} +38 -36
  9. package/{agentProviderCommands-C5T7C5KZ.js → agentProviderCommands-QLTABYR7.js} +2 -2
  10. package/{agentPullCommand-4EQZYHU4.js → agentPullCommand-6OCNLVGC.js} +1 -1
  11. package/{agentRecordCommands-EKANS3A5.js → agentRecordCommands-SXE3WV2X.js} +86 -81
  12. package/{agentRunCommand-336PXBRJ.js → agentRunCommand-QSIED54S.js} +87 -82
  13. package/{agentRunControl-QMWTWV7C.js → agentRunControl-KNNDEEDI.js} +8 -6
  14. package/{agentRuntimeLocal-KKXJOBD3.js → agentRuntimeLocal-HVJJMB4W.js} +32 -31
  15. package/{agentSlice-FWYXP332.js → agentSlice-NBUJJVRI.js} +7 -7
  16. package/{appDeleteCommands-ERJK367V.js → appDeleteCommands-YU6TT6VN.js} +39 -37
  17. package/{appDeployCommands-LUV6QKQJ.js → appDeployCommands-4DEIX7YP.js} +39 -37
  18. package/{appDeployStatusCommands-WW7IYQD4.js → appDeployStatusCommands-3VKS6GBQ.js} +39 -37
  19. package/{appGetCommands-G7XYYSFO.js → appGetCommands-22FNNROT.js} +39 -37
  20. package/{appListCommands-4RXCIDNI.js → appListCommands-FVGMLHVU.js} +39 -37
  21. package/{authCommand-3C3RN4OU.js → authCommand-5DC3ES4Q.js} +15 -15
  22. package/{authCommands-ZMVEDCQD.js → authCommands-BLXNAUF4.js} +2 -2
  23. package/{chromeOpsCommands-NZITLHWO.js → chromeOpsCommands-AA555ANS.js} +1 -1
  24. package/{chunk-MAA42MMV.js → chunk-2FZVXOFX.js} +4 -4
  25. package/chunk-2GAUJDA5.js +594 -0
  26. package/{chunk-ESN4WNWU.js → chunk-2JHGUL5K.js} +2 -2
  27. package/{chunk-222CJNC2.js → chunk-2LANL4B5.js} +3 -3
  28. package/{chunk-W4G25PVP.js → chunk-2PB653F5.js} +196 -253
  29. package/{chunk-UF6J7NXV.js → chunk-3272HU62.js} +1 -1
  30. package/chunk-3A5NNQCN.js +64 -0
  31. package/{chunk-7IQA2VJF.js → chunk-3N3JPQBQ.js} +210 -56
  32. package/{chunk-LXKK7QFI.js → chunk-4HAOOY6G.js} +53 -23
  33. package/{chunk-ZQ6K57FJ.js → chunk-4YPH5KRA.js} +1 -1
  34. package/{chunk-ADOOL3PG.js → chunk-52M4RYVP.js} +1 -1
  35. package/{chunk-U7OMQLRE.js → chunk-5IN2NBDX.js} +9 -9
  36. package/{chunk-BAH3BAUZ.js → chunk-5QEOTC35.js} +5 -5
  37. package/{chunk-E5RYFR7E.js → chunk-5UYDG6HP.js} +19 -0
  38. package/{chunk-Z7A2ZQ5X.js → chunk-64ACTEAE.js} +1 -1
  39. package/{chunk-CTWCZKNS.js → chunk-6SOWMEAY.js} +4 -4
  40. package/{chunk-BFKJ2RS3.js → chunk-7RYODZDD.js} +1 -1
  41. package/{chunk-YWNCRUBZ.js → chunk-7XO73H5X.js} +116 -6
  42. package/{chunk-SMEX763N.js → chunk-7ZOVFB2H.js} +100 -43
  43. package/{chunk-UR4ZMRV3.js → chunk-A5F6DYP2.js} +1 -1
  44. package/{chunk-ZKMS73DK.js → chunk-A6VIMCWI.js} +3 -3
  45. package/{chunk-SX6AWTNK.js → chunk-BZLGPM5B.js} +3 -3
  46. package/{chunk-LTVEOOZL.js → chunk-CIAV4WK2.js} +14 -1
  47. package/{chunk-HZDK56EK.js → chunk-CO2NXG2J.js} +32 -10
  48. package/{chunk-OHUYN3YU.js → chunk-CYGFNMCH.js} +1 -1
  49. package/{chunk-MZVCFV3T.js → chunk-D3WOFN6N.js} +3 -3
  50. package/{chunk-VUHKG4KS.js → chunk-DNNPARJK.js} +9 -5
  51. package/{chunk-VV5IS3ES.js → chunk-DU3DJYVA.js} +5 -5
  52. package/{chunk-SPU3L3OR.js → chunk-EFM2IPZR.js} +3 -3
  53. package/{chunk-73PZD7JZ.js → chunk-EG3JTV7H.js} +2 -2
  54. package/{chunk-6ASGEP5D.js → chunk-EJQE5HB7.js} +1 -1
  55. package/{chunk-6XRPBZRS.js → chunk-EYLGAEB4.js} +0 -134
  56. package/{chunk-CD64YXRB.js → chunk-F6Q64KRV.js} +1 -1
  57. package/{chunk-TMRJGSK2.js → chunk-FRC2DNTN.js} +1 -1
  58. package/{chunk-W3HSD32M.js → chunk-FXEPZKNJ.js} +2 -2
  59. package/{chunk-I3J7HO3U.js → chunk-FZI2P64R.js} +137 -53
  60. package/{chunk-WWTSEBDF.js → chunk-GIXWVN2W.js} +1 -1
  61. package/{chunk-XHG7QROB.js → chunk-GO7UC5VH.js} +5 -5
  62. package/{chunk-RDBDHGU7.js → chunk-GVH2IP2M.js} +5 -5
  63. package/{chunk-AXZ5DDLB.js → chunk-GWS2X7TX.js} +235 -120
  64. package/{chunk-KHVTT4WW.js → chunk-HF4C5WIU.js} +81 -542
  65. package/{chunk-ATRU65OK.js → chunk-HMREADP6.js} +21 -19
  66. package/chunk-HZD5HXUO.js +405 -0
  67. package/{chunk-VHMPJGT4.js → chunk-ITCOQAHS.js} +3 -3
  68. package/{chunk-BQ4CZEVZ.js → chunk-ITMBFT35.js} +1 -1
  69. package/chunk-IVK2KT3H.js +209 -0
  70. package/{chunk-FFFKAOJN.js → chunk-JAYPSNGR.js} +1 -1
  71. package/{chunk-NEG5LYK5.js → chunk-JCQ3WCQ3.js} +3 -1
  72. package/{chunk-3IVFGQIM.js → chunk-JF5QT3YY.js} +2 -2
  73. package/{chunk-V4IYI3SB.js → chunk-JKALGWDL.js} +2 -2
  74. package/{chunk-PQ63BDV3.js → chunk-JPXACKSW.js} +9 -1
  75. package/{chunk-HS7MLR74.js → chunk-KZ4A7EIV.js} +3 -5
  76. package/{chunk-HEIIOJGN.js → chunk-LAQC5FAP.js} +4 -4
  77. package/{chunk-I3OW5RAX.js → chunk-LNIA5JVX.js} +8 -8
  78. package/{chunk-QJTZ76CP.js → chunk-LS5KAVFQ.js} +1 -0
  79. package/{chunk-W6T4FNZP.js → chunk-LUPZLKXL.js} +192 -352
  80. package/{chunk-K26XPZRB.js → chunk-LVZVSLKO.js} +29 -9
  81. package/{chunk-SHDJLJWV.js → chunk-N2ZAY2DK.js} +1 -1
  82. package/{chunk-WEZ27JA7.js → chunk-NMXGIRSG.js} +1 -1
  83. package/{chunk-MTM4LRVG.js → chunk-NNUIVAC2.js} +1 -1
  84. package/{chunk-ARFCL53U.js → chunk-NPUHKEOB.js} +4 -4
  85. package/{chunk-32WTED6G.js → chunk-O6LPLIRS.js} +94 -83
  86. package/{chunk-4IQN6FWY.js → chunk-OB4FBZXJ.js} +4 -4
  87. package/{chunk-CD2DK5JA.js → chunk-OKH74FML.js} +2 -1
  88. package/{chunk-UPOW5HTG.js → chunk-OMIXG25B.js} +2 -2
  89. package/{chunk-MYYNZG2M.js → chunk-OOV5JN25.js} +4 -4
  90. package/{chunk-AS6L5KSD.js → chunk-P4R5KXU7.js} +2 -2
  91. package/{chunk-OKKA4BCM.js → chunk-P6HMEKLL.js} +114 -56
  92. package/{chunk-VTHWBTRE.js → chunk-PENRYZ4D.js} +1 -1
  93. package/{chunk-VIYVRPMJ.js → chunk-PHREU2KZ.js} +5 -3
  94. package/{chunk-EDT65EUE.js → chunk-PIVTQRX6.js} +45 -15
  95. package/{chunk-KJDN2YRH.js → chunk-QMKWSKWA.js} +4 -4
  96. package/{chunk-6TVYUQRM.js → chunk-QV32GSVO.js} +2 -2
  97. package/{chunk-K7VIXYTZ.js → chunk-R3MV2GII.js} +1 -45
  98. package/{chunk-XJSEST7D.js → chunk-SMCKJJXI.js} +2 -2
  99. package/{chunk-JFRJEPFI.js → chunk-SMZFWEMX.js} +1 -1
  100. package/{chunk-KK3FCYZM.js → chunk-SQL7YNED.js} +7 -4
  101. package/{chunk-D25ONVOH.js → chunk-SSZHE2RK.js} +1 -1
  102. package/{chunk-OLGFIQN2.js → chunk-T4VVQHSE.js} +1 -1
  103. package/{chunk-6QL3SUEK.js → chunk-TDI7ARZO.js} +3 -3
  104. package/{chunk-X6LYQDN5.js → chunk-TDLZA6LJ.js} +13 -10
  105. package/chunk-TRRXYFTR.js +46 -0
  106. package/{chunk-WMKA2DPK.js → chunk-TTUIM3PJ.js} +4 -4
  107. package/{chunk-RHBD22LV.js → chunk-TTWNTFTO.js} +39 -4
  108. package/{chunk-ZM5AZTQG.js → chunk-U7BP25PE.js} +18 -6
  109. package/{chunk-X3OZ655T.js → chunk-UI3Z3HDK.js} +1 -1
  110. package/{chunk-GX6DITLQ.js → chunk-UUCYUN6Y.js} +1 -1
  111. package/{chunk-BVEDT6DM.js → chunk-VH7AQEEF.js} +3 -3
  112. package/{chunk-PGDM7AM2.js → chunk-WAOHK3NJ.js} +9 -9
  113. package/{chunk-2FK2KZSL.js → chunk-WLHUANWZ.js} +1 -1
  114. package/{chunk-ZTWDSOXD.js → chunk-WNIBQBOR.js} +1 -1
  115. package/{chunk-SLUZ6FBJ.js → chunk-XBCADGK2.js} +1 -1
  116. package/chunk-XRGBJHZX.js +136 -0
  117. package/{chunk-6XVPMGXK.js → chunk-YB5D2GK4.js} +9 -3
  118. package/{chunk-AKWA6PCE.js → chunk-YQYYYATY.js} +45 -27
  119. package/{chunk-WQDTSK5U.js → chunk-ZMFA2TLE.js} +1 -1
  120. package/{chunk-CFDOIIOZ.js → chunk-ZMXO5G3E.js} +29 -23
  121. package/{chunk-YQO5UKHP.js → chunk-ZNOXY73P.js} +632 -124
  122. package/{cliAgentConfigHelpers-37ZNEY5Y.js → cliAgentConfigHelpers-FKBPFPKR.js} +7 -7
  123. package/{cliAuthorityBrokerClient-SFPC3WVK.js → cliAuthorityBrokerClient-TFNXJLXL.js} +1 -1
  124. package/cliAuthorityBrokerProcess-IUCB4XA6.js +22 -0
  125. package/{cliLocalAgentRecordReader-R4CLUHYO.js → cliLocalAgentRecordReader-DWU3LBO2.js} +36 -35
  126. package/{commandRegistry-UIZRI4JV.js → commandRegistry-7FVATZS2.js} +74 -74
  127. package/{contentThunks-ZQSZA4GH.js → contentThunks-25XCB7VY.js} +20 -20
  128. package/{cooldownCommands-TIFCHCUN.js → cooldownCommands-PT5L4LNB.js} +3 -3
  129. package/{createAgentAutomationAction-RQE4F6PR.js → createAgentAutomationAction-FC5RI2LW.js} +20 -20
  130. package/{createDialogAction-JDSMQ34U.js → createDialogAction-IL3ISSQQ.js} +21 -21
  131. package/{createPageAction-VLF6XCYO.js → createPageAction-RVYBEYZV.js} +23 -23
  132. package/{db-CMUTP3W5.js → db-JMGVD4TB.js} +4 -2
  133. package/{dbSlice-656PMWR2.js → dbSlice-WG3ZG6PZ.js} +5 -5
  134. package/{deleteFile-ZCQESEEQ.js → deleteFile-4TIG54YN.js} +3 -3
  135. package/{dialogCommands-PLM7ZFWH.js → dialogCommands-VUJISJZF.js} +48 -42
  136. package/{dialogNotifyCommand-PST75COP.js → dialogNotifyCommand-JKYVSR6K.js} +8 -8
  137. package/{dialogSlice-63DD2ER2.js → dialogSlice-UMP55UAW.js} +18 -18
  138. package/{dialogUsageCommand-6RW2FY6K.js → dialogUsageCommand-IHAXS7DW.js} +5 -5
  139. package/{docCreateCommands-BST5DO7L.js → docCreateCommands-S46F6GKP.js} +38 -36
  140. package/{docDeleteCommands-YE6G2SO4.js → docDeleteCommands-LJG4NK6J.js} +39 -37
  141. package/{docReadCommands-M6T35U3G.js → docReadCommands-YPAYGHNM.js} +38 -36
  142. package/{docStore-7QNJWRJ2.js → docStore-VK3MVJ5Q.js} +6 -6
  143. package/{docUpdateCommands-6DFWGPVG.js → docUpdateCommands-MPTM6267.js} +38 -36
  144. package/{getPricing-FCHYVRJU.js → getPricing-5BLZRPTM.js} +3 -3
  145. package/{handleSendMessageAction-FCEFFAV4.js → handleSendMessageAction-VPKVNKBU.js} +83 -41
  146. package/{hostCredentialCreate-YEWCAMZN.js → hostCredentialCreate-K56HWPNY.js} +86 -81
  147. package/index.js +23 -11
  148. package/{localDialogRead-CIOTQM5T.js → localDialogRead-NXILOV3T.js} +1 -1
  149. package/{localRuntimeAdapter-Z22ZOZRY.js → localRuntimeAdapter-KVU72FWT.js} +84 -79
  150. package/{localRuntimeAuthority-TYHQCTZN.js → localRuntimeAuthority-QKWTPBQQ.js} +13 -3
  151. package/{localRuntimeDb-BO7IVWAZ.js → localRuntimeDb-3CIC4SKC.js} +1 -1
  152. package/{machineCommands-PT5OJ36V.js → machineCommands-C3O5RKNJ.js} +85 -80
  153. package/{machineWsRunDispatch-DQVNBSVE.js → machineWsRunDispatch-ZLART7ZA.js} +85 -80
  154. package/{markdownToSlate-KIYM7B3P.js → markdownToSlate-PXYAIBVL.js} +1 -1
  155. package/{mcpLocalAuthorizeCommand-GO6AYT63.js → mcpLocalAuthorizeCommand-LO7E4VQ5.js} +15 -11
  156. package/{memberThunks-JFYC4Z5L.js → memberThunks-7DNR6DRD.js} +7 -7
  157. package/{models-EP7VG6N2.js → models-ZX2BYIMB.js} +2 -2
  158. package/package.json +2 -1
  159. package/{projectArchive-4XUC5SLF.js → projectArchive-UBJFYRL7.js} +23 -23
  160. package/{providerPresetApply-4H7YP5D7.js → providerPresetApply-NTJUINI6.js} +35 -16
  161. package/{providerRegistry-F3UPOTIY.js → providerRegistry-W45SLUV6.js} +5 -5
  162. package/{read-BRZHXUJ6.js → read-Z2JOK6F6.js} +3 -3
  163. package/{readDocTool-N7RVFQEE.js → readDocTool-3QYSVWBT.js} +1 -1
  164. package/{readlineWorkspace-7U5QM3OM.js → readlineWorkspace-TSIYF7C6.js} +655 -248
  165. package/{removeDialogAgentAction-J7XU7OUX.js → removeDialogAgentAction-LRKDU4RI.js} +7 -7
  166. package/{runAgentClientLoop-7D7UCAS2.js → runAgentClientLoop-YAHGOWXN.js} +48 -48
  167. package/{runtimeDoctorCommands-RDRJXMXC.js → runtimeDoctorCommands-QGZSKNSE.js} +14 -11
  168. package/{secretCommands-2FEMRUFM.js → secretCommands-BXAQEOES.js} +2 -2
  169. package/{setDialogExtraReferencesAction-Q4V2ZZW2.js → setDialogExtraReferencesAction-KIITOCFP.js} +6 -6
  170. package/{setPrimaryDialogAgentAction-742H5S6T.js → setPrimaryDialogAgentAction-Y36PKFFB.js} +7 -7
  171. package/{settingThunks-IHXUF276.js → settingThunks-YQNG5L6K.js} +5 -5
  172. package/{spaceCommands-WCLD36WH.js → spaceCommands-P644AAZZ.js} +37 -35
  173. package/{streamAgentChatTurn-DVTOINT3.js → streamAgentChatTurn-5CSYAUAY.js} +81 -77
  174. package/{switchDialogAgentAction-HLDLHRRA.js → switchDialogAgentAction-U2VLPPVO.js} +5 -5
  175. package/{tools-BOPINT5S.js → tools-UZ3CDIR2.js} +38 -38
  176. package/{tuiRestart-5F2APN66.js → tuiRestart-GF4DGAAN.js} +7 -7
  177. package/{tuiSummaryLlmCaller-TM5BU73J.js → tuiSummaryLlmCaller-HROLGN4F.js} +13 -13
  178. package/{updateCommands-FBYA5WVG.js → updateCommands-BZ4YDHNM.js} +3 -3
  179. package/{updateDialogTitleAction-S76PUCLQ.js → updateDialogTitleAction-53XCCDK2.js} +20 -20
  180. package/{usageCommand-L4OFWXEU.js → usageCommand-XVJ7ZUTM.js} +2 -2
  181. package/{usageRebuildCommand-7JR33UHS.js → usageRebuildCommand-NK6S3D4J.js} +3 -3
  182. package/{windowsSelfUpdate-M4V77OUB.js → windowsSelfUpdate-4BAXX7C3.js} +2 -2
  183. package/{workloadLifecycle-ZCSQCHG3.js → workloadLifecycle-DYX5ZMAT.js} +2 -2
  184. package/chunk-FGHEF6WI.js +0 -34
  185. package/{chunk-ANUP75N2.js → chunk-2E4BYAUE.js} +0 -0
  186. package/{chunk-CDIRKCPD.js → chunk-6HL6E7ZD.js} +152 -152
@@ -5,7 +5,7 @@ import {
5
5
  inlineImageUrlsForCustomProvider,
6
6
  prepareTools,
7
7
  shouldInlineImageUrlsForAgent
8
- } from "./chunk-I3J7HO3U.js";
8
+ } from "./chunk-FZI2P64R.js";
9
9
  import {
10
10
  CONFIRMATION_INPUT_KEYS,
11
11
  INVALID_TOOL_ARGS_REPLACEMENT,
@@ -14,11 +14,11 @@ import {
14
14
  performFetchRequest,
15
15
  sanitizeOutboundMessages,
16
16
  stripModelToolArgs
17
- } from "./chunk-OKKA4BCM.js";
17
+ } from "./chunk-P6HMEKLL.js";
18
18
  import {
19
19
  findToolExecutor,
20
20
  toolDefinitionsByName
21
- } from "./chunk-7IQA2VJF.js";
21
+ } from "./chunk-3N3JPQBQ.js";
22
22
  import {
23
23
  createSSEParser,
24
24
  createToolRunId,
@@ -27,7 +27,7 @@ import {
27
27
  toolRunSetPending,
28
28
  toolRunStarted,
29
29
  toolRunSucceeded
30
- } from "./chunk-PGDM7AM2.js";
30
+ } from "./chunk-WAOHK3NJ.js";
31
31
  import {
32
32
  addToolMessage,
33
33
  messageStreamEnd,
@@ -35,16 +35,19 @@ import {
35
35
  toast,
36
36
  toolResultNeedsUserConfirmation,
37
37
  updateToolMessage
38
- } from "./chunk-YQO5UKHP.js";
38
+ } from "./chunk-ZNOXY73P.js";
39
39
  import {
40
40
  streamAgentChatTurn
41
- } from "./chunk-AKWA6PCE.js";
41
+ } from "./chunk-YQYYYATY.js";
42
42
  import {
43
43
  getCurrentSpaceId
44
- } from "./chunk-FFFKAOJN.js";
44
+ } from "./chunk-JAYPSNGR.js";
45
+ import {
46
+ selectCurrentServer
47
+ } from "./chunk-NNUIVAC2.js";
45
48
  import {
46
49
  write
47
- } from "./chunk-HZDK56EK.js";
50
+ } from "./chunk-CO2NXG2J.js";
48
51
  import {
49
52
  addActiveController,
50
53
  getActiveDialogKey,
@@ -54,12 +57,9 @@ import {
54
57
  import {
55
58
  require_react
56
59
  } from "./chunk-RD3QLZQV.js";
57
- import {
58
- selectCurrentServer
59
- } from "./chunk-MTM4LRVG.js";
60
60
  import {
61
61
  createAsyncThunk
62
- } from "./chunk-6XVPMGXK.js";
62
+ } from "./chunk-YB5D2GK4.js";
63
63
  import {
64
64
  selectIdentityToken
65
65
  } from "./chunk-PXYBUFDB.js";
@@ -70,7 +70,7 @@ import {
70
70
  projectUserPartForModel,
71
71
  resolveOutboundDiagnosticSink,
72
72
  resolveOutboundWire
73
- } from "./chunk-2FK2KZSL.js";
73
+ } from "./chunk-WLHUANWZ.js";
74
74
  import {
75
75
  accumulateToolCallDelta,
76
76
  createThinkParserState,
@@ -82,7 +82,7 @@ import {
82
82
  } from "./chunk-56GBUMO5.js";
83
83
  import {
84
84
  normalizeChatCompletionsBodyForProvider
85
- } from "./chunk-W3HSD32M.js";
85
+ } from "./chunk-FXEPZKNJ.js";
86
86
  import {
87
87
  classifyApiError,
88
88
  classifyGenerationError,
@@ -93,13 +93,13 @@ import {
93
93
  isCompleteInstructionOutput,
94
94
  sanitizeToolOutputText,
95
95
  scrubSecrets
96
- } from "./chunk-CDIRKCPD.js";
96
+ } from "./chunk-6HL6E7ZD.js";
97
97
  import {
98
98
  EMPTY_ASSISTANT_REPAIR_PROMPT
99
- } from "./chunk-LTVEOOZL.js";
99
+ } from "./chunk-CIAV4WK2.js";
100
100
  import {
101
101
  getModelInfo
102
- } from "./chunk-MAA42MMV.js";
102
+ } from "./chunk-2FZVXOFX.js";
103
103
  import {
104
104
  isAbortError
105
105
  } from "./chunk-7DPNBQSV.js";
@@ -124,7 +124,7 @@ import {
124
124
  } from "./chunk-3EUW3WEO.js";
125
125
  import {
126
126
  getApiEndpoint
127
- } from "./chunk-CD2DK5JA.js";
127
+ } from "./chunk-OKH74FML.js";
128
128
  import {
129
129
  isRecord
130
130
  } from "./chunk-KUG52IAP.js";
@@ -1700,7 +1700,9 @@ var sendOpenAICompletionsRequest = async ({
1700
1700
  const requestBody = await inlineImageUrlsForCustomProvider(
1701
1701
  buildFinalCompletionsRequestBody(bodyData, agentConfig, disableToolsForThisRequest),
1702
1702
  {
1703
- shouldInline: shouldInlineImageUrlsForAgent(agentConfig)
1703
+ shouldInline: shouldInlineImageUrlsForAgent(agentConfig),
1704
+ serverUrl: selectCurrentServer(getState()),
1705
+ signal
1704
1706
  }
1705
1707
  );
1706
1708
  let streamState = createInitialStreamState();
@@ -0,0 +1,405 @@
1
+ import {
2
+ createLegacyServerDb,
3
+ isLevelLockError
4
+ } from "./chunk-TRRXYFTR.js";
5
+ import {
6
+ startCliAuthorityBrokerProcess
7
+ } from "./chunk-LUPZLKXL.js";
8
+ import {
9
+ loadCliAuthorityBrokerTls
10
+ } from "./chunk-3A5NNQCN.js";
11
+ import {
12
+ createCliAuthorityBrokerClient,
13
+ createCliAuthorityBrokerSocketInvoker,
14
+ isCliAuthorityBrokerTimeoutError,
15
+ isCliAuthorityBrokerUnavailableError
16
+ } from "./chunk-SQL7YNED.js";
17
+ import {
18
+ resolveCliAuthorityBrokerEndpoint,
19
+ resolveCliAuthorityBrokerHealthPath,
20
+ resolveCliAuthorityBrokerMetadataPath
21
+ } from "./chunk-CVMMWN6P.js";
22
+ import {
23
+ resolveNoloHome
24
+ } from "./chunk-GLKOYSRU.js";
25
+ import {
26
+ toErrorMessage
27
+ } from "./chunk-HNMXYYJR.js";
28
+
29
+ // packages/cli/localRuntimeAuthority.ts
30
+ import fs from "node:fs";
31
+ import { randomUUID } from "node:crypto";
32
+ import path from "node:path";
33
+ function ensureDbParentDir(dbPath) {
34
+ fs.mkdirSync(path.dirname(dbPath), { recursive: true });
35
+ }
36
+ function findCliAuthorityCorruption(error) {
37
+ const seen = /* @__PURE__ */ new Set();
38
+ let current = error;
39
+ while (current && !seen.has(current)) {
40
+ seen.add(current);
41
+ if (current.code === "LEVEL_CORRUPTION" || /Corruption:|missing files/i.test(toErrorMessage(current))) return current;
42
+ current = current.cause;
43
+ }
44
+ return void 0;
45
+ }
46
+ function throwCliAuthorityStartupError(error) {
47
+ const corruption = findCliAuthorityCorruption(error);
48
+ if (corruption) {
49
+ throw new Error(`Local authority database corruption: ${toErrorMessage(corruption)}`, { cause: error });
50
+ }
51
+ throw error;
52
+ }
53
+ function isCliAuthorityLockError(error) {
54
+ if (findCliAuthorityCorruption(error)) return false;
55
+ const seen = /* @__PURE__ */ new Set();
56
+ let current = error;
57
+ while (current && !seen.has(current)) {
58
+ seen.add(current);
59
+ if (isLevelLockError(current)) return true;
60
+ current = current.cause;
61
+ }
62
+ return /EADDRINUSE|Failed to listen/i.test(toErrorMessage(error));
63
+ }
64
+ async function sleep(ms) {
65
+ await new Promise((resolve) => setTimeout(resolve, ms));
66
+ }
67
+ function resolveCliLocalRuntimeDbPath(options = {}) {
68
+ return path.join(
69
+ resolveNoloHome({
70
+ env: options.env,
71
+ homeDir: options.homeDir
72
+ }),
73
+ "data",
74
+ "leveldb"
75
+ );
76
+ }
77
+ var DEFAULT_ATTACH_BACKOFF_MS = [100, 200, 400, 800];
78
+ var DEFAULT_ATTACH_RETRY_BUDGET_MS = 9e3;
79
+ function findOwnerPid(error) {
80
+ const seen = /* @__PURE__ */ new Set();
81
+ let current = error;
82
+ while (current && typeof current === "object" && !seen.has(current)) {
83
+ seen.add(current);
84
+ const pid = current.ownerPid;
85
+ if (typeof pid === "number" && Number.isInteger(pid) && pid > 0) {
86
+ return pid;
87
+ }
88
+ current = current.cause;
89
+ }
90
+ return void 0;
91
+ }
92
+ function isTransientBrokerOpenError(error) {
93
+ return isCliAuthorityBrokerUnavailableError(error) || isCliAuthorityBrokerTimeoutError(error);
94
+ }
95
+ var defaultCliAuthorityBrokerConnectDeps = {
96
+ createClient: (options) => createCliAuthorityBrokerClient(options),
97
+ startBroker: startCliAuthorityBrokerProcess,
98
+ sleep,
99
+ useFastPath: true
100
+ };
101
+ function verifyBrokerDatabase(args, liveLocation) {
102
+ const expected = fs.existsSync(args.dbPath) ? fs.realpathSync(args.dbPath) : path.join(fs.realpathSync(path.dirname(args.dbPath)), path.basename(args.dbPath));
103
+ if (typeof liveLocation !== "string" || fs.realpathSync(liveLocation) !== expected) {
104
+ throw new Error(`Authority broker at ${args.endpoint} does not match the requested database ${args.dbPath}`);
105
+ }
106
+ }
107
+ function findLegacyBrokerOwner(args) {
108
+ try {
109
+ const metadata = JSON.parse(fs.readFileSync(args.metadataPath, "utf8"));
110
+ const owner = JSON.parse(fs.readFileSync(`${args.dbPath}.owner`, "utf8"));
111
+ if (metadata.transportSecurity !== void 0 || metadata.supervisorPid !== void 0 || metadata.endpoint !== args.endpoint || !Number.isInteger(metadata.pid) || metadata.pid <= 0 || owner.pid !== metadata.pid || fs.realpathSync(metadata.location) !== fs.realpathSync(args.dbPath)) return void 0;
112
+ process.kill(metadata.pid, 0);
113
+ return metadata.pid;
114
+ } catch {
115
+ return void 0;
116
+ }
117
+ }
118
+ async function connectCliAuthorityBroker(args) {
119
+ const deps = {
120
+ ...defaultCliAuthorityBrokerConnectDeps,
121
+ ...args.deps
122
+ };
123
+ async function connectClient() {
124
+ const invoke = createCliAuthorityBrokerSocketInvoker({ endpoint: args.endpoint, tls: args.tls });
125
+ const client2 = deps.createClient({
126
+ endpoint: args.endpoint,
127
+ invoke: async (request) => {
128
+ if (request.type !== "status" || !deps.verifyBroker) return invoke(request);
129
+ const response = await invoke({ type: "status", includeLocation: true });
130
+ if (response.ok && response.result.type === "status") deps.verifyBroker(args, response.result.location);
131
+ return response;
132
+ }
133
+ });
134
+ const backoffSchedule = deps.attachBackoffMs?.length ? deps.attachBackoffMs : DEFAULT_ATTACH_BACKOFF_MS;
135
+ const retryBudgetMs = deps.attachRetryBudgetMs ?? DEFAULT_ATTACH_RETRY_BUDGET_MS;
136
+ let waitedMs = 0;
137
+ let backoffStep = 0;
138
+ let lastAttachError;
139
+ const waitBackoff = async () => {
140
+ if (waitedMs >= retryBudgetMs) return false;
141
+ const delay = backoffSchedule[Math.min(backoffStep, backoffSchedule.length - 1)];
142
+ if (waitedMs > 0 && waitedMs + delay > retryBudgetMs) return false;
143
+ backoffStep += 1;
144
+ const startedAt = Date.now();
145
+ await deps.sleep(delay);
146
+ waitedMs += Math.max(delay, Date.now() - startedAt);
147
+ return true;
148
+ };
149
+ async function attachToExistingBroker(attempts) {
150
+ for (let attempt = 0; attempt < attempts; attempt += 1) {
151
+ if (!await waitBackoff()) return false;
152
+ const probeStartedAt = Date.now();
153
+ try {
154
+ await client2.open();
155
+ return true;
156
+ } catch (error) {
157
+ waitedMs += Date.now() - probeStartedAt;
158
+ if (!isTransientBrokerOpenError(error)) throw error;
159
+ lastAttachError = error;
160
+ }
161
+ }
162
+ return false;
163
+ }
164
+ if (deps.useFastPath) {
165
+ try {
166
+ await client2.open();
167
+ return client2;
168
+ } catch (error) {
169
+ if (!isTransientBrokerOpenError(error)) throw error;
170
+ lastAttachError = error;
171
+ }
172
+ }
173
+ try {
174
+ await deps.startBroker({
175
+ endpoint: args.endpoint,
176
+ metadataPath: args.metadataPath,
177
+ healthPath: args.healthPath,
178
+ dbPath: args.dbPath
179
+ });
180
+ await client2.open();
181
+ return client2;
182
+ } catch (error) {
183
+ if (!isCliAuthorityLockError(error)) throwCliAuthorityStartupError(error);
184
+ if (await attachToExistingBroker(5)) {
185
+ return client2;
186
+ }
187
+ let lastError = error;
188
+ while (await waitBackoff()) {
189
+ try {
190
+ await deps.startBroker({
191
+ endpoint: args.endpoint,
192
+ metadataPath: args.metadataPath,
193
+ healthPath: args.healthPath,
194
+ dbPath: args.dbPath
195
+ });
196
+ await client2.open();
197
+ return client2;
198
+ } catch (retryError) {
199
+ lastError = retryError;
200
+ if (isCliAuthorityLockError(retryError)) {
201
+ if (await attachToExistingBroker(2)) {
202
+ return client2;
203
+ }
204
+ continue;
205
+ }
206
+ if (isTransientBrokerOpenError(retryError)) {
207
+ lastAttachError = retryError;
208
+ continue;
209
+ }
210
+ throwCliAuthorityStartupError(retryError);
211
+ }
212
+ }
213
+ const lastMessage = toErrorMessage(lastError);
214
+ const attachCause = lastAttachError instanceof Error ? lastAttachError.cause : void 0;
215
+ const attachMessage = lastAttachError ? [toErrorMessage(lastAttachError), ...attachCause ? [toErrorMessage(attachCause)] : []].join(" / ") : "";
216
+ const portInUse = lastError !== null && typeof lastError === "object" && "code" in lastError && lastError.code === "EADDRINUSE" || /EADDRINUSE/i.test(lastMessage);
217
+ const ownerPid = findOwnerPid(lastError);
218
+ const legacyOwner = args.tls ? findLegacyBrokerOwner(args) : void 0;
219
+ if (legacyOwner !== void 0) {
220
+ throw new Error(`CLI authority broker upgrade requires exit of the previous Nolo process (PID ${legacyOwner}). Close its Nolo window or let it finish, then retry. The new broker will reopen the same database.`, {
221
+ cause: lastError
222
+ });
223
+ }
224
+ let detail = "";
225
+ if (portInUse) {
226
+ detail = `: EADDRINUSE (${lastMessage}). The broker endpoint is already in use; check the process using it or set NOLO_CLI_AUTHORITY_BROKER_PORT to a free port for all local CLI processes`;
227
+ } else {
228
+ const parts = [
229
+ ownerPid !== void 0 ? `ownerPid=${ownerPid}` : void 0,
230
+ lastMessage || void 0,
231
+ attachMessage && attachMessage !== lastMessage ? `attach=${attachMessage}` : void 0
232
+ ].filter(Boolean);
233
+ if (parts.length > 0) {
234
+ detail = `: ${parts.join("; ")}`;
235
+ }
236
+ }
237
+ throw new Error(`CLI authority broker could not attach or take ownership for ${args.endpoint}${detail}`, {
238
+ cause: lastError
239
+ });
240
+ }
241
+ }
242
+ let client = await connectClient();
243
+ let reconnecting = null;
244
+ async function reconnect() {
245
+ reconnecting ??= connectClient();
246
+ try {
247
+ client = await reconnecting;
248
+ return client;
249
+ } finally {
250
+ reconnecting = null;
251
+ }
252
+ }
253
+ async function runWithSelfHealing(operation) {
254
+ try {
255
+ return await operation(client);
256
+ } catch (error) {
257
+ if (!isCliAuthorityBrokerUnavailableError(error)) throw error;
258
+ const recoveredClient = await reconnect();
259
+ return operation(recoveredClient);
260
+ }
261
+ }
262
+ return {
263
+ get location() {
264
+ return client.location;
265
+ },
266
+ get status() {
267
+ return client.status;
268
+ },
269
+ open: () => runWithSelfHealing((activeClient) => activeClient.open()),
270
+ close: () => runWithSelfHealing((activeClient) => activeClient.close()),
271
+ get: (key) => runWithSelfHealing((activeClient) => activeClient.get(key)),
272
+ conditionalPut: (key, expectedRevision, value) => runWithSelfHealing((activeClient) => {
273
+ if (!activeClient.conditionalPut) {
274
+ throw new Error("CLI authority broker does not support conditionalPut");
275
+ }
276
+ return activeClient.conditionalPut(key, expectedRevision, value);
277
+ }),
278
+ put: (key, value) => runWithSelfHealing((activeClient) => activeClient.put(key, value)),
279
+ del: (key) => runWithSelfHealing((activeClient) => activeClient.del(key)),
280
+ batchWrite: (ops) => runWithSelfHealing((activeClient) => activeClient.batchWrite(ops)),
281
+ createBatch() {
282
+ const ops = [];
283
+ return {
284
+ put(key, value) {
285
+ ops.push({ type: "put", key, value });
286
+ },
287
+ del(key) {
288
+ ops.push({ type: "del", key });
289
+ },
290
+ write: () => runWithSelfHealing((activeClient) => activeClient.batchWrite(ops))
291
+ };
292
+ },
293
+ iterator(options = {}) {
294
+ return async function* iterate() {
295
+ let activeOptions = options;
296
+ let lastYieldedKey;
297
+ let skipResumeKey = false;
298
+ let recovered = false;
299
+ while (true) {
300
+ try {
301
+ for await (const entry of client.iterator(activeOptions)) {
302
+ if (skipResumeKey && entry[0] === lastYieldedKey) {
303
+ skipResumeKey = false;
304
+ continue;
305
+ }
306
+ skipResumeKey = false;
307
+ lastYieldedKey = entry[0];
308
+ yield entry;
309
+ }
310
+ return;
311
+ } catch (error) {
312
+ if (recovered || !isCliAuthorityBrokerUnavailableError(error)) {
313
+ throw error;
314
+ }
315
+ recovered = true;
316
+ await reconnect();
317
+ if (lastYieldedKey === void 0) {
318
+ activeOptions = options;
319
+ continue;
320
+ }
321
+ if (options.reverse) {
322
+ activeOptions = {
323
+ ...options,
324
+ lt: lastYieldedKey
325
+ };
326
+ continue;
327
+ }
328
+ activeOptions = {
329
+ ...options,
330
+ gte: lastYieldedKey
331
+ };
332
+ skipResumeKey = true;
333
+ }
334
+ }
335
+ }();
336
+ }
337
+ };
338
+ }
339
+ async function getDefaultCliLocalRuntimeAuthority(options = {}) {
340
+ const ambientNoloHome = process.env.NOLO_HOME?.trim();
341
+ const ambientBrokerPort = process.env.NOLO_CLI_AUTHORITY_BROKER_PORT?.trim();
342
+ const env = {
343
+ ...ambientNoloHome ? { NOLO_HOME: ambientNoloHome } : {},
344
+ ...ambientBrokerPort ? { NOLO_CLI_AUTHORITY_BROKER_PORT: ambientBrokerPort } : {},
345
+ ...options.env ?? process.env
346
+ };
347
+ const dbPath = resolveCliLocalRuntimeDbPath({
348
+ env,
349
+ homeDir: options.homeDir
350
+ });
351
+ ensureDbParentDir(dbPath);
352
+ const endpoint = resolveCliAuthorityBrokerEndpoint({
353
+ transport: "tcp",
354
+ env,
355
+ homeDir: options.homeDir
356
+ });
357
+ const metadataPath = resolveCliAuthorityBrokerMetadataPath({
358
+ transport: "tcp",
359
+ env,
360
+ homeDir: options.homeDir
361
+ });
362
+ const healthPath = resolveCliAuthorityBrokerHealthPath({
363
+ transport: "tcp",
364
+ env,
365
+ homeDir: options.homeDir
366
+ });
367
+ return connectCliAuthorityBroker({
368
+ endpoint,
369
+ metadataPath,
370
+ healthPath,
371
+ dbPath,
372
+ tls: await loadCliAuthorityBrokerTls(metadataPath),
373
+ deps: { verifyBroker: verifyBrokerDatabase }
374
+ });
375
+ }
376
+ async function getDefaultCliLocalRuntimeDb(options = {}) {
377
+ const authorityStore = await getDefaultCliLocalRuntimeAuthority(options);
378
+ return createLegacyServerDb(authorityStore);
379
+ }
380
+ function createCliLocalMcpConnectionRevisionWriter(authority, authenticatedUserId) {
381
+ if (!authenticatedUserId) throw new Error("Local MCP connection owner is required");
382
+ const prefix = `mcp-private:v1:${encodeURIComponent(authenticatedUserId)}:connection:`;
383
+ const conditionalPut = authority.conditionalPut?.bind(authority);
384
+ if (!conditionalPut) throw new Error("CLI authority broker does not support conditionalPut");
385
+ return {
386
+ async create(value) {
387
+ const id = randomUUID();
388
+ const result = await conditionalPut(prefix + id, null, { ...value, revision: 1 });
389
+ return { id, ...result };
390
+ },
391
+ async update(id, expectedRevision, value) {
392
+ if (!/^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(id) || !Number.isSafeInteger(expectedRevision) || expectedRevision < 1 || expectedRevision >= Number.MAX_SAFE_INTEGER) {
393
+ throw new Error("Invalid local MCP connection identity or revision");
394
+ }
395
+ return conditionalPut(prefix + id, expectedRevision, { ...value, revision: expectedRevision + 1 });
396
+ }
397
+ };
398
+ }
399
+
400
+ export {
401
+ connectCliAuthorityBroker,
402
+ getDefaultCliLocalRuntimeAuthority,
403
+ getDefaultCliLocalRuntimeDb,
404
+ createCliLocalMcpConnectionRevisionWriter
405
+ };
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  addContentToSpace
3
- } from "./chunk-X6LYQDN5.js";
3
+ } from "./chunk-TDLZA6LJ.js";
4
4
  import {
5
5
  prepareAndPersistMessage
6
- } from "./chunk-YQO5UKHP.js";
6
+ } from "./chunk-ZNOXY73P.js";
7
7
  import {
8
8
  require_format
9
9
  } from "./chunk-BUDVRYES.js";
@@ -16,7 +16,7 @@ import {
16
16
  removeCachedEntity,
17
17
  upsertSSREntity,
18
18
  write
19
- } from "./chunk-HZDK56EK.js";
19
+ } from "./chunk-CO2NXG2J.js";
20
20
  import {
21
21
  isDevelopment
22
22
  } from "./chunk-YHNUDTU4.js";
@@ -2,7 +2,7 @@ import {
2
2
  deleteDbRecord,
3
3
  queryUserRecords,
4
4
  readDbRecord
5
- } from "./chunk-KJDN2YRH.js";
5
+ } from "./chunk-QMKWSKWA.js";
6
6
  import {
7
7
  mergeAndDedupUserData
8
8
  } from "./chunk-GBWGPTA7.js";