// THE ONE PULL EXECUTOR SHAPE (runtime contract R14, scheduled pull): what every pack's // `syncFromRemote` adapter receives. TYPES ONLY — the kernel defines the seam so // packs can adapt their vendor-specific executors to it; BUILDING one (origin + // sealed-credential egress) is the twins service's job, never a pack's. export type RemoteExecuteRequest = { /** The lane of a vendor of lanes that sends the call: the descriptor's `lanes` strategy picks its own by it. */ lane?: string; method: string; path: string; headers?: Record; /** A JSON text, or raw bytes (a multipart upload) — the host hands either to fetch as is. */ body?: string | Uint8Array; /** Opt into exact bytes for object/attachment downloads; JSON clients keep body text. */ responseType?: 'bytes'; /** A URL the vendor itself returned for an upload, already carrying its own authorization * (LinkedIn's video parts on www.linkedin.com/dms-uploads, Slack's upload_url, TikTok's * upload..tiktokapis.com): `path` is then that absolute URL, often on another host than * the API, and the request goes WITHOUT the sealed credential. An upload the vendor authorizes * with the API token (LinkedIn's images) is not presigned and cannot use this. */ presigned?: true; /** An Authorization the vendor ISSUED earlier in the same perform (Cloudflare's assets upload session answers a JWT * that its upload calls carry instead of the API token), on the root's own origin: it is sent as the request's * Authorization and the sealed credential does not go with it. */ issued?: string; }; export type RemoteExecuteResponse = { status: number; headers: Record; body: string; bodyBytes?: Uint8Array; }; export type RemoteExecute = (request: RemoteExecuteRequest) => Promise;