nolo-cli 0.212.0-alpha.1 → 0.222.0-alpha.2

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-4GGQQHOB.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-GDHDOF4U.js} +18 -17
  6. package/{addDialogAgentAction-3NKVQCEC.js → addDialogAgentAction-CAKRU3ZT.js} +21 -20
  7. package/{agentDeleteCommand-NWK7VU4N.js → agentDeleteCommand-BPV2XZL7.js} +128 -119
  8. package/{agentEmailCommands-UZ4DHEX2.js → agentEmailCommands-EJOS75YL.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-HIZODBF3.js} +196 -124
  12. package/{agentMachineCommands-6TE4MBMP.js → agentMachineCommands-ZMQ2CY7Y.js} +62 -53
  13. package/{agentProviderCommands-Q5O33MED.js → agentProviderCommands-WKJOAWBP.js} +5 -5
  14. package/{agentPullCommand-6EM3URVK.js → agentPullCommand-XN6ZPBUW.js} +7 -7
  15. package/agentRecordCommands-OMXVDLDX.js +176 -0
  16. package/agentRunCommand-CB34YWMV.js +206 -0
  17. package/{agentRunControl-OI3LOENH.js → agentRunControl-JNONH3RP.js} +30 -15
  18. package/{agentRuntimeLocal-HL526DNQ.js → agentRuntimeLocal-QZPFWMLG.js} +52 -45
  19. package/{agentSlice-TMYP2UEA.js → agentSlice-RD2CDU7T.js} +20 -19
  20. package/{appDeleteCommands-ZERW4AXY.js → appDeleteCommands-QCCFDIEQ.js} +61 -52
  21. package/{appDeployCommands-DUWSMYHL.js → appDeployCommands-V2T7TNMQ.js} +61 -52
  22. package/{appDeployStatusCommands-N2KIE4BF.js → appDeployStatusCommands-6PGH7ZCG.js} +61 -52
  23. package/{appGetCommands-YVR4NPVY.js → appGetCommands-3L7WWJA6.js} +61 -52
  24. package/{appListCommands-JS6HOHZS.js → appListCommands-ENJCK4PO.js} +61 -52
  25. package/{authCommand-FE2C3ZUM.js → authCommand-6V47SYGK.js} +29 -28
  26. package/{authCommands-HV3EAU3V.js → authCommands-GAJ3NIXO.js} +14 -13
  27. package/{builtinSkillRegistry-3YOIGEF6.js → builtinSkillRegistry-2ECA42FC.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-DM6UMOEL.js → chunk-27PCUMJI.js} +2 -2
  31. package/chunk-2CI3ZFWD.js +97 -0
  32. package/{chunk-HIRC32DV.js → chunk-2GJKRKI6.js} +543 -29
  33. package/{chunk-SM3NSZJV.js → chunk-2UCBGYO4.js} +20 -1
  34. package/{chunk-PYRUW7XN.js → chunk-2VUZSVAS.js} +136 -54
  35. package/chunk-2YGBI2XB.js +30 -0
  36. package/chunk-2ZKFCIJJ.js +13 -0
  37. package/{chunk-CJRONOYL.js → chunk-34J5K2YA.js} +19 -75
  38. package/{chunk-LOEO7LRC.js → chunk-3IK6ILVW.js} +4 -1
  39. package/{chunk-CTPXME7U.js → chunk-3LMUPOHG.js} +29 -6
  40. package/chunk-44X52WOJ.js +1621 -0
  41. package/{chunk-6VLJ6YA7.js → chunk-4DESLZTK.js} +9 -9
  42. package/{chunk-MYOH447Z.js → chunk-4JVNURX4.js} +1 -1
  43. package/chunk-5CHGAKRT.js +364 -0
  44. package/{chunk-YDH3FDFQ.js → chunk-5FUN7EG4.js} +1 -1
  45. package/{chunk-LKDF3ATR.js → chunk-5RKUPJYL.js} +1 -1
  46. package/{chunk-ZC3CMUKU.js → chunk-6OVNSQHN.js} +84 -2
  47. package/{chunk-IF45XG7K.js → chunk-6WU5572L.js} +40 -24
  48. package/{chunk-OHNELDTO.js → chunk-7EEZJ6BS.js} +11 -152
  49. package/{chunk-Y6ORVLSS.js → chunk-7ET2U67U.js} +1 -1
  50. package/{chunk-G7MLNNEX.js → chunk-7JLY4WYF.js} +5 -5
  51. package/{chunk-P5L7CXOC.js → chunk-7Z6EW7AH.js} +3 -2
  52. package/{chunk-IIQ6JGRI.js → chunk-AD5EWDFD.js} +2 -2
  53. package/{chunk-WXYLV624.js → chunk-AIHYNKGV.js} +4 -4
  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-AN74ON4G.js +675 -0
  58. package/{chunk-HRMJUN5J.js → chunk-AQZ6BMRK.js} +1 -1
  59. package/{chunk-CQ46IRNN.js → chunk-B4GOW4MT.js} +445 -201
  60. package/{chunk-4KB6WQUL.js → chunk-BGP2EDFG.js} +1 -1
  61. package/{chunk-NBTY7YJF.js → chunk-BR3GT6MR.js} +1 -0
  62. package/{chunk-7RFNTILS.js → chunk-BUDVRYES.js} +2 -2
  63. package/{chunk-D2MDMY2M.js → chunk-BV3FLP2L.js} +47 -1
  64. package/{chunk-25JZEIXN.js → chunk-C4VAR65S.js} +92 -150
  65. package/{chunk-AVTVGMDY.js → chunk-C4WTX5TU.js} +2 -2
  66. package/{chunk-ZL5RAEEB.js → chunk-CIRB724Q.js} +1 -1
  67. package/{chunk-F6UUQOG6.js → chunk-CKT6QUE2.js} +4 -4
  68. package/{chunk-M6RL5JCD.js → chunk-CMZ3Z5PT.js} +14 -14
  69. package/{secretCommands-4QS3HCA2.js → chunk-D726I5AZ.js} +191 -16
  70. package/{chunk-INSBKSBB.js → chunk-DNKTQ3IN.js} +4 -4
  71. package/chunk-DVQH4BTR.js +1137 -0
  72. package/{chunk-SOHTHFV2.js → chunk-DWX2HEVC.js} +91 -132
  73. package/{chunk-NOMIGOST.js → chunk-EIAI3PPH.js} +116 -124
  74. package/chunk-EUCFKKDM.js +247 -0
  75. package/chunk-EWQ3HGNZ.js +90 -0
  76. package/{chunk-RPQXPZZF.js → chunk-F3GRJO4Z.js} +908 -13
  77. package/{chunk-GSQNH63I.js → chunk-FIYSMXHY.js} +3 -19
  78. package/{chunk-KSTEXKL6.js → chunk-FJ23FZXF.js} +76 -31
  79. package/{chunk-INN4LTAJ.js → chunk-FJK526XH.js} +2 -2
  80. package/chunk-FS2XP5D7.js +142 -0
  81. package/{chunk-QT6PKHYJ.js → chunk-FYF2TONJ.js} +5 -5
  82. package/{chunk-OXME3PEE.js → chunk-GBWGPTA7.js} +2 -1
  83. package/{chunk-RU4SD66C.js → chunk-GYVCJABP.js} +30 -254
  84. package/{chunk-YUXQAVRD.js → chunk-HOCHUZQ7.js} +257 -90
  85. package/{chunk-Y2WUYX4I.js → chunk-HXER7YJF.js} +4 -4
  86. package/chunk-HYIETXA6.js +99 -0
  87. package/{chunk-H2TJUNCH.js → chunk-I4EADJ4P.js} +6 -6
  88. package/{chunk-TCZHTTUU.js → chunk-I7WBYGBP.js} +8 -8
  89. package/{chunk-5RYBGBQH.js → chunk-IILMY4W4.js} +14 -9
  90. package/chunk-JA3ICVJY.js +271 -0
  91. package/{chunk-ZRSNONOB.js → chunk-JWXITTQB.js} +8 -3
  92. package/{chunk-JNKSDZFS.js → chunk-KEN3N2TN.js} +310 -66
  93. package/{chunk-LEC5ALIN.js → chunk-KEPOVMF4.js} +1 -1
  94. package/{chunk-UHJGXRJ4.js → chunk-KQSYAIZR.js} +3 -3
  95. package/{chunk-4VJAC32I.js → chunk-L5I543VB.js} +3 -2
  96. package/chunk-LKA64WH4.js +227 -0
  97. package/{chunk-6OQUPIQF.js → chunk-LVL6GFCM.js} +4 -4
  98. package/{chunk-UTV2AYEG.js → chunk-MAIITKBT.js} +2 -2
  99. package/chunk-MBG66ZBH.js +226 -0
  100. package/{chunk-YUA6OAH5.js → chunk-MDLS23JK.js} +2 -2
  101. package/{chunk-VL5KOY2C.js → chunk-MK2Q7ZJD.js} +67 -5
  102. package/{chunk-B7NJ3T4A.js → chunk-MS4NZNKI.js} +10 -10
  103. package/{chunk-3AKFVZ2I.js → chunk-MYHNBEXD.js} +3 -3
  104. package/{chunk-VZKUKCA6.js → chunk-MZLE5HQ3.js} +3673 -241
  105. package/{chunk-AZMYUSVF.js → chunk-N5Z2V73W.js} +1 -1
  106. package/chunk-NIZ2BXFD.js +526 -0
  107. package/{chunk-YPD3VJZW.js → chunk-NWP2OYOX.js} +20 -20
  108. package/{chunk-3FOQHGHN.js → chunk-O6J3OTOP.js} +4 -4
  109. package/{chunk-3RQVYR4B.js → chunk-OB6DVWPF.js} +197 -65
  110. package/{chunk-YWSEPJ7C.js → chunk-OBWT45ZU.js} +3 -3
  111. package/{chunk-5AQR3DGV.js → chunk-ODJ7BVSI.js} +80 -11
  112. package/{chunk-XJWWBO34.js → chunk-OJKUU3LP.js} +5 -7
  113. package/{chunk-GNDJKC4B.js → chunk-ON37YXGX.js} +29 -29
  114. package/{chunk-D5RCRX4A.js → chunk-P5ZJRTCH.js} +9415 -5169
  115. package/{chunk-6XIE5ZGI.js → chunk-PDCV7P5W.js} +1 -1
  116. package/{chunk-EZFQ6XRV.js → chunk-PJCIP64Z.js} +861 -59
  117. package/{chunk-GPO7FCEZ.js → chunk-PJVKMGPZ.js} +1222 -1719
  118. package/{chunk-CKAHAVMK.js → chunk-PPJYZRSQ.js} +40 -26
  119. package/chunk-QHEN7NZ7.js +46 -0
  120. package/{chunk-4KH4J3G5.js → chunk-QNWG52I4.js} +19 -7
  121. package/{chunk-YGILMZ7N.js → chunk-QVBXJNZ2.js} +1 -1
  122. package/chunk-RDH5CQ4T.js +1382 -0
  123. package/{chunk-C6KNNXWU.js → chunk-RGQ4UUWZ.js} +25 -2
  124. package/{chunk-OWYYDMGJ.js → chunk-S2NTVGA2.js} +4 -2
  125. package/{chunk-KC4XDTT3.js → chunk-SOF4OWDM.js} +6 -4
  126. package/{chunk-IAPCBNEE.js → chunk-SQYIK6HO.js} +1 -1
  127. package/{chunk-22CIEBYO.js → chunk-SVT62ULE.js} +50 -48
  128. package/{chunk-KIM6CLW5.js → chunk-SY3C4SQ7.js} +42 -15
  129. package/{chunk-JY5NGFFH.js → chunk-SYTHYBMI.js} +5 -5
  130. package/{chunk-6NSSLV67.js → chunk-T6DXNI6Z.js} +52 -50
  131. package/chunk-TLE77UJ5.js +230 -0
  132. package/{chunk-4VNS5WPM.js → chunk-U67V476Y.js} +1 -8
  133. package/{chunk-F7CI2ZC5.js → chunk-UAIHKQIA.js} +2 -1
  134. package/{chunk-MMNYUVLW.js → chunk-UB3D4TRQ.js} +11 -77
  135. package/{chunk-WPORQFYN.js → chunk-UVLYNWIE.js} +2 -2
  136. package/{chunk-YOIW77S2.js → chunk-UYOICCYG.js} +29 -19
  137. package/{chunk-4I7ERB7F.js → chunk-VREDDN25.js} +1 -1
  138. package/{chunk-JIT6FSXJ.js → chunk-WAE3GFCJ.js} +3 -3
  139. package/{chunk-IJXYFTV7.js → chunk-WI67URFP.js} +20 -20
  140. package/{chunk-7OCO4TDT.js → chunk-WJVYAO6P.js} +1 -1
  141. package/{chunk-T43B7LB2.js → chunk-WKGQSYTB.js} +1 -1
  142. package/{chunk-YJMRHHGY.js → chunk-WUUH4LWZ.js} +60 -30
  143. package/{chunk-PDGKOTO7.js → chunk-X7UF53VA.js} +33 -22
  144. package/{chunk-TY3TIUJK.js → chunk-XI2BWJM5.js} +65 -0
  145. package/{chunk-OOF4UPC5.js → chunk-XWVCYUUU.js} +16 -159
  146. package/{chunk-J5JTMQIA.js → chunk-YFLVRVYK.js} +1 -1
  147. package/{chunk-EYLGAEB4.js → chunk-YGMBIXCF.js} +132 -0
  148. package/chunk-YL3EFYL3.js +199 -0
  149. package/{chunk-MMA3LZ3W.js → chunk-YNIYE47Z.js} +1 -1
  150. package/{chunk-W4S457LU.js → chunk-YU4ZPWVF.js} +41 -5
  151. package/{chunk-NJR3WKVP.js → chunk-YWWDC3O7.js} +281 -159
  152. package/chunk-YZMNK53S.js +68 -0
  153. package/{chunk-FHU44LN3.js → chunk-Z2PITYZN.js} +2179 -552
  154. package/{chunk-FY7F4Q6X.js → chunk-Z4PCXPUE.js} +2 -2
  155. package/{cliAgentConfigHelpers-WJBZQTLW.js → cliAgentConfigHelpers-TKYL43MT.js} +15 -16
  156. package/{cliAuthorityBrokerClient-PM3U6Q6J.js → cliAuthorityBrokerClient-XHH7MH2P.js} +1 -1
  157. package/{cliAuthorityStoreDriver-TKLXNNTG.js → cliAuthorityStoreDriver-6FE3BJNB.js} +1 -1
  158. package/{cliEnvHelpers-BVYTMUPJ.js → cliEnvHelpers-VPSJ4XWC.js} +3 -3
  159. package/{cliExecutor-BWBF2MTI.js → cliExecutor-4MAX3PZL.js} +2 -2
  160. package/cliLocalAgentRecordReader-MHHD4T7R.js +90 -0
  161. package/{commandRegistry-VVMTPFAX.js → commandRegistry-5DA5UP7S.js} +106 -98
  162. package/{contentThunks-N52O67MI.js → contentThunks-5GUQ7FWJ.js} +47 -43
  163. package/{cooldownCommands-YXLWOXWR.js → cooldownCommands-X7P5M2V5.js} +5 -4
  164. package/{createAgentAutomationAction-ZC57YRSV.js → createAgentAutomationAction-UCLTHQRI.js} +51 -49
  165. package/{createDialogAction-VQW5WDYX.js → createDialogAction-UPN774AF.js} +46 -48
  166. package/{createPageAction-M5VDA7SC.js → createPageAction-JRQ2TA4O.js} +50 -48
  167. package/{cursorProvider-YGGNMVWX.js → cursorProvider-2RACMEMF.js} +1 -1
  168. package/{db-HUCI5R4G.js → db-CS4ZJQKV.js} +1 -1
  169. package/{dbSlice-HP7G4LX3.js → dbSlice-WNON7TOL.js} +17 -16
  170. package/{deleteFile-7VQGLK2V.js → deleteFile-Q3YDB4ML.js} +9 -9
  171. package/{desktopFolderProjects-SFY5EZS3.js → desktopFolderProjects-4POAMVJN.js} +2 -2
  172. package/{dialogCommands-JHMR2N2Y.js → dialogCommands-VRI7VCXH.js} +64 -57
  173. package/dialogNotifyCommand-6TMCX4D2.js +36 -0
  174. package/{dialogSlice-GRSVGDTF.js → dialogSlice-LFNVUSAN.js} +42 -40
  175. package/{dialogUsageCommand-7KCPYGHG.js → dialogUsageCommand-HTVPR2CX.js} +11 -10
  176. package/{docCreateCommands-F2K3UPSQ.js → docCreateCommands-AMPXMOX3.js} +61 -54
  177. package/{docDeleteCommands-XGXB5RFT.js → docDeleteCommands-I5WFAEHP.js} +63 -57
  178. package/{docReadCommands-7HWZZV6J.js → docReadCommands-X53ELNIE.js} +61 -54
  179. package/{docStore-KNZK6Y2G.js → docStore-2VAWVLWH.js} +21 -20
  180. package/{docUpdateCommands-OZZ7NQII.js → docUpdateCommands-6QPNDC7M.js} +64 -57
  181. package/{fetchMessages-M3QU7ZCQ.js → fetchMessages-TQEUZD7H.js} +8 -7
  182. package/{getPricing-2MNMXEVG.js → getPricing-MB2GBXOK.js} +6 -6
  183. package/{handleSendMessageAction-SHIH74GJ.js → handleSendMessageAction-AAJOHXOB.js} +193 -301
  184. package/{hostCredentialCreate-X64WK4JD.js → hostCredentialCreate-GLMJ22M6.js} +123 -114
  185. package/index.js +29 -29
  186. package/{keys-BEGDOTRL.js → keys-RWF7UCB4.js} +5 -4
  187. package/legacyMigration-TF4SYJCZ.js +19 -0
  188. package/{lib-5KKIBFIT.js → lib-OT5OTXRU.js} +7087 -6664
  189. package/{localDialogRead-XRLAH4CZ.js → localDialogRead-SVTPA5GY.js} +3 -3
  190. package/{localFirstLog-DHNOY2NA.js → localFirstLog-OIETGK66.js} +1 -1
  191. package/localRecall-2J6QPOK2.js +15 -0
  192. package/{localRuntimeAdapter-A7K3ABA6.js → localRuntimeAdapter-BMP57P42.js} +119 -110
  193. package/{localRuntimeAuthority-OYH4AE4G.js → localRuntimeAuthority-IBJAT62G.js} +1 -1
  194. package/{localRuntimeDb-VBIMCWUC.js → localRuntimeDb-N7KHDXS2.js} +2 -2
  195. package/{machineCommands-DE3MR7CJ.js → machineCommands-3MLIAK5Q.js} +128 -119
  196. package/{machineInfo-UKPTZO5Y.js → machineInfo-LWHTEBHJ.js} +1 -1
  197. package/machineWsRunDispatch-FKIGROQF.js +191 -0
  198. package/{memberThunks-7WJAY5V6.js → memberThunks-ZGLZ36PK.js} +29 -28
  199. package/{memoryCommands-ASCE5STX.js → memoryCommands-5WC3T66U.js} +4 -4
  200. package/models-ULVWLSQ6.js +9 -0
  201. package/{oauthTokenStore-OEERZFUC.js → oauthTokenStore-RUYNYALS.js} +1 -1
  202. package/{offlineMarxistsAgentCommand-2QTHJCHV.js → offlineMarxistsAgentCommand-4IC3Y4C6.js} +4 -4
  203. package/overlay-THLKYIWY.js +11 -0
  204. package/package.json +2 -2
  205. package/{pdf-U6KSUEZZ.js → pdf-KE3QI2V7.js} +1 -1
  206. package/{processSpawn-ZU5QFM43.js → processSpawn-6GEO77KV.js} +1 -1
  207. package/{profileConfig-KN3N2BLF.js → profileConfig-KOWK4HOG.js} +1 -1
  208. package/{projectArchive-GGL5HLMD.js → projectArchive-HK63GMF4.js} +52 -50
  209. package/{providerPresetApply-YXGV6NXB.js → providerPresetApply-OIFQ73LH.js} +19 -12
  210. package/{providerRegistry-S6UL6UNA.js → providerRegistry-KZ3SDZ3D.js} +10 -10
  211. package/{read-4VZQODSN.js → read-MRQHJMJ2.js} +10 -10
  212. package/{readDocTool-AVD32RUJ.js → readDocTool-4BGTXTXA.js} +2 -2
  213. package/{readlineWorkspace-XKYKNL2I.js → readlineWorkspace-AKAHSCNY.js} +6505 -4634
  214. package/{removeDialogAgentAction-FKL4BYMR.js → removeDialogAgentAction-B6H7DXFM.js} +23 -22
  215. package/{runAgentClientLoop-V7E2WBVM.js → runAgentClientLoop-UVAWGEON.js} +81 -79
  216. package/{runtimeDoctorCommands-QAI3MBKQ.js → runtimeDoctorCommands-FW6XKDUG.js} +12 -12
  217. package/{runtimeModeArgs-2Y7BALTO.js → runtimeModeArgs-X7DL7PUN.js} +1 -1
  218. package/secretCommands-LJXOOYA7.js +24 -0
  219. package/{setDialogExtraReferencesAction-TLIOLWWI.js → setDialogExtraReferencesAction-EVCY3TRW.js} +22 -21
  220. package/{setPrimaryDialogAgentAction-2OLWRFYR.js → setPrimaryDialogAgentAction-KPFVPHCJ.js} +23 -22
  221. package/{settingThunks-UGBPCNYF.js → settingThunks-ENOAK2WV.js} +97 -88
  222. package/{skillDiscovery-XKHROSH2.js → skillDiscovery-B5V23AXP.js} +4 -4
  223. package/{skillSummaryMarker-42HKSXYY.js → skillSummaryMarker-62UW7HI7.js} +1 -1
  224. package/{slateToRenderMarkdown-Y5IYN73U.js → slateToRenderMarkdown-R3X74MCX.js} +1 -1
  225. package/{slateUtils-NGV2NMKM.js → slateUtils-ESQAJ6RN.js} +1 -1
  226. package/{spaceCommands-4KSLKVNF.js → spaceCommands-DTTNAS2L.js} +61 -53
  227. package/store-JRVN62NM.js +46 -0
  228. package/{streamAgentChatTurn-7FR7X2NU.js → streamAgentChatTurn-R5UY25VB.js} +875 -618
  229. package/{switchDialogAgentAction-UZSAG2N5.js → switchDialogAgentAction-SZ44XDRY.js} +21 -20
  230. package/{tableCommands-MP6VFSVT.js → tableCommands-HITDSLHS.js} +10 -10
  231. package/tombstones-FQQMEDOW.js +32 -0
  232. package/{toolApiClient-HGNO53TC.js → toolApiClient-OGQEBQVX.js} +4 -4
  233. package/{tools-ZLKCC25W.js → tools-HWFG6GMJ.js} +75 -74
  234. package/tuiSummaryLlmCaller-HQQZAMYF.js +44 -0
  235. package/{updateCommands-4744PL3P.js → updateCommands-RJVCRSBP.js} +10 -8
  236. package/{updateDialogTitleAction-U53ZT7PJ.js → updateDialogTitleAction-KNPOAMVS.js} +48 -46
  237. package/{usageCommand-F4IPVMIZ.js → usageCommand-FWZCB7AM.js} +11 -10
  238. package/{usageRebuildCommand-HAW2AD5N.js → usageRebuildCommand-SP2BLNJU.js} +12 -11
  239. package/userDataMerge-HT2ZVHBJ.js +13 -0
  240. package/{windowsSelfUpdate-XSQVF2GK.js → windowsSelfUpdate-KERHIAB4.js} +3 -3
  241. package/{workloadLifecycle-4BEQHMSD.js → workloadLifecycle-DYNEYHV5.js} +7 -6
  242. package/agentRecordCommands-L3QQ7HZ4.js +0 -167
  243. package/agentRunCommand-2IFGQHCO.js +0 -196
  244. package/chunk-3CGG2PAL.js +0 -594
  245. package/chunk-5XBUWM6I.js +0 -89
  246. package/chunk-BFM34N54.js +0 -842
  247. package/chunk-CJEIOP3E.js +0 -0
  248. package/chunk-CZM5YTZ7.js +0 -977
  249. package/chunk-EYUBHHFB.js +0 -636
  250. package/chunk-JTDORD5P.js +0 -415
  251. package/chunk-NRFKLKRU.js +0 -339
  252. package/chunk-VPAZOH2D.js +0 -115
  253. package/chunk-WJZOQR2J.js +0 -151
  254. package/chunk-ZCWRMUWT.js +0 -89
  255. package/dist-M676ULYG.js +0 -7314
  256. package/machineWsRunDispatch-R26P5V36.js +0 -182
  257. package/models-PJBE6JDV.js +0 -9
  258. package/tuiSummaryLlmCaller-WC54MVGP.js +0 -160
  259. package/{chunk-WACI5I6V.js → chunk-2THCNKE4.js} +3 -3
  260. package/{chunk-2QHFH3DR.js → chunk-47ITIXO7.js} +6 -6
  261. package/{chunk-GOO6G4PY.js → chunk-CKG3PRZ7.js} +0 -0
  262. package/{chunk-OQHIVPG4.js → chunk-SNBZZPYH.js} +3 -3
  263. package/{chunk-AETZ7AD6.js → chunk-W6RFEDN4.js} +3 -3
@@ -2,28 +2,35 @@ import {
2
2
  deleteDialog,
3
3
  runtime_default,
4
4
  toast
5
- } from "./chunk-VZKUKCA6.js";
5
+ } from "./chunk-MZLE5HQ3.js";
6
6
  import {
7
+ getAllMemberSpaces,
7
8
  getCurrentSpaceId,
8
9
  getCurrentSpaceIdRaw,
9
10
  updateCurrentSpaceIfMatch
10
- } from "./chunk-5XBUWM6I.js";
11
+ } from "./chunk-MBG66ZBH.js";
12
+ import {
13
+ require_formatISO
14
+ } from "./chunk-UVLYNWIE.js";
15
+ import {
16
+ require_react
17
+ } from "./chunk-5FUN7EG4.js";
11
18
  import {
12
19
  UNCATEGORIZED_ID,
13
20
  addContentAction,
21
+ canManageSpaceContent,
14
22
  checkSpaceMembership,
15
- localSpaceAuthorityPatchStamp
16
- } from "./chunk-VPAZOH2D.js";
23
+ loadSpaceContentOrThrow,
24
+ localSpaceAuthorityPatchStamp,
25
+ notifyUserDataUpdated,
26
+ patchIndividualContentRecord,
27
+ readContentRecordForSpaceSync,
28
+ syncContentRecordSpaceId
29
+ } from "./chunk-JA3ICVJY.js";
17
30
  import {
18
31
  createSpaceKey,
19
32
  normalizeSpaceId
20
33
  } from "./chunk-UAD2WT54.js";
21
- import {
22
- require_formatISO
23
- } from "./chunk-WPORQFYN.js";
24
- import {
25
- require_react
26
- } from "./chunk-YDH3FDFQ.js";
27
34
  import {
28
35
  patch,
29
36
  read,
@@ -32,7 +39,7 @@ import {
32
39
  uploadFileAction,
33
40
  upsertSSREntity,
34
41
  write
35
- } from "./chunk-BFM34N54.js";
42
+ } from "./chunk-44X52WOJ.js";
36
43
  import {
37
44
  resolveFileCategory
38
45
  } from "./chunk-3PVYUPXK.js";
@@ -43,10 +50,10 @@ import {
43
50
  resolveReplicationServers,
44
51
  scheduleDeleteReplication,
45
52
  scheduleWriteReplication
46
- } from "./chunk-PYRUW7XN.js";
53
+ } from "./chunk-2VUZSVAS.js";
47
54
  import {
48
55
  createAsyncThunk
49
- } from "./chunk-P5L7CXOC.js";
56
+ } from "./chunk-7Z6EW7AH.js";
50
57
  import {
51
58
  getIsDesktopApp
52
59
  } from "./chunk-AGP3YSEC.js";
@@ -58,22 +65,19 @@ import {
58
65
  } from "./chunk-PXYBUFDB.js";
59
66
  import {
60
67
  buildTombstoneRecord
61
- } from "./chunk-D2MDMY2M.js";
62
- import {
63
- isSystemAdmin
64
- } from "./chunk-Y6ORVLSS.js";
68
+ } from "./chunk-BV3FLP2L.js";
65
69
  import {
66
70
  asRecordOrEmpty
67
71
  } from "./chunk-KX6YBIHG.js";
68
72
  import {
69
73
  isAbortError
70
74
  } from "./chunk-7DPNBQSV.js";
75
+ import {
76
+ isSystemAdmin
77
+ } from "./chunk-7ET2U67U.js";
71
78
  import {
72
79
  extractUserId
73
80
  } from "./chunk-M2EJHDJP.js";
74
- import {
75
- isRecord
76
- } from "./chunk-KUG52IAP.js";
77
81
  import {
78
82
  SEPARATOR,
79
83
  createKey,
@@ -83,28 +87,31 @@ import {
83
87
  metaKey,
84
88
  rowKey,
85
89
  splitKey
86
- } from "./chunk-JY5NGFFH.js";
90
+ } from "./chunk-SYTHYBMI.js";
87
91
  import {
88
92
  ulid
89
- } from "./chunk-XJWWBO34.js";
93
+ } from "./chunk-OJKUU3LP.js";
90
94
  import {
91
95
  asTrimmedNonEmptyStringArray
92
96
  } from "./chunk-I42VC5KR.js";
97
+ import {
98
+ asTrimmedString
99
+ } from "./chunk-3EUW3WEO.js";
100
+ import {
101
+ isRecord
102
+ } from "./chunk-KUG52IAP.js";
93
103
  import {
94
104
  asOptionalPositiveFiniteNumber
95
105
  } from "./chunk-U6VC4MU4.js";
96
106
  import {
97
107
  asOptionalFiniteNumber
98
108
  } from "./chunk-WWC7I6TA.js";
99
- import {
100
- asTrimmedString
101
- } from "./chunk-3EUW3WEO.js";
102
109
  import {
103
110
  asOptionalTrimmedString
104
111
  } from "./chunk-G3SUCT4W.js";
105
112
  import {
106
113
  __toESM
107
- } from "./chunk-4VNS5WPM.js";
114
+ } from "./chunk-U67V476Y.js";
108
115
 
109
116
  // packages/render/table/tableStore.ts
110
117
  var import_react = __toESM(require_react(), 1);
@@ -1506,11 +1513,11 @@ var ENTITY_DELETE_STRATEGIES = {
1506
1513
  await dispatch(deleteTable({ dbKey: key })).unwrap();
1507
1514
  },
1508
1515
  file: async (key, { thunkAPI }) => {
1509
- const { deleteFileAction } = await import("./deleteFile-7VQGLK2V.js");
1516
+ const { deleteFileAction } = await import("./deleteFile-Q3YDB4ML.js");
1510
1517
  await deleteFileAction(key, thunkAPI);
1511
1518
  },
1512
1519
  image: async (key, { thunkAPI }) => {
1513
- const { deleteFileAction } = await import("./deleteFile-7VQGLK2V.js");
1520
+ const { deleteFileAction } = await import("./deleteFile-Q3YDB4ML.js");
1514
1521
  await deleteFileAction(key, thunkAPI);
1515
1522
  },
1516
1523
  agent: async (key, { dispatch, userId, sourceServerOrigin }) => {
@@ -1605,8 +1612,110 @@ var deleteContentFromSpaceAction = async (input, thunkAPI) => {
1605
1612
  };
1606
1613
  };
1607
1614
 
1615
+ // packages/create/space/content/unlinkSpaceContentAction.ts
1616
+ var logger2 = createClientLogger("unlink-space-content");
1617
+ var resolveMembershipRole = (spaceId) => {
1618
+ const normalized = normalizeSpaceId(spaceId);
1619
+ const membership = getAllMemberSpaces().find(
1620
+ (space) => normalizeSpaceId(space.spaceId) === normalized
1621
+ );
1622
+ return membership ? { role: membership.role } : null;
1623
+ };
1624
+ var unlinkSpaceContentAction = async (input, thunkAPI) => {
1625
+ const { spaceId, contentKey, sourceServerOrigin } = input;
1626
+ const { dispatch, getState } = thunkAPI;
1627
+ const userId = selectIdentityUserId(getState()) ?? null;
1628
+ if (!contentKey || typeof contentKey !== "string" || !contentKey.trim()) {
1629
+ throw new Error("\u65E0\u6548\u7684\u5185\u5BB9 Key\u3002");
1630
+ }
1631
+ if (!spaceId || typeof spaceId !== "string" || !spaceId.trim()) {
1632
+ throw new Error("\u65E0\u6548\u7684\u7A7A\u95F4 ID\u3002");
1633
+ }
1634
+ const spaceKey = createSpaceKey.space(spaceId);
1635
+ const spaceData = await dispatch(
1636
+ read({ dbKey: spaceKey, preferredServerOrigin: sourceServerOrigin })
1637
+ ).unwrap();
1638
+ if (!spaceData) {
1639
+ throw new Error(`\u65E0\u6CD5\u52A0\u8F7D\u7A7A\u95F4\u6570\u636E: ${spaceId}`);
1640
+ }
1641
+ checkSpaceMembership(spaceData, userId);
1642
+ if (!canManageSpaceContent(spaceData, userId, resolveMembershipRole(spaceId))) {
1643
+ throw new Error("\u5F53\u524D\u89D2\u8272\u4E0D\u80FD\u4ECE\u7A7A\u95F4\u79FB\u9664\u5185\u5BB9");
1644
+ }
1645
+ const result = {
1646
+ spaceId,
1647
+ contentKey,
1648
+ updatedSpaceData: spaceData,
1649
+ removed: false,
1650
+ entitySpaceSync: "no-record"
1651
+ };
1652
+ if (spaceData.contents?.[contentKey]) {
1653
+ let updatedSpaceData;
1654
+ try {
1655
+ updatedSpaceData = await dispatch(
1656
+ patch({
1657
+ dbKey: spaceKey,
1658
+ changes: {
1659
+ contents: { [contentKey]: null },
1660
+ updatedAt: Date.now(),
1661
+ ...localSpaceAuthorityPatchStamp(spaceData)
1662
+ }
1663
+ })
1664
+ ).unwrap();
1665
+ } catch (patchError) {
1666
+ throw new Error(
1667
+ `\u4ECE\u7A7A\u95F4\u79FB\u9664\u5F15\u7528\u5931\u8D25: ${patchError?.message || "\u672A\u77E5\u9519\u8BEF"}`
1668
+ );
1669
+ }
1670
+ result.removed = true;
1671
+ result.updatedSpaceData = updatedSpaceData;
1672
+ }
1673
+ const entityRead = await readContentRecordForSpaceSync(dispatch, contentKey);
1674
+ if (entityRead.status === "unreadable") {
1675
+ result.entitySpaceSync = "unreadable";
1676
+ result.error = "\u5F15\u7528\u5DF2\u4ECE\u7A7A\u95F4\u79FB\u9664\uFF0C\u4F46\u65E0\u6CD5\u8BFB\u53D6\u5185\u5BB9\u8BB0\u5F55\uFF0C\u5F52\u5C5E\u7A7A\u95F4\u672A\u5BF9\u9F50\uFF08\u53EF\u91CD\u8BD5\uFF09";
1677
+ notifyUserDataUpdated();
1678
+ return result;
1679
+ }
1680
+ if (entityRead.status === "missing") {
1681
+ result.entitySpaceSync = "no-record";
1682
+ notifyUserDataUpdated();
1683
+ return result;
1684
+ }
1685
+ const record = entityRead.record;
1686
+ const ownerRaw = typeof record.userId === "string" ? record.userId : typeof record.ownerId === "string" ? record.ownerId : "";
1687
+ const owner = ownerRaw.trim();
1688
+ const ownsRecord = Boolean(owner) && (owner === userId || owner === "local");
1689
+ if (!ownsRecord) {
1690
+ result.entitySpaceSync = "skipped-not-owner";
1691
+ notifyUserDataUpdated();
1692
+ return result;
1693
+ }
1694
+ const currentSpaceId = typeof record.spaceId === "string" ? normalizeSpaceId(record.spaceId) : null;
1695
+ if (currentSpaceId !== normalizeSpaceId(spaceId)) {
1696
+ result.entitySpaceSync = "skipped-mismatch";
1697
+ notifyUserDataUpdated();
1698
+ return result;
1699
+ }
1700
+ try {
1701
+ await dispatch(
1702
+ patch({ dbKey: contentKey, changes: { spaceId: null } })
1703
+ ).unwrap();
1704
+ result.entitySpaceSync = "cleared";
1705
+ } catch (entityPatchError) {
1706
+ result.entitySpaceSync = "failed";
1707
+ result.error = `\u5F15\u7528\u5DF2\u79FB\u9664\uFF0C\u4F46\u6E05\u7A7A\u5185\u5BB9\u5F52\u5C5E\u7A7A\u95F4\u5931\u8D25\uFF08\u53EF\u91CD\u8BD5\uFF09: ${entityPatchError?.message || "\u672A\u77E5\u9519\u8BEF"}`;
1708
+ logger2.error(
1709
+ { contentKey, spaceId, reason: entityPatchError?.message },
1710
+ "Failed to clear content spaceId after unlink"
1711
+ );
1712
+ }
1713
+ notifyUserDataUpdated();
1714
+ return result;
1715
+ };
1716
+
1608
1717
  // packages/create/space/content/moveContentAction.ts
1609
- var logger2 = createClientLogger("move-content");
1718
+ var logger3 = createClientLogger("move-content");
1610
1719
  var moveContentAction = async (input, thunkAPI) => {
1611
1720
  const {
1612
1721
  contentKey,
@@ -1618,15 +1727,15 @@ var moveContentAction = async (input, thunkAPI) => {
1618
1727
  const state3 = getState();
1619
1728
  const userId = selectIdentityUserId(state3);
1620
1729
  const now = Date.now();
1621
- logger2.info({ ...input, userId }, "Initiating moveContentAction");
1730
+ logger3.info({ ...input, userId }, "Initiating moveContentAction");
1622
1731
  if (sourceSpaceId === targetSpaceId) {
1623
- logger2.error("Source and target space IDs are the same.");
1732
+ logger3.error("Source and target space IDs are the same.");
1624
1733
  throw new Error(
1625
1734
  "\u6E90\u7A7A\u95F4\u548C\u76EE\u6807\u7A7A\u95F4\u4E0D\u80FD\u76F8\u540C\u3002\u5982\u9700\u4FEE\u6539\u5206\u7C7B\uFF0C\u8BF7\u4F7F\u7528\u66F4\u65B0\u5206\u7C7B\u64CD\u4F5C\u3002"
1626
1735
  );
1627
1736
  }
1628
1737
  if (!contentKey || typeof contentKey !== "string" || contentKey.trim() === "") {
1629
- logger2.error("Invalid contentKey provided.");
1738
+ logger3.error("Invalid contentKey provided.");
1630
1739
  throw new Error("\u65E0\u6548\u7684\u5185\u5BB9 Key\u3002");
1631
1740
  }
1632
1741
  let sourceSpaceData = null;
@@ -1634,11 +1743,15 @@ var moveContentAction = async (input, thunkAPI) => {
1634
1743
  let contentDataFromSource = null;
1635
1744
  let finalSourceData = null;
1636
1745
  let finalTargetData = null;
1746
+ let contentSpaceSync = void 0;
1747
+ let targetWritten = false;
1748
+ let sourcePruned = false;
1749
+ let resumedFromTarget = false;
1637
1750
  let overallError = void 0;
1638
1751
  try {
1639
1752
  const sourceSpaceKey = createSpaceKey.space(sourceSpaceId);
1640
1753
  const targetSpaceKey = createSpaceKey.space(targetSpaceId);
1641
- logger2.info(
1754
+ logger3.info(
1642
1755
  { sourceSpaceKey, targetSpaceKey },
1643
1756
  "Reading source and target space data."
1644
1757
  );
@@ -1664,80 +1777,119 @@ var moveContentAction = async (input, thunkAPI) => {
1664
1777
  );
1665
1778
  }
1666
1779
  targetSpaceData = targetResult.value;
1667
- logger2.info("Checking permissions for source and target spaces.");
1780
+ logger3.info("Checking permissions for source and target spaces.");
1668
1781
  checkSpaceMembership(sourceSpaceData, userId);
1669
1782
  checkSpaceMembership(targetSpaceData, userId);
1670
- if (!sourceSpaceData.contents || !sourceSpaceData.contents[contentKey]) {
1671
- logger2.error(
1672
- { contentKey, sourceSpaceId },
1673
- "Content key not found in source space contents."
1674
- );
1783
+ const sourceSpaceKeyForWrite = createSpaceKey.space(sourceSpaceId);
1784
+ const targetSpaceKeyForWrite = createSpaceKey.space(targetSpaceId);
1785
+ const sourceHasLink = Boolean(sourceSpaceData.contents?.[contentKey]);
1786
+ const targetHasLink = Boolean(targetSpaceData.contents?.[contentKey]);
1787
+ if (!sourceHasLink && !targetHasLink) {
1675
1788
  throw new Error(
1676
- `\u5185\u5BB9 (${contentKey}) \u4E0D\u5728\u6E90\u7A7A\u95F4 (${sourceSpaceId}) \u4E2D\u3002`
1789
+ `\u5185\u5BB9 (${contentKey}) \u65E2\u4E0D\u5728\u6E90\u7A7A\u95F4 (${sourceSpaceId}) \u4E5F\u4E0D\u5728\u76EE\u6807\u7A7A\u95F4 (${targetSpaceId}) \u4E2D\u3002`
1677
1790
  );
1678
1791
  }
1679
- contentDataFromSource = sourceSpaceData.contents[contentKey];
1680
- if (targetSpaceData.contents && targetSpaceData.contents[contentKey]) {
1681
- logger2.warn(
1682
- { contentKey, targetSpaceId },
1683
- "Content key already exists in target space. Overwriting."
1792
+ contentDataFromSource = sourceSpaceData.contents?.[contentKey] ?? null;
1793
+ resumedFromTarget = !sourceHasLink && targetHasLink;
1794
+ if (resumedFromTarget) {
1795
+ logger3.info(
1796
+ { contentKey, sourceSpaceId, targetSpaceId },
1797
+ "Source link already pruned and target link exists; resuming convergence (no overwrite)."
1684
1798
  );
1685
1799
  }
1686
1800
  let categoryIdForTargetStorage;
1687
- if (rawTargetCategoryId && rawTargetCategoryId !== "" && rawTargetCategoryId !== UNCATEGORIZED_ID) {
1688
- if (targetSpaceData.categories?.[rawTargetCategoryId]) {
1689
- categoryIdForTargetStorage = rawTargetCategoryId;
1690
- } else {
1691
- logger2.warn(
1692
- `Target category ${rawTargetCategoryId} not found in target space ${targetSpaceId}. Content will be uncategorized.`
1801
+ if (!targetHasLink) {
1802
+ if (rawTargetCategoryId && rawTargetCategoryId !== "" && rawTargetCategoryId !== UNCATEGORIZED_ID) {
1803
+ if (targetSpaceData.categories?.[rawTargetCategoryId]) {
1804
+ categoryIdForTargetStorage = rawTargetCategoryId;
1805
+ } else {
1806
+ logger3.warn(
1807
+ `Target category ${rawTargetCategoryId} not found in target space ${targetSpaceId}. Content will be uncategorized.`
1808
+ );
1809
+ categoryIdForTargetStorage = void 0;
1810
+ }
1811
+ }
1812
+ }
1813
+ if (!targetHasLink) {
1814
+ if (!contentDataFromSource) {
1815
+ throw new Error(`\u5185\u5BB9 (${contentKey}) \u5728\u6E90\u7A7A\u95F4\u4E2D\u6CA1\u6709\u53EF\u8FC1\u79FB\u7684\u5F15\u7528\u6570\u636E\u3002`);
1816
+ }
1817
+ const contentReferenceForTarget = {
1818
+ ...contentDataFromSource,
1819
+ updatedAt: now
1820
+ };
1821
+ delete contentReferenceForTarget.categoryId;
1822
+ if (categoryIdForTargetStorage !== void 0) {
1823
+ contentReferenceForTarget.categoryId = categoryIdForTargetStorage;
1824
+ }
1825
+ try {
1826
+ await dispatch(
1827
+ patch({
1828
+ dbKey: targetSpaceKeyForWrite,
1829
+ changes: {
1830
+ contents: { [contentKey]: contentReferenceForTarget },
1831
+ updatedAt: now,
1832
+ ...localSpaceAuthorityPatchStamp(targetSpaceData)
1833
+ }
1834
+ })
1835
+ ).unwrap();
1836
+ } catch (targetPatchError) {
1837
+ throw new Error(
1838
+ `\u76EE\u6807\u7A7A\u95F4\u5199\u5165\u5931\u8D25\uFF0C\u6E90\u7A7A\u95F4\u5F15\u7528\u5DF2\u4FDD\u7559\uFF08\u53EF\u91CD\u8BD5\uFF09: ${targetPatchError?.message || "\u672A\u77E5\u9519\u8BEF"}`
1693
1839
  );
1694
- categoryIdForTargetStorage = void 0;
1695
1840
  }
1696
- } else {
1697
- categoryIdForTargetStorage = void 0;
1841
+ targetWritten = true;
1842
+ logger3.info("Target reference written (target-first).");
1698
1843
  }
1699
- const contentReferenceForTarget = {
1700
- ...contentDataFromSource,
1701
- updatedAt: now
1702
- };
1703
- delete contentReferenceForTarget.categoryId;
1704
- if (categoryIdForTargetStorage !== void 0) {
1705
- contentReferenceForTarget.categoryId = categoryIdForTargetStorage;
1844
+ try {
1845
+ contentSpaceSync = await syncContentRecordSpaceId(
1846
+ dispatch,
1847
+ contentKey,
1848
+ targetSpaceId,
1849
+ "\u5185\u5BB9\u5DF2\u8FC1\u79FB\u5230\u76EE\u6807\u7A7A\u95F4\uFF0C\u4F46\u540C\u6B65\u5185\u5BB9\u8BB0\u5F55\u7684\u5F52\u5C5E\u7A7A\u95F4\u5931\u8D25",
1850
+ {
1851
+ actorUserId: userId,
1852
+ targetSpaceIsDeviceLocal: isDeviceLocalSpaceBody(sourceSpaceData) || isDeviceLocalSpaceBody(targetSpaceData)
1853
+ }
1854
+ );
1855
+ } catch (entitySyncError) {
1856
+ throw new Error(
1857
+ `${entitySyncError?.message || "\u540C\u6B65\u5185\u5BB9\u8BB0\u5F55\u5931\u8D25"}\uFF08\u76EE\u6807\u7A7A\u95F4\u5DF2\u5199\u5165\uFF0C\u6E90\u7A7A\u95F4\u5F15\u7528\u5DF2\u4FDD\u7559\uFF0C\u53EF\u91CD\u8BD5\uFF09`
1858
+ );
1706
1859
  }
1707
- const sourcePatchChanges = {
1708
- contents: {
1709
- [contentKey]: null
1710
- // 从源移除引用 (null value in patch typically means delete key)
1711
- },
1712
- updatedAt: now,
1713
- ...localSpaceAuthorityPatchStamp(sourceSpaceData)
1714
- };
1715
- const targetPatchChanges = {
1716
- contents: {
1717
- [contentKey]: contentReferenceForTarget
1718
- // 向目标添加(或覆盖)引用
1719
- },
1720
- updatedAt: now,
1721
- ...localSpaceAuthorityPatchStamp(targetSpaceData)
1722
- };
1723
- logger2.info("Patching source and target space data.");
1724
- await Promise.all([
1725
- dispatch(
1726
- patch({ dbKey: sourceSpaceKey, changes: sourcePatchChanges })
1727
- ).unwrap(),
1728
- dispatch(
1729
- patch({ dbKey: targetSpaceKey, changes: targetPatchChanges })
1730
- ).unwrap()
1731
- ]);
1732
- logger2.info("Successfully patched both source and target spaces.");
1860
+ if (contentSpaceSync === "unreadable") {
1861
+ throw new Error(
1862
+ "\u65E0\u6CD5\u8BFB\u53D6\u5185\u5BB9\u8BB0\u5F55\u786E\u8BA4\u5F52\u5C5E\u7A7A\u95F4\u540C\u6B65\uFF08\u76EE\u6807\u7A7A\u95F4\u5DF2\u5199\u5165\uFF0C\u6E90\u7A7A\u95F4\u5F15\u7528\u5DF2\u4FDD\u7559\uFF0C\u53EF\u91CD\u8BD5\uFF09"
1863
+ );
1864
+ }
1865
+ if (sourceHasLink) {
1866
+ try {
1867
+ await dispatch(
1868
+ patch({
1869
+ dbKey: sourceSpaceKeyForWrite,
1870
+ changes: {
1871
+ contents: { [contentKey]: null },
1872
+ updatedAt: now,
1873
+ ...localSpaceAuthorityPatchStamp(sourceSpaceData)
1874
+ }
1875
+ })
1876
+ ).unwrap();
1877
+ } catch (sourcePatchError) {
1878
+ throw new Error(
1879
+ `\u5185\u5BB9\u5DF2\u5199\u5165\u76EE\u6807\u7A7A\u95F4\uFF0C\u4F46\u4ECE\u6E90\u7A7A\u95F4\u79FB\u9664\u5F15\u7528\u5931\u8D25\uFF08\u53EF\u91CD\u8BD5\uFF09: ${sourcePatchError?.message || "\u672A\u77E5\u9519\u8BEF"}`
1880
+ );
1881
+ }
1882
+ }
1883
+ sourcePruned = true;
1884
+ logger3.info("Source reference pruned; move converged.");
1733
1885
  } catch (error) {
1734
- logger2.error(
1886
+ logger3.error(
1735
1887
  { error: error.message, stack: error.stack },
1736
1888
  "Error during move content action execution."
1737
1889
  );
1738
1890
  overallError = error.message || "\u79FB\u52A8\u5185\u5BB9\u65F6\u53D1\u751F\u672A\u77E5\u9519\u8BEF";
1739
1891
  } finally {
1740
- logger2.info("Attempting to re-read final space data.");
1892
+ logger3.info("Attempting to re-read final space data.");
1741
1893
  const sourceSpaceKey = createSpaceKey.space(sourceSpaceId);
1742
1894
  const targetSpaceKey = createSpaceKey.space(targetSpaceId);
1743
1895
  const [finalSourceResult, finalTargetResult] = await Promise.allSettled([
@@ -1751,7 +1903,7 @@ var moveContentAction = async (input, thunkAPI) => {
1751
1903
  if (finalSourceResult.status === "fulfilled") {
1752
1904
  finalSourceData = finalSourceResult.value;
1753
1905
  } else {
1754
- logger2.error(
1906
+ logger3.error(
1755
1907
  { sourceSpaceId, reason: finalSourceResult.reason },
1756
1908
  "Failed to re-read final source space data."
1757
1909
  );
@@ -1759,24 +1911,33 @@ var moveContentAction = async (input, thunkAPI) => {
1759
1911
  if (finalTargetResult.status === "fulfilled") {
1760
1912
  finalTargetData = finalTargetResult.value;
1761
1913
  } else {
1762
- logger2.error(
1914
+ logger3.error(
1763
1915
  { targetSpaceId, reason: finalTargetResult.reason },
1764
1916
  "Failed to re-read final target space data."
1765
1917
  );
1766
1918
  }
1767
- logger2.info(
1919
+ logger3.info(
1768
1920
  {
1769
1921
  hasError: !!overallError,
1770
1922
  sourceReadSuccess: !!finalSourceData,
1771
- targetReadSuccess: !!finalTargetData
1923
+ targetReadSuccess: !!finalTargetData,
1924
+ targetWritten,
1925
+ sourcePruned,
1926
+ resumedFromTarget,
1927
+ contentSpaceSync
1772
1928
  },
1773
1929
  "Move content action finished."
1774
1930
  );
1931
+ notifyUserDataUpdated();
1775
1932
  const result = {
1776
1933
  sourceSpaceId,
1777
1934
  updatedSourceSpaceData: finalSourceData,
1778
1935
  targetSpaceId,
1779
1936
  updatedTargetSpaceData: finalTargetData,
1937
+ contentSpaceSync,
1938
+ targetWritten,
1939
+ sourcePruned,
1940
+ resumedFromTarget,
1780
1941
  error: overallError
1781
1942
  // 如果过程中有错误,则传递错误信息
1782
1943
  };
@@ -1784,62 +1945,6 @@ var moveContentAction = async (input, thunkAPI) => {
1784
1945
  }
1785
1946
  };
1786
1947
 
1787
- // packages/create/space/content/spaceContentPatch.ts
1788
- var notifyUserDataUpdated = () => {
1789
- if (typeof window !== "undefined" && typeof window.dispatchEvent === "function" && typeof window.Event === "function") {
1790
- window.dispatchEvent(new window.Event("nolo-user-data-updated"));
1791
- }
1792
- };
1793
- var loadSpaceContentOrThrow = async (dispatch, spaceId, contentKey, sourceServerOrigin) => {
1794
- if (!contentKey || typeof contentKey !== "string" || contentKey.trim() === "") {
1795
- throw new Error("Invalid contentKey provided.");
1796
- }
1797
- const spaceKey = createSpaceKey.space(spaceId);
1798
- let spaceData = null;
1799
- try {
1800
- spaceData = await dispatch(
1801
- read({ dbKey: spaceKey, preferredServerOrigin: sourceServerOrigin })
1802
- ).unwrap();
1803
- } catch (readError) {
1804
- throw new Error(`\u65E0\u6CD5\u52A0\u8F7D\u7A7A\u95F4\u6570\u636E: ${spaceId}`);
1805
- }
1806
- if (!spaceData) {
1807
- throw new Error("Space not found");
1808
- }
1809
- const content = spaceData.contents?.[contentKey];
1810
- if (!content) {
1811
- throw new Error("Content not found in space");
1812
- }
1813
- return { spaceKey, spaceData, content };
1814
- };
1815
- var patchIndividualContentRecord = async (dispatch, contentKey, changes, sourceServerOrigin, failMessagePrefix) => {
1816
- let hasIndividualRecord = false;
1817
- try {
1818
- const existing = await dispatch(
1819
- read({ dbKey: contentKey, preferredServerOrigin: sourceServerOrigin })
1820
- ).unwrap();
1821
- hasIndividualRecord = Boolean(existing);
1822
- } catch {
1823
- hasIndividualRecord = false;
1824
- }
1825
- if (hasIndividualRecord) {
1826
- try {
1827
- await dispatch(
1828
- patch({
1829
- dbKey: contentKey,
1830
- changes,
1831
- preferredServerOrigin: sourceServerOrigin
1832
- })
1833
- ).unwrap();
1834
- notifyUserDataUpdated();
1835
- } catch (contentPatchError) {
1836
- throw new Error(
1837
- `${failMessagePrefix}: ${contentPatchError?.message || "\u672A\u77E5\u9519\u8BEF"}`
1838
- );
1839
- }
1840
- }
1841
- };
1842
-
1843
1948
  // packages/create/space/content/updateContentTitleAction.ts
1844
1949
  var buildContentRecordTitleChanges = (content, title, updatedAt) => {
1845
1950
  const changes = { title, updatedAt };
@@ -2067,17 +2172,17 @@ var updateContentCategoryAction = async (input, thunkAPI) => {
2067
2172
  };
2068
2173
 
2069
2174
  // packages/create/space/content/deleteMultipleContentAction.ts
2070
- var logger3 = createClientLogger("delete-multiple-content");
2175
+ var logger4 = createClientLogger("delete-multiple-content");
2071
2176
  var deleteMultipleContentAction = async (input, thunkAPI) => {
2072
2177
  const { contentKeys, spaceId } = input;
2073
2178
  if (!contentKeys || contentKeys.length === 0) {
2074
- logger3.warn("deleteMultipleContentAction called with no contentKeys.");
2179
+ logger4.warn("deleteMultipleContentAction called with no contentKeys.");
2075
2180
  return { spaceId, updatedSpaceData: null };
2076
2181
  }
2077
2182
  const { dispatch, getState } = thunkAPI;
2078
2183
  const state3 = getState();
2079
2184
  const userId = selectIdentityUserId(state3);
2080
- logger3.info(
2185
+ logger4.info(
2081
2186
  { count: contentKeys.length, spaceId, userId },
2082
2187
  "Initiating deleteMultipleContentAction"
2083
2188
  );
@@ -2088,11 +2193,11 @@ var deleteMultipleContentAction = async (input, thunkAPI) => {
2088
2193
  })
2089
2194
  ).unwrap();
2090
2195
  if (!spaceData) {
2091
- logger3.error({ spaceKey }, "Space data not found for batch delete");
2196
+ logger4.error({ spaceKey }, "Space data not found for batch delete");
2092
2197
  throw new Error("\u7A7A\u95F4\u4E0D\u5B58\u5728");
2093
2198
  }
2094
2199
  if (!userId || !spaceData.members.includes(userId)) {
2095
- logger3.warn({ userId, spaceId }, "Unauthorized attempt for batch delete");
2200
+ logger4.warn({ userId, spaceId }, "Unauthorized attempt for batch delete");
2096
2201
  throw new Error("\u65E0\u6743\u4FEE\u6539\u6B64\u7A7A\u95F4");
2097
2202
  }
2098
2203
  const changes = {
@@ -2106,12 +2211,12 @@ var deleteMultipleContentAction = async (input, thunkAPI) => {
2106
2211
  };
2107
2212
  try {
2108
2213
  await dispatch(patch({ dbKey: spaceKey, changes })).unwrap();
2109
- logger3.info(
2214
+ logger4.info(
2110
2215
  { spaceKey, count: contentKeys.length },
2111
2216
  "Successfully batched patch to remove content references"
2112
2217
  );
2113
2218
  } catch (patchError) {
2114
- logger3.error(
2219
+ logger4.error(
2115
2220
  { error: patchError, spaceKey },
2116
2221
  "Failed to batch patch space data. Aborting."
2117
2222
  );
@@ -2123,9 +2228,9 @@ var deleteMultipleContentAction = async (input, thunkAPI) => {
2123
2228
  const results = await Promise.allSettled(removePromises);
2124
2229
  results.forEach((result, index) => {
2125
2230
  if (result.status === "fulfilled") {
2126
- logger3.info({ contentKey: contentKeys[index] }, "Entity removed");
2231
+ logger4.info({ contentKey: contentKeys[index] }, "Entity removed");
2127
2232
  } else {
2128
- logger3.error(
2233
+ logger4.error(
2129
2234
  { contentKey: contentKeys[index], error: result.reason },
2130
2235
  "Failed to remove an entity"
2131
2236
  );
@@ -2136,7 +2241,7 @@ var deleteMultipleContentAction = async (input, thunkAPI) => {
2136
2241
  dbKey: spaceKey
2137
2242
  })
2138
2243
  ).unwrap();
2139
- logger3.info({ spaceId }, "Finished batch delete and refetched space data.");
2244
+ logger4.info({ spaceId }, "Finished batch delete and refetched space data.");
2140
2245
  return {
2141
2246
  spaceId,
2142
2247
  updatedSpaceData: finalSpaceData
@@ -2579,6 +2684,22 @@ var moveContentToSpace = createAsyncThunk(
2579
2684
  if (getCurrentSpaceIdRaw() === targetSpaceId && updatedTargetSpaceData) {
2580
2685
  updateCurrentSpaceIfMatch(targetSpaceId, updatedTargetSpaceData);
2581
2686
  }
2687
+ if (payload.error) {
2688
+ throw new Error(payload.error);
2689
+ }
2690
+ return payload;
2691
+ }
2692
+ );
2693
+ var unlinkSpaceContent = createAsyncThunk(
2694
+ "space/unlinkSpaceContent",
2695
+ async (arg, thunkAPI) => {
2696
+ const payload = await unlinkSpaceContentAction(arg, thunkAPI);
2697
+ if (payload.updatedSpaceData && getCurrentSpaceIdRaw() === payload.spaceId) {
2698
+ updateCurrentSpaceIfMatch(payload.spaceId, payload.updatedSpaceData);
2699
+ }
2700
+ if (payload.error) {
2701
+ throw new Error(payload.error);
2702
+ }
2582
2703
  return payload;
2583
2704
  }
2584
2705
  );
@@ -2687,6 +2808,7 @@ export {
2687
2808
  expandCategoryInCollapsed,
2688
2809
  addContentToSpace,
2689
2810
  moveContentToSpace,
2811
+ unlinkSpaceContent,
2690
2812
  deleteContentFromSpace,
2691
2813
  deleteMultipleContent,
2692
2814
  uploadAndAddFileToSpace,