@openclaw/matrix 2026.11.5-beta.4 → 2026.11.10-beta.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.
- package/dist/.setup/{account-config-CRsKoMqJ.mjs → account-config-CVM2a28p.mjs} +1 -2
- package/dist/.setup/{account-selection-UUPhMBmu.mjs → account-selection-Cow3TMFO.mjs} +5 -8
- package/dist/.setup/{approval-handler.runtime-Ca12_7Qa.mjs → approval-handler.runtime-D7KO6ds_.mjs} +8 -9
- package/dist/.setup/{approval-reactions-BazmsDbe.mjs → approval-reactions-Bz_8XB01.mjs} +2 -3
- package/dist/.setup/{backup-health-Dm_YMVFT.mjs → backup-health-BxH69np2.mjs} +1 -2
- package/dist/.setup/{channel-FfaEmyIU.mjs → channel-BJGiol_v.mjs} +30 -40
- package/dist/.setup/{channel.runtime-CkkHG8zy.mjs → channel.runtime-BrSYy4Qm.mjs} +10 -12
- package/dist/.setup/{channel.setup-B00zzOOL.mjs → channel.setup-DJdvsvAL.mjs} +9 -7
- package/dist/.setup/{cli-dz9hd2dR.mjs → cli-CjjggD1Y.mjs} +25 -34
- package/dist/.setup/{cli-metadata-CwUhA9CY.mjs → cli-metadata-nnz3uf_k.mjs} +3 -5
- package/dist/.setup/{client-D1bsidwU.mjs → client-DIeTvz6C.mjs} +21 -26
- package/dist/.setup/{client-bootstrap-CTT0VF6v.mjs → client-bootstrap-CvbnV_7R.mjs} +2 -3
- package/dist/.setup/{client-support-B_Mp4Qk9.mjs → client-support-CqXAOZp3.mjs} +2 -3
- package/dist/.setup/{client-CFPYqaYK.mjs → client-uAX074II.mjs} +4 -5
- package/dist/.setup/{config-paths-CnREYb1Y.mjs → config-paths-DBpHxDyc.mjs} +1 -2
- package/dist/.setup/{create-client-Ccf5wyS3.mjs → create-client-XL9SKJ2s.mjs} +8 -9
- package/dist/.setup/{credentials-kT20jk_u.mjs → credentials-CGgWuhFV.mjs} +5 -6
- package/dist/.setup/{credentials-read-CM6wXUjL.mjs → credentials-read-rPqEpuxv.mjs} +5 -6
- package/dist/.setup/{credentials-state-B3cuUFwZ.mjs → credentials-state-jxq29yQw.mjs} +1 -2
- package/dist/.setup/{crypto-node.runtime-6Aj_ltHQ.mjs → crypto-node.runtime-E_hqXGxm.mjs} +1 -2
- package/dist/.setup/{crypto-runtime-DZNytKX5.mjs → crypto-runtime-D96thr_g.mjs} +10 -15
- package/dist/.setup/{crypto-state-store-BZLlwkv_.mjs → crypto-state-store-CzAmeC_Z.mjs} +4 -4
- package/dist/.setup/{crypto-store-ownership-CiQ1l_O7.mjs → crypto-store-ownership-DPO9WcVz.mjs} +3 -4
- package/dist/.setup/{crypto-unsafe-state-doctor-Dh1dtuSz.mjs → crypto-unsafe-state-doctor-CkhtP1mQ.mjs} +7 -8
- package/dist/.setup/{deps-D-W_QQjz.mjs → deps-CVPT2Ros.mjs} +1 -2
- package/dist/.setup/{device-health-Ck2YpEVN.mjs → device-health-D7n-lPeb.mjs} +2 -3
- package/dist/.setup/{direct-management-Dp1giZ34.mjs → direct-management-D59C1WO-.mjs} +7 -11
- package/dist/.setup/{directory-live-ufzRheWx.mjs → directory-live-5RgaKKuc.mjs} +5 -6
- package/dist/.setup/{doctor-contract-BANpMUbP.mjs → doctor-contract-GiXgCj7k.mjs} +2 -3
- package/dist/.setup/{draft-stream-BPjjKSoI.mjs → draft-stream-CjEpElZ-.mjs} +3 -4
- package/dist/.setup/{encryption-guidance-Br3Lv9Hm.mjs → encryption-guidance-DfbEaKct.mjs} +3 -4
- package/dist/.setup/{env-vars-aEBngJPa.mjs → env-vars-Bh1iOXJ1.mjs} +1 -2
- package/dist/.setup/{errors-Bw4EHwKX.mjs → errors-CL3YJV8U.mjs} +1 -2
- package/dist/.setup/{event-helpers-CxNgMQqH.mjs → event-helpers-DDUjVVf7.mjs} +1 -2
- package/dist/.setup/{exec-approvals-BwEOyI1-.mjs → exec-approvals-DcQS_LNp.mjs} +6 -9
- package/dist/.setup/{file-sync-store-BpS12yaK.mjs → file-sync-store-CAhnwOPA.mjs} +6 -36
- package/dist/.setup/{http-client-B_ohXrBm.mjs → http-client-CqnKFKUH.mjs} +5 -8
- package/dist/.setup/{idb-persistence-BTOsltD9.mjs → idb-persistence-DeGUs--C.mjs} +6 -7
- package/dist/.setup/{idb-persistence-lock-Bh3ZLIsE.mjs → idb-persistence-lock-CH2K6d_3.mjs} +1 -2
- package/dist/.setup/{joined-room-encryption-C0gHa2DG.mjs → joined-room-encryption-9sJK1kM-.mjs} +2 -3
- package/dist/.setup/{logger-CuAzdD8Q.mjs → logger-B9TwnY6C.mjs} +2 -3
- package/dist/.setup/{logging-CoaEyRtA.mjs → logging-Bnsn7s4r.mjs} +3 -4
- package/dist/.setup/{messages-DpJ9naJa.mjs → messages-CmlRhlPp.mjs} +9 -14
- package/dist/.setup/{monitor-vpzawYrB.mjs → monitor-DG8yTCh9.mjs} +98 -137
- package/dist/.setup/{onboarding-BK-V2ZLT.mjs → onboarding-CY_oesMI.mjs} +10 -11
- package/dist/.setup/{outbound-DydCDuvM.mjs → outbound-BY9kS8Kt.mjs} +5 -6
- package/dist/.setup/{profile-update-RLsY-gu6.mjs → profile-update-BRugBHSm.mjs} +13 -10
- package/dist/.setup/{reaction-events-lcgVF3M5.mjs → reaction-events-B1DQTt9d.mjs} +8 -9
- package/dist/.setup/{resolve-targets-DYW8ULZS.mjs → resolve-targets-CUBvJ37V.mjs} +4 -5
- package/dist/.setup/{retired-state-JGUEBE72.mjs → retired-state-BsxdpJNk.mjs} +3 -41
- package/dist/.setup/{room-info-Dhc4efkA.mjs → room-info-CJVhaCvB.mjs} +6 -8
- package/dist/.setup/{runtime-1kn1P6io.mjs → runtime-Ck8TjD7L.mjs} +1 -2
- package/dist/.setup/{runtime-doctor-migrations-hxP-CXX7.mjs → runtime-doctor-migrations-CSvRANPN.mjs} +5 -10
- package/dist/.setup/{runtime-setter-api-i2MOXoT3.mjs → runtime-setter-api-CpwhcBQK.mjs} +1 -1
- package/dist/.setup/{sdk-DPXiQ3jr.mjs → sdk-CRJQM2N0.mjs} +33 -47
- package/dist/.setup/{secret-contract-DxyzKSzf.mjs → secret-contract-AKnr45nw.mjs} +2 -3
- package/dist/.setup/{secret-contract-api-Dukgvike.mjs → secret-contract-api-DMSwMIxd.mjs} +1 -1
- package/dist/.setup/{send-HHAbKARg.mjs → send-QWCT3NT9.mjs} +58 -44
- package/dist/.setup/{send-currentness-DGxiiBn9.mjs → send-currentness-D1x6YP9O.mjs} +2 -4
- package/dist/.setup/{setup-bootstrap-DaT2j28V.mjs → setup-bootstrap-DrBapwjQ.mjs} +4 -5
- package/dist/.setup/{setup-core-DcqQbLZv.mjs → setup-core-B4sVj_9e.mjs} +13 -20
- package/dist/.setup/setup-plugin-api-t9yhI-Tq.mjs +2 -0
- package/dist/.setup/sqlite-state-D6Zpz1q1.mjs +36 -0
- package/dist/.setup/{startup-verification-UkaoSldm.mjs → startup-verification-DfOuAruK.mjs} +5 -5
- package/dist/.setup/{state-layout-walk-BQMgMykU.mjs → state-layout-walk-BqCZTHpp.mjs} +2 -3
- package/dist/.setup/{storage-C3N6YZIn.mjs → storage-CCarF_gm.mjs} +9 -10
- package/dist/.setup/{storage-paths-B51JM-pC.mjs → storage-paths-e_Vq6cvw.mjs} +1 -2
- package/dist/.setup/{subagent-hooks-CfGAysJi.mjs → subagent-hooks-BdbuojSv.mjs} +2 -3
- package/dist/.setup/{sync-cache-state-BKVaKRzQ.mjs → sync-cache-state-BMvqW4Ii.mjs} +5 -5
- package/dist/.setup/{sync-state-CWbp0QSY.mjs → sync-state-Cu1nagBV.mjs} +1 -2
- package/dist/.setup/{target-ids-HhcaKX1n.mjs → target-ids-DltG_ZHJ.mjs} +1 -2
- package/dist/.setup/{task-runner-DY3aKiQa.mjs → task-runner-CYyGHdNW.mjs} +1 -2
- package/dist/.setup/{thread-binding-api-BvuaKpd0.mjs → thread-binding-api-OtSciHmZ.mjs} +2 -3
- package/dist/.setup/{thread-bindings-891JsKXF.mjs → thread-bindings-jNXWItIL.mjs} +54 -23
- package/dist/.setup/{thread-bindings-shared-QmZOfX9Q.mjs → thread-bindings-shared-DEAGGuDA.mjs} +6 -3
- package/dist/.setup/{tool-actions-8mXdq9OV.mjs → tool-actions-4sdtsvN2.mjs} +25 -25
- package/dist/.setup/{url-validation-By_2hsXr.mjs → url-validation-DesoKUns.mjs} +1 -2
- package/dist/.setup/{verification-CcZIVL8P.mjs → verification-DQu-OS0V.mjs} +4 -5
- package/dist/.source-module-urls/1cd4d4ff8d44e1c8b830932b44d7cf8a7f3350e09e169910e1d7a85e131b7bea.json +1 -1
- package/dist/api.js +8 -8
- package/dist/auth-presence.js +2 -3
- package/dist/channel-plugin-api.js +1 -1
- package/dist/cli-metadata.js +1 -1
- package/dist/contract-api.js +2 -2
- package/dist/doctor-contract-api.js +14 -16
- package/dist/helper-api.js +3 -3
- package/dist/index.js +3 -4
- package/dist/plugin-entry.handlers.runtime.js +3 -4
- package/dist/runtime-api.js +7 -8
- package/dist/runtime-setter-api.js +1 -1
- package/dist/secret-contract-api.js +1 -1
- package/dist/session-binding-contract-api.js +2 -2
- package/dist/setup-entry.js +4 -5
- package/dist/setup-plugin-api.js +1 -1
- package/dist/subagent-hooks-api.js +2 -3
- package/dist/thread-binding-api.js +1 -1
- package/dist/thread-bindings-runtime.js +1 -1
- package/node_modules/@openclaw/fs-safe/CHANGELOG.md +45 -1
- package/node_modules/@openclaw/fs-safe/README.md +4 -0
- package/node_modules/@openclaw/fs-safe/dist/absolute-path.js +2 -2
- package/node_modules/@openclaw/fs-safe/dist/advanced.d.ts +2 -2
- package/node_modules/@openclaw/fs-safe/dist/advanced.js +2 -2
- package/node_modules/@openclaw/fs-safe/dist/archive-parser.wasm +0 -0
- package/node_modules/@openclaw/fs-safe/dist/atomic-io.d.ts +1 -0
- package/node_modules/@openclaw/fs-safe/dist/atomic-io.js +6 -0
- package/node_modules/@openclaw/fs-safe/dist/atomic.d.ts +1 -0
- package/node_modules/@openclaw/fs-safe/dist/directory-mode-node.d.ts +5 -0
- package/node_modules/@openclaw/fs-safe/dist/directory-mode-node.js +13 -0
- package/node_modules/@openclaw/fs-safe/dist/directory-mode-options.d.ts +3 -0
- package/node_modules/@openclaw/fs-safe/dist/directory-mode-options.js +6 -0
- package/node_modules/@openclaw/fs-safe/dist/errors.d.ts +1 -1
- package/node_modules/@openclaw/fs-safe/dist/errors.js +1 -0
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-admission.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-admission.js +1 -11
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-acquire.js +3 -3
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-stale-admission.js +2 -3
- package/node_modules/@openclaw/fs-safe/dist/file-store-boundary.d.ts +3 -3
- package/node_modules/@openclaw/fs-safe/dist/file-store-boundary.js +30 -4
- package/node_modules/@openclaw/fs-safe/dist/file-store-prune.d.ts +1 -1
- package/node_modules/@openclaw/fs-safe/dist/file-store-prune.js +7 -1
- package/node_modules/@openclaw/fs-safe/dist/file-store-sync-directory.d.ts +1 -1
- package/node_modules/@openclaw/fs-safe/dist/file-store-sync-directory.js +30 -4
- package/node_modules/@openclaw/fs-safe/dist/file-store-sync-write.d.ts +1 -1
- package/node_modules/@openclaw/fs-safe/dist/file-store-sync-write.js +2 -0
- package/node_modules/@openclaw/fs-safe/dist/file-store.d.ts +2 -1
- package/node_modules/@openclaw/fs-safe/dist/file-store.js +5 -0
- package/node_modules/@openclaw/fs-safe/dist/guarded-mkdir.d.ts +2 -0
- package/node_modules/@openclaw/fs-safe/dist/guarded-mkdir.js +9 -0
- package/node_modules/@openclaw/fs-safe/dist/json-store.d.ts +2 -1
- package/node_modules/@openclaw/fs-safe/dist/native-binding.d.ts +4 -1
- package/node_modules/@openclaw/fs-safe/dist/native-pinned-write.js +1 -1
- package/node_modules/@openclaw/fs-safe/dist/native-staged-file.d.ts +1 -1
- package/node_modules/@openclaw/fs-safe/dist/native-staged-file.js +19 -13
- package/node_modules/@openclaw/fs-safe/dist/overwrite-file-handle.d.ts +2 -0
- package/node_modules/@openclaw/fs-safe/dist/overwrite-file-handle.js +27 -5
- package/node_modules/@openclaw/fs-safe/dist/path-prefix.d.ts +1 -0
- package/node_modules/@openclaw/fs-safe/dist/path-prefix.js +84 -7
- package/node_modules/@openclaw/fs-safe/dist/pinned-write-input.js +0 -11
- package/node_modules/@openclaw/fs-safe/dist/prepare-directory-mode.d.ts +9 -0
- package/node_modules/@openclaw/fs-safe/dist/prepare-directory-mode.js +61 -0
- package/node_modules/@openclaw/fs-safe/dist/private-temp-workspace.js +2 -1
- package/node_modules/@openclaw/fs-safe/dist/realpath.d.ts +2 -0
- package/node_modules/@openclaw/fs-safe/dist/realpath.js +16 -0
- package/node_modules/@openclaw/fs-safe/dist/replace-file-descriptor.d.ts +2 -1
- package/node_modules/@openclaw/fs-safe/dist/replace-file-descriptor.js +8 -6
- package/node_modules/@openclaw/fs-safe/dist/replace-file-types.d.ts +2 -1
- package/node_modules/@openclaw/fs-safe/dist/replace-file.js +20 -13
- package/node_modules/@openclaw/fs-safe/dist/root-context.js +4 -1
- package/node_modules/@openclaw/fs-safe/dist/root-create-native.d.ts +1 -1
- package/node_modules/@openclaw/fs-safe/dist/root-create-native.js +18 -9
- package/node_modules/@openclaw/fs-safe/dist/root-errors.d.ts +2 -0
- package/node_modules/@openclaw/fs-safe/dist/root-errors.js +9 -0
- package/node_modules/@openclaw/fs-safe/dist/root-impl.js +4 -1
- package/node_modules/@openclaw/fs-safe/dist/root-mkdir-native.d.ts +1 -1
- package/node_modules/@openclaw/fs-safe/dist/root-mkdir-native.js +35 -16
- package/node_modules/@openclaw/fs-safe/dist/root-path-existing.d.ts +6 -2
- package/node_modules/@openclaw/fs-safe/dist/root-path-existing.js +32 -20
- package/node_modules/@openclaw/fs-safe/dist/root-path.js +32 -26
- package/node_modules/@openclaw/fs-safe/dist/root-write-admission.js +4 -1
- package/node_modules/@openclaw/fs-safe/dist/secret-file.d.ts +2 -1
- package/node_modules/@openclaw/fs-safe/dist/secret-file.js +2 -0
- package/node_modules/@openclaw/fs-safe/dist/sibling-temp.d.ts +2 -1
- package/node_modules/@openclaw/fs-safe/dist/sibling-temp.js +5 -4
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-policy.d.ts +3 -2
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-policy.js +8 -9
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-stale-admission.js +3 -1
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-types.d.ts +2 -1
- package/node_modules/@openclaw/fs-safe/dist/text-atomic.d.ts +2 -1
- package/node_modules/@openclaw/fs-safe/dist/types.d.ts +1 -0
- package/node_modules/@openclaw/fs-safe/dist/watch-hints.js +12 -3
- package/node_modules/@openclaw/fs-safe/dist/windows-security-helper.exe +0 -0
- package/node_modules/@openclaw/fs-safe/dist/write-file-handle.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/write-file-handle.js +10 -12
- package/node_modules/@openclaw/fs-safe/docs/advanced.md +3 -3
- package/node_modules/@openclaw/fs-safe/docs/atomic.md +16 -3
- package/node_modules/@openclaw/fs-safe/docs/compiler-qualification.md +1 -1
- package/node_modules/@openclaw/fs-safe/docs/contributing.md +27 -18
- package/node_modules/@openclaw/fs-safe/docs/errors.md +3 -1
- package/node_modules/@openclaw/fs-safe/docs/file-store.md +14 -2
- package/node_modules/@openclaw/fs-safe/docs/in-place-write.md +31 -0
- package/node_modules/@openclaw/fs-safe/docs/install.md +1 -1
- package/node_modules/@openclaw/fs-safe/docs/json-store.md +6 -1
- package/node_modules/@openclaw/fs-safe/docs/json.md +5 -1
- package/node_modules/@openclaw/fs-safe/docs/path-prefix.md +14 -4
- package/node_modules/@openclaw/fs-safe/docs/public-api.md +4 -2
- package/node_modules/@openclaw/fs-safe/docs/secret-file.md +5 -1
- package/node_modules/@openclaw/fs-safe/docs/sidecar-lock.md +4 -0
- package/node_modules/@openclaw/fs-safe/docs/temp.md +9 -1
- package/node_modules/@openclaw/fs-safe/docs/types.md +5 -1
- package/node_modules/@openclaw/fs-safe/package.json +12 -12
- 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-freebsd-arm64/fs-safe-native.node +0 -0
- package/node_modules/@openclaw/fs-safe-freebsd-arm64/package.json +1 -1
- package/node_modules/@openclaw/fs-safe-freebsd-x64/fs-safe-native.node +0 -0
- package/node_modules/@openclaw/fs-safe-freebsd-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-arm64-msvc/fs-safe-native.node +0 -0
- package/node_modules/@openclaw/fs-safe-win32-arm64-msvc/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/node_modules/@tokenizer/inflate/README.md +57 -17
- package/node_modules/@tokenizer/inflate/lib/ZipHandler.d.ts +12 -1
- package/node_modules/@tokenizer/inflate/lib/ZipHandler.js +127 -57
- package/node_modules/@tokenizer/inflate/lib/ZipLimitError.d.ts +18 -4
- package/node_modules/@tokenizer/inflate/lib/ZipLimitError.js +1 -1
- package/node_modules/@tokenizer/inflate/lib/index.d.ts +1 -1
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/LICENSE.txt +21 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/README.md +736 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/AbortSignal.d.ts +2 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/AbortSignal.js +7 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/AbstractTokenizer.d.ts +117 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/AbstractTokenizer.js +204 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/BlobTokenizer.d.ts +29 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/BlobTokenizer.js +57 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/BufferSizeError.d.ts +19 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/BufferSizeError.js +27 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/BufferTokenizer.d.ts +29 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/BufferTokenizer.js +51 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/FileTokenizer.d.ts +47 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/FileTokenizer.js +83 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/NotRegularFileError.d.ts +5 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/NotRegularFileError.js +8 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/ReadStreamTokenizer.d.ts +34 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/ReadStreamTokenizer.js +140 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/TokenizerBoundaryError.d.ts +7 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/TokenizerBoundaryError.js +10 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/TokenizerView.d.ts +9 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/TokenizerView.js +184 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/core.d.ts +44 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/core.js +56 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/index.d.ts +17 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/index.js +46 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/isRandomAccessTokenizer.d.ts +6 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/isRandomAccessTokenizer.js +10 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/stream/AbstractStreamReader.d.ts +54 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/stream/AbstractStreamReader.js +73 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/stream/Deferred.d.ts +6 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/stream/Deferred.js +10 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/stream/Errors.d.ts +10 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/stream/Errors.js +16 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/stream/StreamReader.d.ts +34 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/stream/StreamReader.js +125 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/stream/WebStreamByobReader.d.ts +14 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/stream/WebStreamByobReader.js +29 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/stream/WebStreamDefaultReader.d.ts +19 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/stream/WebStreamDefaultReader.js +67 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/stream/WebStreamReader.d.ts +24 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/stream/WebStreamReader.js +13 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/stream/WebStreamReaderFactory.d.ts +5 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/stream/WebStreamReaderFactory.js +19 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/stream/index.d.ts +6 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/stream/index.js +5 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/types.d.ts +163 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/types.js +1 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/package.json +97 -0
- package/node_modules/@tokenizer/inflate/package.json +5 -5
- package/node_modules/fake-indexeddb/README.md +7 -7
- package/node_modules/fake-indexeddb/build/cjs/lib/Index.js +47 -22
- package/node_modules/fake-indexeddb/build/cjs/lib/ObjectStore.js +4 -2
- package/node_modules/fake-indexeddb/build/cjs/lib/RecordStore.js +14 -9
- package/node_modules/fake-indexeddb/build/esm/lib/Index.js +47 -22
- package/node_modules/fake-indexeddb/build/esm/lib/ObjectStore.js +4 -2
- package/node_modules/fake-indexeddb/build/esm/lib/RecordStore.js +14 -9
- package/node_modules/fake-indexeddb/package.json +1 -1
- package/node_modules/file-type/node_modules/strtok3/README.md +154 -9
- package/node_modules/file-type/node_modules/strtok3/lib/AbstractTokenizer.d.ts +3 -0
- package/node_modules/file-type/node_modules/strtok3/lib/AbstractTokenizer.js +12 -4
- package/node_modules/file-type/node_modules/strtok3/lib/BlobTokenizer.js +1 -0
- package/node_modules/file-type/node_modules/strtok3/lib/BufferTokenizer.js +2 -1
- package/node_modules/file-type/node_modules/strtok3/lib/FileTokenizer.d.ts +1 -1
- package/node_modules/file-type/node_modules/strtok3/lib/FileTokenizer.js +3 -3
- package/node_modules/file-type/node_modules/strtok3/lib/ReadStreamTokenizer.js +17 -2
- package/node_modules/file-type/node_modules/strtok3/lib/TokenizerBoundaryError.d.ts +7 -0
- package/node_modules/file-type/node_modules/strtok3/lib/TokenizerBoundaryError.js +10 -0
- package/node_modules/file-type/node_modules/strtok3/lib/TokenizerView.d.ts +9 -0
- package/node_modules/file-type/node_modules/strtok3/lib/TokenizerView.js +184 -0
- package/node_modules/file-type/node_modules/strtok3/lib/core.d.ts +4 -1
- package/node_modules/file-type/node_modules/strtok3/lib/core.js +5 -18
- package/node_modules/file-type/node_modules/strtok3/lib/index.js +28 -5
- package/node_modules/file-type/node_modules/strtok3/lib/isRandomAccessTokenizer.d.ts +6 -0
- package/node_modules/file-type/node_modules/strtok3/lib/isRandomAccessTokenizer.js +10 -0
- package/node_modules/file-type/node_modules/strtok3/lib/stream/StreamReader.d.ts +4 -0
- package/node_modules/file-type/node_modules/strtok3/lib/stream/StreamReader.js +29 -8
- package/node_modules/file-type/node_modules/strtok3/lib/stream/WebStreamReader.d.ts +12 -2
- package/node_modules/file-type/node_modules/strtok3/lib/types.d.ts +19 -2
- package/node_modules/file-type/node_modules/strtok3/package.json +10 -8
- package/node_modules/file-type/package.json +3 -3
- package/node_modules/file-type/source/detectors/ebml.js +31 -16
- package/node_modules/file-type/source/detectors/zip.js +21 -203
- package/node_modules/matrix-js-sdk/CHANGELOG.md +28 -0
- package/node_modules/matrix-js-sdk/lib/matrixrtc/CallMembership.d.ts +30 -25
- package/node_modules/matrix-js-sdk/lib/matrixrtc/CallMembership.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/CallMembership.js +91 -100
- package/node_modules/matrix-js-sdk/lib/matrixrtc/CallMembership.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/EncryptionManager.d.ts +6 -4
- package/node_modules/matrix-js-sdk/lib/matrixrtc/EncryptionManager.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/EncryptionManager.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/IMembershipManager.d.ts +2 -15
- package/node_modules/matrix-js-sdk/lib/matrixrtc/IMembershipManager.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/IMembershipManager.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/LivekitTransport.d.ts +36 -7
- package/node_modules/matrix-js-sdk/lib/matrixrtc/LivekitTransport.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/LivekitTransport.js +29 -2
- package/node_modules/matrix-js-sdk/lib/matrixrtc/LivekitTransport.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/MatrixRTCSession.d.ts +12 -51
- package/node_modules/matrix-js-sdk/lib/matrixrtc/MatrixRTCSession.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/MatrixRTCSession.js +10 -66
- package/node_modules/matrix-js-sdk/lib/matrixrtc/MatrixRTCSession.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/MembershipManager.d.ts +5 -10
- package/node_modules/matrix-js-sdk/lib/matrixrtc/MembershipManager.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/MembershipManager.js +25 -44
- package/node_modules/matrix-js-sdk/lib/matrixrtc/MembershipManager.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/RTCEncryptionManager.d.ts +8 -8
- package/node_modules/matrix-js-sdk/lib/matrixrtc/RTCEncryptionManager.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/RTCEncryptionManager.js +30 -22
- package/node_modules/matrix-js-sdk/lib/matrixrtc/RTCEncryptionManager.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/ToDeviceKeyTransport.js +7 -8
- package/node_modules/matrix-js-sdk/lib/matrixrtc/ToDeviceKeyTransport.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/membershipData/rtc.d.ts +8 -13
- package/node_modules/matrix-js-sdk/lib/matrixrtc/membershipData/rtc.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/membershipData/rtc.js +2 -11
- package/node_modules/matrix-js-sdk/lib/matrixrtc/membershipData/rtc.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/membershipData/session.d.ts +6 -2
- package/node_modules/matrix-js-sdk/lib/matrixrtc/membershipData/session.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/membershipData/session.js +3 -0
- package/node_modules/matrix-js-sdk/lib/matrixrtc/membershipData/session.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/types.d.ts +5 -0
- package/node_modules/matrix-js-sdk/lib/matrixrtc/types.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/types.js +5 -0
- package/node_modules/matrix-js-sdk/lib/matrixrtc/types.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/models/event-timeline-set.d.ts +9 -2
- package/node_modules/matrix-js-sdk/lib/models/event-timeline-set.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/models/event-timeline-set.js +8 -5
- package/node_modules/matrix-js-sdk/lib/models/event-timeline-set.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/models/room-sticky-events.d.ts +17 -2
- package/node_modules/matrix-js-sdk/lib/models/room-sticky-events.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/models/room-sticky-events.js +88 -47
- package/node_modules/matrix-js-sdk/lib/models/room-sticky-events.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/models/room.d.ts +1 -1
- package/node_modules/matrix-js-sdk/lib/models/room.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/models/room.js +8 -2
- package/node_modules/matrix-js-sdk/lib/models/room.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/models/thread.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/models/thread.js +23 -2
- package/node_modules/matrix-js-sdk/lib/models/thread.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/rendezvous/MSC4108SignInWithQR.d.ts +3 -3
- package/node_modules/matrix-js-sdk/lib/rendezvous/MSC4108SignInWithQR.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/rendezvous/MSC4108SignInWithQR.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/rendezvous/SignInWithQRFlow.d.ts +95 -0
- package/node_modules/matrix-js-sdk/lib/rendezvous/SignInWithQRFlow.d.ts.map +1 -0
- package/node_modules/matrix-js-sdk/lib/rendezvous/SignInWithQRFlow.js +3 -0
- package/node_modules/matrix-js-sdk/lib/rendezvous/SignInWithQRFlow.js.map +1 -0
- package/node_modules/matrix-js-sdk/lib/rendezvous/index.d.ts +1 -0
- package/node_modules/matrix-js-sdk/lib/rendezvous/index.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/rendezvous/index.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/rust-crypto/index.js +5 -1
- package/node_modules/matrix-js-sdk/lib/rust-crypto/index.js.map +1 -1
- package/node_modules/matrix-js-sdk/package.json +3 -3
- package/node_modules/matrix-js-sdk/src/matrixrtc/CallMembership.ts +85 -95
- package/node_modules/matrix-js-sdk/src/matrixrtc/EncryptionManager.ts +6 -4
- package/node_modules/matrix-js-sdk/src/matrixrtc/IMembershipManager.ts +2 -15
- package/node_modules/matrix-js-sdk/src/matrixrtc/LivekitTransport.ts +58 -9
- package/node_modules/matrix-js-sdk/src/matrixrtc/MatrixRTCSession.ts +21 -80
- package/node_modules/matrix-js-sdk/src/matrixrtc/MembershipManager.ts +23 -40
- package/node_modules/matrix-js-sdk/src/matrixrtc/RTCEncryptionManager.ts +51 -39
- package/node_modules/matrix-js-sdk/src/matrixrtc/ToDeviceKeyTransport.ts +7 -7
- package/node_modules/matrix-js-sdk/src/matrixrtc/membershipData/rtc.ts +9 -23
- package/node_modules/matrix-js-sdk/src/matrixrtc/membershipData/session.ts +14 -2
- package/node_modules/matrix-js-sdk/src/matrixrtc/types.ts +6 -0
- package/node_modules/matrix-js-sdk/src/models/event-timeline-set.ts +19 -4
- package/node_modules/matrix-js-sdk/src/models/room-sticky-events.ts +92 -58
- package/node_modules/matrix-js-sdk/src/models/room.ts +8 -2
- package/node_modules/matrix-js-sdk/src/models/thread.ts +25 -3
- package/node_modules/matrix-js-sdk/src/rendezvous/MSC4108SignInWithQR.ts +3 -3
- package/node_modules/matrix-js-sdk/src/rendezvous/SignInWithQRFlow.ts +117 -0
- package/node_modules/matrix-js-sdk/src/rendezvous/index.ts +1 -0
- package/node_modules/matrix-js-sdk/src/rust-crypto/index.ts +5 -1
- package/node_modules/music-metadata/README.md +62 -67
- package/node_modules/music-metadata/lib/ParserFactory.js +3 -1
- package/node_modules/music-metadata/lib/aiff/AiffParser.d.ts +2 -0
- package/node_modules/music-metadata/lib/aiff/AiffParser.js +42 -3
- package/node_modules/music-metadata/lib/aiff/AiffToken.d.ts +1 -0
- package/node_modules/music-metadata/lib/aiff/AiffToken.js +1 -0
- package/node_modules/music-metadata/lib/apev2/APEv2Parser.js +11 -1
- package/node_modules/music-metadata/lib/asf/AsfObject.d.ts +2 -2
- package/node_modules/music-metadata/lib/asf/AsfObject.js +81 -111
- package/node_modules/music-metadata/lib/asf/AsfParser.js +5 -3
- package/node_modules/music-metadata/lib/asf/AsfTagMapper.js +27 -3
- package/node_modules/music-metadata/lib/asf/AsfUtil.d.ts +1 -1
- package/node_modules/music-metadata/lib/caf/CafParser.js +13 -2
- package/node_modules/music-metadata/lib/caf/CafToken.d.ts +2 -2
- package/node_modules/music-metadata/lib/caf/CafToken.js +9 -2
- package/node_modules/music-metadata/lib/common/Allocation.d.ts +6 -0
- package/node_modules/music-metadata/lib/common/Allocation.js +18 -0
- package/node_modules/music-metadata/lib/common/GenericTagMapper.js +1 -1
- package/node_modules/music-metadata/lib/common/MetadataCollector.d.ts +2 -0
- package/node_modules/music-metadata/lib/common/MetadataCollector.js +21 -4
- package/node_modules/music-metadata/lib/common/Util.d.ts +4 -0
- package/node_modules/music-metadata/lib/common/Util.js +34 -1
- package/node_modules/music-metadata/lib/dsdiff/DsdiffParser.d.ts +4 -1
- package/node_modules/music-metadata/lib/dsdiff/DsdiffParser.js +32 -36
- package/node_modules/music-metadata/lib/ebml/EbmlIterator.js +6 -2
- package/node_modules/music-metadata/lib/flac/FlacParser.js +2 -1
- package/node_modules/music-metadata/lib/id3v2/FrameParser.d.ts +7 -3
- package/node_modules/music-metadata/lib/id3v2/FrameParser.js +91 -46
- package/node_modules/music-metadata/lib/id3v2/ID3v22TagMapper.js +6 -0
- package/node_modules/music-metadata/lib/id3v2/ID3v24TagMapper.d.ts +5 -0
- package/node_modules/music-metadata/lib/id3v2/ID3v24TagMapper.js +6 -4
- package/node_modules/music-metadata/lib/id3v2/ID3v2Parser.d.ts +2 -1
- package/node_modules/music-metadata/lib/id3v2/ID3v2Parser.js +57 -15
- package/node_modules/music-metadata/lib/lrc/LyricsParser.d.ts +18 -2
- package/node_modules/music-metadata/lib/lrc/LyricsParser.js +14 -3
- package/node_modules/music-metadata/lib/mp4/Atom.d.ts +3 -3
- package/node_modules/music-metadata/lib/mp4/Atom.js +14 -7
- package/node_modules/music-metadata/lib/mp4/AtomToken.d.ts +25 -25
- package/node_modules/music-metadata/lib/mp4/AtomToken.js +136 -119
- package/node_modules/music-metadata/lib/mp4/MP4Parser.d.ts +16 -2
- package/node_modules/music-metadata/lib/mp4/MP4Parser.js +370 -132
- package/node_modules/music-metadata/lib/mp4/MP4TagMapper.js +30 -0
- package/node_modules/music-metadata/lib/musepack/sv8/StreamVersion8.js +19 -8
- package/node_modules/music-metadata/lib/ogg/OggParser.js +6 -2
- package/node_modules/music-metadata/lib/ogg/OggToken.d.ts +2 -2
- package/node_modules/music-metadata/lib/ogg/OggToken.js +3 -9
- package/node_modules/music-metadata/lib/ogg/flac/FlacStream.d.ts +9 -11
- package/node_modules/music-metadata/lib/ogg/flac/FlacStream.js +111 -27
- package/node_modules/music-metadata/lib/ogg/speex/SpeexStream.js +6 -0
- package/node_modules/music-metadata/lib/ogg/theora/TheoraStream.js +6 -0
- package/node_modules/music-metadata/lib/ogg/vorbis/VorbisDecoder.d.ts +2 -2
- package/node_modules/music-metadata/lib/ogg/vorbis/VorbisDecoder.js +8 -4
- package/node_modules/music-metadata/lib/ogg/vorbis/VorbisStream.d.ts +1 -0
- package/node_modules/music-metadata/lib/ogg/vorbis/VorbisStream.js +23 -3
- package/node_modules/music-metadata/lib/ogg/vorbis/VorbisTagMapper.d.ts +4 -0
- package/node_modules/music-metadata/lib/ogg/vorbis/VorbisTagMapper.js +15 -2
- package/node_modules/music-metadata/lib/riff/RiffInfoTagMap.js +1 -0
- package/node_modules/music-metadata/lib/type.d.ts +23 -6
- package/node_modules/music-metadata/lib/wav/BwfChunk.d.ts +12 -2
- package/node_modules/music-metadata/lib/wav/BwfChunk.js +39 -11
- package/node_modules/music-metadata/lib/wav/WaveParser.js +13 -2
- package/node_modules/music-metadata/package.json +2 -1
- package/node_modules/typebox/build/format/date_time.d.mts +2 -1
- package/node_modules/typebox/build/format/date_time.mjs +12 -3
- package/node_modules/typebox/package.json +1 -1
- package/package.json +9 -9
- package/dist/.setup/setup-plugin-api-Cg4TelGZ.mjs +0 -2
- package/node_modules/fake-indexeddb/build/cjs/test/fakeIndexedDB/auto.js +0 -54
- package/node_modules/fake-indexeddb/build/cjs/test/fakeIndexedDB/binarySearchTree.js +0 -413
- package/node_modules/fake-indexeddb/build/cjs/test/fakeIndexedDB/fakeIndexedDB.js +0 -1018
- package/node_modules/fake-indexeddb/build/cjs/test/fakeIndexedDB/forceCloseDatabase.js +0 -99
- package/node_modules/fake-indexeddb/build/cjs/test/fakeIndexedDB/getAll.js +0 -707
- package/node_modules/fake-indexeddb/build/cjs/test/fakeIndexedDB/memoryLeaks.js +0 -42
- package/node_modules/fake-indexeddb/build/esm/test/fakeIndexedDB/auto.js +0 -52
- package/node_modules/fake-indexeddb/build/esm/test/fakeIndexedDB/binarySearchTree.js +0 -409
- package/node_modules/fake-indexeddb/build/esm/test/fakeIndexedDB/fakeIndexedDB.js +0 -1014
- package/node_modules/fake-indexeddb/build/esm/test/fakeIndexedDB/forceCloseDatabase.js +0 -95
- package/node_modules/fake-indexeddb/build/esm/test/fakeIndexedDB/getAll.js +0 -703
- package/node_modules/fake-indexeddb/build/esm/test/fakeIndexedDB/memoryLeaks.js +0 -38
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import fs, {} from "node:fs";
|
|
2
|
+
import asyncFs from "node:fs/promises";
|
|
2
3
|
import path from "node:path";
|
|
4
|
+
import { runSync, wait } from "./atomic-io.js";
|
|
3
5
|
import { shortPath } from "./error-detail.js";
|
|
4
6
|
import { pathEscapeError, sanitizeRootPathError, symlinkEscapeError } from "./root-path-errors.js";
|
|
5
7
|
import { FsSafeError } from "./errors.js";
|
|
6
8
|
import { isNativeDirectoryObservationGuard } from "./native-directory-observation.js";
|
|
7
9
|
import { assertNoNulPathInput, isNotFoundPathError, isPathRelativeEscape, } from "./path.js";
|
|
8
|
-
import { absolutePathWithRawSegments, rawPathRelativeToCanonicalRoot,
|
|
10
|
+
import { absolutePathWithRawSegments, rawPathRelativeToCanonicalRoot, resolveExistingAncestorProcedure, resolveSymlinkHopPath, runRootTraversal, synchronousRootTraversal, } from "./root-path-existing.js";
|
|
9
11
|
import { admitPathInsideRoot, } from "./root-boundary.js";
|
|
10
12
|
import { RootPathObservationError, captureRootPathObservedDirectory, createRootPathTraversalObservation, inspectRootPathTraversalEntry, } from "./root-path-observation.js";
|
|
11
13
|
import { assertNoDriveRelativePathSegments } from "./safe-path-segment.js";
|
|
@@ -23,36 +25,38 @@ export const ROOT_PATH_ALIAS_POLICIES = {
|
|
|
23
25
|
}),
|
|
24
26
|
};
|
|
25
27
|
export async function resolveRootPath(params) {
|
|
26
|
-
return resolveRootPathInternal(params);
|
|
28
|
+
return runRootTraversal(resolveRootPathInternal(params));
|
|
27
29
|
}
|
|
28
30
|
export async function resolveRootPathWithCanonicalRootObservation(params, observeRoot) {
|
|
29
|
-
return resolveRootPathInternal(params, { observeRoot });
|
|
31
|
+
return runRootTraversal(resolveRootPathInternal(params, { observeRoot }));
|
|
30
32
|
}
|
|
31
33
|
export async function resolveRootPathWithObservation(params, request) {
|
|
32
34
|
const observation = { request };
|
|
33
|
-
const resolved =
|
|
35
|
+
const resolved = synchronousRootTraversal
|
|
36
|
+
? runSync(resolveRootPathInternal(params, { observation }))
|
|
37
|
+
: await runRootTraversal(resolveRootPathInternal(params, { observation }));
|
|
34
38
|
return observation.receipt ? { resolved, receipt: observation.receipt } : { resolved };
|
|
35
39
|
}
|
|
36
40
|
// Removal receipts are separate from metadata observations and canonical-root
|
|
37
|
-
// callbacks;
|
|
41
|
+
// callbacks; retain their synchronous admission and mutation-fence owner.
|
|
38
42
|
export async function resolveRootPathForRemoval(params, receipts) {
|
|
39
|
-
return resolveRootPathInternal(params, { removalReceipts: receipts });
|
|
43
|
+
return runSync(resolveRootPathInternal(params, { removalReceipts: receipts }, true));
|
|
40
44
|
}
|
|
41
45
|
export function resolveRootPathSync(params) {
|
|
42
|
-
return resolveRootPathInternal(params, { mode: "ordinary" });
|
|
46
|
+
return runSync(resolveRootPathInternal(params, { mode: "ordinary" }, true));
|
|
43
47
|
}
|
|
44
48
|
export function resolveRootPathSyncWithCanonicalRootObservation(params, observeRoot) {
|
|
45
|
-
return resolveRootPathInternal(params, { mode: "ordinary", observeRoot });
|
|
49
|
+
return runSync(resolveRootPathInternal(params, { mode: "ordinary", observeRoot }, true));
|
|
46
50
|
}
|
|
47
|
-
function resolveRootPathInternal(params, options = {}) {
|
|
51
|
+
function* resolveRootPathInternal(params, options = {}, synchronous = synchronousRootTraversal) {
|
|
48
52
|
try {
|
|
49
|
-
return traverseRootPath(params, options);
|
|
53
|
+
return yield* traverseRootPath(params, options, synchronous);
|
|
50
54
|
}
|
|
51
55
|
catch (error) {
|
|
52
56
|
throw sanitizeRootPathError(error);
|
|
53
57
|
}
|
|
54
58
|
}
|
|
55
|
-
function prepareRootTraversal(params, rootPath, rootCanonicalPath, absolutePath, rawAbsolutePath) {
|
|
59
|
+
function* prepareRootTraversal(params, rootPath, rootCanonicalPath, absolutePath, rawAbsolutePath, synchronous) {
|
|
56
60
|
let raw = rawAbsolutePath;
|
|
57
61
|
let trustedAbsolutePath = false;
|
|
58
62
|
// Even a metadata lookup on a foreign share contacts that host, including the
|
|
@@ -68,7 +72,7 @@ function prepareRootTraversal(params, rootPath, rootCanonicalPath, absolutePath,
|
|
|
68
72
|
else {
|
|
69
73
|
const canonical = admitRawPathInsideRoot(rootCanonicalPath, raw, params.rootIdentity);
|
|
70
74
|
const relative = canonical?.relativePath
|
|
71
|
-
?? rawPathRelativeToCanonicalRoot(raw, rootCanonicalPath, params);
|
|
75
|
+
?? (yield* rawPathRelativeToCanonicalRoot(raw, rootCanonicalPath, params, synchronous));
|
|
72
76
|
if (relative === undefined) {
|
|
73
77
|
throw pathEscapeError({ rootPath, absolutePath: raw, boundaryLabel: params.boundaryLabel });
|
|
74
78
|
}
|
|
@@ -249,27 +253,28 @@ function assertDirectoryBeforeMoreSegments(stat, pathname, isLast) {
|
|
|
249
253
|
throw Object.assign(new Error(`Path component is not a directory: ${pathname}`), { code: "ENOTDIR" });
|
|
250
254
|
}
|
|
251
255
|
}
|
|
252
|
-
function assertResolvedLinkDirectory(pathname, isLast) {
|
|
256
|
+
function* assertResolvedLinkDirectory(pathname, isLast, synchronous) {
|
|
253
257
|
if (isLast)
|
|
254
258
|
return;
|
|
255
|
-
const stat = fs.statSync(pathForWindowsFilesystem(pathname))
|
|
259
|
+
const stat = synchronous ? fs.statSync(pathForWindowsFilesystem(pathname))
|
|
260
|
+
: yield* wait(asyncFs.stat(pathForWindowsFilesystem(pathname)));
|
|
256
261
|
assertDirectoryBeforeMoreSegments(stat, pathname, isLast);
|
|
257
262
|
}
|
|
258
|
-
// Both
|
|
259
|
-
//
|
|
260
|
-
function traverseRootPath(params, { mode = "native", observation: observationOutput, observeRoot, removalReceipts }) {
|
|
263
|
+
// Both drivers share containment policy. Observation receipts and platform-specific
|
|
264
|
+
// native guards retain their existing synchronous owners.
|
|
265
|
+
function* traverseRootPath(params, { mode = "native", observation: observationOutput, observeRoot, removalReceipts }, synchronous) {
|
|
261
266
|
const input = captureValidRootPathInputs(params);
|
|
262
267
|
const rawAbsolutePath = absolutePathWithRawSegments(input.absolutePath);
|
|
263
268
|
const rootPath = resolvePathPreservingWindowsRoot(input.rootPath);
|
|
264
269
|
const absolutePath = resolvePathPreservingWindowsRoot(rawAbsolutePath);
|
|
265
270
|
const rootCanonicalPath = input.rootCanonicalPath
|
|
266
271
|
? resolvePathPreservingWindowsRoot(input.rootCanonicalPath)
|
|
267
|
-
:
|
|
272
|
+
: yield* resolveExistingAncestorProcedure(rootPath, mode, synchronous);
|
|
268
273
|
assertNoWindowsPathAlias(rootPath);
|
|
269
274
|
assertNoWindowsPathAlias(absolutePath);
|
|
270
275
|
assertNoWindowsPathAlias(rootCanonicalPath);
|
|
271
276
|
observeRoot?.(rootCanonicalPath);
|
|
272
|
-
const context = createLexicalTraversalContext(prepareRootTraversal(input, rootPath, rootCanonicalPath, absolutePath, rawAbsolutePath));
|
|
277
|
+
const context = createLexicalTraversalContext(yield* prepareRootTraversal(input, rootPath, rootCanonicalPath, absolutePath, rawAbsolutePath, synchronous));
|
|
273
278
|
const { state } = context;
|
|
274
279
|
const observation = createLexicalTraversalObservation(context, observationOutput?.request);
|
|
275
280
|
for (let idx = 0; idx < state.segments.length; idx += 1) {
|
|
@@ -306,7 +311,8 @@ function traverseRootPath(params, { mode = "native", observation: observationOut
|
|
|
306
311
|
}
|
|
307
312
|
stat = isNativeDirectoryObservationGuard(observed)
|
|
308
313
|
? undefined
|
|
309
|
-
: observed?.stat ?? fs.lstatSync(state.lexicalCursor)
|
|
314
|
+
: observed?.stat ?? (synchronous ? fs.lstatSync(state.lexicalCursor)
|
|
315
|
+
: yield* wait(asyncFs.lstat(state.lexicalCursor)));
|
|
310
316
|
}
|
|
311
317
|
}
|
|
312
318
|
catch (error) {
|
|
@@ -369,12 +375,12 @@ function traverseRootPath(params, { mode = "native", observation: observationOut
|
|
|
369
375
|
}
|
|
370
376
|
if (observation?.enabled)
|
|
371
377
|
disableLexicalTraversalObservation(context, observation);
|
|
372
|
-
const linkCanonical = resolveSymlinkHopPath(state.lexicalCursor, mode, context.resolveParams.rejectUnresolvedSymlinks);
|
|
378
|
+
const linkCanonical = yield* resolveSymlinkHopPath(state.lexicalCursor, mode, context.resolveParams.rejectUnresolvedSymlinks, 64, synchronous);
|
|
373
379
|
applyResolvedSymlinkHop(context, linkCanonical);
|
|
374
380
|
if (context.resolveParams.rejectSymlinks === true) {
|
|
375
381
|
throw new FsSafeError("symlink", "symlink path component not allowed");
|
|
376
382
|
}
|
|
377
|
-
assertResolvedLinkDirectory(linkCanonical, isLast);
|
|
383
|
+
yield* assertResolvedLinkDirectory(linkCanonical, isLast, synchronous);
|
|
378
384
|
}
|
|
379
385
|
const completeObservation = observation?.enabled === true && observation.directoryGuard !== undefined &&
|
|
380
386
|
observation.targetPath === state.canonicalCursor && observation.target !== undefined;
|
|
@@ -382,7 +388,7 @@ function traverseRootPath(params, { mode = "native", observation: observationOut
|
|
|
382
388
|
? isNativeDirectoryObservationGuard(observation.target)
|
|
383
389
|
? "directory"
|
|
384
390
|
: toResolvedKind(observation.target.stat)
|
|
385
|
-
:
|
|
391
|
+
: yield* getPathKind(state.canonicalCursor, state.preserveFinalSymlink, synchronous);
|
|
386
392
|
if (completeObservation && observationOutput) {
|
|
387
393
|
observationOutput.receipt = {
|
|
388
394
|
kind: observation.request.kind,
|
|
@@ -395,12 +401,12 @@ function traverseRootPath(params, { mode = "native", observation: observationOut
|
|
|
395
401
|
}
|
|
396
402
|
return finalizeLexicalResolution(context, kind);
|
|
397
403
|
}
|
|
398
|
-
function
|
|
404
|
+
function* getPathKind(absolutePath, preserveFinalSymlink, synchronous) {
|
|
399
405
|
try {
|
|
400
406
|
const operationPath = pathForWindowsFilesystem(absolutePath);
|
|
401
407
|
const stat = preserveFinalSymlink
|
|
402
|
-
? fs.lstatSync(operationPath)
|
|
403
|
-
: fs.statSync(operationPath);
|
|
408
|
+
? synchronous ? fs.lstatSync(operationPath) : yield* wait(asyncFs.lstat(operationPath))
|
|
409
|
+
: synchronous ? fs.statSync(operationPath) : yield* wait(asyncFs.stat(operationPath));
|
|
404
410
|
return toResolvedKind(stat);
|
|
405
411
|
}
|
|
406
412
|
catch (error) {
|
|
@@ -8,7 +8,7 @@ import { assertNoPathAliasEscape } from "./path-policy.js";
|
|
|
8
8
|
import { preparePinnedWriteMutationAdmission, snapshotPinnedMutationPolicy, } from "./pinned-mutation-admission.js";
|
|
9
9
|
import { admitPathInsideRoot, sameNormalizedPathSpelling } from "./root-boundary.js";
|
|
10
10
|
import { resolvePathInRoot } from "./root-context.js";
|
|
11
|
-
import { errorCauseOptions, hardlinkedPathNotAllowedError, outsideWorkspaceError } from "./root-errors.js";
|
|
11
|
+
import { errorCauseOptions, hardlinkedPathNotAllowedError, outsideWorkspaceError, pathTraversalPermissionError } from "./root-errors.js";
|
|
12
12
|
import { inheritWriteTargetMode } from "./root-write-mode.js";
|
|
13
13
|
import { mutationSymlinkResolution, } from "./root-symlink-policy.js";
|
|
14
14
|
import { inspectFileIdentitySync } from "./strict-file-identity.js";
|
|
@@ -179,6 +179,9 @@ export async function resolveGuardedWritePathInRoot(root, params) {
|
|
|
179
179
|
});
|
|
180
180
|
}
|
|
181
181
|
catch (error) {
|
|
182
|
+
const permissionError = pathTraversalPermissionError(error, resolvedPath.resolved);
|
|
183
|
+
if (permissionError)
|
|
184
|
+
throw permissionError;
|
|
182
185
|
throw new FsSafeError("path-alias", "path alias escape blocked", errorCauseOptions(error));
|
|
183
186
|
}
|
|
184
187
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type BigIntStats } from "node:fs";
|
|
2
|
+
import { type DirectoryMode } from "./directory-mode-options.js";
|
|
2
3
|
import { type AsyncDirectoryGuard } from "./directory-guard.js";
|
|
3
4
|
import { type SecretFileReadOptions } from "./secret-read-policy.js";
|
|
4
5
|
export declare const PRIVATE_SECRET_DIR_MODE = 448;
|
|
@@ -10,7 +11,7 @@ type SecretFileWriteParams = {
|
|
|
10
11
|
filePath: string;
|
|
11
12
|
content: string | Uint8Array;
|
|
12
13
|
mode?: number;
|
|
13
|
-
dirMode?:
|
|
14
|
+
dirMode?: DirectoryMode;
|
|
14
15
|
durable?: boolean;
|
|
15
16
|
};
|
|
16
17
|
type SecretFileCreateParams = Omit<SecretFileWriteParams, "durable"> & {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import fs, {} from "node:fs";
|
|
2
2
|
import fsp from "node:fs/promises";
|
|
3
3
|
import path from "node:path";
|
|
4
|
+
import { rejectPrivateDirectoryPreservation } from "./directory-mode-options.js";
|
|
4
5
|
import { recursiveMkdirPath } from "./recursive-mkdir-path.js";
|
|
5
6
|
import { canonicalPathFromExistingAncestor } from "./absolute-path.js";
|
|
6
7
|
import { readFileDescriptorBoundedSync } from "./bounded-read.js";
|
|
@@ -238,6 +239,7 @@ export async function prepareSecretFileWrite(params) {
|
|
|
238
239
|
assertNoWindowsPathAlias(filePath, "filesystem", "private secret path uses a Windows filesystem namespace alias");
|
|
239
240
|
const mode = params.mode ?? PRIVATE_SECRET_FILE_MODE;
|
|
240
241
|
const dirMode = params.dirMode ?? PRIVATE_SECRET_DIR_MODE;
|
|
242
|
+
rejectPrivateDirectoryPreservation(dirMode);
|
|
241
243
|
const resolvedRoot = resolvePathPreservingWindowsRoot(rootDir);
|
|
242
244
|
const resolvedFile = path.resolve(filePath);
|
|
243
245
|
assertNoWindowsPathAlias(resolvedRoot, "filesystem", "private secret root uses a Windows filesystem namespace alias");
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { DirectoryMode } from "./directory-mode-options.js";
|
|
1
2
|
export type WriteSiblingTempFileOptions<T> = {
|
|
2
3
|
dir: string;
|
|
3
4
|
writeTemp: (tempPath: string) => Promise<T>;
|
|
@@ -5,7 +6,7 @@ export type WriteSiblingTempFileOptions<T> = {
|
|
|
5
6
|
producerIsolation?: "private-directory";
|
|
6
7
|
resolveFinalPath: (result: T) => string;
|
|
7
8
|
tempPrefix?: string;
|
|
8
|
-
dirMode?:
|
|
9
|
+
dirMode?: DirectoryMode;
|
|
9
10
|
chmodDir?: boolean;
|
|
10
11
|
/** Final file mode; omitted preserves the producer's mode. Applied through the retained descriptor. */
|
|
11
12
|
mode?: number;
|
|
@@ -3,7 +3,7 @@ import fs from "node:fs/promises";
|
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import { assertAsyncDirectoryGuard, createAsyncDirectoryGuard } from "./directory-guard.js";
|
|
5
5
|
import { fitFileNameToPortableComponent, sanitizeUntrustedFileName } from "./filename.js";
|
|
6
|
-
import {
|
|
6
|
+
import { prepareDirectoryMode } from "./prepare-directory-mode.js";
|
|
7
7
|
import { AtomicIo, runAsync } from "./atomic-io.js";
|
|
8
8
|
import { realpathSync } from "./realpath.js";
|
|
9
9
|
import { recursiveMkdirPath } from "./recursive-mkdir-path.js";
|
|
@@ -34,14 +34,15 @@ export async function writeSiblingTempFile(options) {
|
|
|
34
34
|
const mode = options.mode;
|
|
35
35
|
const syncTempFile = options.syncTempFile === true;
|
|
36
36
|
const syncParentDir = options.syncParentDir === true;
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
await runAsync(applyDirectoryMode(AtomicIo.async(fs), {
|
|
37
|
+
if (dirMode === "preserve" || chmodDir) {
|
|
38
|
+
await runAsync(prepareDirectoryMode(AtomicIo.async(fs), {
|
|
40
39
|
dirPath: dir,
|
|
41
40
|
mode: dirMode,
|
|
42
41
|
ignoreChmodError: true,
|
|
43
42
|
}));
|
|
44
43
|
}
|
|
44
|
+
else
|
|
45
|
+
await fs.mkdir(recursiveMkdirPath(dir), { recursive: true, mode: dirMode });
|
|
45
46
|
return await writeCallbackSibling({
|
|
46
47
|
tempDir: dir,
|
|
47
48
|
tempName: buildTempName(tempPrefix),
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { SidecarLockSnapshot } from "./sidecar-lock-reclaim.js";
|
|
2
|
+
import type { SidecarLockRetryOptions } from "./sidecar-lock-types.js";
|
|
2
3
|
export declare function validateSidecarLockRetryOptions(retry: SidecarLockRetryOptions): void;
|
|
3
4
|
export declare function validateSidecarLockTimeoutMs(timeoutMs: number | undefined): void;
|
|
4
5
|
export declare function validateSidecarLockStaleMs(staleMs: number | undefined): void;
|
|
@@ -11,4 +12,4 @@ export declare function sidecarLockRetryDelay(retry: SidecarLockRetryOptions, ti
|
|
|
11
12
|
export declare const maxTransientLockDenials = 8;
|
|
12
13
|
export declare function isTransientLockFileDenial(error: unknown, lockPath: string): boolean;
|
|
13
14
|
export declare function sidecarLockPayloadCreatedAtMs(payload: unknown): number | null;
|
|
14
|
-
export declare function defaultSidecarLockShouldReclaim(
|
|
15
|
+
export declare function defaultSidecarLockShouldReclaim(snapshot: SidecarLockSnapshot, staleMs: number, nowMs: number): boolean;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import fsSync from "node:fs";
|
|
2
1
|
const MAX_TIMER_DELAY_MS = 2 ** 31 - 1;
|
|
3
2
|
function assertFiniteNonNegative(value, label) {
|
|
4
3
|
if (!Number.isFinite(value) || value < 0) {
|
|
@@ -100,14 +99,14 @@ export function sidecarLockPayloadCreatedAtMs(payload) {
|
|
|
100
99
|
const createdAtMs = Date.parse(createdAt);
|
|
101
100
|
return Number.isFinite(createdAtMs) ? createdAtMs : null;
|
|
102
101
|
}
|
|
103
|
-
export
|
|
104
|
-
const createdAtMs = sidecarLockPayloadCreatedAtMs(
|
|
102
|
+
export function defaultSidecarLockShouldReclaim(snapshot, staleMs, nowMs) {
|
|
103
|
+
const createdAtMs = sidecarLockPayloadCreatedAtMs(snapshot.payload);
|
|
105
104
|
if (createdAtMs !== null)
|
|
106
|
-
return
|
|
107
|
-
|
|
108
|
-
return params.nowMs - fsSync.statSync(params.lockPath).mtimeMs > params.staleMs;
|
|
109
|
-
}
|
|
110
|
-
catch {
|
|
105
|
+
return nowMs - createdAtMs > staleMs;
|
|
106
|
+
if (!snapshot.stat)
|
|
111
107
|
return true;
|
|
112
|
-
|
|
108
|
+
// A released pathname may already name another owner; age only the admitted record.
|
|
109
|
+
const mtimeMs = "mtimeNs" in snapshot.stat
|
|
110
|
+
? Number(snapshot.stat.mtimeNs) / 1e6 : snapshot.stat.mtimeMs;
|
|
111
|
+
return nowMs - mtimeMs > staleMs;
|
|
113
112
|
}
|
|
@@ -97,12 +97,14 @@ export async function handleStaleSidecarAdmission(params) {
|
|
|
97
97
|
return;
|
|
98
98
|
throw error;
|
|
99
99
|
}
|
|
100
|
-
const shouldReclaim = staleOptions.shouldReclaim
|
|
100
|
+
const shouldReclaim = staleOptions.shouldReclaim;
|
|
101
101
|
let reclaim;
|
|
102
102
|
try {
|
|
103
103
|
reclaim = await admission.run(async () => {
|
|
104
104
|
assertUnheld();
|
|
105
105
|
try {
|
|
106
|
+
if (!shouldReclaim)
|
|
107
|
+
return defaultSidecarLockShouldReclaim(snapshot, params.staleMs, Date.now());
|
|
106
108
|
return await Reflect.apply(shouldReclaim, undefined, [{
|
|
107
109
|
lockPath,
|
|
108
110
|
normalizedTargetPath,
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import type { ExactFileIdentity } from "./exact-identity.js";
|
|
2
|
+
import type { DirectoryMode } from "./directory-mode-options.js";
|
|
2
3
|
import type { FileStore, FileStoreSync } from "./file-store.js";
|
|
3
4
|
import type { TempPathIdentityReceipt } from "./temp-cleanup.js";
|
|
4
5
|
import type { TempWorkspaceCleanupResult, TempWorkspaceCleanupSafety } from "./temp-workspace-owner.js";
|
|
5
6
|
export type TempWorkspaceOptions = {
|
|
6
7
|
rootDir: string;
|
|
7
8
|
prefix: string;
|
|
8
|
-
dirMode?:
|
|
9
|
+
dirMode?: DirectoryMode;
|
|
9
10
|
mode?: number;
|
|
10
11
|
cleanupSafety?: TempWorkspaceCleanupSafety;
|
|
11
12
|
};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { type ReplaceFileAtomicOptions } from "./replace-file.js";
|
|
2
|
+
import type { DirectoryMode } from "./directory-mode-options.js";
|
|
2
3
|
export type WriteTextAtomicOptions = Pick<ReplaceFileAtomicOptions, "beforeRename" | "tempPrefix"> & {
|
|
3
4
|
mode?: number;
|
|
4
|
-
dirMode?:
|
|
5
|
+
dirMode?: DirectoryMode;
|
|
5
6
|
trailingNewline?: boolean;
|
|
6
7
|
/** Defaults to true; false skips file and parent fsync without changing replacement. */
|
|
7
8
|
durable?: boolean;
|
|
@@ -173,8 +173,11 @@ export async function admittedNativeChanges(root, scopes, before, after, batch,
|
|
|
173
173
|
}
|
|
174
174
|
}
|
|
175
175
|
const guards = new Map();
|
|
176
|
+
// These guards have no published dependants. Reuse acquisition only within
|
|
177
|
+
// this pass, with a fresh physical-path/identity fence for every hint.
|
|
178
|
+
const unselectedGuards = new Map();
|
|
176
179
|
const admittedParent = async (parent) => {
|
|
177
|
-
let guard = guards.get(parent);
|
|
180
|
+
let guard = guards.get(parent) ?? unselectedGuards.get(parent);
|
|
178
181
|
if (!guard) {
|
|
179
182
|
const resolved = await resolvePathInRoot(root, parent ? "./" + parent : ".", { rejectSymlinks: true });
|
|
180
183
|
guard = await createRootDirectoryObservationGuard(root, resolved.resolved);
|
|
@@ -257,6 +260,7 @@ export async function admittedNativeChanges(root, scopes, before, after, batch,
|
|
|
257
260
|
if (scheduling || retained)
|
|
258
261
|
throw error;
|
|
259
262
|
guards.delete(parent);
|
|
263
|
+
unselectedGuards.delete(parent);
|
|
260
264
|
if (isNotFoundPathError(error) || (error instanceof FsSafeError && ["not-found", "path-alias", "outside-workspace", "symlink", "not-file"].includes(error.code)))
|
|
261
265
|
break;
|
|
262
266
|
// A yielded admission may race an ordinary sibling deletion. Fresh
|
|
@@ -284,9 +288,14 @@ export async function admittedNativeChanges(root, scopes, before, after, batch,
|
|
|
284
288
|
// A newly created directory may contain selected entries absent from the baseline.
|
|
285
289
|
if (scheduling)
|
|
286
290
|
return undefined;
|
|
287
|
-
//
|
|
288
|
-
//
|
|
291
|
+
// No result depends on this parent. Later hints must revalidate it,
|
|
292
|
+
// and a failed fence gets fresh admission rather than becoming a stale
|
|
293
|
+
// selected-alias dependency. Do not retain it in the final result fence.
|
|
289
294
|
guards.delete(hint.directory);
|
|
295
|
+
// An alias spelling may be redirected while its old canonical referent
|
|
296
|
+
// survives. Only the original canonical route can be fenced by this guard.
|
|
297
|
+
if (guard.dir === path.join(root.rootReal, hint.directory))
|
|
298
|
+
unselectedGuards.set(hint.directory, guard);
|
|
290
299
|
continue;
|
|
291
300
|
}
|
|
292
301
|
[parent, expected] = admitted;
|
|
Binary file
|
|
@@ -31,18 +31,16 @@ export async function writeAllToFile(target, data, options = {}) {
|
|
|
31
31
|
const length = Math.min(WRITE_CHUNK_BYTES, buffer.byteLength - offset);
|
|
32
32
|
const position = options.position === undefined ? null : options.position + offset;
|
|
33
33
|
options.assertBeforeMutation?.();
|
|
34
|
-
const written = typeof target === "number"
|
|
35
|
-
?
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
})
|
|
45
|
-
: (await target.write(buffer, offset, length, position)).bytesWritten;
|
|
34
|
+
const written = typeof target === "number"
|
|
35
|
+
? await new Promise((resolve, reject) => {
|
|
36
|
+
fs.write(target, buffer, offset, length, position, (error, bytesWritten) => {
|
|
37
|
+
if (error)
|
|
38
|
+
reject(error);
|
|
39
|
+
else
|
|
40
|
+
resolve(bytesWritten);
|
|
41
|
+
});
|
|
42
|
+
})
|
|
43
|
+
: (await target.write(buffer, offset, length, position)).bytesWritten;
|
|
46
44
|
if (written <= 0) {
|
|
47
45
|
throw new FsSafeError("helper-failed", "file write made no progress");
|
|
48
46
|
}
|
|
@@ -31,9 +31,9 @@ The exports group into a handful of themes. Documented helpers link to their con
|
|
|
31
31
|
| `resolveExistingPathsWithinRoot` | – | Validate existing regular files inside the root, while allowing missing paths. |
|
|
32
32
|
| `resolveStrictExistingPathsWithinRoot` | – | Require every target to exist as a regular non-symlink file inside the root. |
|
|
33
33
|
| `resolveWritablePathWithinRoot` | – | Resolve a write target inside a root. |
|
|
34
|
-
| `resolveRootPath`, `resolveRootPathSync`, `ResolvedRootPath`, `ROOT_PATH_ALIAS_POLICIES`, `RootPathAliasPolicy` | – | Resolve a root directory honoring alias policy. |
|
|
34
|
+
| `resolveRootPath`, `resolveRootPathSync`, `ResolvedRootPath`, `ROOT_PATH_ALIAS_POLICIES`, `RootPathAliasPolicy` | – | Resolve a root directory honoring alias policy. Awaited POSIX traversal uses asynchronous Node metadata and canonicalization; the explicit sync variant blocks. Windows retains synchronous traversal to preserve concurrent reads and atomic publication until canonicalization supports delete sharing. Identity/observation guards and runtime-specific native canonicalization may still be synchronous. |
|
|
35
35
|
| `resolvePathViaExistingAncestorSync` | – | Walk to an existing ancestor for paths whose tail does not yet exist. |
|
|
36
|
-
| `resolvePathPrefixSync`, `ResolvedPathPrefix` | [path-prefix.md](path-prefix.md) | Follow physical symlink targets and return a canonical existing prefix with the raw missing suffix; propagate uncertain resolution failures. |
|
|
36
|
+
| `resolvePathPrefix`, `resolvePathPrefixSync`, `ResolvedPathPrefix` | [path-prefix.md](path-prefix.md) | Follow physical symlink targets and return a canonical existing prefix with the raw missing suffix; propagate uncertain resolution failures. |
|
|
37
37
|
| `probePathCaseInsensitiveSync`, `ProbePathCaseOptions` | [path-case.md](path-case.md) | Observe local ASCII-case behavior with explicit read-only mode and owned temporary-probe cleanup. |
|
|
38
38
|
| `probePathSuffixAliasesSync`, `ProbePathSuffixAliasesOptions` | [path-suffix-aliases.md](path-suffix-aliases.md) | Observe selected missing suffix aliases with bounded temporary directory probes; ambiguity, dynamic budget exhaustion, or incomplete cleanup returns `undefined`. |
|
|
39
39
|
|
|
@@ -77,7 +77,7 @@ concurrent namespace changes.
|
|
|
77
77
|
| `writeFileWindowFully`, `WriteFileWindowOptions` | [Borrowed-handle writes](#borrowed-handle-writes) | Write all supplied bytes at an explicit position or the current cursor, completing short writes with cancellation and per-write authority checks. |
|
|
78
78
|
| `copyFileHandle`, `copyFileDescriptorSync`, `CopyFileHandleOptions` | [copy.md](copy.md#borrowed-filehandle-transfers) | Copy caller-owned regular files through async handles or sync descriptors from position zero with byte limits and synchronous callbacks; preserves cursors and leaves publication and cleanup to the caller. |
|
|
79
79
|
| `sameFileContentsSync`, `SameFileContentsOptions` | [Exact file comparison](file-contents.md) | Compare borrowed regular-file descriptors byte for byte through EOF with bounded memory and an optional per-file byte limit, preserving both cursors and lifetimes. |
|
|
80
|
-
| `overwriteFileHandle`, `OverwriteFileHandleOptions` | [in-place-write.md](in-place-write.md) | Overwrite a borrowed read/write handle with prefix-only preparation and best-effort rollback; preserves its inode, cursor, and caller-owned lifetime. |
|
|
80
|
+
| `overwriteFileHandle`, `overwriteFileHandleWithAuthority`, `OverwriteFileHandleOptions` | [in-place-write.md](in-place-write.md) | Overwrite a borrowed read/write handle with prefix-only preparation and best-effort rollback; preserves its inode, cursor, and caller-owned lifetime. |
|
|
81
81
|
| `openRootFile`, `openRootFileSync`, `canUseRootFileOpen`, `matchRootFileOpenFailure`, related types | – | Low-level root-bounded open; rejects every symlink component by default, with `symlinks: "follow-parents-within-root"` for contained parent aliases or `"follow-within-root"` for final links too. |
|
|
82
82
|
| `createRootFileOpenBatchSync`, `RootFileOpenBatchSync` | [Synchronous open batches](reading.md#synchronous-open-batches) | Reuse native Windows root handles for synchronous file opens while retaining fresh file checks. |
|
|
83
83
|
| `appendRegularFile`, `appendRegularFileSync`, `readRegularFile`, `readRegularFileSync`, `statRegularFile`, `statRegularFileSync`, `resolveRegularFileAppendFlags`, `AppendRegularFileOptions`, `RegularFileStatResult` | [regular-file.md](regular-file.md) | Type-checked regular-file I/O. |
|
|
@@ -23,6 +23,16 @@ bits still require descriptor mode correction before publication.
|
|
|
23
23
|
|
|
24
24
|
On POSIX, the parent is opened with no-follow and directory-only flags, checked against its exact pre-open device/inode identity, and mode-adjusted through that descriptor. A replacement symlink is rejected rather than followed. If the directory cannot be opened for descriptor access, the operation fails closed instead of retrying by pathname. Windows does not enforce POSIX directory modes and Node cannot consistently open directory descriptors there, so `dirMode` is passed only to `mkdir`; no pathname `chmod` fallback is attempted.
|
|
25
25
|
|
|
26
|
+
Pass `dirMode: "preserve"` when the parent is shared or owned by another user.
|
|
27
|
+
A verified existing parent is still opened and identity-checked, but no chmod
|
|
28
|
+
or mode-equality probe is attempted. Each directory the operation exclusively
|
|
29
|
+
creates finishes at `0o700`, independent of umask; a concurrent `mkdir` winner
|
|
30
|
+
is verified as an existing directory and left unchanged. On Windows,
|
|
31
|
+
`"preserve"` uses the default mkdir mode (`0o700`) without POSIX mode enforcement.
|
|
32
|
+
Omitted and numeric values retain their current behavior, including tightening
|
|
33
|
+
an existing parent to `0o700` by default. File `mode` and `preserveExistingMode`
|
|
34
|
+
are independent of this directory policy.
|
|
35
|
+
|
|
26
36
|
Async replacements to the same destination are serialized inside the current process, so two overlapping `replaceFileAtomic()` calls do not interleave their temp-write/rename phases. Use a sidecar lock when multiple processes may write the same target.
|
|
27
37
|
|
|
28
38
|
Relative paths retain their literal suffix so `.` and `..` keep Node's existing
|
|
@@ -51,7 +61,7 @@ await replaceFileAtomic({
|
|
|
51
61
|
type ReplaceFileAtomicOptions = {
|
|
52
62
|
filePath: string; // destination
|
|
53
63
|
content: string | Uint8Array;
|
|
54
|
-
dirMode?: number;
|
|
64
|
+
dirMode?: number | "preserve"; // parent policy (POSIX; default 0o700)
|
|
55
65
|
mode?: number; // new-file mode (default 0o600)
|
|
56
66
|
preserveExistingMode?: boolean; // inherit existing regular-file rwx bits; default false
|
|
57
67
|
tempPrefix?: string; // default ".fs-safe-replace"
|
|
@@ -406,7 +416,7 @@ Options:
|
|
|
406
416
|
```ts
|
|
407
417
|
type WriteTextAtomicOptions = {
|
|
408
418
|
mode?: number; // file mode (default 0o600)
|
|
409
|
-
dirMode?: number;
|
|
419
|
+
dirMode?: number | "preserve"; // parent policy (default 0o777 masked by process umask)
|
|
410
420
|
trailingNewline?: boolean; // append "\n" if missing; default false
|
|
411
421
|
durable?: boolean; // default true; false skips temp/parent fsync
|
|
412
422
|
beforeRename?: (params: { filePath: string; tempPath: string }) => Promise<void>;
|
|
@@ -424,6 +434,9 @@ separators.
|
|
|
424
434
|
temp-file and parent-directory `fsync` calls. Use it only for reconstructible
|
|
425
435
|
metadata where lower latency matters more than crash-durability.
|
|
426
436
|
|
|
437
|
+
`dirMode: "preserve"` has the same existing-parent and new-directory behavior
|
|
438
|
+
as `replaceFileAtomic`, including its `0o700` creation default.
|
|
439
|
+
|
|
427
440
|
## `movePathWithCopyFallback`
|
|
428
441
|
|
|
429
442
|
Rename a path. If the rename fails with `EXDEV` (cross-device), or `EPERM` on
|
|
@@ -612,7 +625,7 @@ type ReplaceFileAtomicSyncFileSystem = {
|
|
|
612
625
|
};
|
|
613
626
|
```
|
|
614
627
|
|
|
615
|
-
The async interface already requires `open()`, whose `FileHandle` supplies `chmod()`, so injecting `node:fs` or another conforming adapter needs no new async member. The async temp owner consumes its retained handle before awaiting `close()` during publication handoff and terminal settlement: if a custom adapter releases the resource and then rejects, that rejection is reported without calling `close()` on the same retained handle again. If publication verification opened a replacement handle before the previous retained handle failed to close, the replacement receives one best-effort close attempt. On POSIX, `open()` must support no-follow directory descriptors as Node does. A custom synchronous filesystem that passes `mode`, `dirMode`, or `preserveExistingMode` must supply `fchmodSync`; omission fails before any file or directory is created and never falls back to a pathname `chmod`. Existing synchronous adapters that request none of those options may omit it; their parent is still opened and identity-checked through a no-follow directory descriptor. Injecting plain `node:fs` supports explicit file and directory modes. Copy fallback applies the file mode through its pinned destination descriptor as well, preserving exact modes despite the process umask.
|
|
628
|
+
The async interface already requires `open()`, whose `FileHandle` supplies `chmod()`, so injecting `node:fs` or another conforming adapter needs no new async member. The async temp owner consumes its retained handle before awaiting `close()` during publication handoff and terminal settlement: if a custom adapter releases the resource and then rejects, that rejection is reported without calling `close()` on the same retained handle again. If publication verification opened a replacement handle before the previous retained handle failed to close, the replacement receives one best-effort close attempt. On POSIX, `open()` must support no-follow directory descriptors as Node does. A custom synchronous filesystem that passes `mode`, numeric `dirMode`, or `preserveExistingMode` must supply `fchmodSync`; omission fails before any file or directory is created and never falls back to a pathname `chmod`. With `dirMode: "preserve"`, it may omit `fchmodSync` only if every parent already exists and no explicit file mode or file-mode preservation is requested; a missing parent fails before creation. Existing synchronous adapters that request none of those options may omit it; their parent is still opened and identity-checked through a no-follow directory descriptor. Injecting plain `node:fs` supports explicit file and directory modes. Copy fallback applies the file mode through its pinned destination descriptor as well, preserving exact modes despite the process umask.
|
|
616
629
|
|
|
617
630
|
## See also
|
|
618
631
|
|
|
@@ -323,7 +323,7 @@ Keep compiler adoption separate from these qualification tools.
|
|
|
323
323
|
## Platform and clean-output campaign
|
|
324
324
|
|
|
325
325
|
`compiler-qualification.yml` runs the published tsc-ts 0.0.2 native package on
|
|
326
|
-
Linux, macOS, and Windows with Node 24.
|
|
326
|
+
Linux, macOS, and Windows with Node 24.22.1. It records npm lockfile integrity,
|
|
327
327
|
native executable hashes, the exact checkout commit, and toolchain versions.
|
|
328
328
|
Windows uses the existing x64 CI runner; upstream 0.0.2 has no Windows ARM64
|
|
329
329
|
package. The npm launcher gets a separate smoke check using its default libraries.
|
|
@@ -120,8 +120,8 @@ release addon build compile it for `aarch64-pc-windows-msvc`. Bzip2 uses
|
|
|
120
120
|
The portable WASM build uses the checksum-pinned x64 WASI SDK under Windows
|
|
121
121
|
emulation because that SDK has no Windows ARM64 host archive. Its compiler and
|
|
122
122
|
archiver produce wasm32 only; the addon still uses MSVC for the selected target.
|
|
123
|
-
|
|
124
|
-
|
|
123
|
+
The existing Windows x64 Bun lanes provide the Bun runtime proof. Native Windows
|
|
124
|
+
ARM64 support is qualified with Node.
|
|
125
125
|
|
|
126
126
|
## Test
|
|
127
127
|
|
|
@@ -154,7 +154,7 @@ After building on Linux, `node scripts/check-pack.mjs --guest-cross-device`
|
|
|
154
154
|
also proves an installed-package directory move from temporary storage to
|
|
155
155
|
`/dev/shm`; the command requires those locations to be different filesystems.
|
|
156
156
|
|
|
157
|
-
With Bun 1.4.
|
|
157
|
+
With Bun 1.4.4 installed, build the host addon and run the native compatibility
|
|
158
158
|
lane in real Bun workers, then exercise the built package with JIT disabled:
|
|
159
159
|
|
|
160
160
|
```bash
|
|
@@ -210,7 +210,7 @@ temporary storage; session scratch trees may suppress macOS filesystem events.
|
|
|
210
210
|
### Optional Linux Testbox
|
|
211
211
|
|
|
212
212
|
The manual `testbox-validation.yml` workflow prepares a 16-vCPU Ubuntu 24.04
|
|
213
|
-
Blacksmith Testbox with Node 24.
|
|
213
|
+
Blacksmith Testbox with Node 24.22.1, pnpm 12.15.0, dependencies, the Rust WASM
|
|
214
214
|
target, and the pinned portable archive compiler. It leaves library builds and
|
|
215
215
|
validation commands to the caller and does not replace required CI checks.
|
|
216
216
|
|
|
@@ -307,14 +307,14 @@ OS/CPU/libc selection, a native-required SHA-256 operation, and fresh-process
|
|
|
307
307
|
optionals. Omitted-optionals installs also verify that all public subpaths can
|
|
308
308
|
be imported, without implying every operation remains available.
|
|
309
309
|
|
|
310
|
-
Host-only smoke supplies
|
|
311
|
-
manifests and clearly marked synthetic, non-executable payloads. Every foreign
|
|
310
|
+
Host-only smoke supplies foreign packages from the native target map using
|
|
311
|
+
their unchanged real manifests and clearly marked synthetic, non-executable payloads. Every foreign
|
|
312
312
|
metadata/tarball endpoint is checked before installation, so a missing fixture
|
|
313
313
|
cannot masquerade as successful platform filtering. These temporary fixtures
|
|
314
314
|
never enter `packages/`, release artifacts, or the publish manifest. They prove
|
|
315
315
|
installer filtering, not foreign native compilation or execution. Full release
|
|
316
|
-
collection uses
|
|
317
|
-
`pnpm package:collect` after assembling
|
|
316
|
+
collection uses all actual collected native tarballs instead. Run it with
|
|
317
|
+
`pnpm package:collect` after assembling every mapped native binding; missing targets
|
|
318
318
|
fail collection. `pnpm package:collect --allow-host-only` exercises the same
|
|
319
319
|
lifecycle boundary locally but proves only the host. Both collection commands
|
|
320
320
|
require the pnpm lifecycle CLI path; JavaScript CLIs run through Node and standalone
|
|
@@ -322,29 +322,38 @@ require the pnpm lifecycle CLI path; JavaScript CLIs run through Node and standa
|
|
|
322
322
|
direct `node` invocation without lifecycle metadata is unsupported. Archive
|
|
323
323
|
codecs and their dependencies are packed from the installed dependency graph.
|
|
324
324
|
|
|
325
|
-
|
|
325
|
+
CI's bundled-package producer runs `pnpm package:collect --allow-host-only --pack-only --output release-artifacts-package-smoke`
|
|
326
|
+
after building. Node 22/24 consumers use `pnpm package:smoke --packed-input <directory>`
|
|
327
|
+
to verify and install those same root and host tarballs. The input includes the
|
|
328
|
+
manifest and its clean source/host receipt; missing or mismatched input fails
|
|
329
|
+
without repacking. Consumer proof still goes to `--output` (default `release-artifacts`).
|
|
330
|
+
Both reuse modes require host-only collection; default release collection and
|
|
331
|
+
Windows signing continue to pack and verify their own artifacts.
|
|
332
|
+
|
|
333
|
+
PR CI builds and executes every mapped native binding. The existing check names
|
|
326
334
|
stay stable; extra runner/runtime combinations add checks without changing the
|
|
327
335
|
repository ruleset. Native lanes run Node 24; the GNU host lanes also exercise
|
|
328
|
-
Bun 1.4.
|
|
336
|
+
Bun 1.4.4 (as do macOS and Windows).
|
|
329
337
|
|
|
330
338
|
| Lane | Runner | Architecture / libc | Runtime |
|
|
331
339
|
| --- | --- | --- | --- |
|
|
332
340
|
| JavaScript check | `ubuntu-latest` | x64 / glibc | Node 22, 24, 26 |
|
|
333
341
|
| JavaScript check | `xcode-27` | arm64 | Node 22, 24, 26 |
|
|
334
|
-
| JavaScript check | `
|
|
335
|
-
| Native check | `ubuntu-latest` | x64 / glibc | Node 24, Bun 1.4.
|
|
342
|
+
| JavaScript check | `windows-latest` (standard hosted) | x64 | Node 22, 24, 26 |
|
|
343
|
+
| Native check | `ubuntu-latest` | x64 / glibc | Node 24, Bun 1.4.4 |
|
|
336
344
|
| Native check (forced no-openat2) | `ubuntu-latest` | x64 / glibc | Node 24 |
|
|
337
|
-
| Native check | `ubuntu-24.04-arm` | arm64 / glibc | Node 24, Bun 1.4.
|
|
338
|
-
| Native check | `xcode-27` | arm64 | Node 24, Bun 1.4.
|
|
339
|
-
| Native check | `xcode-27` under Rosetta (`x64`) | x64 | Node 24, Bun 1.4.
|
|
340
|
-
| Native check | `
|
|
341
|
-
| Native check | `windows-2022` (standard hosted) | x64 | Node 24, Bun 1.4.
|
|
345
|
+
| Native check | `ubuntu-24.04-arm` | arm64 / glibc | Node 24, Bun 1.4.4 |
|
|
346
|
+
| Native check | `xcode-27` | arm64 | Node 24, Bun 1.4.4 |
|
|
347
|
+
| Native check | `xcode-27` under Rosetta (`x64`) | x64 | Node 24, Bun 1.4.4 |
|
|
348
|
+
| Native check | `windows-latest` (standard hosted) | x64 | Node 24, Bun 1.4.4 |
|
|
349
|
+
| Native check | `windows-2022` (standard hosted) | x64 | Node 24, Bun 1.4.4 |
|
|
342
350
|
| Windows ARM64 host | `windows-11-arm` | arm64 native and x64 emulated | Node 24 |
|
|
343
351
|
| Native check (Alpine 3.24) | `ubuntu-latest` | x64 / musl | Node 24 |
|
|
344
352
|
| Native check (Alpine 3.24) | `ubuntu-24.04-arm` | arm64 / musl | Node 24 |
|
|
345
353
|
| GNU glibc 2.28 build + Rocky Linux 8 load | `ubuntu-latest` | x64 / glibc | Node 24 |
|
|
346
354
|
| GNU glibc 2.28 build + Rocky Linux 8 load | `ubuntu-24.04-arm` | arm64 / glibc | Node 24 |
|
|
347
|
-
| Bundled package
|
|
355
|
+
| Bundled package build | `ubuntu-latest`, `xcode-27`, `windows-latest` (standard hosted) | host | Node 24 |
|
|
356
|
+
| Bundled package smoke (artifact consumers) | `ubuntu-latest`, `xcode-27`, `windows-latest` (standard hosted) | host | Node 22, 24 |
|
|
348
357
|
| Coverage | `ubuntu-latest`, `xcode-27`, `fs-safe-windows-16core` | host | Node 22 |
|
|
349
358
|
|
|
350
359
|
All macOS jobs use the arm64 `xcode-27` image. Required status-check names
|