diff --git a/packages/plugin/src/workspace-transfer-limits.ts b/packages/plugin/src/workspace-transfer-limits.ts new file mode 100644 index 0000000..943370a --- /dev/null +++ b/packages/plugin/src/workspace-transfer-limits.ts @@ -0,0 +1,4 @@ +/** Only verified direct paths receive the larger budget; unknown paths fail closed. */ +export function workspaceUploadMaxBytes(mode: string | undefined): number { + return mode === 'LAN' || mode === 'P2P' ? 1024 * 1024 * 1024 : 20 * 1024 * 1024 +}