@mulmoclaude/core 7.7.2 → 7.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (182) hide show
  1. package/assets/helps/error-recovery.md +36 -4
  2. package/assets/helps/spreadsheet.md +8 -7
  3. package/dist/{atomic-C3NMg6-j.js → atomic-Dw7dV4TL.js} +1 -1
  4. package/dist/{atomic-C3NMg6-j.js.map → atomic-Dw7dV4TL.js.map} +1 -1
  5. package/dist/{atomic-cqafMWEI.cjs → atomic-bzFw4-ix.cjs} +3 -3
  6. package/dist/atomic-bzFw4-ix.cjs.map +1 -0
  7. package/dist/collection/index.cjs +6 -6
  8. package/dist/collection/index.js +6 -6
  9. package/dist/collection/paths.cjs +1 -1
  10. package/dist/collection/paths.js +1 -1
  11. package/dist/collection/registry/index.cjs +1 -1
  12. package/dist/collection/registry/index.js +1 -1
  13. package/dist/collection/registry/server/index.cjs +11 -11
  14. package/dist/collection/registry/server/index.cjs.map +1 -1
  15. package/dist/collection/registry/server/index.js +10 -10
  16. package/dist/collection/server/index.cjs +5 -5
  17. package/dist/collection/server/index.js +5 -5
  18. package/dist/collection-watchers/index.cjs +6 -6
  19. package/dist/collection-watchers/index.cjs.map +1 -1
  20. package/dist/collection-watchers/index.js +6 -6
  21. package/dist/collection-watchers/index.js.map +1 -1
  22. package/dist/{containment-Dc3gO4wD.cjs → containment-NZYJbiaa.cjs} +2 -2
  23. package/dist/{containment-Dc3gO4wD.cjs.map → containment-NZYJbiaa.cjs.map} +1 -1
  24. package/dist/{containment-D_vAa6eT.js → containment-Ne0w06jN.js} +1 -1
  25. package/dist/{containment-D_vAa6eT.js.map → containment-Ne0w06jN.js.map} +1 -1
  26. package/dist/{discovery-CY4pvgo9.cjs → discovery-Cu35oXeW.cjs} +13 -13
  27. package/dist/{discovery-CY4pvgo9.cjs.map → discovery-Cu35oXeW.cjs.map} +1 -1
  28. package/dist/{discovery-CImpaG95.js → discovery-DTOodl_M.js} +10 -10
  29. package/dist/{discovery-CImpaG95.js.map → discovery-DTOodl_M.js.map} +1 -1
  30. package/dist/{dist-734JaRYi.cjs → dist-DK0zTPR1.cjs} +1 -1
  31. package/dist/{dist-734JaRYi.cjs.map → dist-DK0zTPR1.cjs.map} +1 -1
  32. package/dist/{dist-BmO4oSQy.js → dist-wmt60Ec-.js} +1 -1
  33. package/dist/{dist-BmO4oSQy.js.map → dist-wmt60Ec-.js.map} +1 -1
  34. package/dist/errorMessage-CEWGPYzN.js +1 -0
  35. package/dist/errorMessage-DCZuXjO4.cjs +1 -0
  36. package/dist/{errors-0QwjDxsv.js → errors-DfW0e2uv.js} +2 -2
  37. package/dist/{errors-0QwjDxsv.js.map → errors-DfW0e2uv.js.map} +1 -1
  38. package/dist/{errors-B9mCEVG9.cjs → errors-WLfupg-H.cjs} +2 -2
  39. package/dist/{errors-B9mCEVG9.cjs.map → errors-WLfupg-H.cjs.map} +1 -1
  40. package/dist/feeds/index.cjs +2 -2
  41. package/dist/feeds/index.js +2 -2
  42. package/dist/feeds/paths.cjs +1 -1
  43. package/dist/feeds/server/index.cjs +13 -13
  44. package/dist/feeds/server/index.js +11 -11
  45. package/dist/file-change/index.cjs +2 -2
  46. package/dist/file-change/index.js +1 -1
  47. package/dist/files/index.cjs +9 -9
  48. package/dist/files/index.js +7 -7
  49. package/dist/global-config/index.cjs +1 -1
  50. package/dist/global-config/index.js +1 -1
  51. package/dist/google/index.cjs +16 -16
  52. package/dist/google/index.cjs.map +1 -1
  53. package/dist/google/index.js +14 -14
  54. package/dist/google/index.js.map +1 -1
  55. package/dist/{graph-DBbzemby.js → graph-CVoiWp8B.js} +2 -2
  56. package/dist/{graph-DBbzemby.js.map → graph-CVoiWp8B.js.map} +1 -1
  57. package/dist/{graph-BvVMZfDV.cjs → graph-RyHEgm-F.cjs} +2 -2
  58. package/dist/{graph-BvVMZfDV.cjs.map → graph-RyHEgm-F.cjs.map} +1 -1
  59. package/dist/{iconGlyph-CFOiFsmq.cjs → iconGlyph-BhtU1a9P.cjs} +1 -1
  60. package/dist/{iconGlyph-CFOiFsmq.cjs.map → iconGlyph-BhtU1a9P.cjs.map} +1 -1
  61. package/dist/{iconGlyph-D9h__VaM.js → iconGlyph-DjE_HLf4.js} +1 -1
  62. package/dist/{iconGlyph-D9h__VaM.js.map → iconGlyph-DjE_HLf4.js.map} +1 -1
  63. package/dist/{ingestTypes-CLDvn7kw.cjs → ingestTypes-CmO3SNaO.cjs} +2 -2
  64. package/dist/{ingestTypes-CLDvn7kw.cjs.map → ingestTypes-CmO3SNaO.cjs.map} +1 -1
  65. package/dist/{ingestTypes-DuXuSBSn.js → ingestTypes-V3bHEQ2i.js} +2 -2
  66. package/dist/{ingestTypes-DuXuSBSn.js.map → ingestTypes-V3bHEQ2i.js.map} +1 -1
  67. package/dist/{itemId-D2XAQ8RU.cjs → itemId-D3mJhGu0.cjs} +1 -1
  68. package/dist/{itemId-D2XAQ8RU.cjs.map → itemId-D3mJhGu0.cjs.map} +1 -1
  69. package/dist/{itemId-D_pSpa3U.js → itemId-D7pPwaX6.js} +1 -1
  70. package/dist/{itemId-D_pSpa3U.js.map → itemId-D7pPwaX6.js.map} +1 -1
  71. package/dist/{json-BizOSThv.js → json-C23c3t1W.js} +2 -2
  72. package/dist/{json-BizOSThv.js.map → json-C23c3t1W.js.map} +1 -1
  73. package/dist/{json-BGdV2cz6.cjs → json-CWiVjlka.cjs} +2 -2
  74. package/dist/{json-BGdV2cz6.cjs.map → json-CWiVjlka.cjs.map} +1 -1
  75. package/dist/{listen-uiEnXcW9.js → listen-DFP9Lrbd.js} +2 -2
  76. package/dist/{listen-uiEnXcW9.js.map → listen-DFP9Lrbd.js.map} +1 -1
  77. package/dist/{listen-OmfLDX1l.cjs → listen-jSwqWZfE.cjs} +2 -2
  78. package/dist/{listen-OmfLDX1l.cjs.map → listen-jSwqWZfE.cjs.map} +1 -1
  79. package/dist/notifier/index.cjs +1 -1
  80. package/dist/notifier/index.js +1 -1
  81. package/dist/{notifier-htdf4ekH.js → notifier-BkIAgskG.js} +3 -3
  82. package/dist/{notifier-htdf4ekH.js.map → notifier-BkIAgskG.js.map} +1 -1
  83. package/dist/{notifier-CRTk34EC.cjs → notifier-nv9c1r6T.cjs} +3 -3
  84. package/dist/{notifier-CRTk34EC.cjs.map → notifier-nv9c1r6T.cjs.map} +1 -1
  85. package/dist/{paths-DUHAueEv.cjs → paths-D0WRbJTV.cjs} +2 -2
  86. package/dist/{paths-DUHAueEv.cjs.map → paths-D0WRbJTV.cjs.map} +1 -1
  87. package/dist/{paths-BMQNHdaJ.js → paths-qvo3SsnP.js} +2 -2
  88. package/dist/{paths-BMQNHdaJ.js.map → paths-qvo3SsnP.js.map} +1 -1
  89. package/dist/plugin-vue/i18n.cjs +1 -1
  90. package/dist/plugin-vue/i18n.cjs.map +1 -1
  91. package/dist/plugin-vue/i18n.js +1 -1
  92. package/dist/plugin-vue/index.cjs +2 -2
  93. package/dist/plugin-vue/index.cjs.map +1 -1
  94. package/dist/plugin-vue/index.js +2 -2
  95. package/dist/plugin-vue/index.js.map +1 -1
  96. package/dist/{project-mU6-xLfy.js → project-CSx7gqgs.js} +1 -1
  97. package/dist/{project-mU6-xLfy.js.map → project-CSx7gqgs.js.map} +1 -1
  98. package/dist/{project-DDTIVEMU.cjs → project-sS_ltoWz.cjs} +1 -1
  99. package/dist/{project-DDTIVEMU.cjs.map → project-sS_ltoWz.cjs.map} +1 -1
  100. package/dist/prompt-files/index.cjs +3 -3
  101. package/dist/prompt-files/index.cjs.map +1 -1
  102. package/dist/prompt-files/index.js +1 -1
  103. package/dist/{promptSafety-CjxafW2b.cjs → promptSafety-BkFiS7El.cjs} +3 -3
  104. package/dist/{promptSafety-CjxafW2b.cjs.map → promptSafety-BkFiS7El.cjs.map} +1 -1
  105. package/dist/{promptSafety-B8LECAkY.js → promptSafety-Dp9Zga_t.js} +3 -3
  106. package/dist/{promptSafety-B8LECAkY.js.map → promptSafety-Dp9Zga_t.js.map} +1 -1
  107. package/dist/{relPath-CZiP2S_a.cjs → relPath-B-c9FUkm.cjs} +2 -2
  108. package/dist/{relPath-CZiP2S_a.cjs.map → relPath-B-c9FUkm.cjs.map} +1 -1
  109. package/dist/{relPath-BkKmqiiF.js → relPath-DV2ZrxF_.js} +1 -1
  110. package/dist/{relPath-BkKmqiiF.js.map → relPath-DV2ZrxF_.js.map} +1 -1
  111. package/dist/remote-host/index.cjs +1 -1
  112. package/dist/remote-host/index.js +1 -1
  113. package/dist/remote-host/server/index.cjs +4 -4
  114. package/dist/remote-host/server/index.cjs.map +1 -1
  115. package/dist/remote-host/server/index.js +4 -4
  116. package/dist/remote-host/server/index.js.map +1 -1
  117. package/dist/{remote-host-11euEZKP.cjs → remote-host-B6r8BkA1.cjs} +2 -2
  118. package/dist/{remote-host-11euEZKP.cjs.map → remote-host-B6r8BkA1.cjs.map} +1 -1
  119. package/dist/{remote-host-TiMhcW1o.js → remote-host-BI_3SnK1.js} +2 -2
  120. package/dist/{remote-host-TiMhcW1o.js.map → remote-host-BI_3SnK1.js.map} +1 -1
  121. package/dist/remote-view/index.cjs +2 -2
  122. package/dist/remote-view/index.js +2 -2
  123. package/dist/{rolldown-runtime-CmQyd0Gu.cjs → rolldown-runtime-C5rMTSut.cjs} +8 -6
  124. package/dist/{root-s0MUUMQU.js → root-DDMQu5hb.js} +1 -1
  125. package/dist/{root-s0MUUMQU.js.map → root-DDMQu5hb.js.map} +1 -1
  126. package/dist/{root-Ccgd3H5S.cjs → root-kKYFqEMf.cjs} +2 -2
  127. package/dist/{root-Ccgd3H5S.cjs.map → root-kKYFqEMf.cjs.map} +1 -1
  128. package/dist/runtime-plugins/index.cjs +104 -15
  129. package/dist/runtime-plugins/index.cjs.map +1 -1
  130. package/dist/runtime-plugins/index.d.ts +1 -0
  131. package/dist/runtime-plugins/index.js +99 -15
  132. package/dist/runtime-plugins/index.js.map +1 -1
  133. package/dist/runtime-plugins/ledgerLock.d.ts +16 -0
  134. package/dist/scheduler/index.cjs +5 -5
  135. package/dist/scheduler/index.js +4 -4
  136. package/dist/{server-BXtSbL-b.cjs → server-BNmwQGcq.cjs} +15 -15
  137. package/dist/server-BNmwQGcq.cjs.map +1 -0
  138. package/dist/{server-B5TZjZN9.js → server-BpCUehxP.js} +14 -14
  139. package/dist/{server-B5TZjZN9.js.map → server-BpCUehxP.js.map} +1 -1
  140. package/dist/skill-bridge/index.cjs +3 -3
  141. package/dist/skill-bridge/index.cjs.map +1 -1
  142. package/dist/skill-bridge/index.js +2 -2
  143. package/dist/{slug-DVkuPjIv.cjs → slug-BRj6KEiN.cjs} +1 -1
  144. package/dist/{slug-DVkuPjIv.cjs.map → slug-BRj6KEiN.cjs.map} +1 -1
  145. package/dist/{slug-D24AYqCZ.js → slug-X5tnZoc-.js} +1 -1
  146. package/dist/{slug-D24AYqCZ.js.map → slug-X5tnZoc-.js.map} +1 -1
  147. package/dist/{templatePath-CB3wtVpe.js → templatePath-B5mHTFDX.js} +1 -1
  148. package/dist/{templatePath-CB3wtVpe.js.map → templatePath-B5mHTFDX.js.map} +1 -1
  149. package/dist/{templatePath-BIh7wqgS.cjs → templatePath-DSawCKNy.cjs} +1 -1
  150. package/dist/{templatePath-BIh7wqgS.cjs.map → templatePath-DSawCKNy.cjs.map} +1 -1
  151. package/dist/{text-BQAuwKVj.js → text-BpGv7qxC.js} +1 -1
  152. package/dist/{text-BQAuwKVj.js.map → text-BpGv7qxC.js.map} +1 -1
  153. package/dist/{text-BQiyo5R9.cjs → text-CPK6ABnv.cjs} +1 -1
  154. package/dist/{text-BQiyo5R9.cjs.map → text-CPK6ABnv.cjs.map} +1 -1
  155. package/dist/{types-DPycxnDf.cjs → types-Bmk0fWDr.cjs} +1 -1
  156. package/dist/{types-DPycxnDf.cjs.map → types-Bmk0fWDr.cjs.map} +1 -1
  157. package/dist/{types-BLCZTGW2.js → types-CuiYCIof.js} +1 -1
  158. package/dist/{types-BLCZTGW2.js.map → types-CuiYCIof.js.map} +1 -1
  159. package/dist/utils/index.cjs +3 -3
  160. package/dist/utils/index.js +3 -3
  161. package/dist/whisper/client.cjs.map +1 -1
  162. package/dist/whisper/client.js.map +1 -1
  163. package/dist/whisper/index.cjs +7 -7
  164. package/dist/whisper/index.cjs.map +1 -1
  165. package/dist/whisper/index.js +5 -5
  166. package/dist/wiki/index.cjs +3 -3
  167. package/dist/wiki/index.js +3 -3
  168. package/dist/wiki/paths.cjs +2 -2
  169. package/dist/wiki/paths.js +1 -1
  170. package/dist/wiki/server/index.cjs +7 -7
  171. package/dist/wiki/server/index.js +5 -5
  172. package/dist/{withinRoot-CheaBWt0.js → withinRoot-Dc756J5K.js} +2 -2
  173. package/dist/{withinRoot-CheaBWt0.js.map → withinRoot-Dc756J5K.js.map} +1 -1
  174. package/dist/{withinRoot-CHPN9eHD.cjs → withinRoot-OaOVCBHa.cjs} +2 -2
  175. package/dist/withinRoot-OaOVCBHa.cjs.map +1 -0
  176. package/dist/workspace-setup/index.js +1 -1
  177. package/package.json +5 -5
  178. package/dist/atomic-cqafMWEI.cjs.map +0 -1
  179. package/dist/errorMessage-D0kR547_.cjs +0 -1
  180. package/dist/errorMessage-TpKxrmeo.js +0 -1
  181. package/dist/server-BXtSbL-b.cjs.map +0 -1
  182. package/dist/withinRoot-CHPN9eHD.cjs.map +0 -1
@@ -1060,9 +1060,12 @@ shipped builders produce, and asserts `handlePermission` comes back over the MCP
1060
1060
 
1061
1061
  ### Cause
1062
1062
 
1063
- The image freezes whichever CLI was current when it was built, and
1064
- `ensureSandboxImage()` (`packages/mulmoclaude/server/system/docker.ts`) rebuilds only when the **Dockerfile's SHA**
1065
- changes. A new CLI release upstream doesn't change that SHA, so nothing retriggers the build.
1063
+ The image freezes whichever CLI was current when it was built. `ensureSandboxImage()`
1064
+ (`packages/mulmoclaude/server/system/docker.ts`) rebuilds at start, blocking, only when the
1065
+ **Dockerfile's SHA** changes. Since #3728 it also rebuilds a **stale** image (past 30 days) in the
1066
+ background when npm has a newer CLI: the server starts on the old image, and the next turn after the
1067
+ rebuild uses the new one. That refresh needs npm reachable, so an offline machine, or one whose image
1068
+ is younger than the stale limit, keeps the old CLI.
1066
1069
 
1067
1070
  ### Fix
1068
1071
 
@@ -1082,7 +1085,15 @@ about what is inside:
1082
1085
  docker run --rm --entrypoint claude mulmoclaude-sandbox --version
1083
1086
  ```
1084
1087
 
1085
- If it's behind, drop the image and let the next run rebuild:
1088
+ Look for the background refresh in the boot log:
1089
+
1090
+ ```
1091
+ INFO [sandbox] rebuilding the stale sandbox image in the background from=2.1.232 to=2.1.334
1092
+ INFO [sandbox] sandbox image refreshed; the next agent turn uses it claudeCodeVersion=2.1.334
1093
+ ```
1094
+
1095
+ `background refresh of the sandbox image failed` keeps the old image; the warn carries the reason.
1096
+ If it's behind and no refresh ran (young image, npm unreachable), drop the image and let the next run rebuild:
1086
1097
 
1087
1098
  ```bash
1088
1099
  yarn sandbox:remove # docker rmi mulmoclaude-sandbox
@@ -1760,3 +1771,24 @@ bridges in-process bridges running { transports: [ 'telegram' ] }
1760
1771
  ```
1761
1772
 
1762
1773
  Absence of that line means nothing started.
1774
+
1775
+ ## A plugin install fails because the ledger is busy, a writer "is no longer running", or the plugin "changed in the ledger"
1776
+
1777
+ ### Symptom
1778
+
1779
+ - Installing or removing a plugin (Settings → Installed plugins, `npx mulmoclaude plugin`, or MulmoTerminal) fails with "another install or removal is editing …/plugins/plugins.json".
1780
+ - Or it fails with "…/plugins/plugins.json.lock was left by a writer that is no longer running (pid N); remove it and try again".
1781
+ - Or an install fails with "<name> changed in the ledger while this install ran; check it again".
1782
+
1783
+ ### Cause
1784
+
1785
+ Every edit of the plugin ledger holds `plugins/plugins.json.lock` for the few milliseconds it takes. The lock keeps MulmoClaude's server, its `plugin` command and MulmoTerminal from overwriting each other's changes. A writer waits a while for the lock and then gives up. Nothing removes another writer's lock automatically. A lock that stays behind therefore means a writer crashed in the middle of an edit.
1786
+
1787
+ ### Fix
1788
+
1789
+ - **"another install or removal is editing"** — another change was running. Try again once it finishes.
1790
+ - **"no longer running (pid N)"** — that writer is gone. Delete the named `plugins.json.lock` and try again. Check `plugins/plugins.json` afterwards: the crashed edit may not have been written.
1791
+
1792
+ - **"changed in the ledger while this install ran"** — another host installed, replaced or removed that same plugin between the check and the write. Nothing was written. List the plugins again (`npx mulmoclaude plugin list`, or reopen Settings → Installed plugins) to see what is installed now, then decide whether to install again.
1793
+
1794
+ Do not delete the lock while an install or removal is in progress.
@@ -24,13 +24,14 @@ Never pre-calculate — let the spreadsheet compute using cell refs, functions,
24
24
 
25
25
  Only these are available, plus any the workbook defines in its `functions` field. A formula that calls any other function shows an error (such as `#NAME?`) instead of a result.
26
26
 
27
- - Statistical: ANOVA.TEST, AUTOCORREL, AVEDEV, AVERAGE, AVERAGEA, AVERAGEIF, AVERAGEIFS, BETA.DIST, BETA.INV, BETAINV, BINOM.DIST, BINOM.INV, BINOMDIST, CHIDIST, CHIINV, CHISQ.DIST, CHISQ.DIST.RT, CHISQ.INV, CHISQ.INV.RT, CHISQ.TEST, CHITEST, CONFIDENCE.NORM, CONFIDENCE.T, CORREL, COUNT, COUNTA, COUNTBLANK, COUNTIF, COUNTIFS, COVARIANCE.P, COVARIANCE.S, CRITBINOM, DECOMPOSE, DEVSQ, EMA, EXPON.DIST, EXPONDIST, F.DIST, F.DIST.RT, F.INV, F.INV.RT, F.TEST, FDIST, FINV, FISHER, FISHERINV, FORECAST, FORECAST.ETS, FORECAST.ETS.CONFINT, FORECAST.ETS.SEASONALITY, FORECAST.LINEAR, FREQUENCY, FTEST, GAMMA.DIST, GAMMA.INV, GAMMADIST, GAMMAINV, GAMMALN, GAMMALN.PRECISE, GAUSS, GEOMEAN, GROWTH, HARMEAN, HYPGEOM.DIST, INTERCEPT, KENDALL, KS.TEST, KURT, LARGE, LINEST, LOGEST, LOGINV, LOGNORM.DIST, LOGNORM.INV, MANNWHITNEY.TEST, MAX, MAXA, MAXIFS, MEDIAN, MIN, MINA, MINIFS, MODE, MODE.SNGL, NEGBINOM.DIST, NORM.DIST, NORM.INV, NORM.S.DIST, NORM.S.INV, PEARSON, PERCENTILE, PERCENTILE.EXC, PERCENTILE.INC, PERCENTRANK, PERCENTRANK.EXC, PERCENTRANK.INC, PHI, POISSON, POISSON.DIST, PROB, QUARTILE, QUARTILE.EXC, QUARTILE.INC, RANK, RANK.AVG, RANK.EQ, RSQ, SHAPIRO.TEST, SKEW, SKEW.P, SLOPE, SMALL, SPEARMAN, STANDARDIZE, STDEV, STDEV.P, STDEV.S, STDEVP, STEYX, SUM, SUMIF, SUMIFS, T.DIST, T.DIST.2T, T.DIST.RT, T.INV, T.INV.2T, T.TEST, TREND, TRIMMEAN, TTEST, VAR, VAR.P, VAR.S, VARP, WEIBULL, WEIBULL.DIST, WILCOXON.TEST, Z.TEST, ZTEST
28
- - Mathematical: ABS, CEILING, EXP, FLOOR, INT, LN, LOG, LOG10, MDETERM, MINVERSE, MMULT, MOD, MUNIT, PI, POWER, RAND, RANDARRAY, RANDBETWEEN, ROUND, ROUNDDOWN, ROUNDUP, SEQUENCE, SIGN, SQRT, SUMPRODUCT, TRUNC
29
- - Logical: AND, BYCOL, BYROW, FALSE, IF, IFERROR, IFNA, IFS, LAMBDA, LET, MAP, NOT, OR, REDUCE, TRUE
30
- - Text: CONCAT, CONCATENATE, EXACT, FIND, LEFT, LEN, LOWER, MID, PROPER, REPLACE, RIGHT, SEARCH, SUBSTITUTE, TEXT, TRIM, UPPER, VALUE
31
- - Financial: FV, IPMT, IRR, NPER, NPV, PMT, PPMT, PV, RATE
32
- - Lookup & Reference: CHOOSECOLS, CHOOSEROWS, COLUMN, COLUMNS, DROP, FILTER, GROUPBY, HLOOKUP, HSTACK, INDEX, MATCH, PIVOTBY, ROW, ROWS, SORT, SORTBY, TAKE, TRANSPOSE, UNIQUE, VLOOKUP, VSTACK, XLOOKUP, XMATCH
33
- - Date & Time: DATE, DATEDIF, DAY, DAYS, EDATE, EOMONTH, HOUR, MINUTE, MONTH, NETWORKDAYS, NOW, SECOND, TIME, TODAY, WEEKDAY, WORKDAY, YEAR
27
+ - Statistical: ANOVA.TEST, AUTOCORREL, AVEDEV, AVERAGE, AVERAGEA, AVERAGEIF, AVERAGEIFS, BETA.DIST, BETA.INV, BETADIST, BETAINV, BINOM.DIST, BINOM.DIST.RANGE, BINOM.INV, BINOMDIST, CHIDIST, CHIINV, CHISQ.DIST, CHISQ.DIST.RT, CHISQ.INV, CHISQ.INV.RT, CHISQ.TEST, CHITEST, CONFIDENCE, CONFIDENCE.NORM, CONFIDENCE.T, CORREL, COUNT, COUNTA, COUNTBLANK, COUNTIF, COUNTIFS, COVAR, COVARIANCE.P, COVARIANCE.S, CRITBINOM, DECOMPOSE, DEVSQ, DIFF, EMA, EXPON.DIST, EXPONDIST, F.DIST, F.DIST.RT, F.INV, F.INV.RT, F.TEST, FDIST, FINV, FISHER, FISHERINV, FORECAST, FORECAST.ETS, FORECAST.ETS.CONFINT, FORECAST.ETS.SEASONALITY, FORECAST.LINEAR, FREQUENCY, FTEST, GAMMA, GAMMA.DIST, GAMMA.INV, GAMMADIST, GAMMAINV, GAMMALN, GAMMALN.PRECISE, GAUSS, GEOMEAN, GROWTH, HARMEAN, HYPGEOM.DIST, HYPGEOMDIST, INTERCEPT, KENDALL, KS.TEST, KURT, LARGE, LINEST, LOGEST, LOGINV, LOGNORM.DIST, LOGNORM.INV, LOGNORMDIST, MANNWHITNEY.TEST, MAX, MAXA, MAXIFS, MEDIAN, MIN, MINA, MINIFS, MODE, MODE.MULT, MODE.SNGL, NEGBINOM.DIST, NEGBINOMDIST, NORM.DIST, NORM.INV, NORM.S.DIST, NORM.S.INV, NORMDIST, NORMINV, NORMSDIST, NORMSINV, OUTLIERS, PCTCHANGE, PEARSON, PERCENTILE, PERCENTILE.EXC, PERCENTILE.INC, PERCENTRANK, PERCENTRANK.EXC, PERCENTRANK.INC, PERMUTATIONA, PHI, POISSON, POISSON.DIST, PROB, QUARTILE, QUARTILE.EXC, QUARTILE.INC, RANK, RANK.AVG, RANK.EQ, ROLLING, RSQ, SHAPIRO.TEST, SKEW, SKEW.P, SLOPE, SMALL, SPEARMAN, STANDARDIZE, STDEV, STDEV.P, STDEV.S, STDEVA, STDEVP, STDEVPA, STEYX, SUM, SUMIF, SUMIFS, T.DIST, T.DIST.2T, T.DIST.RT, T.INV, T.INV.2T, T.TEST, TDIST, TINV, TREND, TRIMMEAN, TTEST, VAR, VAR.P, VAR.S, VARA, VARP, VARPA, WEIBULL, WEIBULL.DIST, WILCOXON.TEST, Z.TEST, ZSCORE, ZTEST
28
+ - Mathematical: ABS, ACOS, ACOSH, ACOT, ACOTH, AGGREGATE, ARABIC, ASIN, ASINH, ATAN, ATAN2, ATANH, BASE, CEILING, CEILING.MATH, CEILING.PRECISE, COMBIN, COMBINA, COS, COSH, COT, COTH, CSC, CSCH, DECIMAL, DEGREES, EVEN, EXP, FACT, FACTDOUBLE, FLOOR, FLOOR.MATH, FLOOR.PRECISE, GCD, INT, ISO.CEILING, LCM, LN, LOG, LOG10, MDETERM, MINVERSE, MMULT, MOD, MROUND, MULTINOMIAL, MUNIT, ODD, PERMUT, PI, POWER, PRODUCT, QUOTIENT, RADIANS, RAND, RANDARRAY, RANDBETWEEN, ROMAN, ROUND, ROUNDDOWN, ROUNDUP, SEC, SECH, SEQUENCE, SERIESSUM, SIGN, SIN, SINH, SQRT, SQRTPI, SUBTOTAL, SUMPRODUCT, SUMSQ, SUMX2MY2, SUMX2PY2, SUMXMY2, TAN, TANH, TRUNC
29
+ - Logical: AND, BYCOL, BYROW, FALSE, IF, IFERROR, IFNA, IFS, ISOMITTED, LAMBDA, LET, MAKEARRAY, MAP, NOT, OR, REDUCE, SCAN, SWITCH, TRUE, XOR
30
+ - Text: CHAR, CLEAN, CODE, CONCAT, CONCATENATE, DOLLAR, EXACT, FIND, FIXED, LEFT, LEN, LOWER, MID, NUMBERVALUE, PROPER, REGEXEXTRACT, REGEXREPLACE, REGEXTEST, REPLACE, REPT, RIGHT, SEARCH, SUBSTITUTE, TEXT, TEXTAFTER, TEXTBEFORE, TEXTJOIN, TEXTSPLIT, TRIM, UNICHAR, UNICODE, UPPER, VALUE
31
+ - Financial: CUMIPMT, CUMPRINC, DB, DDB, EFFECT, FV, IPMT, IRR, MIRR, NOMINAL, NPER, NPV, PMT, PPMT, PV, RATE, SLN, SYD, XIRR, XNPV
32
+ - Lookup & Reference: ADDRESS, AREAS, CHOOSE, CHOOSECOLS, CHOOSEROWS, COLUMN, COLUMNS, DROP, EXPAND, FILTER, GROUPBY, HLOOKUP, HSTACK, INDEX, INDIRECT, LOOKUP, MATCH, OFFSET, PIVOTBY, QUERY, ROW, ROWS, SORT, SORTBY, TAKE, TOCOL, TOROW, TRANSPOSE, UNIQUE, VLOOKUP, VSTACK, WRAPCOLS, WRAPROWS, XLOOKUP, XMATCH
33
+ - Date & Time: DATE, DATEDIF, DATEVALUE, DAY, DAYS, DAYS360, EDATE, EOMONTH, HOUR, ISOWEEKNUM, MINUTE, MONTH, NETWORKDAYS, NETWORKDAYS.INTL, NOW, SECOND, TIME, TIMEVALUE, TODAY, WEEKDAY, WEEKNUM, WORKDAY, WORKDAY.INTL, YEAR, YEARFRAC
34
+ - Information: ERROR.TYPE, ISBLANK, ISERR, ISERROR, ISEVEN, ISLOGICAL, ISNA, ISNONTEXT, ISNUMBER, ISODD, ISTEXT, N, NA, T, TYPE
34
35
 
35
36
  ## Dates
36
37
 
@@ -95,4 +95,4 @@ function writeFileAtomicSync(filePath, content, opts = {}) {
95
95
  }
96
96
  export { writeFileAtomic as n, writeFileAtomicSync as r, renameWithWindowsRetry as t };
97
97
 
98
- //# sourceMappingURL=atomic-C3NMg6-j.js.map
98
+ //# sourceMappingURL=atomic-Dw7dV4TL.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"atomic-C3NMg6-j.js","names":[],"sources":["../src/files/atomic.ts"],"sourcesContent":["// rename(2) is atomic on POSIX; Node's Windows fallback (copy+unlink) is still safer than truncating in place.\n// Readers always see either the old file or the new — never a half-written one.\n//\n// Single source of truth for atomic file writes across the whole monorepo\n// (host, core, plugins). Previously copy-pasted four times, so a Windows retry\n// fix landed in only one (#2399, precedent #2222).\n\nimport { mkdirSync, promises, renameSync, unlinkSync, writeFileSync } from \"node:fs\";\nimport path from \"node:path\";\nimport { randomBytes } from \"node:crypto\";\n\nexport interface WriteAtomicOptions {\n mode?: number;\n /** Give the staging file a random suffix so concurrent writers to the same\n * destination can't collide at the OS layer.\n *\n * Defaults to `true`, and opting out is almost always wrong. A shared\n * `${filePath}.tmp` means two writers of one file race: the second write\n * overwrites the first's staging file, or one rename/unlink pulls it out\n * from under the other, surfacing as `ENOENT … rename '<file>.tmp'`. That is\n * not theoretical — it fired in production on session meta, where ten\n * distinct callers (`setClaudeSessionId`, `backfillOrigin`,\n * `incrementUserQueryCount`, …) all write the same `<sessionId>.json`\n * (#2222).\n *\n * Pass `false` only when you specifically need the staging path to be\n * predictable (e.g. a single-writer token file, or a test that pre-creates\n * it to force a write failure). */\n uniqueTmp?: boolean;\n}\n\n// Unique staging names are the safe default: the cost is a random suffix, the\n// cost of the alternative is a lost update under concurrency (#2222).\nconst DEFAULT_UNIQUE_TMP = true;\n\nfunction tmpPathFor(filePath: string, uniqueTmp: boolean | undefined): string {\n return (uniqueTmp ?? DEFAULT_UNIQUE_TMP) ? `${filePath}.${randomBytes(6).toString(\"hex\")}.tmp` : `${filePath}.tmp`;\n}\n\n// On Windows, AV / Search Indexer / Defender briefly hold handles and rename trips EPERM/EBUSY/EACCES. Retry loop is\n// gated to Windows because POSIX EPERM means a real perm problem (read-only fs, sticky, cross-device) — retrying\n// just adds latency before the inevitable throw.\nconst IS_WINDOWS = process.platform === \"win32\";\n// The ASYNC ladder is generous because waiting is nearly free there — the call\n// yields, and a write that would otherwise throw is worth a few seconds. The\n// previous ~430 ms budget was not enough on a loaded Windows CI runner: the\n// notifier's `active.json` write lost the rename and threw, and the listener\n// waiting on it timed out ten seconds later, so the operation failed while the\n// contention it was retrying through had long since cleared (#2972 follow-up).\nconst RENAME_RETRY_DELAYS_MS = [30, 100, 300, 600, 1000, 2000] as const;\n// The SYNC ladder stays short on purpose. `sleepSync` parks the whole thread,\n// so a long budget here does not delay one write — it freezes the process. A\n// caller that cannot afford to yield cannot afford to wait either; failing\n// after ~430 ms and letting the caller decide beats a four-second stall.\nconst RENAME_RETRY_DELAYS_SYNC_MS = [30, 100, 300] as const;\n\nfunction hasErrnoCode(err: unknown): err is { code: string } {\n return typeof err === \"object\" && err !== null && \"code\" in err && typeof err.code === \"string\";\n}\n\n// `isWindows` is a parameter (defaulting to the real platform) so the safety-critical decision is testable on any OS.\n/** The retry budgets, exported so a test can assert what they cost rather than\n * hard-coding a second copy of the numbers. */\nexport const RENAME_RETRY_BUDGET_MS = RENAME_RETRY_DELAYS_MS.reduce((total, delay) => total + delay, 0);\nexport const RENAME_RETRY_BUDGET_SYNC_MS = RENAME_RETRY_DELAYS_SYNC_MS.reduce((total, delay) => total + delay, 0);\n\nexport function isTransientRenameError(err: unknown, isWindows: boolean = IS_WINDOWS): boolean {\n if (!isWindows || !hasErrnoCode(err)) return false;\n return err.code === \"EPERM\" || err.code === \"EBUSY\" || err.code === \"EACCES\";\n}\n\n// Injectable so a test can drive the retry path (fail-then-succeed rename, no-op sleep, isWindows=true) on any OS.\nexport interface RenameRetryDeps {\n rename: (fromPath: string, toPath: string) => Promise<void>;\n sleep: (millis: number) => Promise<void>;\n isWindows: boolean;\n}\n\nconst defaultRenameRetryDeps: RenameRetryDeps = {\n rename: (fromPath, toPath) => promises.rename(fromPath, toPath),\n sleep: (millis) => new Promise((resolve) => setTimeout(resolve, millis)),\n isWindows: IS_WINDOWS,\n};\n\nexport async function renameWithWindowsRetry(fromPath: string, toPath: string, deps: RenameRetryDeps = defaultRenameRetryDeps): Promise<void> {\n for (const delayMs of RENAME_RETRY_DELAYS_MS) {\n try {\n await deps.rename(fromPath, toPath);\n return;\n } catch (err) {\n if (!isTransientRenameError(err, deps.isWindows)) throw err;\n await deps.sleep(delayMs);\n }\n }\n // Final attempt — let any error propagate.\n await deps.rename(fromPath, toPath);\n}\n\n// Atomics.wait parks the thread instead of busy-spinning. Only on the Windows-rename retry path, and only on the SYNC\n// ladder, whose budget is capped at ~430ms precisely because this blocks everything.\nconst SYNC_SLEEP_BUF = new Int32Array(new SharedArrayBuffer(4));\nfunction sleepSync(millis: number): void {\n Atomics.wait(SYNC_SLEEP_BUF, 0, 0, millis);\n}\n\n// Deliberate async/sync twin of RenameRetryDeps: `sleep` blocks the thread instead of returning a Promise.\nexport interface RenameRetryDepsSync {\n rename: (fromPath: string, toPath: string) => void;\n sleep: (millis: number) => void;\n isWindows: boolean;\n}\n\nconst defaultRenameRetryDepsSync: RenameRetryDepsSync = {\n rename: (fromPath, toPath) => renameSync(fromPath, toPath),\n sleep: sleepSync,\n isWindows: IS_WINDOWS,\n};\n\nexport function renameSyncWithWindowsRetry(fromPath: string, toPath: string, deps: RenameRetryDepsSync = defaultRenameRetryDepsSync): void {\n for (const delayMs of RENAME_RETRY_DELAYS_SYNC_MS) {\n try {\n deps.rename(fromPath, toPath);\n return;\n } catch (err) {\n if (!isTransientRenameError(err, deps.isWindows)) throw err;\n deps.sleep(delayMs);\n }\n }\n deps.rename(fromPath, toPath);\n}\n\n// Forcing utf-8 on a Uint8Array would re-encode the bytes — wrong for PNGs and other binary blobs.\nfunction writeOptionsFor(content: string | Uint8Array, mode: number | undefined): { encoding?: \"utf-8\" | undefined; mode?: number | undefined } {\n return typeof content === \"string\" ? { encoding: \"utf-8\", mode } : { mode };\n}\n\nexport async function writeFileAtomic(filePath: string, content: string | Uint8Array, opts: WriteAtomicOptions = {}): Promise<void> {\n const tmp = tmpPathFor(filePath, opts.uniqueTmp);\n await promises.mkdir(path.dirname(filePath), { recursive: true });\n try {\n await promises.writeFile(tmp, content, writeOptionsFor(content, opts.mode));\n await renameWithWindowsRetry(tmp, filePath);\n } catch (err) {\n await promises.unlink(tmp).catch(() => {});\n throw err;\n }\n}\n\nexport function writeFileAtomicSync(filePath: string, content: string | Uint8Array, opts: WriteAtomicOptions = {}): void {\n const tmp = tmpPathFor(filePath, opts.uniqueTmp);\n mkdirSync(path.dirname(filePath), { recursive: true });\n try {\n writeFileSync(tmp, content, writeOptionsFor(content, opts.mode));\n renameSyncWithWindowsRetry(tmp, filePath);\n } catch (err) {\n try {\n unlinkSync(tmp);\n } catch {\n // best-effort cleanup\n }\n throw err;\n }\n}\n"],"mappings":"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"}
1
+ {"version":3,"file":"atomic-Dw7dV4TL.js","names":[],"sources":["../src/files/atomic.ts"],"sourcesContent":["// rename(2) is atomic on POSIX; Node's Windows fallback (copy+unlink) is still safer than truncating in place.\n// Readers always see either the old file or the new — never a half-written one.\n//\n// Single source of truth for atomic file writes across the whole monorepo\n// (host, core, plugins). Previously copy-pasted four times, so a Windows retry\n// fix landed in only one (#2399, precedent #2222).\n\nimport { mkdirSync, promises, renameSync, unlinkSync, writeFileSync } from \"node:fs\";\nimport path from \"node:path\";\nimport { randomBytes } from \"node:crypto\";\n\nexport interface WriteAtomicOptions {\n mode?: number;\n /** Give the staging file a random suffix so concurrent writers to the same\n * destination can't collide at the OS layer.\n *\n * Defaults to `true`, and opting out is almost always wrong. A shared\n * `${filePath}.tmp` means two writers of one file race: the second write\n * overwrites the first's staging file, or one rename/unlink pulls it out\n * from under the other, surfacing as `ENOENT … rename '<file>.tmp'`. That is\n * not theoretical — it fired in production on session meta, where ten\n * distinct callers (`setClaudeSessionId`, `backfillOrigin`,\n * `incrementUserQueryCount`, …) all write the same `<sessionId>.json`\n * (#2222).\n *\n * Pass `false` only when you specifically need the staging path to be\n * predictable (e.g. a single-writer token file, or a test that pre-creates\n * it to force a write failure). */\n uniqueTmp?: boolean;\n}\n\n// Unique staging names are the safe default: the cost is a random suffix, the\n// cost of the alternative is a lost update under concurrency (#2222).\nconst DEFAULT_UNIQUE_TMP = true;\n\nfunction tmpPathFor(filePath: string, uniqueTmp: boolean | undefined): string {\n return (uniqueTmp ?? DEFAULT_UNIQUE_TMP) ? `${filePath}.${randomBytes(6).toString(\"hex\")}.tmp` : `${filePath}.tmp`;\n}\n\n// On Windows, AV / Search Indexer / Defender briefly hold handles and rename trips EPERM/EBUSY/EACCES. Retry loop is\n// gated to Windows because POSIX EPERM means a real perm problem (read-only fs, sticky, cross-device) — retrying\n// just adds latency before the inevitable throw.\nconst IS_WINDOWS = process.platform === \"win32\";\n// The ASYNC ladder is generous because waiting is nearly free there — the call\n// yields, and a write that would otherwise throw is worth a few seconds. The\n// previous ~430 ms budget was not enough on a loaded Windows CI runner: the\n// notifier's `active.json` write lost the rename and threw, and the listener\n// waiting on it timed out ten seconds later, so the operation failed while the\n// contention it was retrying through had long since cleared (#2972 follow-up).\nconst RENAME_RETRY_DELAYS_MS = [30, 100, 300, 600, 1000, 2000] as const;\n// The SYNC ladder stays short on purpose. `sleepSync` parks the whole thread,\n// so a long budget here does not delay one write — it freezes the process. A\n// caller that cannot afford to yield cannot afford to wait either; failing\n// after ~430 ms and letting the caller decide beats a four-second stall.\nconst RENAME_RETRY_DELAYS_SYNC_MS = [30, 100, 300] as const;\n\nfunction hasErrnoCode(err: unknown): err is { code: string } {\n return typeof err === \"object\" && err !== null && \"code\" in err && typeof err.code === \"string\";\n}\n\n// `isWindows` is a parameter (defaulting to the real platform) so the safety-critical decision is testable on any OS.\n/** The retry budgets, exported so a test can assert what they cost rather than\n * hard-coding a second copy of the numbers. */\nexport const RENAME_RETRY_BUDGET_MS = RENAME_RETRY_DELAYS_MS.reduce((total, delay) => total + delay, 0);\nexport const RENAME_RETRY_BUDGET_SYNC_MS = RENAME_RETRY_DELAYS_SYNC_MS.reduce((total, delay) => total + delay, 0);\n\nexport function isTransientRenameError(err: unknown, isWindows: boolean = IS_WINDOWS): boolean {\n if (!isWindows || !hasErrnoCode(err)) return false;\n return err.code === \"EPERM\" || err.code === \"EBUSY\" || err.code === \"EACCES\";\n}\n\n// Injectable so a test can drive the retry path (fail-then-succeed rename, no-op sleep, isWindows=true) on any OS.\nexport interface RenameRetryDeps {\n rename: (fromPath: string, toPath: string) => Promise<void>;\n sleep: (millis: number) => Promise<void>;\n isWindows: boolean;\n}\n\nconst defaultRenameRetryDeps: RenameRetryDeps = {\n rename: (fromPath, toPath) => promises.rename(fromPath, toPath),\n sleep: (millis) => new Promise((resolve) => setTimeout(resolve, millis)),\n isWindows: IS_WINDOWS,\n};\n\nexport async function renameWithWindowsRetry(fromPath: string, toPath: string, deps: RenameRetryDeps = defaultRenameRetryDeps): Promise<void> {\n for (const delayMs of RENAME_RETRY_DELAYS_MS) {\n try {\n await deps.rename(fromPath, toPath);\n return;\n } catch (err) {\n if (!isTransientRenameError(err, deps.isWindows)) throw err;\n await deps.sleep(delayMs);\n }\n }\n // Final attempt — let any error propagate.\n await deps.rename(fromPath, toPath);\n}\n\n// Atomics.wait parks the thread instead of busy-spinning. Only on the Windows-rename retry path, and only on the SYNC\n// ladder, whose budget is capped at ~430ms precisely because this blocks everything.\nconst SYNC_SLEEP_BUF = new Int32Array(new SharedArrayBuffer(4));\nfunction sleepSync(millis: number): void {\n Atomics.wait(SYNC_SLEEP_BUF, 0, 0, millis);\n}\n\n// Deliberate async/sync twin of RenameRetryDeps: `sleep` blocks the thread instead of returning a Promise.\nexport interface RenameRetryDepsSync {\n rename: (fromPath: string, toPath: string) => void;\n sleep: (millis: number) => void;\n isWindows: boolean;\n}\n\nconst defaultRenameRetryDepsSync: RenameRetryDepsSync = {\n rename: (fromPath, toPath) => renameSync(fromPath, toPath),\n sleep: sleepSync,\n isWindows: IS_WINDOWS,\n};\n\nexport function renameSyncWithWindowsRetry(fromPath: string, toPath: string, deps: RenameRetryDepsSync = defaultRenameRetryDepsSync): void {\n for (const delayMs of RENAME_RETRY_DELAYS_SYNC_MS) {\n try {\n deps.rename(fromPath, toPath);\n return;\n } catch (err) {\n if (!isTransientRenameError(err, deps.isWindows)) throw err;\n deps.sleep(delayMs);\n }\n }\n deps.rename(fromPath, toPath);\n}\n\n// Forcing utf-8 on a Uint8Array would re-encode the bytes — wrong for PNGs and other binary blobs.\nfunction writeOptionsFor(content: string | Uint8Array, mode: number | undefined): { encoding?: \"utf-8\" | undefined; mode?: number | undefined } {\n return typeof content === \"string\" ? { encoding: \"utf-8\", mode } : { mode };\n}\n\nexport async function writeFileAtomic(filePath: string, content: string | Uint8Array, opts: WriteAtomicOptions = {}): Promise<void> {\n const tmp = tmpPathFor(filePath, opts.uniqueTmp);\n await promises.mkdir(path.dirname(filePath), { recursive: true });\n try {\n await promises.writeFile(tmp, content, writeOptionsFor(content, opts.mode));\n await renameWithWindowsRetry(tmp, filePath);\n } catch (err) {\n await promises.unlink(tmp).catch(() => {});\n throw err;\n }\n}\n\nexport function writeFileAtomicSync(filePath: string, content: string | Uint8Array, opts: WriteAtomicOptions = {}): void {\n const tmp = tmpPathFor(filePath, opts.uniqueTmp);\n mkdirSync(path.dirname(filePath), { recursive: true });\n try {\n writeFileSync(tmp, content, writeOptionsFor(content, opts.mode));\n renameSyncWithWindowsRetry(tmp, filePath);\n } catch (err) {\n try {\n unlinkSync(tmp);\n } catch {\n // best-effort cleanup\n }\n throw err;\n }\n}\n"],"mappings":"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"}
@@ -1,8 +1,8 @@
1
- const require_rolldown_runtime = require("./rolldown-runtime-CmQyd0Gu.cjs");
1
+ const require_rolldown_runtime = require("./rolldown-runtime-C5rMTSut.cjs");
2
2
  let node_fs = require("node:fs");
3
3
  let node_path = require("node:path");
4
- node_path = require_rolldown_runtime.__toESM(node_path, 1);
5
4
  let node_crypto = require("node:crypto");
5
+ node_path = require_rolldown_runtime.__toESM(node_path, 1);
6
6
  // src/files/atomic.ts
7
7
  var DEFAULT_UNIQUE_TMP = true;
8
8
  function tmpPathFor(filePath, uniqueTmp) {
@@ -114,4 +114,4 @@ Object.defineProperty(exports, "writeFileAtomicSync", {
114
114
  }
115
115
  });
116
116
 
117
- //# sourceMappingURL=atomic-cqafMWEI.cjs.map
117
+ //# sourceMappingURL=atomic-bzFw4-ix.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"atomic-bzFw4-ix.cjs","names":["randomBytes","promises","renameSync","path","mkdirSync","writeFileSync","unlinkSync"],"sources":["../src/files/atomic.ts"],"sourcesContent":["// rename(2) is atomic on POSIX; Node's Windows fallback (copy+unlink) is still safer than truncating in place.\n// Readers always see either the old file or the new — never a half-written one.\n//\n// Single source of truth for atomic file writes across the whole monorepo\n// (host, core, plugins). Previously copy-pasted four times, so a Windows retry\n// fix landed in only one (#2399, precedent #2222).\n\nimport { mkdirSync, promises, renameSync, unlinkSync, writeFileSync } from \"node:fs\";\nimport path from \"node:path\";\nimport { randomBytes } from \"node:crypto\";\n\nexport interface WriteAtomicOptions {\n mode?: number;\n /** Give the staging file a random suffix so concurrent writers to the same\n * destination can't collide at the OS layer.\n *\n * Defaults to `true`, and opting out is almost always wrong. A shared\n * `${filePath}.tmp` means two writers of one file race: the second write\n * overwrites the first's staging file, or one rename/unlink pulls it out\n * from under the other, surfacing as `ENOENT … rename '<file>.tmp'`. That is\n * not theoretical — it fired in production on session meta, where ten\n * distinct callers (`setClaudeSessionId`, `backfillOrigin`,\n * `incrementUserQueryCount`, …) all write the same `<sessionId>.json`\n * (#2222).\n *\n * Pass `false` only when you specifically need the staging path to be\n * predictable (e.g. a single-writer token file, or a test that pre-creates\n * it to force a write failure). */\n uniqueTmp?: boolean;\n}\n\n// Unique staging names are the safe default: the cost is a random suffix, the\n// cost of the alternative is a lost update under concurrency (#2222).\nconst DEFAULT_UNIQUE_TMP = true;\n\nfunction tmpPathFor(filePath: string, uniqueTmp: boolean | undefined): string {\n return (uniqueTmp ?? DEFAULT_UNIQUE_TMP) ? `${filePath}.${randomBytes(6).toString(\"hex\")}.tmp` : `${filePath}.tmp`;\n}\n\n// On Windows, AV / Search Indexer / Defender briefly hold handles and rename trips EPERM/EBUSY/EACCES. Retry loop is\n// gated to Windows because POSIX EPERM means a real perm problem (read-only fs, sticky, cross-device) — retrying\n// just adds latency before the inevitable throw.\nconst IS_WINDOWS = process.platform === \"win32\";\n// The ASYNC ladder is generous because waiting is nearly free there — the call\n// yields, and a write that would otherwise throw is worth a few seconds. The\n// previous ~430 ms budget was not enough on a loaded Windows CI runner: the\n// notifier's `active.json` write lost the rename and threw, and the listener\n// waiting on it timed out ten seconds later, so the operation failed while the\n// contention it was retrying through had long since cleared (#2972 follow-up).\nconst RENAME_RETRY_DELAYS_MS = [30, 100, 300, 600, 1000, 2000] as const;\n// The SYNC ladder stays short on purpose. `sleepSync` parks the whole thread,\n// so a long budget here does not delay one write — it freezes the process. A\n// caller that cannot afford to yield cannot afford to wait either; failing\n// after ~430 ms and letting the caller decide beats a four-second stall.\nconst RENAME_RETRY_DELAYS_SYNC_MS = [30, 100, 300] as const;\n\nfunction hasErrnoCode(err: unknown): err is { code: string } {\n return typeof err === \"object\" && err !== null && \"code\" in err && typeof err.code === \"string\";\n}\n\n// `isWindows` is a parameter (defaulting to the real platform) so the safety-critical decision is testable on any OS.\n/** The retry budgets, exported so a test can assert what they cost rather than\n * hard-coding a second copy of the numbers. */\nexport const RENAME_RETRY_BUDGET_MS = RENAME_RETRY_DELAYS_MS.reduce((total, delay) => total + delay, 0);\nexport const RENAME_RETRY_BUDGET_SYNC_MS = RENAME_RETRY_DELAYS_SYNC_MS.reduce((total, delay) => total + delay, 0);\n\nexport function isTransientRenameError(err: unknown, isWindows: boolean = IS_WINDOWS): boolean {\n if (!isWindows || !hasErrnoCode(err)) return false;\n return err.code === \"EPERM\" || err.code === \"EBUSY\" || err.code === \"EACCES\";\n}\n\n// Injectable so a test can drive the retry path (fail-then-succeed rename, no-op sleep, isWindows=true) on any OS.\nexport interface RenameRetryDeps {\n rename: (fromPath: string, toPath: string) => Promise<void>;\n sleep: (millis: number) => Promise<void>;\n isWindows: boolean;\n}\n\nconst defaultRenameRetryDeps: RenameRetryDeps = {\n rename: (fromPath, toPath) => promises.rename(fromPath, toPath),\n sleep: (millis) => new Promise((resolve) => setTimeout(resolve, millis)),\n isWindows: IS_WINDOWS,\n};\n\nexport async function renameWithWindowsRetry(fromPath: string, toPath: string, deps: RenameRetryDeps = defaultRenameRetryDeps): Promise<void> {\n for (const delayMs of RENAME_RETRY_DELAYS_MS) {\n try {\n await deps.rename(fromPath, toPath);\n return;\n } catch (err) {\n if (!isTransientRenameError(err, deps.isWindows)) throw err;\n await deps.sleep(delayMs);\n }\n }\n // Final attempt — let any error propagate.\n await deps.rename(fromPath, toPath);\n}\n\n// Atomics.wait parks the thread instead of busy-spinning. Only on the Windows-rename retry path, and only on the SYNC\n// ladder, whose budget is capped at ~430ms precisely because this blocks everything.\nconst SYNC_SLEEP_BUF = new Int32Array(new SharedArrayBuffer(4));\nfunction sleepSync(millis: number): void {\n Atomics.wait(SYNC_SLEEP_BUF, 0, 0, millis);\n}\n\n// Deliberate async/sync twin of RenameRetryDeps: `sleep` blocks the thread instead of returning a Promise.\nexport interface RenameRetryDepsSync {\n rename: (fromPath: string, toPath: string) => void;\n sleep: (millis: number) => void;\n isWindows: boolean;\n}\n\nconst defaultRenameRetryDepsSync: RenameRetryDepsSync = {\n rename: (fromPath, toPath) => renameSync(fromPath, toPath),\n sleep: sleepSync,\n isWindows: IS_WINDOWS,\n};\n\nexport function renameSyncWithWindowsRetry(fromPath: string, toPath: string, deps: RenameRetryDepsSync = defaultRenameRetryDepsSync): void {\n for (const delayMs of RENAME_RETRY_DELAYS_SYNC_MS) {\n try {\n deps.rename(fromPath, toPath);\n return;\n } catch (err) {\n if (!isTransientRenameError(err, deps.isWindows)) throw err;\n deps.sleep(delayMs);\n }\n }\n deps.rename(fromPath, toPath);\n}\n\n// Forcing utf-8 on a Uint8Array would re-encode the bytes — wrong for PNGs and other binary blobs.\nfunction writeOptionsFor(content: string | Uint8Array, mode: number | undefined): { encoding?: \"utf-8\" | undefined; mode?: number | undefined } {\n return typeof content === \"string\" ? { encoding: \"utf-8\", mode } : { mode };\n}\n\nexport async function writeFileAtomic(filePath: string, content: string | Uint8Array, opts: WriteAtomicOptions = {}): Promise<void> {\n const tmp = tmpPathFor(filePath, opts.uniqueTmp);\n await promises.mkdir(path.dirname(filePath), { recursive: true });\n try {\n await promises.writeFile(tmp, content, writeOptionsFor(content, opts.mode));\n await renameWithWindowsRetry(tmp, filePath);\n } catch (err) {\n await promises.unlink(tmp).catch(() => {});\n throw err;\n }\n}\n\nexport function writeFileAtomicSync(filePath: string, content: string | Uint8Array, opts: WriteAtomicOptions = {}): void {\n const tmp = tmpPathFor(filePath, opts.uniqueTmp);\n mkdirSync(path.dirname(filePath), { recursive: true });\n try {\n writeFileSync(tmp, content, writeOptionsFor(content, opts.mode));\n renameSyncWithWindowsRetry(tmp, filePath);\n } catch (err) {\n try {\n unlinkSync(tmp);\n } catch {\n // best-effort cleanup\n }\n throw err;\n }\n}\n"],"mappings":"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"}
@@ -1,10 +1,10 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_itemId = require("../itemId-D2XAQ8RU.cjs");
3
- const require_promptSafety = require("../promptSafety-CjxafW2b.cjs");
4
- const require_project = require("../project-DDTIVEMU.cjs");
5
- const require_dist = require("../dist-734JaRYi.cjs");
6
- const require_iconGlyph = require("../iconGlyph-CFOiFsmq.cjs");
7
- require("../errorMessage-D0kR547_.cjs");
2
+ const require_itemId = require("../itemId-D3mJhGu0.cjs");
3
+ const require_promptSafety = require("../promptSafety-BkFiS7El.cjs");
4
+ const require_project = require("../project-sS_ltoWz.cjs");
5
+ const require_dist = require("../dist-DK0zTPR1.cjs");
6
+ const require_iconGlyph = require("../iconGlyph-BhtU1a9P.cjs");
7
+ require("../errorMessage-DCZuXjO4.cjs");
8
8
  // src/collection/core/presentCollection.ts
9
9
  var TOOL_NAME = "presentCollection";
10
10
  /** Stamp a host's opaque project scope onto a card payload. The ONLY way a
@@ -1,9 +1,9 @@
1
- import { $ as fieldText, A as collectionKeyId, B as SAFE_SLUG_PATTERN, C as decodeRecordTimes, D as isCanonicalServerTime, E as encodeServerTime, F as localCollectionKeyOf, G as AGENT_INGEST_KIND, H as isSafeRecordId, I as parseCollectionKeyId, J as INGEST_KINDS, K as COMPUTED_TYPES, L as sameCollectionKey, M as isLocalCollectionKey, N as isSharedCollectionKey, O as serverTimeMillis, P as isValidCollectionName, Q as storageKindFor, R as sharedCollectionKey, S as isAccentColor, T as encodeRecordTimes, U as isSafeSlug, V as generateUniqueId, W as nextUniqueItemId, X as isFieldDrivenEvery, Y as embedTargetId, Z as isReadOnlySchema, _ as spanOptionsFor, a as bucketRecords, b as ACCENT_COLORS, c as dateOf, d as monthAnchorDate, et as fieldTextOrNull, f as parseIsoDate, g as spanCoversDay, h as recordSpan, i as assignLanes, j as collectionKeyName, k as serverTimeOf, l as daySlice, m as parseTimeRange, n as shortHexId, o as buildMonthGrid, p as parseIsoDateTime, q as FEED_SCHEDULES, r as MINUTES_PER_DAY, s as compareYmd, t as newItemId, u as endsAtDayBoundary, v as withExclusiveEnd, w as decodeServerTime, x as accentChipClasses, y as ymdKey, z as SAFE_RECORD_ID_PATTERN } from "../itemId-D_pSpa3U.js";
2
- import { A as schemaDefaults, C as viaMatches, D as whenMatches, E as fieldVisible, O as fieldDefaultValue, S as rollupValue, T as agentActionRunKey, _ as uniqueEmbedTargets, a as evaluateDerived, b as coerceNumeric, c as selectDynamicRecord, d as flagFieldValue, f as itemIsDone, g as uniqueBacklinkSources, h as linkedSlugsForFields, k as firstUnknownDefault, l as chipMatches, m as matchesWhere, n as deriveAll, o as firstDateField, p as toggleChecked, r as resolveRowRefs, s as resolveIcon, t as defangForPrompt, u as completionCoveredByFieldChip, v as uniqueRefTargets, w as actionVisible, x as projectBacklinkRow, y as backlinkRows } from "../promptSafety-B8LECAkY.js";
3
- import { n as projectRecordFields, t as mergeIntoExisting } from "../project-mU6-xLfy.js";
4
- import { c as isRecord, t as errorMessage, u as isUnknownArray } from "../dist-BmO4oSQy.js";
5
- import { n as resolveIconGlyph, t as DEFAULT_ICON } from "../iconGlyph-D9h__VaM.js";
6
- import "../errorMessage-TpKxrmeo.js";
1
+ import { $ as fieldText, A as collectionKeyId, B as SAFE_SLUG_PATTERN, C as decodeRecordTimes, D as isCanonicalServerTime, E as encodeServerTime, F as localCollectionKeyOf, G as AGENT_INGEST_KIND, H as isSafeRecordId, I as parseCollectionKeyId, J as INGEST_KINDS, K as COMPUTED_TYPES, L as sameCollectionKey, M as isLocalCollectionKey, N as isSharedCollectionKey, O as serverTimeMillis, P as isValidCollectionName, Q as storageKindFor, R as sharedCollectionKey, S as isAccentColor, T as encodeRecordTimes, U as isSafeSlug, V as generateUniqueId, W as nextUniqueItemId, X as isFieldDrivenEvery, Y as embedTargetId, Z as isReadOnlySchema, _ as spanOptionsFor, a as bucketRecords, b as ACCENT_COLORS, c as dateOf, d as monthAnchorDate, et as fieldTextOrNull, f as parseIsoDate, g as spanCoversDay, h as recordSpan, i as assignLanes, j as collectionKeyName, k as serverTimeOf, l as daySlice, m as parseTimeRange, n as shortHexId, o as buildMonthGrid, p as parseIsoDateTime, q as FEED_SCHEDULES, r as MINUTES_PER_DAY, s as compareYmd, t as newItemId, u as endsAtDayBoundary, v as withExclusiveEnd, w as decodeServerTime, x as accentChipClasses, y as ymdKey, z as SAFE_RECORD_ID_PATTERN } from "../itemId-D7pPwaX6.js";
2
+ import { A as schemaDefaults, C as viaMatches, D as whenMatches, E as fieldVisible, O as fieldDefaultValue, S as rollupValue, T as agentActionRunKey, _ as uniqueEmbedTargets, a as evaluateDerived, b as coerceNumeric, c as selectDynamicRecord, d as flagFieldValue, f as itemIsDone, g as uniqueBacklinkSources, h as linkedSlugsForFields, k as firstUnknownDefault, l as chipMatches, m as matchesWhere, n as deriveAll, o as firstDateField, p as toggleChecked, r as resolveRowRefs, s as resolveIcon, t as defangForPrompt, u as completionCoveredByFieldChip, v as uniqueRefTargets, w as actionVisible, x as projectBacklinkRow, y as backlinkRows } from "../promptSafety-Dp9Zga_t.js";
3
+ import { n as projectRecordFields, t as mergeIntoExisting } from "../project-CSx7gqgs.js";
4
+ import { c as isRecord, t as errorMessage, u as isUnknownArray } from "../dist-wmt60Ec-.js";
5
+ import { n as resolveIconGlyph, t as DEFAULT_ICON } from "../iconGlyph-DjE_HLf4.js";
6
+ import "../errorMessage-CEWGPYzN.js";
7
7
  // src/collection/core/presentCollection.ts
8
8
  var TOOL_NAME = "presentCollection";
9
9
  /** Stamp a host's opaque project scope onto a card payload. The ONLY way a
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_templatePath = require("../templatePath-BIh7wqgS.cjs");
2
+ const require_templatePath = require("../templatePath-DSawCKNy.cjs");
3
3
  exports.isSafeActionTemplatePath = require_templatePath.isSafeActionTemplatePath;
4
4
  exports.isSafeCustomViewI18nPath = require_templatePath.isSafeCustomViewI18nPath;
5
5
  exports.isSafeCustomViewPath = require_templatePath.isSafeCustomViewPath;
@@ -1 +1 @@
1
- export { t as isSafeActionTemplatePath, n as isSafeCustomViewI18nPath, r as isSafeCustomViewPath, i as isSafeTemplatePath } from "../templatePath-CB3wtVpe.js";
1
+ export { t as isSafeActionTemplatePath, n as isSafeCustomViewI18nPath, r as isSafeCustomViewPath, i as isSafeTemplatePath } from "../templatePath-B5mHTFDX.js";
@@ -1,4 +1,4 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_types = require("../../types-DPycxnDf.cjs");
2
+ const require_types = require("../../types-Bmk0fWDr.cjs");
3
3
  exports.OFFICIAL_REGISTRY_NAME = require_types.OFFICIAL_REGISTRY_NAME;
4
4
  exports.parseRegistryIndex = require_types.parseRegistryIndex;
@@ -1 +1 @@
1
- export { t as OFFICIAL_REGISTRY_NAME, n as parseRegistryIndex } from "../../types-BLCZTGW2.js";
1
+ export { t as OFFICIAL_REGISTRY_NAME, n as parseRegistryIndex } from "../../types-CuiYCIof.js";
@@ -1,19 +1,19 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_rolldown_runtime = require("../../../rolldown-runtime-CmQyd0Gu.cjs");
2
+ const require_rolldown_runtime = require("../../../rolldown-runtime-C5rMTSut.cjs");
3
3
  const require_utils_fetch = require("../../../utils/fetch.cjs");
4
- const require_server = require("../../../server-BXtSbL-b.cjs");
5
- const require_discovery = require("../../../discovery-CY4pvgo9.cjs");
6
- const require_types = require("../../../types-DPycxnDf.cjs");
7
- const require_skill_bridge_index = require("../../../skill-bridge/index.cjs");
8
- const require_atomic = require("../../../atomic-cqafMWEI.cjs");
9
- const require_templatePath = require("../../../templatePath-BIh7wqgS.cjs");
10
- const require_containment = require("../../../containment-Dc3gO4wD.cjs");
11
- const require_dist = require("../../../dist-734JaRYi.cjs");
12
- const require_relPath = require("../../../relPath-CZiP2S_a.cjs");
4
+ const require_server = require("../../../server-BNmwQGcq.cjs");
5
+ const require_discovery = require("../../../discovery-Cu35oXeW.cjs");
6
+ const require_types = require("../../../types-Bmk0fWDr.cjs");
13
7
  let node_fs = require("node:fs");
8
+ let node_fs_promises = require("node:fs/promises");
14
9
  let node_path = require("node:path");
10
+ const require_skill_bridge_index = require("../../../skill-bridge/index.cjs");
11
+ const require_atomic = require("../../../atomic-bzFw4-ix.cjs");
12
+ const require_templatePath = require("../../../templatePath-DSawCKNy.cjs");
13
+ const require_containment = require("../../../containment-NZYJbiaa.cjs");
14
+ const require_dist = require("../../../dist-DK0zTPR1.cjs");
15
+ const require_relPath = require("../../../relPath-B-c9FUkm.cjs");
15
16
  node_path = require_rolldown_runtime.__toESM(node_path, 1);
16
- let node_fs_promises = require("node:fs/promises");
17
17
  // src/collection/registry/server/registriesConfig.ts
18
18
  var NAME_RE = /^[A-Za-z0-9][A-Za-z0-9_-]{0,31}$/;
19
19
  function isValidHttpsUrl(value) {