@openclaw/fs-safe 0.12.0 → 0.13.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 (395) hide show
  1. package/CHANGELOG.md +73 -0
  2. package/README.md +12 -7
  3. package/dist/absolute-path.d.ts.map +1 -1
  4. package/dist/absolute-path.js +32 -11
  5. package/dist/advanced.d.ts +2 -0
  6. package/dist/advanced.d.ts.map +1 -1
  7. package/dist/advanced.js +2 -0
  8. package/dist/archive-input.d.ts.map +1 -1
  9. package/dist/archive-input.js +6 -2
  10. package/dist/archive-merge.d.ts.map +1 -1
  11. package/dist/archive-merge.js +15 -2
  12. package/dist/archive-native.d.ts.map +1 -1
  13. package/dist/archive-native.js +7 -19
  14. package/dist/archive-plan.js +1 -1
  15. package/dist/archive-read.d.ts.map +1 -1
  16. package/dist/archive-read.js +18 -13
  17. package/dist/archive-staging.d.ts.map +1 -1
  18. package/dist/archive-staging.js +43 -10
  19. package/dist/archive-tar-inspect.d.ts.map +1 -1
  20. package/dist/archive-tar-inspect.js +4 -1
  21. package/dist/archive-zip-admission.d.ts +1 -1
  22. package/dist/archive-zip-admission.d.ts.map +1 -1
  23. package/dist/archive-zip-admission.js +2 -2
  24. package/dist/archive-zip-directory.d.ts +3 -0
  25. package/dist/archive-zip-directory.d.ts.map +1 -1
  26. package/dist/archive-zip-directory.js +13 -2
  27. package/dist/archive-zip-loader.d.ts +3 -2
  28. package/dist/archive-zip-loader.d.ts.map +1 -1
  29. package/dist/archive-zip-loader.js +30 -4
  30. package/dist/archive-zip-manifest.d.ts +5 -0
  31. package/dist/archive-zip-manifest.d.ts.map +1 -0
  32. package/dist/archive-zip-manifest.js +22 -0
  33. package/dist/archive-zip-names.d.ts +6 -1
  34. package/dist/archive-zip-names.d.ts.map +1 -1
  35. package/dist/archive-zip-names.js +35 -14
  36. package/dist/archive-zip-preflight.d.ts.map +1 -1
  37. package/dist/archive-zip-preflight.js +3 -2
  38. package/dist/archive.d.ts.map +1 -1
  39. package/dist/archive.js +9 -4
  40. package/dist/copy-file-input.d.ts +1 -1
  41. package/dist/copy-file-input.d.ts.map +1 -1
  42. package/dist/copy-file-input.js +2 -0
  43. package/dist/darwin-acl.d.ts +4 -0
  44. package/dist/darwin-acl.d.ts.map +1 -0
  45. package/dist/darwin-acl.js +24 -0
  46. package/dist/deny-mutations.d.ts.map +1 -1
  47. package/dist/deny-mutations.js +8 -2
  48. package/dist/directory-durability.d.ts.map +1 -1
  49. package/dist/directory-durability.js +67 -23
  50. package/dist/directory-entry-path.d.ts +3 -0
  51. package/dist/directory-entry-path.d.ts.map +1 -0
  52. package/dist/directory-entry-path.js +21 -0
  53. package/dist/directory-guard.d.ts +17 -1
  54. package/dist/directory-guard.d.ts.map +1 -1
  55. package/dist/directory-guard.js +134 -48
  56. package/dist/directory-mode-node.d.ts +12 -0
  57. package/dist/directory-mode-node.d.ts.map +1 -1
  58. package/dist/directory-mode-node.js +102 -4
  59. package/dist/effective-uid.d.ts +2 -0
  60. package/dist/effective-uid.d.ts.map +1 -0
  61. package/dist/effective-uid.js +25 -0
  62. package/dist/file-handle-transfer.d.ts.map +1 -1
  63. package/dist/file-handle-transfer.js +98 -27
  64. package/dist/file-hash.d.ts.map +1 -1
  65. package/dist/file-hash.js +3 -0
  66. package/dist/file-lock-sync.d.ts.map +1 -1
  67. package/dist/file-lock-sync.js +36 -6
  68. package/dist/file-lock.d.ts.map +1 -1
  69. package/dist/file-lock.js +29 -9
  70. package/dist/file-observation.d.ts +1 -1
  71. package/dist/file-observation.d.ts.map +1 -1
  72. package/dist/file-store-boundary.d.ts +6 -2
  73. package/dist/file-store-boundary.d.ts.map +1 -1
  74. package/dist/file-store-boundary.js +20 -65
  75. package/dist/file-store-copy-source.d.ts +5 -0
  76. package/dist/file-store-copy-source.d.ts.map +1 -0
  77. package/dist/file-store-copy-source.js +31 -0
  78. package/dist/file-store-path.d.ts.map +1 -1
  79. package/dist/file-store-path.js +4 -1
  80. package/dist/file-store-sync-directory.d.ts +16 -0
  81. package/dist/file-store-sync-directory.d.ts.map +1 -0
  82. package/dist/file-store-sync-directory.js +349 -0
  83. package/dist/file-store.d.ts.map +1 -1
  84. package/dist/file-store.js +11 -28
  85. package/dist/filename.d.ts.map +1 -1
  86. package/dist/filename.js +65 -20
  87. package/dist/fs.d.ts.map +1 -1
  88. package/dist/fs.js +3 -2
  89. package/dist/guarded-mkdir.d.ts +8 -0
  90. package/dist/guarded-mkdir.d.ts.map +1 -1
  91. package/dist/guarded-mkdir.js +176 -27
  92. package/dist/guest.d.ts.map +1 -1
  93. package/dist/guest.js +4 -1
  94. package/dist/home-dir.d.ts.map +1 -1
  95. package/dist/home-dir.js +73 -10
  96. package/dist/install-path.d.ts.map +1 -1
  97. package/dist/install-path.js +54 -19
  98. package/dist/json-durable-queue-ownership.d.ts +6 -0
  99. package/dist/json-durable-queue-ownership.d.ts.map +1 -1
  100. package/dist/json-durable-queue-ownership.js +89 -42
  101. package/dist/json-durable-queue-paths.d.ts +11 -0
  102. package/dist/json-durable-queue-paths.d.ts.map +1 -0
  103. package/dist/json-durable-queue-paths.js +42 -0
  104. package/dist/json-durable-queue-read.d.ts.map +1 -1
  105. package/dist/json-durable-queue-read.js +2 -0
  106. package/dist/json-durable-queue.d.ts.map +1 -1
  107. package/dist/json-durable-queue.js +50 -58
  108. package/dist/json-store.d.ts.map +1 -1
  109. package/dist/json-store.js +5 -1
  110. package/dist/json.d.ts.map +1 -1
  111. package/dist/json.js +54 -22
  112. package/dist/local-file-access.d.ts.map +1 -1
  113. package/dist/local-file-access.js +4 -0
  114. package/dist/local-file-descriptor.d.ts +17 -0
  115. package/dist/local-file-descriptor.d.ts.map +1 -0
  116. package/dist/local-file-descriptor.js +84 -0
  117. package/dist/local-roots.d.ts.map +1 -1
  118. package/dist/local-roots.js +35 -7
  119. package/dist/move-path-cleanup.d.ts +2 -0
  120. package/dist/move-path-cleanup.d.ts.map +1 -1
  121. package/dist/move-path-cleanup.js +44 -18
  122. package/dist/move-path.d.ts.map +1 -1
  123. package/dist/move-path.js +31 -6
  124. package/dist/native-binding.d.ts +17 -0
  125. package/dist/native-binding.d.ts.map +1 -1
  126. package/dist/native-binding.js +8 -1
  127. package/dist/native-directory-observation.d.ts +17 -0
  128. package/dist/native-directory-observation.d.ts.map +1 -0
  129. package/dist/native-directory-observation.js +37 -0
  130. package/dist/native-operations.d.ts.map +1 -1
  131. package/dist/native-operations.js +6 -4
  132. package/dist/native-parent-admission.d.ts +32 -0
  133. package/dist/native-parent-admission.d.ts.map +1 -0
  134. package/dist/native-parent-admission.js +127 -0
  135. package/dist/native-pinned-write-windows.d.ts +0 -1
  136. package/dist/native-pinned-write-windows.d.ts.map +1 -1
  137. package/dist/native-pinned-write-windows.js +8 -9
  138. package/dist/native-pinned-write.d.ts.map +1 -1
  139. package/dist/native-pinned-write.js +314 -42
  140. package/dist/native-staged-file.d.ts +4 -4
  141. package/dist/native-staged-file.d.ts.map +1 -1
  142. package/dist/native-staged-file.js +20 -10
  143. package/dist/native.d.ts +1 -1
  144. package/dist/native.d.ts.map +1 -1
  145. package/dist/native.js +7 -2
  146. package/dist/output.d.ts.map +1 -1
  147. package/dist/output.js +15 -5
  148. package/dist/overwrite-file-handle.d.ts.map +1 -1
  149. package/dist/overwrite-file-handle.js +5 -1
  150. package/dist/owner-dacl.d.ts.map +1 -1
  151. package/dist/owner-dacl.js +2 -0
  152. package/dist/path-policy.d.ts.map +1 -1
  153. package/dist/path-policy.js +7 -2
  154. package/dist/path-prefix.d.ts +7 -0
  155. package/dist/path-prefix.d.ts.map +1 -0
  156. package/dist/path-prefix.js +82 -0
  157. package/dist/path-scope-lexical.d.ts.map +1 -1
  158. package/dist/path-scope-lexical.js +18 -8
  159. package/dist/path-segment-route.d.ts +7 -0
  160. package/dist/path-segment-route.d.ts.map +1 -0
  161. package/dist/path-segment-route.js +24 -0
  162. package/dist/path-suffix-aliases.d.ts +10 -0
  163. package/dist/path-suffix-aliases.d.ts.map +1 -0
  164. package/dist/path-suffix-aliases.js +386 -0
  165. package/dist/path.d.ts.map +1 -1
  166. package/dist/path.js +16 -5
  167. package/dist/permissions-windows.d.ts.map +1 -1
  168. package/dist/permissions-windows.js +14 -3
  169. package/dist/permissions.d.ts.map +1 -1
  170. package/dist/permissions.js +37 -8
  171. package/dist/pinned-mutation-admission.d.ts +25 -0
  172. package/dist/pinned-mutation-admission.d.ts.map +1 -0
  173. package/dist/pinned-mutation-admission.js +425 -0
  174. package/dist/pinned-mutation-observation.d.ts +34 -0
  175. package/dist/pinned-mutation-observation.d.ts.map +1 -0
  176. package/dist/pinned-mutation-observation.js +142 -0
  177. package/dist/pinned-mutation-shared-route.d.ts +24 -0
  178. package/dist/pinned-mutation-shared-route.d.ts.map +1 -0
  179. package/dist/pinned-mutation-shared-route.js +70 -0
  180. package/dist/pinned-open.d.ts +6 -0
  181. package/dist/pinned-open.d.ts.map +1 -1
  182. package/dist/pinned-open.js +28 -10
  183. package/dist/pinned-write-types.d.ts +75 -0
  184. package/dist/pinned-write-types.d.ts.map +1 -0
  185. package/dist/pinned-write-types.js +1 -0
  186. package/dist/pinned-write.d.ts +7 -33
  187. package/dist/pinned-write.d.ts.map +1 -1
  188. package/dist/pinned-write.js +151 -17
  189. package/dist/private-directory.d.ts.map +1 -1
  190. package/dist/private-directory.js +2 -0
  191. package/dist/private-producer-handoff.d.ts +16 -0
  192. package/dist/private-producer-handoff.d.ts.map +1 -0
  193. package/dist/private-producer-handoff.js +272 -0
  194. package/dist/private-temp-workspace.d.ts +2 -39
  195. package/dist/private-temp-workspace.d.ts.map +1 -1
  196. package/dist/private-temp-workspace.js +183 -77
  197. package/dist/publish-file.d.ts.map +1 -1
  198. package/dist/publish-file.js +38 -32
  199. package/dist/regular-file.d.ts.map +1 -1
  200. package/dist/regular-file.js +56 -45
  201. package/dist/replace-directory.d.ts.map +1 -1
  202. package/dist/replace-directory.js +12 -5
  203. package/dist/replace-file-temp-owner.d.ts +1 -0
  204. package/dist/replace-file-temp-owner.d.ts.map +1 -1
  205. package/dist/replace-file-temp-owner.js +12 -1
  206. package/dist/replace-file.d.ts.map +1 -1
  207. package/dist/replace-file.js +24 -24
  208. package/dist/root-boundary.d.ts +4 -0
  209. package/dist/root-boundary.d.ts.map +1 -1
  210. package/dist/root-boundary.js +6 -1
  211. package/dist/root-context.d.ts +12 -1
  212. package/dist/root-context.d.ts.map +1 -1
  213. package/dist/root-context.js +57 -11
  214. package/dist/root-directory-creation.d.ts +13 -0
  215. package/dist/root-directory-creation.d.ts.map +1 -0
  216. package/dist/root-directory-creation.js +212 -0
  217. package/dist/root-directory-list.d.ts +16 -4
  218. package/dist/root-directory-list.d.ts.map +1 -1
  219. package/dist/root-directory-list.js +180 -39
  220. package/dist/root-directory.d.ts +23 -0
  221. package/dist/root-directory.d.ts.map +1 -0
  222. package/dist/root-directory.js +141 -0
  223. package/dist/root-errors.d.ts.map +1 -1
  224. package/dist/root-errors.js +12 -1
  225. package/dist/root-file-final-admission.d.ts +21 -0
  226. package/dist/root-file-final-admission.d.ts.map +1 -0
  227. package/dist/root-file-final-admission.js +83 -0
  228. package/dist/root-file.d.ts.map +1 -1
  229. package/dist/root-file.js +103 -24
  230. package/dist/root-impl.d.ts +1 -0
  231. package/dist/root-impl.d.ts.map +1 -1
  232. package/dist/root-impl.js +289 -317
  233. package/dist/root-move-noreplace.d.ts +14 -0
  234. package/dist/root-move-noreplace.d.ts.map +1 -0
  235. package/dist/root-move-noreplace.js +202 -0
  236. package/dist/root-observed-path.d.ts +9 -0
  237. package/dist/root-observed-path.d.ts.map +1 -0
  238. package/dist/root-observed-path.js +95 -0
  239. package/dist/root-path-errors.d.ts +12 -0
  240. package/dist/root-path-errors.d.ts.map +1 -0
  241. package/dist/root-path-errors.js +13 -0
  242. package/dist/root-path-existing.d.ts.map +1 -1
  243. package/dist/root-path-existing.js +53 -20
  244. package/dist/root-path-observation.d.ts +63 -0
  245. package/dist/root-path-observation.d.ts.map +1 -0
  246. package/dist/root-path-observation.js +180 -0
  247. package/dist/root-path-stat.d.ts +5 -0
  248. package/dist/root-path-stat.d.ts.map +1 -0
  249. package/dist/root-path-stat.js +101 -0
  250. package/dist/root-path-symlink.d.ts.map +1 -1
  251. package/dist/root-path-symlink.js +23 -4
  252. package/dist/root-path.d.ts +11 -0
  253. package/dist/root-path.d.ts.map +1 -1
  254. package/dist/root-path.js +215 -53
  255. package/dist/root-paths-lexical.d.ts +9 -0
  256. package/dist/root-paths-lexical.d.ts.map +1 -0
  257. package/dist/root-paths-lexical.js +22 -0
  258. package/dist/root-paths.d.ts +3 -25
  259. package/dist/root-paths.d.ts.map +1 -1
  260. package/dist/root-paths.js +77 -154
  261. package/dist/root-read-admission.d.ts +26 -0
  262. package/dist/root-read-admission.d.ts.map +1 -0
  263. package/dist/root-read-admission.js +94 -0
  264. package/dist/root-remove-identity.d.ts +15 -0
  265. package/dist/root-remove-identity.d.ts.map +1 -0
  266. package/dist/root-remove-identity.js +89 -0
  267. package/dist/root-remove-receipt.d.ts +17 -0
  268. package/dist/root-remove-receipt.d.ts.map +1 -0
  269. package/dist/root-remove-receipt.js +37 -0
  270. package/dist/root-remove.d.ts +2 -1
  271. package/dist/root-remove.d.ts.map +1 -1
  272. package/dist/root-remove.js +172 -10
  273. package/dist/root-write-admission.d.ts +68 -0
  274. package/dist/root-write-admission.d.ts.map +1 -0
  275. package/dist/root-write-admission.js +322 -0
  276. package/dist/root-write-compatibility.d.ts +13 -0
  277. package/dist/root-write-compatibility.d.ts.map +1 -0
  278. package/dist/root-write-compatibility.js +74 -0
  279. package/dist/root-write-complete-parent.d.ts +42 -0
  280. package/dist/root-write-complete-parent.d.ts.map +1 -0
  281. package/dist/root-write-complete-parent.js +195 -0
  282. package/dist/root-write-publication.d.ts +24 -0
  283. package/dist/root-write-publication.d.ts.map +1 -0
  284. package/dist/root-write-publication.js +85 -0
  285. package/dist/root-write-verification.d.ts.map +1 -1
  286. package/dist/root-write-verification.js +6 -4
  287. package/dist/secret-file.d.ts.map +1 -1
  288. package/dist/secret-file.js +62 -24
  289. package/dist/secret-read-async.d.ts.map +1 -1
  290. package/dist/secret-read-async.js +18 -13
  291. package/dist/secret-read-policy.d.ts.map +1 -1
  292. package/dist/secret-read-policy.js +5 -1
  293. package/dist/secure-file.d.ts.map +1 -1
  294. package/dist/secure-file.js +92 -7
  295. package/dist/secure-temp-dir.d.ts +6 -3
  296. package/dist/secure-temp-dir.d.ts.map +1 -1
  297. package/dist/secure-temp-dir.js +121 -101
  298. package/dist/secure-temp-repair.d.ts +35 -0
  299. package/dist/secure-temp-repair.d.ts.map +1 -0
  300. package/dist/secure-temp-repair.js +106 -0
  301. package/dist/sibling-staged-file.d.ts +3 -2
  302. package/dist/sibling-staged-file.d.ts.map +1 -1
  303. package/dist/sibling-staged-file.js +179 -55
  304. package/dist/sibling-temp.d.ts.map +1 -1
  305. package/dist/sibling-temp.js +27 -13
  306. package/dist/sidecar-lock-acquire.d.ts.map +1 -1
  307. package/dist/sidecar-lock-acquire.js +44 -14
  308. package/dist/sidecar-lock-root.d.ts.map +1 -1
  309. package/dist/sidecar-lock-root.js +4 -2
  310. package/dist/staged-directory.d.ts +14 -5
  311. package/dist/staged-directory.d.ts.map +1 -1
  312. package/dist/staged-directory.js +54 -3
  313. package/dist/standalone-publication-path.d.ts +2 -0
  314. package/dist/standalone-publication-path.d.ts.map +1 -0
  315. package/dist/standalone-publication-path.js +6 -0
  316. package/dist/stat-observation.d.ts +11 -0
  317. package/dist/stat-observation.d.ts.map +1 -0
  318. package/dist/stat-observation.js +64 -0
  319. package/dist/strict-file-identity.d.ts.map +1 -1
  320. package/dist/strict-file-identity.js +39 -2
  321. package/dist/symlink-parents.d.ts.map +1 -1
  322. package/dist/symlink-parents.js +7 -2
  323. package/dist/temp-target.d.ts +2 -0
  324. package/dist/temp-target.d.ts.map +1 -1
  325. package/dist/temp-target.js +130 -3
  326. package/dist/temp-workspace-admission.d.ts +22 -0
  327. package/dist/temp-workspace-admission.d.ts.map +1 -0
  328. package/dist/temp-workspace-admission.js +374 -0
  329. package/dist/temp-workspace-child-admission.d.ts +13 -0
  330. package/dist/temp-workspace-child-admission.d.ts.map +1 -0
  331. package/dist/temp-workspace-child-admission.js +95 -0
  332. package/dist/temp-workspace-descriptor.d.ts +48 -0
  333. package/dist/temp-workspace-descriptor.d.ts.map +1 -0
  334. package/dist/temp-workspace-descriptor.js +363 -0
  335. package/dist/temp-workspace-identity.d.ts +15 -0
  336. package/dist/temp-workspace-identity.d.ts.map +1 -0
  337. package/dist/temp-workspace-identity.js +41 -0
  338. package/dist/temp-workspace-owner.d.ts +7 -6
  339. package/dist/temp-workspace-owner.d.ts.map +1 -1
  340. package/dist/temp-workspace-owner.js +121 -61
  341. package/dist/temp-workspace-permissions.d.ts +4 -0
  342. package/dist/temp-workspace-permissions.d.ts.map +1 -0
  343. package/dist/temp-workspace-permissions.js +32 -0
  344. package/dist/temp-workspace-types.d.ts +40 -0
  345. package/dist/temp-workspace-types.d.ts.map +1 -0
  346. package/dist/temp-workspace-types.js +1 -0
  347. package/dist/temp.d.ts +1 -1
  348. package/dist/temp.d.ts.map +1 -1
  349. package/dist/temp.js +1 -1
  350. package/dist/test-hooks.d.ts +7 -0
  351. package/dist/test-hooks.d.ts.map +1 -1
  352. package/dist/text-atomic.d.ts.map +1 -1
  353. package/dist/text-atomic.js +3 -1
  354. package/dist/trash.d.ts.map +1 -1
  355. package/dist/trash.js +54 -8
  356. package/dist/walk.d.ts.map +1 -1
  357. package/dist/walk.js +9 -6
  358. package/dist/windows-owner.d.ts.map +1 -1
  359. package/dist/windows-owner.js +5 -0
  360. package/dist/windows-path-alias.d.ts +39 -0
  361. package/dist/windows-path-alias.d.ts.map +1 -0
  362. package/dist/windows-path-alias.js +153 -0
  363. package/docs/advanced.md +25 -0
  364. package/docs/archive.md +23 -2
  365. package/docs/atomic.md +27 -3
  366. package/docs/copy.md +3 -0
  367. package/docs/durability.md +14 -0
  368. package/docs/errors.md +14 -6
  369. package/docs/file-store.md +24 -3
  370. package/docs/filename.md +14 -7
  371. package/docs/install-path.md +2 -2
  372. package/docs/install.md +8 -7
  373. package/docs/json-store.md +5 -1
  374. package/docs/json.md +11 -0
  375. package/docs/mutation-policy-proof.md +65 -0
  376. package/docs/native-helper.md +41 -11
  377. package/docs/native.md +32 -8
  378. package/docs/output.md +33 -11
  379. package/docs/path-prefix.md +64 -0
  380. package/docs/path-suffix-aliases.md +159 -0
  381. package/docs/path.md +11 -0
  382. package/docs/private-file-store.md +14 -0
  383. package/docs/public-api.md +9 -0
  384. package/docs/quickstart.md +1 -1
  385. package/docs/reading.md +8 -1
  386. package/docs/root.md +18 -3
  387. package/docs/secret-file.md +3 -0
  388. package/docs/secure-file.md +6 -2
  389. package/docs/security-model.md +75 -8
  390. package/docs/sidecar-lock.md +28 -1
  391. package/docs/store.md +5 -1
  392. package/docs/temp.md +260 -36
  393. package/docs/test-hooks.md +14 -0
  394. package/docs/writing.md +38 -8
  395. package/package.json +10 -10
@@ -1,7 +1,7 @@
1
- import fs from "node:fs";
1
+ import fs, {} from "node:fs";
2
2
  import os from "node:os";
3
3
  import path from "node:path";
4
- import { inspectDirectoryIdentity } from "./directory-guard.js";
4
+ import { extendDirectoryObservationGuard, inspectDirectoryIdentitySync, inspectDirectoryObservationSync, } from "./directory-guard.js";
5
5
  import { FsSafeError } from "./errors.js";
6
6
  import { sameFileIdentity } from "./file-identity.js";
7
7
  import { assertNoNulPathInput, assertNoUnsafeDeviceReadPath, hasNodeErrorCode, isNotFoundPathError, isPathInside, } from "./path.js";
@@ -11,9 +11,14 @@ import { outsideWorkspaceError, rootPathChangedError } from "./root-errors.js";
11
11
  import { isDriveRelativePath } from "./safe-path-segment.js";
12
12
  import { realpathSync } from "./realpath.js";
13
13
  import { inspectFileIdentity } from "./strict-file-identity.js";
14
+ import { assertNoWindowsPathAlias, pathForWindowsFilesystem, resolvePathFromBasePreservingWindowsRoot, resolvePathPreservingWindowsRoot, } from "./windows-path-alias.js";
15
+ function hasExactRootIdentity(identity) {
16
+ return typeof identity.dev === "bigint" && typeof identity.ino === "bigint";
17
+ }
14
18
  export const ensureTrailingSep = (value) => value.endsWith(path.sep) ? value : value + path.sep;
15
19
  export function assertValidRootRelativePath(relativePath) {
16
20
  assertNoNulPathInput(relativePath, "relative path contains a NUL byte");
21
+ assertNoWindowsPathAlias(relativePath, "filesystem", "relative path uses a Windows filesystem namespace alias");
17
22
  }
18
23
  export function assertValidRootDestinationPath(relativePath) {
19
24
  assertValidRootRelativePath(relativePath);
@@ -27,29 +32,42 @@ const WINDOWS_PARENT_COMPONENT = /(?:^|[\\/])\.\.(?:[\\/]|$)/;
27
32
  export async function expandRelativePathWithHome(relativePath) {
28
33
  const homeOnly = relativePath === "~";
29
34
  const homePrefix = relativePath.startsWith("~/") || (path.sep === "\\" && relativePath.startsWith("~\\"));
30
- if (!homeOnly && !homePrefix)
35
+ if (!homeOnly && !homePrefix) {
36
+ assertNoWindowsPathAlias(relativePath, "filesystem", "relative path uses a Windows filesystem namespace alias");
31
37
  return relativePath;
38
+ }
32
39
  const rawHome = process.env.HOME || process.env.USERPROFILE || os.homedir();
40
+ assertNoWindowsPathAlias(rawHome, "filesystem", "home path uses a Windows filesystem namespace alias");
33
41
  if (cachedHomePath?.raw !== rawHome) {
34
42
  let realHome = rawHome;
35
43
  try {
36
- realHome = realpathSync.native(rawHome);
44
+ realHome = realpathSync.native(pathForWindowsFilesystem(rawHome));
37
45
  }
38
46
  catch {
39
47
  // If the home dir cannot be canonicalized, keep lexical expansion behavior.
40
48
  }
41
49
  cachedHomePath = { raw: rawHome, real: realHome };
42
50
  }
43
- return homeOnly ? cachedHomePath.real : `${ensureTrailingSep(cachedHomePath.real)}${relativePath.slice(2)}`;
51
+ if (homeOnly) {
52
+ assertNoWindowsPathAlias(cachedHomePath.real, "filesystem", "home path uses a Windows filesystem namespace alias");
53
+ return cachedHomePath.real;
54
+ }
55
+ const expanded = `${ensureTrailingSep(cachedHomePath.real)}${relativePath.slice(2)}`;
56
+ assertNoWindowsPathAlias(expanded, "filesystem", "expanded path uses a Windows filesystem namespace alias");
57
+ return expanded;
44
58
  }
45
59
  export async function resolveRootContext(rootDir) {
46
60
  assertNoNulPathInput(rootDir, "root dir contains a NUL byte");
47
- const lexicalRoot = path.resolve(rootDir);
61
+ assertNoWindowsPathAlias(rootDir, "filesystem", "root dir uses a Windows filesystem namespace alias");
62
+ const lexicalRoot = resolvePathPreservingWindowsRoot(rootDir);
63
+ assertNoWindowsPathAlias(lexicalRoot, "filesystem", "root dir uses a Windows filesystem namespace alias");
48
64
  let rootReal;
65
+ let rootStat;
49
66
  let rootIdentity;
50
67
  try {
51
- rootReal = realpathSync.native(rootDir);
52
- const rootStat = await inspectFileIdentity(() => {
68
+ rootReal = realpathSync.native(pathForWindowsFilesystem(rootDir));
69
+ assertNoWindowsPathAlias(rootReal, "filesystem", "canonical root path uses a Windows filesystem namespace alias");
70
+ rootStat = await inspectFileIdentity(() => {
53
71
  const stat = fs.statSync(rootReal, { bigint: true });
54
72
  if (!stat.isDirectory())
55
73
  throw new FsSafeError("invalid-path", "root dir is not a directory");
@@ -68,6 +86,7 @@ export async function resolveRootContext(rootDir) {
68
86
  }
69
87
  return {
70
88
  rootDir: lexicalRoot,
89
+ rootGuard: { dir: rootReal, realPath: rootReal, stat: rootStat },
71
90
  rootIdentity,
72
91
  rootReal,
73
92
  rootWithSep: ensureTrailingSep(rootReal),
@@ -102,11 +121,12 @@ export function rootRelativeReadPath(root, filePath) {
102
121
  }
103
122
  return raw;
104
123
  }
105
- export async function assertRootIdentityCurrent(root) {
124
+ export function assertRootIdentityCurrentSync(root, observe) {
106
125
  let current;
107
126
  try {
108
127
  if (typeof root.rootIdentity.dev === "bigint" && typeof root.rootIdentity.ino === "bigint") {
109
- await inspectDirectoryIdentity(root.rootReal, { dev: root.rootIdentity.dev, ino: root.rootIdentity.ino });
128
+ const stat = inspectDirectoryIdentitySync(root.rootReal, { dev: root.rootIdentity.dev, ino: root.rootIdentity.ino });
129
+ observe?.(stat);
110
130
  return;
111
131
  }
112
132
  current = fs.lstatSync(root.rootReal);
@@ -120,11 +140,36 @@ export async function assertRootIdentityCurrent(root) {
120
140
  throw rootPathChangedError();
121
141
  }
122
142
  }
143
+ export async function assertRootIdentityCurrent(root, observe) {
144
+ assertRootIdentityCurrentSync(root, observe);
145
+ }
146
+ /**
147
+ * Observe the current Root with an exact, operation-local receipt.
148
+ *
149
+ * This is deliberately separate from {@link assertRootIdentityCurrent}: callers
150
+ * must not retain the returned guard beyond the operation that requested it.
151
+ */
152
+ export async function createRootObservationGuard(root) {
153
+ const rootIdentity = root.rootIdentity;
154
+ if (!hasExactRootIdentity(rootIdentity)) {
155
+ await assertRootIdentityCurrent(root);
156
+ return undefined;
157
+ }
158
+ try {
159
+ const observed = await inspectDirectoryObservationSync(root.rootReal, rootIdentity);
160
+ return extendDirectoryObservationGuard(observed, root.rootReal, root.rootReal);
161
+ }
162
+ catch (error) {
163
+ throw rootPathChangedError(error instanceof Error ? error : undefined);
164
+ }
165
+ }
123
166
  export async function resolvePathInRoot(root, relativePath, options) {
124
167
  assertValidRootRelativePath(relativePath);
125
168
  await assertRootIdentityCurrent(root);
126
169
  const expanded = await expandRelativePathWithHome(relativePath);
127
- let resolved = path.resolve(root.rootWithSep, expanded);
170
+ assertNoWindowsPathAlias(expanded, "filesystem", "expanded path uses a Windows filesystem namespace alias");
171
+ let resolved = resolvePathFromBasePreservingWindowsRoot(root.rootWithSep, expanded);
172
+ assertNoWindowsPathAlias(resolved, "filesystem", "resolved path uses a Windows filesystem namespace alias");
128
173
  if (!options?.resolveCanonical && !isPathInside(root.rootWithSep, resolved)) {
129
174
  throw outsideWorkspaceError();
130
175
  }
@@ -134,6 +179,7 @@ export async function resolvePathInRoot(root, relativePath, options) {
134
179
  const rawAbsolutePath = path.isAbsolute(expanded)
135
180
  ? expanded
136
181
  : `${root.rootWithSep}${expanded}`;
182
+ assertNoWindowsPathAlias(rawAbsolutePath, "filesystem", "resolved path uses a Windows filesystem namespace alias");
137
183
  try {
138
184
  const resolution = {
139
185
  absolutePath: rawAbsolutePath,
@@ -0,0 +1,13 @@
1
+ import type { PinnedWriteMutationAdmission } from "./pinned-write.js";
2
+ import type { RootContext } from "./root-context.js";
3
+ /**
4
+ * Complete the common Root.mkdir case with one exact existing parent. This is
5
+ * optional evidence: every uncertain probe returns to the ordered root walk.
6
+ */
7
+ export declare function tryMkdirAtExactParent(root: RootContext, targetPath: string, mutationAdmission: PinnedWriteMutationAdmission): Promise<boolean>;
8
+ export declare function prepareRootWriteTarget(root: RootContext, targetPath: string, assertBeforeMutation?: () => void, mutationAdmission?: PinnedWriteMutationAdmission): Promise<string>;
9
+ export declare function mkdirPathFallback(root: RootContext, resolved: {
10
+ rootReal: string;
11
+ resolved: string;
12
+ }, assertBeforeMutation?: () => void, rejectSymlinks?: boolean, mutationAdmission?: PinnedWriteMutationAdmission): Promise<void>;
13
+ //# sourceMappingURL=root-directory-creation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"root-directory-creation.d.ts","sourceRoot":"","sources":["../src/root-directory-creation.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,mBAAmB,CAAC;AAEtE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAoDrD;;;GAGG;AACH,wBAAsB,qBAAqB,CACzC,IAAI,EAAE,WAAW,EACjB,UAAU,EAAE,MAAM,EAClB,iBAAiB,EAAE,4BAA4B,GAC9C,OAAO,CAAC,OAAO,CAAC,CAoGlB;AAED,wBAAsB,sBAAsB,CAC1C,IAAI,EAAE,WAAW,EACjB,UAAU,EAAE,MAAM,EAClB,oBAAoB,CAAC,EAAE,MAAM,IAAI,EACjC,iBAAiB,CAAC,EAAE,4BAA4B,GAC/C,OAAO,CAAC,MAAM,CAAC,CA2BjB;AAED,wBAAsB,iBAAiB,CACrC,IAAI,EAAE,WAAW,EACjB,QAAQ,EAAE;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,EAChD,oBAAoB,CAAC,EAAE,MAAM,IAAI,EACjC,cAAc,UAAQ,EACtB,iBAAiB,CAAC,EAAE,4BAA4B,GAC/C,OAAO,CAAC,IAAI,CAAC,CAuBf"}
@@ -0,0 +1,212 @@
1
+ import fsSync, {} from "node:fs";
2
+ import fs from "node:fs/promises";
3
+ import path from "node:path";
4
+ import { assertAsyncDirectoryGuard, assertDirectoryIdentitySync, assertSyncDirectoryGuard, createAsyncDirectoryGuard, inspectDirectoryIdentitySync, } from "./directory-guard.js";
5
+ import { FsSafeError } from "./errors.js";
6
+ import { mkdirPathComponentsWithGuards } from "./guarded-mkdir.js";
7
+ import { hasNodeErrorCode } from "./path.js";
8
+ import { checkedMutationDirectory, } from "./pinned-mutation-observation.js";
9
+ import { admitPathInsideRoot } from "./root-boundary.js";
10
+ import { assertFinalSymlinkRejected } from "./root-symlink-policy.js";
11
+ import { getFsSafeTestHooks } from "./test-hooks.js";
12
+ function mutationWalkOptions(mutationAdmission, operationTarget, assertBeforeMutation) {
13
+ const session = assertBeforeMutation === undefined
14
+ ? mutationAdmission.beginSharedParentWalk?.()
15
+ : undefined;
16
+ return {
17
+ dispose: () => session?.dispose(),
18
+ options: {
19
+ rejectSymlinks: mutationAdmission.rejectParentSymlinks,
20
+ revalidateParentAfterBeforeComponent: true,
21
+ retainedTargetPath: session?.retainedTargetPath,
22
+ synchronousAuthorizationIncludesFence: session !== undefined,
23
+ afterCreateComponent: session?.advanceCreatedDirectory,
24
+ beforeCreateComponent: (componentPath, prospectiveDirectory, retainedTargetPath, parent) => {
25
+ const targetPath = retainedTargetPath ?? operationTarget(prospectiveDirectory);
26
+ const request = Object.freeze({
27
+ targetPath,
28
+ mutationPath: componentPath,
29
+ phase: "parent-create",
30
+ });
31
+ return session?.tryAuthorizeAtParent(request, parent) ??
32
+ (session?.authorize(request) ?? mutationAdmission.authorize(request));
33
+ },
34
+ beforeUseComponent: async (_componentPath, prospectiveDirectory, retainedTargetPath) => {
35
+ const targetPath = retainedTargetPath ?? operationTarget(prospectiveDirectory);
36
+ const request = Object.freeze({
37
+ targetPath,
38
+ mutationPath: targetPath,
39
+ phase: "parent",
40
+ });
41
+ await (session?.authorize(request) ?? mutationAdmission.authorize(request));
42
+ },
43
+ },
44
+ };
45
+ }
46
+ /**
47
+ * Complete the common Root.mkdir case with one exact existing parent. This is
48
+ * optional evidence: every uncertain probe returns to the ordered root walk.
49
+ */
50
+ export async function tryMkdirAtExactParent(root, targetPath, mutationAdmission) {
51
+ if (getFsSafeTestHooks()?.beforeRootFallbackMutation)
52
+ return false;
53
+ if (typeof root.rootIdentity.dev !== "bigint" ||
54
+ typeof root.rootIdentity.ino !== "bigint" ||
55
+ root.rootIdentity.dev === 0n || root.rootIdentity.ino === 0n)
56
+ return false;
57
+ const rootIdentity = Object.freeze({
58
+ dev: root.rootIdentity.dev,
59
+ ino: root.rootIdentity.ino,
60
+ });
61
+ const session = mutationAdmission.beginSharedParentWalk?.();
62
+ if (!session)
63
+ return false;
64
+ try {
65
+ if (path.resolve(session.retainedTargetPath) !== path.resolve(targetPath))
66
+ return false;
67
+ const parentPath = path.dirname(targetPath);
68
+ let parentGuard;
69
+ try {
70
+ parentGuard = await createAsyncDirectoryGuard(parentPath, { bigint: true });
71
+ }
72
+ catch {
73
+ return false;
74
+ }
75
+ try {
76
+ fsSync.lstatSync(targetPath, { bigint: true });
77
+ return false;
78
+ }
79
+ catch (error) {
80
+ if (!hasNodeErrorCode(error, "ENOENT"))
81
+ return false;
82
+ }
83
+ const admittedParent = admitPathInsideRoot({
84
+ rootPath: root.rootReal,
85
+ candidatePath: parentPath,
86
+ rootIdentity,
87
+ });
88
+ if (admittedParent?.admission !== "exact" || admittedParent.path !== parentPath ||
89
+ parentGuard.realPath !== parentPath)
90
+ return false;
91
+ await session.authorize(Object.freeze({
92
+ targetPath,
93
+ mutationPath: targetPath,
94
+ phase: "parent",
95
+ }));
96
+ await assertAsyncDirectoryGuard(parentGuard);
97
+ try {
98
+ fsSync.lstatSync(targetPath, { bigint: true });
99
+ return false;
100
+ }
101
+ catch (error) {
102
+ if (!hasNodeErrorCode(error, "ENOENT"))
103
+ return false;
104
+ }
105
+ assertSyncDirectoryGuard(parentGuard);
106
+ const createAdmission = session.tryAuthorizeAtParent(Object.freeze({
107
+ targetPath,
108
+ mutationPath: targetPath,
109
+ phase: "parent-create",
110
+ }), checkedMutationDirectory(parentPath, parentGuard.realPath, parentGuard.stat));
111
+ if (!createAdmission)
112
+ return false;
113
+ try {
114
+ await fs.mkdir(targetPath);
115
+ }
116
+ catch (error) {
117
+ if (hasNodeErrorCode(error, "EEXIST"))
118
+ return false;
119
+ throw error;
120
+ }
121
+ const observeCreated = async () => {
122
+ const childGuard = await createAsyncDirectoryGuard(targetPath, { bigint: true });
123
+ const parentAfter = inspectDirectoryIdentitySync(parentPath, parentGuard.stat);
124
+ assertDirectoryIdentitySync(root.rootReal, rootIdentity);
125
+ const admittedChild = admitPathInsideRoot({
126
+ rootPath: root.rootReal,
127
+ candidatePath: childGuard.realPath,
128
+ rootIdentity,
129
+ });
130
+ if (childGuard.realPath !== targetPath || childGuard.dir !== targetPath ||
131
+ admittedChild?.admission !== "exact" || admittedChild.path !== targetPath) {
132
+ throw new FsSafeError("path-mismatch", "created directory changed during operation");
133
+ }
134
+ return { childGuard, parentAfter };
135
+ };
136
+ try {
137
+ const created = await observeCreated();
138
+ if (session.advanceCreatedDirectory(Object.freeze({
139
+ admission: createAdmission,
140
+ parent: checkedMutationDirectory(parentPath, parentGuard.realPath, created.parentAfter),
141
+ child: checkedMutationDirectory(targetPath, created.childGuard.realPath, created.childGuard.stat),
142
+ })))
143
+ return true;
144
+ }
145
+ catch {
146
+ // Post-create observations are optional receipt evidence. The directory
147
+ // was already created, so renew ordered admission without a second mkdir.
148
+ }
149
+ await session.authorize(Object.freeze({
150
+ targetPath,
151
+ mutationPath: targetPath,
152
+ phase: "parent",
153
+ }));
154
+ await assertAsyncDirectoryGuard(parentGuard);
155
+ assertDirectoryIdentitySync(root.rootReal, rootIdentity);
156
+ assertFinalSymlinkRejected(targetPath, true);
157
+ const refreshed = await observeCreated();
158
+ await assertAsyncDirectoryGuard(parentGuard);
159
+ await assertAsyncDirectoryGuard(refreshed.childGuard);
160
+ assertDirectoryIdentitySync(root.rootReal, rootIdentity);
161
+ return true;
162
+ }
163
+ finally {
164
+ session.dispose();
165
+ }
166
+ }
167
+ export async function prepareRootWriteTarget(root, targetPath, assertBeforeMutation, mutationAdmission) {
168
+ const basename = path.basename(targetPath);
169
+ const baseParams = {
170
+ rootReal: root.rootReal,
171
+ rootIdentity: root.rootIdentity,
172
+ targetPath: path.dirname(targetPath),
173
+ assertBeforeMutation,
174
+ };
175
+ const mutationWalk = mutationAdmission
176
+ ? mutationWalkOptions(mutationAdmission, (prospectiveParent) => path.join(prospectiveParent, basename), assertBeforeMutation)
177
+ : undefined;
178
+ let parentPath;
179
+ try {
180
+ parentPath = await mkdirPathComponentsWithGuards(mutationWalk ? {
181
+ ...baseParams,
182
+ ...mutationWalk.options,
183
+ } : baseParams);
184
+ }
185
+ finally {
186
+ mutationWalk?.dispose();
187
+ }
188
+ // Continue through the guarded walk's real parent instead of re-entering
189
+ // the original path through a symlinked component.
190
+ return path.join(parentPath, basename);
191
+ }
192
+ export async function mkdirPathFallback(root, resolved, assertBeforeMutation, rejectSymlinks = false, mutationAdmission) {
193
+ const baseParams = {
194
+ rootReal: resolved.rootReal, targetPath: resolved.resolved, assertBeforeMutation,
195
+ rootIdentity: root.rootIdentity,
196
+ rejectSymlinks,
197
+ beforeComponent: async (componentPath) => await getFsSafeTestHooks()?.beforeRootFallbackMutation?.("mkdir", componentPath),
198
+ };
199
+ const mutationWalk = mutationAdmission
200
+ ? mutationWalkOptions(mutationAdmission, (prospectiveDirectory) => prospectiveDirectory, assertBeforeMutation)
201
+ : undefined;
202
+ try {
203
+ await mkdirPathComponentsWithGuards(mutationWalk ? {
204
+ ...baseParams,
205
+ ...mutationWalk.options,
206
+ rejectSymlinks: rejectSymlinks || mutationAdmission.rejectParentSymlinks,
207
+ } : baseParams);
208
+ }
209
+ finally {
210
+ mutationWalk?.dispose();
211
+ }
212
+ }
@@ -1,9 +1,21 @@
1
- import type { Stats } from "node:fs";
1
+ import type { BigIntStats, Stats } from "node:fs";
2
+ import { type AsyncDirectoryGuard } from "./directory-guard.js";
2
3
  import { type RootContext } from "./root-context.js";
4
+ import type { RootPathDirectoryObservationGuard, RootPathObservationReceipt, RootPathParentObservationReceipt } from "./root-path.js";
3
5
  import type { DirEntry, PathStat } from "./types.js";
4
- export declare function pathStatFromStats(stat: Stats): PathStat;
5
- export declare function listDirectoryPath(root: RootContext, directory: string, withFileTypes: true): Promise<DirEntry[]>;
6
- export declare function listDirectoryPath(root: RootContext, directory: string, withFileTypes: boolean): Promise<string[] | DirEntry[]>;
6
+ export declare function pathStatFromStats(stat: Stats | BigIntStats): PathStat;
7
+ export type RootDirectoryObservationGuard = AsyncDirectoryGuard<BigIntStats>;
8
+ export declare function createRootDirectoryObservationGuard(root: RootContext, directory: string): Promise<RootDirectoryObservationGuard>;
9
+ export declare function assertRootDirectoryObservationGuard(root: RootContext, guard: RootDirectoryObservationGuard | RootPathDirectoryObservationGuard): Promise<void>;
10
+ /**
11
+ * Close an operation-local traversal receipt with fresh exact observations.
12
+ * Descendant canonical paths are admitted while the receipt is created. The
13
+ * final directory check repeats canonical admission; the Root-only case does
14
+ * both its identity and canonical check here.
15
+ */
16
+ export declare function assertRootPathObservationReceiptCurrent(root: RootContext, receipt: RootPathObservationReceipt | RootPathParentObservationReceipt, finalTarget?: Stats | BigIntStats): void;
17
+ export declare function listDirectoryPath(root: RootContext, directory: string, withFileTypes: true, receipt?: RootPathObservationReceipt): Promise<DirEntry[]>;
18
+ export declare function listDirectoryPath(root: RootContext, directory: string, withFileTypes: boolean, receipt?: RootPathObservationReceipt): Promise<string[] | DirEntry[]>;
7
19
  export type RootDirectoryListing = {
8
20
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