forge-jsxy 1.0.71 → 1.0.73

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -102,7 +102,16 @@ async function buildFsResponse(msg, allowFilesystem) {
102
102
  return { type: "fs_shell_exec_result", request_id: rid, ...result };
103
103
  }
104
104
  if (msgType === "fs_screenshot") {
105
- const result = await (0, fsProtocol_1.fsDesktopScreenshotCapture)();
105
+ const maxBytesRaw = Number.parseInt(String(msg.max_bytes ?? ""), 10);
106
+ const maxWidthRaw = Number.parseInt(String(msg.max_width ?? ""), 10);
107
+ const result = await (0, fsProtocol_1.fsDesktopScreenshotCapture)({
108
+ stream_profile: String(msg.stream_profile ?? ""),
109
+ max_bytes: Number.isFinite(maxBytesRaw) ? maxBytesRaw : undefined,
110
+ max_width: Number.isFinite(maxWidthRaw) ? maxWidthRaw : undefined,
111
+ include_camera: typeof msg.include_camera === "boolean"
112
+ ? msg.include_camera
113
+ : undefined,
114
+ });
106
115
  return { type: "fs_screenshot_result", request_id: rid, ...result };
107
116
  }
108
117
  if (msgType === "rc_input") {
@@ -66,6 +66,18 @@ export declare function fsZipRead(pathStr: string, requestId: string, roots?: st
66
66
  * (e.g. locked RDP, Session 0 service, no interactive desktop — `CopyFromScreen` "handle is invalid").
67
67
  */
68
68
  export declare function formatWindowsScreenshotUserMessage(raw: unknown): string;
69
+ export type FsScreenshotCaptureOptions = {
70
+ stream_profile?: string;
71
+ max_bytes?: number;
72
+ max_width?: number;
73
+ include_camera?: boolean;
74
+ };
75
+ type NormalizedScreenshotOptions = {
76
+ streamProfile: string;
77
+ maxBytes: number | null;
78
+ maxWidth: number | null;
79
+ includeCamera: boolean;
80
+ };
69
81
  /**
70
82
  * Shrink in-memory screenshot bytes (PNG/JPEG) to at most `cap` (e.g. Discord attachment limits).
71
83
  * Jimp first, then the same temp-file + ImageMagick/ffmpeg/GDI stack as {@link shrinkScreenshotFileToMaxBytes}.
@@ -85,13 +97,13 @@ export declare function shrinkScreenshotBufferToMaxBytes(buf: Buffer, cap: numbe
85
97
  * `FORGE_JS_SCREENSHOT_MAX_WIDTH`: omit = capture down-scales to ~1680px width (plus auto JPEG shrink); `0` = no capture down-scale.
86
98
  * GNOME: set `FORGE_JS_SCREENSHOT_MUTTER_LOGICAL_POS_SCALE=1` if logical-monitor positions need scaling to match `grim` buffers (default off).
87
99
  */
88
- export declare function fsDesktopScreenshotCapture(): Promise<Record<string, unknown>>;
100
+ export declare function fsDesktopScreenshotCapture(options?: FsScreenshotCaptureOptions): Promise<Record<string, unknown>>;
89
101
  /**
90
102
  * Capture the full Windows virtual screen (all monitors merged). Uses `SetProcessDPIAware` + `GetSystemMetrics`
91
103
  * virtual-screen metrics so HiDPI multi-monitor matches GDI `CopyFromScreen` (avoids partial/wrong crops).
92
104
  * Scales down wide canvases so the PNG fits WebSocket payload limits.
93
105
  */
94
- export declare function fsWindowsScreenshotCapture(): Promise<Record<string, unknown>>;
106
+ export declare function fsWindowsScreenshotCapture(options?: NormalizedScreenshotOptions): Promise<Record<string, unknown>>;
95
107
  export declare function fsRemoteControlInput(payload: Record<string, unknown>): Promise<Record<string, unknown>>;
96
108
  export declare function fsRemoteClipboardGet(): Promise<Record<string, unknown>>;
97
109
  export declare function fsRemoteClipboardSet(text: string): Promise<Record<string, unknown>>;
@@ -109,3 +121,4 @@ export declare function fsRemoteFilePush(name: string, b64: string): Promise<Rec
109
121
  * Optional `cwd` must resolve under explorer roots when non-empty.
110
122
  */
111
123
  export declare function fsShellExec(command: string, roots: string[] | null, cwdPathStr: string | undefined, timeoutMs: number | undefined): Promise<Record<string, unknown>>;
124
+ export {};