/** * The shared per-file attach loop for every outbound path that can carry a * file: outlook-mail-reply, outlook-mail-send (draft-send route), outlook-draft, * and outlook-draft-edit. Extracted from mail-reply so the sequence is written * once rather than a fourth time. * * Kept out of `outbound-attachments.ts` deliberately: that lib is pure node:fs * with a pure test suite, and folding Graph calls into it would drag * graph-client and upload-session across that boundary. * * `tool` names the calling tool and is threaded to the Graph call tag, the * upload session's error prefix, and the log line's `event`, so one * attachment's lifeline greps back to the tool that sent it. */ import type { GraphClientConfig } from "./graph-client.js"; import type { OutboundAttachment } from "./outbound-attachments.js"; /** * Validate agent-supplied paths, emitting the `op: "refuse"` line for a per-path * refusal before rethrowing. * * Throwing here — before any postGraph — IS the orphan-draft guard: the absence * of a following `op: "attach"` for that call proves it held. Account-context * failures are not per-path refusals and pass through unlogged: they name no * file, so a refuse line for them would carry an empty `name`. */ export declare function resolveAttachmentsOrRefuse(accountId: string, paths: string[] | undefined, tool: string): OutboundAttachment[]; /** * Attach each resolved file to an existing draft. The draft must already exist * and every file must already have passed `resolveOutboundAttachments`. A file * at or under the inline limit is added as one base64 fileAttachment POST; a * larger file (to the 25 MB cap) streams through a Graph upload session. * * The `op: "attach"` line is emitted AFTER the POST or session returns, never * before, so a logged attach means an attach that landed. */ export declare function attachFilesToDraft(config: GraphClientConfig, draftId: string, files: OutboundAttachment[], tool: string): Promise; //# sourceMappingURL=attach.d.ts.map