export declare const MCP_EVENT_NAME = "agim.run.finished"; /** No authenticated plugin subject until MCP OAuth exists. */ export declare const MCP_EVENTS_PRINCIPAL = "oauth-not-configured"; export interface McpPostOptions { caPem?: string; /** Test-only exact host that may be loopback. Production passes null. */ pinnedHost?: string | null; } /** Test hook. Production uses a bounded minute-scale window. */ export declare function setMcpRetryBackoffForTests(seconds: readonly number[] | null): void; export declare function canonicalJson(value: unknown): string; export declare function parseWhsec(secret: string): Buffer | null; /** Standard Webhooks HMAC: v1,base64(HMAC_SHA256(secret, id.timestamp.body)). */ export declare function signStandardWebhook(secret: string, webhookId: string, timestampSec: string, body: string): string | null; export declare function stableFinishedEventId(runId: string, status: string): string; export declare function listMcpEvents(): { events: unknown[]; }; export interface SubscribeInput { name?: unknown; arguments?: unknown; delivery?: unknown; ttlMs?: unknown; } export declare function subscribeMcpEvent(input: SubscribeInput, opts?: McpPostOptions): Promise<{ ok: true; id: string; refreshBefore: string; cursor: null; truncated: false; } | { ok: false; code: number; message: string; reason?: string; }>; export declare function unsubscribeMcpEvent(input: SubscribeInput): { ok: true; } | { ok: false; code: number; message: string; }; export declare function deliverFinishedRun(runId: string, opts?: McpPostOptions): Promise; /** Continue deliveries that were still pending when the process stopped. */ export declare function resumePendingMcpDeliveries(opts?: McpPostOptions): Promise; /** Queue a terminal notification. Failures stay in this module. */ export declare function scheduleBridgeMcpFinished(jobId: number): void; export declare function flushBridgeMcpDeliveries(): Promise; /** Test hook so a local HTTPS server can satisfy the public-host check. */ export declare function setMcpPostOptionsForTests(opts: McpPostOptions | null): void; //# sourceMappingURL=bridge-mcp-events.d.ts.map