nolo-cli 0.106.0-alpha.1 → 0.106.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 (210) hide show
  1. package/README.md +1 -1
  2. package/{_executeModel-C5ZUOC7O.js → _executeModel-EP6HAX3W.js} +77 -69
  3. package/action-GVA5ARSJ.js +20 -0
  4. package/{addContentAction-O7R66HEX.js → addContentAction-NZZNAVCB.js} +13 -12
  5. package/{addDialogAgentAction-74OA7KYP.js → addDialogAgentAction-5HVGEIXI.js} +19 -20
  6. package/{agentDeleteCommand-YB3S2LPY.js → agentDeleteCommand-M25A6UGB.js} +118 -43
  7. package/{agentEmailCommands-YBCBTG6X.js → agentEmailCommands-RUL4NL64.js} +99 -89
  8. package/agentListCommands-KSPFKHFO.js +741 -0
  9. package/{agentMachineCommands-QHYLBTVW.js → agentMachineCommands-IHBB6PHD.js} +48 -44
  10. package/{agentProviderCommands-GNPTL5XR.js → agentProviderCommands-ND4S2Q6Q.js} +97 -2
  11. package/{agentPullCommand-O5MPVJ5E.js → agentPullCommand-B4T2DJ5H.js} +1 -1
  12. package/agentRecordCommands-7OKIBN6H.js +138 -0
  13. package/agentRunCommand-GBKJTQQU.js +167 -0
  14. package/{agentRunControl-AVJR4JW4.js → agentRunControl-3HWA2LLQ.js} +2 -2
  15. package/{agentRuntimeLocal-FRUE5P2V.js → agentRuntimeLocal-E5HXZNXZ.js} +44 -40
  16. package/{agentSlice-7OEXULAY.js → agentSlice-7T3ZLYET.js} +15 -14
  17. package/{appDeleteCommands-JPWTSFID.js → appDeleteCommands-TTJUYTQN.js} +46 -42
  18. package/{appDeployCommands-YCVY2UYO.js → appDeployCommands-65WYK2TQ.js} +46 -42
  19. package/{appDeployStatusCommands-JMCEIKTI.js → appDeployStatusCommands-U4XESYYG.js} +46 -42
  20. package/{appGetCommands-EXWT3QAE.js → appGetCommands-VNHZZC4D.js} +46 -42
  21. package/{appListCommands-PKRLSWRE.js → appListCommands-O667ZEU6.js} +46 -42
  22. package/{authCommand-F4EFRRX6.js → authCommand-SUHHTVHA.js} +118 -24
  23. package/{authCommands-RGOGCPP6.js → authCommands-5RTUDYZW.js} +7 -5
  24. package/{builtinSkillRegistry-FUAVTRVZ.js → builtinSkillRegistry-PUGT65WS.js} +11 -9
  25. package/{chromeCommands-FZYAU75D.js → chromeCommands-AU5ZJXBG.js} +289 -37
  26. package/{chromeOpsCommands-62P2Q2YB.js → chromeOpsCommands-ZYTCMNHG.js} +156 -22
  27. package/{chunk-ZNV445LB.js → chunk-2NGKYC3L.js} +29 -9
  28. package/{chunk-JEDZAO7L.js → chunk-2SYTUTLI.js} +257 -37
  29. package/{chunk-HVURBGF3.js → chunk-2U3NHADM.js} +6 -6
  30. package/{chunk-XA2FJW4L.js → chunk-3SXZ6SUC.js} +11 -9
  31. package/{chunk-UKZDAFYT.js → chunk-3VKDWQMJ.js} +6 -10
  32. package/chunk-4LCOCOR5.js +50 -0
  33. package/{chunk-JPGCXHNM.js → chunk-4LKMZ3RR.js} +1 -1
  34. package/{chunk-PQFHGD77.js → chunk-4VDS344D.js} +161 -14
  35. package/{chunk-2GRGFCF6.js → chunk-4VJAC32I.js} +2 -1
  36. package/{chunk-6D6VBVEW.js → chunk-4W24JM32.js} +80 -14
  37. package/{chunk-MC4XLIJ7.js → chunk-523DITKR.js} +1 -1
  38. package/{chunk-GQBOR3G6.js → chunk-5F7UKMLN.js} +8 -4
  39. package/{chunk-E4MARS3Q.js → chunk-5GVBDNTO.js} +1 -1
  40. package/chunk-5MMAK75Q.js +15 -0
  41. package/{chunk-7S4YWN7P.js → chunk-5UUIGN6I.js} +4 -4
  42. package/{chunk-42V6BK2E.js → chunk-62IL3KQV.js} +4 -34
  43. package/{chunk-YCJN2RA3.js → chunk-6AIURTE7.js} +20 -11
  44. package/{chunk-VLTIYV3X.js → chunk-7I25CBT5.js} +34 -8
  45. package/chunk-AGIM7IMJ.js +147 -0
  46. package/{chunk-S4VLC46A.js → chunk-AM4G3LDJ.js} +66 -54
  47. package/{chunk-5UTFL4QJ.js → chunk-AOTBKDRK.js} +7 -0
  48. package/{chunk-TJGWNDGO.js → chunk-AZB6HR4I.js} +846 -276
  49. package/{chunk-L5UXH3B2.js → chunk-BIH7KCDJ.js} +58 -9
  50. package/{chunk-UZGQNTVW.js → chunk-BPLIXNC6.js} +8 -6
  51. package/chunk-CEQ75WPL.js +915 -0
  52. package/chunk-CHOZJMJS.js +78 -0
  53. package/{chunk-GBRG75BQ.js → chunk-D2MDMY2M.js} +1 -0
  54. package/{chunk-GPCZ7UXG.js → chunk-DBKRC5O2.js} +1 -1
  55. package/chunk-DJ3JABG5.js +7990 -0
  56. package/{chunk-Q554LLSI.js → chunk-DMXLXZKL.js} +1 -1
  57. package/{chunk-UOBDA2JS.js → chunk-DSXRVBTA.js} +118 -90
  58. package/{chunk-3VNWWVKB.js → chunk-E3YWHWCR.js} +50 -18
  59. package/{chunk-HJUYAD4A.js → chunk-EBS4FKW4.js} +5 -5
  60. package/{chunk-LC43IGO4.js → chunk-EHGIEGLI.js} +834 -962
  61. package/{chunk-ABQYVJBJ.js → chunk-EV235ILT.js} +5 -5
  62. package/{chunk-TRV2MIDW.js → chunk-EXAJ6DCR.js} +1 -0
  63. package/{chunk-TOP2VXOR.js → chunk-FJKZSR5P.js} +5 -5
  64. package/{chunk-2F7RJC6L.js → chunk-FOXQ7BAB.js} +1 -1
  65. package/{chunk-SH43IESU.js → chunk-GGC55Q32.js} +199 -29
  66. package/{chunk-ZCYXJSTU.js → chunk-GMP3NBAA.js} +65 -95
  67. package/chunk-GMZLP5DV.js +82 -0
  68. package/{chunk-OIVSQH2O.js → chunk-GU7DC2TD.js} +300 -5
  69. package/{chunk-FDTR4QJ6.js → chunk-H6A6X4EK.js} +32 -1
  70. package/{chunk-DVINR3PL.js → chunk-HDLLCBRF.js} +1 -1
  71. package/{chunk-QOKAKDPE.js → chunk-HIM3FCLF.js} +0 -1
  72. package/{chunk-RJXZDT2P.js → chunk-HNA5KV37.js} +23 -28
  73. package/{chunk-ONXOABJR.js → chunk-HNGRBWYF.js} +3 -0
  74. package/{chunk-ACTMNVHM.js → chunk-I5YMDACN.js} +1 -1
  75. package/{chunk-O6OSWFZQ.js → chunk-IHPDK6UD.js} +6 -0
  76. package/{chunk-QDSINZM3.js → chunk-IXH3HKY2.js} +1 -22
  77. package/{chunk-Q67DOFOO.js → chunk-IYIXAIEB.js} +199 -92
  78. package/{chunk-BP4XNZRM.js → chunk-JIXGJTBU.js} +4 -4
  79. package/{chunk-OEVAY4J6.js → chunk-JWNBEIME.js} +18 -20
  80. package/{chunk-Z77CRGTW.js → chunk-KA5O5KQL.js} +1 -1
  81. package/{chunk-JZL6EHZR.js → chunk-LGWABBTZ.js} +47 -67
  82. package/{chunk-LS2ZANRJ.js → chunk-LOCNXNOU.js} +1 -1
  83. package/{chunk-GEPUP7OO.js → chunk-LOPP5VT6.js} +3 -3
  84. package/{chunk-DHDMC6FO.js → chunk-LUBFABMJ.js} +15 -14
  85. package/chunk-LWLNLZC5.js +265 -0
  86. package/{chunk-BNGW5ASC.js → chunk-LYLO5U3H.js} +15 -2
  87. package/{chunk-4OEFYTWL.js → chunk-MJ3CRU77.js} +85 -50
  88. package/{chunk-BFU6C242.js → chunk-NMFV26UG.js} +1 -1
  89. package/{chunk-NA35QHCF.js → chunk-NTNKA5VL.js} +1 -1
  90. package/{chunk-FZGV4FGK.js → chunk-NUHHBEJC.js} +378 -187
  91. package/chunk-NWENLDMM.js +42 -0
  92. package/chunk-O7SVKKLY.js +875 -0
  93. package/{chunk-FM2YTE6D.js → chunk-OAXBDMT7.js} +1 -1
  94. package/chunk-OCZKATRC.js +129 -0
  95. package/{chunk-EYAQT56M.js → chunk-ODTBO4W6.js} +9 -6
  96. package/{chunk-VMFTFOWF.js → chunk-OKGVNZTL.js} +35 -8
  97. package/{chunk-EEGDMATE.js → chunk-OQ5IVGCV.js} +86 -81
  98. package/{chunk-KQHGZWSV.js → chunk-OXME3PEE.js} +1 -1
  99. package/{chunk-KQ4ONNQD.js → chunk-OYTWDOQV.js} +155 -8
  100. package/{chunk-JRQFUXY7.js → chunk-OZ2IIIRP.js} +99 -22
  101. package/{chunk-WV42OMV7.js → chunk-PFLF4R4E.js} +8 -8
  102. package/{chunk-J4MOO56S.js → chunk-QDH32WF5.js} +10 -2
  103. package/{chunk-3DII57IT.js → chunk-QVAWUJAJ.js} +1 -1
  104. package/{chunk-3BMYXEUW.js → chunk-R5AJODNI.js} +1 -1
  105. package/{chunk-6OZ36FXI.js → chunk-SJ7CUF65.js} +22 -4
  106. package/{chunk-IIVGDG4I.js → chunk-SJKULPGX.js} +13 -7
  107. package/{chunk-ETI2NYVF.js → chunk-SYEBIZOF.js} +4 -4
  108. package/{chunk-J3WULTWA.js → chunk-TLKXNTQJ.js} +19 -17
  109. package/chunk-TLYSGGPG.js +15 -0
  110. package/{chunk-BYMV6QZG.js → chunk-TNIX77YM.js} +4 -0
  111. package/chunk-TY3TIUJK.js +89 -0
  112. package/{chunk-I3TQJXQ7.js → chunk-U3C3IA32.js} +9 -2
  113. package/{chunk-YYLHWIW6.js → chunk-UKZX3NHN.js} +1 -1
  114. package/chunk-UM7TA3K4.js +1008 -0
  115. package/{chunk-6YTOJY35.js → chunk-VBG7GWWR.js} +253 -8
  116. package/chunk-VBQGO5NX.js +164 -0
  117. package/chunk-VIWDGTDA.js +8 -0
  118. package/chunk-VJVNU77E.js +83 -0
  119. package/{chunk-UKWGR5SS.js → chunk-VY6VFGKR.js} +194 -1144
  120. package/chunk-VYKXIHRP.js +13692 -0
  121. package/chunk-VZLO4XJD.js +17 -0
  122. package/{chunk-DNCEALKX.js → chunk-WMWYWYK2.js} +22 -29
  123. package/{chunk-H56FOERC.js → chunk-XDQ7PHU3.js} +567 -684
  124. package/{chunk-AEOE4Z6Q.js → chunk-XGOHDYM2.js} +39 -15
  125. package/{chunk-53HEEOTT.js → chunk-XLWMNFBZ.js} +83 -16
  126. package/{chunk-V4MJDUSR.js → chunk-YFU5EELM.js} +2 -2
  127. package/{chunk-IUTWFZOX.js → chunk-YQFLBS6A.js} +68 -46
  128. package/chunk-YV25TM3R.js +780 -0
  129. package/chunk-ZRAU6T47.js +56 -0
  130. package/{chunk-5H7KJX7J.js → chunk-ZVGXD7UJ.js} +5 -5
  131. package/{chunk-H62HCIUP.js → chunk-ZYM73IHG.js} +36 -22
  132. package/commandRegistry-6QIAUQDS.js +833 -0
  133. package/{contentThunks-AZVYDLM4.js → contentThunks-5DDMUQ7B.js} +39 -36
  134. package/{cooldownCommands-REAWYVTY.js → cooldownCommands-ZLEPIB4A.js} +2 -2
  135. package/{createAgentAutomationAction-V55DNYCE.js → createAgentAutomationAction-NQ6AZM42.js} +40 -37
  136. package/createDialogAction-QZ6X4A7O.js +70 -0
  137. package/{createPageAction-I3HH23O3.js → createPageAction-NCGEJBVK.js} +47 -43
  138. package/{chunk-GDNQO3QR.js → cursorProvider-YGGNMVWX.js} +2751 -10172
  139. package/{dbSlice-XVWBAGYN.js → dbSlice-RCZ7NRAF.js} +12 -11
  140. package/{deleteFile-YG6QMJLU.js → deleteFile-KESP65GC.js} +7 -6
  141. package/{dialogCommands-YVMHDEOX.js → dialogCommands-OGQLEF63.js} +49 -46
  142. package/{dialogSlice-LVJ67QWE.js → dialogSlice-GIKNUHNW.js} +57 -37
  143. package/{dist-VODFSGNG.js → dist-NJC2W7I4.js} +61 -54
  144. package/{docCreateCommands-7UTWDYJU.js → docCreateCommands-RW6LNYT6.js} +48 -44
  145. package/{docDeleteCommands-GG6BJ4PS.js → docDeleteCommands-Z742TRNY.js} +49 -45
  146. package/{docReadCommands-QHMQVSLP.js → docReadCommands-5DIGA42Y.js} +47 -43
  147. package/{docStore-UJNL6SBT.js → docStore-6GUOZH52.js} +17 -13
  148. package/{docUpdateCommands-QPL6IVUK.js → docUpdateCommands-ZFZ2QEVK.js} +48 -44
  149. package/{fetchMessages-EIU7UFFK.js → fetchMessages-3PXAHKCR.js} +5 -5
  150. package/{getPricing-LUSEABA6.js → getPricing-QVSNUFZ6.js} +4 -4
  151. package/{handleSendMessageAction-CCL7ETCL.js → handleSendMessageAction-B2VXOLMM.js} +109 -42
  152. package/index.js +87 -884
  153. package/{lib-FRRS27KN.js → lib-PU2G2MSO.js} +523 -191
  154. package/{localDialogRead-BTFJ4V2I.js → localDialogRead-UYCKO7YZ.js} +2 -2
  155. package/{localRuntimeAuthority-6IR6BBXE.js → localRuntimeAuthority-TU6OBC76.js} +9 -6
  156. package/{localRuntimeDb-SYQGUF4U.js → localRuntimeDb-VKWVOPPI.js} +1 -1
  157. package/{machineCommands-2QNINBNI.js → machineCommands-AI3N7JHQ.js} +93 -83
  158. package/machineWsRunDispatch-RPF2D6VV.js +154 -0
  159. package/{memberThunks-QGFLFVCI.js → memberThunks-YICJI4IS.js} +20 -18
  160. package/{models-T3SG6MJ5.js → models-FTNFVO3D.js} +2 -2
  161. package/oauthTokenStore-ITEB663N.js +23 -0
  162. package/package.json +1 -1
  163. package/pdf-U6KSUEZZ.js +26435 -0
  164. package/processSpawn-SOAV3FEV.js +11 -0
  165. package/profileConfig-ZGOFORWV.js +43 -0
  166. package/{providerPresetApply-FG6NZ57W.js → providerPresetApply-OJJXQ7NM.js} +7 -7
  167. package/{providerRegistry-757OWH3O.js → providerRegistry-DXFBDCGQ.js} +11 -7
  168. package/{read-COE3ZYR6.js → read-XMBM52Y4.js} +8 -7
  169. package/{readDocTool-5USN4A6V.js → readDocTool-LAQHKCVT.js} +5 -3
  170. package/{readlineWorkspace-4GULS23D.js → readlineWorkspace-EPUCVZ73.js} +2594 -2030
  171. package/{removeDialogAgentAction-IX3MN2ZO.js → removeDialogAgentAction-HDUI2MU3.js} +22 -26
  172. package/{runAgentClientLoop-MUMLW2SA.js → runAgentClientLoop-OXQMDGAN.js} +78 -71
  173. package/{runtimeDoctorCommands-X6WDBEQX.js → runtimeDoctorCommands-PIVSBZRZ.js} +4 -4
  174. package/runtimeModeArgs-2Y7BALTO.js +31 -0
  175. package/{setDialogExtraReferencesAction-X4HCPNZL.js → setDialogExtraReferencesAction-ADBVOP4O.js} +16 -14
  176. package/{setPrimaryDialogAgentAction-4GMIQLOD.js → setPrimaryDialogAgentAction-PXVXQJ62.js} +23 -27
  177. package/{chunk-AFUORTY4.js → settingThunks-G2MJRKUE.js} +226 -940
  178. package/{skillDiscovery-CYUCJMAG.js → skillDiscovery-ZBU76COE.js} +3 -3
  179. package/{slateUtils-RIZES3PV.js → slateUtils-NGV2NMKM.js} +1 -1
  180. package/{spaceCommands-BMXKR7H6.js → spaceCommands-Z662QYY6.js} +51 -47
  181. package/{streamAgentChatTurn-6EOS5PNG.js → streamAgentChatTurn-YJYEJHP7.js} +214 -114
  182. package/{switchDialogAgentAction-N52LRPA3.js → switchDialogAgentAction-Z3RZACGF.js} +19 -20
  183. package/{tableCommands-O6NWHFKV.js → tableCommands-6U4BMLRR.js} +10 -10
  184. package/{toolApiClient-QVJ6HDNN.js → toolApiClient-AD7CXTA4.js} +4 -3
  185. package/tools-GHI3WBEI.js +117 -0
  186. package/{tuiSummaryLlmCaller-WFRWERGK.js → tuiSummaryLlmCaller-WTC6GCQC.js} +25 -23
  187. package/{updateCommands-2M74UL7P.js → updateCommands-4EHDLF5J.js} +3 -3
  188. package/{updateDialogTitleAction-4YUVCBDU.js → updateDialogTitleAction-GJCNWTPY.js} +84 -45
  189. package/action-YVYQEAAV.js +0 -31
  190. package/agentListCommands-3GWH4E4G.js +0 -410
  191. package/agentRecordCommands-P76DPWKV.js +0 -128
  192. package/agentRunCommand-EQPL4F4K.js +0 -156
  193. package/browser-image-compression-MFDTD7K6.js +0 -1763
  194. package/chatQueueReduxAdapter-ZBDDI2E5.js +0 -186
  195. package/chunk-CQ3WA2NE.js +0 -299
  196. package/chunk-M76ECQRD.js +0 -13658
  197. package/chunk-MEYIRKDN.js +0 -8967
  198. package/chunk-PUOC4YRO.js +0 -394
  199. package/chunk-Q5FJJ6XI.js +0 -103
  200. package/chunk-S7Z2HMCN.js +0 -25
  201. package/chunk-WC6UUQ2C.js +0 -20923
  202. package/chunk-Y5GCAMGP.js +0 -9
  203. package/chunk-YPREESF4.js +0 -225
  204. package/createDialogAction-H6URYLIZ.js +0 -65
  205. package/machineWsRunDispatch-S3XXOKR7.js +0 -144
  206. package/settingSlice-ZQZVUPKK.js +0 -204
  207. package/syncMapping-N6RGXGBW.js +0 -437
  208. package/tools-4AJZHAK3.js +0 -110
  209. package/{chunk-X7HHHIOZ.js → chunk-Y6ROFCZO.js} +0 -0
  210. package/{db-WK5MDZVN.js → db-VQSAOWAO.js} +1 -1
@@ -0,0 +1,56 @@
1
+ import {
2
+ addLeadingZeros,
3
+ requiredArgs,
4
+ toDate
5
+ } from "./chunk-4LCOCOR5.js";
6
+
7
+ // node_modules/date-fns/esm/formatISO/index.js
8
+ function formatISO(date, options) {
9
+ var _options$format, _options$representati;
10
+ requiredArgs(1, arguments);
11
+ var originalDate = toDate(date);
12
+ if (isNaN(originalDate.getTime())) {
13
+ throw new RangeError("Invalid time value");
14
+ }
15
+ var format = String((_options$format = options === null || options === void 0 ? void 0 : options.format) !== null && _options$format !== void 0 ? _options$format : "extended");
16
+ var representation = String((_options$representati = options === null || options === void 0 ? void 0 : options.representation) !== null && _options$representati !== void 0 ? _options$representati : "complete");
17
+ if (format !== "extended" && format !== "basic") {
18
+ throw new RangeError("format must be 'extended' or 'basic'");
19
+ }
20
+ if (representation !== "date" && representation !== "time" && representation !== "complete") {
21
+ throw new RangeError("representation must be 'date', 'time', or 'complete'");
22
+ }
23
+ var result = "";
24
+ var tzOffset = "";
25
+ var dateDelimiter = format === "extended" ? "-" : "";
26
+ var timeDelimiter = format === "extended" ? ":" : "";
27
+ if (representation !== "time") {
28
+ var day = addLeadingZeros(originalDate.getDate(), 2);
29
+ var month = addLeadingZeros(originalDate.getMonth() + 1, 2);
30
+ var year = addLeadingZeros(originalDate.getFullYear(), 4);
31
+ result = "".concat(year).concat(dateDelimiter).concat(month).concat(dateDelimiter).concat(day);
32
+ }
33
+ if (representation !== "date") {
34
+ var offset = originalDate.getTimezoneOffset();
35
+ if (offset !== 0) {
36
+ var absoluteOffset = Math.abs(offset);
37
+ var hourOffset = addLeadingZeros(Math.floor(absoluteOffset / 60), 2);
38
+ var minuteOffset = addLeadingZeros(absoluteOffset % 60, 2);
39
+ var sign = offset < 0 ? "+" : "-";
40
+ tzOffset = "".concat(sign).concat(hourOffset, ":").concat(minuteOffset);
41
+ } else {
42
+ tzOffset = "Z";
43
+ }
44
+ var hour = addLeadingZeros(originalDate.getHours(), 2);
45
+ var minute = addLeadingZeros(originalDate.getMinutes(), 2);
46
+ var second = addLeadingZeros(originalDate.getSeconds(), 2);
47
+ var separator = result === "" ? "" : "T";
48
+ var time = [hour, minute, second].join(timeDelimiter);
49
+ result = "".concat(result).concat(separator).concat(time).concat(tzOffset);
50
+ }
51
+ return result;
52
+ }
53
+
54
+ export {
55
+ formatISO
56
+ };
@@ -3,20 +3,20 @@ import {
3
3
  } from "./chunk-5ZUL4CUO.js";
4
4
  import {
5
5
  getModelContextWindow
6
- } from "./chunk-4OEFYTWL.js";
6
+ } from "./chunk-MJ3CRU77.js";
7
7
  import {
8
8
  findModelConfig,
9
9
  getProviderByModelName
10
- } from "./chunk-OIVSQH2O.js";
11
- import {
12
- asOptionalFiniteNumber
13
- } from "./chunk-WWC7I6TA.js";
10
+ } from "./chunk-GU7DC2TD.js";
14
11
  import {
15
12
  asTrimmedLowercaseString
16
13
  } from "./chunk-QSJ3HFEF.js";
17
14
  import {
18
15
  isRecord
19
16
  } from "./chunk-KUG52IAP.js";
17
+ import {
18
+ asOptionalFiniteNumber
19
+ } from "./chunk-WWC7I6TA.js";
20
20
  import {
21
21
  asTrimmedString
22
22
  } from "./chunk-3EUW3WEO.js";
@@ -1,25 +1,17 @@
1
- import {
2
- fileKey,
3
- getFileIdFromKey,
4
- ulid
5
- } from "./chunk-VMFTFOWF.js";
6
1
  import {
7
2
  loadFileFromIndexedDb,
8
3
  removeAction,
9
4
  saveFileToIndexedDb
10
- } from "./chunk-ABQYVJBJ.js";
5
+ } from "./chunk-EV235ILT.js";
11
6
  import {
12
7
  readAction,
13
8
  readRequestManager,
14
9
  resolveAgentReadServers
15
- } from "./chunk-WV42OMV7.js";
10
+ } from "./chunk-PFLF4R4E.js";
16
11
  import {
17
- asyncThunkCreator,
18
- buildCreateSlice,
12
+ beginWriteAck,
19
13
  compareRemoteRecordsByComparableTime,
20
- createEntityAdapter,
21
14
  getRuntimeServerContext,
22
- noloDeleteRequest,
23
15
  pickBestSettledRemoteRecord,
24
16
  planAuthorityReadServers,
25
17
  resolveAuthorityReplicationServers,
@@ -32,19 +24,30 @@ import {
32
24
  shouldReplaceLocalWithRemoteRecord,
33
25
  shouldReplicateLocalRecord,
34
26
  uploadToCurrentServer
35
- } from "./chunk-UKWGR5SS.js";
36
- import {
37
- fetchFromClientDb,
38
- fetchFromServer,
39
- logger,
40
- normalizeTimeFields
41
- } from "./chunk-QOKAKDPE.js";
27
+ } from "./chunk-O7SVKKLY.js";
42
28
  import {
43
29
  isTombstoneRecord
44
- } from "./chunk-GBRG75BQ.js";
30
+ } from "./chunk-D2MDMY2M.js";
45
31
  import {
46
32
  isRecord
47
33
  } from "./chunk-KUG52IAP.js";
34
+ import {
35
+ fileKey,
36
+ getFileIdFromKey,
37
+ ulid
38
+ } from "./chunk-OKGVNZTL.js";
39
+ import {
40
+ asyncThunkCreator,
41
+ buildCreateSlice,
42
+ createEntityAdapter,
43
+ noloDeleteRequest
44
+ } from "./chunk-VY6VFGKR.js";
45
+ import {
46
+ fetchFromClientDb,
47
+ fetchFromServer,
48
+ logger,
49
+ normalizeTimeFields
50
+ } from "./chunk-HIM3FCLF.js";
48
51
  import {
49
52
  API_ENDPOINTS
50
53
  } from "./chunk-LCBAMY2M.js";
@@ -260,12 +263,14 @@ var writeAction = async (writeConfig, thunkApi) => {
260
263
  `Invalid data type "${data.type}" for writeAction with key ${customKey}. Proceeding anyway.`
261
264
  );
262
265
  }
266
+ let writeAck = null;
263
267
  try {
264
268
  const willSaveData = normalizeTimeFields({
265
269
  ...data,
266
270
  dbKey: customKey,
267
271
  userId: recordUserId
268
272
  });
273
+ writeAck = beginWriteAck(customKey);
269
274
  await saveToClientDb(clientDb, customKey, willSaveData);
270
275
  const servers = resolveAuthorityReplicationServers({
271
276
  currentServer,
@@ -283,8 +288,14 @@ var writeAction = async (writeConfig, thunkApi) => {
283
288
  logger.debug(
284
289
  `[writeAction] Initiating background sync for key: ${customKey} to ${servers.length} servers.`
285
290
  );
286
- scheduleWriteReplication(servers, serverWriteConfig, state);
291
+ const replication = scheduleWriteReplication(
292
+ servers,
293
+ serverWriteConfig,
294
+ state
295
+ );
296
+ writeAck.settleWithReplication(replication);
287
297
  } else {
298
+ writeAck.markNotReplicated();
288
299
  logger.warn(
289
300
  { customKey },
290
301
  "[writeAction] No available servers, data only saved locally."
@@ -292,6 +303,7 @@ var writeAction = async (writeConfig, thunkApi) => {
292
303
  }
293
304
  return willSaveData;
294
305
  } catch (error) {
306
+ writeAck?.markAborted();
295
307
  const errorMessage = `Write action failed for ${customKey}: ${error?.message || "Unknown error"}`;
296
308
  logger.error({ error }, "[writeAction] Error");
297
309
  actionToast.error(`Failed to save data for ${customKey}.`);
@@ -493,6 +505,7 @@ var resolveFileCategory = ({
493
505
  }
494
506
  return "other";
495
507
  };
508
+ var MAX_MEDIA_FILE_SIZE = 120 * 1024 * 1024;
496
509
 
497
510
  // packages/database/actions/upload.ts
498
511
  var saveToClientDb2 = async (clientDb, dbKey, metadata) => {
@@ -712,7 +725,7 @@ var dbSlice = createSliceWithThunks({
712
725
  // 动态 import 在调用期解析,避开 TDZ/求值顺序问题(同下方 share)。
713
726
  read: create.asyncThunk(
714
727
  async (payload, thunkApi) => {
715
- const { readAction: readAction2 } = await import("./read-COE3ZYR6.js");
728
+ const { readAction: readAction2 } = await import("./read-XMBM52Y4.js");
716
729
  return readAction2(payload, thunkApi);
717
730
  },
718
731
  {
@@ -786,7 +799,7 @@ var dbSlice = createSliceWithThunks({
786
799
  // 这里改成动态 import,运行期才解析,彻底断开这条边。
787
800
  share: create.asyncThunk(
788
801
  async (config, thunkApi) => {
789
- const { shareResourceAction } = await import("./action-YVYQEAAV.js");
802
+ const { shareResourceAction } = await import("./action-GVA5ARSJ.js");
790
803
  return shareResourceAction(config, thunkApi);
791
804
  }
792
805
  ),
@@ -824,6 +837,7 @@ export {
824
837
  toTimestampMs,
825
838
  resolveFileCategory,
826
839
  uploadFileAction,
840
+ readFileContentAction,
827
841
  dbAdapter,
828
842
  selectById,
829
843
  selectEntities,