/** * S3 key separator normalization — a leaf module with NO imports. * * WHY THIS IS NOT IN `s3.ts` * -------------------------- * `journal.ts` needs this one pure string function and nothing else from the * S3 layer. Taking it from `s3.ts` made `journal.ts` — and therefore every * client hot-path module that reads the ledger, including the manifest builder * and the CLI — pull in `s3.ts` → `object-io.ts` → `@aws-sdk/client-s3` and * `vault-client.ts` → `cognito-auth.ts`, for a two-token `split`/`join`. * See the `"//exports"` note in package.json: entry points that do not talk to * S3 must not carry the AWS SDK in their module graph. * * `s3.ts` re-exports this symbol, so its many existing importers (and the * package's public surface via `index.ts`) are unaffected. Keep this file * import-free. */ /** * Normalize an S3 object key to POSIX ("/") separators. * * S3 keys are always "/"-separated, and the vault listing reconstructs the * folder tree by splitting keys on "/". A non-POSIX (Windows) sync client * builds a key from `path.relative(...)`, whose separator is the native "\\"; * stored verbatim, a nested key like `knowledge\books-eoi.md` contains no "/" * and the listing renders it flat at the vault root as one oddly-named file. * Converting every "\\" to "/" makes the stored key POSIX regardless of the * client OS. * * Mirrors the prefix guard in hq-pro files-acl (`FORBIDDEN_CHARS = /[?#\\[\]]/`, * which already rejects "\\" on browse/grant prefixes). Uploads go direct to * S3 via vended STS creds, so the server never re-validates the uploaded key — * the upload primitives (uploadFile / uploadSymlink) are the only shared choke * point, and they call this so a backslash key can never be stored again. */ export declare function toPosixKey(key: string): string; //# sourceMappingURL=posix-key.d.ts.map