@qawolf/api-contracts 0.71.0 → 0.73.0
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/dist/v1/index.d.ts +128 -4
- package/dist/v1/index.d.ts.map +1 -1
- package/dist/v1/issue/create.d.ts +24 -0
- package/dist/v1/issue/create.d.ts.map +1 -1
- package/dist/v1/issue/create.js +16 -3
- package/dist/v1/issue/create.js.map +1 -1
- package/dist/v1/run/find.d.ts +1 -0
- package/dist/v1/run/find.d.ts.map +1 -1
- package/dist/v1/run/get.d.ts +1 -0
- package/dist/v1/run/get.d.ts.map +1 -1
- package/dist/v1/run/summary.d.ts +1 -0
- package/dist/v1/run/summary.d.ts.map +1 -1
- package/dist/v1/run/summary.js +5 -1
- package/dist/v1/run/summary.js.map +1 -1
- package/dist/v1/runner/browserAction.d.ts +5 -0
- package/dist/v1/runner/browserAction.d.ts.map +1 -1
- package/dist/v1/runner/browserAction.js +5 -5
- package/dist/v1/runner/browserAction.js.map +1 -1
- package/dist/v1/runner/catalog.d.ts +38 -2
- package/dist/v1/runner/catalog.d.ts.map +1 -1
- package/dist/v1/runner/identity.d.ts +2 -0
- package/dist/v1/runner/identity.d.ts.map +1 -1
- package/dist/v1/runner/identity.js +1 -0
- package/dist/v1/runner/identity.js.map +1 -1
- package/dist/v1/runner/index.d.ts +2 -0
- package/dist/v1/runner/index.d.ts.map +1 -1
- package/dist/v1/runner/inspectMobile.d.ts +6 -0
- package/dist/v1/runner/inspectMobile.d.ts.map +1 -1
- package/dist/v1/runner/inspectMobile.js +5 -1
- package/dist/v1/runner/inspectMobile.js.map +1 -1
- package/dist/v1/runner/list.d.ts +1 -0
- package/dist/v1/runner/list.d.ts.map +1 -1
- package/dist/v1/runner/performAction.d.ts +32 -1
- package/dist/v1/runner/performAction.d.ts.map +1 -1
- package/dist/v1/runner/performAction.js +6 -4
- package/dist/v1/runner/performAction.js.map +1 -1
- package/dist/v1/runner/runFlow.d.ts +2 -0
- package/dist/v1/runner/runFlow.d.ts.map +1 -1
- package/dist/v1/runner/runnerAction.d.ts +74 -0
- package/dist/v1/runner/runnerAction.d.ts.map +1 -0
- package/dist/v1/runner/runnerAction.js +94 -0
- package/dist/v1/runner/runnerAction.js.map +1 -0
- package/dist/v1/runner/screen.d.ts +1 -1
- package/dist/v1/runner/screen.d.ts.map +1 -1
- package/dist/v1/runner/screen.js +1 -1
- package/dist/v1/runner/screen.js.map +1 -1
- package/dist/v1/runner/takeScreenshot.d.ts +1 -1
- package/dist/v1/runnerReexports.d.ts +1 -0
- package/dist/v1/runnerReexports.d.ts.map +1 -1
- package/dist/v1/runnerReexports.js +1 -0
- package/dist/v1/runnerReexports.js.map +1 -1
- package/package.json +1 -1
|
@@ -40,12 +40,14 @@ export declare const makeRunnerContracts: <FlowId extends PublicIdSchema, Worksp
|
|
|
40
40
|
playwright: "playwright";
|
|
41
41
|
android: "android";
|
|
42
42
|
ios: "ios";
|
|
43
|
+
windows: "windows";
|
|
43
44
|
}>;
|
|
44
45
|
runnerName: import("zod").ZodEnum<{
|
|
45
46
|
basic: "basic";
|
|
46
47
|
playwright: "playwright";
|
|
47
48
|
android: "android";
|
|
48
49
|
ios: "ios";
|
|
50
|
+
windows: "windows";
|
|
49
51
|
}>;
|
|
50
52
|
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
51
53
|
failureReason: import("zod").ZodLiteral<"needs-full-sync">;
|
|
@@ -85,7 +87,7 @@ export declare const makeRunnerContracts: <FlowId extends PublicIdSchema, Worksp
|
|
|
85
87
|
readonly openWorldHint: false;
|
|
86
88
|
readonly readOnlyHint: false;
|
|
87
89
|
};
|
|
88
|
-
readonly description: "Take one screenshot of an interactive runner's screen. On a runner with a browser the image is the whole virtual desktop, browser window and all; this refreshes the inactivity timer and can extend the runner's billed lifetime. On a mobile runner it is the device's own screen, re-encoded to JPEG on the pod so this contract reads one image format regardless of runner family. `screen-needs-a-run` if the runner's virtual desktop has never started. Waiting will not change this and retrying is pointless — call `runner.runFlow` with a flow that opens a browser, then ask for the screen again. On a runner image with a browser that has never run anything, any `runner.performAction` also starts the browser itself. Evaluating a snippet does not start the desktop. `screen-not-ready` if the runner has a screen that cannot serve this instant. Retry in a second or two: the desktop restarts when a run changes the display size, and it serves one see-or-act request at a time, so a screenshot or action already in flight is the usual reason. Do not submit a run to clear this — a run may restart the display and discard what is on it. `runner-has-no-screen` if this runner
|
|
90
|
+
readonly description: "Take one screenshot of an interactive runner's screen. On a runner with a browser the image is the whole virtual desktop, browser window and all; this refreshes the inactivity timer and can extend the runner's billed lifetime. On a mobile runner it is the device's own screen, re-encoded to JPEG on the pod so this contract reads one image format regardless of runner family. `screen-needs-a-run` if the runner's virtual desktop has never started. Waiting will not change this and retrying is pointless — call `runner.runFlow` with a flow that opens a browser, then ask for the screen again. On a runner image with a browser that has never run anything, any `runner.performAction` also starts the browser itself. Evaluating a snippet does not start the desktop. `screen-not-ready` if the runner has a screen that cannot serve this instant. Retry in a second or two: the desktop restarts when a run changes the display size, and it serves one see-or-act request at a time, so a screenshot or action already in flight is the usual reason. Do not submit a run to clear this — a run may restart the display and discard what is on it. `runner-has-no-screen` if this runner has no browser desktop to see or drive, and retrying will never help. Launch a `playwright` runner, or on `windows` use `runner.runFlow`. `runner-unreachable` if the runner could not be reached: it may still be starting, it may have terminated after inactivity, or it may be too busy to answer. Nothing was changed, so retrying is safe; if it persists, launch the runner again.";
|
|
89
91
|
readonly input: import("zod").ZodObject<{
|
|
90
92
|
id: import("zod").ZodString;
|
|
91
93
|
workspaceId: import("zod").ZodOptional<WorkspaceId>;
|
|
@@ -623,6 +625,7 @@ export declare const makeRunnerContracts: <FlowId extends PublicIdSchema, Worksp
|
|
|
623
625
|
playwright: "playwright";
|
|
624
626
|
android: "android";
|
|
625
627
|
ios: "ios";
|
|
628
|
+
windows: "windows";
|
|
626
629
|
}>>;
|
|
627
630
|
workspaceId: import("zod").ZodOptional<WorkspaceId>;
|
|
628
631
|
}, import("zod/v4/core").$strip>;
|
|
@@ -636,6 +639,7 @@ export declare const makeRunnerContracts: <FlowId extends PublicIdSchema, Worksp
|
|
|
636
639
|
playwright: "playwright";
|
|
637
640
|
android: "android";
|
|
638
641
|
ios: "ios";
|
|
642
|
+
windows: "windows";
|
|
639
643
|
}>;
|
|
640
644
|
url: import("zod").ZodURL;
|
|
641
645
|
alreadyRunning: import("zod").ZodBoolean;
|
|
@@ -664,6 +668,7 @@ export declare const makeRunnerContracts: <FlowId extends PublicIdSchema, Worksp
|
|
|
664
668
|
playwright: "playwright";
|
|
665
669
|
android: "android";
|
|
666
670
|
ios: "ios";
|
|
671
|
+
windows: "windows";
|
|
667
672
|
}>;
|
|
668
673
|
url: import("zod").ZodURL;
|
|
669
674
|
}, import("zod/v4/core").$strip>>;
|
|
@@ -675,7 +680,7 @@ export declare const makeRunnerContracts: <FlowId extends PublicIdSchema, Worksp
|
|
|
675
680
|
readonly openWorldHint: true;
|
|
676
681
|
readonly readOnlyHint: false;
|
|
677
682
|
};
|
|
678
|
-
readonly description: "Perform one raw
|
|
683
|
+
readonly description: "Perform one raw action on an interactive runner: click, double_click, move, drag, scroll, keypress, type, or navigate; on mobile, tap, swipe, fill, or type. One action per request, and the runner serves one at a time. A success means the action took effect. `action-failed`, with a reason, if it reached the runner and did not take effect. On a runner image with a browser, the first action on a runner that has never run anything starts its browser and waits for it, so it can take up to a minute to answer — no `runner.runFlow` is needed before acting; if the browser is still starting when the wait runs out, the answer is `screen-not-ready` and retrying converges. On a mobile runner, the same `screen-needs-a-run` and `screen-not-ready` outcomes mean no Appium session has started yet, or it did not answer this instant; `runner.runFlow` is what starts one, same as a browser. `screen-needs-a-run` if the browser could not be started that way — usually a runner whose runs all finished without starting its desktop; call `runner.runFlow` with a flow that opens a browser. `screen-not-ready` if the runner has a screen that cannot serve this instant. Retry in a second or two: the desktop restarts when a run changes the display size, and it serves one see-or-act request at a time, so a screenshot or action already in flight is the usual reason. Do not submit a run to clear this — a run may restart the display and discard what is on it. `runner-has-no-screen` if this runner has no browser desktop to see or drive, and retrying will never help. Launch a `playwright` runner, or on `windows` use `runner.runFlow`. `runner-unreachable` if the runner could not be reached: it may still be starting, it may have terminated after inactivity, or it may have stopped answering mid-action. This does not mean the action was not performed — take a screenshot before repeating it.";
|
|
679
684
|
readonly input: import("zod").ZodObject<{
|
|
680
685
|
action: import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
|
|
681
686
|
button: import("zod").ZodLiteral<"left" | "right" | "wheel" | "back" | "forward">;
|
|
@@ -711,6 +716,36 @@ export declare const makeRunnerContracts: <FlowId extends PublicIdSchema, Worksp
|
|
|
711
716
|
}, import("zod/v4/core").$strict>, import("zod").ZodObject<{
|
|
712
717
|
text: import("zod").ZodString;
|
|
713
718
|
type: import("zod").ZodLiteral<"type">;
|
|
719
|
+
}, import("zod/v4/core").$strict>, import("zod").ZodObject<{
|
|
720
|
+
selector: import("zod").ZodOptional<import("zod").ZodString>;
|
|
721
|
+
strategy: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
722
|
+
"ios-predicate": "ios-predicate";
|
|
723
|
+
shadow: "shadow";
|
|
724
|
+
xpath: "xpath";
|
|
725
|
+
}>>;
|
|
726
|
+
type: import("zod").ZodLiteral<"tap">;
|
|
727
|
+
x: import("zod").ZodOptional<import("zod").ZodInt>;
|
|
728
|
+
y: import("zod").ZodOptional<import("zod").ZodInt>;
|
|
729
|
+
}, import("zod/v4/core").$strict>, import("zod").ZodObject<{
|
|
730
|
+
duration_ms: import("zod").ZodOptional<import("zod").ZodInt>;
|
|
731
|
+
from: import("zod").ZodObject<{
|
|
732
|
+
x: import("zod").ZodInt;
|
|
733
|
+
y: import("zod").ZodInt;
|
|
734
|
+
}, import("zod/v4/core").$strict>;
|
|
735
|
+
to: import("zod").ZodObject<{
|
|
736
|
+
x: import("zod").ZodInt;
|
|
737
|
+
y: import("zod").ZodInt;
|
|
738
|
+
}, import("zod/v4/core").$strict>;
|
|
739
|
+
type: import("zod").ZodLiteral<"swipe">;
|
|
740
|
+
}, import("zod/v4/core").$strict>, import("zod").ZodObject<{
|
|
741
|
+
selector: import("zod").ZodString;
|
|
742
|
+
strategy: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
743
|
+
"ios-predicate": "ios-predicate";
|
|
744
|
+
shadow: "shadow";
|
|
745
|
+
xpath: "xpath";
|
|
746
|
+
}>>;
|
|
747
|
+
text: import("zod").ZodString;
|
|
748
|
+
type: import("zod").ZodLiteral<"fill">;
|
|
714
749
|
}, import("zod/v4/core").$strict>], "type">;
|
|
715
750
|
id: import("zod").ZodString;
|
|
716
751
|
withScreenshot: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
@@ -733,6 +768,7 @@ export declare const makeRunnerContracts: <FlowId extends PublicIdSchema, Worksp
|
|
|
733
768
|
"screen-not-ready": "screen-not-ready";
|
|
734
769
|
"runner-has-no-screen": "runner-has-no-screen";
|
|
735
770
|
"action-not-supported-on-mobile": "action-not-supported-on-mobile";
|
|
771
|
+
"action-not-supported-on-browser": "action-not-supported-on-browser";
|
|
736
772
|
}>;
|
|
737
773
|
outcome: import("zod").ZodLiteral<"failure">;
|
|
738
774
|
}, import("zod/v4/core").$strip>], "failureReason">], "outcome">;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"catalog.d.ts","sourceRoot":"","sources":["../../../src/v1/runner/catalog.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAsBhD,eAAO,MAAM,mBAAmB,GAC9B,MAAM,SAAS,cAAc,EAC7B,WAAW,SAAS,cAAc,EAClC,KAAK;IACL,cAAc,EAAE,cAAc,CAAC;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,WAAW,CAAC;CACxB
|
|
1
|
+
{"version":3,"file":"catalog.d.ts","sourceRoot":"","sources":["../../../src/v1/runner/catalog.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkBC,CAAC"}
|
|
@@ -4,6 +4,7 @@ export declare const runnerNameSchema: z.ZodEnum<{
|
|
|
4
4
|
playwright: "playwright";
|
|
5
5
|
android: "android";
|
|
6
6
|
ios: "ios";
|
|
7
|
+
windows: "windows";
|
|
7
8
|
}>;
|
|
8
9
|
export type RunnerNameForPublicApi = z.infer<typeof runnerNameSchema>;
|
|
9
10
|
export declare const runnerWorkspaceRequirement = "Read it from whoami.";
|
|
@@ -19,6 +20,7 @@ export declare const makeRunnerSchema: () => z.ZodObject<{
|
|
|
19
20
|
playwright: "playwright";
|
|
20
21
|
android: "android";
|
|
21
22
|
ios: "ios";
|
|
23
|
+
windows: "windows";
|
|
22
24
|
}>;
|
|
23
25
|
url: z.ZodURL;
|
|
24
26
|
}, z.core.$strip>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"identity.d.ts","sourceRoot":"","sources":["../../../src/v1/runner/identity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,gBAAgB
|
|
1
|
+
{"version":3,"file":"identity.d.ts","sourceRoot":"","sources":["../../../src/v1/runner/identity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,gBAAgB;;;;;;EAM3B,CAAC;AAEH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAEtE,eAAO,MAAM,0BAA0B,yBAAyB,CAAC;AAEjE,eAAO,MAAM,4BAA4B,8DAAuE,CAAC;AAEjH,eAAO,MAAM,cAAc,aAOxB,CAAC;AAEJ,eAAO,MAAM,oBAAoB,UAI9B,CAAC;AAEJ,2CAA2C;AAC3C,eAAO,MAAM,gBAAgB;;;;;;;;;;;iBAczB,CAAC"}
|
|
@@ -4,6 +4,7 @@ export const runnerNameSchema = z.enum([
|
|
|
4
4
|
"playwright",
|
|
5
5
|
"android",
|
|
6
6
|
"ios",
|
|
7
|
+
"windows",
|
|
7
8
|
]);
|
|
8
9
|
export const runnerWorkspaceRequirement = "Read it from whoami.";
|
|
9
10
|
export const runnerWorkspaceIdDescription = `The workspace the runner belongs to. ${runnerWorkspaceRequirement}`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"identity.js","sourceRoot":"","sources":["../../../src/v1/runner/identity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC,IAAI,CAAC;IACrC,OAAO;IACP,YAAY;IACZ,SAAS;IACT,KAAK;
|
|
1
|
+
{"version":3,"file":"identity.js","sourceRoot":"","sources":["../../../src/v1/runner/identity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC,IAAI,CAAC;IACrC,OAAO;IACP,YAAY;IACZ,SAAS;IACT,KAAK;IACL,SAAS;CACV,CAAC,CAAC;AAIH,MAAM,CAAC,MAAM,0BAA0B,GAAG,sBAAsB,CAAC;AAEjE,MAAM,CAAC,MAAM,4BAA4B,GAAG,wCAAwC,0BAA0B,EAAE,CAAC;AAEjH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC;KAC5B,MAAM,EAAE;KACR,GAAG,CAAC,CAAC,CAAC;KACN,GAAG,CAAC,EAAE,CAAC;KACP,KAAK,CACJ,iCAAiC,EACjC,mHAAmH,CACpH,CAAC;AAEJ,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC;KAClC,GAAG,EAAE;KACL,QAAQ,CACP,skBAAskB,CACvkB,CAAC;AAEJ,2CAA2C;AAC3C,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAG,EAAE,CACnC,CAAC,CAAC,MAAM,CAAC;IACP,cAAc,EAAE,CAAC;SACd,OAAO,EAAE;SACT,QAAQ,CACP,+IAA+I,CAChJ;IACH,EAAE,EAAE,cAAc,CAAC,QAAQ,CACzB,iDAAiD,CAClD;IACD,UAAU,EAAE,gBAAgB,CAAC,QAAQ,CACnC,gIAAgI,CACjI;IACD,GAAG,EAAE,oBAAoB;CAC1B,CAAC,CAAC"}
|
|
@@ -17,6 +17,7 @@ export declare const makeLaunchRunnerContract: <WorkspaceId extends PublicIdSche
|
|
|
17
17
|
playwright: "playwright";
|
|
18
18
|
android: "android";
|
|
19
19
|
ios: "ios";
|
|
20
|
+
windows: "windows";
|
|
20
21
|
}>>;
|
|
21
22
|
workspaceId: z.ZodOptional<WorkspaceId>;
|
|
22
23
|
}, z.core.$strip>;
|
|
@@ -30,6 +31,7 @@ export declare const makeLaunchRunnerContract: <WorkspaceId extends PublicIdSche
|
|
|
30
31
|
playwright: "playwright";
|
|
31
32
|
android: "android";
|
|
32
33
|
ios: "ios";
|
|
34
|
+
windows: "windows";
|
|
33
35
|
}>;
|
|
34
36
|
url: z.ZodURL;
|
|
35
37
|
alreadyRunning: z.ZodBoolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/v1/runner/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAWhD,eAAO,MAAM,wBAAwB,GACnC,WAAW,SAAS,cAAc,EAClC,KAAK;IACL,SAAS,EAAE,WAAW,CAAC;CACxB
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/v1/runner/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAWhD,eAAO,MAAM,wBAAwB,GACnC,WAAW,SAAS,cAAc,EAClC,KAAK;IACL,SAAS,EAAE,WAAW,CAAC;CACxB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2DA,CAAC;AAEF,eAAO,MAAM,2BAA2B,GACtC,WAAW,SAAS,cAAc,EAClC,KAAK;IACL,SAAS,EAAE,WAAW,CAAC;CACxB;;;;;;;;;;;;;;;;;;CAmCA,CAAC"}
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import type { PublicIdSchema } from "../ids.js";
|
|
3
|
+
/** Duplicated from the private `domain-runner-types` package, which this published one can't import. */
|
|
4
|
+
export declare const selectorStrategySchema: z.ZodEnum<{
|
|
5
|
+
"ios-predicate": "ios-predicate";
|
|
6
|
+
shadow: "shadow";
|
|
7
|
+
xpath: "xpath";
|
|
8
|
+
}>;
|
|
3
9
|
export declare const inspectMobileRequestSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
4
10
|
what: z.ZodLiteral<"session">;
|
|
5
11
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inspectMobile.d.ts","sourceRoot":"","sources":["../../../src/v1/runner/inspectMobile.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"inspectMobile.d.ts","sourceRoot":"","sources":["../../../src/v1/runner/inspectMobile.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAuBhD,wGAAwG;AACxG,eAAO,MAAM,sBAAsB;;;;EAIjC,CAAC;AAsCH,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mCA0BrC,CAAC;AA4CH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAE9E,eAAO,MAAM,iCAAiC,GAC5C,WAAW,SAAS,cAAc,EAClC,KAAK;IACL,SAAS,EAAE,WAAW,CAAC;CACxB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqCA,CAAC"}
|
|
@@ -11,7 +11,11 @@ import { retryableRunnerUnreachableDescription, runnerUnreachableFailureReason,
|
|
|
11
11
|
*/
|
|
12
12
|
const maxElementTextLength = 500;
|
|
13
13
|
/** Duplicated from the private `domain-runner-types` package, which this published one can't import. */
|
|
14
|
-
const selectorStrategySchema = z.enum([
|
|
14
|
+
export const selectorStrategySchema = z.enum([
|
|
15
|
+
"ios-predicate",
|
|
16
|
+
"shadow",
|
|
17
|
+
"xpath",
|
|
18
|
+
]);
|
|
15
19
|
/** Wire-level discriminant only: a `discriminatedUnion` can't nest a plain union, so this stays even though no CLI flag names it. */
|
|
16
20
|
const elementsRequestSchema = z
|
|
17
21
|
.discriminatedUnion("by", [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inspectMobile.js","sourceRoot":"","sources":["../../../src/v1/runner/inspectMobile.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,OAAO,EAAE,cAAc,EAAE,4BAA4B,EAAE,MAAM,eAAe,CAAC;AAC7E,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CA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,CAAC,CAAC;IAEH,MAAM,MAAM,GAAG,CAAC,CAAC,kBAAkB,CAAC,SAAS,EAAE;QAC7C,yBAAyB;QACzB,uBAAuB,CAAC;YACtB,kBAAkB;YAClB,sBAAsB;YACtB,oBAAoB;YACpB,kBAAkB;YAClB,8BAA8B;SAC/B,CAAC;KACH,CAAC,CAAC;IAEH,OAAO;QACL,WAAW,EAAE;YACX,eAAe,EAAE,KAAK;YACtB,aAAa,EAAE,KAAK;YACpB,YAAY,EAAE,IAAI;SACnB;QACD,WAAW,EAAE,49CAA49C,qCAAqC,EAAE;QAChhD,KAAK;QACL,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,sBAAsB;QAC5B,MAAM;KAMP,CAAC;AACJ,CAAC,CAAC"}
|
package/dist/v1/runner/list.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../src/v1/runner/list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAIhD,eAAO,MAAM,uBAAuB,GAClC,WAAW,SAAS,cAAc,EAClC,KAAK;IACL,SAAS,EAAE,WAAW,CAAC;CACxB
|
|
1
|
+
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../src/v1/runner/list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAIhD,eAAO,MAAM,uBAAuB,GAClC,WAAW,SAAS,cAAc,EAClC,KAAK;IACL,SAAS,EAAE,WAAW,CAAC;CACxB;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoCA,CAAC"}
|
|
@@ -10,7 +10,7 @@ export declare const makePerformActionOnRunnerContract: <WorkspaceId extends Pub
|
|
|
10
10
|
readonly openWorldHint: true;
|
|
11
11
|
readonly readOnlyHint: false;
|
|
12
12
|
};
|
|
13
|
-
readonly description: "Perform one raw
|
|
13
|
+
readonly description: "Perform one raw action on an interactive runner: click, double_click, move, drag, scroll, keypress, type, or navigate; on mobile, tap, swipe, fill, or type. One action per request, and the runner serves one at a time. A success means the action took effect. `action-failed`, with a reason, if it reached the runner and did not take effect. On a runner image with a browser, the first action on a runner that has never run anything starts its browser and waits for it, so it can take up to a minute to answer — no `runner.runFlow` is needed before acting; if the browser is still starting when the wait runs out, the answer is `screen-not-ready` and retrying converges. On a mobile runner, the same `screen-needs-a-run` and `screen-not-ready` outcomes mean no Appium session has started yet, or it did not answer this instant; `runner.runFlow` is what starts one, same as a browser. `screen-needs-a-run` if the browser could not be started that way — usually a runner whose runs all finished without starting its desktop; call `runner.runFlow` with a flow that opens a browser. `screen-not-ready` if the runner has a screen that cannot serve this instant. Retry in a second or two: the desktop restarts when a run changes the display size, and it serves one see-or-act request at a time, so a screenshot or action already in flight is the usual reason. Do not submit a run to clear this — a run may restart the display and discard what is on it. `runner-has-no-screen` if this runner has no browser desktop to see or drive, and retrying will never help. Launch a `playwright` runner, or on `windows` use `runner.runFlow`. `runner-unreachable` if the runner could not be reached: it may still be starting, it may have terminated after inactivity, or it may have stopped answering mid-action. This does not mean the action was not performed — take a screenshot before repeating it.";
|
|
14
14
|
readonly input: z.ZodObject<{
|
|
15
15
|
action: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
16
16
|
button: z.ZodLiteral<"left" | "right" | "wheel" | "back" | "forward">;
|
|
@@ -46,6 +46,36 @@ export declare const makePerformActionOnRunnerContract: <WorkspaceId extends Pub
|
|
|
46
46
|
}, z.core.$strict>, z.ZodObject<{
|
|
47
47
|
text: z.ZodString;
|
|
48
48
|
type: z.ZodLiteral<"type">;
|
|
49
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
50
|
+
selector: z.ZodOptional<z.ZodString>;
|
|
51
|
+
strategy: z.ZodOptional<z.ZodEnum<{
|
|
52
|
+
"ios-predicate": "ios-predicate";
|
|
53
|
+
shadow: "shadow";
|
|
54
|
+
xpath: "xpath";
|
|
55
|
+
}>>;
|
|
56
|
+
type: z.ZodLiteral<"tap">;
|
|
57
|
+
x: z.ZodOptional<z.ZodInt>;
|
|
58
|
+
y: z.ZodOptional<z.ZodInt>;
|
|
59
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
60
|
+
duration_ms: z.ZodOptional<z.ZodInt>;
|
|
61
|
+
from: z.ZodObject<{
|
|
62
|
+
x: z.ZodInt;
|
|
63
|
+
y: z.ZodInt;
|
|
64
|
+
}, z.core.$strict>;
|
|
65
|
+
to: z.ZodObject<{
|
|
66
|
+
x: z.ZodInt;
|
|
67
|
+
y: z.ZodInt;
|
|
68
|
+
}, z.core.$strict>;
|
|
69
|
+
type: z.ZodLiteral<"swipe">;
|
|
70
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
71
|
+
selector: z.ZodString;
|
|
72
|
+
strategy: z.ZodOptional<z.ZodEnum<{
|
|
73
|
+
"ios-predicate": "ios-predicate";
|
|
74
|
+
shadow: "shadow";
|
|
75
|
+
xpath: "xpath";
|
|
76
|
+
}>>;
|
|
77
|
+
text: z.ZodString;
|
|
78
|
+
type: z.ZodLiteral<"fill">;
|
|
49
79
|
}, z.core.$strict>], "type">;
|
|
50
80
|
id: z.ZodString;
|
|
51
81
|
withScreenshot: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -68,6 +98,7 @@ export declare const makePerformActionOnRunnerContract: <WorkspaceId extends Pub
|
|
|
68
98
|
"screen-not-ready": "screen-not-ready";
|
|
69
99
|
"runner-has-no-screen": "runner-has-no-screen";
|
|
70
100
|
"action-not-supported-on-mobile": "action-not-supported-on-mobile";
|
|
101
|
+
"action-not-supported-on-browser": "action-not-supported-on-browser";
|
|
71
102
|
}>;
|
|
72
103
|
outcome: z.ZodLiteral<"failure">;
|
|
73
104
|
}, z.core.$strip>], "failureReason">], "outcome">;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"performAction.d.ts","sourceRoot":"","sources":["../../../src/v1/runner/performAction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"performAction.d.ts","sourceRoot":"","sources":["../../../src/v1/runner/performAction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AA2BhD,uDAAuD;AACvD,eAAO,MAAM,2BAA2B,OAAQ,CAAC;AAEjD,eAAO,MAAM,iCAAiC,GAC5C,WAAW,SAAS,cAAc,EAClC,KAAK;IACL,SAAS,EAAE,WAAW,CAAC;CACxB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2DA,CAAC"}
|
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import { browserActionSchema } from "./browserAction.js";
|
|
3
2
|
import { runnerIdSchema, runnerWorkspaceIdDescription } from "./identity.js";
|
|
4
3
|
import { makeRunnerFailureSchema } from "./outcome.js";
|
|
4
|
+
import { runnerActionSchema } from "./runnerAction.js";
|
|
5
5
|
import { runnerHasNoScreenDescription, screenFailureReasons, screenNotReadyDescription, screenshotImageSchema, } from "./screen.js";
|
|
6
6
|
import { runnerUnreachableFailureReason } from "./unreachable.js";
|
|
7
7
|
// Not the shared retryable wording: the action may have taken effect before its
|
|
8
8
|
// answer was lost.
|
|
9
9
|
const unreachableDescription = "`runner-unreachable` if the runner could not be reached: it may still be starting, it may have terminated after inactivity, or it may have stopped answering mid-action. This does not mean the action was not performed — take a screenshot before repeating it.";
|
|
10
|
-
const notSupportedOnMobileDescription = "`action-not-supported-on-mobile` if the runner is a mobile device and this action has no touchscreen equivalent: `double_click`, `scroll`, `move`, `keypress` and `navigate`, and a `click` whose `button` is not `left`, are all pointer-device concepts a touchscreen has nothing to offer for. `click` taps
|
|
10
|
+
const notSupportedOnMobileDescription = "`action-not-supported-on-mobile` if the runner is a mobile device and this action has no touchscreen equivalent: `double_click`, `scroll`, `move`, `keypress` and `navigate`, and a `click` whose `button` is not `left`, are all pointer-device concepts a touchscreen has nothing to offer for. `type` types into whatever the last tap focused. Deprecated on mobile and to be removed: `click` taps and `drag` swipes between its path's first and last point; send `tap` and `swipe` instead.";
|
|
11
|
+
const mobileActionsDescription = "Only a mobile runner performs `tap`, `swipe` and `fill`: `tap` touches a point or the element a `selector` names, `swipe` moves from one point to another over `duration_ms`, and `fill` replaces the value of the field a `selector` names. A browser runner answers them with `action-not-supported-on-browser`.";
|
|
11
12
|
const withScreenshotDescription = "With `withScreenshot: true`, the answer also carries `imageJpegBase64`: a screenshot taken after the action. One call instead of `runner.performAction` followed by `runner.takeScreenshot`. The action itself is performed exactly as without the option; if the screen could serve no frame after it — a display restart, or a `navigate` on a desktop that is still starting — the action's result comes back without `imageJpegBase64`, so take a screenshot separately rather than repeating the action. On a mobile runner the screenshot is the device's own, taken right after a performed action.";
|
|
12
13
|
/** How much of a failure reason this API passes on. */
|
|
13
14
|
export const maxActionErrorMessageLength = 1_000;
|
|
14
15
|
export const makePerformActionOnRunnerContract = (ids) => {
|
|
15
16
|
const input = z.object({
|
|
16
|
-
action:
|
|
17
|
+
action: runnerActionSchema.describe(`The action to perform. Coordinates are whole pixels on the runner's virtual desktop, in the same space as \`runner.takeScreenshot\`. The browser action shapes follow the computer-use vocabulary, minus \`screenshot\` (use \`runner.takeScreenshot\`) and \`wait\` (delay on the caller's side). A \`navigate\` does not go through the screen, so a screen that is not ready does not stop it. ${notSupportedOnMobileDescription} ${mobileActionsDescription}`),
|
|
17
18
|
id: runnerIdSchema.describe("Id of the runner to act on."),
|
|
18
19
|
withScreenshot: z.boolean().optional().describe(withScreenshotDescription),
|
|
19
20
|
workspaceId: ids.workspace
|
|
@@ -36,6 +37,7 @@ export const makePerformActionOnRunnerContract = (ids) => {
|
|
|
36
37
|
makeRunnerFailureSchema([
|
|
37
38
|
...screenFailureReasons,
|
|
38
39
|
"action-not-supported-on-mobile",
|
|
40
|
+
"action-not-supported-on-browser",
|
|
39
41
|
runnerUnreachableFailureReason,
|
|
40
42
|
]),
|
|
41
43
|
]);
|
|
@@ -52,7 +54,7 @@ export const makePerformActionOnRunnerContract = (ids) => {
|
|
|
52
54
|
openWorldHint: true,
|
|
53
55
|
readOnlyHint: false,
|
|
54
56
|
},
|
|
55
|
-
description: `Perform one raw
|
|
57
|
+
description: `Perform one raw action on an interactive runner: click, double_click, move, drag, scroll, keypress, type, or navigate; on mobile, tap, swipe, fill, or type. One action per request, and the runner serves one at a time. A success means the action took effect. \`action-failed\`, with a reason, if it reached the runner and did not take effect. On a runner image with a browser, the first action on a runner that has never run anything starts its browser and waits for it, so it can take up to a minute to answer — no \`runner.runFlow\` is needed before acting; if the browser is still starting when the wait runs out, the answer is \`screen-not-ready\` and retrying converges. On a mobile runner, the same \`screen-needs-a-run\` and \`screen-not-ready\` outcomes mean no Appium session has started yet, or it did not answer this instant; \`runner.runFlow\` is what starts one, same as a browser. \`screen-needs-a-run\` if the browser could not be started that way — usually a runner whose runs all finished without starting its desktop; call \`runner.runFlow\` with a flow that opens a browser. ${screenNotReadyDescription} ${runnerHasNoScreenDescription} ${unreachableDescription}`,
|
|
56
58
|
input,
|
|
57
59
|
kind: "write",
|
|
58
60
|
name: "runner.performAction",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"performAction.js","sourceRoot":"","sources":["../../../src/v1/runner/performAction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"performAction.js","sourceRoot":"","sources":["../../../src/v1/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GAAG,CAAC,CAAC,kBAAkB,CAAC,eAAe,EAAE;QACpD,CAAC,CAAC,MAAM,CAAC;YACP,YAAY,EAAE,CAAC;iBACZ,MAAM,EAAE;iBACR,GAAG,CAAC,2BAA2B,CAAC;iBAChC,QAAQ,CAAC,6CAA6C,CAAC;YAC1D,aAAa,EAAE,CAAC,CAAC,OAAO,CAAC,eAAe,CAAC;YACzC,eAAe,EAAE,qBAAqB;YACtC,OAAO,EAAE,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC;SAC9B,CAAC;QACF,uBAAuB,CAAC;YACtB,GAAG,oBAAoB;YACvB,gCAAgC;YAChC,iCAAiC;YACjC,8BAA8B;SAC/B,CAAC;KACH,CAAC,CAAC;IAEH,MAAM,MAAM,GAAG,CAAC,CAAC,kBAAkB,CAAC,SAAS,EAAE;QAC7C,CAAC,CAAC,MAAM,CAAC;YACP,eAAe,EAAE,qBAAqB;YACtC,OAAO,EAAE,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC;SAC9B,CAAC;QACF,OAAO;KACR,CAAC,CAAC;IAEH,OAAO;QACL,WAAW,EAAE;YACX,eAAe,EAAE,IAAI;YACrB,aAAa,EAAE,IAAI;YACnB,YAAY,EAAE,KAAK;SACpB;QACD,WAAW,EAAE,wkCAAwkC,yBAAyB,IAAI,4BAA4B,IAAI,sBAAsB,EAAE;QAC1qC,KAAK;QACL,IAAI,EAAE,OAAO;QACb,IAAI,EAAE,sBAAsB;QAC5B,MAAM;KAMP,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -40,12 +40,14 @@ export declare const makeRunFlowOnRunnerContract: <FlowId extends PublicIdSchema
|
|
|
40
40
|
playwright: "playwright";
|
|
41
41
|
android: "android";
|
|
42
42
|
ios: "ios";
|
|
43
|
+
windows: "windows";
|
|
43
44
|
}>;
|
|
44
45
|
runnerName: z.ZodEnum<{
|
|
45
46
|
basic: "basic";
|
|
46
47
|
playwright: "playwright";
|
|
47
48
|
android: "android";
|
|
48
49
|
ios: "ios";
|
|
50
|
+
windows: "windows";
|
|
49
51
|
}>;
|
|
50
52
|
}, z.core.$strip>, z.ZodObject<{
|
|
51
53
|
failureReason: z.ZodLiteral<"needs-full-sync">;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runFlow.d.ts","sourceRoot":"","sources":["../../../src/v1/runner/runFlow.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AA8BhD,eAAO,MAAM,2BAA2B,GACtC,MAAM,SAAS,cAAc,EAC7B,WAAW,SAAS,cAAc,EAClC,KAAK;IACL,cAAc,EAAE,cAAc,CAAC;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,WAAW,CAAC;CACxB
|
|
1
|
+
{"version":3,"file":"runFlow.d.ts","sourceRoot":"","sources":["../../../src/v1/runner/runFlow.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AA8BhD,eAAO,MAAM,2BAA2B,GACtC,MAAM,SAAS,cAAc,EAC7B,WAAW,SAAS,cAAc,EAClC,KAAK;IACL,cAAc,EAAE,cAAc,CAAC;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,WAAW,CAAC;CACxB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4IA,CAAC"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
/**
|
|
3
|
+
* What `runner.performAction` takes: every browser action, plus `tap`,
|
|
4
|
+
* `swipe` and `fill`, which only a mobile runner performs. A browser runner
|
|
5
|
+
* answers those with `action-not-supported-on-browser`, so a browser pod only
|
|
6
|
+
* ever receives a `BrowserAction`.
|
|
7
|
+
*/
|
|
8
|
+
export declare const runnerActionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
9
|
+
button: z.ZodLiteral<"left" | "right" | "wheel" | "back" | "forward">;
|
|
10
|
+
type: z.ZodLiteral<"click">;
|
|
11
|
+
x: z.ZodInt;
|
|
12
|
+
y: z.ZodInt;
|
|
13
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
14
|
+
type: z.ZodLiteral<"double_click">;
|
|
15
|
+
x: z.ZodInt;
|
|
16
|
+
y: z.ZodInt;
|
|
17
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
18
|
+
scroll_x: z.ZodInt;
|
|
19
|
+
scroll_y: z.ZodInt;
|
|
20
|
+
type: z.ZodLiteral<"scroll">;
|
|
21
|
+
x: z.ZodInt;
|
|
22
|
+
y: z.ZodInt;
|
|
23
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
24
|
+
type: z.ZodLiteral<"move">;
|
|
25
|
+
x: z.ZodInt;
|
|
26
|
+
y: z.ZodInt;
|
|
27
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
28
|
+
path: z.ZodArray<z.ZodObject<{
|
|
29
|
+
x: z.ZodInt;
|
|
30
|
+
y: z.ZodInt;
|
|
31
|
+
}, z.core.$strict>>;
|
|
32
|
+
type: z.ZodLiteral<"drag">;
|
|
33
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
34
|
+
keys: z.ZodArray<z.ZodString>;
|
|
35
|
+
type: z.ZodLiteral<"keypress">;
|
|
36
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
37
|
+
type: z.ZodLiteral<"navigate">;
|
|
38
|
+
url: z.ZodURL;
|
|
39
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
40
|
+
text: z.ZodString;
|
|
41
|
+
type: z.ZodLiteral<"type">;
|
|
42
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
43
|
+
selector: z.ZodOptional<z.ZodString>;
|
|
44
|
+
strategy: z.ZodOptional<z.ZodEnum<{
|
|
45
|
+
"ios-predicate": "ios-predicate";
|
|
46
|
+
shadow: "shadow";
|
|
47
|
+
xpath: "xpath";
|
|
48
|
+
}>>;
|
|
49
|
+
type: z.ZodLiteral<"tap">;
|
|
50
|
+
x: z.ZodOptional<z.ZodInt>;
|
|
51
|
+
y: z.ZodOptional<z.ZodInt>;
|
|
52
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
53
|
+
duration_ms: z.ZodOptional<z.ZodInt>;
|
|
54
|
+
from: z.ZodObject<{
|
|
55
|
+
x: z.ZodInt;
|
|
56
|
+
y: z.ZodInt;
|
|
57
|
+
}, z.core.$strict>;
|
|
58
|
+
to: z.ZodObject<{
|
|
59
|
+
x: z.ZodInt;
|
|
60
|
+
y: z.ZodInt;
|
|
61
|
+
}, z.core.$strict>;
|
|
62
|
+
type: z.ZodLiteral<"swipe">;
|
|
63
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
64
|
+
selector: z.ZodString;
|
|
65
|
+
strategy: z.ZodOptional<z.ZodEnum<{
|
|
66
|
+
"ios-predicate": "ios-predicate";
|
|
67
|
+
shadow: "shadow";
|
|
68
|
+
xpath: "xpath";
|
|
69
|
+
}>>;
|
|
70
|
+
text: z.ZodString;
|
|
71
|
+
type: z.ZodLiteral<"fill">;
|
|
72
|
+
}, z.core.$strict>], "type">;
|
|
73
|
+
export type RunnerAction = z.infer<typeof runnerActionSchema>;
|
|
74
|
+
//# sourceMappingURL=runnerAction.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runnerAction.d.ts","sourceRoot":"","sources":["../../../src/v1/runner/runnerAction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AA2GxB;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4BAK7B,CAAC;AAEH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC"}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { browserActionSchema, maxTypedTextLength, screenCoordinateSchema, screenPointSchema, } from "./browserAction.js";
|
|
3
|
+
import { maxSelectorLength } from "./inspect.js";
|
|
4
|
+
import { selectorStrategySchema } from "./inspectMobile.js";
|
|
5
|
+
/**
|
|
6
|
+
* The touchscreen actions only a mobile runner performs, each one a mobile
|
|
7
|
+
* pod route. Same rule as the browser actions: only ever tighten a bound.
|
|
8
|
+
*/
|
|
9
|
+
/** The mobile pod's own bound on a swipe, comfortably inside a request's timeout. */
|
|
10
|
+
const maxSwipeDurationMs = 10_000;
|
|
11
|
+
const selectorSchema = z
|
|
12
|
+
.string()
|
|
13
|
+
.min(1)
|
|
14
|
+
.max(maxSelectorLength)
|
|
15
|
+
.describe("The element to act on, resolved the way a screen object's own selector is.");
|
|
16
|
+
const strategySchema = selectorStrategySchema
|
|
17
|
+
.optional()
|
|
18
|
+
.describe("How `selector` is resolved. Defaults to `xpath`.");
|
|
19
|
+
function refuseStrategyWithoutSelector(action, context) {
|
|
20
|
+
if (action.strategy !== undefined && action.selector === undefined) {
|
|
21
|
+
context.addIssue({
|
|
22
|
+
code: "custom",
|
|
23
|
+
message: "`strategy` says how to resolve a `selector`, so it needs one.",
|
|
24
|
+
path: ["strategy"],
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
// One object rather than a union of a point and an element: a discriminated
|
|
29
|
+
// union cannot hold two options that share a `type`.
|
|
30
|
+
const tapActionSchema = z
|
|
31
|
+
.strictObject({
|
|
32
|
+
selector: selectorSchema.optional(),
|
|
33
|
+
strategy: strategySchema,
|
|
34
|
+
type: z.literal("tap"),
|
|
35
|
+
x: screenCoordinateSchema.optional(),
|
|
36
|
+
y: screenCoordinateSchema.optional(),
|
|
37
|
+
})
|
|
38
|
+
.superRefine((tap, context) => {
|
|
39
|
+
refuseStrategyWithoutSelector(tap, context);
|
|
40
|
+
const hasPoint = tap.x !== undefined || tap.y !== undefined;
|
|
41
|
+
if (tap.selector !== undefined && hasPoint) {
|
|
42
|
+
context.addIssue({
|
|
43
|
+
code: "custom",
|
|
44
|
+
message: "A tap aims at `x` and `y` or at a `selector`, not both.",
|
|
45
|
+
path: ["selector"],
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
if (tap.selector === undefined &&
|
|
49
|
+
(tap.x === undefined || tap.y === undefined)) {
|
|
50
|
+
context.addIssue({
|
|
51
|
+
code: "custom",
|
|
52
|
+
message: "A tap needs both `x` and `y`, or a `selector`.",
|
|
53
|
+
path: [tap.x === undefined ? "x" : "y"],
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
const swipeActionSchema = z
|
|
58
|
+
.strictObject({
|
|
59
|
+
duration_ms: z
|
|
60
|
+
.int()
|
|
61
|
+
.positive()
|
|
62
|
+
.max(maxSwipeDurationMs)
|
|
63
|
+
.optional()
|
|
64
|
+
.describe("How long the swipe takes, in milliseconds. A slow one scrolls, a fast one flings. The device's default is 300."),
|
|
65
|
+
from: screenPointSchema,
|
|
66
|
+
to: screenPointSchema,
|
|
67
|
+
type: z.literal("swipe"),
|
|
68
|
+
})
|
|
69
|
+
.refine(({ from, to }) => from.x !== to.x || from.y !== to.y, {
|
|
70
|
+
message: "A swipe whose `from` and `to` are the same travels nowhere.",
|
|
71
|
+
path: ["to"],
|
|
72
|
+
});
|
|
73
|
+
const fillActionSchema = z.strictObject({
|
|
74
|
+
selector: selectorSchema,
|
|
75
|
+
strategy: strategySchema,
|
|
76
|
+
text: z
|
|
77
|
+
.string()
|
|
78
|
+
.max(maxTypedTextLength)
|
|
79
|
+
.describe("What the field holds afterwards, in place of its old value. Empty clears it."),
|
|
80
|
+
type: z.literal("fill"),
|
|
81
|
+
});
|
|
82
|
+
/**
|
|
83
|
+
* What `runner.performAction` takes: every browser action, plus `tap`,
|
|
84
|
+
* `swipe` and `fill`, which only a mobile runner performs. A browser runner
|
|
85
|
+
* answers those with `action-not-supported-on-browser`, so a browser pod only
|
|
86
|
+
* ever receives a `BrowserAction`.
|
|
87
|
+
*/
|
|
88
|
+
export const runnerActionSchema = z.discriminatedUnion("type", [
|
|
89
|
+
...browserActionSchema.options,
|
|
90
|
+
tapActionSchema,
|
|
91
|
+
swipeActionSchema,
|
|
92
|
+
fillActionSchema,
|
|
93
|
+
]);
|
|
94
|
+
//# sourceMappingURL=runnerAction.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runnerAction.js","sourceRoot":"","sources":["../../../src/v1/runner/runnerAction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EACL,mBAAmB,EACnB,kBAAkB,EAClB,sBAAsB,EACtB,iBAAiB,GAClB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AACjD,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAE5D;;;GAGG;AAEH,qFAAqF;AACrF,MAAM,kBAAkB,GAAG,MAAM,CAAC;AAElC,MAAM,cAAc,GAAG,CAAC;KACrB,MAAM,EAAE;KACR,GAAG,CAAC,CAAC,CAAC;KACN,GAAG,CAAC,iBAAiB,CAAC;KACtB,QAAQ,CACP,4EAA4E,CAC7E,CAAC;AAEJ,MAAM,cAAc,GAAG,sBAAsB;KAC1C,QAAQ,EAAE;KACV,QAAQ,CAAC,kDAAkD,CAAC,CAAC;AAEhE,SAAS,6BAA6B,CACpC,MAAgD,EAChD,OAA8B;IAE9B,IAAI,MAAM,CAAC,QAAQ,KAAK,SAAS,IAAI,MAAM,CAAC,QAAQ,KAAK,SAAS,EAAE,CAAC;QACnE,OAAO,CAAC,QAAQ,CAAC;YACf,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,+DAA+D;YACxE,IAAI,EAAE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AAC;SACX,GAAG,EAAE;SACL,QAAQ,EAAE;SACV,GAAG,CAAC,kBAAkB,CAAC;SACvB,QAAQ,EAAE;SACV,QAAQ,CACP,gHAAgH,CACjH;IACH,IAAI,EAAE,iBAAiB;IACvB,EAAE,EAAE,iBAAiB;IACrB,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC;CACzB,CAAC;KACD,MAAM,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,EAAE;IAC5D,OAAO,EAAE,6DAA6D;IACtE,IAAI,EAAE,CAAC,IAAI,CAAC;CACb,CAAC,CAAC;AAEL,MAAM,gBAAgB,GAAG,CAAC,CAAC,YAAY,CAAC;IACtC,QAAQ,EAAE,cAAc;IACxB,QAAQ,EAAE,cAAc;IACxB,IAAI,EAAE,CAAC;SACJ,MAAM,EAAE;SACR,GAAG,CAAC,kBAAkB,CAAC;SACvB,QAAQ,CACP,8EAA8E,CAC/E;IACH,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC;CACxB,CAAC,CAAC;AAEH;;;;;GAKG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,kBAAkB,CAAC,MAAM,EAAE;IAC7D,GAAG,mBAAmB,CAAC,OAAO;IAC9B,eAAe;IACf,iBAAiB;IACjB,gBAAgB;CACjB,CAAC,CAAC"}
|
|
@@ -2,7 +2,7 @@ import { z } from "zod";
|
|
|
2
2
|
export declare const screenFailureReasons: readonly ["runner-has-no-screen", "screen-needs-a-run", "screen-not-ready"];
|
|
3
3
|
export declare const screenNotReadyDescription = "`screen-not-ready` if the runner has a screen that cannot serve this instant. Retry in a second or two: the desktop restarts when a run changes the display size, and it serves one see-or-act request at a time, so a screenshot or action already in flight is the usual reason. Do not submit a run to clear this \u2014 a run may restart the display and discard what is on it.";
|
|
4
4
|
export declare const screenNeedsARunDescription = "`screen-needs-a-run` if the runner's virtual desktop has never started. Waiting will not change this and retrying is pointless \u2014 call `runner.runFlow` with a flow that opens a browser, then ask for the screen again. On a runner image with a browser that has never run anything, any `runner.performAction` also starts the browser itself. Evaluating a snippet does not start the desktop.";
|
|
5
|
-
export declare const runnerHasNoScreenDescription = "`runner-has-no-screen` if this runner
|
|
5
|
+
export declare const runnerHasNoScreenDescription = "`runner-has-no-screen` if this runner has no browser desktop to see or drive, and retrying will never help. Launch a `playwright` runner, or on `windows` use `runner.runFlow`.";
|
|
6
6
|
/**
|
|
7
7
|
* A screenshot as the API carries it. Not `z.base64()`: its regex runs against
|
|
8
8
|
* every multi-megabyte frame, on the server and in every client that parses with
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"screen.d.ts","sourceRoot":"","sources":["../../../src/v1/runner/screen.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,oBAAoB,6EAIvB,CAAC;AAEX,eAAO,MAAM,yBAAyB,yXAC6U,CAAC;AAIpX,eAAO,MAAM,0BAA0B,2YAC8V,CAAC;AAEtY,eAAO,MAAM,4BAA4B,
|
|
1
|
+
{"version":3,"file":"screen.d.ts","sourceRoot":"","sources":["../../../src/v1/runner/screen.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,oBAAoB,6EAIvB,CAAC;AAEX,eAAO,MAAM,yBAAyB,yXAC6U,CAAC;AAIpX,eAAO,MAAM,0BAA0B,2YAC8V,CAAC;AAEtY,eAAO,MAAM,4BAA4B,oLAC0I,CAAC;AAEpL;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,aAK/B,CAAC"}
|
package/dist/v1/runner/screen.js
CHANGED
|
@@ -8,7 +8,7 @@ export const screenNotReadyDescription = "`screen-not-ready` if the runner has a
|
|
|
8
8
|
// Its own reason, not a sentence inside `screen-not-ready`: the callers here are
|
|
9
9
|
// models, and an instruction that only exists in prose is one they may not follow.
|
|
10
10
|
export const screenNeedsARunDescription = "`screen-needs-a-run` if the runner's virtual desktop has never started. Waiting will not change this and retrying is pointless — call `runner.runFlow` with a flow that opens a browser, then ask for the screen again. On a runner image with a browser that has never run anything, any `runner.performAction` also starts the browser itself. Evaluating a snippet does not start the desktop.";
|
|
11
|
-
export const runnerHasNoScreenDescription = "`runner-has-no-screen` if this runner
|
|
11
|
+
export const runnerHasNoScreenDescription = "`runner-has-no-screen` if this runner has no browser desktop to see or drive, and retrying will never help. Launch a `playwright` runner, or on `windows` use `runner.runFlow`.";
|
|
12
12
|
/**
|
|
13
13
|
* A screenshot as the API carries it. Not `z.base64()`: its regex runs against
|
|
14
14
|
* every multi-megabyte frame, on the server and in every client that parses with
|