@zero-transfer/sdk 0.4.6 → 0.4.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/dist/index.d.ts CHANGED
@@ -400,6 +400,10 @@ interface TlsProfile {
400
400
  * trust via `rejectUnauthorized`. Pinning is **recommended for production** when you control
401
401
  * the server and want defence-in-depth against rogue certificates issued by trusted CAs.
402
402
  *
403
+ * Cannot be combined with `rejectUnauthorized: false`: pin verification runs after the TLS
404
+ * handshake is accepted, so chain validation must stay enabled. Use `ca` for self-signed
405
+ * certificates.
406
+ *
403
407
  * @example "AA:BB:CC:DD:EE:FF:00:11:22:33:44:55:66:77:88:99:AA:BB:CC:DD:EE:FF:00:11:22:33:44:55:66:77:88:99"
404
408
  */
405
409
  pinnedFingerprint256?: string | readonly string[];
@@ -677,10 +681,42 @@ interface TransferBandwidthLimit {
677
681
  /** Optional burst allowance in bytes for token-bucket-style implementations. */
678
682
  burstBytes?: number;
679
683
  }
680
- /** Timeout policy applied by the transfer engine. */
684
+ /**
685
+ * Timeout policy applied by the transfer engine.
686
+ *
687
+ * Two timeout scopes exist with deliberately different failure semantics:
688
+ *
689
+ * - **Job scope** ({@link timeoutMs}): covers the full engine execution
690
+ * including retries. When it fires, the engine rethrows the
691
+ * {@link TimeoutError} immediately - the retry policy is never consulted.
692
+ * - **Attempt scope** ({@link attemptTimeoutMs} and {@link stallTimeoutMs}):
693
+ * covers a single attempt. When either fires, the per-attempt abort
694
+ * controller cancels the attempt and the resulting {@link TimeoutError}
695
+ * flows into the retry policy like any other attempt failure, so retryable
696
+ * timeouts are retried (with backoff) instead of failing the job.
697
+ *
698
+ * @example Retry stalled attempts, but never run longer than 10 minutes total
699
+ * ```ts
700
+ * await engine.execute(job, executor, {
701
+ * retry: createDefaultRetryPolicy(),
702
+ * timeout: { timeoutMs: 600_000, attemptTimeoutMs: 120_000, stallTimeoutMs: 30_000 },
703
+ * });
704
+ * ```
705
+ */
681
706
  interface TransferTimeoutPolicy {
682
707
  /** Maximum duration for the full engine execution, including retries, in milliseconds. */
683
708
  timeoutMs?: number;
709
+ /**
710
+ * Maximum duration for a single attempt in milliseconds. Expiry aborts only
711
+ * the active attempt; the failure flows into the retry policy.
712
+ */
713
+ attemptTimeoutMs?: number;
714
+ /**
715
+ * Maximum time without progress before an attempt is considered stalled, in
716
+ * milliseconds. The watchdog resets on every progress report; expiry aborts
717
+ * only the active attempt and the failure flows into the retry policy.
718
+ */
719
+ stallTimeoutMs?: number;
684
720
  /** Whether timeout failures are retryable. Defaults to `true`. */
685
721
  retryable?: boolean;
686
722
  }
@@ -805,15 +841,31 @@ interface TransferRetryDecisionInput {
805
841
  error: unknown;
806
842
  /** One-based attempt number that failed. */
807
843
  attempt: number;
844
+ /** Milliseconds elapsed since the engine execution started, including prior attempts and delays. */
845
+ elapsedMs: number;
808
846
  /** Job being executed. */
809
847
  job: TransferJob;
810
848
  }
811
- /** Retry policy for transfer execution. */
849
+ /**
850
+ * Retry policy for transfer execution.
851
+ *
852
+ * Use {@link createDefaultRetryPolicy} for a production-ready policy with
853
+ * exponential backoff, full jitter, and `Retry-After` support, or implement
854
+ * the hooks directly for full control.
855
+ */
812
856
  interface TransferRetryPolicy {
813
857
  /** Maximum total attempts, including the first attempt. Defaults to `1`. */
814
858
  maxAttempts?: number;
815
859
  /** Decides whether a failed attempt should be retried. Defaults to SDK retryability metadata. */
816
860
  shouldRetry?(input: TransferRetryDecisionInput): boolean;
861
+ /**
862
+ * Computes the delay before the next attempt in milliseconds.
863
+ *
864
+ * The engine sleeps for the returned duration with an abort-aware timer:
865
+ * cancelling the job during the delay rejects immediately instead of
866
+ * waiting out the backoff. Non-positive or missing values retry at once.
867
+ */
868
+ getDelayMs?(input: TransferRetryDecisionInput): number;
817
869
  /** Observes retry decisions before the next attempt starts. */
818
870
  onRetry?(input: TransferRetryDecisionInput): void;
819
871
  }
@@ -847,7 +899,12 @@ interface TransferEngineOptions {
847
899
  *
848
900
  * @example Execute a single job with a custom executor
849
901
  * ```ts
850
- * import { TransferEngine, type TransferExecutor, type TransferJob } from "@zero-transfer/sdk";
902
+ * import {
903
+ * TransferEngine,
904
+ * createDefaultRetryPolicy,
905
+ * type TransferExecutor,
906
+ * type TransferJob,
907
+ * } from "@zero-transfer/sdk";
851
908
  *
852
909
  * const engine = new TransferEngine();
853
910
  *
@@ -865,7 +922,8 @@ interface TransferEngineOptions {
865
922
  * };
866
923
  *
867
924
  * const receipt = await engine.execute(job, executor, {
868
- * retry: { maxAttempts: 3, baseDelayMs: 250 },
925
+ * retry: createDefaultRetryPolicy(),
926
+ * timeout: { stallTimeoutMs: 30_000 },
869
927
  * });
870
928
  * console.log(receipt.attempts.length); // 1 on success
871
929
  * ```
@@ -1087,6 +1145,40 @@ declare class ProviderRegistry {
1087
1145
  listCapabilities(): CapabilitySet[];
1088
1146
  }
1089
1147
 
1148
+ /**
1149
+ * Client-level execution defaults applied when a call site does not supply
1150
+ * its own value.
1151
+ *
1152
+ * Defaults are consumed by {@link runRoute}, the one-shot helpers
1153
+ * ({@link uploadFile}, {@link downloadFile}, {@link copyBetween}),
1154
+ * {@link TransferQueue} (via its `client` option), and scheduled routes fired
1155
+ * through {@link MftScheduler}. The {@link TransferEngine} primitive stays
1156
+ * fully explicit: defaults never reach `engine.execute()` directly.
1157
+ *
1158
+ * Per-call options always win over client defaults.
1159
+ *
1160
+ * Additional default slots (`verify`, `resume`, `compression`, `policy`) land
1161
+ * here as their features ship in later releases; the shape is additive.
1162
+ *
1163
+ * @example Resilient defaults for every transfer in an application
1164
+ * ```ts
1165
+ * import { createDefaultRetryPolicy, createTransferClient } from "@zero-transfer/sdk";
1166
+ *
1167
+ * const client = createTransferClient({
1168
+ * providers: [createSftpProviderFactory(), createS3ProviderFactory()],
1169
+ * defaults: {
1170
+ * retry: createDefaultRetryPolicy(),
1171
+ * timeout: { stallTimeoutMs: 30_000 },
1172
+ * },
1173
+ * });
1174
+ * ```
1175
+ */
1176
+ interface TransferClientDefaults {
1177
+ /** Default retry policy for transfers executed through this client. */
1178
+ retry?: TransferRetryPolicy;
1179
+ /** Default timeout policy for transfers executed through this client. */
1180
+ timeout?: TransferTimeoutPolicy;
1181
+ }
1090
1182
  /** Options used to create a provider-neutral transfer client. */
1091
1183
  interface TransferClientOptions {
1092
1184
  /** Existing registry to reuse. When omitted, a fresh empty registry is created. */
@@ -1095,16 +1187,20 @@ interface TransferClientOptions {
1095
1187
  providers?: ProviderFactory[];
1096
1188
  /** Structured logger used for client lifecycle records. */
1097
1189
  logger?: ZeroTransferLogger;
1190
+ /** Execution defaults applied when call sites omit their own values. */
1191
+ defaults?: TransferClientDefaults;
1098
1192
  }
1099
1193
  /** Small provider-neutral client that owns provider lookup and connection setup. */
1100
1194
  declare class TransferClient {
1101
1195
  /** Provider registry used by this client. */
1102
1196
  readonly registry: ProviderRegistry;
1197
+ /** Execution defaults applied when call sites omit their own values. */
1198
+ readonly defaults?: TransferClientDefaults;
1103
1199
  private readonly logger;
1104
1200
  /**
1105
1201
  * Creates a transfer client without opening any provider connections.
1106
1202
  *
1107
- * @param options - Optional registry, provider factories, and logger.
1203
+ * @param options - Optional registry, provider factories, logger, and execution defaults.
1108
1204
  */
1109
1205
  constructor(options?: TransferClientOptions);
1110
1206
  /**
@@ -1438,11 +1534,11 @@ interface RunRouteOptions {
1438
1534
  now?: () => Date;
1439
1535
  /** Abort signal used to cancel the route execution. */
1440
1536
  signal?: AbortSignal;
1441
- /** Retry policy forwarded to the engine. */
1537
+ /** Retry policy forwarded to the engine. Falls back to `client.defaults.retry`. */
1442
1538
  retry?: TransferRetryPolicy;
1443
1539
  /** Progress observer forwarded to the engine. */
1444
1540
  onProgress?: (event: TransferProgressEvent) => void;
1445
- /** Timeout policy forwarded to the engine. */
1541
+ /** Timeout policy forwarded to the engine. Falls back to `client.defaults.timeout`. */
1446
1542
  timeout?: TransferTimeoutPolicy;
1447
1543
  /** Optional bandwidth limit forwarded to the engine. */
1448
1544
  bandwidthLimit?: TransferBandwidthLimit;
@@ -1464,7 +1560,12 @@ interface RunRouteOptions {
1464
1560
  *
1465
1561
  * @example Run a pre-built route with progress + retry
1466
1562
  * ```ts
1467
- * import { createTransferClient, runRoute, type MftRoute } from "@zero-transfer/sdk";
1563
+ * import {
1564
+ * createDefaultRetryPolicy,
1565
+ * createTransferClient,
1566
+ * runRoute,
1567
+ * type MftRoute,
1568
+ * } from "@zero-transfer/sdk";
1468
1569
  *
1469
1570
  * const route: MftRoute = {
1470
1571
  * id: "nightly-export",
@@ -1483,7 +1584,7 @@ interface RunRouteOptions {
1483
1584
  * client,
1484
1585
  * route,
1485
1586
  * onProgress: (e) => console.log(`${e.bytesTransferred}/${e.totalBytes ?? "?"}`),
1486
- * retry: { maxAttempts: 3, baseDelayMs: 500 },
1587
+ * retry: createDefaultRetryPolicy({ maxAttempts: 3 }),
1487
1588
  * });
1488
1589
  * console.log(`Job ${receipt.jobId} moved ${receipt.bytesTransferred} bytes…`);
1489
1590
  * ```
@@ -2271,6 +2372,12 @@ interface HttpProviderOptions {
2271
2372
  fetch?: HttpFetch;
2272
2373
  /** Default headers applied to every request. */
2273
2374
  defaultHeaders?: Record<string, string>;
2375
+ /**
2376
+ * Rejects factory creation when the transport is cleartext `http`. Defaults
2377
+ * to `false`, where connecting with credentials over cleartext emits a
2378
+ * process `SecurityWarning` instead of failing.
2379
+ */
2380
+ enforceHttps?: boolean;
2274
2381
  }
2275
2382
  /**
2276
2383
  * Creates a provider factory backed by HTTP(S) GET/HEAD.
@@ -2329,20 +2436,26 @@ interface WebDavProviderOptions {
2329
2436
  fetch?: HttpFetch;
2330
2437
  /** Default headers applied to every request. */
2331
2438
  defaultHeaders?: Record<string, string>;
2439
+ /**
2440
+ * Rejects factory creation when the transport is cleartext `http`. Defaults
2441
+ * to `false`, where connecting with credentials over cleartext emits a
2442
+ * process `SecurityWarning` instead of failing.
2443
+ */
2444
+ enforceHttps?: boolean;
2332
2445
  /**
2333
2446
  * Streaming policy for `PUT` request bodies.
2334
2447
  *
2335
- * - `"when-known-size"` (default) - stream when the caller declares
2336
- * `request.totalBytes` (an explicit `Content-Length` is sent so all
2337
- * WebDAV servers accept the upload); otherwise buffer the entire body in
2338
- * memory before sending. This is the safe default that does not require
2339
- * the server to accept HTTP/1.1 chunked transfer-encoding.
2340
- * - `"always"` - always stream the body, even when the size is unknown
2341
- * (the runtime will use chunked transfer-encoding). Some legacy WebDAV
2342
- * servers reject `Transfer-Encoding: chunked` and will respond `411
2343
- * Length Required` or `501 Not Implemented`; only enable this for
2344
- * servers known to accept chunked uploads (modern Apache/nginx, IIS
2345
- * with chunked transfer enabled, Nextcloud, ownCloud, sabre/dav).
2448
+ * - `"always"` (default since 0.5) - always stream the body so memory use
2449
+ * stays bounded regardless of payload size. When the caller declares
2450
+ * `request.totalBytes` an explicit `Content-Length` is still sent (no
2451
+ * chunked encoding); only unknown-size uploads fall back to HTTP/1.1
2452
+ * chunked transfer-encoding. Some legacy WebDAV servers reject
2453
+ * `Transfer-Encoding: chunked` and respond `411 Length Required` or
2454
+ * `501 Not Implemented`; point those at `"when-known-size"`.
2455
+ * - `"when-known-size"` (default before 0.5) - stream only when
2456
+ * `request.totalBytes` is known; unknown-size bodies are buffered
2457
+ * entirely in memory so a `Content-Length` can always be sent. Use for
2458
+ * servers that require a declared length on every upload.
2346
2459
  * - `"never"` - always buffer (legacy behaviour pre-0.4.0). Use for
2347
2460
  * maximum compatibility at the cost of memory.
2348
2461
  */
@@ -2407,7 +2520,7 @@ interface S3ProviderOptions {
2407
2520
  defaultHeaders?: Record<string, string>;
2408
2521
  /** Optional STS session token applied to every request. */
2409
2522
  sessionToken?: SecretSource;
2410
- /** Multipart upload tuning. Disabled by default; enable for objects above ~5 GiB or when streaming. */
2523
+ /** Multipart upload tuning. Enabled by default; see {@link S3MultipartOptions.enabled}. */
2411
2524
  multipart?: S3MultipartOptions;
2412
2525
  }
2413
2526
  /** Multipart upload tuning for the S3 provider. */
@@ -2417,8 +2530,11 @@ interface S3MultipartOptions {
2417
2530
  * in fixed-size parts instead of being buffered in memory before a single
2418
2531
  * `PUT`. Payloads at or below {@link S3MultipartOptions.thresholdBytes}
2419
2532
  * still fall back to a single-shot `PUT` automatically. Set to `false` to
2420
- * force the legacy single-shot behaviour (e.g. when targeting an
2421
- * S3-compatible endpoint that does not support `CreateMultipartUpload`).
2533
+ * force single-shot behaviour (e.g. when targeting an S3-compatible
2534
+ * endpoint that does not support `CreateMultipartUpload`). Single-shot
2535
+ * uploads stream with `UNSIGNED-PAYLOAD` signing when the total size is
2536
+ * known; S3 requires a `Content-Length` up front, so unknown-size payloads
2537
+ * are buffered entirely in memory on this path.
2422
2538
  */
2423
2539
  enabled?: boolean;
2424
2540
  /** Object size threshold in bytes above which multipart is used. Defaults to 8 MiB. */
@@ -2774,8 +2890,13 @@ interface FileZillaSite {
2774
2890
  folder: readonly string[];
2775
2891
  /** Generated connection profile. */
2776
2892
  profile: ConnectionProfile;
2777
- /** Encoded password value retained from the file, if any. */
2778
- password?: string;
2893
+ /**
2894
+ * Whether the FileZilla entry stored a password. The importer never decodes
2895
+ * or returns stored passwords; supply the credential via a
2896
+ * {@link ConnectionProfile.password | SecretSource} (for example
2897
+ * `{ env: "SITE_PASSWORD" }` or `{ path: "./secret" }`) before connecting.
2898
+ */
2899
+ hasStoredPassword: boolean;
2779
2900
  /** Logon type code preserved from the file (`0`=anonymous, `1`=normal, etc.). */
2780
2901
  logonType?: number;
2781
2902
  }
@@ -2832,16 +2953,6 @@ interface ImportWinScpSessionsResult {
2832
2953
  */
2833
2954
  declare function importWinScpSessions(ini: string): ImportWinScpSessionsResult;
2834
2955
 
2835
- /**
2836
- * Structured ZeroTransfer error hierarchy.
2837
- *
2838
- * The classes in this module preserve protocol details, retryability, command/path
2839
- * context, and machine-readable codes so application code does not need to parse
2840
- * human error messages.
2841
- *
2842
- * @module errors/ZeroTransferError
2843
- */
2844
-
2845
2956
  /**
2846
2957
  * Complete set of fields required to create a ZeroTransfer error.
2847
2958
  */
@@ -2907,6 +3018,11 @@ declare class ZeroTransferError extends Error {
2907
3018
  /**
2908
3019
  * Serializes the error into a plain object suitable for logs or API responses.
2909
3020
  *
3021
+ * `details` and `command` are passed through secret redaction so serialized
3022
+ * errors never leak credentials, signed URLs, or raw protocol commands. The
3023
+ * live {@link ZeroTransferError.details | details} property stays unredacted
3024
+ * for programmatic consumers.
3025
+ *
2910
3026
  * @returns A JSON-safe object containing public structured error fields.
2911
3027
  */
2912
3028
  toJSON(): Record<string, unknown>;
@@ -3110,6 +3226,32 @@ declare function redactValue(value: unknown): unknown;
3110
3226
  * @returns A shallow object copy with sensitive fields and nested secrets redacted.
3111
3227
  */
3112
3228
  declare function redactObject(input: Record<string, unknown>): Record<string, unknown>;
3229
+ /**
3230
+ * Strips credentials and query/fragment content from a URL before logging.
3231
+ *
3232
+ * Query strings routinely carry bearer material - SigV4 `X-Amz-Signature`
3233
+ * values, SAS tokens, signed-URL parameters - so the entire search and hash
3234
+ * segments are replaced rather than filtered key-by-key. Embedded
3235
+ * `user:password@` userinfo is removed. Origin and pathname are preserved
3236
+ * because they are what operators need to correlate a failing request.
3237
+ *
3238
+ * @param url - Absolute URL string or `URL` instance to sanitize.
3239
+ * @returns A loggable URL string, or {@link REDACTED} when the value cannot be
3240
+ * parsed as a URL (an unparsable value may still embed credentials).
3241
+ */
3242
+ declare function redactUrlForLogging(url: string | URL): string;
3243
+ /**
3244
+ * Converts an arbitrary thrown value into a JSON-safe, secret-free record.
3245
+ *
3246
+ * Structured SDK errors are serialized through their `toJSON()` (which already
3247
+ * redacts details); plain errors contribute name/message/stack-free context;
3248
+ * other values are stringified. Use this at every internal log site that
3249
+ * records a caught error.
3250
+ *
3251
+ * @param error - Caught value of unknown shape.
3252
+ * @returns A redacted, JSON-safe object describing the error.
3253
+ */
3254
+ declare function redactErrorForLogging(error: unknown): Record<string, unknown>;
3113
3255
 
3114
3256
  /** Algorithm lists exchanged during SSH KEXINIT negotiation. */
3115
3257
  interface SshAlgorithmPreferences {
@@ -3710,7 +3852,7 @@ interface RunSshCommandResult {
3710
3852
  * stdout, and disconnects. The TCP socket, transport, auth session, and
3711
3853
  * channel are all owned by this helper and torn down before it returns.
3712
3854
  *
3713
- * @example Run `uname -a` with a password credential
3855
+ * @example Run uname -a with a password credential
3714
3856
  * ```ts
3715
3857
  * import { runSshCommand } from "@zero-transfer/ssh";
3716
3858
  *
@@ -4123,7 +4265,7 @@ declare class SftpSession {
4123
4265
  }
4124
4266
 
4125
4267
  /**
4126
- * Options for {@link createNativeSftpProviderFactory}.
4268
+ * Options for {@link createSftpProviderFactory}.
4127
4269
  *
4128
4270
  * The native provider is a zero-dependency replacement for the legacy
4129
4271
  * `ssh2`-backed provider. It implements RFC 4253 SSH transport, RFC 4252 user
@@ -4131,7 +4273,7 @@ declare class SftpSession {
4131
4273
  * Ed25519/RSA), RFC 5656 ECDSA host keys (`nistp256/384/521`), and the
4132
4274
  * SFTP v3 client protocol multiplexed over a single channel.
4133
4275
  */
4134
- interface NativeSftpProviderOptions {
4276
+ interface SftpProviderOptions {
4135
4277
  /**
4136
4278
  * Default connection timeout in milliseconds when the profile omits
4137
4279
  * `timeoutMs`. Bounds both the TCP connect *and* the SSH identification +
@@ -4162,7 +4304,7 @@ interface NativeSftpProviderOptions {
4162
4304
  * advanced extension. Most applications should use the
4163
4305
  * {@link TransferSession} returned from `client.connect()` instead.
4164
4306
  */
4165
- interface NativeSftpRawSession {
4307
+ interface SftpRawSession {
4166
4308
  /** SFTP v3 client multiplexed over the SSH session channel. */
4167
4309
  sftp: SftpSession;
4168
4310
  /** Underlying SSH transport (key exchange, packet protection, channel mux). */
@@ -4201,7 +4343,7 @@ interface NativeSftpRawSession {
4201
4343
  * @example
4202
4344
  * ```ts
4203
4345
  * const client = createTransferClient({
4204
- * providers: [createNativeSftpProviderFactory({
4346
+ * providers: [createSftpProviderFactory({
4205
4347
  * readyTimeoutMs: 10_000,
4206
4348
  * keepaliveIntervalMs: 30_000,
4207
4349
  * })],
@@ -4217,7 +4359,7 @@ interface NativeSftpRawSession {
4217
4359
  * });
4218
4360
  * ```
4219
4361
  */
4220
- declare function createNativeSftpProviderFactory(options?: NativeSftpProviderOptions): ProviderFactory;
4362
+ declare function createSftpProviderFactory(options?: SftpProviderOptions): ProviderFactory;
4221
4363
 
4222
4364
  /**
4223
4365
  * Transfer result and progress calculation helpers.
@@ -4329,6 +4471,73 @@ declare function createBandwidthThrottle(limit: TransferBandwidthLimit | undefin
4329
4471
  */
4330
4472
  declare function throttleByteIterable(source: AsyncIterable<Uint8Array>, throttle: BandwidthThrottle | undefined, signal?: AbortSignal): AsyncIterable<Uint8Array>;
4331
4473
 
4474
+ /** Options for {@link createDefaultRetryPolicy}. */
4475
+ interface DefaultRetryPolicyOptions {
4476
+ /** Maximum total attempts, including the first attempt. Defaults to `4`. */
4477
+ maxAttempts?: number;
4478
+ /** Base backoff delay before jitter in milliseconds. Defaults to `250`. */
4479
+ baseDelayMs?: number;
4480
+ /** Upper bound for a single computed backoff delay in milliseconds. Defaults to `30_000`. */
4481
+ maxDelayMs?: number;
4482
+ /**
4483
+ * Total elapsed-time budget across all attempts and delays in milliseconds.
4484
+ * Once exceeded, no further retries are attempted. Defaults to `300_000` (5 minutes).
4485
+ */
4486
+ maxElapsedMs?: number;
4487
+ /**
4488
+ * Random source in `[0, 1)` used for jitter. Defaults to `Math.random`.
4489
+ * Inject a deterministic source in tests.
4490
+ */
4491
+ random?: () => number;
4492
+ }
4493
+ /**
4494
+ * Creates the SDK's recommended retry policy for transfer execution.
4495
+ *
4496
+ * The policy retries only failures the SDK has marked as safe to retry
4497
+ * (`error.retryable === true` on a {@link ZeroTransferError}), backing off
4498
+ * exponentially with full jitter: each delay is drawn uniformly from
4499
+ * `[0, min(maxDelayMs, baseDelayMs * 2^(attempt - 1)))`, the schedule that
4500
+ * minimizes contention when many clients retry against the same server.
4501
+ *
4502
+ * Server pacing hints are honored: when the failed attempt carries
4503
+ * `details.retryAfterMs` (parsed from an HTTP `Retry-After` header on 429/503
4504
+ * responses by the web-family providers), the next delay is exactly that
4505
+ * value rather than the jittered backoff. A hint that does not fit in the
4506
+ * remaining `maxElapsedMs` budget stops retrying instead of retrying early.
4507
+ *
4508
+ * Retries also stop once `maxElapsedMs` has elapsed since execution started,
4509
+ * regardless of how many attempts remain.
4510
+ *
4511
+ * @param options - Optional overrides for attempts, delays, and the elapsed budget.
4512
+ * @returns A {@link TransferRetryPolicy} for {@link TransferEngine.execute},
4513
+ * {@link runRoute}, {@link TransferQueue}, or client-level defaults.
4514
+ *
4515
+ * @example Default policy on a one-shot helper
4516
+ * ```ts
4517
+ * import { createDefaultRetryPolicy, uploadFile } from "@zero-transfer/sdk";
4518
+ *
4519
+ * await uploadFile({
4520
+ * client,
4521
+ * destination: { path: "/uploads/report.csv", profile },
4522
+ * localPath: "./out/report.csv",
4523
+ * retry: createDefaultRetryPolicy(),
4524
+ * });
4525
+ * ```
4526
+ *
4527
+ * @example Tighter schedule for latency-sensitive work
4528
+ * ```ts
4529
+ * const retry = createDefaultRetryPolicy({
4530
+ * maxAttempts: 3,
4531
+ * baseDelayMs: 100,
4532
+ * maxDelayMs: 2_000,
4533
+ * maxElapsedMs: 15_000,
4534
+ * });
4535
+ * ```
4536
+ *
4537
+ * @see {@link TransferRetryPolicy} for the underlying hook contract.
4538
+ */
4539
+ declare function createDefaultRetryPolicy(options?: DefaultRetryPolicyOptions): TransferRetryPolicy;
4540
+
4332
4541
  /**
4333
4542
  * Transfer executor bridge for provider-backed read/write sessions.
4334
4543
  *
@@ -4484,6 +4693,12 @@ declare function summarizeTransferPlan(plan: TransferPlan): TransferPlanSummary;
4484
4693
  /** Converts executable plan steps into transfer jobs while preserving order. */
4485
4694
  declare function createTransferJobsFromPlan(plan: TransferPlan): TransferJob[];
4486
4695
 
4696
+ /**
4697
+ * Transfer queue primitives built on top of {@link TransferEngine}.
4698
+ *
4699
+ * @module transfers/TransferQueue
4700
+ */
4701
+
4487
4702
  /** Queue item lifecycle state. */
4488
4703
  type TransferQueueItemStatus = "queued" | "running" | "completed" | "failed" | "canceled";
4489
4704
  /** Resolver used when jobs do not provide an executor at enqueue time. */
@@ -4492,15 +4707,20 @@ type TransferQueueExecutorResolver = (job: TransferJob) => TransferExecutor;
4492
4707
  interface TransferQueueOptions {
4493
4708
  /** Transfer engine used to execute queued jobs. Defaults to a new engine. */
4494
4709
  engine?: TransferEngine;
4710
+ /**
4711
+ * Transfer client whose {@link TransferClientDefaults | defaults} seed the
4712
+ * queue's retry and timeout policies when not set here or per drain.
4713
+ */
4714
+ client?: TransferClient;
4495
4715
  /** Maximum jobs to execute at the same time. Defaults to `1`. */
4496
4716
  concurrency?: number;
4497
4717
  /** Default executor used for jobs that do not provide one directly. */
4498
4718
  executor?: TransferExecutor;
4499
4719
  /** Dynamic executor resolver used when no per-job executor or default executor exists. */
4500
4720
  resolveExecutor?: TransferQueueExecutorResolver;
4501
- /** Retry policy passed to engine executions. */
4721
+ /** Retry policy passed to engine executions. Falls back to `client.defaults.retry`. */
4502
4722
  retry?: TransferRetryPolicy;
4503
- /** Timeout policy passed to engine executions. */
4723
+ /** Timeout policy passed to engine executions. Falls back to `client.defaults.timeout`. */
4504
4724
  timeout?: TransferTimeoutPolicy;
4505
4725
  /** Optional throughput limit shape passed to transfer executors. */
4506
4726
  bandwidthLimit?: TransferBandwidthLimit;
@@ -5547,7 +5767,7 @@ declare function summarizeError(error: unknown): {
5547
5767
 
5548
5768
  /** Webhook destination. */
5549
5769
  interface WebhookTarget {
5550
- /** Absolute HTTP(S) URL that receives `POST` deliveries. */
5770
+ /** Absolute `https:` URL that receives `POST` deliveries. */
5551
5771
  url: string;
5552
5772
  /** Additional headers merged into every request. */
5553
5773
  headers?: Record<string, string>;
@@ -5555,6 +5775,12 @@ interface WebhookTarget {
5555
5775
  secret?: string;
5556
5776
  /** Audit entry types to deliver. Defaults to all types. */
5557
5777
  types?: readonly MftAuditEntry["type"][];
5778
+ /**
5779
+ * Permits plain `http:` delivery. Defaults to `false`, which rejects
5780
+ * cleartext URLs because audit payloads (and the HMAC timestamp/signature
5781
+ * headers) would cross the network unencrypted.
5782
+ */
5783
+ allowInsecureUrl?: boolean;
5558
5784
  }
5559
5785
  /** Retry policy for webhook deliveries. */
5560
5786
  interface WebhookRetryPolicy {
@@ -5610,6 +5836,8 @@ declare function signWebhookPayload(payload: string, secret: string, timestamp?:
5610
5836
  *
5611
5837
  * @param options - Target, payload, fetch impl, retry policy, abort signal.
5612
5838
  * @returns The delivery outcome.
5839
+ * @throws {@link ConfigurationError} When the target URL is not absolute or
5840
+ * uses cleartext `http:` without `allowInsecureUrl: true`.
5613
5841
  */
5614
5842
  declare function dispatchWebhook(options: DispatchWebhookOptions): Promise<DispatchWebhookResult>;
5615
5843
  /** Options accepted by {@link createWebhookAuditLog}. */
@@ -5927,6 +6155,17 @@ declare class ApprovalRejectedError extends ZeroTransferError {
5927
6155
  */
5928
6156
  constructor(request: ApprovalRequest);
5929
6157
  }
6158
+ /** Error raised when an approval request is not resolved within its timeout window. */
6159
+ declare class ApprovalTimeoutError extends ZeroTransferError {
6160
+ readonly request: ApprovalRequest;
6161
+ /**
6162
+ * Creates an approval timeout error.
6163
+ *
6164
+ * @param request - The approval request that timed out while pending.
6165
+ * @param timeoutMs - Configured timeout window in milliseconds.
6166
+ */
6167
+ constructor(request: ApprovalRequest, timeoutMs: number);
6168
+ }
5930
6169
  /** In-memory approval registry. */
5931
6170
  declare class ApprovalRegistry {
5932
6171
  private readonly requests;
@@ -5993,17 +6232,27 @@ interface CreateApprovalGateOptions {
5993
6232
  now?: () => Date;
5994
6233
  /** Observer fired when a new approval request is created. */
5995
6234
  onRequested?: (request: ApprovalRequest) => void;
6235
+ /**
6236
+ * Maximum time in milliseconds an approval may stay pending. When the window
6237
+ * elapses the request is rejected with reason `"timeout"` and the gated run
6238
+ * fails with a typed {@link ApprovalTimeoutError}. Unset means wait forever.
6239
+ */
6240
+ timeoutMs?: number;
5996
6241
  }
5997
6242
  /**
5998
6243
  * Wraps a route runner with an approval gate.
5999
6244
  *
6000
6245
  * The returned runner creates an approval request, waits for resolution, and
6001
6246
  * dispatches the underlying runner only when the request is approved. Rejection
6002
- * surfaces an {@link ApprovalRejectedError}. Pair with {@link MftScheduler} to
6003
- * implement two-person rules and human-in-the-loop release flows.
6247
+ * surfaces an {@link ApprovalRejectedError}; an unresolved request that exceeds
6248
+ * `timeoutMs` surfaces an {@link ApprovalTimeoutError}. Pair with
6249
+ * {@link MftScheduler} to implement two-person rules and human-in-the-loop
6250
+ * release flows.
6004
6251
  *
6005
6252
  * @param options - Registry, downstream runner, approval-id derivation, hooks.
6006
6253
  * @returns A {@link ScheduleRouteRunner} that gates execution behind approval.
6254
+ * @throws {@link ApprovalTimeoutError} From the returned runner when the
6255
+ * request stays pending longer than `timeoutMs`.
6007
6256
  *
6008
6257
  * @example Two-person rule on a release route
6009
6258
  * ```ts
@@ -6069,10 +6318,14 @@ declare function nextCronFireAt(expression: CronExpression, from: Date, timezone
6069
6318
  /**
6070
6319
  * Validates that an FTP command argument cannot inject additional command lines.
6071
6320
  *
6321
+ * NUL bytes are rejected alongside CR/LF: C-string-based servers and filesystem
6322
+ * APIs truncate at the first NUL, which lets a crafted path smuggle a different
6323
+ * effective target past validation.
6324
+ *
6072
6325
  * @param value - Argument value to validate.
6073
6326
  * @param label - Human-readable argument label used in error messages.
6074
6327
  * @returns The original value when it is safe.
6075
- * @throws {@link ConfigurationError} When the value contains CR or LF characters.
6328
+ * @throws {@link ConfigurationError} When the value contains CR, LF, or NUL characters.
6076
6329
  */
6077
6330
  declare function assertSafeFtpArgument(value: string, label?: string): string;
6078
6331
  /**
@@ -6080,7 +6333,7 @@ declare function assertSafeFtpArgument(value: string, label?: string): string;
6080
6333
  *
6081
6334
  * @param input - Remote path that may contain duplicate separators or dot segments.
6082
6335
  * @returns A normalized remote path, `/` for absolute root, or `.` for an empty relative path.
6083
- * @throws {@link ConfigurationError} When the input contains unsafe CR or LF characters.
6336
+ * @throws {@link ConfigurationError} When the input contains unsafe CR, LF, or NUL characters.
6084
6337
  */
6085
6338
  declare function normalizeRemotePath(input: string): string;
6086
6339
  /**
@@ -6106,4 +6359,4 @@ declare function basenameRemotePath(input: string): string;
6106
6359
  */
6107
6360
  declare function isMainModule(importMetaUrl: string): boolean;
6108
6361
 
6109
- export { AbortError, type AgeRetentionPolicy, ApprovalRegistry, ApprovalRejectedError, type ApprovalRequest, type ApprovalStatus, type AtomicDeployActivateOperation, type AtomicDeployActivateStep, type AtomicDeployPlan, type AtomicDeployPruneStep, type AtomicDeployStrategy, type AuthenticationCapability, AuthenticationError, AuthorizationError, type AzureBlobMultipartOptions, type AzureBlobProviderOptions, type BandwidthSleep, type BandwidthThrottle, type BandwidthThrottleOptions, type Base64EnvSecretSource, type BuiltInProviderId, type BuiltinCapabilityMatrixEntry, type BuiltinProviderMatrixId, CLASSIC_PROVIDER_IDS, type CapabilitySet, type ChecksumCapability, type ClassicProviderId, type ClientDiagnostics, type CompareRemoteManifestsOptions, ConfigurationError, type ConnectionDiagnosticTimings, type ConnectionDiagnosticsResult, ConnectionError, type ConnectionPoolOptions, type ConnectionProfile, type ConventionEndpoint, type CopyBetweenOptions, type CountRetentionPolicy, type CreateApprovalGateOptions, type CreateAtomicDeployPlanOptions, type CreateInboxRouteOptions, type CreateOutboxRouteOptions, type CreateRemoteBrowserOptions, type CreateRemoteManifestOptions, type CreateSyncPlanOptions, type CreateWebhookAuditLogOptions, type CronExpression, type CronField, type CronScheduleTrigger, DEFAULT_FAILED_SUBDIR, DEFAULT_PROCESSED_SUBDIR, DEFAULT_SSH_ALGORITHM_PREFERENCES, type DiffRemoteTreesOptions, type DispatchWebhookOptions, type DispatchWebhookResult, type DownloadFileOptions, type DropboxProviderOptions, type EnvSecretSource, type EvaluateRetentionOptions, type FileSecretSource, type FileSystemS3MultipartResumeStoreOptions, type FileZillaSite, type FriendlyTransferOptions, type FtpFeatures, type FtpPassiveHostStrategy, type FtpProviderOptions, type FtpReplyErrorInput, type FtpResponse, FtpResponseParser, type FtpResponseStatus, type FtpsDataProtection, type FtpsMode, type FtpsProviderOptions, type GcsMultipartOptions, type GcsProviderOptions, type GoogleDriveProviderOptions, type HttpFetch, type HttpProviderOptions, type ImportFileZillaSitesResult, type ImportOpenSshConfigOptions, type ImportOpenSshConfigResult, type ImportWinScpSessionsResult, InMemoryAuditLog, type IntervalScheduleTrigger, type JsonlWriter, type KnownHostsEntry, type KnownHostsMarker, type ListOptions, type LocalProviderOptions, type LogLevel, type LogRecord, type LogRecordInput, type LoggerMethod, type MemoryProviderEntry, type MemoryProviderOptions, type MetadataCapability, type MftAuditEntry, type MftAuditEntryType, type MftAuditLog, type MftInboxConvention, type MftOutboxConvention, type MftRoute, type MftRouteEndpoint, type MftRouteFilter, type MftRouteOperation, type MftSchedule, type MftScheduleTrigger, MftScheduler, type MftSchedulerOptions, type MkdirOptions, type NativeSftpProviderOptions, type NativeSftpRawSession, type NegotiatedSshAlgorithms, type OAuthAccessToken, type OAuthRefreshCallback, type OAuthTokenSecretSourceOptions, type OneDriveMultipartOptions, type OneDriveProviderOptions, type OpenSshConfigEntry, ParseError, PathAlreadyExistsError, PathNotFoundError, PermissionDeniedError, type PooledTransferClient, type ProgressEventInput, ProtocolError, type AuthenticationCapability as ProviderAuthenticationCapability, type CapabilitySet as ProviderCapabilities, type ChecksumCapability as ProviderChecksumCapability, type ProviderFactory, type ProviderId, type MetadataCapability as ProviderMetadataCapability, ProviderRegistry, type ProviderSelection, type ProviderTransferEndpointRole, type ProviderTransferExecutorOptions, type ProviderTransferOperations, type ProviderTransferReadRequest, type ProviderTransferReadResult, type ProviderTransferRequest, type ProviderTransferSessionResolver, type ProviderTransferSessionResolverInput, type ProviderTransferWriteRequest, type ProviderTransferWriteResult, REDACTED, REMOTE_MANIFEST_FORMAT_VERSION, type RemoteBreadcrumb, type RemoteBrowser, type RemoteBrowserFilter, type RemoteBrowserSnapshot, type RemoteEntry, type RemoteEntrySortKey, type RemoteEntrySortOrder, type RemoteEntryType, type RemoteFileAdapter, type RemoteFileEndpoint, type RemoteFileSystem, type RemoteManifest, type RemoteManifestEntry, type RemotePermissions, type RemoteProtocol, type RemoteStat, type RemoteTreeDiff, type RemoteTreeDiffEntry, type RemoteTreeDiffReason, type RemoteTreeDiffStatus, type RemoteTreeDiffSummary, type RemoteTreeEntry, type RemoteTreeFilter, type RemoveOptions, type RenameOptions, type ResolveSecretOptions, type ResolvedConnectionProfile, type ResolvedOpenSshHost, type ResolvedSshProfile, type ResolvedTlsProfile, type RetentionEvaluation, type RetentionPolicy, type RmdirOptions, RouteRegistry, type RunConnectionDiagnosticsOptions, type RunRouteOptions, type RunSshCommandOptions, type RunSshCommandResult, type S3MultipartCheckpoint, type S3MultipartOptions, type S3MultipartPart, type S3MultipartResumeKey, type S3MultipartResumeStore, type S3ProviderOptions, ScheduleRegistry, type ScheduleRouteRunner, type ScheduleTimerHooks, type SecretProvider, type SecretSource, type SecretValue, type NativeSftpProviderOptions as SftpProviderOptions, type NativeSftpRawSession as SftpRawSession, type SpecializedErrorDetails, type SshAgentSource, type SshAlgorithmPreferences, type SshAlgorithms, SshAuthSession, SshConnectionManager, SshDataReader, SshDataWriter, SshDisconnectReason, type SshKeyboardInteractiveChallenge, type SshKeyboardInteractiveCredential, type SshKeyboardInteractiveHandler, type SshKeyboardInteractivePrompt, type SshKnownHostsSource, type SshPasswordCredential, type SshProfile, type SshPublickeyCredential, SshSessionChannel, type SshSocketFactory, type SshSocketFactoryContext, SshTransportConnection, type SshTransportConnectionOptions, SshTransportHandshake, type SshTransportHandshakeResult, type StatOptions, type SyncConflictPolicy, type SyncDeletePolicy, type SyncDirection, type SyncEndpointInput, TimeoutError, type TlsProfile, type TlsSecretSource, type TransferAttempt, type TransferAttemptError, type TransferBandwidthLimit, type TransferByteRange, TransferClient, type TransferClientOptions, type TransferDataChunk, type TransferDataSource, type TransferEndpoint, TransferEngine, type TransferEngineExecuteOptions, type TransferEngineOptions, TransferError, type TransferExecutionContext, type TransferExecutionResult, type TransferExecutor, type TransferJob, type TransferOperation, type TransferPlan, type TransferPlanAction, type TransferPlanInput, type TransferPlanStep, type TransferPlanSummary, type TransferProgressEvent, type TransferProvider, TransferQueue, type TransferQueueExecutorResolver, type TransferQueueItem, type TransferQueueItemStatus, type TransferQueueOptions, type TransferQueueRunOptions, type TransferQueueSummary, type TransferReceipt, type TransferResult, type TransferResultInput, type TransferRetryDecisionInput, type TransferRetryPolicy, type TransferSession, type TransferTimeoutPolicy, type TransferVerificationResult, UnsupportedFeatureError, type UploadFileOptions, type ValueSecretSource, VerificationError, type WalkRemoteTreeOptions, type WebDavProviderOptions, type WebhookRetryPolicy, type WebhookSignature, type WebhookTarget, type WinScpSession, ZeroTransfer, type ZeroTransferCapabilities, ZeroTransferError, type ZeroTransferErrorDetails, type ZeroTransferLogger, type ZeroTransferOptions, assertSafeFtpArgument, basenameRemotePath, buildPublickeyCredential, buildRemoteBreadcrumbs, compareRemoteManifests, composeAuditLogs, copyBetween, createApprovalGate, createAtomicDeployPlan, createAzureBlobProviderFactory, createBandwidthThrottle, createDropboxProviderFactory, createFileSystemS3MultipartResumeStore, createFtpProviderFactory, createFtpsProviderFactory, createGcsProviderFactory, createGoogleDriveProviderFactory, createHttpProviderFactory, createInboxRoute, createJsonlAuditLog, createLocalProviderFactory, createMemoryProviderFactory, createMemoryS3MultipartResumeStore, createNativeSftpProviderFactory, createOAuthTokenSecretSource, createOneDriveProviderFactory, createOutboxRoute, createPooledTransferClient, createProgressEvent, createProviderTransferExecutor, createRemoteBrowser, createRemoteManifest, createS3ProviderFactory, createNativeSftpProviderFactory as createSftpProviderFactory, createSyncPlan, createTransferClient, createTransferJobsFromPlan, createTransferPlan, createTransferResult, createWebDavProviderFactory, createWebhookAuditLog, diffRemoteTrees, dispatchWebhook, downloadFile, emitLog, errorFromFtpReply, evaluateRetention, filterRemoteEntries, formatCapabilityMatrixMarkdown, freezeReceipt, getBuiltinCapabilityMatrix, importFileZillaSites, importOpenSshConfig, importWinScpSessions, inboxFailedPath, inboxProcessedPath, isClassicProviderId, isMainModule, isSensitiveKey, joinRemotePath, matchKnownHosts, matchKnownHostsEntry, negotiateSshAlgorithms, nextCronFireAt, nextScheduleFireAt, noopLogger, normalizeRemotePath, parentRemotePath, parseCronExpression, parseFtpFeatures, parseFtpResponseLines, parseKnownHosts, parseMlsdLine, parseMlsdList, parseMlstTimestamp, parseOpenSshConfig, parseRemoteManifest, parseUnixList, parseUnixListLine, redactCommand, redactConnectionProfile, redactObject, redactSecretSource, redactValue, resolveConnectionProfileSecrets, resolveOpenSshHost, resolveProviderId, resolveSecret, runConnectionDiagnostics, runRoute, runSshCommand, serializeRemoteManifest, signWebhookPayload, sortRemoteEntries, summarizeClientDiagnostics, summarizeError, summarizeTransferPlan, throttleByteIterable, uploadFile, validateConnectionProfile, validateSchedule, walkRemoteTree };
6362
+ export { AbortError, type AgeRetentionPolicy, ApprovalRegistry, ApprovalRejectedError, type ApprovalRequest, type ApprovalStatus, ApprovalTimeoutError, type AtomicDeployActivateOperation, type AtomicDeployActivateStep, type AtomicDeployPlan, type AtomicDeployPruneStep, type AtomicDeployStrategy, type AuthenticationCapability, AuthenticationError, AuthorizationError, type AzureBlobMultipartOptions, type AzureBlobProviderOptions, type BandwidthSleep, type BandwidthThrottle, type BandwidthThrottleOptions, type Base64EnvSecretSource, type BuiltInProviderId, type BuiltinCapabilityMatrixEntry, type BuiltinProviderMatrixId, CLASSIC_PROVIDER_IDS, type CapabilitySet, type ChecksumCapability, type ClassicProviderId, type ClientDiagnostics, type CompareRemoteManifestsOptions, ConfigurationError, type ConnectionDiagnosticTimings, type ConnectionDiagnosticsResult, ConnectionError, type ConnectionPoolOptions, type ConnectionProfile, type ConventionEndpoint, type CopyBetweenOptions, type CountRetentionPolicy, type CreateApprovalGateOptions, type CreateAtomicDeployPlanOptions, type CreateInboxRouteOptions, type CreateOutboxRouteOptions, type CreateRemoteBrowserOptions, type CreateRemoteManifestOptions, type CreateSyncPlanOptions, type CreateWebhookAuditLogOptions, type CronExpression, type CronField, type CronScheduleTrigger, DEFAULT_FAILED_SUBDIR, DEFAULT_PROCESSED_SUBDIR, DEFAULT_SSH_ALGORITHM_PREFERENCES, type DefaultRetryPolicyOptions, type DiffRemoteTreesOptions, type DispatchWebhookOptions, type DispatchWebhookResult, type DownloadFileOptions, type DropboxProviderOptions, type EnvSecretSource, type EvaluateRetentionOptions, type FileSecretSource, type FileSystemS3MultipartResumeStoreOptions, type FileZillaSite, type FriendlyTransferOptions, type FtpFeatures, type FtpPassiveHostStrategy, type FtpProviderOptions, type FtpReplyErrorInput, type FtpResponse, FtpResponseParser, type FtpResponseStatus, type FtpsDataProtection, type FtpsMode, type FtpsProviderOptions, type GcsMultipartOptions, type GcsProviderOptions, type GoogleDriveProviderOptions, type HttpFetch, type HttpProviderOptions, type ImportFileZillaSitesResult, type ImportOpenSshConfigOptions, type ImportOpenSshConfigResult, type ImportWinScpSessionsResult, InMemoryAuditLog, type IntervalScheduleTrigger, type JsonlWriter, type KnownHostsEntry, type KnownHostsMarker, type ListOptions, type LocalProviderOptions, type LogLevel, type LogRecord, type LogRecordInput, type LoggerMethod, type MemoryProviderEntry, type MemoryProviderOptions, type MetadataCapability, type MftAuditEntry, type MftAuditEntryType, type MftAuditLog, type MftInboxConvention, type MftOutboxConvention, type MftRoute, type MftRouteEndpoint, type MftRouteFilter, type MftRouteOperation, type MftSchedule, type MftScheduleTrigger, MftScheduler, type MftSchedulerOptions, type MkdirOptions, type NegotiatedSshAlgorithms, type OAuthAccessToken, type OAuthRefreshCallback, type OAuthTokenSecretSourceOptions, type OneDriveMultipartOptions, type OneDriveProviderOptions, type OpenSshConfigEntry, ParseError, PathAlreadyExistsError, PathNotFoundError, PermissionDeniedError, type PooledTransferClient, type ProgressEventInput, ProtocolError, type ProviderFactory, type ProviderId, ProviderRegistry, type ProviderSelection, type ProviderTransferEndpointRole, type ProviderTransferExecutorOptions, type ProviderTransferOperations, type ProviderTransferReadRequest, type ProviderTransferReadResult, type ProviderTransferRequest, type ProviderTransferSessionResolver, type ProviderTransferSessionResolverInput, type ProviderTransferWriteRequest, type ProviderTransferWriteResult, REDACTED, REMOTE_MANIFEST_FORMAT_VERSION, type RemoteBreadcrumb, type RemoteBrowser, type RemoteBrowserFilter, type RemoteBrowserSnapshot, type RemoteEntry, type RemoteEntrySortKey, type RemoteEntrySortOrder, type RemoteEntryType, type RemoteFileAdapter, type RemoteFileEndpoint, type RemoteFileSystem, type RemoteManifest, type RemoteManifestEntry, type RemotePermissions, type RemoteProtocol, type RemoteStat, type RemoteTreeDiff, type RemoteTreeDiffEntry, type RemoteTreeDiffReason, type RemoteTreeDiffStatus, type RemoteTreeDiffSummary, type RemoteTreeEntry, type RemoteTreeFilter, type RemoveOptions, type RenameOptions, type ResolveSecretOptions, type ResolvedConnectionProfile, type ResolvedOpenSshHost, type ResolvedSshProfile, type ResolvedTlsProfile, type RetentionEvaluation, type RetentionPolicy, type RmdirOptions, RouteRegistry, type RunConnectionDiagnosticsOptions, type RunRouteOptions, type RunSshCommandOptions, type RunSshCommandResult, type S3MultipartCheckpoint, type S3MultipartOptions, type S3MultipartPart, type S3MultipartResumeKey, type S3MultipartResumeStore, type S3ProviderOptions, ScheduleRegistry, type ScheduleRouteRunner, type ScheduleTimerHooks, type SecretProvider, type SecretSource, type SecretValue, type SftpProviderOptions, type SftpRawSession, type SpecializedErrorDetails, type SshAgentSource, type SshAlgorithmPreferences, type SshAlgorithms, SshAuthSession, SshConnectionManager, SshDataReader, SshDataWriter, SshDisconnectReason, type SshKeyboardInteractiveChallenge, type SshKeyboardInteractiveCredential, type SshKeyboardInteractiveHandler, type SshKeyboardInteractivePrompt, type SshKnownHostsSource, type SshPasswordCredential, type SshProfile, type SshPublickeyCredential, SshSessionChannel, type SshSocketFactory, type SshSocketFactoryContext, SshTransportConnection, type SshTransportConnectionOptions, SshTransportHandshake, type SshTransportHandshakeResult, type StatOptions, type SyncConflictPolicy, type SyncDeletePolicy, type SyncDirection, type SyncEndpointInput, TimeoutError, type TlsProfile, type TlsSecretSource, type TransferAttempt, type TransferAttemptError, type TransferBandwidthLimit, type TransferByteRange, TransferClient, type TransferClientDefaults, type TransferClientOptions, type TransferDataChunk, type TransferDataSource, type TransferEndpoint, TransferEngine, type TransferEngineExecuteOptions, type TransferEngineOptions, TransferError, type TransferExecutionContext, type TransferExecutionResult, type TransferExecutor, type TransferJob, type TransferOperation, type TransferPlan, type TransferPlanAction, type TransferPlanInput, type TransferPlanStep, type TransferPlanSummary, type TransferProgressEvent, type TransferProvider, TransferQueue, type TransferQueueExecutorResolver, type TransferQueueItem, type TransferQueueItemStatus, type TransferQueueOptions, type TransferQueueRunOptions, type TransferQueueSummary, type TransferReceipt, type TransferResult, type TransferResultInput, type TransferRetryDecisionInput, type TransferRetryPolicy, type TransferSession, type TransferTimeoutPolicy, type TransferVerificationResult, UnsupportedFeatureError, type UploadFileOptions, type ValueSecretSource, VerificationError, type WalkRemoteTreeOptions, type WebDavProviderOptions, type WebhookRetryPolicy, type WebhookSignature, type WebhookTarget, type WinScpSession, ZeroTransfer, type ZeroTransferCapabilities, ZeroTransferError, type ZeroTransferErrorDetails, type ZeroTransferLogger, type ZeroTransferOptions, assertSafeFtpArgument, basenameRemotePath, buildPublickeyCredential, buildRemoteBreadcrumbs, compareRemoteManifests, composeAuditLogs, copyBetween, createApprovalGate, createAtomicDeployPlan, createAzureBlobProviderFactory, createBandwidthThrottle, createDefaultRetryPolicy, createDropboxProviderFactory, createFileSystemS3MultipartResumeStore, createFtpProviderFactory, createFtpsProviderFactory, createGcsProviderFactory, createGoogleDriveProviderFactory, createHttpProviderFactory, createInboxRoute, createJsonlAuditLog, createLocalProviderFactory, createMemoryProviderFactory, createMemoryS3MultipartResumeStore, createOAuthTokenSecretSource, createOneDriveProviderFactory, createOutboxRoute, createPooledTransferClient, createProgressEvent, createProviderTransferExecutor, createRemoteBrowser, createRemoteManifest, createS3ProviderFactory, createSftpProviderFactory, createSyncPlan, createTransferClient, createTransferJobsFromPlan, createTransferPlan, createTransferResult, createWebDavProviderFactory, createWebhookAuditLog, diffRemoteTrees, dispatchWebhook, downloadFile, emitLog, errorFromFtpReply, evaluateRetention, filterRemoteEntries, formatCapabilityMatrixMarkdown, freezeReceipt, getBuiltinCapabilityMatrix, importFileZillaSites, importOpenSshConfig, importWinScpSessions, inboxFailedPath, inboxProcessedPath, isClassicProviderId, isMainModule, isSensitiveKey, joinRemotePath, matchKnownHosts, matchKnownHostsEntry, negotiateSshAlgorithms, nextCronFireAt, nextScheduleFireAt, noopLogger, normalizeRemotePath, parentRemotePath, parseCronExpression, parseFtpFeatures, parseFtpResponseLines, parseKnownHosts, parseMlsdLine, parseMlsdList, parseMlstTimestamp, parseOpenSshConfig, parseRemoteManifest, parseUnixList, parseUnixListLine, redactCommand, redactConnectionProfile, redactErrorForLogging, redactObject, redactSecretSource, redactUrlForLogging, redactValue, resolveConnectionProfileSecrets, resolveOpenSshHost, resolveProviderId, resolveSecret, runConnectionDiagnostics, runRoute, runSshCommand, serializeRemoteManifest, signWebhookPayload, sortRemoteEntries, summarizeClientDiagnostics, summarizeError, summarizeTransferPlan, throttleByteIterable, uploadFile, validateConnectionProfile, validateSchedule, walkRemoteTree };