openclaw
Version:
Multi-channel AI gateway with extensible messaging integrations
159 lines • 54.3 kB
JavaScript
import { _ as ScreenSnapshotParamsSchema, g as ComputerUseCapabilityDescriptorSchema, m as ComputerActParamsSchema } from "./computer-use-contract-DrB9JL-Y.mjs";
import { Type } from "typebox";
//#region src/worker/node-computer-validator.generated.js
/*!
TypeBox
The MIT License (MIT)
Copyright (c) 2017-2026 Haydn Paterson
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
function CodePointCount(e) {
let t = 0, n = 0, r = 0;
for (; n < e.length;) {
let i = e.charCodeAt(n++) >> 10;
t += +((r << 8 | i) !== 13879), r = i;
}
return t;
}
var isNodeWorkerComputerInput = (() => {
let e = [
/(^executionId$|^screenIndex$|^maxWidth$|^quality$|^format$)/u,
/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/u,
/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/u,
/(^action$|^executionId$|^displayFrameId$|^x$|^y$|^modifiers$|^screenIndex$|^refWidth$|^windowRef$|^elementRef$|^observationId$|^deliveryMode$)/u,
/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/u,
/(^action$|^executionId$|^displayFrameId$|^x$|^y$|^fromX$|^fromY$|^durationMs$|^screenIndex$|^refWidth$|^windowRef$|^elementRef$|^observationId$|^deliveryMode$)/u,
/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/u,
/(^action$|^executionId$|^displayFrameId$|^x$|^y$|^modifiers$|^screenIndex$|^refWidth$|^windowRef$|^elementRef$|^observationId$|^deliveryMode$)/u,
/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/u,
/(^action$|^executionId$|^displayFrameId$|^x$|^y$|^modifiers$|^scrollDirection$|^scrollAmount$|^screenIndex$|^refWidth$|^windowRef$|^elementRef$|^observationId$|^deliveryMode$)/u,
/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/u,
/(^action$|^executionId$|^text$|^screenIndex$|^refWidth$|^windowRef$|^elementRef$|^observationId$|^deliveryMode$)/u,
/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/u,
/(^action$|^executionId$|^keys$|^screenIndex$|^refWidth$|^windowRef$|^elementRef$|^observationId$|^deliveryMode$)/u,
/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/u,
/(^action$|^executionId$|^keys$|^durationMs$|^screenIndex$|^refWidth$|^windowRef$|^elementRef$|^observationId$|^deliveryMode$)/u,
/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/u,
/(^action$|^executionId$)/u,
/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/u,
/(^action$|^executionId$|^windowRef$|^query$|^depth$|^maxElements$)/u,
/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/u,
/(^action$|^executionId$|^windowRef$|^includeScreenshot$|^query$|^depth$|^maxElements$)/u,
/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/u,
/(^action$|^executionId$|^app$)/u,
/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/u,
/(^action$|^executionId$|^windowRef$)/u,
/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/u,
/(^action$|^executionId$|^windowRef$|^elementRef$|^observationId$|^value$|^deliveryMode$)/u,
/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/u,
/(^action$|^executionId$|^windowRef$|^path$|^deliveryMode$)/u,
/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/u,
/(^action$|^executionId$|^windowRef$|^observationId$|^x1$|^y1$|^x2$|^y2$)/u,
/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/u,
/(^action$|^executionId$|^windowRef$)/u,
/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/u,
/(^action$|^executionId$|^browserRef$|^pageRef$|^snapshotFormat$|^elementRef$|^observationId$|^query$|^continuation$|^includeScreenshot$)/u,
/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/u,
/(^action$|^executionId$|^windowRef$|^profile$|^profileName$)/u,
/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/u,
/^[A-Za-z0-9._-]+$/u,
/(^action$|^executionId$|^browserRef$|^pageRef$|^url$)/u,
/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/u,
/(^action$|^executionId$|^browserRef$|^pageRef$|^observationId$|^elementRef$|^x$|^y$|^inputRoute$)/u,
/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/u,
/(^action$|^executionId$|^browserRef$|^pageRef$|^observationId$|^elementRef$|^text$|^mode$|^replace$)/u,
/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/u,
/(^action$|^executionId$|^browserRef$|^pageRef$|^dialogAction$)/u,
/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/u,
/(^action$|^executionId$|^browserRef$|^pageRef$|^dialogAction$|^dialogRef$|^promptText$|^deliveryMode$)/u,
/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/u,
/(^action$|^executionId$|^browserRef$|^pageRef$|^dialogAction$|^dialogRef$|^deliveryMode$)/u,
/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/u,
/(^action$|^executionId$|^browserRef$|^pageRef$|^observationId$|^elementRef$|^resourceHandles$)/u,
/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/u,
/^openclaw:computer-resource:v1:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/u,
/(^action$|^executionId$|^browserRef$|^pageRef$|^observationId$|^elementRef$)/u,
/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/u,
/(^action$|^executionId$|^browserRef$|^pageRef$|^observationId$|^pointerAction$|^inputRoute$|^elementRef$|^x$|^y$|^destinationElementRef$|^toX$|^toY$|^deltaX$|^deltaY$)/u,
/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/u,
/(^action$|^executionId$|^reason$)/u,
/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/u,
/(^action$|^executionId$)/u,
/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/u,
/(^action$|^executionId$|^recordVideo$)/u,
/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/u,
/(^action$|^executionId$|^resourceHandle$|^delayMs$|^stopOnError$)/u,
/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/u,
/^openclaw:computer-resource:v1:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/u,
/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/u,
/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/u
], check_0 = (t) => typeof t == "object" && t !== null && !Array.isArray(t) && "operation" in t && Object.getOwnPropertyNames(t).length === 1 && typeof t.operation == "string" && t.operation === "capabilities" || typeof t == "object" && t !== null && !Array.isArray(t) && "operation" in t && "providerGeneration" in t && "params" in t && Object.getOwnPropertyNames(t).length === 3 && typeof t.operation == "string" && t.operation === "snapshot" && typeof t.providerGeneration == "string" && (t.providerGeneration.length >= 2 || t.providerGeneration.length >= 1 && CodePointCount(t.providerGeneration) >= 1) && (t.providerGeneration.length <= 256 || t.providerGeneration.length <= 512 && CodePointCount(t.providerGeneration) <= 256) && typeof t.params == "object" && t.params !== null && !Array.isArray(t.params) && Object.getOwnPropertyNames(t.params).every((t, n) => e[0].test(t) || !1) && (t.params.executionId === void 0 || !("executionId" in t.params) || typeof t.params.executionId == "string" && e[1].test(t.params.executionId)) && (t.params.screenIndex === void 0 || !("screenIndex" in t.params) || Number.isInteger(t.params.screenIndex) && (!(Number.isFinite(t.params.screenIndex) || typeof t.params.screenIndex == "bigint") || t.params.screenIndex >= 0)) && (t.params.maxWidth === void 0 || !("maxWidth" in t.params) || Number.isInteger(t.params.maxWidth) && (!(Number.isFinite(t.params.maxWidth) || typeof t.params.maxWidth == "bigint") || t.params.maxWidth >= 1)) && (t.params.quality === void 0 || !("quality" in t.params) || Number.isFinite(t.params.quality)) && (t.params.format === void 0 || !("format" in t.params) || typeof t.params.format == "string" && (t.params.format === "jpeg" || t.params.format === "png")) && typeof t.params == "object" && t.params !== null && !Array.isArray(t.params) && "executionId" in t.params && typeof t.params.executionId == "string" && e[2].test(t.params.executionId) || typeof t == "object" && t !== null && !Array.isArray(t) && "operation" in t && "providerGeneration" in t && "params" in t && Object.getOwnPropertyNames(t).length === 3 && typeof t.operation == "string" && t.operation === "act" && typeof t.providerGeneration == "string" && (t.providerGeneration.length >= 2 || t.providerGeneration.length >= 1 && CodePointCount(t.providerGeneration) >= 1) && (t.providerGeneration.length <= 256 || t.providerGeneration.length <= 512 && CodePointCount(t.providerGeneration) <= 256) && (typeof t.params == "object" && t.params !== null && !Array.isArray(t.params) && "action" in t.params && Object.getOwnPropertyNames(t.params).every((t, n) => e[3].test(t) || !1) && typeof t.params.action == "string" && (t.params.action === "left_click" || t.params.action === "right_click" || t.params.action === "middle_click" || t.params.action === "double_click" || t.params.action === "triple_click" || t.params.action === "mouse_move") && (t.params.executionId === void 0 || !("executionId" in t.params) || typeof t.params.executionId == "string" && e[4].test(t.params.executionId)) && (t.params.displayFrameId === void 0 || !("displayFrameId" in t.params) || typeof t.params.displayFrameId == "string") && (t.params.x === void 0 || !("x" in t.params) || Number.isFinite(t.params.x) && t.params.x >= 0) && (t.params.y === void 0 || !("y" in t.params) || Number.isFinite(t.params.y) && t.params.y >= 0) && (t.params.modifiers === void 0 || !("modifiers" in t.params) || typeof t.params.modifiers == "string") && (t.params.screenIndex === void 0 || !("screenIndex" in t.params) || Number.isInteger(t.params.screenIndex) && (!(Number.isFinite(t.params.screenIndex) || typeof t.params.screenIndex == "bigint") || t.params.screenIndex >= 0)) && (t.params.refWidth === void 0 || !("refWidth" in t.params) || Number.isInteger(t.params.refWidth) && (!(Number.isFinite(t.params.refWidth) || typeof t.params.refWidth == "bigint") || t.params.refWidth >= 1)) && (t.params.windowRef === void 0 || !("windowRef" in t.params) || typeof t.params.windowRef == "string" && (t.params.windowRef.length >= 2 || t.params.windowRef.length >= 1 && CodePointCount(t.params.windowRef) >= 1)) && (t.params.elementRef === void 0 || !("elementRef" in t.params) || typeof t.params.elementRef == "string" && (t.params.elementRef.length >= 2 || t.params.elementRef.length >= 1 && CodePointCount(t.params.elementRef) >= 1)) && (t.params.observationId === void 0 || !("observationId" in t.params) || typeof t.params.observationId == "string" && (t.params.observationId.length >= 2 || t.params.observationId.length >= 1 && CodePointCount(t.params.observationId) >= 1)) && (t.params.deliveryMode === void 0 || !("deliveryMode" in t.params) || typeof t.params.deliveryMode == "string" && (t.params.deliveryMode === "background" || t.params.deliveryMode === "foreground")) || typeof t.params == "object" && t.params !== null && !Array.isArray(t.params) && "action" in t.params && Object.getOwnPropertyNames(t.params).every((t, n) => e[5].test(t) || !1) && typeof t.params.action == "string" && t.params.action === "left_click_drag" && (t.params.executionId === void 0 || !("executionId" in t.params) || typeof t.params.executionId == "string" && e[6].test(t.params.executionId)) && (t.params.displayFrameId === void 0 || !("displayFrameId" in t.params) || typeof t.params.displayFrameId == "string") && (t.params.x === void 0 || !("x" in t.params) || Number.isFinite(t.params.x) && t.params.x >= 0) && (t.params.y === void 0 || !("y" in t.params) || Number.isFinite(t.params.y) && t.params.y >= 0) && (t.params.fromX === void 0 || !("fromX" in t.params) || Number.isFinite(t.params.fromX) && t.params.fromX >= 0) && (t.params.fromY === void 0 || !("fromY" in t.params) || Number.isFinite(t.params.fromY) && t.params.fromY >= 0) && (t.params.durationMs === void 0 || !("durationMs" in t.params) || Number.isInteger(t.params.durationMs) && (!(Number.isFinite(t.params.durationMs) || typeof t.params.durationMs == "bigint") || t.params.durationMs >= 0)) && (t.params.screenIndex === void 0 || !("screenIndex" in t.params) || Number.isInteger(t.params.screenIndex) && (!(Number.isFinite(t.params.screenIndex) || typeof t.params.screenIndex == "bigint") || t.params.screenIndex >= 0)) && (t.params.refWidth === void 0 || !("refWidth" in t.params) || Number.isInteger(t.params.refWidth) && (!(Number.isFinite(t.params.refWidth) || typeof t.params.refWidth == "bigint") || t.params.refWidth >= 1)) && (t.params.windowRef === void 0 || !("windowRef" in t.params) || typeof t.params.windowRef == "string" && (t.params.windowRef.length >= 2 || t.params.windowRef.length >= 1 && CodePointCount(t.params.windowRef) >= 1)) && (t.params.elementRef === void 0 || !("elementRef" in t.params) || typeof t.params.elementRef == "string" && (t.params.elementRef.length >= 2 || t.params.elementRef.length >= 1 && CodePointCount(t.params.elementRef) >= 1)) && (t.params.observationId === void 0 || !("observationId" in t.params) || typeof t.params.observationId == "string" && (t.params.observationId.length >= 2 || t.params.observationId.length >= 1 && CodePointCount(t.params.observationId) >= 1)) && (t.params.deliveryMode === void 0 || !("deliveryMode" in t.params) || typeof t.params.deliveryMode == "string" && (t.params.deliveryMode === "background" || t.params.deliveryMode === "foreground")) || typeof t.params == "object" && t.params !== null && !Array.isArray(t.params) && "action" in t.params && Object.getOwnPropertyNames(t.params).every((t, n) => e[7].test(t) || !1) && typeof t.params.action == "string" && (t.params.action === "left_mouse_down" || t.params.action === "left_mouse_up") && (t.params.executionId === void 0 || !("executionId" in t.params) || typeof t.params.executionId == "string" && e[8].test(t.params.executionId)) && (t.params.displayFrameId === void 0 || !("displayFrameId" in t.params) || typeof t.params.displayFrameId == "string") && (t.params.x === void 0 || !("x" in t.params) || Number.isFinite(t.params.x) && t.params.x >= 0) && (t.params.y === void 0 || !("y" in t.params) || Number.isFinite(t.params.y) && t.params.y >= 0) && (t.params.modifiers === void 0 || !("modifiers" in t.params) || typeof t.params.modifiers == "string") && (t.params.screenIndex === void 0 || !("screenIndex" in t.params) || Number.isInteger(t.params.screenIndex) && (!(Number.isFinite(t.params.screenIndex) || typeof t.params.screenIndex == "bigint") || t.params.screenIndex >= 0)) && (t.params.refWidth === void 0 || !("refWidth" in t.params) || Number.isInteger(t.params.refWidth) && (!(Number.isFinite(t.params.refWidth) || typeof t.params.refWidth == "bigint") || t.params.refWidth >= 1)) && (t.params.windowRef === void 0 || !("windowRef" in t.params) || typeof t.params.windowRef == "string" && (t.params.windowRef.length >= 2 || t.params.windowRef.length >= 1 && CodePointCount(t.params.windowRef) >= 1)) && (t.params.elementRef === void 0 || !("elementRef" in t.params) || typeof t.params.elementRef == "string" && (t.params.elementRef.length >= 2 || t.params.elementRef.length >= 1 && CodePointCount(t.params.elementRef) >= 1)) && (t.params.observationId === void 0 || !("observationId" in t.params) || typeof t.params.observationId == "string" && (t.params.observationId.length >= 2 || t.params.observationId.length >= 1 && CodePointCount(t.params.observationId) >= 1)) && (t.params.deliveryMode === void 0 || !("deliveryMode" in t.params) || typeof t.params.deliveryMode == "string" && (t.params.deliveryMode === "background" || t.params.deliveryMode === "foreground")) || typeof t.params == "object" && t.params !== null && !Array.isArray(t.params) && "action" in t.params && Object.getOwnPropertyNames(t.params).every((t, n) => e[9].test(t) || !1) && typeof t.params.action == "string" && t.params.action === "scroll" && (t.params.executionId === void 0 || !("executionId" in t.params) || typeof t.params.executionId == "string" && e[10].test(t.params.executionId)) && (t.params.displayFrameId === void 0 || !("displayFrameId" in t.params) || typeof t.params.displayFrameId == "string") && (t.params.x === void 0 || !("x" in t.params) || Number.isFinite(t.params.x) && t.params.x >= 0) && (t.params.y === void 0 || !("y" in t.params) || Number.isFinite(t.params.y) && t.params.y >= 0) && (t.params.modifiers === void 0 || !("modifiers" in t.params) || typeof t.params.modifiers == "string") && (t.params.scrollDirection === void 0 || !("scrollDirection" in t.params) || typeof t.params.scrollDirection == "string" && (t.params.scrollDirection === "up" || t.params.scrollDirection === "down" || t.params.scrollDirection === "left" || t.params.scrollDirection === "right")) && (t.params.scrollAmount === void 0 || !("scrollAmount" in t.params) || Number.isInteger(t.params.scrollAmount) && (!(Number.isFinite(t.params.scrollAmount) || typeof t.params.scrollAmount == "bigint") || t.params.scrollAmount >= 1)) && (t.params.screenIndex === void 0 || !("screenIndex" in t.params) || Number.isInteger(t.params.screenIndex) && (!(Number.isFinite(t.params.screenIndex) || typeof t.params.screenIndex == "bigint") || t.params.screenIndex >= 0)) && (t.params.refWidth === void 0 || !("refWidth" in t.params) || Number.isInteger(t.params.refWidth) && (!(Number.isFinite(t.params.refWidth) || typeof t.params.refWidth == "bigint") || t.params.refWidth >= 1)) && (t.params.windowRef === void 0 || !("windowRef" in t.params) || typeof t.params.windowRef == "string" && (t.params.windowRef.length >= 2 || t.params.windowRef.length >= 1 && CodePointCount(t.params.windowRef) >= 1)) && (t.params.elementRef === void 0 || !("elementRef" in t.params) || typeof t.params.elementRef == "string" && (t.params.elementRef.length >= 2 || t.params.elementRef.length >= 1 && CodePointCount(t.params.elementRef) >= 1)) && (t.params.observationId === void 0 || !("observationId" in t.params) || typeof t.params.observationId == "string" && (t.params.observationId.length >= 2 || t.params.observationId.length >= 1 && CodePointCount(t.params.observationId) >= 1)) && (t.params.deliveryMode === void 0 || !("deliveryMode" in t.params) || typeof t.params.deliveryMode == "string" && (t.params.deliveryMode === "background" || t.params.deliveryMode === "foreground")) || typeof t.params == "object" && t.params !== null && !Array.isArray(t.params) && "action" in t.params && Object.getOwnPropertyNames(t.params).every((t, n) => e[11].test(t) || !1) && typeof t.params.action == "string" && t.params.action === "type" && (t.params.executionId === void 0 || !("executionId" in t.params) || typeof t.params.executionId == "string" && e[12].test(t.params.executionId)) && (t.params.text === void 0 || !("text" in t.params) || typeof t.params.text == "string") && (t.params.screenIndex === void 0 || !("screenIndex" in t.params) || Number.isInteger(t.params.screenIndex) && (!(Number.isFinite(t.params.screenIndex) || typeof t.params.screenIndex == "bigint") || t.params.screenIndex >= 0)) && (t.params.refWidth === void 0 || !("refWidth" in t.params) || Number.isInteger(t.params.refWidth) && (!(Number.isFinite(t.params.refWidth) || typeof t.params.refWidth == "bigint") || t.params.refWidth >= 1)) && (t.params.windowRef === void 0 || !("windowRef" in t.params) || typeof t.params.windowRef == "string" && (t.params.windowRef.length >= 2 || t.params.windowRef.length >= 1 && CodePointCount(t.params.windowRef) >= 1)) && (t.params.elementRef === void 0 || !("elementRef" in t.params) || typeof t.params.elementRef == "string" && (t.params.elementRef.length >= 2 || t.params.elementRef.length >= 1 && CodePointCount(t.params.elementRef) >= 1)) && (t.params.observationId === void 0 || !("observationId" in t.params) || typeof t.params.observationId == "string" && (t.params.observationId.length >= 2 || t.params.observationId.length >= 1 && CodePointCount(t.params.observationId) >= 1)) && (t.params.deliveryMode === void 0 || !("deliveryMode" in t.params) || typeof t.params.deliveryMode == "string" && (t.params.deliveryMode === "background" || t.params.deliveryMode === "foreground")) || typeof t.params == "object" && t.params !== null && !Array.isArray(t.params) && "action" in t.params && Object.getOwnPropertyNames(t.params).every((t, n) => e[13].test(t) || !1) && typeof t.params.action == "string" && t.params.action === "key" && (t.params.executionId === void 0 || !("executionId" in t.params) || typeof t.params.executionId == "string" && e[14].test(t.params.executionId)) && (t.params.keys === void 0 || !("keys" in t.params) || typeof t.params.keys == "string") && (t.params.screenIndex === void 0 || !("screenIndex" in t.params) || Number.isInteger(t.params.screenIndex) && (!(Number.isFinite(t.params.screenIndex) || typeof t.params.screenIndex == "bigint") || t.params.screenIndex >= 0)) && (t.params.refWidth === void 0 || !("refWidth" in t.params) || Number.isInteger(t.params.refWidth) && (!(Number.isFinite(t.params.refWidth) || typeof t.params.refWidth == "bigint") || t.params.refWidth >= 1)) && (t.params.windowRef === void 0 || !("windowRef" in t.params) || typeof t.params.windowRef == "string" && (t.params.windowRef.length >= 2 || t.params.windowRef.length >= 1 && CodePointCount(t.params.windowRef) >= 1)) && (t.params.elementRef === void 0 || !("elementRef" in t.params) || typeof t.params.elementRef == "string" && (t.params.elementRef.length >= 2 || t.params.elementRef.length >= 1 && CodePointCount(t.params.elementRef) >= 1)) && (t.params.observationId === void 0 || !("observationId" in t.params) || typeof t.params.observationId == "string" && (t.params.observationId.length >= 2 || t.params.observationId.length >= 1 && CodePointCount(t.params.observationId) >= 1)) && (t.params.deliveryMode === void 0 || !("deliveryMode" in t.params) || typeof t.params.deliveryMode == "string" && (t.params.deliveryMode === "background" || t.params.deliveryMode === "foreground")) || typeof t.params == "object" && t.params !== null && !Array.isArray(t.params) && "action" in t.params && Object.getOwnPropertyNames(t.params).every((t, n) => e[15].test(t) || !1) && typeof t.params.action == "string" && t.params.action === "hold_key" && (t.params.executionId === void 0 || !("executionId" in t.params) || typeof t.params.executionId == "string" && e[16].test(t.params.executionId)) && (t.params.keys === void 0 || !("keys" in t.params) || typeof t.params.keys == "string") && (t.params.durationMs === void 0 || !("durationMs" in t.params) || Number.isInteger(t.params.durationMs) && (!(Number.isFinite(t.params.durationMs) || typeof t.params.durationMs == "bigint") || t.params.durationMs >= 0)) && (t.params.screenIndex === void 0 || !("screenIndex" in t.params) || Number.isInteger(t.params.screenIndex) && (!(Number.isFinite(t.params.screenIndex) || typeof t.params.screenIndex == "bigint") || t.params.screenIndex >= 0)) && (t.params.refWidth === void 0 || !("refWidth" in t.params) || Number.isInteger(t.params.refWidth) && (!(Number.isFinite(t.params.refWidth) || typeof t.params.refWidth == "bigint") || t.params.refWidth >= 1)) && (t.params.windowRef === void 0 || !("windowRef" in t.params) || typeof t.params.windowRef == "string" && (t.params.windowRef.length >= 2 || t.params.windowRef.length >= 1 && CodePointCount(t.params.windowRef) >= 1)) && (t.params.elementRef === void 0 || !("elementRef" in t.params) || typeof t.params.elementRef == "string" && (t.params.elementRef.length >= 2 || t.params.elementRef.length >= 1 && CodePointCount(t.params.elementRef) >= 1)) && (t.params.observationId === void 0 || !("observationId" in t.params) || typeof t.params.observationId == "string" && (t.params.observationId.length >= 2 || t.params.observationId.length >= 1 && CodePointCount(t.params.observationId) >= 1)) && (t.params.deliveryMode === void 0 || !("deliveryMode" in t.params) || typeof t.params.deliveryMode == "string" && (t.params.deliveryMode === "background" || t.params.deliveryMode === "foreground")) || typeof t.params == "object" && t.params !== null && !Array.isArray(t.params) && "action" in t.params && Object.getOwnPropertyNames(t.params).every((t, n) => e[17].test(t) || !1) && typeof t.params.action == "string" && (t.params.action === "list_apps" || t.params.action === "list_windows" || t.params.action === "get_cursor_position") && (t.params.executionId === void 0 || !("executionId" in t.params) || typeof t.params.executionId == "string" && e[18].test(t.params.executionId)) || typeof t.params == "object" && t.params !== null && !Array.isArray(t.params) && "action" in t.params && Object.getOwnPropertyNames(t.params).every((t, n) => e[19].test(t) || !1) && typeof t.params.action == "string" && t.params.action === "get_accessibility_tree" && (t.params.executionId === void 0 || !("executionId" in t.params) || typeof t.params.executionId == "string" && e[20].test(t.params.executionId)) && (t.params.windowRef === void 0 || !("windowRef" in t.params) || typeof t.params.windowRef == "string" && (t.params.windowRef.length >= 2 || t.params.windowRef.length >= 1 && CodePointCount(t.params.windowRef) >= 1)) && (t.params.query === void 0 || !("query" in t.params) || typeof t.params.query == "string") && (t.params.depth === void 0 || !("depth" in t.params) || Number.isInteger(t.params.depth) && (!(Number.isFinite(t.params.depth) || typeof t.params.depth == "bigint") || t.params.depth >= 0 && t.params.depth <= 64)) && (t.params.maxElements === void 0 || !("maxElements" in t.params) || Number.isInteger(t.params.maxElements) && (!(Number.isFinite(t.params.maxElements) || typeof t.params.maxElements == "bigint") || t.params.maxElements >= 1 && t.params.maxElements <= 2e3)) || typeof t.params == "object" && t.params !== null && !Array.isArray(t.params) && "action" in t.params && "windowRef" in t.params && Object.getOwnPropertyNames(t.params).every((t, n) => e[21].test(t) || !1) && typeof t.params.action == "string" && t.params.action === "get_window_state" && (t.params.executionId === void 0 || !("executionId" in t.params) || typeof t.params.executionId == "string" && e[22].test(t.params.executionId)) && typeof t.params.windowRef == "string" && (t.params.windowRef.length >= 2 || t.params.windowRef.length >= 1 && CodePointCount(t.params.windowRef) >= 1) && (t.params.includeScreenshot === void 0 || !("includeScreenshot" in t.params) || typeof t.params.includeScreenshot == "boolean") && (t.params.query === void 0 || !("query" in t.params) || typeof t.params.query == "string") && (t.params.depth === void 0 || !("depth" in t.params) || Number.isInteger(t.params.depth) && (!(Number.isFinite(t.params.depth) || typeof t.params.depth == "bigint") || t.params.depth >= 0 && t.params.depth <= 64)) && (t.params.maxElements === void 0 || !("maxElements" in t.params) || Number.isInteger(t.params.maxElements) && (!(Number.isFinite(t.params.maxElements) || typeof t.params.maxElements == "bigint") || t.params.maxElements >= 1 && t.params.maxElements <= 2e3)) || typeof t.params == "object" && t.params !== null && !Array.isArray(t.params) && "action" in t.params && "app" in t.params && Object.getOwnPropertyNames(t.params).every((t, n) => e[23].test(t) || !1) && typeof t.params.action == "string" && (t.params.action === "launch_app" || t.params.action === "kill_app") && (t.params.executionId === void 0 || !("executionId" in t.params) || typeof t.params.executionId == "string" && e[24].test(t.params.executionId)) && typeof t.params.app == "string" && (t.params.app.length >= 2 || t.params.app.length >= 1 && CodePointCount(t.params.app) >= 1) || typeof t.params == "object" && t.params !== null && !Array.isArray(t.params) && "action" in t.params && "windowRef" in t.params && Object.getOwnPropertyNames(t.params).every((t, n) => e[25].test(t) || !1) && typeof t.params.action == "string" && t.params.action === "bring_to_front" && (t.params.executionId === void 0 || !("executionId" in t.params) || typeof t.params.executionId == "string" && e[26].test(t.params.executionId)) && typeof t.params.windowRef == "string" && (t.params.windowRef.length >= 2 || t.params.windowRef.length >= 1 && CodePointCount(t.params.windowRef) >= 1) || typeof t.params == "object" && t.params !== null && !Array.isArray(t.params) && "action" in t.params && "windowRef" in t.params && "elementRef" in t.params && "observationId" in t.params && "value" in t.params && Object.getOwnPropertyNames(t.params).every((t, n) => e[27].test(t) || !1) && typeof t.params.action == "string" && t.params.action === "set_value" && (t.params.executionId === void 0 || !("executionId" in t.params) || typeof t.params.executionId == "string" && e[28].test(t.params.executionId)) && typeof t.params.windowRef == "string" && (t.params.windowRef.length >= 2 || t.params.windowRef.length >= 1 && CodePointCount(t.params.windowRef) >= 1) && typeof t.params.elementRef == "string" && (t.params.elementRef.length >= 2 || t.params.elementRef.length >= 1 && CodePointCount(t.params.elementRef) >= 1) && typeof t.params.observationId == "string" && (t.params.observationId.length >= 2 || t.params.observationId.length >= 1 && CodePointCount(t.params.observationId) >= 1) && typeof t.params.value == "string" && (t.params.deliveryMode === void 0 || !("deliveryMode" in t.params) || typeof t.params.deliveryMode == "string" && (t.params.deliveryMode === "background" || t.params.deliveryMode === "foreground")) || typeof t.params == "object" && t.params !== null && !Array.isArray(t.params) && "action" in t.params && "windowRef" in t.params && "path" in t.params && Object.getOwnPropertyNames(t.params).every((t, n) => e[29].test(t) || !1) && typeof t.params.action == "string" && t.params.action === "invoke_menu" && (t.params.executionId === void 0 || !("executionId" in t.params) || typeof t.params.executionId == "string" && e[30].test(t.params.executionId)) && typeof t.params.windowRef == "string" && (t.params.windowRef.length >= 2 || t.params.windowRef.length >= 1 && CodePointCount(t.params.windowRef) >= 1) && Array.isArray(t.params.path) && t.params.path.every((e, t) => typeof e == "string" && (e.length >= 2 || e.length >= 1 && CodePointCount(e) >= 1) && (e.length <= 200 || e.length <= 400 && CodePointCount(e) <= 200)) && t.params.path.length >= 1 && t.params.path.length <= 16 && (t.params.deliveryMode === void 0 || !("deliveryMode" in t.params) || typeof t.params.deliveryMode == "string" && (t.params.deliveryMode === "background" || t.params.deliveryMode === "foreground")) || typeof t.params == "object" && t.params !== null && !Array.isArray(t.params) && "action" in t.params && "windowRef" in t.params && "observationId" in t.params && "x1" in t.params && "y1" in t.params && "x2" in t.params && "y2" in t.params && Object.getOwnPropertyNames(t.params).every((t, n) => e[31].test(t) || !1) && typeof t.params.action == "string" && t.params.action === "zoom" && (t.params.executionId === void 0 || !("executionId" in t.params) || typeof t.params.executionId == "string" && e[32].test(t.params.executionId)) && typeof t.params.windowRef == "string" && (t.params.windowRef.length >= 2 || t.params.windowRef.length >= 1 && CodePointCount(t.params.windowRef) >= 1) && typeof t.params.observationId == "string" && (t.params.observationId.length >= 2 || t.params.observationId.length >= 1 && CodePointCount(t.params.observationId) >= 1) && Number.isFinite(t.params.x1) && t.params.x1 >= 0 && Number.isFinite(t.params.y1) && t.params.y1 >= 0 && Number.isFinite(t.params.x2) && t.params.x2 >= 0 && Number.isFinite(t.params.y2) && t.params.y2 >= 0 || typeof t.params == "object" && t.params !== null && !Array.isArray(t.params) && "action" in t.params && "windowRef" in t.params && Object.getOwnPropertyNames(t.params).every((t, n) => e[33].test(t) || !1) && typeof t.params.action == "string" && t.params.action === "get_browser_state" && (t.params.executionId === void 0 || !("executionId" in t.params) || typeof t.params.executionId == "string" && e[34].test(t.params.executionId)) && typeof t.params.windowRef == "string" && (t.params.windowRef.length >= 2 || t.params.windowRef.length >= 1 && CodePointCount(t.params.windowRef) >= 1) || typeof t.params == "object" && t.params !== null && !Array.isArray(t.params) && "action" in t.params && "browserRef" in t.params && "pageRef" in t.params && Object.getOwnPropertyNames(t.params).every((t, n) => e[35].test(t) || !1) && typeof t.params.action == "string" && t.params.action === "get_browser_state" && (t.params.executionId === void 0 || !("executionId" in t.params) || typeof t.params.executionId == "string" && e[36].test(t.params.executionId)) && typeof t.params.browserRef == "string" && (t.params.browserRef.length >= 2 || t.params.browserRef.length >= 1 && CodePointCount(t.params.browserRef) >= 1) && typeof t.params.pageRef == "string" && (t.params.pageRef.length >= 2 || t.params.pageRef.length >= 1 && CodePointCount(t.params.pageRef) >= 1) && (t.params.snapshotFormat === void 0 || !("snapshotFormat" in t.params) || typeof t.params.snapshotFormat == "string" && (t.params.snapshotFormat === "dom_refs_v1" || t.params.snapshotFormat === "semantic_v2")) && (t.params.elementRef === void 0 || !("elementRef" in t.params) || typeof t.params.elementRef == "string" && (t.params.elementRef.length >= 2 || t.params.elementRef.length >= 1 && CodePointCount(t.params.elementRef) >= 1)) && (t.params.observationId === void 0 || !("observationId" in t.params) || typeof t.params.observationId == "string" && (t.params.observationId.length >= 2 || t.params.observationId.length >= 1 && CodePointCount(t.params.observationId) >= 1)) && (t.params.query === void 0 || !("query" in t.params) || typeof t.params.query == "string") && (t.params.continuation === void 0 || !("continuation" in t.params) || typeof t.params.continuation == "string" && (t.params.continuation.length >= 2 || t.params.continuation.length >= 1 && CodePointCount(t.params.continuation) >= 1)) && (t.params.includeScreenshot === void 0 || !("includeScreenshot" in t.params) || typeof t.params.includeScreenshot == "boolean") || typeof t.params == "object" && t.params !== null && !Array.isArray(t.params) && "action" in t.params && "windowRef" in t.params && Object.getOwnPropertyNames(t.params).every((t, n) => e[37].test(t) || !1) && typeof t.params.action == "string" && t.params.action === "browser_prepare" && (t.params.executionId === void 0 || !("executionId" in t.params) || typeof t.params.executionId == "string" && e[38].test(t.params.executionId)) && typeof t.params.windowRef == "string" && (t.params.windowRef.length >= 2 || t.params.windowRef.length >= 1 && CodePointCount(t.params.windowRef) >= 1) && (t.params.profile === void 0 || !("profile" in t.params) || typeof t.params.profile == "string" && (t.params.profile === "isolated_new" || t.params.profile === "isolated_named")) && (t.params.profileName === void 0 || !("profileName" in t.params) || typeof t.params.profileName == "string" && (t.params.profileName.length >= 2 || t.params.profileName.length >= 1 && CodePointCount(t.params.profileName) >= 1) && (t.params.profileName.length <= 64 || t.params.profileName.length <= 128 && CodePointCount(t.params.profileName) <= 64) && e[39].test(t.params.profileName)) || typeof t.params == "object" && t.params !== null && !Array.isArray(t.params) && "action" in t.params && "browserRef" in t.params && "pageRef" in t.params && "url" in t.params && Object.getOwnPropertyNames(t.params).every((t, n) => e[40].test(t) || !1) && typeof t.params.action == "string" && t.params.action === "browser_navigate" && (t.params.executionId === void 0 || !("executionId" in t.params) || typeof t.params.executionId == "string" && e[41].test(t.params.executionId)) && typeof t.params.browserRef == "string" && (t.params.browserRef.length >= 2 || t.params.browserRef.length >= 1 && CodePointCount(t.params.browserRef) >= 1) && typeof t.params.pageRef == "string" && (t.params.pageRef.length >= 2 || t.params.pageRef.length >= 1 && CodePointCount(t.params.pageRef) >= 1) && typeof t.params.url == "string" && (t.params.url.length >= 2 || t.params.url.length >= 1 && CodePointCount(t.params.url) >= 1) || typeof t.params == "object" && t.params !== null && !Array.isArray(t.params) && "action" in t.params && "browserRef" in t.params && "pageRef" in t.params && "observationId" in t.params && Object.getOwnPropertyNames(t.params).every((t, n) => e[42].test(t) || !1) && typeof t.params.action == "string" && t.params.action === "browser_click" && (t.params.executionId === void 0 || !("executionId" in t.params) || typeof t.params.executionId == "string" && e[43].test(t.params.executionId)) && typeof t.params.browserRef == "string" && (t.params.browserRef.length >= 2 || t.params.browserRef.length >= 1 && CodePointCount(t.params.browserRef) >= 1) && typeof t.params.pageRef == "string" && (t.params.pageRef.length >= 2 || t.params.pageRef.length >= 1 && CodePointCount(t.params.pageRef) >= 1) && typeof t.params.observationId == "string" && (t.params.observationId.length >= 2 || t.params.observationId.length >= 1 && CodePointCount(t.params.observationId) >= 1) && (t.params.elementRef === void 0 || !("elementRef" in t.params) || typeof t.params.elementRef == "string" && (t.params.elementRef.length >= 2 || t.params.elementRef.length >= 1 && CodePointCount(t.params.elementRef) >= 1)) && (t.params.x === void 0 || !("x" in t.params) || Number.isFinite(t.params.x) && t.params.x >= 0) && (t.params.y === void 0 || !("y" in t.params) || Number.isFinite(t.params.y) && t.params.y >= 0) && (t.params.inputRoute === void 0 || !("inputRoute" in t.params) || typeof t.params.inputRoute == "string" && (t.params.inputRoute === "trusted" || t.params.inputRoute === "dom_event")) || typeof t.params == "object" && t.params !== null && !Array.isArray(t.params) && "action" in t.params && "browserRef" in t.params && "pageRef" in t.params && "observationId" in t.params && "elementRef" in t.params && "text" in t.params && Object.getOwnPropertyNames(t.params).every((t, n) => e[44].test(t) || !1) && typeof t.params.action == "string" && t.params.action === "browser_type" && (t.params.executionId === void 0 || !("executionId" in t.params) || typeof t.params.executionId == "string" && e[45].test(t.params.executionId)) && typeof t.params.browserRef == "string" && (t.params.browserRef.length >= 2 || t.params.browserRef.length >= 1 && CodePointCount(t.params.browserRef) >= 1) && typeof t.params.pageRef == "string" && (t.params.pageRef.length >= 2 || t.params.pageRef.length >= 1 && CodePointCount(t.params.pageRef) >= 1) && typeof t.params.observationId == "string" && (t.params.observationId.length >= 2 || t.params.observationId.length >= 1 && CodePointCount(t.params.observationId) >= 1) && typeof t.params.elementRef == "string" && (t.params.elementRef.length >= 2 || t.params.elementRef.length >= 1 && CodePointCount(t.params.elementRef) >= 1) && typeof t.params.text == "string" && (t.params.mode === void 0 || !("mode" in t.params) || typeof t.params.mode == "string" && (t.params.mode === "insert_text" || t.params.mode === "keystrokes")) && (t.params.replace === void 0 || !("replace" in t.params) || typeof t.params.replace == "boolean") || typeof t.params == "object" && t.params !== null && !Array.isArray(t.params) && "action" in t.params && "browserRef" in t.params && "pageRef" in t.params && "dialogAction" in t.params && Object.getOwnPropertyNames(t.params).every((t, n) => e[46].test(t) || !1) && typeof t.params.action == "string" && t.params.action === "browser_dialog" && (t.params.executionId === void 0 || !("executionId" in t.params) || typeof t.params.executionId == "string" && e[47].test(t.params.executionId)) && typeof t.params.browserRef == "string" && (t.params.browserRef.length >= 2 || t.params.browserRef.length >= 1 && CodePointCount(t.params.browserRef) >= 1) && typeof t.params.pageRef == "string" && (t.params.pageRef.length >= 2 || t.params.pageRef.length >= 1 && CodePointCount(t.params.pageRef) >= 1) && typeof t.params.dialogAction == "string" && t.params.dialogAction === "inspect" || typeof t.params == "object" && t.params !== null && !Array.isArray(t.params) && "action" in t.params && "browserRef" in t.params && "pageRef" in t.params && "dialogAction" in t.params && "dialogRef" in t.params && Object.getOwnPropertyNames(t.params).every((t, n) => e[48].test(t) || !1) && typeof t.params.action == "string" && t.params.action === "browser_dialog" && (t.params.executionId === void 0 || !("executionId" in t.params) || typeof t.params.executionId == "string" && e[49].test(t.params.executionId)) && typeof t.params.browserRef == "string" && (t.params.browserRef.length >= 2 || t.params.browserRef.length >= 1 && CodePointCount(t.params.browserRef) >= 1) && typeof t.params.pageRef == "string" && (t.params.pageRef.length >= 2 || t.params.pageRef.length >= 1 && CodePointCount(t.params.pageRef) >= 1) && typeof t.params.dialogAction == "string" && t.params.dialogAction === "accept" && typeof t.params.dialogRef == "string" && (t.params.dialogRef.length >= 2 || t.params.dialogRef.length >= 1 && CodePointCount(t.params.dialogRef) >= 1) && (t.params.promptText === void 0 || !("promptText" in t.params) || typeof t.params.promptText == "string") && (t.params.deliveryMode === void 0 || !("deliveryMode" in t.params) || typeof t.params.deliveryMode == "string" && (t.params.deliveryMode === "background" || t.params.deliveryMode === "foreground")) || typeof t.params == "object" && t.params !== null && !Array.isArray(t.params) && "action" in t.params && "browserRef" in t.params && "pageRef" in t.params && "dialogAction" in t.params && "dialogRef" in t.params && Object.getOwnPropertyNames(t.params).every((t, n) => e[50].test(t) || !1) && typeof t.params.action == "string" && t.params.action === "browser_dialog" && (t.params.executionId === void 0 || !("executionId" in t.params) || typeof t.params.executionId == "string" && e[51].test(t.params.executionId)) && typeof t.params.browserRef == "string" && (t.params.browserRef.length >= 2 || t.params.browserRef.length >= 1 && CodePointCount(t.params.browserRef) >= 1) && typeof t.params.pageRef == "string" && (t.params.pageRef.length >= 2 || t.params.pageRef.length >= 1 && CodePointCount(t.params.pageRef) >= 1) && typeof t.params.dialogAction == "string" && t.params.dialogAction === "dismiss" && typeof t.params.dialogRef == "string" && (t.params.dialogRef.length >= 2 || t.params.dialogRef.length >= 1 && CodePointCount(t.params.dialogRef) >= 1) && (t.params.deliveryMode === void 0 || !("deliveryMode" in t.params) || typeof t.params.deliveryMode == "string" && (t.params.deliveryMode === "background" || t.params.deliveryMode === "foreground")) || typeof t.params == "object" && t.params !== null && !Array.isArray(t.params) && "action" in t.params && "browserRef" in t.params && "pageRef" in t.params && "observationId" in t.params && "elementRef" in t.params && "resourceHandles" in t.params && Object.getOwnPropertyNames(t.params).every((t, n) => e[52].test(t) || !1) && typeof t.params.action == "string" && t.params.action === "browser_set_input_files" && (t.params.executionId === void 0 || !("executionId" in t.params) || typeof t.params.executionId == "string" && e[53].test(t.params.executionId)) && typeof t.params.browserRef == "string" && (t.params.browserRef.length >= 2 || t.params.browserRef.length >= 1 && CodePointCount(t.params.browserRef) >= 1) && typeof t.params.pageRef == "string" && (t.params.pageRef.length >= 2 || t.params.pageRef.length >= 1 && CodePointCount(t.params.pageRef) >= 1) && typeof t.params.observationId == "string" && (t.params.observationId.length >= 2 || t.params.observationId.length >= 1 && CodePointCount(t.params.observationId) >= 1) && typeof t.params.elementRef == "string" && (t.params.elementRef.length >= 2 || t.params.elementRef.length >= 1 && CodePointCount(t.params.elementRef) >= 1) && Array.isArray(t.params.resourceHandles) && t.params.resourceHandles.every((t, n) => typeof t == "string" && e[54].test(t)) && t.params.resourceHandles.length >= 1 && t.params.resourceHandles.length <= 32 || typeof t.params == "object" && t.params !== null && !Array.isArray(t.params) && "action" in t.params && "browserRef" in t.params && "pageRef" in t.params && "observationId" in t.params && "elementRef" in t.params && Object.getOwnPropertyNames(t.params).every((t, n) => e[55].test(t) || !1) && typeof t.params.action == "string" && t.params.action === "browser_download" && (t.params.executionId === void 0 || !("executionId" in t.params) || typeof t.params.executionId == "string" && e[56].test(t.params.executionId)) && typeof t.params.browserRef == "string" && (t.params.browserRef.length >= 2 || t.params.browserRef.length >= 1 && CodePointCount(t.params.browserRef) >= 1) && typeof t.params.pageRef == "string" && (t.params.pageRef.length >= 2 || t.params.pageRef.length >= 1 && CodePointCount(t.params.pageRef) >= 1) && typeof t.params.observationId == "string" && (t.params.observationId.length >= 2 || t.params.observationId.length >= 1 && CodePointCount(t.params.observationId) >= 1) && typeof t.params.elementRef == "string" && (t.params.elementRef.length >= 2 || t.params.elementRef.length >= 1 && CodePointCount(t.params.elementRef) >= 1) || typeof t.params == "object" && t.params !== null && !Array.isArray(t.params) && "action" in t.params && "browserRef" in t.params && "pageRef" in t.params && "observationId" in t.params && "pointerAction" in t.params && Object.getOwnPropertyNames(t.params).every((t, n) => e[57].test(t) || !1) && typeof t.params.action == "string" && t.params.action === "browser_pointer" && (t.params.executionId === void 0 || !("executionId" in t.params) || typeof t.params.executionId == "string" && e[58].test(t.params.executionId)) && typeof t.params.browserRef == "string" && (t.params.browserRef.length >= 2 || t.params.browserRef.length >= 1 && CodePointCount(t.params.browserRef) >= 1) && typeof t.params.pageRef == "string" && (t.params.pageRef.length >= 2 || t.params.pageRef.length >= 1 && CodePointCount(t.params.pageRef) >= 1) && typeof t.params.observationId == "string" && (t.params.observationId.length >= 2 || t.params.observationId.length >= 1 && CodePointCount(t.params.observationId) >= 1) && typeof t.params.pointerAction == "string" && (t.params.pointerAction === "hover" || t.params.pointerAction === "right_click" || t.params.pointerAction === "double_click" || t.params.pointerAction === "scroll" || t.params.pointerAction === "drag") && (t.params.inputRoute === void 0 || !("inputRoute" in t.params) || typeof t.params.inputRoute == "string" && (t.params.inputRoute === "trusted" || t.params.inputRoute === "dom_event")) && (t.params.elementRef === void 0 || !("elementRef" in t.params) || typeof t.params.elementRef == "string" && (t.params.elementRef.length >= 2 || t.params.elementRef.length >= 1 && CodePointCount(t.params.elementRef) >= 1)) && (t.params.x === void 0 || !("x" in t.params) || Number.isFinite(t.params.x) && t.params.x >= 0) && (t.params.y === void 0 || !("y" in t.params) || Number.isFinite(t.params.y) && t.params.y >= 0) && (t.params.destinationElementRef === void 0 || !("destinationElementRef" in t.params) || typeof t.params.destinationElementRef == "string" && (t.params.destinationElementRef.length >= 2 || t.params.destinationElementRef.length >= 1 && CodePointCount(t.params.destinationElementRef) >= 1)) && (t.params.toX === void 0 || !("toX" in t.params) || Number.isFinite(t.params.toX) && t.params.toX >= 0) && (t.params.toY === void 0 || !("toY" in t.params) || Number.isFinite(t.params.toY) && t.params.toY >= 0) && (t.params.deltaX === void 0 || !("deltaX" in t.params) || Number.isFinite(t.params.deltaX)) && (t.params.deltaY === void 0 || !("deltaY" in t.params) || Number.isFinite(t.params.deltaY)) || typeof t.params == "object" && t.params !== null && !Array.isArray(t.params) && "action" in t.params && "reason" in t.params && Object.getOwnPropertyNames(t.params).every((t, n) => e[59].test(t) || !1) && typeof t.params.action == "string" && t.params.action === "escalate_scope" && (t.params.executionId === void 0 || !("executionId" in t.params) || typeof t.params.executionId == "string" && e[60].test(t.params.executionId)) && typeof t.params.reason == "string" && (t.params.reason === "ax_tree_pixel_mismatch" || t.params.reason === "background_delivery_failed" || t.params.reason === "foreground_ineffective" || t.params.reason === "no_window_target" || t.params.reason === "other") || typeof t.params == "object" && t.params !== null && !Array.isArray(t.params) && "action" in t.params && Object.getOwnPropertyNames(t.params).every((t, n) => e[61].test(t) || !1) && typeof t.params.action == "string" && (t.params.action === "get_recording_state" || t.params.action === "stop_recording") && (t.params.executionId === void 0 || !("executionId" in t.params) || typeof t.params.executionId == "string" && e[62].test(t.params.executionId)) || typeof t.params == "object" && t.params !== null && !Array.isArray(t.params) && "action" in t.params && Object.getOwnPropertyNames(t.params).every((t, n) => e[63].test(t) || !1) && typeof t.params.action == "string" && t.params.action === "start_recording" && (t.params.executionId === void 0 || !("executionId" in t.params) || typeof t.params.executionId == "string" && e[64].test(t.params.executionId)) && (t.params.recordVideo === void 0 || !("recordVideo" in t.params) || typeof t.params.recordVideo == "boolean") || typeof t.params == "object" && t.params !== null && !Array.isArray(t.params) && "action" in t.params && "resourceHandle" in t.params && Object.getOwnPropertyNames(t.params).every((t, n) => e[65].test(t) || !1) && typeof t.params.action == "string" && t.params.action === "replay_trajectory" && (t.params.executionId === void 0 || !("executionId" in t.params) || typeof t.params.executionId == "string" && e[66].test(t.params.executionId)) && typeof t.params.resourceHandle == "string" && e[67].test(t.params.resourceHandle) && (t.params.delayMs === void 0 || !("delayMs" in t.params) || Number.isInteger(t.params.delayMs) && (!(Number.isFinite(t.params.delayMs) || typeof t.params.delayMs == "bigint") || t.params.delayMs >= 0 && t.params.delayMs <= 1e4)) && (t.params.stopOnError === void 0 || !("stopOnError" in t.params) || typeof t.params.stopOnError == "boolean")) && typeof t.params == "object" && t.params !== null && !Array.isArray(t.params) && "executionId" in t.params && typeof t.params.executionId == "string" && e[68].test(t.params.executionId) || typeof t == "object" && t !== null && !Array.isArray(t) && "operation" in t && "executionId" in t && "reason" in t && Object.getOwnPropertyNames(t).length === 3 && typeof t.operation == "string" && t.operation === "close" && typeof t.executionId == "string" && e[69].test(t.executionId) && typeof t.reason == "string" && (t.reason.length >= 2 || t.reason.length >= 1 && CodePointCount(t.reason) >= 1) && (t.reason.length <= 64 || t.reason.length <= 128 && CodePointCount(t.reason) <= 64);
return (e) => check_0(e);
})();
//#endregion
//#region src/worker/node-computer-schemas.ts
const ExecutionOwnerSchema = Type.Required(Type.Pick(ScreenSnapshotParamsSchema, ["executionId"]));
const ExecutionCloseFields = {
...ExecutionOwnerSchema.properties,
reason: Type.String({
minLength: 1,
maxLength: 64
})
};
const NodeWorkerComputerCloseParamsSchema = Type.Object({
action: Type.Literal("__close_execution"),
...ExecutionCloseFields
}, { additionalProperties: false });
const NodeWorkerComputerInputSchema = Type.Union([
Type.Object({ operation: Type.Literal("capabilities") }, { additionalProperties: false }),
Type.Object({
operation: Type.Literal("snapshot"),
providerGeneration: ComputerUseCapabilityDescriptorSchema.properties.provider.properties.generation,
params: Type.Intersect([ScreenSnapshotParamsSchema, ExecutionOwnerSchema])
}, { additionalProperties: false }),
Type.Object({
operation: Type.Literal("act"),
providerGeneration: ComputerUseCapabilityDescriptorSchema.properties.provider.properties.generation,
params: Type.Intersect([ComputerActParamsSchema, ExecutionOwnerSchema])
}, { additionalProperties: false }),
Type.Object({
operation: Type.Literal("close"),
...ExecutionCloseFields
}, { additionalProperties: false })
]);
//#endregion
//#region src/worker/node-computer-protocol.ts
/** Private carrier for the existing registered Computer Use provider, never arbitrary node commands. */
function parseNodeWorkerComputerInput(e) {
if (!e || Buffer.byteLength(e, "utf8") > 131072) throw new Error("INVALID_REQUEST: invalid worker computer request size");
let t;
try {
t = JSON.parse(e);
} catch {
throw new Error("INVALID_REQUEST: malformed worker computer request");
}
if (!isNodeWorkerComputerInput(t)) throw new Error("INVALID_REQUEST: invalid worker computer request");
return t;
}
//#endregion
export { NodeWorkerComputerCloseParamsSchema as n, parseNodeWorkerComputerInput as t };