@openclaw/fs-safe 0.11.0 → 0.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (416) hide show
  1. package/CHANGELOG.md +119 -0
  2. package/README.md +15 -8
  3. package/dist/absolute-path.d.ts.map +1 -1
  4. package/dist/absolute-path.js +32 -11
  5. package/dist/advanced.d.ts +3 -1
  6. package/dist/advanced.d.ts.map +1 -1
  7. package/dist/advanced.js +3 -1
  8. package/dist/archive-entry.d.ts.map +1 -1
  9. package/dist/archive-entry.js +4 -3
  10. package/dist/archive-gzip-tail.d.ts.map +1 -1
  11. package/dist/archive-gzip-tail.js +13 -9
  12. package/dist/archive-input.d.ts.map +1 -1
  13. package/dist/archive-input.js +6 -2
  14. package/dist/archive-merge.d.ts.map +1 -1
  15. package/dist/archive-merge.js +15 -2
  16. package/dist/archive-native.d.ts.map +1 -1
  17. package/dist/archive-native.js +7 -19
  18. package/dist/archive-plan.js +1 -1
  19. package/dist/archive-read.d.ts.map +1 -1
  20. package/dist/archive-read.js +55 -46
  21. package/dist/archive-staging.d.ts.map +1 -1
  22. package/dist/archive-staging.js +43 -10
  23. package/dist/archive-tar-inspect.d.ts.map +1 -1
  24. package/dist/archive-tar-inspect.js +4 -1
  25. package/dist/archive-zip-admission.d.ts +1 -1
  26. package/dist/archive-zip-admission.d.ts.map +1 -1
  27. package/dist/archive-zip-admission.js +2 -2
  28. package/dist/archive-zip-directory.d.ts +3 -0
  29. package/dist/archive-zip-directory.d.ts.map +1 -1
  30. package/dist/archive-zip-directory.js +13 -2
  31. package/dist/archive-zip-loader.d.ts +3 -2
  32. package/dist/archive-zip-loader.d.ts.map +1 -1
  33. package/dist/archive-zip-loader.js +30 -4
  34. package/dist/archive-zip-manifest.d.ts +5 -0
  35. package/dist/archive-zip-manifest.d.ts.map +1 -0
  36. package/dist/archive-zip-manifest.js +22 -0
  37. package/dist/archive-zip-names.d.ts +6 -1
  38. package/dist/archive-zip-names.d.ts.map +1 -1
  39. package/dist/archive-zip-names.js +50 -17
  40. package/dist/archive-zip-preflight.d.ts.map +1 -1
  41. package/dist/archive-zip-preflight.js +3 -2
  42. package/dist/archive.d.ts.map +1 -1
  43. package/dist/archive.js +9 -4
  44. package/dist/bounded-read.js +2 -2
  45. package/dist/darwin-acl.d.ts +4 -0
  46. package/dist/darwin-acl.d.ts.map +1 -0
  47. package/dist/darwin-acl.js +24 -0
  48. package/dist/deny-mutations.d.ts.map +1 -1
  49. package/dist/deny-mutations.js +8 -2
  50. package/dist/device-path.d.ts.map +1 -1
  51. package/dist/device-path.js +5 -3
  52. package/dist/directory-durability.d.ts.map +1 -1
  53. package/dist/directory-durability.js +67 -23
  54. package/dist/directory-entry-path.d.ts +3 -0
  55. package/dist/directory-entry-path.d.ts.map +1 -0
  56. package/dist/directory-entry-path.js +21 -0
  57. package/dist/directory-guard.d.ts +17 -1
  58. package/dist/directory-guard.d.ts.map +1 -1
  59. package/dist/directory-guard.js +134 -48
  60. package/dist/directory-mode-node.d.ts +12 -0
  61. package/dist/directory-mode-node.d.ts.map +1 -1
  62. package/dist/directory-mode-node.js +102 -4
  63. package/dist/effective-uid.d.ts +2 -0
  64. package/dist/effective-uid.d.ts.map +1 -0
  65. package/dist/effective-uid.js +25 -0
  66. package/dist/file-handle-transfer.d.ts.map +1 -1
  67. package/dist/file-handle-transfer.js +98 -27
  68. package/dist/file-hash.d.ts.map +1 -1
  69. package/dist/file-hash.js +12 -2
  70. package/dist/file-lock-sync.d.ts.map +1 -1
  71. package/dist/file-lock-sync.js +36 -6
  72. package/dist/file-lock.d.ts.map +1 -1
  73. package/dist/file-lock.js +29 -9
  74. package/dist/file-observation.d.ts +1 -1
  75. package/dist/file-observation.d.ts.map +1 -1
  76. package/dist/file-store-boundary.d.ts +6 -2
  77. package/dist/file-store-boundary.d.ts.map +1 -1
  78. package/dist/file-store-boundary.js +20 -65
  79. package/dist/file-store-copy-source.d.ts +5 -0
  80. package/dist/file-store-copy-source.d.ts.map +1 -0
  81. package/dist/file-store-copy-source.js +31 -0
  82. package/dist/file-store-path.d.ts.map +1 -1
  83. package/dist/file-store-path.js +4 -1
  84. package/dist/file-store-prune.d.ts.map +1 -1
  85. package/dist/file-store-prune.js +9 -1
  86. package/dist/file-store-sync-directory.d.ts +16 -0
  87. package/dist/file-store-sync-directory.d.ts.map +1 -0
  88. package/dist/file-store-sync-directory.js +349 -0
  89. package/dist/file-store.d.ts.map +1 -1
  90. package/dist/file-store.js +11 -28
  91. package/dist/filename.d.ts +1 -0
  92. package/dist/filename.d.ts.map +1 -1
  93. package/dist/filename.js +85 -23
  94. package/dist/fs.d.ts.map +1 -1
  95. package/dist/fs.js +3 -2
  96. package/dist/guarded-mkdir.d.ts +10 -0
  97. package/dist/guarded-mkdir.d.ts.map +1 -1
  98. package/dist/guarded-mkdir.js +217 -33
  99. package/dist/guest.d.ts.map +1 -1
  100. package/dist/guest.js +16 -5
  101. package/dist/home-dir.d.ts.map +1 -1
  102. package/dist/home-dir.js +73 -10
  103. package/dist/install-path.d.ts +6 -0
  104. package/dist/install-path.d.ts.map +1 -1
  105. package/dist/install-path.js +67 -19
  106. package/dist/json-durable-queue-ownership.d.ts +8 -0
  107. package/dist/json-durable-queue-ownership.d.ts.map +1 -1
  108. package/dist/json-durable-queue-ownership.js +134 -43
  109. package/dist/json-durable-queue-paths.d.ts +11 -0
  110. package/dist/json-durable-queue-paths.d.ts.map +1 -0
  111. package/dist/json-durable-queue-paths.js +42 -0
  112. package/dist/json-durable-queue-read.d.ts +6 -0
  113. package/dist/json-durable-queue-read.d.ts.map +1 -0
  114. package/dist/json-durable-queue-read.js +61 -0
  115. package/dist/json-durable-queue.d.ts +1 -1
  116. package/dist/json-durable-queue.d.ts.map +1 -1
  117. package/dist/json-durable-queue.js +83 -134
  118. package/dist/json-store.d.ts.map +1 -1
  119. package/dist/json-store.js +5 -1
  120. package/dist/json.d.ts.map +1 -1
  121. package/dist/json.js +54 -22
  122. package/dist/local-file-access.d.ts.map +1 -1
  123. package/dist/local-file-access.js +4 -0
  124. package/dist/local-file-descriptor.d.ts +17 -0
  125. package/dist/local-file-descriptor.d.ts.map +1 -0
  126. package/dist/local-file-descriptor.js +84 -0
  127. package/dist/local-roots.d.ts.map +1 -1
  128. package/dist/local-roots.js +35 -7
  129. package/dist/move-path-cleanup.d.ts +2 -0
  130. package/dist/move-path-cleanup.d.ts.map +1 -1
  131. package/dist/move-path-cleanup.js +44 -18
  132. package/dist/move-path.d.ts.map +1 -1
  133. package/dist/move-path.js +31 -6
  134. package/dist/native-binding.d.ts +21 -0
  135. package/dist/native-binding.d.ts.map +1 -1
  136. package/dist/native-directory-observation.d.ts +17 -0
  137. package/dist/native-directory-observation.d.ts.map +1 -0
  138. package/dist/native-directory-observation.js +37 -0
  139. package/dist/native-parent-admission.d.ts +31 -0
  140. package/dist/native-parent-admission.d.ts.map +1 -0
  141. package/dist/native-parent-admission.js +124 -0
  142. package/dist/native-pinned-write-windows.d.ts +0 -1
  143. package/dist/native-pinned-write-windows.d.ts.map +1 -1
  144. package/dist/native-pinned-write-windows.js +0 -3
  145. package/dist/native-pinned-write.d.ts.map +1 -1
  146. package/dist/native-pinned-write.js +309 -40
  147. package/dist/output.d.ts.map +1 -1
  148. package/dist/output.js +15 -5
  149. package/dist/overwrite-file-handle.d.ts.map +1 -1
  150. package/dist/overwrite-file-handle.js +5 -1
  151. package/dist/owner-dacl.d.ts.map +1 -1
  152. package/dist/owner-dacl.js +2 -0
  153. package/dist/path-policy.d.ts.map +1 -1
  154. package/dist/path-policy.js +7 -2
  155. package/dist/path-prefix.d.ts +7 -0
  156. package/dist/path-prefix.d.ts.map +1 -0
  157. package/dist/path-prefix.js +82 -0
  158. package/dist/path-scope-lexical.d.ts +14 -0
  159. package/dist/path-scope-lexical.d.ts.map +1 -0
  160. package/dist/path-scope-lexical.js +37 -0
  161. package/dist/path-segment-route.d.ts +7 -0
  162. package/dist/path-segment-route.d.ts.map +1 -0
  163. package/dist/path-segment-route.js +24 -0
  164. package/dist/path-suffix-aliases.d.ts +10 -0
  165. package/dist/path-suffix-aliases.d.ts.map +1 -0
  166. package/dist/path-suffix-aliases.js +386 -0
  167. package/dist/path.d.ts.map +1 -1
  168. package/dist/path.js +35 -6
  169. package/dist/permissions-windows.d.ts.map +1 -1
  170. package/dist/permissions-windows.js +14 -3
  171. package/dist/permissions.d.ts.map +1 -1
  172. package/dist/permissions.js +37 -8
  173. package/dist/pinned-mutation-admission.d.ts +25 -0
  174. package/dist/pinned-mutation-admission.d.ts.map +1 -0
  175. package/dist/pinned-mutation-admission.js +425 -0
  176. package/dist/pinned-mutation-observation.d.ts +34 -0
  177. package/dist/pinned-mutation-observation.d.ts.map +1 -0
  178. package/dist/pinned-mutation-observation.js +142 -0
  179. package/dist/pinned-mutation-shared-route.d.ts +24 -0
  180. package/dist/pinned-mutation-shared-route.d.ts.map +1 -0
  181. package/dist/pinned-mutation-shared-route.js +70 -0
  182. package/dist/pinned-open.d.ts +6 -0
  183. package/dist/pinned-open.d.ts.map +1 -1
  184. package/dist/pinned-open.js +28 -10
  185. package/dist/pinned-write-types.d.ts +75 -0
  186. package/dist/pinned-write-types.d.ts.map +1 -0
  187. package/dist/pinned-write-types.js +1 -0
  188. package/dist/pinned-write.d.ts +7 -33
  189. package/dist/pinned-write.d.ts.map +1 -1
  190. package/dist/pinned-write.js +152 -17
  191. package/dist/private-directory.d.ts.map +1 -1
  192. package/dist/private-directory.js +2 -0
  193. package/dist/private-producer-handoff.d.ts +16 -0
  194. package/dist/private-producer-handoff.d.ts.map +1 -0
  195. package/dist/private-producer-handoff.js +272 -0
  196. package/dist/private-temp-workspace.d.ts +2 -39
  197. package/dist/private-temp-workspace.d.ts.map +1 -1
  198. package/dist/private-temp-workspace.js +183 -77
  199. package/dist/publish-file.d.ts.map +1 -1
  200. package/dist/publish-file.js +33 -29
  201. package/dist/regular-file.d.ts.map +1 -1
  202. package/dist/regular-file.js +56 -45
  203. package/dist/replace-directory.d.ts.map +1 -1
  204. package/dist/replace-directory.js +12 -5
  205. package/dist/replace-file-temp-owner.d.ts +1 -0
  206. package/dist/replace-file-temp-owner.d.ts.map +1 -1
  207. package/dist/replace-file-temp-owner.js +12 -1
  208. package/dist/replace-file.d.ts.map +1 -1
  209. package/dist/replace-file.js +24 -24
  210. package/dist/root-boundary.d.ts +29 -0
  211. package/dist/root-boundary.d.ts.map +1 -0
  212. package/dist/root-boundary.js +182 -0
  213. package/dist/root-context.d.ts +12 -1
  214. package/dist/root-context.d.ts.map +1 -1
  215. package/dist/root-context.js +89 -16
  216. package/dist/root-directory-creation.d.ts +13 -0
  217. package/dist/root-directory-creation.d.ts.map +1 -0
  218. package/dist/root-directory-creation.js +212 -0
  219. package/dist/root-directory-list.d.ts +16 -4
  220. package/dist/root-directory-list.d.ts.map +1 -1
  221. package/dist/root-directory-list.js +182 -33
  222. package/dist/root-directory.d.ts +23 -0
  223. package/dist/root-directory.d.ts.map +1 -0
  224. package/dist/root-directory.js +141 -0
  225. package/dist/root-errors.d.ts.map +1 -1
  226. package/dist/root-errors.js +12 -1
  227. package/dist/root-file-final-admission.d.ts +21 -0
  228. package/dist/root-file-final-admission.d.ts.map +1 -0
  229. package/dist/root-file-final-admission.js +83 -0
  230. package/dist/root-file.d.ts.map +1 -1
  231. package/dist/root-file.js +103 -24
  232. package/dist/root-impl.d.ts +1 -0
  233. package/dist/root-impl.d.ts.map +1 -1
  234. package/dist/root-impl.js +316 -325
  235. package/dist/root-move-noreplace.d.ts +14 -0
  236. package/dist/root-move-noreplace.d.ts.map +1 -0
  237. package/dist/root-move-noreplace.js +202 -0
  238. package/dist/root-move-preflight.d.ts +8 -0
  239. package/dist/root-move-preflight.d.ts.map +1 -0
  240. package/dist/root-move-preflight.js +16 -0
  241. package/dist/root-observed-path.d.ts +9 -0
  242. package/dist/root-observed-path.d.ts.map +1 -0
  243. package/dist/root-observed-path.js +95 -0
  244. package/dist/root-path-errors.d.ts +12 -0
  245. package/dist/root-path-errors.d.ts.map +1 -0
  246. package/dist/root-path-errors.js +13 -0
  247. package/dist/root-path-existing.d.ts +2 -0
  248. package/dist/root-path-existing.d.ts.map +1 -1
  249. package/dist/root-path-existing.js +63 -22
  250. package/dist/root-path-observation.d.ts +63 -0
  251. package/dist/root-path-observation.d.ts.map +1 -0
  252. package/dist/root-path-observation.js +180 -0
  253. package/dist/root-path-stat.d.ts +5 -0
  254. package/dist/root-path-stat.d.ts.map +1 -0
  255. package/dist/root-path-stat.js +101 -0
  256. package/dist/root-path-symlink.d.ts.map +1 -1
  257. package/dist/root-path-symlink.js +23 -4
  258. package/dist/root-path.d.ts +13 -0
  259. package/dist/root-path.d.ts.map +1 -1
  260. package/dist/root-path.js +263 -73
  261. package/dist/root-paths-lexical.d.ts +9 -0
  262. package/dist/root-paths-lexical.d.ts.map +1 -0
  263. package/dist/root-paths-lexical.js +22 -0
  264. package/dist/root-paths.d.ts +3 -29
  265. package/dist/root-paths.d.ts.map +1 -1
  266. package/dist/root-paths.js +89 -178
  267. package/dist/root-read-admission.d.ts +26 -0
  268. package/dist/root-read-admission.d.ts.map +1 -0
  269. package/dist/root-read-admission.js +94 -0
  270. package/dist/root-remove-identity.d.ts +15 -0
  271. package/dist/root-remove-identity.d.ts.map +1 -0
  272. package/dist/root-remove-identity.js +89 -0
  273. package/dist/root-remove-receipt.d.ts +17 -0
  274. package/dist/root-remove-receipt.d.ts.map +1 -0
  275. package/dist/root-remove-receipt.js +37 -0
  276. package/dist/root-remove.d.ts +2 -1
  277. package/dist/root-remove.d.ts.map +1 -1
  278. package/dist/root-remove.js +172 -10
  279. package/dist/root-walk.d.ts.map +1 -1
  280. package/dist/root-walk.js +2 -1
  281. package/dist/root-write-admission.d.ts +68 -0
  282. package/dist/root-write-admission.d.ts.map +1 -0
  283. package/dist/root-write-admission.js +322 -0
  284. package/dist/root-write-compatibility.d.ts +13 -0
  285. package/dist/root-write-compatibility.d.ts.map +1 -0
  286. package/dist/root-write-compatibility.js +74 -0
  287. package/dist/root-write-complete-parent.d.ts +42 -0
  288. package/dist/root-write-complete-parent.d.ts.map +1 -0
  289. package/dist/root-write-complete-parent.js +195 -0
  290. package/dist/root-write-mode.d.ts +2 -0
  291. package/dist/root-write-mode.d.ts.map +1 -1
  292. package/dist/root-write-mode.js +20 -7
  293. package/dist/root-write-publication.d.ts +24 -0
  294. package/dist/root-write-publication.d.ts.map +1 -0
  295. package/dist/root-write-publication.js +85 -0
  296. package/dist/root-write-verification.d.ts.map +1 -1
  297. package/dist/root-write-verification.js +18 -7
  298. package/dist/safe-path-segment.d.ts.map +1 -1
  299. package/dist/safe-path-segment.js +3 -1
  300. package/dist/secret-file.d.ts.map +1 -1
  301. package/dist/secret-file.js +62 -24
  302. package/dist/secret-read-async.d.ts.map +1 -1
  303. package/dist/secret-read-async.js +18 -13
  304. package/dist/secret-read-policy.d.ts.map +1 -1
  305. package/dist/secret-read-policy.js +5 -1
  306. package/dist/secure-file-windows.d.ts +10 -0
  307. package/dist/secure-file-windows.d.ts.map +1 -0
  308. package/dist/secure-file-windows.js +186 -0
  309. package/dist/secure-file.d.ts.map +1 -1
  310. package/dist/secure-file.js +98 -10
  311. package/dist/secure-temp-dir.d.ts +6 -3
  312. package/dist/secure-temp-dir.d.ts.map +1 -1
  313. package/dist/secure-temp-dir.js +121 -101
  314. package/dist/secure-temp-repair.d.ts +35 -0
  315. package/dist/secure-temp-repair.d.ts.map +1 -0
  316. package/dist/secure-temp-repair.js +106 -0
  317. package/dist/sibling-staged-file.d.ts +3 -1
  318. package/dist/sibling-staged-file.d.ts.map +1 -1
  319. package/dist/sibling-staged-file.js +181 -50
  320. package/dist/sibling-temp.d.ts.map +1 -1
  321. package/dist/sibling-temp.js +27 -12
  322. package/dist/sidecar-lock-acquire.d.ts.map +1 -1
  323. package/dist/sidecar-lock-acquire.js +45 -15
  324. package/dist/sidecar-lock-root.d.ts.map +1 -1
  325. package/dist/sidecar-lock-root.js +4 -2
  326. package/dist/sidecar-lock.d.ts.map +1 -1
  327. package/dist/sidecar-lock.js +2 -3
  328. package/dist/staged-directory.d.ts +14 -5
  329. package/dist/staged-directory.d.ts.map +1 -1
  330. package/dist/staged-directory.js +54 -3
  331. package/dist/standalone-publication-path.d.ts +2 -0
  332. package/dist/standalone-publication-path.d.ts.map +1 -0
  333. package/dist/standalone-publication-path.js +6 -0
  334. package/dist/stat-observation.d.ts +11 -0
  335. package/dist/stat-observation.d.ts.map +1 -0
  336. package/dist/stat-observation.js +64 -0
  337. package/dist/strict-file-identity.d.ts.map +1 -1
  338. package/dist/strict-file-identity.js +39 -2
  339. package/dist/symlink-parents.d.ts.map +1 -1
  340. package/dist/symlink-parents.js +7 -2
  341. package/dist/temp-target.d.ts +2 -0
  342. package/dist/temp-target.d.ts.map +1 -1
  343. package/dist/temp-target.js +133 -4
  344. package/dist/temp-workspace-admission.d.ts +22 -0
  345. package/dist/temp-workspace-admission.d.ts.map +1 -0
  346. package/dist/temp-workspace-admission.js +374 -0
  347. package/dist/temp-workspace-child-admission.d.ts +13 -0
  348. package/dist/temp-workspace-child-admission.d.ts.map +1 -0
  349. package/dist/temp-workspace-child-admission.js +95 -0
  350. package/dist/temp-workspace-descriptor.d.ts +48 -0
  351. package/dist/temp-workspace-descriptor.d.ts.map +1 -0
  352. package/dist/temp-workspace-descriptor.js +363 -0
  353. package/dist/temp-workspace-identity.d.ts +15 -0
  354. package/dist/temp-workspace-identity.d.ts.map +1 -0
  355. package/dist/temp-workspace-identity.js +41 -0
  356. package/dist/temp-workspace-owner.d.ts +7 -6
  357. package/dist/temp-workspace-owner.d.ts.map +1 -1
  358. package/dist/temp-workspace-owner.js +121 -61
  359. package/dist/temp-workspace-permissions.d.ts +4 -0
  360. package/dist/temp-workspace-permissions.d.ts.map +1 -0
  361. package/dist/temp-workspace-permissions.js +32 -0
  362. package/dist/temp-workspace-types.d.ts +40 -0
  363. package/dist/temp-workspace-types.d.ts.map +1 -0
  364. package/dist/temp-workspace-types.js +1 -0
  365. package/dist/temp.d.ts +1 -1
  366. package/dist/temp.d.ts.map +1 -1
  367. package/dist/temp.js +1 -1
  368. package/dist/test-hooks.d.ts +7 -0
  369. package/dist/test-hooks.d.ts.map +1 -1
  370. package/dist/text-atomic.d.ts.map +1 -1
  371. package/dist/text-atomic.js +3 -1
  372. package/dist/trash.d.ts.map +1 -1
  373. package/dist/trash.js +54 -8
  374. package/dist/walk.d.ts.map +1 -1
  375. package/dist/walk.js +20 -16
  376. package/dist/windows-owner.d.ts.map +1 -1
  377. package/dist/windows-owner.js +5 -0
  378. package/dist/windows-path-alias.d.ts +39 -0
  379. package/dist/windows-path-alias.d.ts.map +1 -0
  380. package/dist/windows-path-alias.js +153 -0
  381. package/docs/advanced.md +28 -1
  382. package/docs/archive.md +29 -2
  383. package/docs/atomic.md +27 -3
  384. package/docs/contributing.md +4 -1
  385. package/docs/copy.md +4 -1
  386. package/docs/durability.md +18 -2
  387. package/docs/errors.md +14 -6
  388. package/docs/file-store.md +30 -3
  389. package/docs/filename.md +21 -7
  390. package/docs/guest.md +5 -0
  391. package/docs/install-path.md +61 -15
  392. package/docs/install.md +12 -8
  393. package/docs/json-store.md +5 -1
  394. package/docs/json.md +11 -0
  395. package/docs/mutation-policy-proof.md +65 -0
  396. package/docs/native-helper.md +28 -9
  397. package/docs/native.md +46 -10
  398. package/docs/output.md +33 -11
  399. package/docs/path-prefix.md +64 -0
  400. package/docs/path-suffix-aliases.md +159 -0
  401. package/docs/path.md +12 -1
  402. package/docs/permissions.md +26 -1
  403. package/docs/private-file-store.md +14 -0
  404. package/docs/public-api.md +14 -0
  405. package/docs/quickstart.md +1 -1
  406. package/docs/reading.md +8 -1
  407. package/docs/root.md +21 -4
  408. package/docs/secret-file.md +3 -0
  409. package/docs/secure-file.md +21 -16
  410. package/docs/security-model.md +76 -9
  411. package/docs/sidecar-lock.md +28 -1
  412. package/docs/store.md +27 -2
  413. package/docs/temp.md +262 -34
  414. package/docs/test-hooks.md +14 -0
  415. package/docs/writing.md +38 -8
  416. package/package.json +10 -10
@@ -6,13 +6,50 @@ import path from "node:path";
6
6
  import { syncDirectory } from "./directory-durability.js";
7
7
  import { FsSafeError } from "./errors.js";
8
8
  import { sameFileIdentityForCleanup, sha256Hex } from "./file-identity.js";
9
+ import { inspectFileIdentity } from "./strict-file-identity.js";
9
10
  import { serializePathWrite } from "./write-queue.js";
11
+ import { assertNoWindowsPathAlias } from "./windows-path-alias.js";
12
+ const validatedDurableQueueEntryPaths = new WeakSet();
13
+ function assertQueuePathString(value, label) {
14
+ if (typeof value !== "string") {
15
+ throw new FsSafeError("invalid-path", `${label} must be a string`);
16
+ }
17
+ }
18
+ export function validateDurableQueueEntryPaths(paths) {
19
+ const jsonPath = paths.jsonPath;
20
+ const deliveredPath = paths.deliveredPath;
21
+ const requestedProcessingPath = paths.processingPath;
22
+ assertQueuePathString(jsonPath, "queue JSON path");
23
+ assertQueuePathString(deliveredPath, "queue delivered path");
24
+ if (requestedProcessingPath !== undefined) {
25
+ assertQueuePathString(requestedProcessingPath, "queue processing path");
26
+ }
27
+ assertNoWindowsPathAlias(jsonPath);
28
+ assertNoWindowsPathAlias(deliveredPath);
29
+ if (requestedProcessingPath !== undefined) {
30
+ assertNoWindowsPathAlias(requestedProcessingPath);
31
+ }
32
+ const processingPath = requestedProcessingPath || processingPathFromJsonPath(jsonPath);
33
+ const validated = Object.freeze({ deliveredPath, jsonPath, processingPath });
34
+ validatedDurableQueueEntryPaths.add(validated);
35
+ return validated;
36
+ }
37
+ function ownDurableQueueEntryPaths(paths) {
38
+ if (validatedDurableQueueEntryPaths.has(paths)) {
39
+ return paths;
40
+ }
41
+ return validateDurableQueueEntryPaths(paths);
42
+ }
43
+ function processingPathFromJsonPath(jsonPath) {
44
+ return jsonPath.endsWith(".json")
45
+ ? `${jsonPath.slice(0, -".json".length)}.processing`
46
+ : `${jsonPath}.processing`;
47
+ }
10
48
  export function durableQueueProcessingPath(paths) {
11
- if (paths.processingPath)
12
- return paths.processingPath;
13
- return paths.jsonPath.endsWith(".json")
14
- ? `${paths.jsonPath.slice(0, -".json".length)}.processing`
15
- : `${paths.jsonPath}.processing`;
49
+ const processingPath = paths.processingPath;
50
+ if (processingPath)
51
+ return processingPath;
52
+ return processingPathFromJsonPath(paths.jsonPath);
16
53
  }
17
54
  async function regularQueueFileIdentity(filePath) {
18
55
  const identity = await lstatOrNull(filePath);
@@ -24,18 +61,27 @@ async function regularQueueFileIdentity(filePath) {
24
61
  return identity;
25
62
  }
26
63
  async function withQueueEntryLock(paths, run) {
27
- return await serializePathWrite(paths.jsonPath, async () => await withQueueTransferLock(path.resolve(paths.jsonPath), run));
64
+ const resolvedJsonPath = path.resolve(paths.jsonPath);
65
+ assertNoWindowsPathAlias(resolvedJsonPath);
66
+ return await serializePathWrite(paths.jsonPath, async () => await withQueueTransferLock(resolvedJsonPath, run));
28
67
  }
29
68
  async function claimDurableQueueEntryUnlocked(paths, options = {}) {
30
- const processingPath = durableQueueProcessingPath(paths);
69
+ const processingPath = paths.processingPath;
31
70
  await recoverDurableQueueRetirement({ jsonPath: paths.jsonPath, processingPath });
32
71
  const existingProcessing = await regularQueueFileIdentity(processingPath);
33
72
  if (existingProcessing) {
34
73
  const pending = await lstatOrNull(paths.jsonPath);
35
- if (pending &&
74
+ const retiresPending = pending !== null &&
36
75
  !pending.isSymbolicLink() &&
37
76
  pending.isFile() &&
38
- sameFileIdentityForCleanup(pending, existingProcessing)) {
77
+ sameFileIdentityForCleanup(pending, existingProcessing);
78
+ if (!retiresPending ||
79
+ path.resolve(path.dirname(processingPath)) !== path.resolve(path.dirname(paths.jsonPath))) {
80
+ // An existing claim can contain a migration whose publication sync failed.
81
+ // Retirement already syncs this edge when both names share a parent.
82
+ await syncDirectory(path.dirname(processingPath));
83
+ }
84
+ if (retiresPending) {
39
85
  await retireDurableQueueSource({ jsonPath: paths.jsonPath, processingPath });
40
86
  }
41
87
  return processingPath;
@@ -54,7 +100,10 @@ async function claimDurableQueueEntryUnlocked(paths, options = {}) {
54
100
  }
55
101
  catch (error) {
56
102
  if (getErrorCode(error) === "EEXIST") {
57
- return (await regularQueueFileIdentity(processingPath)) ? processingPath : null;
103
+ if (!(await regularQueueFileIdentity(processingPath)))
104
+ return null;
105
+ await syncDirectory(path.dirname(processingPath));
106
+ return processingPath;
58
107
  }
59
108
  if (getErrorCode(error) === "ENOENT")
60
109
  return null;
@@ -69,88 +118,130 @@ async function claimDurableQueueEntryUnlocked(paths, options = {}) {
69
118
  return processingPath;
70
119
  }
71
120
  export async function claimDurableQueueEntry(paths, options = {}) {
72
- if (!(await lstatOrNull(path.dirname(paths.jsonPath))))
121
+ const validatedPaths = ownDurableQueueEntryPaths(paths);
122
+ if (!(await lstatOrNull(path.dirname(validatedPaths.jsonPath))))
73
123
  return null;
74
- return await withQueueEntryLock(paths, async () => await claimDurableQueueEntryUnlocked(paths, options));
124
+ return await withQueueEntryLock(validatedPaths, async () => await claimDurableQueueEntryUnlocked(validatedPaths, options));
125
+ }
126
+ // The caller retains its read pin until this owner releases it or migration settles.
127
+ export async function migrateDurableQueueEntry(paths, expected, releaseReadPin, run) {
128
+ const validatedPaths = ownDurableQueueEntryPaths(paths);
129
+ return await withQueueEntryLock(validatedPaths, async () => {
130
+ const processingPath = validatedPaths.processingPath;
131
+ const assertCurrent = async () => {
132
+ try {
133
+ await inspectFileIdentity(() => {
134
+ const current = fsSync.lstatSync(processingPath, { bigint: true });
135
+ if (current.isSymbolicLink() || !current.isFile() || current.nlink !== 1n) {
136
+ throw new FsSafeError("path-mismatch", "queue migration requires its original processing claim");
137
+ }
138
+ return current;
139
+ }, expected);
140
+ }
141
+ catch (error) {
142
+ if (getErrorCode(error) === "ENOENT") {
143
+ throw new FsSafeError("path-mismatch", "queue processing claim disappeared before migration", { cause: error });
144
+ }
145
+ throw error;
146
+ }
147
+ };
148
+ await assertCurrent();
149
+ return await run(processingPath, async () => {
150
+ await assertCurrent();
151
+ if (process.platform === "win32") {
152
+ // Windows cannot replace our still-open target. Keep the transfer lock
153
+ // across release and reject changes made while the async close settles.
154
+ await releaseReadPin();
155
+ await assertCurrent();
156
+ }
157
+ });
158
+ });
75
159
  }
76
160
  export async function completeDeliveredQueueEntry(paths) {
77
- if (!(await lstatOrNull(path.dirname(paths.deliveredPath))))
161
+ const validatedPaths = ownDurableQueueEntryPaths(paths);
162
+ if (!(await lstatOrNull(path.dirname(validatedPaths.deliveredPath))))
78
163
  return false;
79
- return await withQueueEntryLock(paths, async () => {
80
- if (!(await regularQueueFileIdentity(paths.deliveredPath)))
164
+ return await withQueueEntryLock(validatedPaths, async () => {
165
+ if (!(await regularQueueFileIdentity(validatedPaths.deliveredPath)))
81
166
  return false;
82
- if (await regularQueueFileIdentity(durableQueueProcessingPath(paths))) {
83
- await fs.unlink(paths.deliveredPath);
84
- await syncDirectory(path.dirname(paths.deliveredPath));
167
+ if (await regularQueueFileIdentity(validatedPaths.processingPath)) {
168
+ await fs.unlink(validatedPaths.deliveredPath);
169
+ await syncDirectory(path.dirname(validatedPaths.deliveredPath));
85
170
  return false;
86
171
  }
87
- await fs.unlink(paths.deliveredPath);
88
- await syncDirectory(path.dirname(paths.deliveredPath));
172
+ await fs.unlink(validatedPaths.deliveredPath);
173
+ await syncDirectory(path.dirname(validatedPaths.deliveredPath));
89
174
  return true;
90
175
  });
91
176
  }
92
177
  export async function acknowledgeDurableQueueEntry(paths) {
93
- if (!(await lstatOrNull(path.dirname(paths.jsonPath))))
178
+ const validatedPaths = ownDurableQueueEntryPaths(paths);
179
+ if (!(await lstatOrNull(path.dirname(validatedPaths.jsonPath))))
94
180
  return;
95
- await withQueueEntryLock(paths, async () => {
96
- const processingPath = durableQueueProcessingPath(paths);
181
+ await withQueueEntryLock(validatedPaths, async () => {
182
+ const processingPath = validatedPaths.processingPath;
97
183
  const processing = await regularQueueFileIdentity(processingPath);
98
- const delivered = await regularQueueFileIdentity(paths.deliveredPath);
184
+ const delivered = await regularQueueFileIdentity(validatedPaths.deliveredPath);
99
185
  if (!processing) {
100
186
  if (delivered) {
101
- await fs.unlink(paths.deliveredPath);
187
+ await fs.unlink(validatedPaths.deliveredPath);
102
188
  }
103
- await syncDirectory(path.dirname(paths.deliveredPath));
104
- if (await regularQueueFileIdentity(paths.jsonPath)) {
189
+ await syncDirectory(path.dirname(validatedPaths.deliveredPath));
190
+ if (await regularQueueFileIdentity(validatedPaths.jsonPath)) {
105
191
  throw new FsSafeError("path-mismatch", "queue acknowledgement requires a processing claim");
106
192
  }
107
193
  return;
108
194
  }
109
195
  if (delivered)
110
- await fs.unlink(paths.deliveredPath);
111
- await fs.rename(processingPath, paths.deliveredPath);
112
- await syncDirectory(path.dirname(paths.deliveredPath));
113
- await fs.unlink(paths.deliveredPath);
114
- await syncDirectory(path.dirname(paths.deliveredPath));
196
+ await fs.unlink(validatedPaths.deliveredPath);
197
+ await fs.rename(processingPath, validatedPaths.deliveredPath);
198
+ await syncDirectory(path.dirname(validatedPaths.deliveredPath));
199
+ await fs.unlink(validatedPaths.deliveredPath);
200
+ await syncDirectory(path.dirname(validatedPaths.deliveredPath));
115
201
  });
116
202
  }
117
203
  export async function moveDurableQueueEntryToFailed(params) {
118
- await withQueueEntryLock(params.paths, async () => {
119
- const processingPath = durableQueueProcessingPath(params.paths);
204
+ const pathsInput = params.paths;
205
+ const paths = ownDurableQueueEntryPaths(pathsInput);
206
+ const failedPath = params.failedPath;
207
+ assertQueuePathString(failedPath, "failed queue path");
208
+ assertNoWindowsPathAlias(failedPath);
209
+ await withQueueEntryLock(paths, async () => {
210
+ const processingPath = paths.processingPath;
120
211
  const processing = await regularQueueFileIdentity(processingPath);
121
- const existingFailed = await regularQueueFileIdentity(params.failedPath);
212
+ const existingFailed = await regularQueueFileIdentity(failedPath);
122
213
  if (!processing && existingFailed) {
123
- await syncDirectory(path.dirname(params.failedPath));
214
+ await syncDirectory(path.dirname(failedPath));
124
215
  await syncDirectory(path.dirname(processingPath));
125
- const recoveredFailed = await regularQueueFileIdentity(params.failedPath);
216
+ const recoveredFailed = await regularQueueFileIdentity(failedPath);
126
217
  if (!recoveredFailed ||
127
218
  !sameFileIdentityForCleanup(existingFailed, recoveredFailed)) {
128
219
  throw new FsSafeError("path-mismatch", "failed queue destination changed during recovery");
129
220
  }
130
- if (await regularQueueFileIdentity(params.paths.jsonPath)) {
221
+ if (await regularQueueFileIdentity(paths.jsonPath)) {
131
222
  throw new FsSafeError("already-exists", "failed queue destination already exists");
132
223
  }
133
224
  return;
134
225
  }
135
226
  const sourcePath = processing
136
227
  ? processingPath
137
- : await claimDurableQueueEntryUnlocked(params.paths);
228
+ : await claimDurableQueueEntryUnlocked(paths);
138
229
  if (!sourcePath) {
139
230
  throw Object.assign(new Error("queue entry does not exist"), { code: "ENOENT" });
140
231
  }
141
232
  const source = await regularQueueFileIdentity(sourcePath);
142
- const failed = await regularQueueFileIdentity(params.failedPath);
233
+ const failed = await regularQueueFileIdentity(failedPath);
143
234
  if (failed) {
144
235
  if (source && sameFileIdentityForCleanup(source, failed)) {
145
- await syncDirectory(path.dirname(params.failedPath));
236
+ await syncDirectory(path.dirname(failedPath));
146
237
  await fs.unlink(sourcePath);
147
238
  await syncDirectory(path.dirname(sourcePath));
148
239
  return;
149
240
  }
150
241
  throw new FsSafeError("already-exists", "failed queue destination already exists");
151
242
  }
152
- await fs.link(sourcePath, params.failedPath);
153
- await syncDirectory(path.dirname(params.failedPath));
243
+ await fs.link(sourcePath, failedPath);
244
+ await syncDirectory(path.dirname(failedPath));
154
245
  await fs.unlink(sourcePath);
155
246
  await syncDirectory(path.dirname(sourcePath));
156
247
  });
@@ -0,0 +1,11 @@
1
+ export type QueueValidationRoot = {
2
+ path: string;
3
+ allowSymlinkBase: boolean;
4
+ };
5
+ export declare function resolveQueueFilesystemPath(value: string): string;
6
+ export declare function queueValidationRoots(queueDir: string, failedDir: string): Promise<{
7
+ queueRoot: QueueValidationRoot;
8
+ failedRoot: QueueValidationRoot;
9
+ }>;
10
+ export declare function queueValidationRoot(dir: string): QueueValidationRoot;
11
+ //# sourceMappingURL=json-durable-queue-paths.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"json-durable-queue-paths.d.ts","sourceRoot":"","sources":["../src/json-durable-queue-paths.ts"],"names":[],"mappings":"AAMA,MAAM,MAAM,mBAAmB,GAAG;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,gBAAgB,EAAE,OAAO,CAAC;CAC3B,CAAC;AAEF,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAIhE;AAqBD,wBAAsB,oBAAoB,CACxC,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC;IAAE,SAAS,EAAE,mBAAmB,CAAC;IAAC,UAAU,EAAE,mBAAmB,CAAA;CAAE,CAAC,CAU9E;AAED,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,MAAM,GAAG,mBAAmB,CAKpE"}
@@ -0,0 +1,42 @@
1
+ import path from "node:path";
2
+ import { assertNoWindowsPathAlias, resolvePathPreservingWindowsRoot, } from "./windows-path-alias.js";
3
+ export function resolveQueueFilesystemPath(value) {
4
+ const resolved = resolvePathPreservingWindowsRoot(value);
5
+ assertNoWindowsPathAlias(resolved);
6
+ return resolved;
7
+ }
8
+ function commonPathAncestor(paths) {
9
+ const resolved = paths.map(resolveQueueFilesystemPath);
10
+ const root = path.parse(resolved[0] ?? process.cwd()).root;
11
+ const parts = resolved.map((entry) => path.relative(root, entry).split(path.sep));
12
+ const common = [];
13
+ for (let index = 0; parts.every((part) => index < part.length); index++) {
14
+ const segment = parts[0]?.[index];
15
+ if (!segment || !parts.every((part) => part[index] === segment))
16
+ break;
17
+ common.push(segment);
18
+ }
19
+ return path.join(root, ...common);
20
+ }
21
+ function samePathRoot(paths) {
22
+ const roots = paths.map((entry) => path.parse(resolveQueueFilesystemPath(entry)).root);
23
+ const first = process.platform === "win32" ? roots[0]?.toLowerCase() : roots[0];
24
+ return roots.every((root) => (process.platform === "win32" ? root.toLowerCase() : root) === first);
25
+ }
26
+ export async function queueValidationRoots(queueDir, failedDir) {
27
+ if (samePathRoot([queueDir, failedDir])) {
28
+ const common = commonPathAncestor([queueDir, failedDir]);
29
+ const root = queueValidationRoot(common);
30
+ return { failedRoot: root, queueRoot: root };
31
+ }
32
+ return {
33
+ failedRoot: queueValidationRoot(failedDir),
34
+ queueRoot: queueValidationRoot(queueDir),
35
+ };
36
+ }
37
+ export function queueValidationRoot(dir) {
38
+ return {
39
+ path: path.parse(resolveQueueFilesystemPath(dir)).root,
40
+ allowSymlinkBase: process.platform === "darwin",
41
+ };
42
+ }
@@ -0,0 +1,6 @@
1
+ import { type BigIntStats } from "node:fs";
2
+ export declare const DEFAULT_JSON_DURABLE_QUEUE_ENTRY_MAX_BYTES: number;
3
+ export declare function withJsonDurableQueueEntry<T, R>(filePath: string, options: {
4
+ maxBytes?: number;
5
+ }, run: (entry: T, identity: BigIntStats, releaseReadPin: () => Promise<void>) => Promise<R>): Promise<R>;
6
+ //# sourceMappingURL=json-durable-queue-read.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"json-durable-queue-read.d.ts","sourceRoot":"","sources":["../src/json-durable-queue-read.ts"],"names":[],"mappings":"AAAA,OAAW,EAAE,KAAK,WAAW,EAAE,MAAM,SAAS,CAAC;AAO/C,eAAO,MAAM,0CAA0C,QAAmB,CAAC;AA8B3E,wBAAsB,yBAAyB,CAAC,CAAC,EAAE,CAAC,EAClD,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE;IAAE,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAE,EAC9B,GAAG,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,QAAQ,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,KAAK,OAAO,CAAC,CAAC,CAAC,GACxF,OAAO,CAAC,CAAC,CAAC,CA+BZ"}
@@ -0,0 +1,61 @@
1
+ import fs, {} from "node:fs";
2
+ import { normalizeMaxBytes } from "./byte-budget.js";
3
+ import { readBoundedAsync } from "./bounded-read.js";
4
+ import { resolveReadOpenFlags } from "./read-open-flags.js";
5
+ import { inspectFileIdentity } from "./strict-file-identity.js";
6
+ import { assertNoWindowsPathAlias } from "./windows-path-alias.js";
7
+ export const DEFAULT_JSON_DURABLE_QUEUE_ENTRY_MAX_BYTES = 16 * 1024 * 1024;
8
+ async function inspectQueueEntry(inspect, maxBytes, expected) {
9
+ let inspectionFailed = false;
10
+ try {
11
+ return await inspectFileIdentity(async () => {
12
+ try {
13
+ const stat = inspect();
14
+ if (stat.isSymbolicLink() || !stat.isFile()) {
15
+ throw new Error("queue entry is not a regular file");
16
+ }
17
+ if (stat.nlink > 1n)
18
+ throw new Error("queue entry hardlinks are not allowed");
19
+ if (stat.size > maxBytes)
20
+ throw new Error(`queue entry exceeds ${maxBytes} bytes`);
21
+ return stat;
22
+ }
23
+ catch (error) {
24
+ inspectionFailed = true;
25
+ throw error;
26
+ }
27
+ }, expected);
28
+ }
29
+ catch (error) {
30
+ // Translate only the identity helper's rejection, never inspection errors.
31
+ if (inspectionFailed)
32
+ throw error;
33
+ throw new Error("queue entry changed during read", { cause: error });
34
+ }
35
+ }
36
+ export async function withJsonDurableQueueEntry(filePath, options, run) {
37
+ const maxBytes = normalizeMaxBytes(options.maxBytes, {
38
+ defaultValue: DEFAULT_JSON_DURABLE_QUEUE_ENTRY_MAX_BYTES,
39
+ });
40
+ assertNoWindowsPathAlias(filePath);
41
+ const inspectPath = () => fs.lstatSync(filePath, { bigint: true });
42
+ const initialStat = await inspectQueueEntry(inspectPath, maxBytes);
43
+ const handle = await fs.promises.open(filePath, resolveReadOpenFlags());
44
+ let closePromise;
45
+ const releaseReadPin = () => closePromise ??= (async () => { await handle.close(); })();
46
+ try {
47
+ const openedStat = await inspectQueueEntry(() => fs.fstatSync(handle.fd, { bigint: true }), maxBytes, initialStat);
48
+ await inspectQueueEntry(inspectPath, maxBytes, openedStat);
49
+ const bytes = await readBoundedAsync(maxBytes, async (buffer, length) => (await handle.read(buffer, 0, length, null)).bytesRead, {
50
+ initialSize: openedStat.size >= 0n && Number.isSafeInteger(Number(openedStat.size))
51
+ ? Number(openedStat.size) : undefined,
52
+ createLimitError: () => new Error(`queue entry exceeds ${maxBytes} bytes`),
53
+ });
54
+ // The migration owner may release this pin only at the verified publication
55
+ // boundary; until then an unlinked inode cannot be recycled into a new claim.
56
+ return await run(JSON.parse(bytes.toString("utf8")), openedStat, releaseReadPin);
57
+ }
58
+ finally {
59
+ await releaseReadPin();
60
+ }
61
+ }
@@ -1,3 +1,4 @@
1
+ export { DEFAULT_JSON_DURABLE_QUEUE_ENTRY_MAX_BYTES } from "./json-durable-queue-read.js";
1
2
  export type JsonDurableQueueEntryPaths = {
2
3
  jsonPath: string;
3
4
  deliveredPath: string;
@@ -14,7 +15,6 @@ export type JsonDurableQueueLoadOptions<T> = {
14
15
  cleanupTmpMaxAgeMs?: number;
15
16
  maxBytes?: number;
16
17
  };
17
- export declare const DEFAULT_JSON_DURABLE_QUEUE_ENTRY_MAX_BYTES: number;
18
18
  export declare function unlinkBestEffort(filePath: string): Promise<void>;
19
19
  export declare function jsonDurableQueueEntryExists(filePath: string): Promise<boolean>;
20
20
  export declare function resolveJsonDurableQueueEntryPaths(queueDir: string, id: string): JsonDurableQueueEntryPaths;
@@ -1 +1 @@
1
- {"version":3,"file":"json-durable-queue.d.ts","sourceRoot":"","sources":["../src/json-durable-queue.ts"],"names":[],"mappings":"AAsBA,MAAM,MAAM,0BAA0B,GAAG;IACvC,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;IACtB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF,MAAM,MAAM,0BAA0B,CAAC,CAAC,IAAI;IAC1C,KAAK,EAAE,CAAC,CAAC;IACT,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,2BAA2B,CAAC,CAAC,IAAI;IAC3C,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACn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