@qawolf/api-contracts 0.30.0 → 0.33.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/environment/find.d.ts +1 -1
- package/dist/v1/environment/index.d.ts +2 -2
- package/dist/v1/environment/resource.d.ts +1 -1
- package/dist/v1/environment/update.d.ts +1 -1
- package/dist/v1/index.d.ts +429 -27
- package/dist/v1/index.d.ts.map +1 -1
- package/dist/v1/index.js +3 -18
- package/dist/v1/index.js.map +1 -1
- package/dist/v1/run/index.d.ts.map +1 -1
- package/dist/v1/run/index.js +4 -1
- package/dist/v1/run/index.js.map +1 -1
- package/dist/v1/runner/environment.js +1 -1
- package/dist/v1/runner/files.js +1 -1
- package/dist/v1/runner/inspect.d.ts +1 -0
- package/dist/v1/runner/inspect.d.ts.map +1 -1
- package/dist/v1/runner/inspect.js +6 -2
- package/dist/v1/runner/inspect.js.map +1 -1
- package/dist/v1/runner/inspectMobile.d.ts +226 -0
- package/dist/v1/runner/inspectMobile.d.ts.map +1 -0
- package/dist/v1/runner/inspectMobile.js +118 -0
- package/dist/v1/runner/inspectMobile.js.map +1 -0
- package/dist/v1/runner/inspectMobileShapes.d.ts +73 -0
- package/dist/v1/runner/inspectMobileShapes.d.ts.map +1 -0
- package/dist/v1/runner/inspectMobileShapes.js +59 -0
- package/dist/v1/runner/inspectMobileShapes.js.map +1 -0
- package/dist/v1/runner/performAction.d.ts +3 -2
- package/dist/v1/runner/performAction.d.ts.map +1 -1
- package/dist/v1/runner/performAction.js +3 -1
- package/dist/v1/runner/performAction.js.map +1 -1
- package/dist/v1/runner/takeScreenshot.d.ts +2 -2
- package/dist/v1/runner/takeScreenshot.js +1 -1
- package/dist/v1/runner/takeScreenshot.js.map +1 -1
- package/dist/v1/runnerReexports.d.ts +11 -0
- package/dist/v1/runnerReexports.d.ts.map +1 -0
- package/dist/v1/runnerReexports.js +23 -0
- package/dist/v1/runnerReexports.js.map +1 -0
- package/package.json +1 -1
package/dist/v1/index.d.ts
CHANGED
|
@@ -3,15 +3,7 @@ export type { AnyPublicApiContract, PublicApiContract, PublicApiContractKind, }
|
|
|
3
3
|
export { type IdentityResponse, identityResponse } from "./identity/index.js";
|
|
4
4
|
export { type PublicIdSchema, type PublicIdSchemas, defaultIdSchemas, } from "./ids.js";
|
|
5
5
|
export { makeFlowSelectionSchema } from "./run/index.js";
|
|
6
|
-
export
|
|
7
|
-
export { runEnvironmentSchema } from "./runner/environment.js";
|
|
8
|
-
export { isShippableRunFilePath, runFilePathSchema, runPackageJsonPath, shippableRunFileExtensions, } from "./runner/files.js";
|
|
9
|
-
export { type RunnerNameForPublicApi, makeRunnerSchema, runnerIdSchema, runnerNameSchema, } from "./runner/identity.js";
|
|
10
|
-
export { type InspectOnRunnerRequest, inspectRequestSchema, } from "./runner/inspect.js";
|
|
11
|
-
export { type JournalEntry, type JournalStream, type KnownJournalStream, type ReadJournalRequest, type ReadJournalResponse, journalEntrySchema, journalStreamSchema, knownJournalStreams, maxJournalStreamNameLength, readJournalRequestSchema, readJournalResponseSchema, } from "./runner/journal.js";
|
|
12
|
-
export { type RunFiles, maxRunFilesByteLength, maxRunnerRequestEncodedByteLength, runFilesByteLength, runFilesSchema, } from "./runner/payloadSize.js";
|
|
13
|
-
export { maxActionErrorMessageLength } from "./runner/performAction.js";
|
|
14
|
-
export { type RunSelection, runSelectionSchema, } from "./runner/runSelection.js";
|
|
6
|
+
export * from "./runnerReexports.js";
|
|
15
7
|
import type { AnyPublicApiContract } from "./definition.js";
|
|
16
8
|
import { type PublicIdSchema, type PublicIdSchemasOf } from "./ids.js";
|
|
17
9
|
export type PublicApiInput<Api extends AnyPublicApiContract> = z.input<Api["input"]>;
|
|
@@ -66,9 +58,9 @@ export declare const makeContractsV1: <EnvironmentId extends PublicIdSchema, Flo
|
|
|
66
58
|
name: z.ZodString;
|
|
67
59
|
runConcurrencyLimit: z.ZodString;
|
|
68
60
|
status: z.ZodEnum<{
|
|
61
|
+
ready: "ready";
|
|
69
62
|
blocked: "blocked";
|
|
70
63
|
"needs-investigation": "needs-investigation";
|
|
71
|
-
ready: "ready";
|
|
72
64
|
running: "running";
|
|
73
65
|
}>;
|
|
74
66
|
terminatedAt: z.ZodOptional<z.ZodISODateTime>;
|
|
@@ -122,9 +114,9 @@ export declare const makeContractsV1: <EnvironmentId extends PublicIdSchema, Flo
|
|
|
122
114
|
name: z.ZodString;
|
|
123
115
|
runConcurrencyLimit: z.ZodString;
|
|
124
116
|
status: z.ZodEnum<{
|
|
117
|
+
ready: "ready";
|
|
125
118
|
blocked: "blocked";
|
|
126
119
|
"needs-investigation": "needs-investigation";
|
|
127
|
-
ready: "ready";
|
|
128
120
|
running: "running";
|
|
129
121
|
}>;
|
|
130
122
|
terminatedAt: z.ZodOptional<z.ZodISODateTime>;
|
|
@@ -159,9 +151,9 @@ export declare const makeContractsV1: <EnvironmentId extends PublicIdSchema, Flo
|
|
|
159
151
|
name: z.ZodString;
|
|
160
152
|
runConcurrencyLimit: z.ZodString;
|
|
161
153
|
status: z.ZodEnum<{
|
|
154
|
+
ready: "ready";
|
|
162
155
|
blocked: "blocked";
|
|
163
156
|
"needs-investigation": "needs-investigation";
|
|
164
|
-
ready: "ready";
|
|
165
157
|
running: "running";
|
|
166
158
|
}>;
|
|
167
159
|
terminatedAt: z.ZodOptional<z.ZodISODateTime>;
|
|
@@ -236,9 +228,9 @@ export declare const makeContractsV1: <EnvironmentId extends PublicIdSchema, Flo
|
|
|
236
228
|
name: z.ZodString;
|
|
237
229
|
runConcurrencyLimit: z.ZodString;
|
|
238
230
|
status: z.ZodEnum<{
|
|
231
|
+
ready: "ready";
|
|
239
232
|
blocked: "blocked";
|
|
240
233
|
"needs-investigation": "needs-investigation";
|
|
241
|
-
ready: "ready";
|
|
242
234
|
running: "running";
|
|
243
235
|
}>;
|
|
244
236
|
terminatedAt: z.ZodOptional<z.ZodISODateTime>;
|
|
@@ -851,6 +843,210 @@ export declare const makeContractsV1: <EnvironmentId extends PublicIdSchema, Flo
|
|
|
851
843
|
failureReason: z.ZodEnum<{
|
|
852
844
|
"runner-unreachable": "runner-unreachable";
|
|
853
845
|
"nothing-to-inspect": "nothing-to-inspect";
|
|
846
|
+
"runner-is-not-a-browser": "runner-is-not-a-browser";
|
|
847
|
+
}>;
|
|
848
|
+
outcome: z.ZodLiteral<"failure">;
|
|
849
|
+
}, z.core.$strip>], "outcome">;
|
|
850
|
+
};
|
|
851
|
+
inspectMobile: {
|
|
852
|
+
readonly description: "Inspect one thing on a mobile interactive runner: the Appium session's status, the WebView contexts available, the current context's page source, or the elements at a point or carrying some text. Mobile only — a browser runner answers `runner-is-not-mobile`; call `runner.inspect` for a browser's equivalent surface instead. `what: \"session\"` always answers with the session's own status rather than `screen-needs-a-run`, since that is the question it exists to answer; the other three request kinds need a live session first and answer the same `screen-needs-a-run` or `screen-not-ready` outcomes `runner.performAction` and `runner.takeScreenshot` use, instead of reading anything when there is none. `screen-needs-a-run` means no Appium session has started on this runner yet — call `runner.runFlow` with a flow that opens one, then inspect again. `screen-not-ready` means the runner's Appium session exists but did not answer this instant, or more than one is somehow live — retry once; if it persists, relaunch the runner. `runner-is-not-mobile` means there is nothing here to inspect, and retrying will never help — launch a `node20WithAndroid` or `node20WithIos` runner instead. `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.";
|
|
853
|
+
readonly input: z.ZodObject<{
|
|
854
|
+
id: z.ZodString;
|
|
855
|
+
request: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
856
|
+
what: z.ZodLiteral<"session">;
|
|
857
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
858
|
+
what: z.ZodLiteral<"contexts">;
|
|
859
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
860
|
+
context: z.ZodOptional<z.ZodString>;
|
|
861
|
+
what: z.ZodLiteral<"page">;
|
|
862
|
+
}, z.core.$strip>, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
863
|
+
by: z.ZodLiteral<"point">;
|
|
864
|
+
context: z.ZodOptional<z.ZodString>;
|
|
865
|
+
what: z.ZodLiteral<"elements">;
|
|
866
|
+
x: z.ZodInt;
|
|
867
|
+
y: z.ZodInt;
|
|
868
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
869
|
+
by: z.ZodLiteral<"text">;
|
|
870
|
+
context: z.ZodOptional<z.ZodString>;
|
|
871
|
+
partial: z.ZodOptional<z.ZodBoolean>;
|
|
872
|
+
text: z.ZodString;
|
|
873
|
+
what: z.ZodLiteral<"elements">;
|
|
874
|
+
}, z.core.$strip>], "by">], "what">;
|
|
875
|
+
}, z.core.$strip>;
|
|
876
|
+
readonly kind: "read";
|
|
877
|
+
readonly name: "runner.inspectMobile";
|
|
878
|
+
readonly output: z.ZodDiscriminatedUnion<[z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
879
|
+
outcome: z.ZodLiteral<"success">;
|
|
880
|
+
session: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
881
|
+
deviceName: z.ZodOptional<z.ZodString>;
|
|
882
|
+
platformName: z.ZodString;
|
|
883
|
+
sessionId: z.ZodString;
|
|
884
|
+
type: z.ZodLiteral<"ready">;
|
|
885
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
886
|
+
error: z.ZodString;
|
|
887
|
+
type: z.ZodLiteral<"unreachable">;
|
|
888
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
889
|
+
sessionCount: z.ZodNumber;
|
|
890
|
+
type: z.ZodLiteral<"ambiguous">;
|
|
891
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
892
|
+
type: z.ZodLiteral<"no-session">;
|
|
893
|
+
}, z.core.$strip>], "type">;
|
|
894
|
+
what: z.ZodLiteral<"session">;
|
|
895
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
896
|
+
contexts: z.ZodArray<z.ZodString>;
|
|
897
|
+
current: z.ZodString;
|
|
898
|
+
outcome: z.ZodLiteral<"success">;
|
|
899
|
+
what: z.ZodLiteral<"contexts">;
|
|
900
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
901
|
+
context: z.ZodString;
|
|
902
|
+
orientation: z.ZodEnum<{
|
|
903
|
+
PORTRAIT: "PORTRAIT";
|
|
904
|
+
LANDSCAPE: "LANDSCAPE";
|
|
905
|
+
}>;
|
|
906
|
+
outcome: z.ZodLiteral<"success">;
|
|
907
|
+
pageSource: z.ZodType<{
|
|
908
|
+
selectors: {
|
|
909
|
+
strategy: {
|
|
910
|
+
name: "xpath";
|
|
911
|
+
type: "unique" | "full-path" | "sibling-of" | "parent-of";
|
|
912
|
+
} | {
|
|
913
|
+
name: "ios-predicate";
|
|
914
|
+
} | {
|
|
915
|
+
hostSelector: string;
|
|
916
|
+
innerSelector: string;
|
|
917
|
+
name: "shadow";
|
|
918
|
+
};
|
|
919
|
+
value: string;
|
|
920
|
+
}[];
|
|
921
|
+
tag: string;
|
|
922
|
+
attributes?: {
|
|
923
|
+
bounds?: {
|
|
924
|
+
bottom: number;
|
|
925
|
+
left: number;
|
|
926
|
+
right: number;
|
|
927
|
+
top: number;
|
|
928
|
+
} | undefined;
|
|
929
|
+
rest?: Record<string, string> | undefined;
|
|
930
|
+
} | undefined;
|
|
931
|
+
} & {
|
|
932
|
+
children?: (({
|
|
933
|
+
selectors: {
|
|
934
|
+
strategy: {
|
|
935
|
+
name: "xpath";
|
|
936
|
+
type: "unique" | "full-path" | "sibling-of" | "parent-of";
|
|
937
|
+
} | {
|
|
938
|
+
name: "ios-predicate";
|
|
939
|
+
} | {
|
|
940
|
+
hostSelector: string;
|
|
941
|
+
innerSelector: string;
|
|
942
|
+
name: "shadow";
|
|
943
|
+
};
|
|
944
|
+
value: string;
|
|
945
|
+
}[];
|
|
946
|
+
tag: string;
|
|
947
|
+
attributes?: {
|
|
948
|
+
bounds?: {
|
|
949
|
+
bottom: number;
|
|
950
|
+
left: number;
|
|
951
|
+
right: number;
|
|
952
|
+
top: number;
|
|
953
|
+
} | undefined;
|
|
954
|
+
rest?: Record<string, string> | undefined;
|
|
955
|
+
} | undefined;
|
|
956
|
+
} & /*elided*/ any) | string)[];
|
|
957
|
+
}, unknown, z.core.$ZodTypeInternals<{
|
|
958
|
+
selectors: {
|
|
959
|
+
strategy: {
|
|
960
|
+
name: "xpath";
|
|
961
|
+
type: "unique" | "full-path" | "sibling-of" | "parent-of";
|
|
962
|
+
} | {
|
|
963
|
+
name: "ios-predicate";
|
|
964
|
+
} | {
|
|
965
|
+
hostSelector: string;
|
|
966
|
+
innerSelector: string;
|
|
967
|
+
name: "shadow";
|
|
968
|
+
};
|
|
969
|
+
value: string;
|
|
970
|
+
}[];
|
|
971
|
+
tag: string;
|
|
972
|
+
attributes?: {
|
|
973
|
+
bounds?: {
|
|
974
|
+
bottom: number;
|
|
975
|
+
left: number;
|
|
976
|
+
right: number;
|
|
977
|
+
top: number;
|
|
978
|
+
} | undefined;
|
|
979
|
+
rest?: Record<string, string> | undefined;
|
|
980
|
+
} | undefined;
|
|
981
|
+
} & {
|
|
982
|
+
children?: (({
|
|
983
|
+
selectors: {
|
|
984
|
+
strategy: {
|
|
985
|
+
name: "xpath";
|
|
986
|
+
type: "unique" | "full-path" | "sibling-of" | "parent-of";
|
|
987
|
+
} | {
|
|
988
|
+
name: "ios-predicate";
|
|
989
|
+
} | {
|
|
990
|
+
hostSelector: string;
|
|
991
|
+
innerSelector: string;
|
|
992
|
+
name: "shadow";
|
|
993
|
+
};
|
|
994
|
+
value: string;
|
|
995
|
+
}[];
|
|
996
|
+
tag: string;
|
|
997
|
+
attributes?: {
|
|
998
|
+
bounds?: {
|
|
999
|
+
bottom: number;
|
|
1000
|
+
left: number;
|
|
1001
|
+
right: number;
|
|
1002
|
+
top: number;
|
|
1003
|
+
} | undefined;
|
|
1004
|
+
rest?: Record<string, string> | undefined;
|
|
1005
|
+
} | undefined;
|
|
1006
|
+
} & /*elided*/ any) | string)[];
|
|
1007
|
+
}, unknown>>;
|
|
1008
|
+
what: z.ZodLiteral<"page">;
|
|
1009
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1010
|
+
matches: z.ZodArray<z.ZodObject<{
|
|
1011
|
+
attributes: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
1012
|
+
bounds: z.ZodOptional<z.ZodObject<{
|
|
1013
|
+
bottom: z.ZodNumber;
|
|
1014
|
+
left: z.ZodNumber;
|
|
1015
|
+
right: z.ZodNumber;
|
|
1016
|
+
top: z.ZodNumber;
|
|
1017
|
+
}, z.core.$strip>>;
|
|
1018
|
+
center: z.ZodOptional<z.ZodObject<{
|
|
1019
|
+
x: z.ZodNumber;
|
|
1020
|
+
y: z.ZodNumber;
|
|
1021
|
+
}, z.core.$strip>>;
|
|
1022
|
+
selectors: z.ZodArray<z.ZodObject<{
|
|
1023
|
+
strategy: z.ZodUnion<readonly [z.ZodObject<{
|
|
1024
|
+
name: z.ZodLiteral<"xpath">;
|
|
1025
|
+
type: z.ZodEnum<{
|
|
1026
|
+
unique: "unique";
|
|
1027
|
+
"full-path": "full-path";
|
|
1028
|
+
"sibling-of": "sibling-of";
|
|
1029
|
+
"parent-of": "parent-of";
|
|
1030
|
+
}>;
|
|
1031
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1032
|
+
name: z.ZodLiteral<"ios-predicate">;
|
|
1033
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1034
|
+
hostSelector: z.ZodString;
|
|
1035
|
+
innerSelector: z.ZodString;
|
|
1036
|
+
name: z.ZodLiteral<"shadow">;
|
|
1037
|
+
}, z.core.$strip>]>;
|
|
1038
|
+
value: z.ZodString;
|
|
1039
|
+
}, z.core.$strip>>;
|
|
1040
|
+
tag: z.ZodString;
|
|
1041
|
+
}, z.core.$strip>>;
|
|
1042
|
+
outcome: z.ZodLiteral<"success">;
|
|
1043
|
+
what: z.ZodLiteral<"elements">;
|
|
1044
|
+
}, z.core.$strip>], "what">, z.ZodObject<{
|
|
1045
|
+
failureReason: z.ZodEnum<{
|
|
1046
|
+
"runner-unreachable": "runner-unreachable";
|
|
1047
|
+
"runner-is-not-mobile": "runner-is-not-mobile";
|
|
1048
|
+
"screen-needs-a-run": "screen-needs-a-run";
|
|
1049
|
+
"screen-not-ready": "screen-not-ready";
|
|
854
1050
|
}>;
|
|
855
1051
|
outcome: z.ZodLiteral<"failure">;
|
|
856
1052
|
}, z.core.$strip>], "outcome">;
|
|
@@ -882,7 +1078,7 @@ export declare const makeContractsV1: <EnvironmentId extends PublicIdSchema, Flo
|
|
|
882
1078
|
}, z.core.$strip>;
|
|
883
1079
|
};
|
|
884
1080
|
performAction: {
|
|
885
|
-
readonly description: "Perform one raw browser action on an interactive runner: click, double_click, move, drag, scroll, keypress, type, or navigate. Coordinates are whole pixels on the runner's virtual desktop, in the same space as `runner.takeScreenshot`. One action per request, and the runner serves one at a time. The action shapes follow the computer-use vocabulary, minus `screenshot` (use `runner.takeScreenshot`) and `wait` (delay on the caller's side). 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. `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. A `navigate` does not go through the screen, so a screen that is not ready does not stop it. `runner-has-no-screen` if this runner is not one that runs a browser on a virtual desktop. Nothing about it can be seen or driven, and retrying will never help — launch a `playwright` runner instead. `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.";
|
|
1081
|
+
readonly description: "Perform one raw browser action on an interactive runner: click, double_click, move, drag, scroll, keypress, type, or navigate. Coordinates are whole pixels on the runner's virtual desktop, in the same space as `runner.takeScreenshot`. One action per request, and the runner serves one at a time. The action shapes follow the computer-use vocabulary, minus `screenshot` (use `runner.takeScreenshot`) and `wait` (delay on the caller's side). 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. A `navigate` does not go through the screen, so a screen that is not ready does not stop it. `runner-has-no-screen` if this runner is not one that runs a browser on a virtual desktop. Nothing about it can be seen or driven, and retrying will never help — launch a `playwright` runner instead. `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, `drag` swipes between its path's first and last point, and `type` types into whatever the last tap focused. `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.";
|
|
886
1082
|
readonly input: z.ZodObject<{
|
|
887
1083
|
action: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
888
1084
|
button: z.ZodLiteral<"left" | "right" | "wheel" | "back" | "forward">;
|
|
@@ -932,9 +1128,10 @@ export declare const makeContractsV1: <EnvironmentId extends PublicIdSchema, Flo
|
|
|
932
1128
|
}, z.core.$strip>, z.ZodObject<{
|
|
933
1129
|
failureReason: z.ZodEnum<{
|
|
934
1130
|
"runner-unreachable": "runner-unreachable";
|
|
935
|
-
"runner-has-no-screen": "runner-has-no-screen";
|
|
936
1131
|
"screen-needs-a-run": "screen-needs-a-run";
|
|
937
1132
|
"screen-not-ready": "screen-not-ready";
|
|
1133
|
+
"runner-has-no-screen": "runner-has-no-screen";
|
|
1134
|
+
"action-not-supported-on-mobile": "action-not-supported-on-mobile";
|
|
938
1135
|
}>;
|
|
939
1136
|
outcome: z.ZodLiteral<"failure">;
|
|
940
1137
|
}, z.core.$strip>], "failureReason">], "outcome">;
|
|
@@ -955,7 +1152,7 @@ export declare const makeContractsV1: <EnvironmentId extends PublicIdSchema, Flo
|
|
|
955
1152
|
payload: z.ZodUnknown;
|
|
956
1153
|
recordedAt: z.ZodISODateTime;
|
|
957
1154
|
sequence: z.ZodNumber;
|
|
958
|
-
}, z.core.$strip>, z.ZodTransform<import("./
|
|
1155
|
+
}, z.core.$strip>, z.ZodTransform<import("./runnerReexports.js").JournalEntry<unknown>, {
|
|
959
1156
|
payload: unknown;
|
|
960
1157
|
recordedAt: string;
|
|
961
1158
|
sequence: number;
|
|
@@ -1033,7 +1230,7 @@ export declare const makeContractsV1: <EnvironmentId extends PublicIdSchema, Flo
|
|
|
1033
1230
|
}, z.core.$strip>], "outcome">;
|
|
1034
1231
|
};
|
|
1035
1232
|
takeScreenshot: {
|
|
1036
|
-
readonly description: "Take one screenshot of an interactive runner's screen.
|
|
1233
|
+
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. 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 is not one that runs a browser on a virtual desktop. Nothing about it can be seen or driven, and retrying will never help — launch a `playwright` runner instead. `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.";
|
|
1037
1234
|
readonly input: z.ZodObject<{
|
|
1038
1235
|
id: z.ZodString;
|
|
1039
1236
|
}, z.core.$strip>;
|
|
@@ -1045,9 +1242,9 @@ export declare const makeContractsV1: <EnvironmentId extends PublicIdSchema, Flo
|
|
|
1045
1242
|
}, z.core.$strip>, z.ZodObject<{
|
|
1046
1243
|
failureReason: z.ZodEnum<{
|
|
1047
1244
|
"runner-unreachable": "runner-unreachable";
|
|
1048
|
-
"runner-has-no-screen": "runner-has-no-screen";
|
|
1049
1245
|
"screen-needs-a-run": "screen-needs-a-run";
|
|
1050
1246
|
"screen-not-ready": "screen-not-ready";
|
|
1247
|
+
"runner-has-no-screen": "runner-has-no-screen";
|
|
1051
1248
|
}>;
|
|
1052
1249
|
outcome: z.ZodLiteral<"failure">;
|
|
1053
1250
|
}, z.core.$strip>], "outcome">;
|
|
@@ -1147,9 +1344,9 @@ export declare const publicContractsV1: {
|
|
|
1147
1344
|
name: z.ZodString;
|
|
1148
1345
|
runConcurrencyLimit: z.ZodString;
|
|
1149
1346
|
status: z.ZodEnum<{
|
|
1347
|
+
ready: "ready";
|
|
1150
1348
|
blocked: "blocked";
|
|
1151
1349
|
"needs-investigation": "needs-investigation";
|
|
1152
|
-
ready: "ready";
|
|
1153
1350
|
running: "running";
|
|
1154
1351
|
}>;
|
|
1155
1352
|
terminatedAt: z.ZodOptional<z.ZodISODateTime>;
|
|
@@ -1203,9 +1400,9 @@ export declare const publicContractsV1: {
|
|
|
1203
1400
|
name: z.ZodString;
|
|
1204
1401
|
runConcurrencyLimit: z.ZodString;
|
|
1205
1402
|
status: z.ZodEnum<{
|
|
1403
|
+
ready: "ready";
|
|
1206
1404
|
blocked: "blocked";
|
|
1207
1405
|
"needs-investigation": "needs-investigation";
|
|
1208
|
-
ready: "ready";
|
|
1209
1406
|
running: "running";
|
|
1210
1407
|
}>;
|
|
1211
1408
|
terminatedAt: z.ZodOptional<z.ZodISODateTime>;
|
|
@@ -1240,9 +1437,9 @@ export declare const publicContractsV1: {
|
|
|
1240
1437
|
name: z.ZodString;
|
|
1241
1438
|
runConcurrencyLimit: z.ZodString;
|
|
1242
1439
|
status: z.ZodEnum<{
|
|
1440
|
+
ready: "ready";
|
|
1243
1441
|
blocked: "blocked";
|
|
1244
1442
|
"needs-investigation": "needs-investigation";
|
|
1245
|
-
ready: "ready";
|
|
1246
1443
|
running: "running";
|
|
1247
1444
|
}>;
|
|
1248
1445
|
terminatedAt: z.ZodOptional<z.ZodISODateTime>;
|
|
@@ -1317,9 +1514,9 @@ export declare const publicContractsV1: {
|
|
|
1317
1514
|
name: z.ZodString;
|
|
1318
1515
|
runConcurrencyLimit: z.ZodString;
|
|
1319
1516
|
status: z.ZodEnum<{
|
|
1517
|
+
ready: "ready";
|
|
1320
1518
|
blocked: "blocked";
|
|
1321
1519
|
"needs-investigation": "needs-investigation";
|
|
1322
|
-
ready: "ready";
|
|
1323
1520
|
running: "running";
|
|
1324
1521
|
}>;
|
|
1325
1522
|
terminatedAt: z.ZodOptional<z.ZodISODateTime>;
|
|
@@ -1932,6 +2129,210 @@ export declare const publicContractsV1: {
|
|
|
1932
2129
|
failureReason: z.ZodEnum<{
|
|
1933
2130
|
"runner-unreachable": "runner-unreachable";
|
|
1934
2131
|
"nothing-to-inspect": "nothing-to-inspect";
|
|
2132
|
+
"runner-is-not-a-browser": "runner-is-not-a-browser";
|
|
2133
|
+
}>;
|
|
2134
|
+
outcome: z.ZodLiteral<"failure">;
|
|
2135
|
+
}, z.core.$strip>], "outcome">;
|
|
2136
|
+
};
|
|
2137
|
+
inspectMobile: {
|
|
2138
|
+
readonly description: "Inspect one thing on a mobile interactive runner: the Appium session's status, the WebView contexts available, the current context's page source, or the elements at a point or carrying some text. Mobile only — a browser runner answers `runner-is-not-mobile`; call `runner.inspect` for a browser's equivalent surface instead. `what: \"session\"` always answers with the session's own status rather than `screen-needs-a-run`, since that is the question it exists to answer; the other three request kinds need a live session first and answer the same `screen-needs-a-run` or `screen-not-ready` outcomes `runner.performAction` and `runner.takeScreenshot` use, instead of reading anything when there is none. `screen-needs-a-run` means no Appium session has started on this runner yet — call `runner.runFlow` with a flow that opens one, then inspect again. `screen-not-ready` means the runner's Appium session exists but did not answer this instant, or more than one is somehow live — retry once; if it persists, relaunch the runner. `runner-is-not-mobile` means there is nothing here to inspect, and retrying will never help — launch a `node20WithAndroid` or `node20WithIos` runner instead. `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.";
|
|
2139
|
+
readonly input: z.ZodObject<{
|
|
2140
|
+
id: z.ZodString;
|
|
2141
|
+
request: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
2142
|
+
what: z.ZodLiteral<"session">;
|
|
2143
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2144
|
+
what: z.ZodLiteral<"contexts">;
|
|
2145
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2146
|
+
context: z.ZodOptional<z.ZodString>;
|
|
2147
|
+
what: z.ZodLiteral<"page">;
|
|
2148
|
+
}, z.core.$strip>, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
2149
|
+
by: z.ZodLiteral<"point">;
|
|
2150
|
+
context: z.ZodOptional<z.ZodString>;
|
|
2151
|
+
what: z.ZodLiteral<"elements">;
|
|
2152
|
+
x: z.ZodInt;
|
|
2153
|
+
y: z.ZodInt;
|
|
2154
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2155
|
+
by: z.ZodLiteral<"text">;
|
|
2156
|
+
context: z.ZodOptional<z.ZodString>;
|
|
2157
|
+
partial: z.ZodOptional<z.ZodBoolean>;
|
|
2158
|
+
text: z.ZodString;
|
|
2159
|
+
what: z.ZodLiteral<"elements">;
|
|
2160
|
+
}, z.core.$strip>], "by">], "what">;
|
|
2161
|
+
}, z.core.$strip>;
|
|
2162
|
+
readonly kind: "read";
|
|
2163
|
+
readonly name: "runner.inspectMobile";
|
|
2164
|
+
readonly output: z.ZodDiscriminatedUnion<[z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
2165
|
+
outcome: z.ZodLiteral<"success">;
|
|
2166
|
+
session: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
2167
|
+
deviceName: z.ZodOptional<z.ZodString>;
|
|
2168
|
+
platformName: z.ZodString;
|
|
2169
|
+
sessionId: z.ZodString;
|
|
2170
|
+
type: z.ZodLiteral<"ready">;
|
|
2171
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2172
|
+
error: z.ZodString;
|
|
2173
|
+
type: z.ZodLiteral<"unreachable">;
|
|
2174
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2175
|
+
sessionCount: z.ZodNumber;
|
|
2176
|
+
type: z.ZodLiteral<"ambiguous">;
|
|
2177
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2178
|
+
type: z.ZodLiteral<"no-session">;
|
|
2179
|
+
}, z.core.$strip>], "type">;
|
|
2180
|
+
what: z.ZodLiteral<"session">;
|
|
2181
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2182
|
+
contexts: z.ZodArray<z.ZodString>;
|
|
2183
|
+
current: z.ZodString;
|
|
2184
|
+
outcome: z.ZodLiteral<"success">;
|
|
2185
|
+
what: z.ZodLiteral<"contexts">;
|
|
2186
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2187
|
+
context: z.ZodString;
|
|
2188
|
+
orientation: z.ZodEnum<{
|
|
2189
|
+
PORTRAIT: "PORTRAIT";
|
|
2190
|
+
LANDSCAPE: "LANDSCAPE";
|
|
2191
|
+
}>;
|
|
2192
|
+
outcome: z.ZodLiteral<"success">;
|
|
2193
|
+
pageSource: z.ZodType<{
|
|
2194
|
+
selectors: {
|
|
2195
|
+
strategy: {
|
|
2196
|
+
name: "xpath";
|
|
2197
|
+
type: "unique" | "full-path" | "sibling-of" | "parent-of";
|
|
2198
|
+
} | {
|
|
2199
|
+
name: "ios-predicate";
|
|
2200
|
+
} | {
|
|
2201
|
+
hostSelector: string;
|
|
2202
|
+
innerSelector: string;
|
|
2203
|
+
name: "shadow";
|
|
2204
|
+
};
|
|
2205
|
+
value: string;
|
|
2206
|
+
}[];
|
|
2207
|
+
tag: string;
|
|
2208
|
+
attributes?: {
|
|
2209
|
+
bounds?: {
|
|
2210
|
+
bottom: number;
|
|
2211
|
+
left: number;
|
|
2212
|
+
right: number;
|
|
2213
|
+
top: number;
|
|
2214
|
+
} | undefined;
|
|
2215
|
+
rest?: Record<string, string> | undefined;
|
|
2216
|
+
} | undefined;
|
|
2217
|
+
} & {
|
|
2218
|
+
children?: (({
|
|
2219
|
+
selectors: {
|
|
2220
|
+
strategy: {
|
|
2221
|
+
name: "xpath";
|
|
2222
|
+
type: "unique" | "full-path" | "sibling-of" | "parent-of";
|
|
2223
|
+
} | {
|
|
2224
|
+
name: "ios-predicate";
|
|
2225
|
+
} | {
|
|
2226
|
+
hostSelector: string;
|
|
2227
|
+
innerSelector: string;
|
|
2228
|
+
name: "shadow";
|
|
2229
|
+
};
|
|
2230
|
+
value: string;
|
|
2231
|
+
}[];
|
|
2232
|
+
tag: string;
|
|
2233
|
+
attributes?: {
|
|
2234
|
+
bounds?: {
|
|
2235
|
+
bottom: number;
|
|
2236
|
+
left: number;
|
|
2237
|
+
right: number;
|
|
2238
|
+
top: number;
|
|
2239
|
+
} | undefined;
|
|
2240
|
+
rest?: Record<string, string> | undefined;
|
|
2241
|
+
} | undefined;
|
|
2242
|
+
} & /*elided*/ any) | string)[];
|
|
2243
|
+
}, unknown, z.core.$ZodTypeInternals<{
|
|
2244
|
+
selectors: {
|
|
2245
|
+
strategy: {
|
|
2246
|
+
name: "xpath";
|
|
2247
|
+
type: "unique" | "full-path" | "sibling-of" | "parent-of";
|
|
2248
|
+
} | {
|
|
2249
|
+
name: "ios-predicate";
|
|
2250
|
+
} | {
|
|
2251
|
+
hostSelector: string;
|
|
2252
|
+
innerSelector: string;
|
|
2253
|
+
name: "shadow";
|
|
2254
|
+
};
|
|
2255
|
+
value: string;
|
|
2256
|
+
}[];
|
|
2257
|
+
tag: string;
|
|
2258
|
+
attributes?: {
|
|
2259
|
+
bounds?: {
|
|
2260
|
+
bottom: number;
|
|
2261
|
+
left: number;
|
|
2262
|
+
right: number;
|
|
2263
|
+
top: number;
|
|
2264
|
+
} | undefined;
|
|
2265
|
+
rest?: Record<string, string> | undefined;
|
|
2266
|
+
} | undefined;
|
|
2267
|
+
} & {
|
|
2268
|
+
children?: (({
|
|
2269
|
+
selectors: {
|
|
2270
|
+
strategy: {
|
|
2271
|
+
name: "xpath";
|
|
2272
|
+
type: "unique" | "full-path" | "sibling-of" | "parent-of";
|
|
2273
|
+
} | {
|
|
2274
|
+
name: "ios-predicate";
|
|
2275
|
+
} | {
|
|
2276
|
+
hostSelector: string;
|
|
2277
|
+
innerSelector: string;
|
|
2278
|
+
name: "shadow";
|
|
2279
|
+
};
|
|
2280
|
+
value: string;
|
|
2281
|
+
}[];
|
|
2282
|
+
tag: string;
|
|
2283
|
+
attributes?: {
|
|
2284
|
+
bounds?: {
|
|
2285
|
+
bottom: number;
|
|
2286
|
+
left: number;
|
|
2287
|
+
right: number;
|
|
2288
|
+
top: number;
|
|
2289
|
+
} | undefined;
|
|
2290
|
+
rest?: Record<string, string> | undefined;
|
|
2291
|
+
} | undefined;
|
|
2292
|
+
} & /*elided*/ any) | string)[];
|
|
2293
|
+
}, unknown>>;
|
|
2294
|
+
what: z.ZodLiteral<"page">;
|
|
2295
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2296
|
+
matches: z.ZodArray<z.ZodObject<{
|
|
2297
|
+
attributes: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
2298
|
+
bounds: z.ZodOptional<z.ZodObject<{
|
|
2299
|
+
bottom: z.ZodNumber;
|
|
2300
|
+
left: z.ZodNumber;
|
|
2301
|
+
right: z.ZodNumber;
|
|
2302
|
+
top: z.ZodNumber;
|
|
2303
|
+
}, z.core.$strip>>;
|
|
2304
|
+
center: z.ZodOptional<z.ZodObject<{
|
|
2305
|
+
x: z.ZodNumber;
|
|
2306
|
+
y: z.ZodNumber;
|
|
2307
|
+
}, z.core.$strip>>;
|
|
2308
|
+
selectors: z.ZodArray<z.ZodObject<{
|
|
2309
|
+
strategy: z.ZodUnion<readonly [z.ZodObject<{
|
|
2310
|
+
name: z.ZodLiteral<"xpath">;
|
|
2311
|
+
type: z.ZodEnum<{
|
|
2312
|
+
unique: "unique";
|
|
2313
|
+
"full-path": "full-path";
|
|
2314
|
+
"sibling-of": "sibling-of";
|
|
2315
|
+
"parent-of": "parent-of";
|
|
2316
|
+
}>;
|
|
2317
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2318
|
+
name: z.ZodLiteral<"ios-predicate">;
|
|
2319
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2320
|
+
hostSelector: z.ZodString;
|
|
2321
|
+
innerSelector: z.ZodString;
|
|
2322
|
+
name: z.ZodLiteral<"shadow">;
|
|
2323
|
+
}, z.core.$strip>]>;
|
|
2324
|
+
value: z.ZodString;
|
|
2325
|
+
}, z.core.$strip>>;
|
|
2326
|
+
tag: z.ZodString;
|
|
2327
|
+
}, z.core.$strip>>;
|
|
2328
|
+
outcome: z.ZodLiteral<"success">;
|
|
2329
|
+
what: z.ZodLiteral<"elements">;
|
|
2330
|
+
}, z.core.$strip>], "what">, z.ZodObject<{
|
|
2331
|
+
failureReason: z.ZodEnum<{
|
|
2332
|
+
"runner-unreachable": "runner-unreachable";
|
|
2333
|
+
"runner-is-not-mobile": "runner-is-not-mobile";
|
|
2334
|
+
"screen-needs-a-run": "screen-needs-a-run";
|
|
2335
|
+
"screen-not-ready": "screen-not-ready";
|
|
1935
2336
|
}>;
|
|
1936
2337
|
outcome: z.ZodLiteral<"failure">;
|
|
1937
2338
|
}, z.core.$strip>], "outcome">;
|
|
@@ -1963,7 +2364,7 @@ export declare const publicContractsV1: {
|
|
|
1963
2364
|
}, z.core.$strip>;
|
|
1964
2365
|
};
|
|
1965
2366
|
performAction: {
|
|
1966
|
-
readonly description: "Perform one raw browser action on an interactive runner: click, double_click, move, drag, scroll, keypress, type, or navigate. Coordinates are whole pixels on the runner's virtual desktop, in the same space as `runner.takeScreenshot`. One action per request, and the runner serves one at a time. The action shapes follow the computer-use vocabulary, minus `screenshot` (use `runner.takeScreenshot`) and `wait` (delay on the caller's side). 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. `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. A `navigate` does not go through the screen, so a screen that is not ready does not stop it. `runner-has-no-screen` if this runner is not one that runs a browser on a virtual desktop. Nothing about it can be seen or driven, and retrying will never help — launch a `playwright` runner instead. `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.";
|
|
2367
|
+
readonly description: "Perform one raw browser action on an interactive runner: click, double_click, move, drag, scroll, keypress, type, or navigate. Coordinates are whole pixels on the runner's virtual desktop, in the same space as `runner.takeScreenshot`. One action per request, and the runner serves one at a time. The action shapes follow the computer-use vocabulary, minus `screenshot` (use `runner.takeScreenshot`) and `wait` (delay on the caller's side). 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. A `navigate` does not go through the screen, so a screen that is not ready does not stop it. `runner-has-no-screen` if this runner is not one that runs a browser on a virtual desktop. Nothing about it can be seen or driven, and retrying will never help — launch a `playwright` runner instead. `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, `drag` swipes between its path's first and last point, and `type` types into whatever the last tap focused. `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.";
|
|
1967
2368
|
readonly input: z.ZodObject<{
|
|
1968
2369
|
action: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1969
2370
|
button: z.ZodLiteral<"left" | "right" | "wheel" | "back" | "forward">;
|
|
@@ -2013,9 +2414,10 @@ export declare const publicContractsV1: {
|
|
|
2013
2414
|
}, z.core.$strip>, z.ZodObject<{
|
|
2014
2415
|
failureReason: z.ZodEnum<{
|
|
2015
2416
|
"runner-unreachable": "runner-unreachable";
|
|
2016
|
-
"runner-has-no-screen": "runner-has-no-screen";
|
|
2017
2417
|
"screen-needs-a-run": "screen-needs-a-run";
|
|
2018
2418
|
"screen-not-ready": "screen-not-ready";
|
|
2419
|
+
"runner-has-no-screen": "runner-has-no-screen";
|
|
2420
|
+
"action-not-supported-on-mobile": "action-not-supported-on-mobile";
|
|
2019
2421
|
}>;
|
|
2020
2422
|
outcome: z.ZodLiteral<"failure">;
|
|
2021
2423
|
}, z.core.$strip>], "failureReason">], "outcome">;
|
|
@@ -2036,7 +2438,7 @@ export declare const publicContractsV1: {
|
|
|
2036
2438
|
payload: z.ZodUnknown;
|
|
2037
2439
|
recordedAt: z.ZodISODateTime;
|
|
2038
2440
|
sequence: z.ZodNumber;
|
|
2039
|
-
}, z.core.$strip>, z.ZodTransform<import("./
|
|
2441
|
+
}, z.core.$strip>, z.ZodTransform<import("./runnerReexports.js").JournalEntry<unknown>, {
|
|
2040
2442
|
payload: unknown;
|
|
2041
2443
|
recordedAt: string;
|
|
2042
2444
|
sequence: number;
|
|
@@ -2114,7 +2516,7 @@ export declare const publicContractsV1: {
|
|
|
2114
2516
|
}, z.core.$strip>], "outcome">;
|
|
2115
2517
|
};
|
|
2116
2518
|
takeScreenshot: {
|
|
2117
|
-
readonly description: "Take one screenshot of an interactive runner's screen.
|
|
2519
|
+
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. 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 is not one that runs a browser on a virtual desktop. Nothing about it can be seen or driven, and retrying will never help — launch a `playwright` runner instead. `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.";
|
|
2118
2520
|
readonly input: z.ZodObject<{
|
|
2119
2521
|
id: z.ZodString;
|
|
2120
2522
|
}, z.core.$strip>;
|
|
@@ -2126,9 +2528,9 @@ export declare const publicContractsV1: {
|
|
|
2126
2528
|
}, z.core.$strip>, z.ZodObject<{
|
|
2127
2529
|
failureReason: z.ZodEnum<{
|
|
2128
2530
|
"runner-unreachable": "runner-unreachable";
|
|
2129
|
-
"runner-has-no-screen": "runner-has-no-screen";
|
|
2130
2531
|
"screen-needs-a-run": "screen-needs-a-run";
|
|
2131
2532
|
"screen-not-ready": "screen-not-ready";
|
|
2533
|
+
"runner-has-no-screen": "runner-has-no-screen";
|
|
2132
2534
|
}>;
|
|
2133
2535
|
outcome: z.ZodLiteral<"failure">;
|
|
2134
2536
|
}, z.core.$strip>], "outcome">;
|