Files
clawdbot/apps/macos/Sources/Clawdis/Resources/WebChat/components/sandbox/RuntimeMessageBridge.d.ts
2025-12-06 05:01:28 +01:00

19 lines
789 B
TypeScript

/**
* Generates sendRuntimeMessage() function for injection into execution contexts.
* Provides unified messaging API that works in both sandbox iframe and user script contexts.
*/
export type MessageType = "request-response" | "fire-and-forget";
export interface RuntimeMessageBridgeOptions {
context: "sandbox-iframe" | "user-script";
sandboxId: string;
}
export declare class RuntimeMessageBridge {
/**
* Generate sendRuntimeMessage() function as injectable string.
* Returns the function source code to be injected into target context.
*/
static generateBridgeCode(options: RuntimeMessageBridgeOptions): string;
private static generateSandboxBridge;
private static generateUserScriptBridge;
}
//# sourceMappingURL=RuntimeMessageBridge.d.ts.map