@openclaw/signal 2026.9.6 → 2026.9.8

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 (279) hide show
  1. package/assets/icon.png +0 -0
  2. package/dist/.setup/{accounts-BV6tDOTc.mjs → accounts-DMtj2E-4.mjs} +6 -35
  3. package/dist/.setup/api-DEB0Obj8.mjs +16 -0
  4. package/dist/.setup/{api-CGh4eWR8.mjs → api-DmCb6e7E.mjs} +10 -10
  5. package/dist/.setup/{approval-auth-BBI9BTRm.mjs → approval-auth-CszS7gwf.mjs} +7 -13
  6. package/dist/.setup/{approval-handler.runtime-C3vN5OWd.mjs → approval-handler.runtime-D9ofZcZW.mjs} +10 -29
  7. package/dist/.setup/{approval-reactions-DDQvPP_z.mjs → approval-reactions-BKkjIAoi.mjs} +25 -36
  8. package/dist/.setup/{channel-DhzTcFsK.mjs → channel-DrUxv5cf.mjs} +567 -136
  9. package/dist/.setup/{client-BseAt7F7.mjs → client-AXcDteBZ.mjs} +63 -152
  10. package/dist/.setup/client-adapter-c_O1ouxZ.mjs +30 -0
  11. package/dist/.setup/{config-schema-aQwwMGUj.mjs → config-schema-DvxZ18SD.mjs} +3 -13
  12. package/dist/.setup/{doctor-contract-api-Rbq_sRTI.mjs → doctor-contract-api-Db9V9gsY.mjs} +212 -91
  13. package/dist/.setup/{identity-YXPmgFMu.mjs → identity-B3JyPqGO.mjs} +2 -6
  14. package/dist/.setup/{install-signal-cli-BDbzFcU2.mjs → install-signal-cli-ChvjzM6X.mjs} +0 -4
  15. package/dist/.setup/legacy-transport-QIpaMNST.mjs +18 -0
  16. package/dist/.setup/{monitor-Dnz6Ygz5.mjs → monitor-BfwQr78f.mjs} +95 -124
  17. package/dist/.setup/{probe-DXT2eLnw.mjs → probe-BYLzra6D.mjs} +9 -9
  18. package/dist/.setup/{reaction-runtime-api-BnQGHcrB.mjs → reaction-runtime-api-DDi5x2wC.mjs} +3 -17
  19. package/dist/.setup/{question-reactions-C8cSEjVf.mjs → reaction-targets-CEdyjtrC.mjs} +11 -8
  20. package/dist/.setup/{rpc-context-CwwADZ1b.mjs → rpc-context-D26RxFIm.mjs} +1 -1
  21. package/dist/.setup/runtime-8sxUF217.mjs +8 -0
  22. package/dist/.setup/{send-B78M_eFp.mjs → send-DEjrbpIC.mjs} +25 -55
  23. package/dist/.setup/{channel.runtime-CG79z_Vy.mjs → setup-surface-Drt-4t3R.mjs} +4 -6
  24. package/dist/.setup/transport-detection-BVUDE42e.mjs +25 -0
  25. package/dist/.setup/{transport-policy-5VSnj5ma.mjs → transport-policy-B6C_LogW.mjs} +19 -1
  26. package/dist/.setup/transport-probes.runtime-DwXEHnXr.mjs +2 -0
  27. package/dist/api.js +10 -10
  28. package/dist/channel-config-api.js +1 -1
  29. package/dist/channel-plugin-api.js +1 -1
  30. package/dist/contract-api.js +2 -2
  31. package/dist/doctor-contract-api.js +1 -1
  32. package/dist/reaction-runtime-api.js +1 -1
  33. package/dist/runtime-api.js +2 -19
  34. package/dist/setup-entry.js +1 -1
  35. package/node_modules/@openclaw/fs-safe/CHANGELOG.md +102 -0
  36. package/node_modules/@openclaw/fs-safe/README.md +24 -6
  37. package/node_modules/@openclaw/fs-safe/dist/advanced.d.ts +6 -1
  38. package/node_modules/@openclaw/fs-safe/dist/advanced.js +3 -1
  39. package/node_modules/@openclaw/fs-safe/dist/archive-durability.js +1 -1
  40. package/node_modules/@openclaw/fs-safe/dist/archive-merge.js +1 -2
  41. package/node_modules/@openclaw/fs-safe/dist/archive-plan.d.ts +2 -7
  42. package/node_modules/@openclaw/fs-safe/dist/archive-read.js +9 -18
  43. package/node_modules/@openclaw/fs-safe/dist/archive-staging.d.ts +1 -2
  44. package/node_modules/@openclaw/fs-safe/dist/archive-staging.js +3 -3
  45. package/node_modules/@openclaw/fs-safe/dist/archive-zip-directory.js +4 -0
  46. package/node_modules/@openclaw/fs-safe/dist/archive-zip-entry.d.ts +11 -11
  47. package/node_modules/@openclaw/fs-safe/dist/archive-zip-entry.js +3 -35
  48. package/node_modules/@openclaw/fs-safe/dist/archive-zip-integrity.d.ts +2 -2
  49. package/node_modules/@openclaw/fs-safe/dist/archive-zip-integrity.js +2 -12
  50. package/node_modules/@openclaw/fs-safe/dist/archive-zip-loader.d.ts +7 -3
  51. package/node_modules/@openclaw/fs-safe/dist/archive-zip-loader.js +13 -10
  52. package/node_modules/@openclaw/fs-safe/dist/archive-zip-manifest.js +3 -1
  53. package/node_modules/@openclaw/fs-safe/dist/archive-zip-preflight.d.ts +2 -3
  54. package/node_modules/@openclaw/fs-safe/dist/archive-zip-preflight.js +16 -8
  55. package/node_modules/@openclaw/fs-safe/dist/archive.d.ts +6 -3
  56. package/node_modules/@openclaw/fs-safe/dist/archive.js +22 -19
  57. package/node_modules/@openclaw/fs-safe/dist/atomic.d.ts +1 -1
  58. package/node_modules/@openclaw/fs-safe/dist/copy-publication.d.ts +1 -3
  59. package/node_modules/@openclaw/fs-safe/dist/copy-publication.js +2 -6
  60. package/node_modules/@openclaw/fs-safe/dist/deny-mutation-match.d.ts +2 -0
  61. package/node_modules/@openclaw/fs-safe/dist/deny-mutation-match.js +71 -0
  62. package/node_modules/@openclaw/fs-safe/dist/deny-mutations.js +4 -3
  63. package/node_modules/@openclaw/fs-safe/dist/directory-guard.d.ts +0 -1
  64. package/node_modules/@openclaw/fs-safe/dist/directory-guard.js +0 -3
  65. package/node_modules/@openclaw/fs-safe/dist/directory-mode-node.d.ts +20 -2
  66. package/node_modules/@openclaw/fs-safe/dist/directory-mode-node.js +77 -1
  67. package/node_modules/@openclaw/fs-safe/dist/directory-receipt.js +5 -7
  68. package/node_modules/@openclaw/fs-safe/dist/effective-uid.js +1 -4
  69. package/node_modules/@openclaw/fs-safe/dist/errors.d.ts +3 -1
  70. package/node_modules/@openclaw/fs-safe/dist/errors.js +3 -2
  71. package/node_modules/@openclaw/fs-safe/dist/file-identity.js +10 -2
  72. package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-acquisition.js +1 -1
  73. package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-admission.js +5 -1
  74. package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-held.d.ts +4 -11
  75. package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-held.js +1 -4
  76. package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-io.d.ts +3 -6
  77. package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-io.js +1 -1
  78. package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-options.d.ts +2 -10
  79. package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root.d.ts +2 -4
  80. package/node_modules/@openclaw/fs-safe/dist/file-lock-sync.js +2 -2
  81. package/node_modules/@openclaw/fs-safe/dist/file-store-boundary.d.ts +3 -7
  82. package/node_modules/@openclaw/fs-safe/dist/file-store-boundary.js +7 -10
  83. package/node_modules/@openclaw/fs-safe/dist/file-store-prune.js +7 -6
  84. package/node_modules/@openclaw/fs-safe/dist/file-store.d.ts +4 -7
  85. package/node_modules/@openclaw/fs-safe/dist/file-store.js +19 -21
  86. package/node_modules/@openclaw/fs-safe/dist/guest-native-python.js +23 -31
  87. package/node_modules/@openclaw/fs-safe/dist/guest.js +21 -12
  88. package/node_modules/@openclaw/fs-safe/dist/json-document-store.d.ts +4 -9
  89. package/node_modules/@openclaw/fs-safe/dist/json-durable-queue-ownership.d.ts +1 -5
  90. package/node_modules/@openclaw/fs-safe/dist/json-durable-queue.d.ts +0 -1
  91. package/node_modules/@openclaw/fs-safe/dist/json-durable-queue.js +2 -7
  92. package/node_modules/@openclaw/fs-safe/dist/local-file-access.js +2 -5
  93. package/node_modules/@openclaw/fs-safe/dist/local-file-descriptor.d.ts +2 -5
  94. package/node_modules/@openclaw/fs-safe/dist/local-roots.d.ts +2 -7
  95. package/node_modules/@openclaw/fs-safe/dist/move-path-cleanup.js +4 -4
  96. package/node_modules/@openclaw/fs-safe/dist/mutation-authority.js +5 -0
  97. package/node_modules/@openclaw/fs-safe/dist/native-binding.d.ts +51 -14
  98. package/node_modules/@openclaw/fs-safe/dist/native-pinned-write.js +8 -2
  99. package/node_modules/@openclaw/fs-safe/dist/native-staged-symlink.d.ts +13 -0
  100. package/node_modules/@openclaw/fs-safe/dist/native-staged-symlink.js +303 -0
  101. package/node_modules/@openclaw/fs-safe/dist/owner-dacl-batch-worker.d.ts +1 -0
  102. package/node_modules/@openclaw/fs-safe/dist/owner-dacl-batch-worker.js +54 -0
  103. package/node_modules/@openclaw/fs-safe/dist/owner-dacl-batch.d.ts +5 -0
  104. package/node_modules/@openclaw/fs-safe/dist/owner-dacl-batch.js +64 -0
  105. package/node_modules/@openclaw/fs-safe/dist/owner-dacl.d.ts +2 -0
  106. package/node_modules/@openclaw/fs-safe/dist/owner-dacl.js +3 -0
  107. package/node_modules/@openclaw/fs-safe/dist/path.js +17 -1
  108. package/node_modules/@openclaw/fs-safe/dist/permission-exec.d.ts +6 -0
  109. package/node_modules/@openclaw/fs-safe/dist/permission-exec.js +3 -6
  110. package/node_modules/@openclaw/fs-safe/dist/permissions-public.d.ts +3 -1
  111. package/node_modules/@openclaw/fs-safe/dist/permissions-public.js +1 -0
  112. package/node_modules/@openclaw/fs-safe/dist/permissions-windows.d.ts +3 -6
  113. package/node_modules/@openclaw/fs-safe/dist/permissions.d.ts +3 -10
  114. package/node_modules/@openclaw/fs-safe/dist/permissions.js +0 -1
  115. package/node_modules/@openclaw/fs-safe/dist/pinned-mutation-admission.d.ts +0 -1
  116. package/node_modules/@openclaw/fs-safe/dist/pinned-mutation-admission.js +4 -2
  117. package/node_modules/@openclaw/fs-safe/dist/pinned-mutation-shared-route.d.ts +2 -8
  118. package/node_modules/@openclaw/fs-safe/dist/pinned-open.d.ts +1 -1
  119. package/node_modules/@openclaw/fs-safe/dist/pinned-open.js +2 -3
  120. package/node_modules/@openclaw/fs-safe/dist/publish-copy-stage.js +4 -0
  121. package/node_modules/@openclaw/fs-safe/dist/read-opened-file.d.ts +2 -5
  122. package/node_modules/@openclaw/fs-safe/dist/regular-file.js +3 -3
  123. package/node_modules/@openclaw/fs-safe/dist/replace-directory.js +5 -17
  124. package/node_modules/@openclaw/fs-safe/dist/replace-file-buffer.d.ts +4 -0
  125. package/node_modules/@openclaw/fs-safe/dist/replace-file-buffer.js +36 -0
  126. package/node_modules/@openclaw/fs-safe/dist/replace-file-copy-fallback.d.ts +4 -10
  127. package/node_modules/@openclaw/fs-safe/dist/replace-file-copy-fallback.js +66 -38
  128. package/node_modules/@openclaw/fs-safe/dist/replace-file-descriptor.d.ts +7 -11
  129. package/node_modules/@openclaw/fs-safe/dist/replace-file-descriptor.js +10 -2
  130. package/node_modules/@openclaw/fs-safe/dist/replace-file-destination.d.ts +21 -0
  131. package/node_modules/@openclaw/fs-safe/dist/replace-file-destination.js +123 -0
  132. package/node_modules/@openclaw/fs-safe/dist/replace-file-mutation.d.ts +26 -0
  133. package/node_modules/@openclaw/fs-safe/dist/replace-file-mutation.js +47 -0
  134. package/node_modules/@openclaw/fs-safe/dist/replace-file-temp-owner.d.ts +2 -2
  135. package/node_modules/@openclaw/fs-safe/dist/replace-file-temp-owner.js +16 -4
  136. package/node_modules/@openclaw/fs-safe/dist/replace-file-types.d.ts +55 -0
  137. package/node_modules/@openclaw/fs-safe/dist/replace-file-types.js +1 -0
  138. package/node_modules/@openclaw/fs-safe/dist/replace-file.d.ts +3 -55
  139. package/node_modules/@openclaw/fs-safe/dist/replace-file.js +31 -11
  140. package/node_modules/@openclaw/fs-safe/dist/retained-directory-replacement.d.ts +1 -0
  141. package/node_modules/@openclaw/fs-safe/dist/retained-directory-replacement.js +1 -1
  142. package/node_modules/@openclaw/fs-safe/dist/retained-file-types.d.ts +50 -0
  143. package/node_modules/@openclaw/fs-safe/dist/retained-file-types.js +1 -0
  144. package/node_modules/@openclaw/fs-safe/dist/retained-file.d.ts +3 -0
  145. package/node_modules/@openclaw/fs-safe/dist/retained-file.js +121 -0
  146. package/node_modules/@openclaw/fs-safe/dist/root-context.js +3 -2
  147. package/node_modules/@openclaw/fs-safe/dist/root-directory-entry.d.ts +9 -0
  148. package/node_modules/@openclaw/fs-safe/dist/root-directory-entry.js +28 -0
  149. package/node_modules/@openclaw/fs-safe/dist/root-directory-list.d.ts +9 -1
  150. package/node_modules/@openclaw/fs-safe/dist/root-directory-list.js +88 -37
  151. package/node_modules/@openclaw/fs-safe/dist/root-file-final-admission.d.ts +1 -1
  152. package/node_modules/@openclaw/fs-safe/dist/root-file-final-admission.js +1 -6
  153. package/node_modules/@openclaw/fs-safe/dist/root-file.js +2 -5
  154. package/node_modules/@openclaw/fs-safe/dist/root-handle-context.d.ts +4 -0
  155. package/node_modules/@openclaw/fs-safe/dist/root-handle-context.js +12 -0
  156. package/node_modules/@openclaw/fs-safe/dist/root-impl.d.ts +3 -3
  157. package/node_modules/@openclaw/fs-safe/dist/root-impl.js +8 -5
  158. package/node_modules/@openclaw/fs-safe/dist/root-move-noreplace.d.ts +2 -7
  159. package/node_modules/@openclaw/fs-safe/dist/root-move-noreplace.js +3 -3
  160. package/node_modules/@openclaw/fs-safe/dist/root-observed-path.d.ts +0 -1
  161. package/node_modules/@openclaw/fs-safe/dist/root-observed-path.js +0 -3
  162. package/node_modules/@openclaw/fs-safe/dist/root-path-observation.d.ts +4 -11
  163. package/node_modules/@openclaw/fs-safe/dist/root-path.js +7 -10
  164. package/node_modules/@openclaw/fs-safe/dist/root-paths.d.ts +2 -6
  165. package/node_modules/@openclaw/fs-safe/dist/root-remove-identity.d.ts +1 -3
  166. package/node_modules/@openclaw/fs-safe/dist/root-walk.d.ts +19 -12
  167. package/node_modules/@openclaw/fs-safe/dist/root-walk.js +56 -20
  168. package/node_modules/@openclaw/fs-safe/dist/root-write-admission.js +1 -6
  169. package/node_modules/@openclaw/fs-safe/dist/root-write-complete-parent.d.ts +2 -0
  170. package/node_modules/@openclaw/fs-safe/dist/root-write-complete-parent.js +1 -1
  171. package/node_modules/@openclaw/fs-safe/dist/safe-path-segment.d.ts +1 -0
  172. package/node_modules/@openclaw/fs-safe/dist/safe-path-segment.js +8 -2
  173. package/node_modules/@openclaw/fs-safe/dist/secret-file.d.ts +6 -2
  174. package/node_modules/@openclaw/fs-safe/dist/secret-file.js +12 -16
  175. package/node_modules/@openclaw/fs-safe/dist/secret-read-policy.js +1 -1
  176. package/node_modules/@openclaw/fs-safe/dist/secure-file-windows.js +5 -14
  177. package/node_modules/@openclaw/fs-safe/dist/secure-file.js +3 -2
  178. package/node_modules/@openclaw/fs-safe/dist/secure-temp-dir.js +2 -7
  179. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-acquire.js +4 -4
  180. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-admission-parser.d.ts +1 -2
  181. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-handle.d.ts +2 -8
  182. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-policy.d.ts +2 -7
  183. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-reclaim.d.ts +2 -2
  184. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-reclaim.js +11 -12
  185. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-stale-admission.d.ts +1 -5
  186. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock.js +9 -7
  187. package/node_modules/@openclaw/fs-safe/dist/staged-symlink-types.d.ts +39 -0
  188. package/node_modules/@openclaw/fs-safe/dist/staged-symlink-types.js +1 -0
  189. package/node_modules/@openclaw/fs-safe/dist/stat-observation.js +3 -10
  190. package/node_modules/@openclaw/fs-safe/dist/strict-file-identity.d.ts +2 -0
  191. package/node_modules/@openclaw/fs-safe/dist/strict-file-identity.js +6 -6
  192. package/node_modules/@openclaw/fs-safe/dist/symlink-parents.js +58 -7
  193. package/node_modules/@openclaw/fs-safe/dist/temp-target.js +8 -10
  194. package/node_modules/@openclaw/fs-safe/dist/temp-workspace-admission.js +28 -33
  195. package/node_modules/@openclaw/fs-safe/dist/temp-workspace-child-admission.d.ts +1 -1
  196. package/node_modules/@openclaw/fs-safe/dist/temp-workspace-child-admission.js +16 -17
  197. package/node_modules/@openclaw/fs-safe/dist/temp-workspace-descriptor.js +1 -2
  198. package/node_modules/@openclaw/fs-safe/dist/temp-workspace-owner.js +4 -9
  199. package/node_modules/@openclaw/fs-safe/dist/temp-workspace-ownership.d.ts +8 -0
  200. package/node_modules/@openclaw/fs-safe/dist/temp-workspace-ownership.js +52 -0
  201. package/node_modules/@openclaw/fs-safe/dist/test-hooks.d.ts +5 -1
  202. package/node_modules/@openclaw/fs-safe/dist/text-atomic.d.ts +2 -1
  203. package/node_modules/@openclaw/fs-safe/dist/text-atomic.js +2 -0
  204. package/node_modules/@openclaw/fs-safe/dist/trash.js +27 -1
  205. package/node_modules/@openclaw/fs-safe/dist/walk.d.ts +2 -5
  206. package/node_modules/@openclaw/fs-safe/dist/watch-alias.d.ts +6 -0
  207. package/node_modules/@openclaw/fs-safe/dist/watch-alias.js +88 -0
  208. package/node_modules/@openclaw/fs-safe/dist/watch-hints.d.ts +9 -0
  209. package/node_modules/@openclaw/fs-safe/dist/watch-hints.js +93 -0
  210. package/node_modules/@openclaw/fs-safe/dist/watch-native.d.ts +36 -0
  211. package/node_modules/@openclaw/fs-safe/dist/watch-native.js +73 -0
  212. package/node_modules/@openclaw/fs-safe/dist/watch-scan.d.ts +28 -0
  213. package/node_modules/@openclaw/fs-safe/dist/watch-scan.js +300 -0
  214. package/node_modules/@openclaw/fs-safe/dist/watch-stream.d.ts +8 -0
  215. package/node_modules/@openclaw/fs-safe/dist/watch-stream.js +32 -0
  216. package/node_modules/@openclaw/fs-safe/dist/watch-types.d.ts +60 -0
  217. package/node_modules/@openclaw/fs-safe/dist/watch-types.js +1 -0
  218. package/node_modules/@openclaw/fs-safe/dist/watch.d.ts +5 -0
  219. package/node_modules/@openclaw/fs-safe/dist/watch.js +530 -0
  220. package/node_modules/@openclaw/fs-safe/dist/windows-owner.d.ts +3 -7
  221. package/node_modules/@openclaw/fs-safe/dist/windows-owner.js +0 -1
  222. package/node_modules/@openclaw/fs-safe/dist/windows-security-bridge.cs +6 -6
  223. package/node_modules/@openclaw/fs-safe/dist/windows-security-bridge.ps1 +78 -3
  224. package/node_modules/@openclaw/fs-safe/dist/windows-security-command.d.ts +8 -0
  225. package/node_modules/@openclaw/fs-safe/dist/windows-security-command.js +66 -15
  226. package/node_modules/@openclaw/fs-safe/dist/windows-security-facts.d.ts +4 -0
  227. package/node_modules/@openclaw/fs-safe/dist/windows-security-facts.js +6 -2
  228. package/node_modules/@openclaw/fs-safe/docs/advanced.md +4 -2
  229. package/node_modules/@openclaw/fs-safe/docs/archive.md +16 -0
  230. package/node_modules/@openclaw/fs-safe/docs/atomic.md +93 -3
  231. package/node_modules/@openclaw/fs-safe/docs/contributing.md +102 -4
  232. package/node_modules/@openclaw/fs-safe/docs/copy.md +2 -0
  233. package/node_modules/@openclaw/fs-safe/docs/durability.md +7 -0
  234. package/node_modules/@openclaw/fs-safe/docs/file-store.md +5 -0
  235. package/node_modules/@openclaw/fs-safe/docs/guest.md +7 -1
  236. package/node_modules/@openclaw/fs-safe/docs/index.md +1 -0
  237. package/node_modules/@openclaw/fs-safe/docs/install.md +30 -0
  238. package/node_modules/@openclaw/fs-safe/docs/native-helper.md +20 -4
  239. package/node_modules/@openclaw/fs-safe/docs/native.md +63 -1
  240. package/node_modules/@openclaw/fs-safe/docs/permissions.md +66 -0
  241. package/node_modules/@openclaw/fs-safe/docs/public-api.md +30 -3
  242. package/node_modules/@openclaw/fs-safe/docs/retained-file.md +115 -0
  243. package/node_modules/@openclaw/fs-safe/docs/root.md +35 -9
  244. package/node_modules/@openclaw/fs-safe/docs/secret-file.md +19 -0
  245. package/node_modules/@openclaw/fs-safe/docs/security-model.md +4 -1
  246. package/node_modules/@openclaw/fs-safe/docs/sidecar-lock.md +5 -1
  247. package/node_modules/@openclaw/fs-safe/docs/staged-symlink.md +124 -0
  248. package/node_modules/@openclaw/fs-safe/docs/store.md +3 -1
  249. package/node_modules/@openclaw/fs-safe/docs/temp.md +24 -4
  250. package/node_modules/@openclaw/fs-safe/docs/testing.md +210 -0
  251. package/node_modules/@openclaw/fs-safe/docs/types.md +6 -0
  252. package/node_modules/@openclaw/fs-safe/docs/walk.md +34 -1
  253. package/node_modules/@openclaw/fs-safe/docs/watch.md +251 -0
  254. package/node_modules/@openclaw/fs-safe/docs/writing.md +21 -0
  255. package/node_modules/@openclaw/fs-safe/package.json +13 -9
  256. package/node_modules/@openclaw/fs-safe-darwin-arm64/fs-safe-native.node +0 -0
  257. package/node_modules/@openclaw/fs-safe-darwin-arm64/package.json +1 -1
  258. package/node_modules/@openclaw/fs-safe-darwin-x64/fs-safe-native.node +0 -0
  259. package/node_modules/@openclaw/fs-safe-darwin-x64/package.json +1 -1
  260. package/node_modules/@openclaw/fs-safe-linux-arm64-gnu/fs-safe-native.node +0 -0
  261. package/node_modules/@openclaw/fs-safe-linux-arm64-gnu/package.json +1 -1
  262. package/node_modules/@openclaw/fs-safe-linux-arm64-musl/fs-safe-native.node +0 -0
  263. package/node_modules/@openclaw/fs-safe-linux-arm64-musl/package.json +1 -1
  264. package/node_modules/@openclaw/fs-safe-linux-x64-gnu/fs-safe-native.node +0 -0
  265. package/node_modules/@openclaw/fs-safe-linux-x64-gnu/package.json +1 -1
  266. package/node_modules/@openclaw/fs-safe-linux-x64-musl/fs-safe-native.node +0 -0
  267. package/node_modules/@openclaw/fs-safe-linux-x64-musl/package.json +1 -1
  268. package/node_modules/@openclaw/fs-safe-win32-x64-msvc/fs-safe-native.node +0 -0
  269. package/node_modules/@openclaw/fs-safe-win32-x64-msvc/package.json +1 -1
  270. package/package.json +5 -5
  271. package/dist/.setup/api-B9-B1L7Q.mjs +0 -17
  272. package/dist/.setup/client-adapter-dvFa47YL.mjs +0 -63
  273. package/dist/.setup/rolldown-runtime-8H4AJuhK.mjs +0 -14
  274. package/dist/.setup/send.runtime-CLnCWvrM.mjs +0 -2
  275. package/dist/.setup/transport-detection-CoiRl7Gx.mjs +0 -576
  276. package/dist/.setup/transport-detection.runtime-Tlhuv3T_.mjs +0 -2
  277. package/dist/.setup/transport-probes.runtime-WprAyBbL.mjs +0 -2
  278. package/node_modules/@openclaw/fs-safe/dist/directory-mode-owner.d.ts +0 -20
  279. package/node_modules/@openclaw/fs-safe/dist/directory-mode-owner.js +0 -78
@@ -270,13 +270,15 @@ export const GUEST_FILESYSTEM_PYTHON = [
270
270
  "def copy_entry(src_parent_fd, src_basename, dst_parent_fd, dst_basename):",
271
271
  " src_stat = os.lstat(src_basename, dir_fd=src_parent_fd)",
272
272
  " if stat.S_ISDIR(src_stat.st_mode) and not stat.S_ISLNK(src_stat.st_mode):",
273
- " os.mkdir(dst_basename, stat.S_IMODE(src_stat.st_mode) or 0o755, dir_fd=dst_parent_fd)",
274
273
  " copied_children = []",
275
274
  " src_dir_fd = None",
276
275
  " dst_dir_fd = None",
276
+ " destination_created = False",
277
277
  " try:",
278
278
  " src_dir_fd = open_dir(src_basename, dir_fd=src_parent_fd)",
279
279
  " src_stat = os.fstat(src_dir_fd)",
280
+ " os.mkdir(dst_basename, stat.S_IMODE(src_stat.st_mode), dir_fd=dst_parent_fd)",
281
+ " destination_created = True",
280
282
  " dst_dir_fd = open_dir(dst_basename, dir_fd=dst_parent_fd)",
281
283
  " for child in os.listdir(src_dir_fd):",
282
284
  " copied_children.append((child, copy_entry(src_dir_fd, child, dst_dir_fd, child)))",
@@ -284,10 +286,11 @@ export const GUEST_FILESYSTEM_PYTHON = [
284
286
  " if dst_dir_fd is not None:",
285
287
  " os.close(dst_dir_fd)",
286
288
  " dst_dir_fd = None",
287
- " try:",
288
- " remove_tree(dst_parent_fd, dst_basename)",
289
- " except FileNotFoundError:",
290
- " pass",
289
+ " if destination_created:",
290
+ " try:",
291
+ " remove_tree(dst_parent_fd, dst_basename)",
292
+ " except FileNotFoundError:",
293
+ " pass",
291
294
  " raise",
292
295
  " finally:",
293
296
  " if src_dir_fd is not None:",
@@ -328,30 +331,36 @@ export const GUEST_FILESYSTEM_PYTHON = [
328
331
  " raise",
329
332
  " src_stat = os.lstat(src_basename, dir_fd=src_parent_fd)",
330
333
  " if stat.S_ISDIR(src_stat.st_mode) and not stat.S_ISLNK(src_stat.st_mode):",
331
- " temp_dir_name = create_temp_dir(dst_parent_fd, stat.S_IMODE(src_stat.st_mode) or 0o755)",
334
+ " temp_dir_name = None",
332
335
  " copied_children = []",
333
336
  " temp_dir_fd = None",
334
337
  " src_dir_fd = None",
335
338
  " try:",
336
- " temp_dir_fd = open_dir(temp_dir_name, dir_fd=dst_parent_fd)",
337
339
  " src_dir_fd = open_dir(src_basename, dir_fd=src_parent_fd)",
338
340
  " src_stat = os.fstat(src_dir_fd)",
341
+ " source_mode = stat.S_IMODE(src_stat.st_mode)",
342
+ " temp_dir_name = create_temp_dir(dst_parent_fd, source_mode or 0o700)",
343
+ " temp_dir_fd = open_dir(temp_dir_name, dir_fd=dst_parent_fd)",
339
344
  " for child in os.listdir(src_dir_fd):",
340
345
  " copied_children.append((child, copy_entry(src_dir_fd, child, temp_dir_fd, child)))",
341
346
  " os.close(src_dir_fd)",
342
347
  " src_dir_fd = None",
348
+ " os.rename(temp_dir_name, dst_basename, src_dir_fd=dst_parent_fd, dst_dir_fd=dst_parent_fd)",
349
+ " temp_dir_name = None",
350
+ " if source_mode == 0:",
351
+ " os.fchmod(temp_dir_fd, 0)",
343
352
  " os.close(temp_dir_fd)",
344
353
  " temp_dir_fd = None",
345
- " os.rename(temp_dir_name, dst_basename, src_dir_fd=dst_parent_fd, dst_dir_fd=dst_parent_fd)",
346
354
  " except Exception:",
347
355
  " if src_dir_fd is not None:",
348
356
  " os.close(src_dir_fd)",
349
357
  " if temp_dir_fd is not None:",
350
358
  " os.close(temp_dir_fd)",
351
- " try:",
352
- " remove_tree(dst_parent_fd, temp_dir_name)",
353
- " except FileNotFoundError:",
354
- " pass",
359
+ " if temp_dir_name is not None:",
360
+ " try:",
361
+ " remove_tree(dst_parent_fd, temp_dir_name)",
362
+ " except FileNotFoundError:",
363
+ " pass",
355
364
  " raise",
356
365
  " remove_copied_entry(src_parent_fd, src_basename, ('dir', entry_identity(src_stat), copied_children))",
357
366
  " os.fsync(dst_parent_fd)",
@@ -1,13 +1,8 @@
1
- import type { FileLockRetryOptions } from "./file-lock.js";
1
+ import { type FsSafeLockConfig } from "./lock-config.js";
2
2
  import type { Root } from "./root.js";
3
- import type { SidecarLockStaleRecovery } from "./sidecar-lock.js";
4
- export type JsonStoreLockOptions = {
5
- staleMs?: number;
6
- timeoutMs?: number;
7
- retry?: FileLockRetryOptions;
8
- staleRecovery?: SidecarLockStaleRecovery;
9
- managerKey?: string;
10
- };
3
+ export type JsonStoreLockOptions = Partial<FsSafeLockConfig & {
4
+ managerKey: string;
5
+ }>;
11
6
  export type JsonFileStoreOptions = {
12
7
  /** Overrides the parent store's durability for every JSON mutation. */
13
8
  durable?: boolean;
@@ -4,11 +4,7 @@ export type DurableQueueEntryPathsLike = {
4
4
  deliveredPath: string;
5
5
  processingPath?: string;
6
6
  };
7
- export type ValidatedDurableQueueEntryPaths = Readonly<{
8
- jsonPath: string;
9
- deliveredPath: string;
10
- processingPath: string;
11
- }>;
7
+ export type ValidatedDurableQueueEntryPaths = Readonly<Required<DurableQueueEntryPathsLike>>;
12
8
  export declare function validateDurableQueueEntryPaths(paths: DurableQueueEntryPathsLike): ValidatedDurableQueueEntryPaths;
13
9
  export declare function claimDurableQueueEntry(paths: DurableQueueEntryPathsLike, options?: {
14
10
  skipUnowned?: boolean;
@@ -1,4 +1,3 @@
1
- export { DEFAULT_JSON_DURABLE_QUEUE_ENTRY_MAX_BYTES } from "./json-durable-queue-read.js";
2
1
  export type JsonDurableQueueEntryPaths = {
3
2
  jsonPath: string;
4
3
  deliveredPath: string;
@@ -8,7 +8,6 @@ import { stringifyJsonDocument } from "./json-stringify.js";
8
8
  import { replaceFileAtomicWithDirectorySync } from "./replace-file.js";
9
9
  import { assertSafePathSegment } from "./safe-path-segment.js";
10
10
  import { admitStandalonePublicationPath, assertNoWindowsPathAlias, hasWindowsPathAlias, } from "./windows-path-alias.js";
11
- export { DEFAULT_JSON_DURABLE_QUEUE_ENTRY_MAX_BYTES } from "./json-durable-queue-read.js";
12
11
  function assertSafeQueueEntryId(id) {
13
12
  assertSafePathSegment(id, { label: "queue entry id" });
14
13
  }
@@ -146,8 +145,7 @@ export async function loadPendingJsonDurableQueueEntries(options) {
146
145
  await unlinkStaleTmpBestEffort(path.join(queueDir, file), now, options.cleanupTmpMaxAgeMs);
147
146
  }
148
147
  }
149
- const ids = [];
150
- const seenIds = new Set();
148
+ const ids = new Set();
151
149
  for (const file of files) {
152
150
  const suffix = file.endsWith(".processing")
153
151
  ? ".processing"
@@ -163,10 +161,7 @@ export async function loadPendingJsonDurableQueueEntries(options) {
163
161
  catch {
164
162
  continue;
165
163
  }
166
- if (seenIds.has(id))
167
- continue;
168
- seenIds.add(id);
169
- ids.push(id);
164
+ ids.add(id);
170
165
  }
171
166
  const entries = [];
172
167
  for (const id of ids) {
@@ -8,10 +8,6 @@ const FILE_URL_PREFIX_RE = /^file:\/\//i;
8
8
  export function isFileUrl(input) {
9
9
  return FILE_URL_PREFIX_RE.test(input);
10
10
  }
11
- function isLocalFileUrlHost(hostname) {
12
- const normalized = normalizeLowercaseStringOrEmpty(hostname);
13
- return normalized === "" || normalized === "localhost";
14
- }
15
11
  export function hasEncodedFileUrlSeparator(pathname) {
16
12
  return ENCODED_FILE_URL_SEPARATOR_RE.test(pathname);
17
13
  }
@@ -41,7 +37,8 @@ export function safeFileURLToPath(fileUrl, platform = process.platform) {
41
37
  if (parsed.protocol !== "file:") {
42
38
  throw new Error(`Invalid file:// URL: ${fileUrl}`);
43
39
  }
44
- if (!isLocalFileUrlHost(parsed.hostname)) {
40
+ const normalizedHost = normalizeLowercaseStringOrEmpty(parsed.hostname);
41
+ if (!(normalizedHost === "" || normalizedHost === "localhost")) {
45
42
  throw new Error(`file:// URLs with remote hosts are not allowed: ${fileUrl}`);
46
43
  }
47
44
  if (hasEncodedFileUrlSeparator(parsed.pathname)) {
@@ -1,16 +1,13 @@
1
1
  import type { BigIntStats, Stats } from "node:fs";
2
2
  import type { FileHandle } from "node:fs/promises";
3
- import type { HardlinkPolicy } from "./root-options.js";
4
- import type { SymlinkPolicy } from "./root-symlink-policy.js";
3
+ import type { RootReadOptions } from "./root-options.js";
5
4
  type OwnedLocalFile = {
6
5
  handle: FileHandle;
7
6
  stat: Stats;
8
7
  identity: BigIntStats;
9
8
  preOpenStat: BigIntStats | undefined;
10
9
  };
11
- export declare function openLocalFileDescriptor(filePath: string, options?: {
12
- hardlinks?: HardlinkPolicy;
13
- symlinks?: SymlinkPolicy;
10
+ export declare function openLocalFileDescriptor(filePath: string, options?: Pick<RootReadOptions, "hardlinks" | "symlinks"> & {
14
11
  readWrite?: true;
15
12
  }): Promise<OwnedLocalFile>;
16
13
  export {};
@@ -1,4 +1,4 @@
1
- import { type HardlinkPolicy, type ReadResult, type SymlinkPolicy } from "./root.js";
1
+ import { type ReadResult, type RootReadOptions } from "./root.js";
2
2
  export type LocalRootsPathResult = {
3
3
  path: string;
4
4
  root: string;
@@ -15,11 +15,6 @@ export type ResolveLocalPathFromRootsSyncOptions = LocalRootsInputOptions & {
15
15
  allowMissing?: boolean;
16
16
  requireFile?: boolean;
17
17
  };
18
- export type ReadLocalFileFromRootsOptions = LocalRootsInputOptions & {
19
- hardlinks?: HardlinkPolicy;
20
- maxBytes?: number;
21
- nonBlockingRead?: boolean;
22
- symlinks?: SymlinkPolicy;
23
- };
18
+ export type ReadLocalFileFromRootsOptions = LocalRootsInputOptions & RootReadOptions;
24
19
  export declare function resolveLocalPathFromRootsSync(options: ResolveLocalPathFromRootsSyncOptions): LocalRootsPathResult | null;
25
20
  export declare function readLocalFileFromRoots(options: ReadLocalFileFromRootsOptions): Promise<LocalRootsReadResult | null>;
@@ -135,9 +135,6 @@ async function observeOwnedAliasUnlink(sourcePath, group) {
135
135
  group.expected = entryIdentity(observed);
136
136
  return "removed";
137
137
  }
138
- function mergeCleanupResults(a, b) {
139
- return a === "stale" || b === "stale" ? "stale" : "removed";
140
- }
141
138
  export async function cleanupCopiedEntry(sourcePath, manifest, state, assertBeforeMutation) {
142
139
  if (manifest.kind === "directory") {
143
140
  let currentStat;
@@ -162,7 +159,10 @@ export async function cleanupCopiedEntry(sourcePath, manifest, state, assertBefo
162
159
  inspectSourceDirectory(sourcePath, manifest.directoryIdentity);
163
160
  } : undefined;
164
161
  for (const child of manifest.children) {
165
- result = mergeCleanupResults(result, await cleanupCopiedEntry(path.join(sourcePath, child.name), child.manifest, state, assertBeforeChildMutation));
162
+ const childResult = await cleanupCopiedEntry(path.join(sourcePath, child.name), child.manifest, state, assertBeforeChildMutation);
163
+ if (childResult === "stale") {
164
+ result = "stale";
165
+ }
166
166
  }
167
167
  // Child cleanup and the caller's authority check can replace the directory.
168
168
  // Keep the final exact observation after both, immediately before removal.
@@ -1,3 +1,4 @@
1
+ import { types } from "node:util";
1
2
  import { FsSafeError } from "./errors.js";
2
3
  export class MutationAuthorityError extends FsSafeError {
3
4
  rejection;
@@ -14,6 +15,10 @@ export function assertSynchronousCallbackResult(returned, name) {
14
15
  void Promise.resolve(returned).catch(() => undefined);
15
16
  throw new TypeError(`${name} must be synchronous`);
16
17
  }
18
+ // A generator returns its iterator before running the callback body.
19
+ if (types.isGeneratorObject(returned)) {
20
+ throw new TypeError(`${name} must be synchronous`);
21
+ }
17
22
  }
18
23
  export function composeMutationAssertions(defaultAssertion, callAssertion) {
19
24
  if (!defaultAssertion && !callAssertion)
@@ -1,6 +1,15 @@
1
+ import type { RetainedFileResult } from "./retained-file-types.js";
2
+ export interface NativeRetainedFile {
3
+ readonly admission: RetainedFileResult | {
4
+ status: "retained";
5
+ identity: string;
6
+ };
7
+ settle(remove: boolean): RetainedFileResult;
8
+ }
1
9
  import type { TarMeterLimits } from "./archive-limits.js";
2
10
  import type { ArchiveMemberKind } from "./archive-plan.js";
3
11
  import type { CopyCloneMode } from "./copy-policy.js";
12
+ import type { WindowsAceFlags } from "./owner-dacl.js";
4
13
  export interface NativeFileHash {
5
14
  bytes: number;
6
15
  digest: string;
@@ -58,16 +67,7 @@ export interface NativeWindowsAccessControlEntry {
58
67
  sid: string;
59
68
  mask: number;
60
69
  aceType: string;
61
- flags: {
62
- raw: number;
63
- objectInherit: boolean;
64
- containerInherit: boolean;
65
- noPropagateInherit: boolean;
66
- inheritOnly: boolean;
67
- inherited: boolean;
68
- successfulAccess: boolean;
69
- failedAccess: boolean;
70
- };
70
+ flags: WindowsAceFlags;
71
71
  }
72
72
  export interface NativeWindowsSecurityFacts {
73
73
  ownerSid: string;
@@ -96,7 +96,38 @@ export interface NativeWindowsDirectoryReceipt {
96
96
  export interface NativeDarwinAclFacts {
97
97
  state: "absent" | "empty" | "present";
98
98
  }
99
+ type NativeTwoPathArgs = [
100
+ sourceRootFd: number,
101
+ sourceRelPath: string,
102
+ targetRootFd: number,
103
+ targetRelPath: string
104
+ ];
99
105
  export interface NativeBinding {
106
+ /** Windows-only, private handle custody; no borrowed/runtime descriptors. */
107
+ retainWindowsFile?(directory: string, basename: string, parentDev: bigint, parentIno: bigint, dev: bigint, ino: bigint, size: bigint, mtimeNs: bigint, ctimeNs: bigint, sha256: string, maxBytes: number): NativeRetainedFile;
108
+ watchRegister?(root: string, limit: number, callback: (batch: import("./watch-native.js").NativeWatchWireBatch) => void, persistent: boolean): number;
109
+ watchConfigure?(id: number, anchors: string[], exclusions: string[]): void;
110
+ watchAdd?(id: number, directory: {
111
+ root: string;
112
+ relative: string;
113
+ rootDev: bigint;
114
+ rootIno: bigint;
115
+ dev: bigint;
116
+ ino: bigint;
117
+ }): void;
118
+ watchTestEvent?(id: number, path: string, flags: number): void;
119
+ watchUnregister?(id: number): void;
120
+ watchThreadCount?(): number;
121
+ watchMemoryStats?(): {
122
+ registrations: number;
123
+ pendingSets: number;
124
+ payloadsLive: number;
125
+ payloadsCreated: number;
126
+ payloadsDestroyed: number;
127
+ threadsafeFunctionsLive: number;
128
+ threadsafeFunctionsCreated: number;
129
+ threadsafeFunctionsDestroyed: number;
130
+ };
100
131
  /** Internal: consumes only a descriptor returned by this binding. */
101
132
  closeOwnedFd(fd: number): void;
102
133
  /** Internal Darwin-only synchronous inspection; the caller retains its fd. */
@@ -125,6 +156,11 @@ export interface NativeBinding {
125
156
  readCloneFileMetadata(paths: string[]): Promise<(Buffer | null)[]>;
126
157
  probeTreeClone(parentFd: number): "apfs" | "btrfs" | "refs" | "xfs" | "zfs" | null;
127
158
  cloneTree(sourceFd: number | null, parentFd: number, basename: string, concurrency: number, signal?: AbortSignal): Promise<void>;
159
+ openStagedSymlink?(parentFd: number, basename: string): number;
160
+ stagedSymlinkTarget?(parentFd: number, basename: string, linkFd: number): string;
161
+ stagedSymlinkMatches?(parentFd: number, basename: string, linkFd: number): boolean;
162
+ publishStagedSymlink?(parentFd: number, basename: string, linkFd: number, destination: string): void;
163
+ removeStagedSymlink?(parentFd: number, basename: string, linkFd: number): "removed" | "name-absent" | "preserved";
128
164
  createStagedFile?(parentFd: number, basename: string): number;
129
165
  stagedFileMatches?(parentFd: number, basename: string, fileFd: number): boolean;
130
166
  removeStagedFile?(parentFd: number, basename: string, fileFd: number): "removed" | "name-absent" | "preserved";
@@ -141,7 +177,7 @@ export interface NativeBinding {
141
177
  extractArchiveNative(path: string, kind: string, rootFd: number, plan: NativeArchivePlanEntry[], limits: TarMeterLimits, signal: AbortSignal): Promise<void>;
142
178
  fstatIdentity(fd: number): NativeFileIdentity;
143
179
  inspectArchiveNative(path: string, kind: string, limits: TarMeterLimits, signal: AbortSignal): Promise<NativeArchiveEntry[]>;
144
- linkBeneath(sourceRootFd: number, sourceRelPath: string, targetRootFd: number, targetRelPath: string): void;
180
+ linkBeneath(...args: NativeTwoPathArgs): void;
145
181
  /** Direct-child mkdir; true is receipt provenance only, never cleanup ownership. */
146
182
  mkdirChildBeneath?(parentFd: number, basename: string, mode: number): boolean;
147
183
  mkdirBeneath(rootFd: number, relPath: string, mode: number): void;
@@ -153,10 +189,11 @@ export interface NativeBinding {
153
189
  ownedTreeRemovalAvailable?(parentFd: number): boolean;
154
190
  removeOwnedTree?(parentFd: number, basename: string, directoryFd: number): Promise<NativeOwnedTreeRemovalResult>;
155
191
  removeOwnedTreeSync?(parentFd: number, basename: string, directoryFd: number): NativeOwnedTreeRemovalResult;
156
- renameNoReplace(sourceRootFd: number, sourceRelPath: string, targetRootFd: number, targetRelPath: string): void;
192
+ renameNoReplace(...args: NativeTwoPathArgs): void;
157
193
  /** Identity-fenced retained-directory rename capability. */
158
- renameNoReplaceWithIdentity?(sourceRootFd: number, sourceRelPath: string, targetRootFd: number, targetRelPath: string, expectedSourceDev: bigint, expectedSourceIno: bigint): void;
159
- renameReplace(sourceRootFd: number, sourceRelPath: string, targetRootFd: number, targetRelPath: string): void;
194
+ renameNoReplaceWithIdentity?(...args: [...paths: NativeTwoPathArgs, expectedSourceDev: bigint, expectedSourceIno: bigint]): void;
195
+ renameReplace(...args: NativeTwoPathArgs): void;
160
196
  sha256File(fd: number, maxBytes?: number, signal?: AbortSignal): Promise<NativeFileHash>;
161
197
  }
162
198
  export declare function captureNativeFdClose(binding: NativeBinding): (fd: number) => void;
199
+ export {};
@@ -182,8 +182,14 @@ async function capturePolicyAwarePosixParent(binding, params, rootFd, directoryF
182
182
  completeParentFd = binding.openBeneath(rootFd, params.relativeParentPath, directoryFlags).fd;
183
183
  }
184
184
  catch (error) {
185
- if (error?.code !== "ENOENT" || !params.mkdir)
186
- throw error;
185
+ if (error?.code !== "ENOENT" || !params.mkdir) {
186
+ // A mechanism rejection must not hide canonical denial/symlink policy.
187
+ // This admission only classifies failure; it cannot authorize a retry.
188
+ await authorizePinnedMutation(params, {
189
+ targetPath: initialTarget, mutationPath: initialTarget, phase: "parent",
190
+ });
191
+ throw normalizePolicyParentOpenError(error, params);
192
+ }
187
193
  }
188
194
  if (completeParentFd !== undefined) {
189
195
  const parentFd = completeParentFd;
@@ -0,0 +1,13 @@
1
+ import { type BigIntStats, type Stats } from "node:fs";
2
+ import type { DirectoryReceipt } from "./directory-durability.js";
3
+ import type { StagedSymlink, StagedSymlinkExpected } from "./staged-symlink-types.js";
4
+ /**
5
+ * Admit an existing staged symlink against caller-captured identity and retain
6
+ * its no-follow descriptor. Admission never creates, adopts by target, or unlinks.
7
+ */
8
+ export declare function retainSymlinkInDirectory(options: {
9
+ directory: string | DirectoryReceipt<Stats | BigIntStats>;
10
+ basename: string;
11
+ expected: StagedSymlinkExpected;
12
+ assertBeforeMutation: () => void;
13
+ }): Promise<StagedSymlink>;