nolo-cli 0.213.0 → 0.220.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 (271) hide show
  1. package/README.md +3 -2
  2. package/{_executeModel-CUJLCFWR.js → _executeModel-BNEMFCAO.js} +125 -96
  3. package/{accountResolver-4LKIHEKL.js → accountResolver-QETKNC7T.js} +4 -4
  4. package/{action-DF5UYSJF.js → action-GDZDXPMB.js} +14 -13
  5. package/{addContentAction-WERAONNY.js → addContentAction-7RO4AMRI.js} +21 -20
  6. package/{addDialogAgentAction-7VI7YRML.js → addDialogAgentAction-EVYBGTXB.js} +26 -25
  7. package/{agentDeleteCommand-XJORXPGU.js → agentDeleteCommand-7QTQNFCO.js} +145 -137
  8. package/{agentEmailCommands-XTYYFR6Z.js → agentEmailCommands-I7SHOSD6.js} +146 -139
  9. package/{agentFavoriteCommands-EDK743YA.js → agentFavoriteCommands-7LOP3HUD.js} +11 -12
  10. package/{agentGrantCommands-RQWK2TEV.js → agentGrantCommands-L6O2HVJI.js} +9 -9
  11. package/{agentListCommands-OBLRBLHS.js → agentListCommands-GUGMORTK.js} +180 -103
  12. package/{agentMachineCommands-5FMT3OT5.js → agentMachineCommands-UMDKILU3.js} +75 -66
  13. package/{agentProviderCommands-Q5O33MED.js → agentProviderCommands-STI3DQ6A.js} +8 -8
  14. package/{agentPullCommand-6EM3URVK.js → agentPullCommand-KHV4EELF.js} +11 -11
  15. package/agentRecordCommands-YTAMTHOY.js +175 -0
  16. package/agentRunCommand-DBM6YNO6.js +207 -0
  17. package/{agentRunControl-TAMHJQSR.js → agentRunControl-MBG4U6SL.js} +40 -19
  18. package/{agentRuntimeLocal-SOO2OPJG.js → agentRuntimeLocal-TU4LA353.js} +55 -48
  19. package/{agentSlice-CHR6KOZN.js → agentSlice-DPG7Q7IA.js} +24 -23
  20. package/{appDeleteCommands-GUP6P5YE.js → appDeleteCommands-JWP3XPUA.js} +67 -58
  21. package/{appDeployCommands-MH2FX4O5.js → appDeployCommands-6E4TQCWI.js} +67 -58
  22. package/{appDeployStatusCommands-SUHN3HPJ.js → appDeployStatusCommands-ALU4SADG.js} +67 -58
  23. package/{appGetCommands-YWDEX6Z4.js → appGetCommands-JEY4L6L4.js} +67 -58
  24. package/{appListCommands-ZQVMLPAY.js → appListCommands-PCAVHU7M.js} +67 -58
  25. package/{authCommand-PWX2ZNUP.js → authCommand-CGRIIOOV.js} +37 -33
  26. package/{authCommands-HV3EAU3V.js → authCommands-55OGQGCR.js} +16 -12
  27. package/{builtinSkillRegistry-2QETTQPM.js → builtinSkillRegistry-BAE2LDXF.js} +11 -13
  28. package/{chromeCommands-REEAH4SX.js → chromeCommands-G5UDKVSV.js} +3 -3
  29. package/{chromeOpsCommands-DIVM2K3T.js → chromeOpsCommands-WAA45NCS.js} +23 -13
  30. package/{chunk-VNYYOX3V.js → chunk-262R3XNN.js} +157 -50
  31. package/chunk-2MCB7CD7.js +98 -0
  32. package/{chunk-CTPXME7U.js → chunk-2NPD3FTX.js} +30 -7
  33. package/{chunk-YB3YZK56.js → chunk-2WZXXAQD.js} +1 -67
  34. package/{chunk-HRMJUN5J.js → chunk-2X7WFDT6.js} +1 -1
  35. package/chunk-2YGBI2XB.js +30 -0
  36. package/{chunk-TY3TIUJK.js → chunk-324FWHUA.js} +85 -3
  37. package/{chunk-KFLT5KAD.js → chunk-3NNXR7EH.js} +20 -20
  38. package/{chunk-ZRSNONOB.js → chunk-3P54D2E4.js} +8 -3
  39. package/{chunk-7OCO4TDT.js → chunk-3U44JB3O.js} +1 -1
  40. package/{chunk-TX5EYMGT.js → chunk-44J7Z5AQ.js} +34 -258
  41. package/chunk-4D4QD7FT.js +201 -0
  42. package/chunk-4I2MXV5Q.js +275 -0
  43. package/{chunk-MYOH447Z.js → chunk-4JVNURX4.js} +1 -1
  44. package/{chunk-COFEN36Z.js → chunk-4ZGPHFLE.js} +3 -3
  45. package/{chunk-ZXOUUDCG.js → chunk-53MFERZ3.js} +3869 -362
  46. package/chunk-547ENH5T.js +226 -0
  47. package/{chunk-YDH3FDFQ.js → chunk-5FUN7EG4.js} +1 -1
  48. package/{chunk-6DWMYIUY.js → chunk-5WKDR7HS.js} +14 -9
  49. package/chunk-5ZUOVCKT.js +32 -0
  50. package/{chunk-T43B7LB2.js → chunk-62HXNQVV.js} +1 -1
  51. package/{chunk-ZC3CMUKU.js → chunk-6OVNSQHN.js} +84 -2
  52. package/{chunk-IXNGOHV5.js → chunk-6QHKRARD.js} +12 -153
  53. package/{chunk-4T2WNOY7.js → chunk-6RDBLXVQ.js} +28 -17
  54. package/{chunk-EYLGAEB4.js → chunk-6XRPBZRS.js} +134 -0
  55. package/{chunk-KIM6CLW5.js → chunk-7JGMNKKG.js} +57 -26
  56. package/{chunk-P5L7CXOC.js → chunk-7Z6EW7AH.js} +3 -2
  57. package/chunk-AGYPUBFW.js +686 -0
  58. package/{chunk-Y63ZSOR6.js → chunk-AL3TYDIF.js} +1 -1
  59. package/{chunk-NOKUNJON.js → chunk-ALAES342.js} +75 -94
  60. package/{chunk-4I7ERB7F.js → chunk-ATEKLSLR.js} +2 -2
  61. package/{chunk-CRHOO2ZR.js → chunk-AUAJTAFM.js} +8 -8
  62. package/{chunk-LLRPJECG.js → chunk-AWIL6EHN.js} +15 -157
  63. package/chunk-BIDSIRTS.js +307 -0
  64. package/chunk-BIWI5M4E.js +62 -0
  65. package/{chunk-4VJAC32I.js → chunk-BNMPUQW6.js} +3 -2
  66. package/{chunk-RLBNLZVC.js → chunk-BP5ZJ6B4.js} +1 -1
  67. package/{chunk-NBTY7YJF.js → chunk-BR3GT6MR.js} +1 -0
  68. package/{chunk-7RFNTILS.js → chunk-BUDVRYES.js} +2 -2
  69. package/{chunk-SVYO6AO7.js → chunk-BV3FLP2L.js} +41 -1
  70. package/{chunk-ZL5RAEEB.js → chunk-CBUZ6DKA.js} +3 -3
  71. package/{chunk-SM3NSZJV.js → chunk-CD3RU7XL.js} +36 -2
  72. package/chunk-CMMI3DAT.js +1621 -0
  73. package/{chunk-J2NHJ7WX.js → chunk-CYWNWA77.js} +6 -6
  74. package/{chunk-MOIJOHA5.js → chunk-D6YNCNM6.js} +35 -21
  75. package/{chunk-H2TJUNCH.js → chunk-DBUR22G5.js} +16 -16
  76. package/chunk-DEA37IUY.js +271 -0
  77. package/{chunk-O2TZF4AI.js → chunk-DGYCDA6W.js} +4 -4
  78. package/{chunk-YWSEPJ7C.js → chunk-DUUDXSLX.js} +21 -7
  79. package/{chunk-KFHREHUQ.js → chunk-DXWGFL2Z.js} +89 -1
  80. package/{chunk-H5HF7TJA.js → chunk-EEOOBRA7.js} +6 -6
  81. package/{chunk-Y6ORVLSS.js → chunk-EVGU5P4U.js} +1 -1
  82. package/chunk-EWQ3HGNZ.js +90 -0
  83. package/{chunk-6VLJ6YA7.js → chunk-F6Z6ZCUV.js} +9 -9
  84. package/{chunk-75XIDFBW.js → chunk-FJ23FZXF.js} +72 -28
  85. package/chunk-FJSNBZXR.js +142 -0
  86. package/{chunk-WRYQ35LQ.js → chunk-G7IUT2V3.js} +860 -57
  87. package/{chunk-PCLE46CE.js → chunk-GBWGPTA7.js} +2 -1
  88. package/{chunk-H7PPIYWP.js → chunk-GPOV42YM.js} +19 -19
  89. package/{chunk-W4S457LU.js → chunk-GUXZK7SE.js} +42 -6
  90. package/{chunk-QHPRUL4O.js → chunk-GV6PRJBU.js} +4 -4
  91. package/{chunk-YUA6OAH5.js → chunk-HBRDSQ3M.js} +2 -2
  92. package/{chunk-G7MLNNEX.js → chunk-HHFGE2WF.js} +7 -7
  93. package/{chunk-OQPKUBPB.js → chunk-HSSBDZLD.js} +19 -7
  94. package/{chunk-EHSZD5OI.js → chunk-HXER7YJF.js} +4 -4
  95. package/{chunk-TAKB25RM.js → chunk-HYLRQDEE.js} +6 -6
  96. package/{chunk-LOEO7LRC.js → chunk-ILHQ2AXT.js} +10 -8
  97. package/{chunk-BBJ22CLB.js → chunk-JJMR2EA3.js} +64 -34
  98. package/{chunk-G2BQWAVT.js → chunk-JLAMNSBC.js} +4 -4
  99. package/{chunk-RSHTSUEG.js → chunk-JUSHVFNF.js} +2133 -622
  100. package/{chunk-YJAFKXMU.js → chunk-KHVFJSVE.js} +54 -49
  101. package/{chunk-X7SDOJUM.js → chunk-KRI6N5QZ.js} +16 -16
  102. package/{chunk-7BT37FK3.js → chunk-L32W3PRP.js} +675 -128
  103. package/chunk-LKA64WH4.js +227 -0
  104. package/{chunk-HUBHAQK2.js → chunk-LMRRCEDE.js} +31 -31
  105. package/chunk-M4SFKP5L.js +675 -0
  106. package/{chunk-MDB67IWP.js → chunk-MSMHU36U.js} +12 -12
  107. package/{chunk-7Y4YTDQF.js → chunk-MXKWTPUM.js} +288 -166
  108. package/{chunk-WYDI6TGM.js → chunk-MXRUXMZ3.js} +94 -135
  109. package/{chunk-AZMYUSVF.js → chunk-N5Z2V73W.js} +1 -1
  110. package/{chunk-QG4AOSON.js → chunk-NHY322ZU.js} +154 -32
  111. package/{chunk-UHJGXRJ4.js → chunk-OBIC6EG7.js} +6 -6
  112. package/{chunk-GOO6G4PY.js → chunk-OBSEKCVK.js} +123 -70
  113. package/{chunk-WMTBPBMP.js → chunk-OG6MQOQG.js} +130 -60
  114. package/{chunk-XJWWBO34.js → chunk-OJKUU3LP.js} +5 -7
  115. package/{chunk-ALQ3657A.js → chunk-OOJNQK6V.js} +21 -1
  116. package/{chunk-NSAPDIN2.js → chunk-OWKNSIXL.js} +679 -74
  117. package/{chunk-6XIE5ZGI.js → chunk-PDCV7P5W.js} +1 -1
  118. package/{chunk-A7TFUNZO.js → chunk-PPJYZRSQ.js} +6 -2
  119. package/{chunk-F6UUQOG6.js → chunk-Q3IVPFVO.js} +4 -4
  120. package/{chunk-VO4WSAVP.js → chunk-QBZCGP34.js} +3 -3
  121. package/chunk-QCB42576.js +13 -0
  122. package/chunk-QHEN7NZ7.js +46 -0
  123. package/{chunk-3UKL3HPD.js → chunk-QJTZ76CP.js} +32 -84
  124. package/{chunk-V5Y3R6BT.js → chunk-QRGDJA4B.js} +215 -212
  125. package/{chunk-4KB6WQUL.js → chunk-QYB23WUH.js} +1 -1
  126. package/{chunk-ZNWI6OVT.js → chunk-R44TU3MZ.js} +85 -11
  127. package/{chunk-PYRUW7XN.js → chunk-R6Z5S5GA.js} +139 -57
  128. package/{chunk-VL5KOY2C.js → chunk-R7XWZDOH.js} +125 -29
  129. package/{chunk-R5O4QAWG.js → chunk-RBPUNSG5.js} +11 -77
  130. package/{chunk-NJLL224W.js → chunk-RG2DGNL6.js} +3 -3
  131. package/{chunk-C6KNNXWU.js → chunk-RGQ4UUWZ.js} +25 -2
  132. package/{chunk-TCZHTTUU.js → chunk-RTHFJZ6M.js} +11 -11
  133. package/{chunk-RZOV7OMV.js → chunk-RYOLWYBK.js} +146 -200
  134. package/{chunk-OWYYDMGJ.js → chunk-S2NTVGA2.js} +4 -2
  135. package/{chunk-XHQC4PXX.js → chunk-S5NA3C52.js} +488 -226
  136. package/{secretCommands-LXDWOLZ6.js → chunk-S6FDXXZV.js} +190 -15
  137. package/chunk-S6K5F3KP.js +99 -0
  138. package/{chunk-INN4LTAJ.js → chunk-SRCCSTIM.js} +8 -8
  139. package/{chunk-JY5NGFFH.js → chunk-SYTHYBMI.js} +5 -5
  140. package/{chunk-UYD5HQ6T.js → chunk-SZVMASJ2.js} +3300 -1396
  141. package/{chunk-FUGMREBO.js → chunk-TGNIKIHR.js} +3 -3
  142. package/{chunk-HPFCI4SK.js → chunk-TI2EPRHE.js} +4 -4
  143. package/chunk-TLE77UJ5.js +230 -0
  144. package/chunk-TSPMLCWI.js +364 -0
  145. package/{chunk-YGILMZ7N.js → chunk-TUSTONB3.js} +1 -1
  146. package/{chunk-4VNS5WPM.js → chunk-U67V476Y.js} +1 -8
  147. package/{chunk-F7CI2ZC5.js → chunk-UAIHKQIA.js} +2 -1
  148. package/{chunk-WPORQFYN.js → chunk-UVLYNWIE.js} +2 -2
  149. package/{chunk-H4UOTUOX.js → chunk-VMJVAJ6W.js} +152 -19
  150. package/{chunk-KC4XDTT3.js → chunk-VS276URX.js} +4 -4
  151. package/{chunk-YTF4WH7J.js → chunk-WWTSEBDF.js} +1 -1
  152. package/{chunk-E2BESSAW.js → chunk-X4O7FJF5.js} +2 -0
  153. package/{chunk-RPQXPZZF.js → chunk-XSW4EXQV.js} +976 -17
  154. package/{chunk-7QTZCMKL.js → chunk-XTETTSKN.js} +3036 -2468
  155. package/{chunk-J5JTMQIA.js → chunk-YFLVRVYK.js} +1 -1
  156. package/chunk-YKY4OVOX.js +1141 -0
  157. package/{chunk-MMA3LZ3W.js → chunk-YNIYE47Z.js} +1 -1
  158. package/chunk-YZMNK53S.js +68 -0
  159. package/{chunk-FY7F4Q6X.js → chunk-Z4PCXPUE.js} +2 -2
  160. package/{chunk-INUFILG6.js → chunk-ZH3KXFHS.js} +11 -3
  161. package/chunk-ZOHO6MOF.js +376 -0
  162. package/{cliAgentConfigHelpers-WJBZQTLW.js → cliAgentConfigHelpers-BTRHMPW2.js} +18 -19
  163. package/{cliAuthorityBrokerClient-PM3U6Q6J.js → cliAuthorityBrokerClient-XHH7MH2P.js} +1 -1
  164. package/{cliAuthorityStoreDriver-TKLXNNTG.js → cliAuthorityStoreDriver-6FE3BJNB.js} +1 -1
  165. package/{cliEnvHelpers-BVYTMUPJ.js → cliEnvHelpers-CNMP3RDX.js} +3 -3
  166. package/{cliExecutor-BWBF2MTI.js → cliExecutor-K6FDZTQ2.js} +4 -2
  167. package/cliLocalAgentRecordReader-M3F76NIP.js +90 -0
  168. package/{commandRegistry-W63CYRZJ.js → commandRegistry-T3UBK6OA.js} +105 -97
  169. package/{contentThunks-U7PL5MQD.js → contentThunks-YEPZAHXU.js} +53 -48
  170. package/{cooldownCommands-TIGUHXTD.js → cooldownCommands-YB5H5BBK.js} +5 -4
  171. package/{createAgentAutomationAction-OLBQDD6R.js → createAgentAutomationAction-TBIIO5WT.js} +51 -48
  172. package/{createDialogAction-SVH6B3SB.js → createDialogAction-KBKMYFTQ.js} +52 -53
  173. package/{createPageAction-F4DIWZ2Z.js → createPageAction-3FGAPLJO.js} +56 -53
  174. package/{cursorProvider-YGGNMVWX.js → cursorProvider-2RACMEMF.js} +1 -1
  175. package/{db-HUCI5R4G.js → db-M7FU2GNK.js} +10 -7
  176. package/{dbSlice-BVH2YZPQ.js → dbSlice-XRUZOGSU.js} +20 -19
  177. package/{deleteFile-5YOEKV4U.js → deleteFile-6URDHYRB.js} +12 -12
  178. package/{desktopFolderProjects-SFY5EZS3.js → desktopFolderProjects-4POAMVJN.js} +2 -2
  179. package/{dialogCommands-KHIEPY3M.js → dialogCommands-NRLCOPJR.js} +71 -64
  180. package/dialogNotifyCommand-SHGPCU22.js +36 -0
  181. package/{dialogSlice-ZCTDV2PZ.js → dialogSlice-DP2WTMNO.js} +48 -45
  182. package/{dialogUsageCommand-7KCPYGHG.js → dialogUsageCommand-W2WCSGKF.js} +11 -10
  183. package/{docCreateCommands-DPMZI7G5.js → docCreateCommands-YJRDA3RX.js} +66 -59
  184. package/{docDeleteCommands-IRQQLUBT.js → docDeleteCommands-A5QIHZNF.js} +69 -62
  185. package/{docReadCommands-LK37XH6L.js → docReadCommands-CF2LTMYH.js} +66 -59
  186. package/{docStore-V2KECILA.js → docStore-NDY3K3PK.js} +25 -24
  187. package/{docUpdateCommands-O6T3HJHH.js → docUpdateCommands-QRKV4ZXE.js} +69 -62
  188. package/{fetchMessages-NR4KNQLO.js → fetchMessages-TQEUZD7H.js} +8 -7
  189. package/{getPricing-2MNMXEVG.js → getPricing-LF5C4XSI.js} +7 -7
  190. package/{handleSendMessageAction-2PE25WM3.js → handleSendMessageAction-IUGVVJ43.js} +206 -314
  191. package/{hostCredentialCreate-S233UMAP.js → hostCredentialCreate-X2ZFRXDR.js} +132 -124
  192. package/index.js +65 -27
  193. package/{keys-BEGDOTRL.js → keys-RWF7UCB4.js} +5 -4
  194. package/legacyMigration-TF4SYJCZ.js +19 -0
  195. package/{lib-5KKIBFIT.js → lib-OT5OTXRU.js} +7087 -6664
  196. package/{localDialogRead-7NNDVVF7.js → localDialogRead-CCOCVGAP.js} +3 -3
  197. package/{localFirstLog-DHNOY2NA.js → localFirstLog-OIETGK66.js} +1 -1
  198. package/localRecall-BDYKXB46.js +17 -0
  199. package/{localRuntimeAdapter-KY6WXNBR.js → localRuntimeAdapter-KAG3T4LF.js} +138 -130
  200. package/{localRuntimeAuthority-OYH4AE4G.js → localRuntimeAuthority-IBJAT62G.js} +1 -1
  201. package/{localRuntimeDb-VBIMCWUC.js → localRuntimeDb-N7KHDXS2.js} +2 -2
  202. package/{machineCommands-Q6HA3IXF.js → machineCommands-6NIQJE2A.js} +143 -135
  203. package/{machineInfo-UKPTZO5Y.js → machineInfo-LWHTEBHJ.js} +1 -1
  204. package/machineWsRunDispatch-RA5NOSGG.js +190 -0
  205. package/{memberThunks-7EDJADWU.js → memberThunks-7Y3OYSJQ.js} +30 -29
  206. package/{memoryCommands-ASCE5STX.js → memoryCommands-BC6REPQB.js} +7 -7
  207. package/models-H5NNZRLH.js +9 -0
  208. package/{oauthTokenStore-OEERZFUC.js → oauthTokenStore-RUYNYALS.js} +1 -1
  209. package/{offlineMarxistsAgentCommand-2QTHJCHV.js → offlineMarxistsAgentCommand-XVXUE6G5.js} +6 -6
  210. package/overlay-BBQZXGYI.js +13 -0
  211. package/package.json +2 -2
  212. package/{pdf-U6KSUEZZ.js → pdf-KE3QI2V7.js} +1 -1
  213. package/{processSpawn-ZU5QFM43.js → processSpawn-6GEO77KV.js} +1 -1
  214. package/{profileConfig-KN3N2BLF.js → profileConfig-KOWK4HOG.js} +1 -1
  215. package/{projectArchive-DRTDIMEV.js → projectArchive-OIUP63MV.js} +59 -56
  216. package/{providerPresetApply-YXGV6NXB.js → providerPresetApply-WHAMP2D5.js} +20 -13
  217. package/{providerRegistry-S6UL6UNA.js → providerRegistry-ZI2KORJ7.js} +11 -11
  218. package/{read-4V2RMG7N.js → read-TYMBGEXO.js} +13 -13
  219. package/{readDocTool-BH6ATGQO.js → readDocTool-SKQVHBLO.js} +2 -2
  220. package/{readlineWorkspace-2W4WRCOU.js → readlineWorkspace-ZGC4KSXG.js} +7760 -6499
  221. package/{removeDialogAgentAction-LYAZGNKW.js → removeDialogAgentAction-F5QE2O2B.js} +29 -28
  222. package/{runAgentClientLoop-J2VQBS2Z.js → runAgentClientLoop-NKUW2DSJ.js} +94 -88
  223. package/{runtimeDoctorCommands-QAI3MBKQ.js → runtimeDoctorCommands-RRKPBGVO.js} +19 -19
  224. package/{runtimeModeArgs-2Y7BALTO.js → runtimeModeArgs-X7DL7PUN.js} +1 -1
  225. package/secretCommands-KZWBZIYS.js +24 -0
  226. package/{setDialogExtraReferencesAction-OCRPGPYH.js → setDialogExtraReferencesAction-72L27ERM.js} +25 -24
  227. package/{setPrimaryDialogAgentAction-HFJDQIBU.js → setPrimaryDialogAgentAction-GJJDUSGJ.js} +29 -28
  228. package/{settingThunks-RAMHMTGM.js → settingThunks-ZRGWVGZD.js} +99 -90
  229. package/{skillDiscovery-XKHROSH2.js → skillDiscovery-I37M5KJC.js} +4 -4
  230. package/{skillSummaryMarker-42HKSXYY.js → skillSummaryMarker-62UW7HI7.js} +1 -1
  231. package/{slateToRenderMarkdown-Y5IYN73U.js → slateToRenderMarkdown-R3X74MCX.js} +1 -1
  232. package/{slateUtils-NGV2NMKM.js → slateUtils-ESQAJ6RN.js} +1 -1
  233. package/{spaceCommands-KVJZVKVO.js → spaceCommands-MEH3HJBC.js} +66 -57
  234. package/store-Z53ICFL3.js +48 -0
  235. package/{streamAgentChatTurn-GHBMJJ6S.js → streamAgentChatTurn-FJTUUXHJ.js} +886 -668
  236. package/{switchDialogAgentAction-EBRMW3RA.js → switchDialogAgentAction-IIJBPND3.js} +26 -25
  237. package/{tableCommands-MP6VFSVT.js → tableCommands-FTAOCBTX.js} +13 -13
  238. package/tombstones-FQQMEDOW.js +32 -0
  239. package/{toolApiClient-HGNO53TC.js → toolApiClient-OGQEBQVX.js} +4 -4
  240. package/{tools-EWKCPKMS.js → tools-ZXHIAOSP.js} +82 -81
  241. package/tuiRestart-2IL37YIB.js +41 -0
  242. package/tuiSummaryLlmCaller-W2QN4VAC.js +44 -0
  243. package/{updateCommands-ZQYU6SCI.js → updateCommands-CPATDG6J.js} +11 -7
  244. package/{updateDialogTitleAction-5GGMBTDF.js → updateDialogTitleAction-JMKLKL4P.js} +54 -51
  245. package/{usageCommand-F4IPVMIZ.js → usageCommand-2BF74MKF.js} +11 -10
  246. package/{usageRebuildCommand-HAW2AD5N.js → usageRebuildCommand-UHB55BQM.js} +12 -11
  247. package/userDataMerge-HT2ZVHBJ.js +13 -0
  248. package/{windowsSelfUpdate-257DV2T6.js → windowsSelfUpdate-ZFD6J5HF.js} +3 -3
  249. package/{workloadLifecycle-4C42SVBD.js → workloadLifecycle-HFJIN5IZ.js} +4 -4
  250. package/agentRecordCommands-ZQ7SVYGG.js +0 -167
  251. package/agentRunCommand-WS7IGO2W.js +0 -196
  252. package/chunk-3CGG2PAL.js +0 -594
  253. package/chunk-5MQRBSMW.js +0 -862
  254. package/chunk-5XBUWM6I.js +0 -89
  255. package/chunk-CJEIOP3E.js +0 -0
  256. package/chunk-EHGEOAHI.js +0 -636
  257. package/chunk-FW6YHHLI.js +0 -842
  258. package/chunk-GPVRUGGY.js +0 -115
  259. package/chunk-HSVBJRF4.js +0 -339
  260. package/chunk-LEC5ALIN.js +0 -91
  261. package/chunk-WACI5I6V.js +0 -147
  262. package/chunk-WJZOQR2J.js +0 -151
  263. package/chunk-ZCWRMUWT.js +0 -89
  264. package/dist-M676ULYG.js +0 -7314
  265. package/machineWsRunDispatch-WWJQ6WR3.js +0 -182
  266. package/models-PJBE6JDV.js +0 -9
  267. package/tuiSummaryLlmCaller-ALQYUUWB.js +0 -189
  268. package/{chunk-AGP3YSEC.js → chunk-4N6G2CKP.js} +3 -3
  269. package/{chunk-BLVSFYQ3.js → chunk-LISC7BD4.js} +3 -3
  270. package/{chunk-2QHFH3DR.js → chunk-USGHJSGO.js} +3 -3
  271. package/{chunk-AETZ7AD6.js → chunk-W6RFEDN4.js} +3 -3
@@ -1,3 +1,13 @@
1
+ import {
2
+ writeOAuthCredential
3
+ } from "./chunk-G7Y4GXTY.js";
4
+ import {
5
+ buildEnvFromProfile,
6
+ loadProfileConfig
7
+ } from "./chunk-R5GO3YZP.js";
8
+ import {
9
+ getCliLocale
10
+ } from "./chunk-262R3XNN.js";
1
11
  import {
2
12
  ANTIGRAVITY_AUTH_URL,
3
13
  ANTIGRAVITY_CALLBACK_PATH,
@@ -11,26 +21,938 @@ import {
11
21
  getAntigravityUserAgent,
12
22
  normalizeAntigravityTokenPayload,
13
23
  refreshAntigravityToken
14
- } from "./chunk-KIM6CLW5.js";
24
+ } from "./chunk-7JGMNKKG.js";
15
25
  import {
16
26
  toErrorMessage
17
27
  } from "./chunk-HNMXYYJR.js";
28
+ import {
29
+ asTrimmedString
30
+ } from "./chunk-3EUW3WEO.js";
18
31
  import {
19
32
  isRecord
20
33
  } from "./chunk-KUG52IAP.js";
21
- import {
22
- buildEnvFromProfile,
23
- loadProfileConfig
24
- } from "./chunk-R5GO3YZP.js";
25
- import {
26
- writeOAuthCredential
27
- } from "./chunk-G7Y4GXTY.js";
28
34
  import {
29
35
  asOptionalFiniteNumber
30
36
  } from "./chunk-WWC7I6TA.js";
31
- import {
32
- asTrimmedString
33
- } from "./chunk-3EUW3WEO.js";
37
+
38
+ // packages/cli/tui/wtAmbiguousWidth.ts
39
+ import fs from "node:fs";
40
+ import path from "node:path";
41
+ var WT_PACKAGE_NAMES = [
42
+ "Microsoft.WindowsTerminal_8wekyb3d8bbwe",
43
+ "Microsoft.WindowsTerminalPreview_8wekyb3d8bbwe"
44
+ ];
45
+ function wtSettingsCandidates(env = process.env) {
46
+ const localAppData = env.LOCALAPPDATA;
47
+ if (typeof localAppData !== "string" || localAppData.trim() === "") return [];
48
+ return WT_PACKAGE_NAMES.map(
49
+ (name) => path.join(localAppData, "Packages", name, "LocalState", "settings.json")
50
+ );
51
+ }
52
+ function stripJsonComments(text) {
53
+ let out = "";
54
+ let inString = false;
55
+ let inLineComment = false;
56
+ let inBlockComment = false;
57
+ for (let i = 0; i < text.length; i += 1) {
58
+ const ch = text[i];
59
+ const next = text[i + 1];
60
+ if (inLineComment) {
61
+ if (ch === "\n") {
62
+ inLineComment = false;
63
+ out += ch;
64
+ }
65
+ continue;
66
+ }
67
+ if (inBlockComment) {
68
+ if (ch === "*" && next === "/") {
69
+ inBlockComment = false;
70
+ i += 1;
71
+ }
72
+ continue;
73
+ }
74
+ if (inString) {
75
+ out += ch;
76
+ if (ch === "\\") {
77
+ out += next ?? "";
78
+ i += 1;
79
+ continue;
80
+ }
81
+ if (ch === '"') inString = false;
82
+ continue;
83
+ }
84
+ if (ch === '"') {
85
+ inString = true;
86
+ out += ch;
87
+ continue;
88
+ }
89
+ if (ch === "/" && next === "/") {
90
+ inLineComment = true;
91
+ i += 1;
92
+ continue;
93
+ }
94
+ if (ch === "/" && next === "*") {
95
+ inBlockComment = true;
96
+ i += 1;
97
+ continue;
98
+ }
99
+ out += ch;
100
+ }
101
+ return out;
102
+ }
103
+ function parseAmbiguousWidthSetting(text) {
104
+ const active = stripJsonComments(text);
105
+ const match = active.match(/"(?:[A-Za-z0-9_]+\.)?ambiguousWidth"\s*:\s*"([A-Za-z]+)"/);
106
+ if (!match) return null;
107
+ const value = match[1].toLowerCase();
108
+ if (value === "wide") return "wide";
109
+ if (value === "narrow") return "narrow";
110
+ return null;
111
+ }
112
+ function detectWindowsTerminalAmbiguousWidth(deps = {}) {
113
+ const platform = deps.platform ?? process.platform;
114
+ if (platform !== "win32") return null;
115
+ const env = deps.env ?? process.env;
116
+ const readFile = deps.readFile ?? ((filePath) => {
117
+ try {
118
+ return fs.readFileSync(filePath, "utf8");
119
+ } catch {
120
+ return null;
121
+ }
122
+ });
123
+ for (const candidate of wtSettingsCandidates(env)) {
124
+ const text = readFile(candidate);
125
+ if (text === null) continue;
126
+ const parsed = parseAmbiguousWidthSetting(text);
127
+ return parsed ?? "narrow";
128
+ }
129
+ return null;
130
+ }
131
+
132
+ // node_modules/ansi-regex/index.js
133
+ function ansiRegex({ onlyFirst = false } = {}) {
134
+ const ST = "(?:\\u0007|\\u001B\\u005C|\\u009C)";
135
+ const osc = `(?:\\u001B\\][^\\u0007\\u001B\\u009C]*${ST})`;
136
+ const csi = "[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]";
137
+ const pattern = `${osc}|${csi}`;
138
+ return new RegExp(pattern, onlyFirst ? void 0 : "g");
139
+ }
140
+
141
+ // node_modules/strip-ansi/index.js
142
+ var regex = ansiRegex();
143
+ function stripAnsi(string) {
144
+ if (typeof string !== "string") {
145
+ throw new TypeError(`Expected a \`string\`, got \`${typeof string}\``);
146
+ }
147
+ if (!string.includes("\x1B") && !string.includes("\x9B")) {
148
+ return string;
149
+ }
150
+ return string.replace(regex, "");
151
+ }
152
+
153
+ // node_modules/get-east-asian-width/lookup-data.js
154
+ var ambiguousMinimalCodePoint = 161;
155
+ var ambiguousMaximumCodePoint = 1114109;
156
+ var ambiguousRanges = [161, 161, 164, 164, 167, 168, 170, 170, 173, 174, 176, 180, 182, 186, 188, 191, 198, 198, 208, 208, 215, 216, 222, 225, 230, 230, 232, 234, 236, 237, 240, 240, 242, 243, 247, 250, 252, 252, 254, 254, 257, 257, 273, 273, 275, 275, 283, 283, 294, 295, 299, 299, 305, 307, 312, 312, 319, 322, 324, 324, 328, 331, 333, 333, 338, 339, 358, 359, 363, 363, 462, 462, 464, 464, 466, 466, 468, 468, 470, 470, 472, 472, 474, 474, 476, 476, 593, 593, 609, 609, 708, 708, 711, 711, 713, 715, 717, 717, 720, 720, 728, 731, 733, 733, 735, 735, 768, 879, 913, 929, 931, 937, 945, 961, 963, 969, 1025, 1025, 1040, 1103, 1105, 1105, 8208, 8208, 8211, 8214, 8216, 8217, 8220, 8221, 8224, 8226, 8228, 8231, 8240, 8240, 8242, 8243, 8245, 8245, 8251, 8251, 8254, 8254, 8308, 8308, 8319, 8319, 8321, 8324, 8364, 8364, 8451, 8451, 8453, 8453, 8457, 8457, 8467, 8467, 8470, 8470, 8481, 8482, 8486, 8486, 8491, 8491, 8531, 8532, 8539, 8542, 8544, 8555, 8560, 8569, 8585, 8585, 8592, 8601, 8632, 8633, 8658, 8658, 8660, 8660, 8679, 8679, 8704, 8704, 8706, 8707, 8711, 8712, 8715, 8715, 8719, 8719, 8721, 8721, 8725, 8725, 8730, 8730, 8733, 8736, 8739, 8739, 8741, 8741, 8743, 8748, 8750, 8750, 8756, 8759, 8764, 8765, 8776, 8776, 8780, 8780, 8786, 8786, 8800, 8801, 8804, 8807, 8810, 8811, 8814, 8815, 8834, 8835, 8838, 8839, 8853, 8853, 8857, 8857, 8869, 8869, 8895, 8895, 8978, 8978, 9312, 9449, 9451, 9547, 9552, 9587, 9600, 9615, 9618, 9621, 9632, 9633, 9635, 9641, 9650, 9651, 9654, 9655, 9660, 9661, 9664, 9665, 9670, 9672, 9675, 9675, 9678, 9681, 9698, 9701, 9711, 9711, 9733, 9734, 9737, 9737, 9742, 9743, 9756, 9756, 9758, 9758, 9792, 9792, 9794, 9794, 9824, 9825, 9827, 9829, 9831, 9834, 9836, 9837, 9839, 9839, 9886, 9887, 9919, 9919, 9926, 9933, 9935, 9939, 9941, 9953, 9955, 9955, 9960, 9961, 9963, 9969, 9972, 9972, 9974, 9977, 9979, 9980, 9982, 9983, 10045, 10045, 10102, 10111, 11094, 11097, 12872, 12879, 57344, 63743, 65024, 65039, 65533, 65533, 127232, 127242, 127248, 127277, 127280, 127337, 127344, 127373, 127375, 127376, 127387, 127404, 917760, 917999, 983040, 1048573, 1048576, 1114109];
157
+ var fullwidthMinimalCodePoint = 12288;
158
+ var fullwidthMaximumCodePoint = 65510;
159
+ var fullwidthRanges = [12288, 12288, 65281, 65376, 65504, 65510];
160
+ var wideMinimalCodePoint = 4352;
161
+ var wideMaximumCodePoint = 262141;
162
+ var wideRanges = [4352, 4447, 8986, 8987, 9001, 9002, 9193, 9196, 9200, 9200, 9203, 9203, 9725, 9726, 9748, 9749, 9776, 9783, 9800, 9811, 9855, 9855, 9866, 9871, 9875, 9875, 9889, 9889, 9898, 9899, 9917, 9918, 9924, 9925, 9934, 9934, 9940, 9940, 9962, 9962, 9970, 9971, 9973, 9973, 9978, 9978, 9981, 9981, 9989, 9989, 9994, 9995, 10024, 10024, 10060, 10060, 10062, 10062, 10067, 10069, 10071, 10071, 10133, 10135, 10160, 10160, 10175, 10175, 11035, 11036, 11088, 11088, 11093, 11093, 11904, 11929, 11931, 12019, 12032, 12245, 12272, 12287, 12289, 12350, 12353, 12438, 12441, 12543, 12549, 12591, 12593, 12686, 12688, 12773, 12783, 12830, 12832, 12871, 12880, 42124, 42128, 42182, 43360, 43388, 44032, 55203, 63744, 64255, 65040, 65049, 65072, 65106, 65108, 65126, 65128, 65131, 94176, 94180, 94192, 94198, 94208, 101594, 101631, 101664, 101760, 101874, 101888, 102801, 102816, 102866, 110576, 110579, 110581, 110587, 110589, 110590, 110592, 110888, 110898, 110898, 110928, 110930, 110933, 110933, 110948, 110952, 110960, 111355, 119552, 119638, 119648, 119670, 126980, 126980, 127183, 127183, 127374, 127374, 127377, 127386, 127406, 127406, 127488, 127490, 127504, 127547, 127552, 127560, 127568, 127569, 127584, 127589, 127744, 127776, 127789, 127797, 127799, 127868, 127870, 127891, 127904, 127946, 127951, 127955, 127968, 127984, 127988, 127988, 127992, 128062, 128064, 128064, 128066, 128252, 128255, 128317, 128331, 128334, 128336, 128359, 128378, 128378, 128405, 128406, 128420, 128420, 128507, 128591, 128640, 128709, 128716, 128716, 128720, 128722, 128725, 128729, 128732, 128735, 128747, 128748, 128756, 128764, 128986, 128986, 128992, 129003, 129008, 129008, 129292, 129338, 129340, 129349, 129351, 129535, 129648, 129660, 129664, 129734, 129736, 129736, 129740, 129757, 129759, 129771, 129775, 129786, 131072, 196605, 196608, 262141];
163
+
164
+ // node_modules/get-east-asian-width/utilities.js
165
+ var isInRange = (ranges, codePoint) => {
166
+ let low = 0;
167
+ let high = Math.floor(ranges.length / 2) - 1;
168
+ while (low <= high) {
169
+ const mid = Math.floor((low + high) / 2);
170
+ const i = mid * 2;
171
+ if (codePoint < ranges[i]) {
172
+ high = mid - 1;
173
+ } else if (codePoint > ranges[i + 1]) {
174
+ low = mid + 1;
175
+ } else {
176
+ return true;
177
+ }
178
+ }
179
+ return false;
180
+ };
181
+
182
+ // node_modules/get-east-asian-width/lookup.js
183
+ var commonCjkCodePoint = 19968;
184
+ var [wideFastPathStart, wideFastPathEnd] = /* @__PURE__ */ findWideFastPathRange(wideRanges);
185
+ function findWideFastPathRange(ranges) {
186
+ let fastPathStart = ranges[0];
187
+ let fastPathEnd = ranges[1];
188
+ for (let index = 0; index < ranges.length; index += 2) {
189
+ const start = ranges[index];
190
+ const end = ranges[index + 1];
191
+ if (commonCjkCodePoint >= start && commonCjkCodePoint <= end) {
192
+ return [start, end];
193
+ }
194
+ if (end - start > fastPathEnd - fastPathStart) {
195
+ fastPathStart = start;
196
+ fastPathEnd = end;
197
+ }
198
+ }
199
+ return [fastPathStart, fastPathEnd];
200
+ }
201
+ var isAmbiguous = (codePoint) => {
202
+ if (codePoint < ambiguousMinimalCodePoint || codePoint > ambiguousMaximumCodePoint) {
203
+ return false;
204
+ }
205
+ return isInRange(ambiguousRanges, codePoint);
206
+ };
207
+ var isFullwidth = (codePoint) => {
208
+ if (codePoint < fullwidthMinimalCodePoint || codePoint > fullwidthMaximumCodePoint) {
209
+ return false;
210
+ }
211
+ return isInRange(fullwidthRanges, codePoint);
212
+ };
213
+ var isWide = (codePoint) => {
214
+ if (codePoint >= wideFastPathStart && codePoint <= wideFastPathEnd) {
215
+ return true;
216
+ }
217
+ if (codePoint < wideMinimalCodePoint || codePoint > wideMaximumCodePoint) {
218
+ return false;
219
+ }
220
+ return isInRange(wideRanges, codePoint);
221
+ };
222
+
223
+ // node_modules/get-east-asian-width/index.js
224
+ function validate(codePoint) {
225
+ if (!Number.isSafeInteger(codePoint)) {
226
+ throw new TypeError(`Expected a code point, got \`${typeof codePoint}\`.`);
227
+ }
228
+ }
229
+ function eastAsianWidth(codePoint, { ambiguousAsWide = false } = {}) {
230
+ validate(codePoint);
231
+ if (isFullwidth(codePoint) || isWide(codePoint) || ambiguousAsWide && isAmbiguous(codePoint)) {
232
+ return 2;
233
+ }
234
+ return 1;
235
+ }
236
+
237
+ // node_modules/string-width/index.js
238
+ var segmenter = new Intl.Segmenter();
239
+ var zeroWidthClusterRegex = new RegExp("^(?:\\p{Default_Ignorable_Code_Point}|\\p{Control}|\\p{Format}|\\p{Nonspacing_Mark}|\\p{Enclosing_Mark}|\\p{Surrogate})+$", "v");
240
+ var leadingNonPrintingRegex = new RegExp("^[\\p{Default_Ignorable_Code_Point}\\p{Control}\\p{Format}\\p{Nonspacing_Mark}\\p{Enclosing_Mark}\\p{Surrogate}]+", "v");
241
+ var spacingMarkRegex = new RegExp("\\p{Spacing_Mark}", "v");
242
+ var rgiEmojiRegex = new RegExp("^\\p{RGI_Emoji}$", "v");
243
+ var unqualifiedKeycapRegex = /^[\d#*]\u20E3$/;
244
+ var extendedPictographicRegex = new RegExp("\\p{Extended_Pictographic}", "gu");
245
+ function isDoubleWidthNonRgiEmojiSequence(segment) {
246
+ if (segment.length > 50) {
247
+ return false;
248
+ }
249
+ if (unqualifiedKeycapRegex.test(segment)) {
250
+ return true;
251
+ }
252
+ if (segment.includes("\u200D")) {
253
+ const pictographics = segment.match(extendedPictographicRegex);
254
+ return pictographics !== null && pictographics.length >= 2;
255
+ }
256
+ return false;
257
+ }
258
+ function baseVisible(segment) {
259
+ return segment.replace(leadingNonPrintingRegex, "");
260
+ }
261
+ function isZeroWidthCluster(segment) {
262
+ return zeroWidthClusterRegex.test(segment);
263
+ }
264
+ function isHangulLeadingJamo(codePoint) {
265
+ return codePoint >= 4352 && codePoint <= 4447 || codePoint >= 43360 && codePoint <= 43388;
266
+ }
267
+ function isHangulVowelJamo(codePoint) {
268
+ return codePoint >= 4448 && codePoint <= 4519 || codePoint >= 55216 && codePoint <= 55238;
269
+ }
270
+ function isHangulTrailingJamo(codePoint) {
271
+ return codePoint >= 4520 && codePoint <= 4607 || codePoint >= 55243 && codePoint <= 55291;
272
+ }
273
+ function isHangulJamo(codePoint) {
274
+ return isHangulLeadingJamo(codePoint) || isHangulVowelJamo(codePoint) || isHangulTrailingJamo(codePoint);
275
+ }
276
+ function hangulClusterWidth(visibleSegment, eastAsianWidthOptions) {
277
+ const codePoints = [];
278
+ for (const character of visibleSegment) {
279
+ if (zeroWidthClusterRegex.test(character)) {
280
+ continue;
281
+ }
282
+ codePoints.push(character.codePointAt(0));
283
+ }
284
+ if (codePoints.length === 0) {
285
+ return void 0;
286
+ }
287
+ let width = 0;
288
+ for (let index = 0; index < codePoints.length; index++) {
289
+ const codePoint = codePoints[index];
290
+ if (!isHangulJamo(codePoint)) {
291
+ if (width === 0) {
292
+ return void 0;
293
+ }
294
+ for (let remaining = index; remaining < codePoints.length; remaining++) {
295
+ width += eastAsianWidth(codePoints[remaining], eastAsianWidthOptions);
296
+ }
297
+ return width;
298
+ }
299
+ if (isHangulLeadingJamo(codePoint) && isHangulVowelJamo(codePoints[index + 1])) {
300
+ width += 2;
301
+ index += isHangulTrailingJamo(codePoints[index + 2]) ? 2 : 1;
302
+ continue;
303
+ }
304
+ width += eastAsianWidth(codePoint, eastAsianWidthOptions);
305
+ }
306
+ return width;
307
+ }
308
+ function trailingWidth(visibleSegment, eastAsianWidthOptions) {
309
+ let extra = 0;
310
+ let first = true;
311
+ for (const character of visibleSegment) {
312
+ if (first) {
313
+ first = false;
314
+ continue;
315
+ }
316
+ if (spacingMarkRegex.test(character) || character >= "\uFF00" && character <= "\uFFEF") {
317
+ extra += eastAsianWidth(character.codePointAt(0), eastAsianWidthOptions);
318
+ }
319
+ }
320
+ return extra;
321
+ }
322
+ function stringWidth(input, options = {}) {
323
+ if (typeof input !== "string" || input.length === 0) {
324
+ return 0;
325
+ }
326
+ const {
327
+ ambiguousIsNarrow = true,
328
+ countAnsiEscapeCodes = false
329
+ } = options;
330
+ let string = input;
331
+ if (!countAnsiEscapeCodes && (string.includes("\x1B") || string.includes("\x9B"))) {
332
+ string = stripAnsi(string);
333
+ }
334
+ if (string.length === 0) {
335
+ return 0;
336
+ }
337
+ if (/^[\u0020-\u007E]*$/.test(string)) {
338
+ return string.length;
339
+ }
340
+ let width = 0;
341
+ const eastAsianWidthOptions = { ambiguousAsWide: !ambiguousIsNarrow };
342
+ for (const { segment } of segmenter.segment(string)) {
343
+ if (isZeroWidthCluster(segment)) {
344
+ continue;
345
+ }
346
+ if (rgiEmojiRegex.test(segment) || isDoubleWidthNonRgiEmojiSequence(segment)) {
347
+ width += 2;
348
+ continue;
349
+ }
350
+ const visibleSegment = baseVisible(segment);
351
+ const hangulWidth = hangulClusterWidth(visibleSegment, eastAsianWidthOptions);
352
+ if (hangulWidth !== void 0) {
353
+ width += hangulWidth;
354
+ continue;
355
+ }
356
+ const codePoint = visibleSegment.codePointAt(0);
357
+ width += eastAsianWidth(codePoint, eastAsianWidthOptions);
358
+ width += trailingWidth(visibleSegment, eastAsianWidthOptions);
359
+ }
360
+ return width;
361
+ }
362
+
363
+ // packages/cli/tui/tuiAnsi.ts
364
+ var ANSI_ESCAPE_REGEX = /\x1b\[[\x30-\x3f]*[\x20-\x2f]*[\x40-\x7e]/g;
365
+ var OSC8_HYPERLINK_REGEX = /\x1b\]8;;[^\x1b]*\x1b\\/g;
366
+ var ALL_ANSI_ESCAPE_REGEX = ansiRegex();
367
+ var FIRST_ANSI_ESCAPE_REGEX = ansiRegex({ onlyFirst: true });
368
+ function stripOsc8Hyperlinks(text) {
369
+ return text.replace(OSC8_HYPERLINK_REGEX, "");
370
+ }
371
+ function stripAnsi2(text) {
372
+ return text.replace(ANSI_ESCAPE_REGEX, "").replace(ALL_ANSI_ESCAPE_REGEX, "");
373
+ }
374
+ var SGR_SEQUENCE_REGEX = /^\x1b\[[0-9;]*m/;
375
+ var TRAILING_SGR_REGEX = /(?:\x1b\[[0-9;]*m)+$/;
376
+ function applyTerminalOutputToText(existing, chunk) {
377
+ if (!chunk) return existing;
378
+ let text = existing;
379
+ let index = 0;
380
+ while (index < chunk.length) {
381
+ if (chunk[index] === "\x1B") {
382
+ const sgr = SGR_SEQUENCE_REGEX.exec(chunk.slice(index));
383
+ if (sgr) {
384
+ text += sgr[0];
385
+ index += sgr[0].length;
386
+ continue;
387
+ }
388
+ const osc = chunk.slice(index).match(/^\x1b\]8;;[^\x07\x1b]*(?:\x07|\x1b\\)/);
389
+ if (osc) {
390
+ index += osc[0].length;
391
+ continue;
392
+ }
393
+ const csi = chunk.slice(index).match(/^\x1b\[[\x30-\x3f]*[\x20-\x2f]*[\x40-\x7e]/);
394
+ if (csi) {
395
+ index += csi[0].length;
396
+ continue;
397
+ }
398
+ index += 1;
399
+ continue;
400
+ }
401
+ const ch = chunk[index];
402
+ if (ch === "\r") {
403
+ const lastNl = text.lastIndexOf("\n");
404
+ text = lastNl === -1 ? "" : text.slice(0, lastNl + 1);
405
+ index += 1;
406
+ continue;
407
+ }
408
+ if (ch === "\n") {
409
+ text += "\n";
410
+ index += 1;
411
+ continue;
412
+ }
413
+ if (ch === "\b") {
414
+ const trailing = TRAILING_SGR_REGEX.exec(text);
415
+ const sgrTail = trailing ? trailing[0] : "";
416
+ const head = sgrTail ? text.slice(0, -sgrTail.length) : text;
417
+ if (head.length > 0 && head[head.length - 1] !== "\n") {
418
+ text = head.slice(0, -1) + sgrTail;
419
+ }
420
+ index += 1;
421
+ continue;
422
+ }
423
+ const code = ch.charCodeAt(0);
424
+ if (code < 32 && ch !== " " || code === 127) {
425
+ index += 1;
426
+ continue;
427
+ }
428
+ text += ch;
429
+ index += 1;
430
+ }
431
+ return text;
432
+ }
433
+ function resolveAmbiguousWidth(explicit, env = process.env) {
434
+ if (explicit === "wide" || explicit === "narrow") return explicit;
435
+ const raw = env.NOLO_TUI_AMBIGUOUS_WIDTH;
436
+ if (typeof raw === "string") {
437
+ const trimmed = raw.trim().toLowerCase();
438
+ if (trimmed === "wide") return "wide";
439
+ if (trimmed === "narrow") return "narrow";
440
+ }
441
+ return detectedWindowsTerminalAmbiguousWidth() ?? "narrow";
442
+ }
443
+ var wtAmbiguousWidthCache;
444
+ function detectedWindowsTerminalAmbiguousWidth() {
445
+ if (wtAmbiguousWidthCache === void 0) {
446
+ wtAmbiguousWidthCache = detectWindowsTerminalAmbiguousWidth();
447
+ }
448
+ return wtAmbiguousWidthCache;
449
+ }
450
+ function isCjkFontWideSymbolCode(code) {
451
+ return code >= 9728 && code <= 10175 && !(code >= 10088 && code <= 10101) || code >= 11008 && code <= 11263 || code >= 127744 && code <= 129791 || code >= 8986 && code <= 8987 || // ⌚ ⌛
452
+ code >= 9193 && code <= 9210;
453
+ }
454
+ function isCjkQuoteCode(code) {
455
+ return code === 8220 || code === 8221 || code === 8216 || code === 8217;
456
+ }
457
+ var UNICODE_BOX_GLYPHS = {
458
+ h: "\u2500",
459
+ v: "\u2502",
460
+ tl: "\u250C",
461
+ tm: "\u252C",
462
+ tr: "\u2510",
463
+ ml: "\u251C",
464
+ mm: "\u253C",
465
+ mr: "\u2524",
466
+ bl: "\u2514",
467
+ bm: "\u2534",
468
+ br: "\u2518"
469
+ };
470
+ var ASCII_BOX_GLYPHS = {
471
+ h: "-",
472
+ v: "|",
473
+ tl: "+",
474
+ tm: "+",
475
+ tr: "+",
476
+ ml: "+",
477
+ mm: "+",
478
+ mr: "+",
479
+ bl: "+",
480
+ bm: "+",
481
+ br: "+"
482
+ };
483
+ function resolveBoxCharset(ambiguousWidth = resolveAmbiguousWidth(), env = process.env) {
484
+ const raw = env.NOLO_TUI_BOX;
485
+ if (typeof raw === "string") {
486
+ const trimmed = raw.trim().toLowerCase();
487
+ if (trimmed === "ascii") return "ascii";
488
+ if (trimmed === "unicode") return "unicode";
489
+ }
490
+ return ambiguousWidth === "wide" ? "ascii" : "unicode";
491
+ }
492
+ function boxGlyphs(charset) {
493
+ return charset === "ascii" ? ASCII_BOX_GLYPHS : UNICODE_BOX_GLYPHS;
494
+ }
495
+ function scanWidthNeeds(plain, locale, ambiguousWidth) {
496
+ let hasNonAscii = false;
497
+ const isWideMode = ambiguousWidth === "wide";
498
+ for (let i = 0; i < plain.length; i++) {
499
+ const cc = plain.charCodeAt(i);
500
+ if (cc < 8192) {
501
+ if (cc >= 128) hasNonAscii = true;
502
+ continue;
503
+ }
504
+ hasNonAscii = true;
505
+ let code = cc;
506
+ if (cc >= 55296 && cc <= 56319 && i + 1 < plain.length) {
507
+ const lo = plain.charCodeAt(i + 1);
508
+ if (lo >= 56320 && lo <= 57343) {
509
+ code = (cc - 55296) * 1024 + (lo - 56320) + 65536;
510
+ i += 1;
511
+ }
512
+ }
513
+ const isSymbolCandidate = isWideMode && isCjkFontWideSymbolCode(code);
514
+ const isQuoteCandidate = locale === "zh" && isCjkQuoteCode(code);
515
+ if (isSymbolCandidate || isQuoteCandidate) {
516
+ return { hasNonAscii: true, hasCandidate: true };
517
+ }
518
+ }
519
+ return { hasNonAscii, hasCandidate: false };
520
+ }
521
+ var displayWidthCache = /* @__PURE__ */ new Map();
522
+ var DISPLAY_WIDTH_CACHE_MAX = 4096;
523
+ function displayWidth(str, ambiguousWidth = resolveAmbiguousWidth()) {
524
+ const plain = stripAnsi2(str);
525
+ const locale = getCliLocale();
526
+ const widthOptions = { ambiguousIsNarrow: ambiguousWidth !== "wide" };
527
+ const needs = scanWidthNeeds(plain, locale, ambiguousWidth);
528
+ if (!needs.hasNonAscii) {
529
+ return stringWidth(plain, widthOptions);
530
+ }
531
+ const key = locale + "\0" + ambiguousWidth + "\0" + plain;
532
+ const cached = displayWidthCache.get(key);
533
+ if (cached !== void 0) return cached;
534
+ const remember = (width2) => {
535
+ if (displayWidthCache.size >= DISPLAY_WIDTH_CACHE_MAX) {
536
+ const eldest = displayWidthCache.keys().next().value;
537
+ if (eldest !== void 0) displayWidthCache.delete(eldest);
538
+ }
539
+ displayWidthCache.set(key, width2);
540
+ return width2;
541
+ };
542
+ const base = stringWidth(plain, widthOptions);
543
+ if (!needs.hasCandidate) {
544
+ return remember(base);
545
+ }
546
+ let width = base;
547
+ const isWideMode = ambiguousWidth === "wide";
548
+ for (const { segment } of graphemeSegmenter.segment(plain)) {
549
+ const code = segment.codePointAt(0) ?? 0;
550
+ const isSymbol = isWideMode && isCjkFontWideSymbolCode(code);
551
+ const isQuote = locale === "zh" && isCjkQuoteCode(code);
552
+ if (isSymbol || isQuote) {
553
+ if (stringWidth(segment, widthOptions) === 1) width += 1;
554
+ }
555
+ }
556
+ return remember(width);
557
+ }
558
+ function visibleWidth(str) {
559
+ return displayWidth(stripAnsi2(str));
560
+ }
561
+ function truncateAnsi(text, maxWidth) {
562
+ if (maxWidth <= 0) return "";
563
+ text = stripOsc8Hyperlinks(text);
564
+ if (visibleWidth(text) <= maxWidth) return text;
565
+ let width = 0;
566
+ let out = "";
567
+ let i = 0;
568
+ let sawAnsi = false;
569
+ while (i < text.length) {
570
+ if (text[i] === "\x1B" && text[i + 1] === "[") {
571
+ sawAnsi = true;
572
+ let j = i + 2;
573
+ while (j < text.length) {
574
+ const code = text.charCodeAt(j);
575
+ j += 1;
576
+ if (code >= 64 && code <= 126) break;
577
+ }
578
+ out += text.slice(i, j);
579
+ i = j;
580
+ continue;
581
+ }
582
+ const codePoint = text.codePointAt(i) ?? 0;
583
+ const char = String.fromCodePoint(codePoint);
584
+ const charWidth = displayWidth(char);
585
+ if (width + charWidth > maxWidth) break;
586
+ out += char;
587
+ width += charWidth;
588
+ i += char.length;
589
+ }
590
+ return sawAnsi ? `${out}\x1B[0m` : out;
591
+ }
592
+ function fitAnsiLine(text, width, ellipsis = "\u2026") {
593
+ if (width <= 0) return "";
594
+ if (visibleWidth(text) <= width) return text;
595
+ const ellipsisWidth = displayWidth(ellipsis);
596
+ if (width < ellipsisWidth) return truncateAnsi(text, width);
597
+ if (width === ellipsisWidth) return truncateAnsi(ellipsis, width) || truncateAnsi(text, width);
598
+ return `${truncateAnsi(text, width - ellipsisWidth)}${ellipsis}`;
599
+ }
600
+ function countPhysicalLines(text, columns) {
601
+ const lines = text.split("\n");
602
+ let total = 0;
603
+ for (const line of lines) {
604
+ const width = visibleWidth(stripOsc8Hyperlinks(line));
605
+ total += Math.max(1, Math.ceil(width / columns));
606
+ }
607
+ return Math.max(total, 1);
608
+ }
609
+ function takeDisplayWidth(text, width) {
610
+ let used = 0;
611
+ let index = 0;
612
+ for (const char of text) {
613
+ const charWidth = displayWidth(char);
614
+ if (used + charWidth > width && used > 0) break;
615
+ used += charWidth;
616
+ index += char.length;
617
+ }
618
+ return { prefix: text.slice(0, index), rest: text.slice(index) };
619
+ }
620
+ function padOrTruncateToWidth(text, width) {
621
+ const textWidth = visibleWidth(text);
622
+ if (textWidth > width) {
623
+ return truncateAnsi(text, width);
624
+ }
625
+ return `${text}${" ".repeat(width - textWidth)}`;
626
+ }
627
+ var SGR_RESET_REGEX = /^\x1b\[0?m$/;
628
+ var graphemeSegmenter = new Intl.Segmenter(void 0, { granularity: "grapheme" });
629
+ function tokenizeAnsiLine(line) {
630
+ const tokens = [];
631
+ let index = 0;
632
+ while (index < line.length) {
633
+ if (line[index] === "\x1B") {
634
+ const osc = line.slice(index).match(/^\x1b\]8;;[^\x07\x1b]*(?:\x07|\x1b\\)/);
635
+ if (osc) {
636
+ tokens.push({ kind: "sgr", value: osc[0], width: 0, charIndex: index });
637
+ index += osc[0].length;
638
+ continue;
639
+ }
640
+ const sgr = SGR_SEQUENCE_REGEX.exec(line.slice(index));
641
+ if (sgr) {
642
+ tokens.push({ kind: "sgr", value: sgr[0], width: 0, charIndex: index });
643
+ index += sgr[0].length;
644
+ continue;
645
+ }
646
+ const csi = line.slice(index).match(/^\x1b\[[\x30-\x3f]*[\x20-\x2f]*[\x40-\x7e]/);
647
+ if (csi) {
648
+ index += csi[0].length;
649
+ continue;
650
+ }
651
+ const escape = FIRST_ANSI_ESCAPE_REGEX.exec(line.slice(index));
652
+ if (escape?.index === 0) {
653
+ index += escape[0].length;
654
+ continue;
655
+ }
656
+ index += 1;
657
+ continue;
658
+ }
659
+ let nextEsc = line.indexOf("\x1B", index);
660
+ if (nextEsc === -1) nextEsc = line.length;
661
+ const chunk = line.slice(index, nextEsc);
662
+ for (const item of graphemeSegmenter.segment(chunk)) {
663
+ tokens.push({
664
+ kind: "char",
665
+ value: item.segment,
666
+ width: displayWidth(item.segment),
667
+ charIndex: index + item.index
668
+ });
669
+ }
670
+ index = nextEsc;
671
+ }
672
+ return tokens;
673
+ }
674
+ function buildSourceMapping(rawLine, styledLine, prefixCharCount) {
675
+ let contentStart = 0;
676
+ const headingMatch = rawLine.match(/^(#{1,3})\s+(.+)$/);
677
+ let lineToParse = rawLine;
678
+ if (headingMatch) {
679
+ contentStart = headingMatch[1].length + 1;
680
+ while (contentStart < rawLine.length && rawLine[contentStart] === " ") contentStart++;
681
+ lineToParse = rawLine.slice(contentStart);
682
+ }
683
+ const INLINE_RE = /(\[([^\]]+)\]\(([^)\s]+)\)|`([^`]+)`|\*\*(.+?)\*\*|(?<!\*)\*([^*]+?)\*(?!\*)|~~([^~]+?)~~)/g;
684
+ const mapping = [];
685
+ let lastIdx = 0;
686
+ let match;
687
+ while ((match = INLINE_RE.exec(lineToParse)) !== null) {
688
+ const plainBefore = lineToParse.slice(lastIdx, match.index);
689
+ for (let c = 0; c < plainBefore.length; c++) {
690
+ mapping.push(contentStart + lastIdx + c);
691
+ }
692
+ const fullMatch = match[0];
693
+ if (match[2] !== void 0 && match[3] !== void 0) {
694
+ const linkText = match[2];
695
+ const linkUrl = match[3];
696
+ const textOffset = contentStart + match.index + 1;
697
+ for (let c = 0; c < linkText.length; c++) {
698
+ mapping.push(textOffset + c);
699
+ }
700
+ const parenOffset = textOffset + linkText.length;
701
+ mapping.push(parenOffset);
702
+ mapping.push(parenOffset + 1);
703
+ const urlOffset = parenOffset + 2;
704
+ for (let c = 0; c < linkUrl.length; c++) {
705
+ mapping.push(urlOffset + c);
706
+ }
707
+ mapping.push(urlOffset + linkUrl.length);
708
+ } else if (match[4] !== void 0) {
709
+ const codeText = match[4];
710
+ const codeOffset = contentStart + match.index + 1;
711
+ for (let c = 0; c < codeText.length; c++) {
712
+ mapping.push(codeOffset + c);
713
+ }
714
+ } else if (match[5] !== void 0) {
715
+ const boldText = match[5];
716
+ const boldOffset = contentStart + match.index + 2;
717
+ for (let c = 0; c < boldText.length; c++) {
718
+ mapping.push(boldOffset + c);
719
+ }
720
+ } else if (match[6] !== void 0) {
721
+ const italicText = match[6];
722
+ const italicOffset = contentStart + match.index + 1;
723
+ for (let c = 0; c < italicText.length; c++) {
724
+ mapping.push(italicOffset + c);
725
+ }
726
+ } else if (match[7] !== void 0) {
727
+ const strikeText = match[7];
728
+ const strikeOffset = contentStart + match.index + 2;
729
+ for (let c = 0; c < strikeText.length; c++) {
730
+ mapping.push(strikeOffset + c);
731
+ }
732
+ }
733
+ lastIdx = match.index + fullMatch.length;
734
+ }
735
+ const plainRest = lineToParse.slice(lastIdx);
736
+ for (let c = 0; c < plainRest.length; c++) {
737
+ mapping.push(contentStart + lastIdx + c);
738
+ }
739
+ return mapping;
740
+ }
741
+ function wrapTranscriptLineWithLayout(line, columns, hangingIndent = "", lineSourceStart = 0, prefixWidth = 0, prefixCharCount = 0, sourceMapping, rawLineLength) {
742
+ if (line === "") {
743
+ const rawLen = rawLineLength ?? 0;
744
+ return [
745
+ {
746
+ rendered: "",
747
+ sourceStart: lineSourceStart,
748
+ sourceEnd: lineSourceStart + rawLen,
749
+ prefixWidth
750
+ }
751
+ ];
752
+ }
753
+ const tokens = tokenizeAnsiLine(line);
754
+ const rows = [];
755
+ let activeStyles = [];
756
+ const applyStyleToken = (value) => {
757
+ if (SGR_RESET_REGEX.test(value)) {
758
+ activeStyles = [];
759
+ } else {
760
+ activeStyles.push(value);
761
+ }
762
+ };
763
+ let lastContentTokenIndex = -1;
764
+ for (let i = tokens.length - 1; i >= 0; i -= 1) {
765
+ if (tokens[i].kind !== "sgr") {
766
+ lastContentTokenIndex = i;
767
+ break;
768
+ }
769
+ }
770
+ const CJK_CLOSING_OR_SEP_REGEX = /^[,。!?;:、)》】」』]$/;
771
+ let listMarkerEndToken = 0;
772
+ {
773
+ let plainPrefix = "";
774
+ let probe = 0;
775
+ while (probe < tokens.length && plainPrefix.length < 24) {
776
+ const tok = tokens[probe];
777
+ if (tok.kind === "char") {
778
+ plainPrefix += tok.value;
779
+ if (plainPrefix.length >= 2 && !/^(?:◈ ?)?\s*(?:\d*[.)]?|[•*+-])?\s*$/.test(plainPrefix)) {
780
+ break;
781
+ }
782
+ if (/^(?:◈\s+)?\s*(?:\d+[.)]|[•*+-])\s+$/.test(plainPrefix)) {
783
+ listMarkerEndToken = probe + 1;
784
+ }
785
+ }
786
+ probe += 1;
787
+ }
788
+ }
789
+ let plainCharIndexAtStart = 0;
790
+ let start = 0;
791
+ while (start < tokens.length) {
792
+ if (start > lastContentTokenIndex && rows.length > 0) break;
793
+ const openingStyles = [...activeStyles];
794
+ const isContinuation = rows.length > 0;
795
+ const currentPrefixWidth = isContinuation ? visibleWidth(hangingIndent) : prefixWidth;
796
+ const indentWidth = isContinuation ? visibleWidth(hangingIndent) : 0;
797
+ const maxSegmentWidth = Math.max(1, columns - indentWidth);
798
+ const nextContent = (from) => {
799
+ while (from < tokens.length && tokens[from].kind === "sgr") from += 1;
800
+ return tokens[from];
801
+ };
802
+ let width = 0;
803
+ let end = start;
804
+ let lastBreak = -1;
805
+ while (end < tokens.length) {
806
+ const token = tokens[end];
807
+ if (token.kind === "sgr") {
808
+ end += 1;
809
+ continue;
810
+ }
811
+ if (width + token.width > maxSegmentWidth && width > 0) break;
812
+ width += token.width;
813
+ end += 1;
814
+ if (token.charIndex >= prefixCharCount && (isContinuation || end > listMarkerEndToken)) {
815
+ if (token.value === " " || token.value === " " || CJK_CLOSING_OR_SEP_REGEX.test(token.value) || token.value === "/") {
816
+ lastBreak = end;
817
+ }
818
+ }
819
+ }
820
+ let segmentEnd = end;
821
+ if (end < tokens.length && lastBreak > start) {
822
+ const overflowToken = tokens[end];
823
+ if (overflowToken.kind === "char" && overflowToken.value !== " " && (overflowToken.width === 1 || CJK_CLOSING_OR_SEP_REGEX.test(overflowToken.value)) && nextContent(lastBreak) !== overflowToken) {
824
+ segmentEnd = lastBreak;
825
+ }
826
+ }
827
+ const next = nextContent(segmentEnd);
828
+ if (next?.kind === "char" && CJK_CLOSING_OR_SEP_REGEX.test(next.value)) {
829
+ const minBacktrack = isContinuation ? start : Math.max(start, listMarkerEndToken);
830
+ let previous = segmentEnd - 1;
831
+ while (previous > minBacktrack) {
832
+ const tok = tokens[previous];
833
+ if (tok.kind === "sgr") {
834
+ previous -= 1;
835
+ continue;
836
+ }
837
+ if (CJK_CLOSING_OR_SEP_REGEX.test(tok.value)) {
838
+ previous -= 1;
839
+ continue;
840
+ }
841
+ break;
842
+ }
843
+ const preceding = tokens[previous];
844
+ if (previous > minBacktrack && preceding?.kind === "char" && preceding.value !== " " && preceding.value !== " ") {
845
+ segmentEnd = previous;
846
+ }
847
+ }
848
+ if (segmentEnd === start) segmentEnd = start + 1;
849
+ let segment = "";
850
+ let sawStyle = openingStyles.length > 0;
851
+ for (let i = start; i < segmentEnd; i += 1) {
852
+ const token = tokens[i];
853
+ segment += token.value;
854
+ if (token.kind === "sgr") {
855
+ sawStyle = true;
856
+ applyStyleToken(token.value);
857
+ }
858
+ }
859
+ const prefix = openingStyles.join("");
860
+ const needsReset = (sawStyle || activeStyles.length > 0) && !segment.endsWith("\x1B[0m");
861
+ const lineContent = `${prefix}${segment}${needsReset ? "\x1B[0m" : ""}`;
862
+ const rowRendered = isContinuation && hangingIndent.length > 0 ? `${hangingIndent}${lineContent}` : lineContent;
863
+ let segSourceStart = lineSourceStart;
864
+ let segSourceEnd = lineSourceStart;
865
+ let foundFirst = false;
866
+ const rowMapping = [];
867
+ let plainCharIndex = plainCharIndexAtStart;
868
+ for (let i = start; i < segmentEnd; i++) {
869
+ const tok = tokens[i];
870
+ if (tok.kind === "char" && tok.charIndex >= prefixCharCount) {
871
+ const mappedOffset = sourceMapping && sourceMapping[plainCharIndex] !== void 0 ? sourceMapping[plainCharIndex] : plainCharIndex;
872
+ if (!foundFirst) {
873
+ segSourceStart = lineSourceStart + mappedOffset;
874
+ foundFirst = true;
875
+ }
876
+ for (let c = 0; c < tok.value.length; c++) {
877
+ const idx = plainCharIndex + c;
878
+ const mapped = sourceMapping && sourceMapping[idx] !== void 0 ? sourceMapping[idx] : idx;
879
+ rowMapping.push(lineSourceStart + mapped);
880
+ }
881
+ const lastCharIdx = plainCharIndex + tok.value.length - 1;
882
+ const mappedEndOffset = sourceMapping && sourceMapping[lastCharIdx] !== void 0 ? sourceMapping[lastCharIdx] + 1 : plainCharIndex + tok.value.length;
883
+ segSourceEnd = lineSourceStart + mappedEndOffset;
884
+ plainCharIndex += tok.value.length;
885
+ }
886
+ }
887
+ start = segmentEnd;
888
+ let softWrapJoiner = "";
889
+ while (start < tokens.length) {
890
+ const token = tokens[start];
891
+ if (token.kind === "char" && token.value === " " && token.charIndex >= prefixCharCount) {
892
+ softWrapJoiner += token.value;
893
+ const mappedOffset = sourceMapping && sourceMapping[plainCharIndex] !== void 0 ? sourceMapping[plainCharIndex] + 1 : plainCharIndex + 1;
894
+ segSourceEnd = lineSourceStart + mappedOffset;
895
+ plainCharIndex += token.value.length;
896
+ start += 1;
897
+ continue;
898
+ }
899
+ break;
900
+ }
901
+ if (start >= tokens.length && rawLineLength !== void 0) {
902
+ segSourceEnd = lineSourceStart + rawLineLength;
903
+ }
904
+ plainCharIndexAtStart = plainCharIndex;
905
+ rows.push({
906
+ rendered: rowRendered,
907
+ sourceStart: segSourceStart,
908
+ sourceEnd: segSourceEnd,
909
+ prefixWidth: currentPrefixWidth,
910
+ sourceMapping: rowMapping.length > 0 ? rowMapping : void 0,
911
+ softWrapped: start < tokens.length,
912
+ softWrapJoiner
913
+ });
914
+ }
915
+ return rows.length > 0 ? rows : [
916
+ {
917
+ rendered: "",
918
+ sourceStart: lineSourceStart,
919
+ sourceEnd: lineSourceStart + (rawLineLength ?? 0),
920
+ prefixWidth
921
+ }
922
+ ];
923
+ }
924
+ function wrapTranscriptLine(line, columns, hangingIndent = "") {
925
+ return wrapTranscriptLineWithLayout(line, columns, hangingIndent).map((r) => r.rendered);
926
+ }
927
+ function buildWindowTitle(title) {
928
+ const plain = stripAnsi2(title).replace(/[\x00-\x1f\x7f-\x9f]+/g, " ");
929
+ let truncated = "";
930
+ let width = 0;
931
+ const maxCols = 80;
932
+ for (const char of plain) {
933
+ const charWidth = displayWidth(char);
934
+ if (width + charWidth > maxCols) break;
935
+ truncated += char;
936
+ width += charWidth;
937
+ }
938
+ return `\x1B]0;${truncated}\x07\x1B]2;${truncated}\x07`;
939
+ }
940
+ function wrapTextToLines(text, columns) {
941
+ const result = [];
942
+ for (const logicalLine of text.split("\n")) {
943
+ if (logicalLine === "") {
944
+ result.push("");
945
+ continue;
946
+ }
947
+ let remaining = logicalLine;
948
+ while (remaining.length > 0) {
949
+ const { prefix, rest } = takeDisplayWidth(remaining, columns);
950
+ result.push(prefix);
951
+ remaining = rest;
952
+ }
953
+ }
954
+ return result;
955
+ }
34
956
 
35
957
  // packages/cli/oauth/callback-server.ts
36
958
  import { createServer } from "node:http";
@@ -150,6 +1072,23 @@ async function startCallbackServer(options) {
150
1072
  var TIER_LEGACY = "legacy-tier";
151
1073
  var PROJECT_ONBOARD_MAX_ATTEMPTS = 5;
152
1074
  var PROJECT_ONBOARD_INTERVAL_MS = 2e3;
1075
+ async function fetchAntigravityAvailableModels(fetchImpl, accessToken) {
1076
+ const response = await fetchImpl(`${ANTIGRAVITY_CLOUD_CODE_BASE_URL}/v1internal:fetchAvailableModels`, {
1077
+ method: "POST",
1078
+ headers: {
1079
+ Authorization: `Bearer ${accessToken}`,
1080
+ "Content-Type": "application/json",
1081
+ "User-Agent": getAntigravityUserAgent()
1082
+ },
1083
+ body: "{}"
1084
+ });
1085
+ if (!response.ok) {
1086
+ const body = await response.text();
1087
+ throw new Error(`fetchAvailableModels failed: ${response.status} ${response.statusText}: ${body}`);
1088
+ }
1089
+ const payload = await response.json();
1090
+ return payload.models && typeof payload.models === "object" && !Array.isArray(payload.models) ? payload.models : {};
1091
+ }
153
1092
  var ANTIGRAVITY_LOAD_CODE_ASSIST_METADATA = Object.freeze({
154
1093
  ideType: "ANTIGRAVITY",
155
1094
  platform: "PLATFORM_UNSPECIFIED",
@@ -575,13 +1514,14 @@ function renderDeviceCodeDisplay(args) {
575
1514
  plain: ` Code: ${userCode} `
576
1515
  });
577
1516
  const innerWidth = Math.max(...rows.map((row) => row.plain.length));
578
- const top = `\u250C${"\u2500".repeat(innerWidth)}\u2510`;
579
- const bottom = `\u2514${"\u2500".repeat(innerWidth)}\u2518`;
1517
+ const g = boxGlyphs(resolveBoxCharset());
1518
+ const top = `${g.tl}${g.h.repeat(innerWidth)}${g.tr}`;
1519
+ const bottom = `${g.bl}${g.h.repeat(innerWidth)}${g.br}`;
580
1520
  return [
581
1521
  `Authorize nolo-cli for ${provider} (device code / headless):`,
582
1522
  top,
583
1523
  ...rows.map(
584
- (row) => `\u2502${row.rendered}${" ".repeat(innerWidth - row.plain.length)}\u2502`
1524
+ (row) => `${g.v}${row.rendered}${" ".repeat(innerWidth - row.plain.length)}${g.v}`
585
1525
  ),
586
1526
  bottom,
587
1527
  ...notes
@@ -1468,12 +2408,31 @@ async function refreshCursorToken(credential, deps = {}) {
1468
2408
  var cursorRefresh = refreshCursorToken;
1469
2409
 
1470
2410
  export {
1471
- resolveClaudeCodeVersion,
1472
- getClaudeCodeUserAgent,
1473
- adoptRequiredClaudeCodeVersion,
2411
+ ANSI_ESCAPE_REGEX,
2412
+ stripAnsi2 as stripAnsi,
2413
+ applyTerminalOutputToText,
2414
+ resolveBoxCharset,
2415
+ boxGlyphs,
2416
+ displayWidth,
2417
+ visibleWidth,
2418
+ truncateAnsi,
2419
+ fitAnsiLine,
2420
+ countPhysicalLines,
2421
+ takeDisplayWidth,
2422
+ padOrTruncateToWidth,
2423
+ tokenizeAnsiLine,
2424
+ buildSourceMapping,
2425
+ wrapTranscriptLineWithLayout,
2426
+ wrapTranscriptLine,
2427
+ buildWindowTitle,
2428
+ wrapTextToLines,
1474
2429
  startCallbackServer,
2430
+ fetchAntigravityAvailableModels,
1475
2431
  runAntigravityOAuthLogin,
1476
2432
  refreshAntigravityOAuthToken,
2433
+ resolveClaudeCodeVersion,
2434
+ getClaudeCodeUserAgent,
2435
+ adoptRequiredClaudeCodeVersion,
1477
2436
  renderDeviceCodeDisplay,
1478
2437
  generatePkcePair,
1479
2438
  runOpenAiCodexDeviceCode,