nolo-cli 0.259.0-alpha.1 → 0.260.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 (316) hide show
  1. package/README.md +1 -1
  2. package/{_executeModel-MTM4BJK3.js → _executeModel-EO6JFCOF.js} +97 -83
  3. package/accountResolver-NGICIMEE.js +1 -1
  4. package/{action-C6IQAKN4.js → action-WIA56QT4.js} +12 -10
  5. package/{addContentAction-53364YDW.js → addContentAction-OCMWZLYG.js} +14 -13
  6. package/{addDialogAgentAction-U5DD5EN5.js → addDialogAgentAction-ER2NZ7BC.js} +20 -24
  7. package/{agentDeleteCommand-53NN3VSK.js → agentDeleteCommand-KSXSNPAU.js} +184 -146
  8. package/{agentEmailCommands-KOGGIT6I.js → agentEmailCommands-NXRWS7NS.js} +142 -126
  9. package/{agentGrantCommands-L6O2HVJI.js → agentGrantCommands-D2S7LCTU.js} +8 -5
  10. package/{agentListCommands-62UYUQDI.js → agentListCommands-PFXGZZ3Y.js} +87 -68
  11. package/{agentMachineCommands-W6TNJXEA.js → agentMachineCommands-2Q55CSL4.js} +68 -59
  12. package/{agentProviderCommands-QLTABYR7.js → agentProviderCommands-EUNS7Y2Z.js} +10 -7
  13. package/{agentPullCommand-2EYJ5ENC.js → agentPullCommand-S2VMPSWL.js} +9 -6
  14. package/agentRecordCommands-FUFI526H.js +210 -0
  15. package/agentRun-ZNMUPDHF.js +250 -0
  16. package/agentRunCommand-ISVQ2UYC.js +248 -0
  17. package/{agentRunControl-LXMADX3N.js → agentRunControl-NEK44LDM.js} +19 -12
  18. package/{agentRuntimeLocal-YGNJMQW3.js → agentRuntimeLocal-SST4EPLT.js} +62 -49
  19. package/{agentSlice-3HHYUQLM.js → agentSlice-4ZJJJN4M.js} +15 -18
  20. package/appConfigCommands-MPHS6FHD.js +417 -0
  21. package/{appDeleteCommands-5COJ6CSG.js → appDeleteCommands-W26WGENW.js} +68 -58
  22. package/{appDeployCommands-3JPAT3XO.js → appDeployCommands-ER7IOF5E.js} +74 -59
  23. package/{appDeployStatusCommands-RHZKF3G4.js → appDeployStatusCommands-VKLL3A77.js} +68 -58
  24. package/{appGetCommands-73DXOAQW.js → appGetCommands-P6GXJNUD.js} +74 -58
  25. package/{appListCommands-HD5LOQ3G.js → appListCommands-ACA2IZZM.js} +74 -58
  26. package/appMigrateCommands-OGF4E2W6.js +230 -0
  27. package/appSourceCommands-GAHVBRUM.js +279 -0
  28. package/{authCommand-V6EOMZX6.js → authCommand-PXE7NZTQ.js} +26 -40
  29. package/{authCommands-T5FODCEG.js → authCommands-AZPYXTUB.js} +20 -17
  30. package/{builtinSkillRegistry-EDHD2UHU.js → builtinSkillRegistry-6XUWMAV5.js} +8 -6
  31. package/{chromeOpsCommands-3SSTDFRF.js → chromeOpsCommands-7UKKUOBU.js} +68 -18
  32. package/{chunk-KLMBM6P6.js → chunk-2CKFROQS.js} +2454 -1115
  33. package/{chunk-MJBLXJMP.js → chunk-2I4R6ZRV.js} +12 -9
  34. package/{chunk-FXEPZKNJ.js → chunk-2MIZHEND.js} +506 -64
  35. package/{chunk-TLE77UJ5.js → chunk-2OROOEOQ.js} +0 -1
  36. package/{chunk-6RSNVJGO.js → chunk-2ZBPWX7N.js} +4 -4
  37. package/chunk-35JIFLIG.js +30 -0
  38. package/{chunk-ZYPXOQS2.js → chunk-3EPED3UO.js} +1 -1
  39. package/{chunk-DNNPARJK.js → chunk-3QMN3T6L.js} +50 -37
  40. package/{chunk-DMPZMYH4.js → chunk-3R4AYHJR.js} +13 -1
  41. package/{chunk-HPDLPEUG.js → chunk-42JZNSAY.js} +267 -234
  42. package/{chunk-223KZUJ6.js → chunk-4HZCBA4Q.js} +18 -15
  43. package/{chunk-C5A54QS7.js → chunk-4INJGWE3.js} +18 -5
  44. package/chunk-4IVMDQBA.js +261 -0
  45. package/chunk-4Y6CZ2N4.js +82 -0
  46. package/{chunk-OKAXQFON.js → chunk-52BNL6GP.js} +4 -4
  47. package/{chunk-KZ4A7EIV.js → chunk-56OAS5RZ.js} +1 -1
  48. package/{chunk-QGFLVQ6E.js → chunk-6KUTNAPU.js} +4 -14
  49. package/{chunk-MNFUKRRU.js → chunk-6XAAKRJB.js} +7 -7
  50. package/{chunk-P27E22MA.js → chunk-6Z6DGDPI.js} +1 -1
  51. package/chunk-72VWN4VK.js +51 -0
  52. package/{chunk-L4XST72F.js → chunk-75FZ2Z7C.js} +16027 -17392
  53. package/{chunk-ADYWV732.js → chunk-76B6YUQS.js} +264 -177
  54. package/{chunk-MXA54TQM.js → chunk-76K4GTY5.js} +1 -1
  55. package/{chunk-VNHZJEQN.js → chunk-7HUCUD2I.js} +3 -3
  56. package/chunk-7LR2IFUH.js +100 -0
  57. package/{chunk-S73EPYNC.js → chunk-7LS5ATRP.js} +20 -6
  58. package/{chunk-Y2TCTNUD.js → chunk-7QO6YSA4.js} +4 -4
  59. package/{chunk-DBJODIZ6.js → chunk-7RYH7YIY.js} +19 -27
  60. package/{chunk-KHYSFS3W.js → chunk-A454UXB6.js} +148 -73
  61. package/chunk-AMNZPQCY.js +635 -0
  62. package/chunk-AMTF6FJD.js +356 -0
  63. package/{chunk-4MXYCQBS.js → chunk-AQNWWJLH.js} +2 -56
  64. package/{chunk-WSLL7VV4.js → chunk-B4NA5UJR.js} +9 -9
  65. package/{chunk-LHCGKAFO.js → chunk-BKP325XS.js} +184 -112
  66. package/{chunk-PENRYZ4D.js → chunk-BPB3T5EU.js} +4 -7
  67. package/{chunk-46FETNLF.js → chunk-BTIFQBYW.js} +7 -6
  68. package/{chunk-2JHGUL5K.js → chunk-BVYHE6QD.js} +2 -2
  69. package/{chunk-KXOPLLFP.js → chunk-CA7LGAHV.js} +69 -9
  70. package/{chunk-2FZVXOFX.js → chunk-CEIWXKHP.js} +112 -200
  71. package/{chunk-AIFQKNPP.js → chunk-CL33RFD7.js} +1 -1
  72. package/{chunk-MPGR4ZNR.js → chunk-CRGPRAJ4.js} +46 -42
  73. package/{chunk-P4R5KXU7.js → chunk-CW6LRDSF.js} +5 -5
  74. package/{chunk-R3TUHCSJ.js → chunk-CZHIOBBK.js} +8 -3
  75. package/chunk-D3ONA3FP.js +762 -0
  76. package/chunk-D3SAQ6T7.js +1697 -0
  77. package/{chunk-PIVTQRX6.js → chunk-DDKA6V6X.js} +111 -12
  78. package/{chunk-KQHEGELM.js → chunk-DEAII55O.js} +16 -6
  79. package/{chunk-J55F3IEZ.js → chunk-DKJQEFNG.js} +1 -1
  80. package/chunk-DLXL4NSL.js +1179 -0
  81. package/{chunk-EJQE5HB7.js → chunk-DSBRIUX5.js} +4 -2
  82. package/{chunk-XRGBJHZX.js → chunk-E36V7MPY.js} +9 -5
  83. package/{chunk-4YPH5KRA.js → chunk-EDKMRDET.js} +1 -1
  84. package/chunk-EJHLDJWZ.js +58 -0
  85. package/{chunk-6B2OBX5B.js → chunk-EMFZXJTN.js} +15 -47
  86. package/chunk-ER6NTALN.js +34 -0
  87. package/chunk-EUHMI5KG.js +101 -0
  88. package/{chunk-YQLAFJRQ.js → chunk-FBNVJ2TO.js} +1 -1
  89. package/{chunk-Q2EERN52.js → chunk-FF5ZRKW7.js} +12 -7
  90. package/{chunk-YFEK7ACQ.js → chunk-FGD4NMTP.js} +4 -4
  91. package/{chunk-6XIE5ZGI.js → chunk-FGFJUFPS.js} +5 -6
  92. package/chunk-FI4DPLR7.js +902 -0
  93. package/chunk-FKVLQNGJ.js +25 -0
  94. package/{chunk-JCQ3WCQ3.js → chunk-FOC4TORM.js} +69 -3
  95. package/{chunk-JPXACKSW.js → chunk-G22P2J7O.js} +30 -81
  96. package/{chunk-7WHCIA5V.js → chunk-G5IAIGGD.js} +3 -8
  97. package/{chunk-5BIDJVNX.js → chunk-G5JGA5YM.js} +180 -31
  98. package/{chunk-57V4PADY.js → chunk-GMBWWBSJ.js} +781 -449
  99. package/{chunk-WS36XPJD.js → chunk-GYFKKTDI.js} +82 -6
  100. package/{chunk-KT7S7ANZ.js → chunk-GZ4I5EMM.js} +9 -9
  101. package/{chunk-324FWHUA.js → chunk-HHXF57CL.js} +12 -3
  102. package/chunk-HJTI7RZV.js +94 -0
  103. package/{chunk-QXTEEEIN.js → chunk-HPIY372N.js} +7 -7
  104. package/{chunk-Q2MPKE4B.js → chunk-HVRG27HI.js} +76 -26
  105. package/{chunk-HDKMVYNJ.js → chunk-I3NWAILT.js} +6 -4
  106. package/{chunk-JZO7KUF3.js → chunk-IM7HCFB4.js} +313 -275
  107. package/{chunk-UWWOWTW2.js → chunk-INN2PBW7.js} +1 -1
  108. package/chunk-IV6VUVLJ.js +88 -0
  109. package/chunk-J42X32PV.js +472 -0
  110. package/{chunk-UA3QTA2S.js → chunk-JHQNWV2C.js} +4441 -2569
  111. package/{chunk-R7XWZDOH.js → chunk-JUMQJSQF.js} +1423 -282
  112. package/{chunk-BIDSIRTS.js → chunk-JUNYPVL6.js} +10 -16
  113. package/chunk-JVEKCQAP.js +222 -0
  114. package/{chunk-KVMLM5VD.js → chunk-KAHYBAEN.js} +211 -472
  115. package/chunk-KDDXC2IH.js +148 -0
  116. package/chunk-KGKTN2NX.js +25 -0
  117. package/chunk-KGWE224L.js +246 -0
  118. package/chunk-L3UFGEDU.js +17157 -0
  119. package/{chunk-CBIGMWMI.js → chunk-LHJB4BXJ.js} +1 -1
  120. package/{chunk-7OVOZRZF.js → chunk-LIH7WSX5.js} +23 -379
  121. package/chunk-LJOPY4TL.js +443 -0
  122. package/{chunk-TRRXYFTR.js → chunk-LOFRSJX2.js} +1 -0
  123. package/{chunk-SQL7YNED.js → chunk-LPXBBC32.js} +71 -5
  124. package/chunk-LXP53WGF.js +168 -0
  125. package/chunk-MDAYRIP7.js +1889 -0
  126. package/chunk-MRACVEPZ.js +7 -0
  127. package/chunk-NHLLXINQ.js +8 -0
  128. package/{chunk-FP37ELBT.js → chunk-NTBTVKKB.js} +17 -25
  129. package/{chunk-LVZVSLKO.js → chunk-O7ZY6SUK.js} +5 -22
  130. package/{chunk-2C5VN7NH.js → chunk-P4XAHM4B.js} +1 -1
  131. package/chunk-PL5RKESU.js +40 -0
  132. package/{chunk-MHKPUGPD.js → chunk-PQ3QZMJK.js} +20 -4
  133. package/chunk-Q5FJJ6XI.js +103 -0
  134. package/{createAgentAutomationAction-GRZ6XY7Q.js → chunk-QKM55LP2.js} +3 -160
  135. package/{chunk-6YX2RAQN.js → chunk-QZCLCAYC.js} +89 -164
  136. package/{chunk-FE7G6DSP.js → chunk-R72QWIFO.js} +14 -4
  137. package/{chunk-JLZJL3WC.js → chunk-RDZ5OIAT.js} +370 -39
  138. package/{chunk-5RGU3J7P.js → chunk-REAE2SZK.js} +0 -1
  139. package/chunk-RF576RYE.js +117 -0
  140. package/chunk-RI7SXDJW.js +1317 -0
  141. package/{chunk-FEIVARWR.js → chunk-RIOAPUGV.js} +238 -25
  142. package/{chunk-2CT2J3O6.js → chunk-RL6H2A2Z.js} +2493 -4055
  143. package/{chunk-BZLGPM5B.js → chunk-RNLKWUVY.js} +7 -12
  144. package/{chunk-J7JRCOIW.js → chunk-RWXHGPWJ.js} +1 -1
  145. package/chunk-S7BF2OGX.js +432 -0
  146. package/{chunk-6VEO7Z3Y.js → chunk-SD4MBKZ7.js} +6 -6
  147. package/{chunk-KWNVPY6M.js → chunk-SGEBRBF3.js} +7 -4
  148. package/{chunk-6SOWMEAY.js → chunk-SR57FDTX.js} +2 -258
  149. package/{chunk-CEKRIR22.js → chunk-SU4NCTW4.js} +1 -1
  150. package/{chunk-Y2GWUBNS.js → chunk-SX6PDLBZ.js} +279 -149
  151. package/{chunk-XNNBXUEM.js → chunk-T4WU747C.js} +5 -5
  152. package/{chunk-53W5BXLN.js → chunk-TCOHWKDM.js} +54 -55
  153. package/{chunk-QIGQFON2.js → chunk-TXMFSGRY.js} +1 -1
  154. package/{chunk-UUCYUN6Y.js → chunk-UB7NV7NN.js} +1 -1
  155. package/{chunk-NCFKHYDM.js → chunk-UOLGGEEC.js} +774 -119
  156. package/{chunk-4EACJPZI.js → chunk-USFG4EWQ.js} +51 -42
  157. package/{chunk-LLUBUHNT.js → chunk-UYZOBSSO.js} +5 -9
  158. package/{chunk-XPETQ4MR.js → chunk-VDC3BW24.js} +24 -10
  159. package/chunk-VH356OQ3.js +425 -0
  160. package/{chunk-U6QNVOR5.js → chunk-VKM7DOYB.js} +130 -6
  161. package/{chunk-CJOOF4L5.js → chunk-VPAO5WQX.js} +17 -14
  162. package/{chunk-OYUMJMC5.js → chunk-W2RQYNPI.js} +5 -0
  163. package/{chunk-6BMTKYAO.js → chunk-W2Z5E2R7.js} +126 -698
  164. package/{chunk-4ZCTKB27.js → chunk-W5GKF5ZW.js} +1 -0
  165. package/{chunk-NUHQO3RB.js → chunk-WIVVNJUS.js} +1 -1
  166. package/chunk-WLJNHFEB.js +1710 -0
  167. package/chunk-WMBJDXMY.js +408 -0
  168. package/chunk-WSQLCWLQ.js +201 -0
  169. package/{chunk-YN23INFZ.js → chunk-WXD6Y7DW.js} +23 -2
  170. package/{chunk-OOVOAG4Q.js → chunk-WY6DMHMG.js} +1 -1
  171. package/{chunk-6K32PBRY.js → chunk-XJW6SLBZ.js} +3 -3
  172. package/{chunk-7BIJFGKS.js → chunk-XQFDCRG3.js} +105 -51
  173. package/chunk-XT6C2QZW.js +46 -0
  174. package/{chunk-5YS6QHGT.js → chunk-Y7THFNVJ.js} +9 -9
  175. package/{chunk-ZEZC7IIM.js → chunk-YFSM2366.js} +35 -35
  176. package/{chunk-RD3QLZQV.js → chunk-YM5XULB2.js} +324 -2
  177. package/{chunk-FZENZCIA.js → chunk-YNP3ITPU.js} +19 -12
  178. package/{chunk-U35UUM5K.js → chunk-YOUSQIIK.js} +1 -1
  179. package/{chunk-RIWKZT7E.js → chunk-YRPIUIEQ.js} +11 -9
  180. package/{chunk-IYLUK67R.js → chunk-YU235GGN.js} +25 -8
  181. package/chunk-YWEZSBLL.js +790 -0
  182. package/chunk-Z3KTXWWB.js +76 -0
  183. package/{chunk-YLAHYLDQ.js → chunk-ZC3CMUKU.js} +2 -89
  184. package/chunk-ZD7OULYZ.js +368 -0
  185. package/{chunk-5P3PPQVP.js → chunk-ZQAADXSF.js} +1 -1
  186. package/{chunk-HQUGB2HM.js → chunk-ZTCMXPIS.js} +62 -50
  187. package/{cliAgentConfigHelpers-BXHQ3PXP.js → cliAgentConfigHelpers-KMXS7JP5.js} +20 -14
  188. package/{cliAuthorityBrokerClient-TFNXJLXL.js → cliAuthorityBrokerClient-3SKOA7OZ.js} +3 -1
  189. package/cliAuthorityBrokerProcess-DCCUT4YQ.js +34 -0
  190. package/{cliEnvHelpers-CNMP3RDX.js → cliEnvHelpers-YDGDHIEE.js} +5 -2
  191. package/{cliExecutor-K6FDZTQ2.js → cliExecutor-Z62UBJ5S.js} +12 -6
  192. package/cliLocalAgentRecordReader-X2YHEBWI.js +113 -0
  193. package/cloudAutomationCommands-C6Q3BFRB.js +310 -0
  194. package/{commandRegistry-IFYQLPGM.js → commandRegistry-TYYYTW5E.js} +260 -121
  195. package/{contentThunks-QCFCD2X3.js → contentThunks-E6BJ5YSX.js} +45 -43
  196. package/{cooldownCommands-WDOI5VD7.js → cooldownCommands-FPAFS7XG.js} +1 -1
  197. package/createAgentAutomationAction-L3NLCIIW.js +172 -0
  198. package/{createDialogAction-ZAJERW62.js → createDialogAction-QSWKRPWQ.js} +46 -42
  199. package/{createPageAction-QCVBMP4C.js → createPageAction-ZVVUT4CZ.js} +49 -45
  200. package/{db-VR74ADGC.js → db-KTQ3LL2Q.js} +3 -3
  201. package/{dbSlice-RWPSVHBC.js → dbSlice-SEVKNA7A.js} +21 -16
  202. package/deleteDbKey-43MTK2DI.js +86 -0
  203. package/{dialogCommands-4IEQUALS.js → dialogCommands-UVMTIFSA.js} +80 -66
  204. package/{dialogMessageRecord-OAV77LT7.js → dialogMessageRecord-2HJTEXQX.js} +1 -1
  205. package/{dialogNotifyCommand-IASQGEMW.js → dialogNotifyCommand-LMWF7EQI.js} +22 -14
  206. package/dialogPortabilityCommands-PAMLEBST.js +3036 -0
  207. package/{dialogSlice-XFYID6KE.js → dialogSlice-VHPXENDZ.js} +43 -42
  208. package/{dialogTraceCommand-Y67NRFCV.js → dialogTraceCommand-SO2WKAXW.js} +83 -69
  209. package/{dialogUsageCommand-WJ3U6KZU.js → dialogUsageCommand-EUO6JXTD.js} +6 -3
  210. package/{docCreateCommands-QLRIWRQE.js → docCreateCommands-H4RLIUNX.js} +68 -59
  211. package/{docDeleteCommands-XPRYA532.js → docDeleteCommands-OVAKCBMT.js} +68 -59
  212. package/{docReadCommands-EXQI7ETH.js → docReadCommands-KFISIUVA.js} +67 -58
  213. package/{docStore-MWFUKZL2.js → docStore-X7BEA735.js} +16 -17
  214. package/{docUpdateCommands-EFBFQV77.js → docUpdateCommands-VOEER36L.js} +68 -59
  215. package/{ebookDownloaderAgentCommand-DYSKF5ZY.js → ebookDownloaderAgentCommand-2DHPGEOQ.js} +14 -17
  216. package/{fetchMessages-TQEUZD7H.js → fetchMessages-RGPIYEPZ.js} +2 -2
  217. package/{getPricing-5BLZRPTM.js → getPricing-BK6CUBAE.js} +8 -4
  218. package/{handleSendMessageAction-GG3TR62X.js → handleSendMessageAction-GQ2KKOET.js} +265 -119
  219. package/{hostCredentialCreate-26S6DDJ5.js → hostCredentialCreate-PJAIKZQP.js} +138 -122
  220. package/index.js +35 -21
  221. package/{keys-RWF7UCB4.js → keys-FXEGMKSG.js} +2 -2
  222. package/localAutomationCommands-UU66LOWB.js +198 -0
  223. package/localAutomationRuntime-SW4R42SZ.js +60 -0
  224. package/{localDialogRead-BJJT3TF5.js → localDialogRead-W2EVXISA.js} +2 -2
  225. package/{localRuntimeAdapter-VREWZWPC.js → localRuntimeAdapter-WRBLXFUZ.js} +136 -119
  226. package/localRuntimeAuthority-3YDFZD3L.js +44 -0
  227. package/{localRuntimeDb-ZJFGNHML.js → localRuntimeDb-CJWJK47G.js} +1 -1
  228. package/{machineCommands-CL5XK5UC.js → machineCommands-JFYED66N.js} +251 -357
  229. package/{machineInfo-LWHTEBHJ.js → machineInfo-BJIU3WQ5.js} +4 -2
  230. package/machineWsRunDispatch-CZUV2FXE.js +227 -0
  231. package/{mcpLocalAuthorizeCommand-RBXJDE6J.js → mcpLocalAuthorizeCommand-HLU72QME.js} +40 -22
  232. package/mcpLocalManageCommands-OHHU6F5C.js +212 -0
  233. package/{memberThunks-43B7UYC5.js → memberThunks-FJW4GPM5.js} +102 -22
  234. package/{memoryCommands-BC6REPQB.js → memoryCommands-2RLHDMU2.js} +25 -34
  235. package/{models-ZX2BYIMB.js → models-TOXYINNM.js} +3 -2
  236. package/{offlineMarxistsAgentCommand-XVXUE6G5.js → offlineMarxistsAgentCommand-WZBJBCPZ.js} +16 -22
  237. package/package.json +3 -3
  238. package/parityCommands-7EWR34P3.js +613 -0
  239. package/{projectArchive-OC63TWTD.js → projectArchive-JIVRMXVV.js} +49 -45
  240. package/{providerPresetApply-NTJUINI6.js → providerPresetApply-IRJ56XIZ.js} +12 -16
  241. package/{providerRegistry-W45SLUV6.js → providerRegistry-26PAUYH2.js} +3 -13
  242. package/{read-KG6INYUT.js → read-6YR57D6V.js} +11 -10
  243. package/{readDocTool-N3GA52JR.js → readDocTool-NKOGL2MW.js} +5 -1
  244. package/{readlineWorkspace-2NO6D6IZ.js → readlineWorkspace-V26AN2FL.js} +926 -572
  245. package/{rememberExplicit-CPAPONSI.js → rememberExplicit-7KX4HXQC.js} +4 -4
  246. package/remove-BF33RCTH.js +32 -0
  247. package/{removeDialogAgentAction-EEVSOQOJ.js → removeDialogAgentAction-GWHBWF4W.js} +22 -26
  248. package/{runAgentClientLoop-U7V32UTD.js → runAgentClientLoop-EKD2EEEA.js} +117 -82
  249. package/{runtimeDoctorCommands-V3M3JTUV.js → runtimeDoctorCommands-IALUR5BZ.js} +23 -16
  250. package/{secretCommands-KVVZS7A6.js → secretCommands-CSTQYB6T.js} +2 -2
  251. package/{setDialogExtraReferencesAction-DNO5POHA.js → setDialogExtraReferencesAction-RL6FGO7T.js} +16 -17
  252. package/{setPrimaryDialogAgentAction-QABBEO4C.js → setPrimaryDialogAgentAction-XJASBB3K.js} +23 -27
  253. package/{settingThunks-DVKG4X4S.js → settingThunks-ZT7ZYXXL.js} +170 -497
  254. package/{skillDiscovery-5GEGWJ6N.js → skillDiscovery-IUEZZG2B.js} +3 -3
  255. package/{spaceCommands-7QKXKBDQ.js → spaceCommands-65WQHVOI.js} +68 -57
  256. package/spacePruneCommand-PTMRUWYJ.js +233 -0
  257. package/{store-Z53ICFL3.js → store-WSAVTR32.js} +3 -1
  258. package/{streamAgentChatTurn-UAGFOXNJ.js → streamAgentChatTurn-B5NICHZW.js} +225 -137
  259. package/{switchDialogAgentAction-KYWJSGOO.js → switchDialogAgentAction-X6DFOIAX.js} +19 -23
  260. package/{tableCommands-EFA754RE.js → tableCommands-6E77VD73.js} +28 -49
  261. package/{toolApiClient-N5PYW2R3.js → toolApiClient-GTTWEV6P.js} +15 -4
  262. package/{tools-2Q2LBDUC.js → tools-UMCPIQX6.js} +73 -63
  263. package/{tuiRestart-4QDWLHYZ.js → tuiRestart-O7UDLNQU.js} +20 -13
  264. package/tuiSummaryLlmCaller-7APIUIIV.js +52 -0
  265. package/{updateCommands-GJGRS6JK.js → updateCommands-DXDIAQFS.js} +12 -7
  266. package/{updateDialogTitleAction-GGNTTI5L.js → updateDialogTitleAction-HZLKWVKM.js} +57 -58
  267. package/{usageCommand-WI6SQOPB.js → usageCommand-WYLNBDHB.js} +6 -8
  268. package/{usageRebuildCommand-WQRLLZAT.js → usageRebuildCommand-AEUPY2PE.js} +11 -15
  269. package/{windowsSelfUpdate-C7LGVWYX.js → windowsSelfUpdate-SXSVXK4X.js} +2 -2
  270. package/workContext-ZAW6VXT7.js +18 -0
  271. package/workContextQueryProjection-CACY5VFE.js +23 -0
  272. package/{workloadLifecycle-DYX5ZMAT.js → workloadLifecycle-P2SJVV3S.js} +1 -1
  273. package/agentFavoriteCommands-7LOP3HUD.js +0 -186
  274. package/agentRecordCommands-TPE7NSZ6.js +0 -194
  275. package/agentRunCommand-DMVGBPLI.js +0 -232
  276. package/chunk-2MBTWINN.js +0 -89
  277. package/chunk-523DITKR.js +0 -32
  278. package/chunk-BUDVRYES.js +0 -2213
  279. package/chunk-BZMDWGQQ.js +0 -47
  280. package/chunk-GAHJLSDO.js +0 -107
  281. package/chunk-GYX6XTAI.js +0 -84
  282. package/chunk-HNUWUO75.js +0 -93
  283. package/chunk-HSBHS6KT.js +0 -33401
  284. package/chunk-KG27JIG4.js +0 -136
  285. package/chunk-OB4FBZXJ.js +0 -364
  286. package/chunk-OKH74FML.js +0 -3746
  287. package/chunk-OLZBQWZU.js +0 -6
  288. package/chunk-OOV5JN25.js +0 -1317
  289. package/chunk-OQFOE4SJ.js +0 -405
  290. package/chunk-PXYBUFDB.js +0 -53
  291. package/chunk-R3FZHW4Q.js +0 -103
  292. package/chunk-R3MV2GII.js +0 -106
  293. package/chunk-SCAC3NM5.js +0 -11751
  294. package/chunk-SR4FE5VD.js +0 -9
  295. package/chunk-SYTHYBMI.js +0 -3558
  296. package/chunk-UKZX3NHN.js +0 -48
  297. package/chunk-UVLYNWIE.js +0 -74
  298. package/chunk-VQX5JJNI.js +0 -861
  299. package/chunk-X4O7FJF5.js +0 -160
  300. package/chunk-YJPK35HB.js +0 -175
  301. package/chunk-YNIYE47Z.js +0 -105
  302. package/chunk-Z4PCXPUE.js +0 -127
  303. package/chunk-ZR5IVL4N.js +0 -862
  304. package/chunk-ZTHAJU3O.js +0 -2537
  305. package/cliAuthorityBrokerProcess-5ZFBTHLB.js +0 -22
  306. package/cliLocalAgentRecordReader-34UKRBLY.js +0 -104
  307. package/deleteFile-ECU6FU5C.js +0 -55
  308. package/localRuntimeAuthority-UF2DAQ3F.js +0 -28
  309. package/machineWsRunDispatch-TBVOYOAH.js +0 -209
  310. package/markdownToSlate-PXYAIBVL.js +0 -8
  311. package/tuiSummaryLlmCaller-HROLGN4F.js +0 -45
  312. package/webapi-QVV65DQF.js +0 -2487
  313. package/workContext-Y3ADAPZU.js +0 -14
  314. package/{chunk-USGHJSGO.js → chunk-GX2MFKF3.js} +3 -3
  315. package/{chunk-PHREU2KZ.js → chunk-WX266G2C.js} +0 -0
  316. package/{chunk-DXWGFL2Z.js → chunk-YY7IGJMN.js} +3 -3
@@ -0,0 +1,100 @@
1
+ import {
2
+ array,
3
+ literal,
4
+ looseObject,
5
+ minLength,
6
+ object,
7
+ optional,
8
+ picklist,
9
+ pipe,
10
+ record,
11
+ string,
12
+ transform,
13
+ trim
14
+ } from "./chunk-FI4DPLR7.js";
15
+
16
+ // packages/ai/agent/createAgentSchema.ts
17
+ var DEFAULT_REASONING_EFFORT = "medium";
18
+ var REASONING_EFFORT_OPTIONS = [
19
+ "none",
20
+ "minimal",
21
+ "low",
22
+ "medium",
23
+ "high",
24
+ "xhigh",
25
+ "max",
26
+ "ultra"
27
+ ];
28
+ var PROVIDER_REASONING_EFFORT_VALUES = {
29
+ openai: ["none", "minimal", "low", "medium", "high", "xhigh", "max", "ultra"],
30
+ openrouter: ["none", "minimal", "low", "medium", "high", "xhigh", "max", "ultra"],
31
+ deepseek: ["low", "high", "max"],
32
+ // nolo (Ollama Cloud) 支持 DeepSeek/Kimi/GLM 等 thinking 模型,
33
+ // reasoning_effort 通过 OpenAI 兼容端点透传到 Ollama Cloud。
34
+ nolo: ["low", "high", "max"],
35
+ xai: ["low", "medium", "high"],
36
+ grok: ["low", "medium", "high"],
37
+ // none:关闭思考;必须保留,否则上游 clamp 会把 none 抬成 low,
38
+ // kimi-code proxy 的 none/off → thinking.disabled 分支永远接不到。
39
+ kimi: ["none", "low", "high", "max"],
40
+ moonshot: ["none", "low", "high", "max"],
41
+ // Qwen 用 enable_thinking (bool) 而非 reasoning_effort → 隐藏下拉
42
+ qwen: [],
43
+ // MiniMax M3: 接受这些值但所有非 none 效果相同
44
+ minimax: ["none", "low", "medium", "high"],
45
+ // Cursor: 推理强度在模型名后缀 (如 -high),不走独立参数
46
+ cursor: [],
47
+ // MiMo: 保守默认
48
+ mimo: ["low", "medium", "high"],
49
+ // CommandCode Provider API 透传 reasoning_effort(low/medium/high/xhigh/max),
50
+ // 端点按各模型支持的子集自动 clamp(见 commandcode.ai/docs/provider-api)。
51
+ commandcode: ["low", "medium", "high", "xhigh", "max"],
52
+ // 阶跃星辰(StepFun)推理模型(step-3.5-flash-2603 / step-3.7-flash 等)支持 low / medium / high
53
+ stepfun: ["none", "low", "medium", "high"],
54
+ // LithosAI 推理云:上游为 DeepSeek,文档 reasoning_effort 取值 low / high / max
55
+ // (low/high 已实测被接受;medium/xhigh 未验证,不列出)。
56
+ lithosai: ["low", "high", "max"]
57
+ };
58
+ var greetingMenuItemSchema = object({
59
+ id: pipe(string(), minLength(1)),
60
+ label: pipe(string(), minLength(1)),
61
+ userMessage: optional(string())
62
+ });
63
+ var greetingConfigSchema = object({
64
+ text: optional(pipe(string(), trim())),
65
+ menu: optional(array(greetingMenuItemSchema))
66
+ });
67
+ var runtimeToolPolicySchema = looseObject({
68
+ version: optional(literal(1)),
69
+ agentTools: optional(array(string())),
70
+ runtimeTools: optional(array(string())),
71
+ workspace: optional(
72
+ object({
73
+ mode: optional(picklist(["none", "current", "lease"])),
74
+ writableRoots: optional(array(string())),
75
+ cwd: optional(string())
76
+ })
77
+ ),
78
+ shell: optional(record(string(), string())),
79
+ isolation: optional(record(string(), string())),
80
+ git: optional(record(string(), string())),
81
+ budget: optional(record(string(), string())),
82
+ audit: optional(record(string(), string()))
83
+ });
84
+ var referenceItemSchema = pipe(
85
+ object({
86
+ dbKey: string(),
87
+ title: string(),
88
+ type: picklist(["knowledge", "instruction", "page"])
89
+ }),
90
+ transform((data) => ({
91
+ ...data,
92
+ type: data.type === "page" ? "knowledge" : data.type
93
+ }))
94
+ );
95
+
96
+ export {
97
+ DEFAULT_REASONING_EFFORT,
98
+ REASONING_EFFORT_OPTIONS,
99
+ PROVIDER_REASONING_EFFORT_VALUES
100
+ };
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  buildCliProcessEnv,
3
3
  resolveLaunchableCodexCommand
4
- } from "./chunk-ZEZC7IIM.js";
4
+ } from "./chunk-YFSM2366.js";
5
5
 
6
- // packages/connector-experimental/machineInfo.ts
6
+ // packages/connector/machineInfo.ts
7
7
  import { existsSync as existsSync2, readFileSync, writeFileSync, mkdirSync } from "node:fs";
8
8
  import { dirname, join as join2 } from "node:path";
9
9
  import { arch, hostname, homedir, platform } from "node:os";
10
10
  import { randomUUID } from "node:crypto";
11
11
 
12
- // packages/connector-experimental/capabilities.ts
12
+ // packages/connector/capabilities.ts
13
13
  import { spawnSync } from "node:child_process";
14
14
  import { existsSync } from "node:fs";
15
15
  import { join } from "node:path";
@@ -66,12 +66,25 @@ function detectRuntimeCapabilities(options = {}) {
66
66
  return capabilities;
67
67
  }
68
68
 
69
- // packages/connector-experimental/machineInfo.ts
69
+ // packages/connector/machineInfo.ts
70
70
  var CONNECTOR_VERSION = "0.1.0-experimental";
71
- function defaultMachineIdPath() {
72
- const noloHome = process.env.NOLO_HOME?.trim();
71
+ function machineIdPath(env = process.env) {
72
+ const noloHome = env.NOLO_HOME?.trim();
73
73
  return noloHome ? join2(noloHome, "machine-id") : join2(homedir(), ".nolo", "machine-id");
74
74
  }
75
+ function defaultMachineIdPath() {
76
+ return machineIdPath();
77
+ }
78
+ var MACHINE_ID_PATTERN = /^[A-Za-z0-9][A-Za-z0-9._:@+#-]{0,127}$/;
79
+ function readExistingMachineId(env = process.env, path = machineIdPath(env)) {
80
+ try {
81
+ if (!existsSync2(path)) return void 0;
82
+ const existing = readFileSync(path, "utf8").trim();
83
+ return MACHINE_ID_PATTERN.test(existing) ? existing : void 0;
84
+ } catch {
85
+ return void 0;
86
+ }
87
+ }
75
88
  function resolveMachineId(path = defaultMachineIdPath()) {
76
89
  try {
77
90
  if (existsSync2(path)) {
@@ -101,6 +114,7 @@ function detectMachineInfo(overrides) {
101
114
  }
102
115
 
103
116
  export {
117
+ readExistingMachineId,
104
118
  resolveMachineId,
105
119
  detectMachineInfo
106
120
  };
@@ -17,7 +17,7 @@ import {
17
17
  parseUserIdFromAuthToken,
18
18
  resolveAuthToken,
19
19
  resolveServerUrl
20
- } from "./chunk-BIDSIRTS.js";
20
+ } from "./chunk-JUNYPVL6.js";
21
21
 
22
22
  // packages/cli/dialogUsageCommand.ts
23
23
  import { readFileSync } from "node:fs";
@@ -127,9 +127,9 @@ function readLiveBrokerEndpoint(metadataPath) {
127
127
  }
128
128
  async function openLocalTokenScanClient(env) {
129
129
  const [{ getDefaultCliLocalRuntimeAuthority }, driver, broker] = await Promise.all([
130
- import("./localRuntimeAuthority-UF2DAQ3F.js"),
130
+ import("./localRuntimeAuthority-3YDFZD3L.js"),
131
131
  import("./cliAuthorityStoreDriver-6FE3BJNB.js"),
132
- import("./cliAuthorityBrokerClient-TFNXJLXL.js")
132
+ import("./cliAuthorityBrokerClient-3SKOA7OZ.js")
133
133
  ]);
134
134
  await getDefaultCliLocalRuntimeAuthority({ env });
135
135
  const metadataPath = driver.resolveCliAuthorityBrokerMetadataPath({ transport: "tcp", env });
@@ -145,7 +145,7 @@ async function openLocalTokenScanClient(env) {
145
145
  });
146
146
  }
147
147
  async function readLocalDialogTokenRecords(query, deps = {}) {
148
- const [{ createTokenKey, createKey, createTokenDialogIndexKey, createTokenDialogBackfillKey, TOKEN_DIALOG_INDEX_FORMAT }] = await Promise.all([import("./keys-RWF7UCB4.js")]);
148
+ const [{ createTokenKey, createKey, createTokenDialogIndexKey, createTokenDialogBackfillKey, TOKEN_DIALOG_INDEX_FORMAT }] = await Promise.all([import("./keys-FXEGMKSG.js")]);
149
149
  const env = query.env ?? process.env;
150
150
  const client = await (deps.openClient ?? openLocalTokenScanClient)(env);
151
151
  const candidates = new Set(
@@ -1,33 +1,34 @@
1
1
  import {
2
2
  addContentToSpace
3
- } from "./chunk-Y2GWUBNS.js";
3
+ } from "./chunk-SX6PDLBZ.js";
4
4
  import {
5
5
  prepareAndPersistMessage
6
- } from "./chunk-2CT2J3O6.js";
6
+ } from "./chunk-RL6H2A2Z.js";
7
7
  import {
8
- require_format
9
- } from "./chunk-BUDVRYES.js";
10
- import {
11
- require_formatISO
12
- } from "./chunk-UVLYNWIE.js";
8
+ formatLocalDate,
9
+ formatLocalIso
10
+ } from "./chunk-PL5RKESU.js";
13
11
  import {
14
12
  read,
15
13
  readAndWait,
16
14
  removeCachedEntity,
17
15
  upsertSSREntity,
18
16
  write
19
- } from "./chunk-ADYWV732.js";
17
+ } from "./chunk-76B6YUQS.js";
20
18
  import {
21
- isDevelopment
22
- } from "./chunk-HDKMVYNJ.js";
19
+ emitUserDataUpdated
20
+ } from "./chunk-GYFKKTDI.js";
23
21
  import {
24
22
  selectIdentityUserId
25
- } from "./chunk-PXYBUFDB.js";
23
+ } from "./chunk-YM5XULB2.js";
24
+ import {
25
+ isDevelopment
26
+ } from "./chunk-I3NWAILT.js";
26
27
  import {
27
28
  createMemoryKey,
28
29
  memoryOwnerRange,
29
30
  memorySubjectKindRange
30
- } from "./chunk-SYTHYBMI.js";
31
+ } from "./chunk-DLXL4NSL.js";
31
32
  import {
32
33
  createDialogKey,
33
34
  dialogMessageRange
@@ -35,25 +36,18 @@ import {
35
36
  import {
36
37
  extractCustomId
37
38
  } from "./chunk-M2EJHDJP.js";
38
- import {
39
- asOptionalPositiveFiniteNumber
40
- } from "./chunk-U6VC4MU4.js";
41
39
  import {
42
40
  asTrimmedString
43
41
  } from "./chunk-3EUW3WEO.js";
42
+ import {
43
+ asOptionalPositiveFiniteNumber
44
+ } from "./chunk-U6VC4MU4.js";
44
45
  import {
45
46
  isRecord
46
47
  } from "./chunk-KUG52IAP.js";
47
48
  import {
48
49
  asOptionalTrimmedString
49
50
  } from "./chunk-G3SUCT4W.js";
50
- import {
51
- __toESM
52
- } from "./chunk-U67V476Y.js";
53
-
54
- // packages/chat/dialog/actions/createDialogAction.ts
55
- var import_format = __toESM(require_format());
56
- var import_formatISO = __toESM(require_formatISO());
57
51
 
58
52
  // packages/ai/tools/uiAskChoiceTool.ts
59
53
  var uiAskChoiceFunctionSchema = {
@@ -809,9 +803,7 @@ var isLocalOwnerDialogAgents = (cybots) => {
809
803
  return false;
810
804
  };
811
805
  var notifyUserDataUpdated = () => {
812
- if (typeof window !== "undefined" && typeof window.dispatchEvent === "function" && typeof window.Event === "function") {
813
- window.dispatchEvent(new window.Event("nolo-user-data-updated"));
814
- }
806
+ emitUserDataUpdated();
815
807
  };
816
808
  var createDialogAction = async (args, thunkApi) => {
817
809
  const {
@@ -892,7 +884,7 @@ var createDialogAction = async (args, thunkApi) => {
892
884
  preview: recentRelationshipRecapResolution.recap ?? null
893
885
  });
894
886
  }
895
- const time = (0, import_format.default)(/* @__PURE__ */ new Date(), "MM-dd HH:mm");
887
+ const time = formatLocalDate(/* @__PURE__ */ new Date(), "MM-dd HH:mm");
896
888
  const title = titleOverride || (agentMode === "auto" ? "\u65B0\u5BF9\u8BDD" : agentConfig?.name || "Agent") + " " + time;
897
889
  const spaceId = explicitSpaceId;
898
890
  const dialogPath = createDialogKey(userId);
@@ -939,7 +931,7 @@ var createDialogAction = async (args, thunkApi) => {
939
931
  ...agentMode === "auto" && autoRoute ? { autoRoute } : {},
940
932
  title,
941
933
  type: "dialog" /* DIALOG */,
942
- createdAt: (0, import_formatISO.default)(/* @__PURE__ */ new Date()),
934
+ createdAt: formatLocalIso(/* @__PURE__ */ new Date()),
943
935
  ...spaceId && { spaceId },
944
936
  category,
945
937
  referenceKeys,
@@ -3,11 +3,13 @@ import {
3
3
  } from "./chunk-IT3ZZRJE.js";
4
4
  import {
5
5
  createLegacyServerDb
6
- } from "./chunk-TRRXYFTR.js";
6
+ } from "./chunk-LOFRSJX2.js";
7
7
  import {
8
- Level,
8
+ MAX_AUTHORITY_BATCH_GET_KEYS,
9
+ authorityBacking,
10
+ compareUtf8Keys,
9
11
  createLevelAuthorityStore
10
- } from "./chunk-R3MV2GII.js";
12
+ } from "./chunk-KGWE224L.js";
11
13
  import {
12
14
  Mutex
13
15
  } from "./chunk-IVK2KT3H.js";
@@ -83,19 +85,39 @@ function dialogRunIndexOps(op) {
83
85
  }
84
86
 
85
87
  // packages/database-engine/publicationBatch.ts
88
+ var backingLocks = /* @__PURE__ */ new WeakMap();
89
+ var legacyAppRevisions = /* @__PURE__ */ new WeakMap();
90
+ var isLegacyAppKey = (key) => key.startsWith("app-");
91
+ var absent = Symbol("absent authority key");
92
+ var wrappers = /* @__PURE__ */ new WeakSet();
86
93
  function withPublicationBatch(store) {
87
- const lock = new Mutex();
88
- const batchWrite = (ops) => store.batchWrite(ops.flatMap((op) => [op, ...dialogRunIndexOps(op)]));
89
- const put = (key, value) => {
94
+ if (wrappers.has(store)) return store;
95
+ const backing = store[authorityBacking] ?? store;
96
+ let lock = backingLocks.get(backing);
97
+ if (!lock) backingLocks.set(backing, lock = new Mutex());
98
+ const revision = () => legacyAppRevisions.get(backing) ?? 0;
99
+ const invalidate = () => legacyAppRevisions.set(backing, revision() + 1);
100
+ const observe = async (affectsLegacyApps, write) => {
101
+ if (!affectsLegacyApps) return write();
102
+ try {
103
+ return await write();
104
+ } finally {
105
+ invalidate();
106
+ }
107
+ };
108
+ const writeBatch = (target, ops) => observe(ops.some((op) => isLegacyAppKey(op.key)), () => target.batchWrite(ops.flatMap((op) => [op, ...dialogRunIndexOps(op)])));
109
+ const batchWrite = (ops) => writeBatch(store, ops);
110
+ const put = (key, value) => observe(isLegacyAppKey(key), () => {
90
111
  const op = { type: "put", key, value };
91
112
  const indexOps = dialogRunIndexOps(op);
92
113
  return indexOps.length ? store.batchWrite([op, ...indexOps]) : store.put(key, value);
93
- };
94
- const del = (key) => {
114
+ });
115
+ const del = (key) => observe(isLegacyAppKey(key), () => {
95
116
  const op = { type: "del", key };
96
117
  const indexOps = dialogRunIndexOps(op);
97
118
  return indexOps.length ? store.batchWrite([op, ...indexOps]) : store.del(key);
98
- };
119
+ });
120
+ const forwardedBatchGet = store.batchGet ? (keys) => store.batchGet(keys) : void 0;
99
121
  const wrapped = {
100
122
  get location() {
101
123
  return store.location;
@@ -103,16 +125,28 @@ function withPublicationBatch(store) {
103
125
  get status() {
104
126
  return store.status;
105
127
  },
128
+ get legacyAppRevision() {
129
+ return revision();
130
+ },
106
131
  open: () => store.open(),
107
- close: () => lock.runExclusive(() => store.close()),
132
+ close: () => lock.runExclusive(() => observe(true, () => store.close())),
108
133
  get: (key) => store.get(key),
134
+ ...forwardedBatchGet ? { batchGet: forwardedBatchGet } : {},
135
+ ...store.conditionalPut ? {
136
+ conditionalPut: (key, expectedRevision, value) => lock.runExclusive(() => observe(isLegacyAppKey(key), () => store.conditionalPut(key, expectedRevision, value)))
137
+ } : {},
138
+ ...store.conditionalDelete ? {
139
+ conditionalDelete: (key, expectedRevision) => lock.runExclusive(() => observe(isLegacyAppKey(key), () => store.conditionalDelete(key, expectedRevision)))
140
+ } : {},
109
141
  iterator: (options) => store.iterator(options),
110
142
  put: (key, value) => lock.runExclusive(() => put(key, value)),
111
143
  del: (key) => lock.runExclusive(() => del(key)),
112
144
  batchWrite: (ops) => lock.runExclusive(() => batchWrite(ops)),
113
145
  createBatch: () => {
114
146
  const batch = store.createBatch();
147
+ let affectsLegacyApps = false;
115
148
  const stage = (op) => {
149
+ affectsLegacyApps ||= isLegacyAppKey(op.key);
116
150
  for (const entry of [op, ...dialogRunIndexOps(op)]) {
117
151
  if (entry.type === "put") batch.put(entry.key, entry.value);
118
152
  else batch.del(entry.key);
@@ -121,11 +155,54 @@ function withPublicationBatch(store) {
121
155
  return {
122
156
  put: (key, value) => stage({ type: "put", key, value }),
123
157
  del: (key) => stage({ type: "del", key }),
124
- write: () => lock.runExclusive(() => batch.write())
158
+ write: () => lock.runExclusive(() => observe(affectsLegacyApps, () => batch.write()))
125
159
  };
126
160
  },
127
- runPublicationBatch: (task) => lock.runExclusive(() => task({ get: wrapped.get, batchWrite }))
161
+ compareAndBatch: (checks, ops) => lock.runExclusive(async () => {
162
+ if (store.compareAndBatch) {
163
+ return observe(ops.some((op) => isLegacyAppKey(op.key)), () => store.compareAndBatch(checks, ops.flatMap((op) => [op, ...dialogRunIndexOps(op)])));
164
+ }
165
+ if (forwardedBatchGet && checks.length > 1 && checks.length <= MAX_AUTHORITY_BATCH_GET_KEYS) {
166
+ const items = await forwardedBatchGet(checks.map(([key]) => key));
167
+ for (let i = 0; i < checks.length; i++) {
168
+ const [, expected] = checks[i];
169
+ const item = items[i];
170
+ let value = absent;
171
+ if (item.ok) {
172
+ value = item.value === void 0 ? absent : item.value;
173
+ } else if (item.error.code !== "NOT_FOUND" && item.error.code !== "LEVEL_NOT_FOUND") {
174
+ throw new Error(item.error.message);
175
+ }
176
+ if (expected === null ? value !== absent : value === absent || JSON.stringify(value) !== JSON.stringify(expected)) return false;
177
+ }
178
+ } else {
179
+ for (const [key, expected] of checks) {
180
+ let value = absent;
181
+ try {
182
+ value = await store.get(key);
183
+ } catch (error) {
184
+ const e = error;
185
+ if (!e?.notFound && e?.code !== "LEVEL_NOT_FOUND" && e?.code !== "NOT_FOUND") throw error;
186
+ }
187
+ if (value === void 0) value = absent;
188
+ if (expected === null ? value !== absent : value === absent || JSON.stringify(value) !== JSON.stringify(expected)) return false;
189
+ }
190
+ }
191
+ await batchWrite(ops);
192
+ return true;
193
+ }),
194
+ runPublicationBatch: (task) => lock.runExclusive(() => {
195
+ if (store.runPublicationBatch) {
196
+ return store.runPublicationBatch((guarded) => task({
197
+ get: guarded.get.bind(guarded),
198
+ ...guarded.batchGet ? { batchGet: guarded.batchGet.bind(guarded) } : {},
199
+ batchWrite: (ops) => writeBatch(guarded, ops)
200
+ }));
201
+ }
202
+ return task({ get: wrapped.get, batchGet: forwardedBatchGet, batchWrite });
203
+ })
128
204
  };
205
+ wrappers.add(wrapped);
129
206
  return wrapped;
130
207
  }
131
208
 
@@ -184,17 +261,30 @@ var MemoryAuthorityBacking = class {
184
261
  };
185
262
  }
186
263
  async *iterator(options = {}) {
187
- const entries = Array.from(this.data.entries()).sort(([left], [right]) => left.localeCompare(right)).map(([key, value]) => ({ key, value }));
188
- if (options.reverse) {
264
+ const { gt, gte, lte, lt, reverse, values, limit } = options;
265
+ const includeValues = values !== false;
266
+ const entries = [];
267
+ const lowerExclusive = gt === void 0 ? void 0 : Buffer.from(gt);
268
+ const lowerInclusive = gte === void 0 ? void 0 : Buffer.from(gte);
269
+ const upperExclusive = lt === void 0 ? void 0 : Buffer.from(lt);
270
+ const upperInclusive = lte === void 0 ? void 0 : Buffer.from(lte);
271
+ for (const [key, value] of this.data) {
272
+ const bytes = Buffer.from(key);
273
+ if (lowerExclusive && compareUtf8Keys(bytes, lowerExclusive) <= 0) continue;
274
+ if (lowerInclusive && compareUtf8Keys(bytes, lowerInclusive) < 0) continue;
275
+ if (upperExclusive && compareUtf8Keys(bytes, upperExclusive) >= 0) continue;
276
+ if (upperInclusive && compareUtf8Keys(bytes, upperInclusive) > 0) continue;
277
+ entries.push({ key, bytes, value: includeValues ? value : void 0 });
278
+ }
279
+ entries.sort((left, right) => compareUtf8Keys(left.bytes, right.bytes));
280
+ if (reverse) {
189
281
  entries.reverse();
190
282
  }
283
+ let remaining = Number.isSafeInteger(limit) && limit >= 0 ? limit : Infinity;
191
284
  for (const entry of entries) {
192
- if (options.gt !== void 0 && entry.key <= options.gt) continue;
193
- if (options.gte !== void 0 && entry.key < options.gte) continue;
194
- if (options.lte !== void 0 && entry.key > options.lte) continue;
195
- if (options.lt !== void 0 && entry.key >= options.lt) continue;
196
- const value = options.values === false ? void 0 : entry.value;
197
- yield [entry.key, value];
285
+ if (remaining === 0) break;
286
+ remaining--;
287
+ yield [entry.key, entry.value];
198
288
  }
199
289
  }
200
290
  };
@@ -249,13 +339,27 @@ var PRAGMAS = [
249
339
  function createSqliteAuthorityStore(dbPath) {
250
340
  let db;
251
341
  let isOpen = false;
342
+ let selectValueStmt;
343
+ let insertStmt;
344
+ let deleteStmt;
252
345
  const ensureTable = () => {
253
346
  db.exec(CREATE_TABLE_SQL);
254
347
  for (const pragma of PRAGMAS) {
255
348
  db.exec(pragma);
256
349
  }
350
+ selectValueStmt = db.query("SELECT value FROM kv_store WHERE key = ?");
351
+ insertStmt = db.query("INSERT OR REPLACE INTO kv_store (key, value) VALUES (?, ?)");
352
+ deleteStmt = db.query("DELETE FROM kv_store WHERE key = ?");
257
353
  };
258
354
  const encodeValue = (value) => JSON.stringify(value);
355
+ const applyOps = (ops) => {
356
+ const insert = insertStmt;
357
+ const remove = deleteStmt;
358
+ for (const op of ops) {
359
+ if (op.type === "put") insert.run(op.key, encodeValue(op.value));
360
+ else remove.run(op.key);
361
+ }
362
+ };
259
363
  const decodeValue = (value) => {
260
364
  try {
261
365
  return JSON.parse(value);
@@ -279,6 +383,9 @@ function createSqliteAuthorityStore(dbPath) {
279
383
  },
280
384
  async close() {
281
385
  if (!isOpen) return;
386
+ selectValueStmt = void 0;
387
+ insertStmt = void 0;
388
+ deleteStmt = void 0;
282
389
  if (db) {
283
390
  db.close(false);
284
391
  db = void 0;
@@ -286,8 +393,7 @@ function createSqliteAuthorityStore(dbPath) {
286
393
  isOpen = false;
287
394
  },
288
395
  async get(key) {
289
- const stmt = db.query("SELECT value FROM kv_store WHERE key = ?");
290
- const row = stmt.get(key);
396
+ const row = selectValueStmt.get(key);
291
397
  if (!row) {
292
398
  const err = new Error("NotFound");
293
399
  err.notFound = true;
@@ -296,29 +402,24 @@ function createSqliteAuthorityStore(dbPath) {
296
402
  return decodeValue(row.value);
297
403
  },
298
404
  async put(key, value) {
299
- const stmt = db.query(
300
- "INSERT OR REPLACE INTO kv_store (key, value) VALUES (?, ?)"
301
- );
302
- stmt.run(key, encodeValue(value));
405
+ insertStmt.run(key, encodeValue(value));
303
406
  },
304
407
  async del(key) {
305
- const stmt = db.query("DELETE FROM kv_store WHERE key = ?");
306
- stmt.run(key);
408
+ deleteStmt.run(key);
307
409
  },
308
- async batchWrite(ops) {
309
- const insertStmt = db.query(
310
- "INSERT OR REPLACE INTO kv_store (key, value) VALUES (?, ?)"
311
- );
312
- const deleteStmt = db.query("DELETE FROM kv_store WHERE key = ?");
313
- db.transaction(() => {
314
- for (const op of ops) {
315
- if (op.type === "put") {
316
- insertStmt.run(op.key, encodeValue(op.value));
317
- } else {
318
- deleteStmt.run(op.key);
319
- }
410
+ async compareAndBatch(checks, ops) {
411
+ return db.transaction(() => {
412
+ const select = selectValueStmt;
413
+ for (const [key, expected] of checks) {
414
+ const row = select.get(key);
415
+ if ((row?.value ?? null) !== (expected === null ? null : encodeValue(expected))) return false;
320
416
  }
321
- })();
417
+ applyOps(ops);
418
+ return true;
419
+ }).immediate();
420
+ },
421
+ async batchWrite(ops) {
422
+ db.transaction(() => applyOps(ops))();
322
423
  },
323
424
  createBatch() {
324
425
  const buffered = [];
@@ -331,19 +432,7 @@ function createSqliteAuthorityStore(dbPath) {
331
432
  },
332
433
  async write() {
333
434
  const ops = buffered.splice(0, buffered.length);
334
- const insertStmt = db.query(
335
- "INSERT OR REPLACE INTO kv_store (key, value) VALUES (?, ?)"
336
- );
337
- const deleteStmt = db.query("DELETE FROM kv_store WHERE key = ?");
338
- db.transaction(() => {
339
- for (const op of ops) {
340
- if (op.type === "put") {
341
- insertStmt.run(op.key, encodeValue(op.value));
342
- } else {
343
- deleteStmt.run(op.key);
344
- }
345
- }
346
- })();
435
+ db.transaction(() => applyOps(ops))();
347
436
  }
348
437
  };
349
438
  },
@@ -369,7 +458,9 @@ function createSqliteAuthorityStore(dbPath) {
369
458
  const whereClause = conditions.length > 0 ? `WHERE ${conditions.join(" AND ")}` : "";
370
459
  const orderClause = options.reverse ? "ORDER BY key DESC" : "ORDER BY key ASC";
371
460
  const selectClause = options.values === false ? "SELECT key FROM kv_store" : "SELECT key, value FROM kv_store";
372
- const stmt = db.query(`${selectClause} ${whereClause} ${orderClause}`);
461
+ const limited = Number.isSafeInteger(options.limit) && options.limit >= 0;
462
+ if (limited) params.push(options.limit);
463
+ const stmt = db.query(`${selectClause} ${whereClause} ${orderClause}${limited ? " LIMIT ?" : ""}`);
373
464
  for (const row of stmt.iterate(...params)) {
374
465
  const value = options.values === false ? void 0 : decodeValue(row.value);
375
466
  yield [row.key, value];
@@ -379,30 +470,14 @@ function createSqliteAuthorityStore(dbPath) {
379
470
  }
380
471
 
381
472
  // packages/database-engine/serverStoreFactory.ts
382
- var safeJsonEncoding = {
383
- name: "safe-json",
384
- format: "utf8",
385
- encode: (data) => JSON.stringify(data),
386
- decode: (data) => {
387
- try {
388
- return JSON.parse(data);
389
- } catch {
390
- console.warn("[LevelDB] Corrupted value:", data?.substring?.(0, 60));
391
- return null;
392
- }
393
- }
394
- };
395
473
  function ensureServerDbDirectory(dbPath) {
396
474
  const dir = path.dirname(dbPath);
397
475
  if (!fs.existsSync(dir)) {
398
476
  fs.mkdirSync(dir, { recursive: true });
399
477
  }
400
478
  }
401
- function createLevelBackedAuthorityStore(dbPath) {
402
- const levelDb = new Level(dbPath, {
403
- valueEncoding: safeJsonEncoding
404
- });
405
- return createLevelAuthorityStore(levelDb);
479
+ function createLevelBackedAuthorityStore(dbPath, options) {
480
+ return createLevelAuthorityStore(dbPath, options);
406
481
  }
407
482
  function resolveServerStoreDriver(env = process.env) {
408
483
  const rawDriver = asTrimmedLowercaseString(env.NOLO_SERVER_AUTHORITY_DRIVER);