@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.
- package/assets/icon.png +0 -0
- package/dist/.setup/{accounts-BV6tDOTc.mjs → accounts-DMtj2E-4.mjs} +6 -35
- package/dist/.setup/api-DEB0Obj8.mjs +16 -0
- package/dist/.setup/{api-CGh4eWR8.mjs → api-DmCb6e7E.mjs} +10 -10
- package/dist/.setup/{approval-auth-BBI9BTRm.mjs → approval-auth-CszS7gwf.mjs} +7 -13
- package/dist/.setup/{approval-handler.runtime-C3vN5OWd.mjs → approval-handler.runtime-D9ofZcZW.mjs} +10 -29
- package/dist/.setup/{approval-reactions-DDQvPP_z.mjs → approval-reactions-BKkjIAoi.mjs} +25 -36
- package/dist/.setup/{channel-DhzTcFsK.mjs → channel-DrUxv5cf.mjs} +567 -136
- package/dist/.setup/{client-BseAt7F7.mjs → client-AXcDteBZ.mjs} +63 -152
- package/dist/.setup/client-adapter-c_O1ouxZ.mjs +30 -0
- package/dist/.setup/{config-schema-aQwwMGUj.mjs → config-schema-DvxZ18SD.mjs} +3 -13
- package/dist/.setup/{doctor-contract-api-Rbq_sRTI.mjs → doctor-contract-api-Db9V9gsY.mjs} +212 -91
- package/dist/.setup/{identity-YXPmgFMu.mjs → identity-B3JyPqGO.mjs} +2 -6
- package/dist/.setup/{install-signal-cli-BDbzFcU2.mjs → install-signal-cli-ChvjzM6X.mjs} +0 -4
- package/dist/.setup/legacy-transport-QIpaMNST.mjs +18 -0
- package/dist/.setup/{monitor-Dnz6Ygz5.mjs → monitor-BfwQr78f.mjs} +95 -124
- package/dist/.setup/{probe-DXT2eLnw.mjs → probe-BYLzra6D.mjs} +9 -9
- package/dist/.setup/{reaction-runtime-api-BnQGHcrB.mjs → reaction-runtime-api-DDi5x2wC.mjs} +3 -17
- package/dist/.setup/{question-reactions-C8cSEjVf.mjs → reaction-targets-CEdyjtrC.mjs} +11 -8
- package/dist/.setup/{rpc-context-CwwADZ1b.mjs → rpc-context-D26RxFIm.mjs} +1 -1
- package/dist/.setup/runtime-8sxUF217.mjs +8 -0
- package/dist/.setup/{send-B78M_eFp.mjs → send-DEjrbpIC.mjs} +25 -55
- package/dist/.setup/{channel.runtime-CG79z_Vy.mjs → setup-surface-Drt-4t3R.mjs} +4 -6
- package/dist/.setup/transport-detection-BVUDE42e.mjs +25 -0
- package/dist/.setup/{transport-policy-5VSnj5ma.mjs → transport-policy-B6C_LogW.mjs} +19 -1
- package/dist/.setup/transport-probes.runtime-DwXEHnXr.mjs +2 -0
- package/dist/api.js +10 -10
- package/dist/channel-config-api.js +1 -1
- package/dist/channel-plugin-api.js +1 -1
- package/dist/contract-api.js +2 -2
- package/dist/doctor-contract-api.js +1 -1
- package/dist/reaction-runtime-api.js +1 -1
- package/dist/runtime-api.js +2 -19
- package/dist/setup-entry.js +1 -1
- package/node_modules/@openclaw/fs-safe/CHANGELOG.md +102 -0
- package/node_modules/@openclaw/fs-safe/README.md +24 -6
- package/node_modules/@openclaw/fs-safe/dist/advanced.d.ts +6 -1
- package/node_modules/@openclaw/fs-safe/dist/advanced.js +3 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-durability.js +1 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-merge.js +1 -2
- package/node_modules/@openclaw/fs-safe/dist/archive-plan.d.ts +2 -7
- package/node_modules/@openclaw/fs-safe/dist/archive-read.js +9 -18
- package/node_modules/@openclaw/fs-safe/dist/archive-staging.d.ts +1 -2
- package/node_modules/@openclaw/fs-safe/dist/archive-staging.js +3 -3
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-directory.js +4 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-entry.d.ts +11 -11
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-entry.js +3 -35
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-integrity.d.ts +2 -2
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-integrity.js +2 -12
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-loader.d.ts +7 -3
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-loader.js +13 -10
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-manifest.js +3 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-preflight.d.ts +2 -3
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-preflight.js +16 -8
- package/node_modules/@openclaw/fs-safe/dist/archive.d.ts +6 -3
- package/node_modules/@openclaw/fs-safe/dist/archive.js +22 -19
- package/node_modules/@openclaw/fs-safe/dist/atomic.d.ts +1 -1
- package/node_modules/@openclaw/fs-safe/dist/copy-publication.d.ts +1 -3
- package/node_modules/@openclaw/fs-safe/dist/copy-publication.js +2 -6
- package/node_modules/@openclaw/fs-safe/dist/deny-mutation-match.d.ts +2 -0
- package/node_modules/@openclaw/fs-safe/dist/deny-mutation-match.js +71 -0
- package/node_modules/@openclaw/fs-safe/dist/deny-mutations.js +4 -3
- package/node_modules/@openclaw/fs-safe/dist/directory-guard.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/directory-guard.js +0 -3
- package/node_modules/@openclaw/fs-safe/dist/directory-mode-node.d.ts +20 -2
- package/node_modules/@openclaw/fs-safe/dist/directory-mode-node.js +77 -1
- package/node_modules/@openclaw/fs-safe/dist/directory-receipt.js +5 -7
- package/node_modules/@openclaw/fs-safe/dist/effective-uid.js +1 -4
- package/node_modules/@openclaw/fs-safe/dist/errors.d.ts +3 -1
- package/node_modules/@openclaw/fs-safe/dist/errors.js +3 -2
- package/node_modules/@openclaw/fs-safe/dist/file-identity.js +10 -2
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-acquisition.js +1 -1
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-admission.js +5 -1
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-held.d.ts +4 -11
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-held.js +1 -4
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-io.d.ts +3 -6
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-io.js +1 -1
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-options.d.ts +2 -10
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root.d.ts +2 -4
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync.js +2 -2
- package/node_modules/@openclaw/fs-safe/dist/file-store-boundary.d.ts +3 -7
- package/node_modules/@openclaw/fs-safe/dist/file-store-boundary.js +7 -10
- package/node_modules/@openclaw/fs-safe/dist/file-store-prune.js +7 -6
- package/node_modules/@openclaw/fs-safe/dist/file-store.d.ts +4 -7
- package/node_modules/@openclaw/fs-safe/dist/file-store.js +19 -21
- package/node_modules/@openclaw/fs-safe/dist/guest-native-python.js +23 -31
- package/node_modules/@openclaw/fs-safe/dist/guest.js +21 -12
- package/node_modules/@openclaw/fs-safe/dist/json-document-store.d.ts +4 -9
- package/node_modules/@openclaw/fs-safe/dist/json-durable-queue-ownership.d.ts +1 -5
- package/node_modules/@openclaw/fs-safe/dist/json-durable-queue.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/json-durable-queue.js +2 -7
- package/node_modules/@openclaw/fs-safe/dist/local-file-access.js +2 -5
- package/node_modules/@openclaw/fs-safe/dist/local-file-descriptor.d.ts +2 -5
- package/node_modules/@openclaw/fs-safe/dist/local-roots.d.ts +2 -7
- package/node_modules/@openclaw/fs-safe/dist/move-path-cleanup.js +4 -4
- package/node_modules/@openclaw/fs-safe/dist/mutation-authority.js +5 -0
- package/node_modules/@openclaw/fs-safe/dist/native-binding.d.ts +51 -14
- package/node_modules/@openclaw/fs-safe/dist/native-pinned-write.js +8 -2
- package/node_modules/@openclaw/fs-safe/dist/native-staged-symlink.d.ts +13 -0
- package/node_modules/@openclaw/fs-safe/dist/native-staged-symlink.js +303 -0
- package/node_modules/@openclaw/fs-safe/dist/owner-dacl-batch-worker.d.ts +1 -0
- package/node_modules/@openclaw/fs-safe/dist/owner-dacl-batch-worker.js +54 -0
- package/node_modules/@openclaw/fs-safe/dist/owner-dacl-batch.d.ts +5 -0
- package/node_modules/@openclaw/fs-safe/dist/owner-dacl-batch.js +64 -0
- package/node_modules/@openclaw/fs-safe/dist/owner-dacl.d.ts +2 -0
- package/node_modules/@openclaw/fs-safe/dist/owner-dacl.js +3 -0
- package/node_modules/@openclaw/fs-safe/dist/path.js +17 -1
- package/node_modules/@openclaw/fs-safe/dist/permission-exec.d.ts +6 -0
- package/node_modules/@openclaw/fs-safe/dist/permission-exec.js +3 -6
- package/node_modules/@openclaw/fs-safe/dist/permissions-public.d.ts +3 -1
- package/node_modules/@openclaw/fs-safe/dist/permissions-public.js +1 -0
- package/node_modules/@openclaw/fs-safe/dist/permissions-windows.d.ts +3 -6
- package/node_modules/@openclaw/fs-safe/dist/permissions.d.ts +3 -10
- package/node_modules/@openclaw/fs-safe/dist/permissions.js +0 -1
- package/node_modules/@openclaw/fs-safe/dist/pinned-mutation-admission.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/pinned-mutation-admission.js +4 -2
- package/node_modules/@openclaw/fs-safe/dist/pinned-mutation-shared-route.d.ts +2 -8
- package/node_modules/@openclaw/fs-safe/dist/pinned-open.d.ts +1 -1
- package/node_modules/@openclaw/fs-safe/dist/pinned-open.js +2 -3
- package/node_modules/@openclaw/fs-safe/dist/publish-copy-stage.js +4 -0
- package/node_modules/@openclaw/fs-safe/dist/read-opened-file.d.ts +2 -5
- package/node_modules/@openclaw/fs-safe/dist/regular-file.js +3 -3
- package/node_modules/@openclaw/fs-safe/dist/replace-directory.js +5 -17
- package/node_modules/@openclaw/fs-safe/dist/replace-file-buffer.d.ts +4 -0
- package/node_modules/@openclaw/fs-safe/dist/replace-file-buffer.js +36 -0
- package/node_modules/@openclaw/fs-safe/dist/replace-file-copy-fallback.d.ts +4 -10
- package/node_modules/@openclaw/fs-safe/dist/replace-file-copy-fallback.js +66 -38
- package/node_modules/@openclaw/fs-safe/dist/replace-file-descriptor.d.ts +7 -11
- package/node_modules/@openclaw/fs-safe/dist/replace-file-descriptor.js +10 -2
- package/node_modules/@openclaw/fs-safe/dist/replace-file-destination.d.ts +21 -0
- package/node_modules/@openclaw/fs-safe/dist/replace-file-destination.js +123 -0
- package/node_modules/@openclaw/fs-safe/dist/replace-file-mutation.d.ts +26 -0
- package/node_modules/@openclaw/fs-safe/dist/replace-file-mutation.js +47 -0
- package/node_modules/@openclaw/fs-safe/dist/replace-file-temp-owner.d.ts +2 -2
- package/node_modules/@openclaw/fs-safe/dist/replace-file-temp-owner.js +16 -4
- package/node_modules/@openclaw/fs-safe/dist/replace-file-types.d.ts +55 -0
- package/node_modules/@openclaw/fs-safe/dist/replace-file-types.js +1 -0
- package/node_modules/@openclaw/fs-safe/dist/replace-file.d.ts +3 -55
- package/node_modules/@openclaw/fs-safe/dist/replace-file.js +31 -11
- package/node_modules/@openclaw/fs-safe/dist/retained-directory-replacement.d.ts +1 -0
- package/node_modules/@openclaw/fs-safe/dist/retained-directory-replacement.js +1 -1
- package/node_modules/@openclaw/fs-safe/dist/retained-file-types.d.ts +50 -0
- package/node_modules/@openclaw/fs-safe/dist/retained-file-types.js +1 -0
- package/node_modules/@openclaw/fs-safe/dist/retained-file.d.ts +3 -0
- package/node_modules/@openclaw/fs-safe/dist/retained-file.js +121 -0
- package/node_modules/@openclaw/fs-safe/dist/root-context.js +3 -2
- package/node_modules/@openclaw/fs-safe/dist/root-directory-entry.d.ts +9 -0
- package/node_modules/@openclaw/fs-safe/dist/root-directory-entry.js +28 -0
- package/node_modules/@openclaw/fs-safe/dist/root-directory-list.d.ts +9 -1
- package/node_modules/@openclaw/fs-safe/dist/root-directory-list.js +88 -37
- package/node_modules/@openclaw/fs-safe/dist/root-file-final-admission.d.ts +1 -1
- package/node_modules/@openclaw/fs-safe/dist/root-file-final-admission.js +1 -6
- package/node_modules/@openclaw/fs-safe/dist/root-file.js +2 -5
- package/node_modules/@openclaw/fs-safe/dist/root-handle-context.d.ts +4 -0
- package/node_modules/@openclaw/fs-safe/dist/root-handle-context.js +12 -0
- package/node_modules/@openclaw/fs-safe/dist/root-impl.d.ts +3 -3
- package/node_modules/@openclaw/fs-safe/dist/root-impl.js +8 -5
- package/node_modules/@openclaw/fs-safe/dist/root-move-noreplace.d.ts +2 -7
- package/node_modules/@openclaw/fs-safe/dist/root-move-noreplace.js +3 -3
- package/node_modules/@openclaw/fs-safe/dist/root-observed-path.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/root-observed-path.js +0 -3
- package/node_modules/@openclaw/fs-safe/dist/root-path-observation.d.ts +4 -11
- package/node_modules/@openclaw/fs-safe/dist/root-path.js +7 -10
- package/node_modules/@openclaw/fs-safe/dist/root-paths.d.ts +2 -6
- package/node_modules/@openclaw/fs-safe/dist/root-remove-identity.d.ts +1 -3
- package/node_modules/@openclaw/fs-safe/dist/root-walk.d.ts +19 -12
- package/node_modules/@openclaw/fs-safe/dist/root-walk.js +56 -20
- package/node_modules/@openclaw/fs-safe/dist/root-write-admission.js +1 -6
- package/node_modules/@openclaw/fs-safe/dist/root-write-complete-parent.d.ts +2 -0
- package/node_modules/@openclaw/fs-safe/dist/root-write-complete-parent.js +1 -1
- package/node_modules/@openclaw/fs-safe/dist/safe-path-segment.d.ts +1 -0
- package/node_modules/@openclaw/fs-safe/dist/safe-path-segment.js +8 -2
- package/node_modules/@openclaw/fs-safe/dist/secret-file.d.ts +6 -2
- package/node_modules/@openclaw/fs-safe/dist/secret-file.js +12 -16
- package/node_modules/@openclaw/fs-safe/dist/secret-read-policy.js +1 -1
- package/node_modules/@openclaw/fs-safe/dist/secure-file-windows.js +5 -14
- package/node_modules/@openclaw/fs-safe/dist/secure-file.js +3 -2
- package/node_modules/@openclaw/fs-safe/dist/secure-temp-dir.js +2 -7
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-acquire.js +4 -4
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-admission-parser.d.ts +1 -2
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-handle.d.ts +2 -8
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-policy.d.ts +2 -7
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-reclaim.d.ts +2 -2
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-reclaim.js +11 -12
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-stale-admission.d.ts +1 -5
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock.js +9 -7
- package/node_modules/@openclaw/fs-safe/dist/staged-symlink-types.d.ts +39 -0
- package/node_modules/@openclaw/fs-safe/dist/staged-symlink-types.js +1 -0
- package/node_modules/@openclaw/fs-safe/dist/stat-observation.js +3 -10
- package/node_modules/@openclaw/fs-safe/dist/strict-file-identity.d.ts +2 -0
- package/node_modules/@openclaw/fs-safe/dist/strict-file-identity.js +6 -6
- package/node_modules/@openclaw/fs-safe/dist/symlink-parents.js +58 -7
- package/node_modules/@openclaw/fs-safe/dist/temp-target.js +8 -10
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-admission.js +28 -33
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-child-admission.d.ts +1 -1
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-child-admission.js +16 -17
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-descriptor.js +1 -2
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-owner.js +4 -9
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-ownership.d.ts +8 -0
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-ownership.js +52 -0
- package/node_modules/@openclaw/fs-safe/dist/test-hooks.d.ts +5 -1
- package/node_modules/@openclaw/fs-safe/dist/text-atomic.d.ts +2 -1
- package/node_modules/@openclaw/fs-safe/dist/text-atomic.js +2 -0
- package/node_modules/@openclaw/fs-safe/dist/trash.js +27 -1
- package/node_modules/@openclaw/fs-safe/dist/walk.d.ts +2 -5
- package/node_modules/@openclaw/fs-safe/dist/watch-alias.d.ts +6 -0
- package/node_modules/@openclaw/fs-safe/dist/watch-alias.js +88 -0
- package/node_modules/@openclaw/fs-safe/dist/watch-hints.d.ts +9 -0
- package/node_modules/@openclaw/fs-safe/dist/watch-hints.js +93 -0
- package/node_modules/@openclaw/fs-safe/dist/watch-native.d.ts +36 -0
- package/node_modules/@openclaw/fs-safe/dist/watch-native.js +73 -0
- package/node_modules/@openclaw/fs-safe/dist/watch-scan.d.ts +28 -0
- package/node_modules/@openclaw/fs-safe/dist/watch-scan.js +300 -0
- package/node_modules/@openclaw/fs-safe/dist/watch-stream.d.ts +8 -0
- package/node_modules/@openclaw/fs-safe/dist/watch-stream.js +32 -0
- package/node_modules/@openclaw/fs-safe/dist/watch-types.d.ts +60 -0
- package/node_modules/@openclaw/fs-safe/dist/watch-types.js +1 -0
- package/node_modules/@openclaw/fs-safe/dist/watch.d.ts +5 -0
- package/node_modules/@openclaw/fs-safe/dist/watch.js +530 -0
- package/node_modules/@openclaw/fs-safe/dist/windows-owner.d.ts +3 -7
- package/node_modules/@openclaw/fs-safe/dist/windows-owner.js +0 -1
- package/node_modules/@openclaw/fs-safe/dist/windows-security-bridge.cs +6 -6
- package/node_modules/@openclaw/fs-safe/dist/windows-security-bridge.ps1 +78 -3
- package/node_modules/@openclaw/fs-safe/dist/windows-security-command.d.ts +8 -0
- package/node_modules/@openclaw/fs-safe/dist/windows-security-command.js +66 -15
- package/node_modules/@openclaw/fs-safe/dist/windows-security-facts.d.ts +4 -0
- package/node_modules/@openclaw/fs-safe/dist/windows-security-facts.js +6 -2
- package/node_modules/@openclaw/fs-safe/docs/advanced.md +4 -2
- package/node_modules/@openclaw/fs-safe/docs/archive.md +16 -0
- package/node_modules/@openclaw/fs-safe/docs/atomic.md +93 -3
- package/node_modules/@openclaw/fs-safe/docs/contributing.md +102 -4
- package/node_modules/@openclaw/fs-safe/docs/copy.md +2 -0
- package/node_modules/@openclaw/fs-safe/docs/durability.md +7 -0
- package/node_modules/@openclaw/fs-safe/docs/file-store.md +5 -0
- package/node_modules/@openclaw/fs-safe/docs/guest.md +7 -1
- package/node_modules/@openclaw/fs-safe/docs/index.md +1 -0
- package/node_modules/@openclaw/fs-safe/docs/install.md +30 -0
- package/node_modules/@openclaw/fs-safe/docs/native-helper.md +20 -4
- package/node_modules/@openclaw/fs-safe/docs/native.md +63 -1
- package/node_modules/@openclaw/fs-safe/docs/permissions.md +66 -0
- package/node_modules/@openclaw/fs-safe/docs/public-api.md +30 -3
- package/node_modules/@openclaw/fs-safe/docs/retained-file.md +115 -0
- package/node_modules/@openclaw/fs-safe/docs/root.md +35 -9
- package/node_modules/@openclaw/fs-safe/docs/secret-file.md +19 -0
- package/node_modules/@openclaw/fs-safe/docs/security-model.md +4 -1
- package/node_modules/@openclaw/fs-safe/docs/sidecar-lock.md +5 -1
- package/node_modules/@openclaw/fs-safe/docs/staged-symlink.md +124 -0
- package/node_modules/@openclaw/fs-safe/docs/store.md +3 -1
- package/node_modules/@openclaw/fs-safe/docs/temp.md +24 -4
- package/node_modules/@openclaw/fs-safe/docs/testing.md +210 -0
- package/node_modules/@openclaw/fs-safe/docs/types.md +6 -0
- package/node_modules/@openclaw/fs-safe/docs/walk.md +34 -1
- package/node_modules/@openclaw/fs-safe/docs/watch.md +251 -0
- package/node_modules/@openclaw/fs-safe/docs/writing.md +21 -0
- package/node_modules/@openclaw/fs-safe/package.json +13 -9
- package/node_modules/@openclaw/fs-safe-darwin-arm64/fs-safe-native.node +0 -0
- package/node_modules/@openclaw/fs-safe-darwin-arm64/package.json +1 -1
- package/node_modules/@openclaw/fs-safe-darwin-x64/fs-safe-native.node +0 -0
- package/node_modules/@openclaw/fs-safe-darwin-x64/package.json +1 -1
- package/node_modules/@openclaw/fs-safe-linux-arm64-gnu/fs-safe-native.node +0 -0
- package/node_modules/@openclaw/fs-safe-linux-arm64-gnu/package.json +1 -1
- package/node_modules/@openclaw/fs-safe-linux-arm64-musl/fs-safe-native.node +0 -0
- package/node_modules/@openclaw/fs-safe-linux-arm64-musl/package.json +1 -1
- package/node_modules/@openclaw/fs-safe-linux-x64-gnu/fs-safe-native.node +0 -0
- package/node_modules/@openclaw/fs-safe-linux-x64-gnu/package.json +1 -1
- package/node_modules/@openclaw/fs-safe-linux-x64-musl/fs-safe-native.node +0 -0
- package/node_modules/@openclaw/fs-safe-linux-x64-musl/package.json +1 -1
- package/node_modules/@openclaw/fs-safe-win32-x64-msvc/fs-safe-native.node +0 -0
- package/node_modules/@openclaw/fs-safe-win32-x64-msvc/package.json +1 -1
- package/package.json +5 -5
- package/dist/.setup/api-B9-B1L7Q.mjs +0 -17
- package/dist/.setup/client-adapter-dvFa47YL.mjs +0 -63
- package/dist/.setup/rolldown-runtime-8H4AJuhK.mjs +0 -14
- package/dist/.setup/send.runtime-CLnCWvrM.mjs +0 -2
- package/dist/.setup/transport-detection-CoiRl7Gx.mjs +0 -576
- package/dist/.setup/transport-detection.runtime-Tlhuv3T_.mjs +0 -2
- package/dist/.setup/transport-probes.runtime-WprAyBbL.mjs +0 -2
- package/node_modules/@openclaw/fs-safe/dist/directory-mode-owner.d.ts +0 -20
- 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
|
-
"
|
|
288
|
-
"
|
|
289
|
-
"
|
|
290
|
-
"
|
|
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 =
|
|
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
|
-
"
|
|
352
|
-
"
|
|
353
|
-
"
|
|
354
|
-
"
|
|
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
|
|
1
|
+
import { type FsSafeLockConfig } from "./lock-config.js";
|
|
2
2
|
import type { Root } from "./root.js";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
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;
|
|
@@ -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
|
-
|
|
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
|
-
|
|
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 {
|
|
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
|
|
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
|
-
|
|
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(
|
|
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(
|
|
192
|
+
renameNoReplace(...args: NativeTwoPathArgs): void;
|
|
157
193
|
/** Identity-fenced retained-directory rename capability. */
|
|
158
|
-
renameNoReplaceWithIdentity?(
|
|
159
|
-
renameReplace(
|
|
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
|
-
|
|
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>;
|