@omercnet/paseo-shared-browser 4.1.11 → 4.1.12-next.505.1

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.
package/shared/browser.ts CHANGED
@@ -173,6 +173,27 @@ export const listOpenBrowserWorkspacesRpc = defineRpc({
173
173
  output: z.object({ workspaceIds: z.array(workspaceIdSchema).max(32) }),
174
174
  });
175
175
 
176
+ /**
177
+ * Host-wide encoded-video launch option. `enabled` is effective: the daemon's
178
+ * PASEO_SHARED_BROWSER_VIDEO=1 forces it on (`forcedByHost`) over the persisted choice.
179
+ */
180
+ export const browserVideoSettingsSchema = z.object({
181
+ enabled: z.boolean(),
182
+ forcedByHost: z.boolean(),
183
+ });
184
+ export type BrowserVideoSettings = z.output<typeof browserVideoSettingsSchema>;
185
+ export const getBrowserVideoSettingsRpc = defineRpc({
186
+ name: "shared-browser.video.settings",
187
+ input: z.object({}),
188
+ output: browserVideoSettingsSchema,
189
+ });
190
+ /** Any current viewer may change it. Open browsers relaunch so the change takes effect. */
191
+ export const setBrowserVideoSettingsRpc = defineRpc({
192
+ name: "shared-browser.video.set",
193
+ input: z.object({ viewerToken: opaqueTokenSchema, enabled: z.boolean() }),
194
+ output: browserVideoSettingsSchema,
195
+ });
196
+
176
197
  export const captureBrowserRpc = defineRpc({
177
198
  name: "shared-browser.capture",
178
199
  input: z.object({
@@ -532,6 +553,16 @@ export const endBrowserGestureRpc = defineRpc({
532
553
  input: gestureContinuationSchema.extend({ cancel: z.boolean().default(false) }),
533
554
  output: z.object({ state: browserStateSchema, cursor: browserCursorSchema.nullable() }),
534
555
  });
556
+ /**
557
+ * Keep a quiet held channel (button, key or touch still down) inside the server's
558
+ * idle bound. Sends no input, does not advance the sequence and revokes no receipt.
559
+ * The absolute gesture lifetime still applies.
560
+ */
561
+ export const keepAliveBrowserGestureRpc = defineRpc({
562
+ name: "shared-browser.gesture.keepalive",
563
+ input: gestureContinuationSchema,
564
+ output: z.object({ gestureId: opaqueTokenSchema, nextSequence: z.number().int().positive() }),
565
+ });
535
566
 
536
567
  export type BrowserState = z.output<typeof browserStateSchema>;
537
568
  export type BrowserFrame = z.output<typeof browserFrameSchema>;