add a vnc streaming component for workflows (#2746)

This commit is contained in:
Shuchang Zheng
2025-06-18 10:04:54 -07:00
committed by GitHub
parent 13887b944d
commit 8c02c3c4e0
5 changed files with 353 additions and 2 deletions

39
skyvern-frontend/src/novnc.d.ts vendored Normal file
View File

@@ -0,0 +1,39 @@
declare module "@novnc/novnc/lib/rfb.js" {
export interface RfbEvent {
detail: {
clean: boolean;
reason: string;
error: {
message: string;
};
message: string;
};
}
export interface RfbDisplay {
autoscale(): void;
_scale: number;
}
export interface RFBOptions {
credentials?: { username?: string; password?: string };
clipViewport?: boolean;
scaleViewport?: boolean;
shared?: boolean;
resizeSession?: boolean;
viewOnly?: boolean;
[key: string]: unknown;
}
export default class RFB {
_display: RfbDisplay;
resizeSession: boolean;
scaleViewport: boolean;
constructor(target: HTMLElement, url: string, options?: RFBOptions);
addEventListener(event: string, listener: (e: RfbEvent) => void): void;
removeEventListener(event: string, listener: (e: RfbEvent) => void): void;
disconnect(): void;
viewportChange(): void;
}
}