import { AsyncLocalStorage } from "node:async_hooks";
import { Connection } from "partyserver";

//#region src/internal_context.d.ts
type AgentEmail = {
  from: string;
  to: string;
  getRaw: () => Promise<Uint8Array>;
  headers: Headers;
  rawSize: number;
  setReject: (reason: string) => void;
  forward: (rcptTo: string, headers?: Headers) => Promise<EmailSendResult>;
  reply: (options: {
    from: string;
    to: string;
    raw: string;
  }) => Promise<EmailSendResult> /** @internal Indicates email was routed via createSecureReplyEmailResolver */;
  _secureRouted?: boolean;
};
type AgentContextStore = {
  agent: unknown;
  connection: Connection | undefined;
  request: Request | undefined;
  email: AgentEmail | undefined;
};
/**
 * @internal — This is an internal implementation detail.
 * Importing or relying on this symbol **will** break your code in a future release.
 */
declare const __DO_NOT_USE_WILL_BREAK__agentContext: AsyncLocalStorage<AgentContextStore>;
//#endregion
export {
  AgentEmail as n,
  __DO_NOT_USE_WILL_BREAK__agentContext as r,
  AgentContextStore as t
};
//# sourceMappingURL=internal_context-Dg4Cgjcu.d.ts.map
