export declare const MOBIUS_SIGNATURE_HEADER = "X-Mobius-Signature"; export declare const MOBIUS_SIGNATURE_VERSION_HEADER = "X-Mobius-Signature-Version"; export declare const MOBIUS_TIMESTAMP_HEADER = "X-Mobius-Timestamp"; export declare const MOBIUS_DELIVERY_ID_HEADER = "X-Mobius-Delivery-Id"; export declare const MOBIUS_SECRET_VERSION_HEADER = "X-Mobius-Secret-Version"; export interface DeliveryMeta { signatureVersion: string; signature: string; timestamp: number; deliveryId: string; secretVersion: number; } export interface VerifiedDelivery extends DeliveryMeta { body: Uint8Array; } export type ActionPrincipalType = "human" | "agent" | "service" | "system"; export type ActionInvocationOriginKind = "agent_tool_call" | "loop_action_step" | "direct_action_invoke" | "server_internal"; export interface ActionInvocationScopeV1 { orgId: string; } export interface ActionInvocationActionV1 { id: string; name: string; } export interface ActionInvocationActorV1 { principalId: string; principalType: ActionPrincipalType; agentId?: string; } export interface ActionInvocationOriginV1 { kind: ActionInvocationOriginKind; runId?: string; channelExchangeId?: string; stepKey?: string; agentTurnId?: string; sessionId?: string; toolCallId?: string; } export interface ActionInvocationContextV1 { schemaVersion: 1; scope: ActionInvocationScopeV1; action: ActionInvocationActionV1; actor: ActionInvocationActorV1; origin: ActionInvocationOriginV1; } export interface ActionInvocationV1 { mobius: ActionInvocationContextV1; parameters: Record; } export interface VerifiedActionInvocationV1 extends VerifiedDelivery { invocation: ActionInvocationV1; } export type VerifySignedDeliveryOptions = { key: Uint8Array; maxAge?: number; now?: () => number; } | { resolveKey: (meta: DeliveryMeta) => Promise | Uint8Array; maxAge?: number; now?: () => number; }; export declare class InvalidSignatureError extends Error { constructor(message: string); } export declare class StaleDeliveryError extends InvalidSignatureError { constructor(message: string); } export declare class UnsupportedActionInvocationSchemaError extends Error { constructor(schemaVersion: unknown); } export declare class MalformedActionInvocationError extends Error { constructor(message: string); } export declare function readDeliveryMeta(request: Request): DeliveryMeta; export declare function readDeliveryMetaFromHeaders(input: HeadersInit): DeliveryMeta; /** Decode a one-time whsec_ reveal into its 32-byte HMAC key. */ export declare function parseSigningSecret(secret: string): Uint8Array; export declare function verifySignedDelivery(request: Request, opts: VerifySignedDeliveryOptions): Promise; export declare function verifySignedDeliveryBytes(body: Uint8Array, headers: HeadersInit, opts: VerifySignedDeliveryOptions): Promise; export declare function verifyActionInvocationV1(body: Uint8Array, headers: HeadersInit, opts: VerifySignedDeliveryOptions): Promise; export declare function signDelivery(key: Uint8Array, body: Uint8Array, opts: { deliveryId: string; timestamp: number; }): { signature: string; }; export declare function parseWebhookDelivery(v: VerifiedDelivery): { type: string; data: T; }; export declare function parseActionInvocation(v: VerifiedDelivery): T; export declare function parseActionInvocationV1(v: VerifiedDelivery): ActionInvocationV1; export declare function parseInteractionCallback(v: VerifiedDelivery): T; //# sourceMappingURL=signing.d.ts.map