nolo-cli 0.212.0-alpha.1 → 0.219.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 (263) hide show
  1. package/README.md +3 -2
  2. package/{_executeModel-KE6MBNUJ.js → _executeModel-WW57SJN4.js} +111 -82
  3. package/{accountResolver-4LKIHEKL.js → accountResolver-EK2S4PWF.js} +6 -6
  4. package/{action-DF5UYSJF.js → action-CK64LS6S.js} +12 -11
  5. package/{addContentAction-N2YC5IL3.js → addContentAction-EQXMFNPR.js} +18 -17
  6. package/{addDialogAgentAction-3NKVQCEC.js → addDialogAgentAction-RSDZDASD.js} +21 -20
  7. package/{agentDeleteCommand-NWK7VU4N.js → agentDeleteCommand-X2VWEKUA.js} +127 -118
  8. package/{agentEmailCommands-UZ4DHEX2.js → agentEmailCommands-6IE773VW.js} +132 -124
  9. package/{agentFavoriteCommands-EDK743YA.js → agentFavoriteCommands-2LKGKSUD.js} +7 -8
  10. package/{agentGrantCommands-RQWK2TEV.js → agentGrantCommands-QQV4N4JW.js} +5 -5
  11. package/{agentListCommands-HE7L2A6L.js → agentListCommands-5UNM7CGG.js} +196 -124
  12. package/{agentMachineCommands-6TE4MBMP.js → agentMachineCommands-EVWFKK6Q.js} +62 -53
  13. package/{agentProviderCommands-Q5O33MED.js → agentProviderCommands-ZCH37KAL.js} +5 -5
  14. package/{agentPullCommand-6EM3URVK.js → agentPullCommand-XN6ZPBUW.js} +7 -7
  15. package/agentRecordCommands-DX2WE6BH.js +176 -0
  16. package/agentRunCommand-KGOT2AFB.js +206 -0
  17. package/{agentRunControl-OI3LOENH.js → agentRunControl-QDFW5P2T.js} +30 -15
  18. package/{agentRuntimeLocal-HL526DNQ.js → agentRuntimeLocal-SD7U2EGY.js} +52 -45
  19. package/{agentSlice-TMYP2UEA.js → agentSlice-ACZGTZVW.js} +20 -19
  20. package/{appDeleteCommands-ZERW4AXY.js → appDeleteCommands-NE3NQQJL.js} +61 -52
  21. package/{appDeployCommands-DUWSMYHL.js → appDeployCommands-2BAHY522.js} +61 -52
  22. package/{appDeployStatusCommands-N2KIE4BF.js → appDeployStatusCommands-JTW6LZNC.js} +61 -52
  23. package/{appGetCommands-YVR4NPVY.js → appGetCommands-WKFEJO6A.js} +61 -52
  24. package/{appListCommands-JS6HOHZS.js → appListCommands-HNAZZLFX.js} +61 -52
  25. package/{authCommand-FE2C3ZUM.js → authCommand-4FDPL7WG.js} +29 -28
  26. package/{authCommands-HV3EAU3V.js → authCommands-GAJ3NIXO.js} +14 -13
  27. package/{builtinSkillRegistry-3YOIGEF6.js → builtinSkillRegistry-PXH7EGQB.js} +11 -13
  28. package/{chromeCommands-REEAH4SX.js → chromeCommands-G5UDKVSV.js} +3 -3
  29. package/{chromeOpsCommands-HEN5AX2J.js → chromeOpsCommands-YKX2QX3A.js} +20 -10
  30. package/chunk-2KTUDBG7.js +675 -0
  31. package/{chunk-TCZHTTUU.js → chunk-2OLYKYNY.js} +8 -8
  32. package/{chunk-PYRUW7XN.js → chunk-2VUZSVAS.js} +136 -54
  33. package/chunk-2YGBI2XB.js +30 -0
  34. package/chunk-2ZKFCIJJ.js +13 -0
  35. package/{chunk-3FOQHGHN.js → chunk-3ESU44FG.js} +4 -4
  36. package/{chunk-GNDJKC4B.js → chunk-3N4ASIP6.js} +29 -29
  37. package/{chunk-4KB6WQUL.js → chunk-4A2JIXR2.js} +1 -1
  38. package/{chunk-MYOH447Z.js → chunk-4JVNURX4.js} +1 -1
  39. package/{chunk-IJXYFTV7.js → chunk-4NMHE7CX.js} +20 -20
  40. package/{chunk-YDH3FDFQ.js → chunk-5FUN7EG4.js} +1 -1
  41. package/chunk-5OZC7R7Y.js +97 -0
  42. package/chunk-5R63B62U.js +364 -0
  43. package/{chunk-LKDF3ATR.js → chunk-5RKUPJYL.js} +1 -1
  44. package/{chunk-5AQR3DGV.js → chunk-652XYZGP.js} +80 -11
  45. package/{chunk-6OQUPIQF.js → chunk-65XXHYZ5.js} +4 -4
  46. package/{chunk-IF45XG7K.js → chunk-6D7NVU66.js} +40 -24
  47. package/{chunk-DM6UMOEL.js → chunk-6NKA6RKF.js} +2 -2
  48. package/{chunk-ZC3CMUKU.js → chunk-6OVNSQHN.js} +84 -2
  49. package/{chunk-H2TJUNCH.js → chunk-6RQFZCKH.js} +18 -18
  50. package/{chunk-OOF4UPC5.js → chunk-7UH3DGV6.js} +17 -159
  51. package/{chunk-M6RL5JCD.js → chunk-7WPAI5JJ.js} +14 -14
  52. package/{chunk-P5L7CXOC.js → chunk-7Z6EW7AH.js} +3 -2
  53. package/{chunk-3AKFVZ2I.js → chunk-AFHOCBSP.js} +3 -3
  54. package/{chunk-HPFCI4SK.js → chunk-AK5O76CC.js} +3 -3
  55. package/{chunk-Y63ZSOR6.js → chunk-AL3TYDIF.js} +1 -1
  56. package/{chunk-PJNFNEJE.js → chunk-AMEOV5VZ.js} +59 -13
  57. package/chunk-AVHRSJUH.js +1621 -0
  58. package/{chunk-IAPCBNEE.js → chunk-BGGHA5DV.js} +1 -1
  59. package/{chunk-NBTY7YJF.js → chunk-BR3GT6MR.js} +1 -0
  60. package/{chunk-7RFNTILS.js → chunk-BUDVRYES.js} +2 -2
  61. package/{chunk-D2MDMY2M.js → chunk-BV3FLP2L.js} +47 -1
  62. package/{chunk-25JZEIXN.js → chunk-C4VAR65S.js} +92 -150
  63. package/{chunk-AVTVGMDY.js → chunk-C4WTX5TU.js} +2 -2
  64. package/{chunk-F6UUQOG6.js → chunk-CKT6QUE2.js} +4 -4
  65. package/{chunk-6VLJ6YA7.js → chunk-CXDPIPZ4.js} +9 -9
  66. package/{secretCommands-4QS3HCA2.js → chunk-D726I5AZ.js} +191 -16
  67. package/{chunk-4KH4J3G5.js → chunk-DJSTBAOU.js} +19 -7
  68. package/chunk-DVQH4BTR.js +1137 -0
  69. package/{chunk-7OCO4TDT.js → chunk-EGXPAWLG.js} +1 -1
  70. package/chunk-EOWLBDY6.js +142 -0
  71. package/chunk-EUCFKKDM.js +247 -0
  72. package/chunk-EWQ3HGNZ.js +90 -0
  73. package/{chunk-NJR3WKVP.js → chunk-F3TQURKK.js} +281 -159
  74. package/{chunk-GSQNH63I.js → chunk-FIYSMXHY.js} +3 -19
  75. package/{chunk-KSTEXKL6.js → chunk-FJ23FZXF.js} +76 -31
  76. package/{chunk-NOMIGOST.js → chunk-FRSBYNWI.js} +116 -124
  77. package/{chunk-VZKUKCA6.js → chunk-FVZW66K4.js} +3676 -243
  78. package/{chunk-YUA6OAH5.js → chunk-G2EJ7NL4.js} +2 -2
  79. package/{chunk-OXME3PEE.js → chunk-GBWGPTA7.js} +2 -1
  80. package/{chunk-MMNYUVLW.js → chunk-GGKNJ42M.js} +11 -77
  81. package/{chunk-INSBKSBB.js → chunk-GIABSSWQ.js} +4 -4
  82. package/{chunk-EZFQ6XRV.js → chunk-GNHMRBYZ.js} +861 -59
  83. package/{chunk-IIQ6JGRI.js → chunk-GVGOEMNV.js} +2 -2
  84. package/{chunk-WXYLV624.js → chunk-H7R3365N.js} +4 -4
  85. package/chunk-HCJFGH6Y.js +1382 -0
  86. package/{chunk-YUXQAVRD.js → chunk-HOCHUZQ7.js} +257 -90
  87. package/{chunk-Y2WUYX4I.js → chunk-HXER7YJF.js} +4 -4
  88. package/{chunk-CTPXME7U.js → chunk-IWH5SOU4.js} +29 -6
  89. package/{chunk-INN4LTAJ.js → chunk-IWQAOW2X.js} +2 -2
  90. package/{chunk-RPQXPZZF.js → chunk-J6T25AJ6.js} +908 -13
  91. package/{chunk-KIM6CLW5.js → chunk-JC5XLWZK.js} +42 -15
  92. package/chunk-JVRQ6YVK.js +99 -0
  93. package/{chunk-ZRSNONOB.js → chunk-JWXITTQB.js} +8 -3
  94. package/{chunk-HIRC32DV.js → chunk-K5FNYHZC.js} +543 -29
  95. package/{chunk-RU4SD66C.js → chunk-KAVGK4ES.js} +30 -254
  96. package/{chunk-JNKSDZFS.js → chunk-KEN3N2TN.js} +310 -66
  97. package/{chunk-LEC5ALIN.js → chunk-KEPOVMF4.js} +1 -1
  98. package/{chunk-Y6ORVLSS.js → chunk-KN3HEZIQ.js} +1 -1
  99. package/{chunk-D5RCRX4A.js → chunk-KO63FPG3.js} +9415 -5169
  100. package/{chunk-OHNELDTO.js → chunk-KOXKKHFE.js} +11 -152
  101. package/{chunk-4VJAC32I.js → chunk-L5I543VB.js} +3 -2
  102. package/{chunk-SM3NSZJV.js → chunk-LE6LGAJE.js} +20 -1
  103. package/chunk-LKA64WH4.js +227 -0
  104. package/{chunk-VL5KOY2C.js → chunk-MK2Q7ZJD.js} +67 -5
  105. package/{chunk-22CIEBYO.js → chunk-MKQ2UTTX.js} +50 -48
  106. package/chunk-MOMR7NMG.js +226 -0
  107. package/{chunk-PDGKOTO7.js → chunk-N3J4VDGV.js} +33 -22
  108. package/{chunk-AZMYUSVF.js → chunk-N5Z2V73W.js} +1 -1
  109. package/{chunk-5RYBGBQH.js → chunk-N7HVLYOY.js} +14 -9
  110. package/{chunk-GPO7FCEZ.js → chunk-O2CYENYJ.js} +1331 -1725
  111. package/{chunk-3RQVYR4B.js → chunk-OB6DVWPF.js} +197 -65
  112. package/{chunk-HRMJUN5J.js → chunk-OGHP3CTL.js} +1 -1
  113. package/{chunk-XJWWBO34.js → chunk-OJKUU3LP.js} +5 -7
  114. package/{chunk-G7MLNNEX.js → chunk-OOF7XDZF.js} +5 -5
  115. package/{chunk-CJRONOYL.js → chunk-OXKUPBAQ.js} +19 -75
  116. package/{chunk-6XIE5ZGI.js → chunk-PDCV7P5W.js} +1 -1
  117. package/{chunk-UTV2AYEG.js → chunk-PFJNLBRU.js} +2 -2
  118. package/{chunk-CKAHAVMK.js → chunk-PPJYZRSQ.js} +40 -26
  119. package/chunk-PVZY6P3S.js +271 -0
  120. package/{chunk-ZL5RAEEB.js → chunk-Q6HOUF4O.js} +1 -1
  121. package/{chunk-QT6PKHYJ.js → chunk-Q7WP5RPC.js} +5 -5
  122. package/chunk-QHEN7NZ7.js +46 -0
  123. package/{chunk-JIT6FSXJ.js → chunk-QLFCTYRH.js} +3 -3
  124. package/{chunk-YGILMZ7N.js → chunk-QVBXJNZ2.js} +1 -1
  125. package/{chunk-YPD3VJZW.js → chunk-QWYFFHCJ.js} +20 -20
  126. package/{chunk-C6KNNXWU.js → chunk-RGQ4UUWZ.js} +25 -2
  127. package/{chunk-OWYYDMGJ.js → chunk-S2NTVGA2.js} +4 -2
  128. package/{chunk-YJMRHHGY.js → chunk-S7SB7L2I.js} +60 -30
  129. package/{chunk-W4S457LU.js → chunk-SASHAZ67.js} +41 -5
  130. package/{chunk-KC4XDTT3.js → chunk-SOF4OWDM.js} +6 -4
  131. package/{chunk-YWSEPJ7C.js → chunk-SRL56PI2.js} +3 -3
  132. package/{chunk-6NSSLV67.js → chunk-SYQR7FQS.js} +52 -50
  133. package/{chunk-JY5NGFFH.js → chunk-SYTHYBMI.js} +5 -5
  134. package/{chunk-CQ46IRNN.js → chunk-T3O6BLYU.js} +447 -203
  135. package/chunk-TLE77UJ5.js +230 -0
  136. package/{chunk-T43B7LB2.js → chunk-TRWT3EE3.js} +1 -1
  137. package/{chunk-FHU44LN3.js → chunk-TVFRV3UQ.js} +2179 -552
  138. package/{chunk-4VNS5WPM.js → chunk-U67V476Y.js} +1 -8
  139. package/{chunk-F7CI2ZC5.js → chunk-UAIHKQIA.js} +2 -1
  140. package/{chunk-LOEO7LRC.js → chunk-UJKTI5PG.js} +10 -7
  141. package/{chunk-UHJGXRJ4.js → chunk-UMRI2IRY.js} +3 -3
  142. package/{chunk-WPORQFYN.js → chunk-UVLYNWIE.js} +2 -2
  143. package/{chunk-YOIW77S2.js → chunk-UYOICCYG.js} +29 -19
  144. package/{chunk-GOO6G4PY.js → chunk-VALBGPM6.js} +106 -50
  145. package/{chunk-B7NJ3T4A.js → chunk-VHPAA6MT.js} +10 -10
  146. package/{chunk-4I7ERB7F.js → chunk-VREDDN25.js} +1 -1
  147. package/{chunk-SOHTHFV2.js → chunk-XFJ4ZPFC.js} +91 -132
  148. package/{chunk-TY3TIUJK.js → chunk-XI2BWJM5.js} +65 -0
  149. package/chunk-XWGDCWXY.js +526 -0
  150. package/{chunk-J5JTMQIA.js → chunk-YFLVRVYK.js} +1 -1
  151. package/{chunk-EYLGAEB4.js → chunk-YGMBIXCF.js} +132 -0
  152. package/chunk-YL3EFYL3.js +199 -0
  153. package/{chunk-MMA3LZ3W.js → chunk-YNIYE47Z.js} +1 -1
  154. package/chunk-YZMNK53S.js +68 -0
  155. package/{chunk-FY7F4Q6X.js → chunk-Z4PCXPUE.js} +2 -2
  156. package/{cliAgentConfigHelpers-WJBZQTLW.js → cliAgentConfigHelpers-PO3MVDME.js} +15 -16
  157. package/{cliAuthorityBrokerClient-PM3U6Q6J.js → cliAuthorityBrokerClient-XHH7MH2P.js} +1 -1
  158. package/{cliAuthorityStoreDriver-TKLXNNTG.js → cliAuthorityStoreDriver-6FE3BJNB.js} +1 -1
  159. package/{cliEnvHelpers-BVYTMUPJ.js → cliEnvHelpers-VPSJ4XWC.js} +3 -3
  160. package/{cliExecutor-BWBF2MTI.js → cliExecutor-4MAX3PZL.js} +2 -2
  161. package/cliLocalAgentRecordReader-Z7CH4K4R.js +90 -0
  162. package/{commandRegistry-VVMTPFAX.js → commandRegistry-SDSYBKMC.js} +106 -98
  163. package/{contentThunks-N52O67MI.js → contentThunks-G3TRPEAU.js} +47 -43
  164. package/{cooldownCommands-YXLWOXWR.js → cooldownCommands-X7P5M2V5.js} +5 -4
  165. package/{createAgentAutomationAction-ZC57YRSV.js → createAgentAutomationAction-KHA4MXUJ.js} +51 -49
  166. package/{createDialogAction-VQW5WDYX.js → createDialogAction-KWSBNAPJ.js} +46 -48
  167. package/{createPageAction-M5VDA7SC.js → createPageAction-HXKJ7OFG.js} +50 -48
  168. package/{cursorProvider-YGGNMVWX.js → cursorProvider-2RACMEMF.js} +1 -1
  169. package/{db-HUCI5R4G.js → db-CS4ZJQKV.js} +1 -1
  170. package/{dbSlice-HP7G4LX3.js → dbSlice-ZJPDIFER.js} +17 -16
  171. package/{deleteFile-7VQGLK2V.js → deleteFile-Q3YDB4ML.js} +9 -9
  172. package/{desktopFolderProjects-SFY5EZS3.js → desktopFolderProjects-4POAMVJN.js} +2 -2
  173. package/{dialogCommands-JHMR2N2Y.js → dialogCommands-6KQEBHSG.js} +64 -57
  174. package/dialogNotifyCommand-WIZFFEY3.js +36 -0
  175. package/{dialogSlice-GRSVGDTF.js → dialogSlice-HXPKFGRL.js} +42 -40
  176. package/{dialogUsageCommand-7KCPYGHG.js → dialogUsageCommand-HTVPR2CX.js} +11 -10
  177. package/{docCreateCommands-F2K3UPSQ.js → docCreateCommands-XZOLWBRC.js} +61 -54
  178. package/{docDeleteCommands-XGXB5RFT.js → docDeleteCommands-ZSO4LGWE.js} +63 -57
  179. package/{docReadCommands-7HWZZV6J.js → docReadCommands-TTMXCDER.js} +61 -54
  180. package/{docStore-KNZK6Y2G.js → docStore-A2B3GH33.js} +21 -20
  181. package/{docUpdateCommands-OZZ7NQII.js → docUpdateCommands-PRG6WOXL.js} +64 -57
  182. package/{fetchMessages-M3QU7ZCQ.js → fetchMessages-TQEUZD7H.js} +8 -7
  183. package/{getPricing-2MNMXEVG.js → getPricing-YH3VMSVU.js} +6 -6
  184. package/{handleSendMessageAction-SHIH74GJ.js → handleSendMessageAction-NWYG3Q72.js} +193 -301
  185. package/{hostCredentialCreate-X64WK4JD.js → hostCredentialCreate-WS6D3EHT.js} +123 -114
  186. package/index.js +29 -29
  187. package/{keys-BEGDOTRL.js → keys-RWF7UCB4.js} +5 -4
  188. package/legacyMigration-TF4SYJCZ.js +19 -0
  189. package/{lib-5KKIBFIT.js → lib-OT5OTXRU.js} +7087 -6664
  190. package/{localDialogRead-XRLAH4CZ.js → localDialogRead-SVTPA5GY.js} +3 -3
  191. package/{localFirstLog-DHNOY2NA.js → localFirstLog-OIETGK66.js} +1 -1
  192. package/localRecall-2J6QPOK2.js +15 -0
  193. package/{localRuntimeAdapter-A7K3ABA6.js → localRuntimeAdapter-TFYOA6YE.js} +119 -110
  194. package/{localRuntimeAuthority-OYH4AE4G.js → localRuntimeAuthority-IBJAT62G.js} +1 -1
  195. package/{localRuntimeDb-VBIMCWUC.js → localRuntimeDb-N7KHDXS2.js} +2 -2
  196. package/{machineCommands-DE3MR7CJ.js → machineCommands-WFWV25IR.js} +128 -119
  197. package/{machineInfo-UKPTZO5Y.js → machineInfo-LWHTEBHJ.js} +1 -1
  198. package/machineWsRunDispatch-ZGXC3F2R.js +191 -0
  199. package/{memberThunks-7WJAY5V6.js → memberThunks-JRYNONYV.js} +29 -28
  200. package/{memoryCommands-ASCE5STX.js → memoryCommands-5WC3T66U.js} +4 -4
  201. package/models-CXINDUJA.js +9 -0
  202. package/{oauthTokenStore-OEERZFUC.js → oauthTokenStore-RUYNYALS.js} +1 -1
  203. package/{offlineMarxistsAgentCommand-2QTHJCHV.js → offlineMarxistsAgentCommand-4IC3Y4C6.js} +4 -4
  204. package/overlay-THLKYIWY.js +11 -0
  205. package/package.json +2 -2
  206. package/{pdf-U6KSUEZZ.js → pdf-KE3QI2V7.js} +1 -1
  207. package/{processSpawn-ZU5QFM43.js → processSpawn-6GEO77KV.js} +1 -1
  208. package/{profileConfig-KN3N2BLF.js → profileConfig-KOWK4HOG.js} +1 -1
  209. package/{projectArchive-GGL5HLMD.js → projectArchive-ULJDLUA6.js} +52 -50
  210. package/{providerPresetApply-YXGV6NXB.js → providerPresetApply-SHT2SUVB.js} +19 -12
  211. package/{providerRegistry-S6UL6UNA.js → providerRegistry-TA7EGCVZ.js} +10 -10
  212. package/{read-4VZQODSN.js → read-Q7GOHGNP.js} +10 -10
  213. package/{readDocTool-AVD32RUJ.js → readDocTool-Z5OQ6422.js} +2 -2
  214. package/{readlineWorkspace-XKYKNL2I.js → readlineWorkspace-LTCV2BFW.js} +6505 -4634
  215. package/{removeDialogAgentAction-FKL4BYMR.js → removeDialogAgentAction-U3F2MNAY.js} +23 -22
  216. package/{runAgentClientLoop-V7E2WBVM.js → runAgentClientLoop-BVIEQUB3.js} +81 -79
  217. package/{runtimeDoctorCommands-QAI3MBKQ.js → runtimeDoctorCommands-I47JN4HS.js} +12 -12
  218. package/{runtimeModeArgs-2Y7BALTO.js → runtimeModeArgs-X7DL7PUN.js} +1 -1
  219. package/secretCommands-LJXOOYA7.js +24 -0
  220. package/{setDialogExtraReferencesAction-TLIOLWWI.js → setDialogExtraReferencesAction-G3WSJ7EM.js} +22 -21
  221. package/{setPrimaryDialogAgentAction-2OLWRFYR.js → setPrimaryDialogAgentAction-6FHAHZBB.js} +23 -22
  222. package/{settingThunks-UGBPCNYF.js → settingThunks-AXTBX3Q5.js} +97 -88
  223. package/{skillDiscovery-XKHROSH2.js → skillDiscovery-B5V23AXP.js} +4 -4
  224. package/{skillSummaryMarker-42HKSXYY.js → skillSummaryMarker-62UW7HI7.js} +1 -1
  225. package/{slateToRenderMarkdown-Y5IYN73U.js → slateToRenderMarkdown-R3X74MCX.js} +1 -1
  226. package/{slateUtils-NGV2NMKM.js → slateUtils-ESQAJ6RN.js} +1 -1
  227. package/{spaceCommands-4KSLKVNF.js → spaceCommands-IB6FKWIC.js} +61 -53
  228. package/store-JRVN62NM.js +46 -0
  229. package/{streamAgentChatTurn-7FR7X2NU.js → streamAgentChatTurn-DNYFHBJM.js} +875 -618
  230. package/{switchDialogAgentAction-UZSAG2N5.js → switchDialogAgentAction-UOFIAGPL.js} +21 -20
  231. package/{tableCommands-MP6VFSVT.js → tableCommands-HITDSLHS.js} +10 -10
  232. package/tombstones-FQQMEDOW.js +32 -0
  233. package/{toolApiClient-HGNO53TC.js → toolApiClient-OGQEBQVX.js} +4 -4
  234. package/{tools-ZLKCC25W.js → tools-JVOJ5HC4.js} +75 -74
  235. package/tuiSummaryLlmCaller-7LWYTHLM.js +44 -0
  236. package/{updateCommands-4744PL3P.js → updateCommands-RJVCRSBP.js} +10 -8
  237. package/{updateDialogTitleAction-U53ZT7PJ.js → updateDialogTitleAction-Q57BOSXG.js} +48 -46
  238. package/{usageCommand-F4IPVMIZ.js → usageCommand-RVKHEPLU.js} +11 -10
  239. package/{usageRebuildCommand-HAW2AD5N.js → usageRebuildCommand-GRAFOZF2.js} +12 -11
  240. package/userDataMerge-HT2ZVHBJ.js +13 -0
  241. package/{windowsSelfUpdate-XSQVF2GK.js → windowsSelfUpdate-KERHIAB4.js} +3 -3
  242. package/{workloadLifecycle-4BEQHMSD.js → workloadLifecycle-O2I3NZ2Q.js} +7 -6
  243. package/agentRecordCommands-L3QQ7HZ4.js +0 -167
  244. package/agentRunCommand-2IFGQHCO.js +0 -196
  245. package/chunk-3CGG2PAL.js +0 -594
  246. package/chunk-5XBUWM6I.js +0 -89
  247. package/chunk-BFM34N54.js +0 -842
  248. package/chunk-CJEIOP3E.js +0 -0
  249. package/chunk-CZM5YTZ7.js +0 -977
  250. package/chunk-EYUBHHFB.js +0 -636
  251. package/chunk-JTDORD5P.js +0 -415
  252. package/chunk-NRFKLKRU.js +0 -339
  253. package/chunk-VPAZOH2D.js +0 -115
  254. package/chunk-WJZOQR2J.js +0 -151
  255. package/chunk-ZCWRMUWT.js +0 -89
  256. package/dist-M676ULYG.js +0 -7314
  257. package/machineWsRunDispatch-R26P5V36.js +0 -182
  258. package/models-PJBE6JDV.js +0 -9
  259. package/tuiSummaryLlmCaller-WC54MVGP.js +0 -160
  260. package/{chunk-WACI5I6V.js → chunk-2THCNKE4.js} +3 -3
  261. package/{chunk-2QHFH3DR.js → chunk-47ITIXO7.js} +6 -6
  262. package/{chunk-OQHIVPG4.js → chunk-SNBZZPYH.js} +3 -3
  263. package/{chunk-AETZ7AD6.js → chunk-W6RFEDN4.js} +3 -3
@@ -2,29 +2,30 @@ import {
2
2
  fnv1a32Hex
3
3
  } from "./chunk-UEILX4EV.js";
4
4
  import {
5
- compareAgentSelection
6
- } from "./chunk-25JZEIXN.js";
5
+ compareAgentSelection,
6
+ resolveModelTier
7
+ } from "./chunk-C4VAR65S.js";
7
8
  import {
8
9
  DEFAULT_PROVIDER_RETRY_MS,
9
10
  isAgentUnavailableNow,
10
11
  resolveAgentAvailability
11
- } from "./chunk-YUXQAVRD.js";
12
+ } from "./chunk-HOCHUZQ7.js";
12
13
  import {
13
14
  isOAuthApiKeyRef
14
15
  } from "./chunk-UKZX3NHN.js";
15
16
  import {
16
17
  getModelAbility
17
- } from "./chunk-T43B7LB2.js";
18
+ } from "./chunk-TRWT3EE3.js";
19
+ import {
20
+ isAntigravityOAuthAgent,
21
+ isSubscriptionEndpoint,
22
+ isSubscriptionOAuthCredential
23
+ } from "./chunk-JC5XLWZK.js";
18
24
  import {
19
25
  isOwnedAgentKey,
20
26
  ownedAgentKey,
21
27
  publicAgentKey
22
28
  } from "./chunk-M2EJHDJP.js";
23
- import {
24
- isAntigravityOAuthAgent,
25
- isSubscriptionEndpoint,
26
- isSubscriptionOAuthCredential
27
- } from "./chunk-KIM6CLW5.js";
28
29
 
29
30
  // packages/ai/agent/agentBilling.ts
30
31
  function resolveBillingSource(candidate) {
@@ -220,24 +221,6 @@ function resolveEconomicsSnapshot(input, at, policies = ECONOMICS_POLICIES) {
220
221
  };
221
222
  }
222
223
 
223
- // packages/ai/agent/agentTier.ts
224
- var FAST_MARKERS = /* @__PURE__ */ new Set(["flash", "mini", "lite", "nano", "haiku", "luna"]);
225
- var BALANCED_MARKERS = /* @__PURE__ */ new Set(["sonnet", "turbo", "plus"]);
226
- var TOP_MARKERS = /* @__PURE__ */ new Set(["opus", "sol", "pro", "max", "ultra"]);
227
- function tokenizeModel(model) {
228
- return model.toLowerCase().split(/[-._/\s]+/).filter(Boolean);
229
- }
230
- function resolveDefaultAgentTier(model) {
231
- if (typeof model !== "string") return { tier: "unknown" };
232
- const tokens = tokenizeModel(model);
233
- if (tokens.length === 0) return { tier: "unknown" };
234
- const hits = (markers) => tokens.some((token) => markers.has(token));
235
- if (hits(FAST_MARKERS)) return { tier: "fast" };
236
- if (hits(BALANCED_MARKERS)) return { tier: "balanced" };
237
- if (hits(TOP_MARKERS)) return { tier: "top" };
238
- return { tier: "unknown" };
239
- }
240
-
241
224
  // packages/ai/agent/safeAgentSummary.ts
242
225
  function deriveCredentialGroup(ref) {
243
226
  if (!ref || typeof ref !== "string") return void 0;
@@ -444,7 +427,6 @@ function toSafeAgentSummary(record, options) {
444
427
  const credInfo = deriveCredentialGroup(record?.credentialGroup ?? rawCredRef);
445
428
  const credentialGroup = record?.credentialGroup ?? credInfo?.credentialGroup;
446
429
  const credentialKind = record?.credentialKind ?? credInfo?.credentialKind;
447
- const { tier } = resolveDefaultAgentTier(record?.model);
448
430
  const availability = resolveAgentAvailability(
449
431
  { nextAvailableAt, quota, quotaExhaustion },
450
432
  options?.now ?? Date.now()
@@ -457,7 +439,7 @@ function toSafeAgentSummary(record, options) {
457
439
  handle,
458
440
  introduction,
459
441
  model,
460
- tier,
442
+ modelTier: resolveModelTier(model),
461
443
  provider,
462
444
  apiSource,
463
445
  cliProvider,
@@ -494,8 +476,7 @@ var COMPACT_AGENT_SUMMARY_FIELDS = [
494
476
  "agentKey",
495
477
  "name",
496
478
  "model",
497
- // 能力档弱先验(unknown = 模型名没给出信号,不推断强弱)。
498
- "tier",
479
+ "modelTier",
499
480
  "billingSource",
500
481
  "availabilityStatus",
501
482
  "credentialGroup",
@@ -508,9 +489,9 @@ var COMPACT_AGENT_SUMMARY_FIELDS = [
508
489
  "apiSource",
509
490
  "credentialKind",
510
491
  "credentialed",
511
- // 仅限流中的 agent 才会带(可用 agent 上不存在)。对"现在能不能选它"是
512
- // 决策信息(CLI --show-unavailable 场景);默认列表已把这类 agent 过滤掉,
513
- // 所以通常根本不占字节。
492
+ // 仅限流中的 agent 才会带(可用 agent 上不存在)。额度/冷却只作参考信息,
493
+ // 不参与派发门控:这类 agent 同样在 agents 主列表里(带标注),不做过滤,
494
+ // 所以这两个字段只在确实限流时才占字节。
514
495
  "nextAvailableAt",
515
496
  "availabilityReason",
516
497
  // —— 体积大的说明性字段(排在每条记录最后,截断时先牺牲它们)——
@@ -545,7 +526,7 @@ var ULTRA_COMPACT_AGENT_SUMMARY_FIELDS = [
545
526
  "agentKey",
546
527
  "name",
547
528
  "model",
548
- "tier",
529
+ "modelTier",
549
530
  "billingSource",
550
531
  "availabilityStatus",
551
532
  "credentialGroup",
@@ -573,37 +554,6 @@ function toUltraCompactAgentSummary(summary) {
573
554
  }
574
555
  return compact;
575
556
  }
576
- var UNAVAILABLE_AGENT_SUMMARY_FIELDS = [
577
- "agentKey",
578
- "name",
579
- "model",
580
- "provider",
581
- "apiSource",
582
- "isFavorite",
583
- "isOAuth",
584
- "isOwned",
585
- "nextAvailableAt",
586
- "availabilityStatus",
587
- "availabilityReason",
588
- "quota",
589
- "favoritedAt",
590
- "updatedAt"
591
- ];
592
- function toUnavailableAgentSummary(summary) {
593
- const item = {
594
- name: summary.name,
595
- isFavorite: summary.isFavorite,
596
- isOAuth: summary.isOAuth,
597
- isOwned: summary.isOwned
598
- };
599
- for (const field of UNAVAILABLE_AGENT_SUMMARY_FIELDS) {
600
- const value = summary[field];
601
- if (value !== null && value !== void 0) {
602
- item[field] = value;
603
- }
604
- }
605
- return item;
606
- }
607
557
 
608
558
  // packages/ai/agent/agentDiscovery.ts
609
559
  function isPreferredAgent(agent) {
@@ -639,7 +589,7 @@ function resolveDiscoveryScope(args) {
639
589
  if (hasPublicOnly && publicOnly) {
640
590
  return "public";
641
591
  }
642
- return "preferred";
592
+ return "all";
643
593
  }
644
594
  function agentIdentityKeys(agent) {
645
595
  return [agent.agentKey, agent.publicKey, agent.id].filter(
@@ -765,13 +715,8 @@ function buildAgentDiscoveryResult(options) {
765
715
  availabilityReason: decision.reason
766
716
  };
767
717
  });
768
- const unavailableList = scopedAgents.filter((a) => isAgentUnavailableNow(a, now));
769
- const unavailableCount = unavailableList.length;
770
- const unavailableAgents = sortSafeAgentSummaries(unavailableList).map(toUnavailableAgentSummary);
718
+ const unavailableCount = scopedAgents.filter((a) => isAgentUnavailableNow(a, now)).length;
771
719
  const credentialGroups = summarizeCredentialGroups(scopedAgents, now);
772
- if (options.showUnavailable !== true) {
773
- scopedAgents = scopedAgents.filter((a) => !isAgentUnavailableNow(a, now));
774
- }
775
720
  const pagination = resolvePaginationArgs({
776
721
  limit: options.limit,
777
722
  offset: options.offset
@@ -809,8 +754,7 @@ function buildAgentDiscoveryResult(options) {
809
754
  ...isTruncated ? { truncated: true } : {},
810
755
  unavailableCount,
811
756
  agents: projectedAgents,
812
- credentialGroups,
813
- unavailableAgents
757
+ credentialGroups
814
758
  };
815
759
  }
816
760
  function toDiscoverySafeAgentSummary(record, options) {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  buildSkillDocMarkdown
3
- } from "./chunk-AETZ7AD6.js";
3
+ } from "./chunk-W6RFEDN4.js";
4
4
 
5
5
  // packages/cli/docPageHelpers.ts
6
6
  import { readFileSync } from "node:fs";
@@ -10,7 +10,7 @@ import {
10
10
  } from "./chunk-E2BESSAW.js";
11
11
  import {
12
12
  getModelContextWindow
13
- } from "./chunk-CZM5YTZ7.js";
13
+ } from "./chunk-HCJFGH6Y.js";
14
14
  import {
15
15
  isRecord
16
16
  } from "./chunk-KUG52IAP.js";
@@ -18,7 +18,7 @@ import {
18
18
  PLATFORM_HOSTED_KIMI_K3_MODEL,
19
19
  isFireworksKimiModel,
20
20
  isNoloHostedProvider
21
- } from "./chunk-GOO6G4PY.js";
21
+ } from "./chunk-VALBGPM6.js";
22
22
  import {
23
23
  asTrimmedLowercaseString
24
24
  } from "./chunk-QSJ3HFEF.js";
@@ -1,18 +1,28 @@
1
1
  // packages/cli/tui/ciStatus.ts
2
2
  import { execFile } from "node:child_process";
3
- var DEFAULT_SSH_HOST = "nolotus@136.67.147.177";
3
+ var DEFAULT_SSH_HOST = "root@62.83.99.45";
4
4
  var DEFAULT_CI_PORT = "3900";
5
- function resolveSshTarget() {
6
- const override = process.env.NOLO_CI_SSH_HOST?.trim();
5
+ function resolveCiSshTarget(env = process.env) {
6
+ const override = env.NOLO_CI_SSH_HOST?.trim();
7
7
  if (override) return override;
8
- const raw = process.env.NOLO_CI_RAW_HOST?.trim() ?? process.env.NOLO_ALPHA_RAW_HOST?.trim();
9
- if (raw) {
10
- const user = process.env.NOLO_CI_SSH_USER?.trim() ?? process.env.NOLO_ALPHA_SSH_USER?.trim() ?? "nolotus";
11
- return `${user}@${raw}`;
12
- }
13
- const legacyAlias = process.env.NOLO_ALPHA_SSH_CONFIG_HOST?.trim();
14
- if (legacyAlias) return legacyAlias;
15
- return DEFAULT_SSH_HOST;
8
+ const raw = env.NOLO_CI_RAW_HOST?.trim() ?? env.NOLO_ALPHA_RAW_HOST?.trim();
9
+ if (raw) return `${env.NOLO_CI_SSH_USER?.trim() ?? env.NOLO_ALPHA_SSH_USER?.trim() ?? "nolotus"}@${raw}`;
10
+ return env.NOLO_ALPHA_SSH_CONFIG_HOST?.trim() || DEFAULT_SSH_HOST;
11
+ }
12
+ function resolveCiPort(env = process.env) {
13
+ const raw = env.NOLO_CI_PORT?.trim() ?? "";
14
+ return /^\d{1,5}$/.test(raw) && Number(raw) > 0 && Number(raw) <= 65535 ? raw : DEFAULT_CI_PORT;
15
+ }
16
+ function compactStatusBeforeTransport(command) {
17
+ const projection = 'import json,sys; d=json.load(sys.stdin); jobs=d.get("jobs",[d]); [j.get("source",{}).pop("push",None) for j in jobs]; print(json.dumps(d,separators=(",",":")))';
18
+ return `${command} | python3 -c '${projection}'`;
19
+ }
20
+ function buildCiStatusCommand(limit, env = process.env) {
21
+ const safeLimit = Math.max(1, Math.min(20, Math.trunc(limit) || 5));
22
+ return compactStatusBeforeTransport(`curl -s -m 3 "http://127.0.0.1:${resolveCiPort(env)}/status?limit=${safeLimit}"`);
23
+ }
24
+ function resolveSshTarget() {
25
+ return resolveCiSshTarget();
16
26
  }
17
27
  function asRecord(value) {
18
28
  return typeof value === "object" && value !== null ? value : void 0;
@@ -64,19 +74,13 @@ function parseCiStatusPayload(raw) {
64
74
  const single = toCiJob(parsed);
65
75
  return single ? [single] : void 0;
66
76
  }
67
- function resolveCiPort() {
68
- const rawPort = process.env.NOLO_CI_PORT?.trim() ?? "";
69
- return /^\d{1,5}$/.test(rawPort) && Number(rawPort) > 0 && Number(rawPort) <= 65535 ? rawPort : DEFAULT_CI_PORT;
70
- }
71
77
  function buildRemoteCommand(limit) {
72
- const port = resolveCiPort();
73
- const safeLimit = Math.max(1, Math.min(20, Math.trunc(limit) || 5));
74
- return `curl -s -m 3 "http://127.0.0.1:${port}/status?limit=${safeLimit}"`;
78
+ return buildCiStatusCommand(limit);
75
79
  }
76
- function fetchCiStatus(limit = 5, timeoutMs = 4e3) {
77
- return fetchCiPayload(buildRemoteCommand(limit), parseCiStatusPayload, timeoutMs);
80
+ function fetchCiStatus(limit = 5, timeoutMs = 4e3, signal) {
81
+ return fetchCiPayload(buildRemoteCommand(limit), parseCiStatusPayload, timeoutMs, resolveSshTarget(), signal);
78
82
  }
79
- function fetchCiPayload(command, parse, timeoutMs) {
83
+ function fetchCiPayload(command, parse, timeoutMs, sshTarget, signal, execFileImpl = execFile) {
80
84
  return new Promise((resolve) => {
81
85
  let settled = false;
82
86
  let guard;
@@ -84,15 +88,22 @@ function fetchCiPayload(command, parse, timeoutMs) {
84
88
  if (settled) return;
85
89
  settled = true;
86
90
  if (guard) clearTimeout(guard);
91
+ signal?.removeEventListener("abort", onAbort);
87
92
  resolve(value);
88
93
  };
94
+ const onAbort = () => finish(void 0);
95
+ if (signal?.aborted) {
96
+ finish(void 0);
97
+ return;
98
+ }
99
+ signal?.addEventListener("abort", onAbort, { once: true });
89
100
  guard = setTimeout(() => finish(void 0), timeoutMs + 500);
90
101
  guard.unref?.();
91
102
  try {
92
- execFile(
103
+ execFileImpl(
93
104
  "ssh",
94
- ["-o", "BatchMode=yes", "-o", `ConnectTimeout=3`, resolveSshTarget(), command],
95
- { timeout: timeoutMs, encoding: "utf8", maxBuffer: 1024 * 1024 },
105
+ ["-o", "BatchMode=yes", "-o", `ConnectTimeout=3`, sshTarget, command],
106
+ { timeout: timeoutMs, signal, encoding: "utf8", maxBuffer: 1024 * 1024 },
96
107
  (error, stdout) => {
97
108
  if (error) {
98
109
  finish(void 0);
@@ -128,14 +139,17 @@ function buildCancelCommand(jobId) {
128
139
  const tokenRef = `$(grep -m1 '^NOLO_CI_ADMIN_TOKEN=' "$HOME/.config/nolo-ci.env" 2>/dev/null | cut -d= -f2-)`;
129
140
  return `curl -s -m 110 -H "Authorization: Bearer ${tokenRef}" -H 'Content-Type: application/json' -X POST --data '${body}' "${endpoint}"`;
130
141
  }
131
- function fetchCiCancel(jobId, timeoutMs = 12e4) {
142
+ function fetchCiCancel(jobId, timeoutMs = 12e4, execFileImpl = execFile) {
132
143
  return fetchCiPayload(
133
144
  buildCancelCommand(jobId),
134
145
  (stdout) => {
135
146
  const response = JSON.parse(stdout);
136
147
  return response?.ok === true && response?.cancelled === true && response?.jobId === jobId ? true : false;
137
148
  },
138
- timeoutMs
149
+ timeoutMs,
150
+ resolveSshTarget(),
151
+ void 0,
152
+ execFileImpl
139
153
  );
140
154
  }
141
155
 
@@ -0,0 +1,271 @@
1
+ import {
2
+ createSpaceKey,
3
+ normalizeSpaceId
4
+ } from "./chunk-UAD2WT54.js";
5
+ import {
6
+ patch,
7
+ read
8
+ } from "./chunk-AVHRSJUH.js";
9
+ import {
10
+ DEVICE_LOCAL_OWNER_ID,
11
+ isDeviceLocalSpaceBody
12
+ } from "./chunk-2VUZSVAS.js";
13
+ import {
14
+ selectIdentityUserId
15
+ } from "./chunk-PXYBUFDB.js";
16
+
17
+ // packages/create/space/utils/permissions.ts
18
+ var checkSpaceMembership = (spaceData, userId) => {
19
+ if (!spaceData) {
20
+ console.error("[Permission Check] Space data is missing.");
21
+ throw new Error("\u65E0\u6CD5\u6267\u884C\u6743\u9650\u68C0\u67E5\uFF1A\u7A7A\u95F4\u6570\u636E\u7F3A\u5931\u3002");
22
+ }
23
+ if (isDeviceLocalSpaceBody(spaceData)) {
24
+ return;
25
+ }
26
+ if (!userId) {
27
+ console.error("[Permission Check] User ID is missing.");
28
+ throw new Error("\u65E0\u6CD5\u6267\u884C\u6743\u9650\u68C0\u67E5\uFF1A\u7528\u6237 ID \u7F3A\u5931\u3002");
29
+ }
30
+ if (!spaceData.members || !Array.isArray(spaceData.members) || !spaceData.members.includes(userId)) {
31
+ console.warn(
32
+ `[Permission Check] User ${userId} attempt to operate on space ${spaceData.id} without membership.`
33
+ );
34
+ throw new Error("\u5F53\u524D\u7528\u6237\u4E0D\u662F\u7A7A\u95F4\u6210\u5458");
35
+ }
36
+ };
37
+ var canManageSpaceContent = (spaceData, userId, membership) => {
38
+ if (!spaceData) return false;
39
+ if (isDeviceLocalSpaceBody(spaceData)) return true;
40
+ const actor = typeof userId === "string" ? userId.trim() : "";
41
+ if (!actor) return false;
42
+ const ownerValues = [spaceData.ownerId, spaceData.userId].map((value) => typeof value === "string" ? value.trim() : "").filter(Boolean);
43
+ if (ownerValues.includes(actor)) return true;
44
+ const role = typeof membership?.role === "string" ? membership.role.trim() : "";
45
+ return role === "owner" || role === "admin";
46
+ };
47
+ var localSpaceAuthorityPatchStamp = (spaceData) => isDeviceLocalSpaceBody(spaceData) ? { userId: DEVICE_LOCAL_OWNER_ID } : {};
48
+
49
+ // packages/create/space/constants.ts
50
+ var UNCATEGORIZED_ID = "__uncategorized_container__";
51
+
52
+ // packages/create/space/content/spaceContentPatch.ts
53
+ var notifyUserDataUpdated = () => {
54
+ if (typeof window !== "undefined" && typeof window.dispatchEvent === "function" && typeof window.Event === "function") {
55
+ window.dispatchEvent(new window.Event("nolo-user-data-updated"));
56
+ }
57
+ };
58
+ var loadSpaceContentOrThrow = async (dispatch, spaceId, contentKey, sourceServerOrigin) => {
59
+ if (!contentKey || typeof contentKey !== "string" || contentKey.trim() === "") {
60
+ throw new Error("Invalid contentKey provided.");
61
+ }
62
+ const spaceKey = createSpaceKey.space(spaceId);
63
+ let spaceData = null;
64
+ try {
65
+ spaceData = await dispatch(
66
+ read({ dbKey: spaceKey, preferredServerOrigin: sourceServerOrigin })
67
+ ).unwrap();
68
+ } catch (readError) {
69
+ throw new Error(`\u65E0\u6CD5\u52A0\u8F7D\u7A7A\u95F4\u6570\u636E: ${spaceId}`);
70
+ }
71
+ if (!spaceData) {
72
+ throw new Error("Space not found");
73
+ }
74
+ const content = spaceData.contents?.[contentKey];
75
+ if (!content) {
76
+ throw new Error("Content not found in space");
77
+ }
78
+ return { spaceKey, spaceData, content };
79
+ };
80
+ function resolveContentSpaceWriteAuthority(input) {
81
+ const owner = typeof input.ownerId === "string" ? input.ownerId.trim() : "";
82
+ const actor = typeof input.actorUserId === "string" ? input.actorUserId.trim() : "";
83
+ if (owner && owner !== DEVICE_LOCAL_OWNER_ID && owner !== actor) return "deny";
84
+ if (input.targetSpaceIsDeviceLocal) return "allow";
85
+ if (owner === DEVICE_LOCAL_OWNER_ID) return "allow";
86
+ if (!owner) return "unverified";
87
+ if (actor && owner === actor) return "allow";
88
+ return actor ? "deny" : "unverified";
89
+ }
90
+ var readContentRecordForSpaceSync = async (dispatch, contentKey) => {
91
+ try {
92
+ const existing = await dispatch(read({ dbKey: contentKey })).unwrap();
93
+ if (!existing || typeof existing !== "object") return { status: "missing" };
94
+ return { status: "ok", record: existing };
95
+ } catch {
96
+ return { status: "unreadable" };
97
+ }
98
+ };
99
+ var applyContentRecordSpaceId = async (dispatch, contentKey, record, targetSpaceId, failMessagePrefix, options = {}) => {
100
+ const normalizedTarget = normalizeSpaceId(targetSpaceId) || targetSpaceId;
101
+ const authority = resolveContentSpaceWriteAuthority({
102
+ ownerId: record.userId ?? record.ownerId,
103
+ actorUserId: options.actorUserId,
104
+ targetSpaceIsDeviceLocal: options.targetSpaceIsDeviceLocal
105
+ });
106
+ if (authority === "deny") return "not-owner";
107
+ if (authority === "unverified") return "unverified";
108
+ const rawCurrentSpaceId = record.spaceId;
109
+ const currentSpaceId = typeof rawCurrentSpaceId === "string" ? normalizeSpaceId(rawCurrentSpaceId) : null;
110
+ if (currentSpaceId === normalizedTarget) return "unchanged";
111
+ if (options.onlyWhenUnset && currentSpaceId) return "unchanged";
112
+ try {
113
+ await dispatch(
114
+ patch({ dbKey: contentKey, changes: { spaceId: normalizedTarget } })
115
+ ).unwrap();
116
+ } catch (contentPatchError) {
117
+ throw new Error(
118
+ `${failMessagePrefix}: ${contentPatchError?.message || "\u672A\u77E5\u9519\u8BEF"}`
119
+ );
120
+ }
121
+ notifyUserDataUpdated();
122
+ return "patched";
123
+ };
124
+ var syncContentRecordSpaceId = async (dispatch, contentKey, targetSpaceId, failMessagePrefix, options = {}) => {
125
+ const readResult = await readContentRecordForSpaceSync(dispatch, contentKey);
126
+ if (readResult.status === "unreadable") return "unreadable";
127
+ if (readResult.status === "missing") return "missing";
128
+ return applyContentRecordSpaceId(
129
+ dispatch,
130
+ contentKey,
131
+ readResult.record,
132
+ targetSpaceId,
133
+ failMessagePrefix,
134
+ options
135
+ );
136
+ };
137
+ var patchIndividualContentRecord = async (dispatch, contentKey, changes, sourceServerOrigin, failMessagePrefix) => {
138
+ let hasIndividualRecord = false;
139
+ try {
140
+ const existing = await dispatch(
141
+ read({ dbKey: contentKey, preferredServerOrigin: sourceServerOrigin })
142
+ ).unwrap();
143
+ hasIndividualRecord = Boolean(existing);
144
+ } catch {
145
+ hasIndividualRecord = false;
146
+ }
147
+ if (hasIndividualRecord) {
148
+ try {
149
+ await dispatch(
150
+ patch({
151
+ dbKey: contentKey,
152
+ changes,
153
+ preferredServerOrigin: sourceServerOrigin
154
+ })
155
+ ).unwrap();
156
+ notifyUserDataUpdated();
157
+ } catch (contentPatchError) {
158
+ throw new Error(
159
+ `${failMessagePrefix}: ${contentPatchError?.message || "\u672A\u77E5\u9519\u8BEF"}`
160
+ );
161
+ }
162
+ }
163
+ };
164
+
165
+ // packages/create/space/content/addContentAction.ts
166
+ var addContentAction = async (input, thunkAPI) => {
167
+ const {
168
+ spaceId,
169
+ title,
170
+ type,
171
+ contentKey,
172
+ fileCategory,
173
+ mimeType,
174
+ fileSize,
175
+ originalName,
176
+ categoryId: rawCategoryId,
177
+ pinned = false,
178
+ order,
179
+ triggerType,
180
+ skillSummary
181
+ } = input;
182
+ const { dispatch, getState } = thunkAPI;
183
+ const userId = selectIdentityUserId(getState());
184
+ if (!contentKey || typeof contentKey !== "string" || contentKey.trim() === "")
185
+ throw new Error("Invalid contentKey provided.");
186
+ if (!title || typeof title !== "string" || title.trim() === "")
187
+ throw new Error("Invalid or empty title provided.");
188
+ if (!type || typeof type !== "string")
189
+ throw new Error("Invalid content type provided.");
190
+ const spaceKey = createSpaceKey.space(spaceId);
191
+ const spaceData = await dispatch(read({
192
+ dbKey: spaceKey
193
+ })).unwrap();
194
+ checkSpaceMembership(spaceData, userId);
195
+ const alreadyPresent = Boolean(spaceData.contents?.[contentKey]);
196
+ let categoryIdForStorage;
197
+ if (rawCategoryId && rawCategoryId !== "" && rawCategoryId !== UNCATEGORIZED_ID) {
198
+ if (spaceData.categories?.[rawCategoryId]) {
199
+ categoryIdForStorage = rawCategoryId;
200
+ }
201
+ }
202
+ const now = Date.now();
203
+ const newSpaceContent = {
204
+ title: title.trim(),
205
+ type,
206
+ contentKey,
207
+ ...fileCategory !== void 0 ? { fileCategory } : {},
208
+ ...mimeType !== void 0 ? { mimeType } : {},
209
+ ...fileSize !== void 0 ? { fileSize } : {},
210
+ ...originalName !== void 0 ? { originalName } : {},
211
+ ...categoryIdForStorage !== void 0 && {
212
+ categoryId: categoryIdForStorage
213
+ },
214
+ pinned,
215
+ createdAt: now,
216
+ updatedAt: now,
217
+ ...order !== void 0 && typeof order === "number" && { order },
218
+ ...triggerType !== void 0 && { triggerType },
219
+ ...skillSummary !== void 0 ? { skillSummary } : {}
220
+ };
221
+ const entityRead = await readContentRecordForSpaceSync(dispatch, contentKey);
222
+ if (entityRead.status === "unreadable") {
223
+ throw new Error("\u65E0\u6CD5\u8BFB\u53D6\u5185\u5BB9\u8BB0\u5F55\uFF0C\u672A\u52A0\u5165\u7A7A\u95F4\uFF08\u53EF\u91CD\u8BD5\uFF09");
224
+ }
225
+ let updatedSpaceData;
226
+ if (alreadyPresent) {
227
+ updatedSpaceData = spaceData;
228
+ } else {
229
+ const changes = {
230
+ contents: { [contentKey]: newSpaceContent },
231
+ updatedAt: now,
232
+ ...localSpaceAuthorityPatchStamp(spaceData)
233
+ };
234
+ updatedSpaceData = await dispatch(
235
+ patch({ dbKey: spaceKey, changes })
236
+ ).unwrap();
237
+ }
238
+ let contentSpaceSync;
239
+ try {
240
+ contentSpaceSync = entityRead.status === "ok" ? await applyContentRecordSpaceId(
241
+ dispatch,
242
+ contentKey,
243
+ entityRead.record,
244
+ spaceId,
245
+ "\u5185\u5BB9\u5DF2\u52A0\u5165\u7A7A\u95F4\uFF0C\u4F46\u540C\u6B65\u5185\u5BB9\u8BB0\u5F55\u7684\u5F52\u5C5E\u7A7A\u95F4\u5931\u8D25",
246
+ {
247
+ onlyWhenUnset: true,
248
+ actorUserId: userId,
249
+ targetSpaceIsDeviceLocal: isDeviceLocalSpaceBody(spaceData)
250
+ }
251
+ ) : "missing";
252
+ } catch (entitySyncError) {
253
+ throw new Error(
254
+ `${entitySyncError?.message || "\u540C\u6B65\u5185\u5BB9\u8BB0\u5F55\u5931\u8D25"}\uFF08\u7A7A\u95F4\u94FE\u63A5\u5DF2\u5199\u5165\uFF1B\u518D\u6B21\u52A0\u5165\u4F1A\u5E42\u7B49\u6536\u655B\uFF09`
255
+ );
256
+ }
257
+ return { spaceId, updatedSpaceData, contentSpaceSync, alreadyPresent };
258
+ };
259
+
260
+ export {
261
+ checkSpaceMembership,
262
+ canManageSpaceContent,
263
+ localSpaceAuthorityPatchStamp,
264
+ UNCATEGORIZED_ID,
265
+ notifyUserDataUpdated,
266
+ loadSpaceContentOrThrow,
267
+ readContentRecordForSpaceSync,
268
+ syncContentRecordSpaceId,
269
+ patchIndividualContentRecord,
270
+ addContentAction
271
+ };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  resolvePlatformAuthToken
3
- } from "./chunk-TCZHTTUU.js";
3
+ } from "./chunk-2OLYKYNY.js";
4
4
  import {
5
5
  getCredentialsDir
6
6
  } from "./chunk-G7Y4GXTY.js";
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  requireTokenUser
3
- } from "./chunk-DM6UMOEL.js";
4
- import {
5
- resolveServerUrl
6
- } from "./chunk-WACI5I6V.js";
3
+ } from "./chunk-6NKA6RKF.js";
7
4
  import {
8
5
  t
9
- } from "./chunk-3RQVYR4B.js";
6
+ } from "./chunk-OB6DVWPF.js";
7
+ import {
8
+ resolveServerUrl
9
+ } from "./chunk-2THCNKE4.js";
10
10
 
11
11
  // packages/cli/cliApiClient.ts
12
12
  var CliApiError = class extends Error {
@@ -0,0 +1,46 @@
1
+ // packages/ai/memory/vnext/legacyMigration.ts
2
+ import { createHash } from "crypto";
3
+ var LEGACY_MEMORY_SOURCE_REF_PREFIX = "legacy-memory";
4
+ var LEGACY_MEMORY_EVIDENCE_ID_PREFIX = "mem-legacy-";
5
+ var resolveLegacyMemoryPrincipal = (item) => ({
6
+ ownerType: item.ownerType,
7
+ ownerId: item.ownerId,
8
+ principalId: `${item.ownerType}:${encodeURIComponent(item.ownerId)}`
9
+ });
10
+ var buildLegacyMemorySourceRef = (item) => {
11
+ const { principalId } = resolveLegacyMemoryPrincipal(item);
12
+ return `${LEGACY_MEMORY_SOURCE_REF_PREFIX}:${principalId}:${encodeURIComponent(item.id)}`;
13
+ };
14
+ var legacyEvidenceSeed = (principalId, itemId) => JSON.stringify([principalId, itemId]);
15
+ var buildLegacyEvidenceId = (item) => {
16
+ const { principalId } = resolveLegacyMemoryPrincipal(item);
17
+ const digest = createHash("sha256").update(legacyEvidenceSeed(principalId, item.id)).digest("hex");
18
+ return `${LEGACY_MEMORY_EVIDENCE_ID_PREFIX}${digest.slice(0, 32)}`;
19
+ };
20
+ var clampLegacyConfidence = (value) => {
21
+ if (typeof value !== "number" || !Number.isFinite(value)) return 0;
22
+ if (value < 0) return 0;
23
+ if (value > 1) return 1;
24
+ return value;
25
+ };
26
+ var buildLegacyMemoryEvidence = (item) => {
27
+ const { principalId } = resolveLegacyMemoryPrincipal(item);
28
+ return {
29
+ id: buildLegacyEvidenceId(item),
30
+ ownerId: principalId,
31
+ text: item.content,
32
+ sourceRef: buildLegacyMemorySourceRef(item),
33
+ confidence: clampLegacyConfidence(item.confidence),
34
+ createdAt: item.createdAt
35
+ };
36
+ };
37
+
38
+ export {
39
+ LEGACY_MEMORY_SOURCE_REF_PREFIX,
40
+ LEGACY_MEMORY_EVIDENCE_ID_PREFIX,
41
+ resolveLegacyMemoryPrincipal,
42
+ buildLegacyMemorySourceRef,
43
+ buildLegacyEvidenceId,
44
+ clampLegacyConfidence,
45
+ buildLegacyMemoryEvidence
46
+ };