@qawolf/api-contracts 0.26.0 → 0.27.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 +292 -124
- package/dist/v1/index.d.ts.map +1 -1
- package/dist/v1/index.js +10 -2
- package/dist/v1/index.js.map +1 -1
- package/dist/v1/runner/environment.d.ts.map +1 -1
- package/dist/v1/runner/environment.js +11 -8
- package/dist/v1/runner/environment.js.map +1 -1
- package/dist/v1/runner/evaluateSnippet.d.ts +5 -2
- package/dist/v1/runner/evaluateSnippet.d.ts.map +1 -1
- package/dist/v1/runner/evaluateSnippet.js +4 -3
- package/dist/v1/runner/evaluateSnippet.js.map +1 -1
- package/dist/v1/runner/identity.d.ts +8 -8
- package/dist/v1/runner/identity.js +5 -5
- package/dist/v1/runner/identity.js.map +1 -1
- package/dist/v1/runner/importPackage.d.ts +23 -0
- package/dist/v1/runner/importPackage.d.ts.map +1 -0
- package/dist/v1/runner/importPackage.js +33 -0
- package/dist/v1/runner/importPackage.js.map +1 -0
- package/dist/v1/runner/index.d.ts +16 -20
- package/dist/v1/runner/index.d.ts.map +1 -1
- package/dist/v1/runner/index.js +14 -12
- package/dist/v1/runner/index.js.map +1 -1
- package/dist/v1/runner/inspect.d.ts +42 -0
- package/dist/v1/runner/inspect.d.ts.map +1 -0
- package/dist/v1/runner/inspect.js +61 -0
- package/dist/v1/runner/inspect.js.map +1 -0
- package/dist/v1/runner/outcome.d.ts +6 -0
- package/dist/v1/runner/outcome.d.ts.map +1 -0
- package/dist/v1/runner/outcome.js +8 -0
- package/dist/v1/runner/outcome.js.map +1 -0
- package/dist/v1/runner/payloadSize.d.ts +6 -0
- package/dist/v1/runner/payloadSize.d.ts.map +1 -1
- package/dist/v1/runner/payloadSize.js +8 -2
- package/dist/v1/runner/payloadSize.js.map +1 -1
- package/dist/v1/runner/performAction.d.ts +13 -12
- package/dist/v1/runner/performAction.d.ts.map +1 -1
- package/dist/v1/runner/performAction.js +17 -10
- package/dist/v1/runner/performAction.js.map +1 -1
- package/dist/v1/runner/readJournal.d.ts +5 -2
- package/dist/v1/runner/readJournal.d.ts.map +1 -1
- package/dist/v1/runner/readJournal.js +4 -3
- package/dist/v1/runner/readJournal.js.map +1 -1
- package/dist/v1/runner/runFlow.d.ts +28 -15
- package/dist/v1/runner/runFlow.d.ts.map +1 -1
- package/dist/v1/runner/runFlow.js +56 -10
- package/dist/v1/runner/runFlow.js.map +1 -1
- package/dist/v1/runner/runSelection.d.ts +8 -0
- package/dist/v1/runner/runSelection.d.ts.map +1 -0
- package/dist/v1/runner/runSelection.js +19 -0
- package/dist/v1/runner/runSelection.js.map +1 -0
- package/dist/v1/runner/screen.d.ts +2 -11
- package/dist/v1/runner/screen.d.ts.map +1 -1
- package/dist/v1/runner/screen.js +7 -12
- package/dist/v1/runner/screen.js.map +1 -1
- package/dist/v1/runner/stopRun.d.ts +19 -0
- package/dist/v1/runner/stopRun.d.ts.map +1 -0
- package/dist/v1/runner/stopRun.js +26 -0
- package/dist/v1/runner/stopRun.js.map +1 -0
- package/dist/v1/runner/takeScreenshot.d.ts +9 -9
- package/dist/v1/runner/takeScreenshot.d.ts.map +1 -1
- package/dist/v1/runner/takeScreenshot.js +8 -7
- package/dist/v1/runner/takeScreenshot.js.map +1 -1
- package/dist/v1/runner/unreachable.d.ts +4 -7
- package/dist/v1/runner/unreachable.d.ts.map +1 -1
- package/dist/v1/runner/unreachable.js +4 -7
- package/dist/v1/runner/unreachable.js.map +1 -1
- package/package.json +1 -1
package/dist/v1/index.d.ts
CHANGED
|
@@ -7,9 +7,11 @@ export { type BrowserAction, browserActionSchema, } from "./runner/browserAction
|
|
|
7
7
|
export { runEnvironmentSchema } from "./runner/environment.js";
|
|
8
8
|
export { isShippableRunFilePath, runFilePathSchema, runPackageJsonPath, shippableRunFileExtensions, } from "./runner/files.js";
|
|
9
9
|
export { type RunnerNameForPublicApi, makeRunnerSchema, runnerIdSchema, runnerNameSchema, } from "./runner/identity.js";
|
|
10
|
+
export { type InspectOnRunnerRequest, inspectRequestSchema, } from "./runner/inspect.js";
|
|
10
11
|
export { type JournalEntry, type JournalStream, type KnownJournalStream, type ReadJournalRequest, type ReadJournalResponse, journalEntrySchema, journalStreamSchema, knownJournalStreams, maxJournalStreamNameLength, readJournalRequestSchema, readJournalResponseSchema, } from "./runner/journal.js";
|
|
11
12
|
export { type RunFiles, maxRunFilesByteLength, maxRunnerRequestEncodedByteLength, runFilesByteLength, runFilesSchema, } from "./runner/payloadSize.js";
|
|
12
13
|
export { maxActionErrorMessageLength } from "./runner/performAction.js";
|
|
14
|
+
export { type RunSelection, runSelectionSchema, } from "./runner/runSelection.js";
|
|
13
15
|
import type { AnyPublicApiContract } from "./definition.js";
|
|
14
16
|
import { type PublicIdSchema, type PublicIdSchemasOf } from "./ids.js";
|
|
15
17
|
export type PublicApiInput<Api extends AnyPublicApiContract> = z.input<Api["input"]>;
|
|
@@ -767,25 +769,78 @@ export declare const makeContractsV1: <EnvironmentId extends PublicIdSchema, Flo
|
|
|
767
769
|
readonly name: "runner.evaluateSnippet";
|
|
768
770
|
readonly output: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
769
771
|
errorMessage: z.ZodOptional<z.ZodString>;
|
|
770
|
-
outcome: z.ZodLiteral<"
|
|
772
|
+
outcome: z.ZodLiteral<"success">;
|
|
771
773
|
result: z.ZodEnum<{
|
|
772
774
|
success: "success";
|
|
773
775
|
error: "error";
|
|
774
776
|
stopped: "stopped";
|
|
775
777
|
}>;
|
|
776
778
|
}, z.core.$strip>, z.ZodObject<{
|
|
777
|
-
|
|
779
|
+
failureReason: z.ZodEnum<{
|
|
780
|
+
"runner-unreachable": "runner-unreachable";
|
|
781
|
+
}>;
|
|
782
|
+
outcome: z.ZodLiteral<"failure">;
|
|
783
|
+
}, z.core.$strip>], "outcome">;
|
|
784
|
+
};
|
|
785
|
+
importPackage: {
|
|
786
|
+
readonly description: "Install a package into an interactive runner's live run and import it, so a snippet or a selection can use it without a full run to reinstall dependencies. An `install-failed` failure carries npm's reason in `errorMessage`. `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. The install may still have landed, but installing the same version again does nothing, so retrying is safe.";
|
|
787
|
+
readonly input: z.ZodObject<{
|
|
788
|
+
id: z.ZodString;
|
|
789
|
+
npmDependencies: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
790
|
+
packageName: z.ZodString;
|
|
791
|
+
packageVersion: z.ZodString;
|
|
792
|
+
}, z.core.$strip>;
|
|
793
|
+
readonly kind: "write";
|
|
794
|
+
readonly name: "runner.importPackage";
|
|
795
|
+
readonly output: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
796
|
+
outcome: z.ZodLiteral<"success">;
|
|
797
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
798
|
+
errorMessage: z.ZodOptional<z.ZodString>;
|
|
799
|
+
failureReason: z.ZodEnum<{
|
|
800
|
+
"runner-unreachable": "runner-unreachable";
|
|
801
|
+
"install-failed": "install-failed";
|
|
802
|
+
}>;
|
|
803
|
+
outcome: z.ZodLiteral<"failure">;
|
|
804
|
+
}, z.core.$strip>], "outcome">;
|
|
805
|
+
};
|
|
806
|
+
inspect: {
|
|
807
|
+
readonly description: string;
|
|
808
|
+
readonly input: z.ZodObject<{
|
|
809
|
+
id: z.ZodString;
|
|
810
|
+
request: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
811
|
+
selector: z.ZodString;
|
|
812
|
+
what: z.ZodLiteral<"element-html">;
|
|
813
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
814
|
+
selector: z.ZodOptional<z.ZodString>;
|
|
815
|
+
what: z.ZodLiteral<"page-html">;
|
|
816
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
817
|
+
variableName: z.ZodString;
|
|
818
|
+
what: z.ZodLiteral<"variable">;
|
|
819
|
+
}, z.core.$strip>], "what">;
|
|
820
|
+
}, z.core.$strip>;
|
|
821
|
+
readonly kind: "read";
|
|
822
|
+
readonly name: "runner.inspect";
|
|
823
|
+
readonly output: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
824
|
+
outcome: z.ZodLiteral<"success">;
|
|
825
|
+
value: z.ZodString;
|
|
826
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
827
|
+
errorMessage: z.ZodOptional<z.ZodString>;
|
|
828
|
+
failureReason: z.ZodEnum<{
|
|
829
|
+
"runner-unreachable": "runner-unreachable";
|
|
830
|
+
"nothing-to-inspect": "nothing-to-inspect";
|
|
831
|
+
}>;
|
|
832
|
+
outcome: z.ZodLiteral<"failure">;
|
|
778
833
|
}, z.core.$strip>], "outcome">;
|
|
779
834
|
};
|
|
780
835
|
launch: {
|
|
781
|
-
readonly description: "Launch an interactive runner on the caller's team under an id the caller chooses. Launching the same id again returns the runner already running rather than starting a second one, and the same id with a different runnerName is refused. A runner is not permanent: it terminates on its own after a period of inactivity, and launching the same id after that starts and bills a new runner — so read `
|
|
836
|
+
readonly description: "Launch an interactive runner on the caller's team under an id the caller chooses. Launching the same id again returns the runner already running rather than starting a second one, and the same id with a different runnerName is refused. A runner is not permanent: it terminates on its own after a period of inactivity, and launching the same id after that starts and bills a new runner — so read `alreadyRunning` to tell which happened.";
|
|
782
837
|
readonly input: z.ZodObject<{
|
|
783
838
|
id: z.ZodString;
|
|
784
839
|
runnerName: z.ZodOptional<z.ZodEnum<{
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
840
|
+
basic: "basic";
|
|
841
|
+
playwright: "playwright";
|
|
842
|
+
android: "android";
|
|
843
|
+
ios: "ios";
|
|
789
844
|
}>>;
|
|
790
845
|
}, z.core.$strip>;
|
|
791
846
|
readonly kind: "write";
|
|
@@ -794,19 +849,17 @@ export declare const makeContractsV1: <EnvironmentId extends PublicIdSchema, Flo
|
|
|
794
849
|
gpuAccelerated: z.ZodBoolean;
|
|
795
850
|
id: z.ZodString;
|
|
796
851
|
runnerName: z.ZodEnum<{
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
}>;
|
|
802
|
-
outcome: z.ZodEnum<{
|
|
803
|
-
launched: "launched";
|
|
804
|
-
"already-running": "already-running";
|
|
852
|
+
basic: "basic";
|
|
853
|
+
playwright: "playwright";
|
|
854
|
+
android: "android";
|
|
855
|
+
ios: "ios";
|
|
805
856
|
}>;
|
|
857
|
+
alreadyRunning: z.ZodBoolean;
|
|
858
|
+
outcome: z.ZodLiteral<"success">;
|
|
806
859
|
}, z.core.$strip>;
|
|
807
860
|
};
|
|
808
861
|
performAction: {
|
|
809
|
-
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).
|
|
862
|
+
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.";
|
|
810
863
|
readonly input: z.ZodObject<{
|
|
811
864
|
action: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
812
865
|
button: z.ZodLiteral<"left" | "right" | "wheel" | "back" | "forward">;
|
|
@@ -848,19 +901,20 @@ export declare const makeContractsV1: <EnvironmentId extends PublicIdSchema, Flo
|
|
|
848
901
|
readonly kind: "write";
|
|
849
902
|
readonly name: "runner.performAction";
|
|
850
903
|
readonly output: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
851
|
-
outcome: z.ZodLiteral<"
|
|
852
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
904
|
+
outcome: z.ZodLiteral<"success">;
|
|
905
|
+
}, z.core.$strip>, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
853
906
|
errorMessage: z.ZodString;
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
outcome: z.ZodLiteral<"screen-needs-a-run">;
|
|
857
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
858
|
-
outcome: z.ZodLiteral<"screen-not-ready">;
|
|
859
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
860
|
-
outcome: z.ZodLiteral<"runner-has-no-screen">;
|
|
907
|
+
failureReason: z.ZodLiteral<"action-failed">;
|
|
908
|
+
outcome: z.ZodLiteral<"failure">;
|
|
861
909
|
}, z.core.$strip>, z.ZodObject<{
|
|
862
|
-
|
|
863
|
-
|
|
910
|
+
failureReason: z.ZodEnum<{
|
|
911
|
+
"runner-unreachable": "runner-unreachable";
|
|
912
|
+
"runner-has-no-screen": "runner-has-no-screen";
|
|
913
|
+
"screen-needs-a-run": "screen-needs-a-run";
|
|
914
|
+
"screen-not-ready": "screen-not-ready";
|
|
915
|
+
}>;
|
|
916
|
+
outcome: z.ZodLiteral<"failure">;
|
|
917
|
+
}, z.core.$strip>], "failureReason">], "outcome">;
|
|
864
918
|
};
|
|
865
919
|
readJournal: {
|
|
866
920
|
readonly description: "Read a window of one of an interactive runner's journal streams — the newest few, everything after a cursor, or everything belonging to one run. This is how a flow run's outcome and output are followed: `run-status` settles it, `run-logs` and `run-events` carry what it produced, and `recorder` carries the browser actions the runner recorded. A read counts as activity, so working through history does not get the runner reaped underneath you. `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.";
|
|
@@ -886,59 +940,77 @@ export declare const makeContractsV1: <EnvironmentId extends PublicIdSchema, Flo
|
|
|
886
940
|
hasUnsearchedHistory: z.ZodBoolean;
|
|
887
941
|
nextSequence: z.ZodNumber;
|
|
888
942
|
oldestAvailableSequence: z.ZodNumber;
|
|
889
|
-
outcome: z.ZodLiteral<"
|
|
943
|
+
outcome: z.ZodLiteral<"success">;
|
|
890
944
|
}, z.core.$strip>, z.ZodObject<{
|
|
891
|
-
|
|
945
|
+
failureReason: z.ZodEnum<{
|
|
946
|
+
"runner-unreachable": "runner-unreachable";
|
|
947
|
+
}>;
|
|
948
|
+
outcome: z.ZodLiteral<"failure">;
|
|
892
949
|
}, z.core.$strip>], "outcome">;
|
|
893
950
|
};
|
|
894
951
|
runFlow: {
|
|
895
|
-
readonly description: "Run a flow on an interactive runner. Answers as soon as the run is accepted, with the id to follow it by — nothing waits for the run to finish. Which browser or device the run needs is read from the flow file's own execution target, so it is not supplied here; when it does not match what the runner is, the call
|
|
952
|
+
readonly description: "Run a flow on an interactive runner. When `selection` is given the lines run against the browser as it stands, so nothing is re-navigated and nothing is signed in again; without it the whole entry point runs from a fresh browser. A runner with no live browser starts one before a selection and says so with `bootstrappedRunner`, which means those lines ran against a fresh page rather than the one an earlier run left. A selection produces no `runStarted` event, so follow it by its run id on `run-status` like any other run. Send `unchangedFiles` to ship only what changed since an earlier run on this runner; a `needs-full-sync` failure names the paths it does not hold, and the way to recover is the same run again with every file in `files`. Answers as soon as the run is accepted, with the id to follow it by — nothing waits for the run to finish. Which browser or device the run needs is read from the flow file's own execution target, so it is not supplied here; when it does not match what the runner is, the call fails with `runner-target-mismatch` rather than failing partway through the run. `runner-unreachable` means the answer did not arrive, which is NOT the same as the run not having started: the runner may have accepted it and been too slow to say so, and resubmitting would start a second run that is billed and journalled alongside the first. Read the runner's `run-status` journal stream before resubmitting, and use the newest run id there if one appeared.";
|
|
896
953
|
readonly input: z.ZodObject<{
|
|
897
954
|
entryPointPath: z.ZodString;
|
|
898
955
|
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
899
956
|
files: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
900
957
|
id: z.ZodString;
|
|
958
|
+
selection: z.ZodOptional<z.ZodObject<{
|
|
959
|
+
endLine: z.ZodInt;
|
|
960
|
+
path: z.ZodString;
|
|
961
|
+
startLine: z.ZodInt;
|
|
962
|
+
}, z.core.$strip>>;
|
|
963
|
+
unchangedFiles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
901
964
|
}, z.core.$strip>;
|
|
902
965
|
readonly kind: "write";
|
|
903
966
|
readonly name: "runner.runFlow";
|
|
904
967
|
readonly output: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
905
|
-
|
|
968
|
+
bootstrappedRunner: z.ZodOptional<z.ZodBoolean>;
|
|
969
|
+
outcome: z.ZodLiteral<"success">;
|
|
906
970
|
runId: z.ZodString;
|
|
907
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
outcome: z.ZodLiteral<"runner-target-mismatch">;
|
|
971
|
+
}, z.core.$strip>, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
972
|
+
failureReason: z.ZodLiteral<"runner-target-mismatch">;
|
|
973
|
+
outcome: z.ZodLiteral<"failure">;
|
|
911
974
|
requiredRunnerName: z.ZodEnum<{
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
975
|
+
basic: "basic";
|
|
976
|
+
playwright: "playwright";
|
|
977
|
+
android: "android";
|
|
978
|
+
ios: "ios";
|
|
916
979
|
}>;
|
|
917
980
|
runnerName: z.ZodEnum<{
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
981
|
+
basic: "basic";
|
|
982
|
+
playwright: "playwright";
|
|
983
|
+
android: "android";
|
|
984
|
+
ios: "ios";
|
|
922
985
|
}>;
|
|
923
|
-
}, z.core.$strip
|
|
986
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
987
|
+
failureReason: z.ZodLiteral<"needs-full-sync">;
|
|
988
|
+
missingPaths: z.ZodArray<z.ZodString>;
|
|
989
|
+
outcome: z.ZodLiteral<"failure">;
|
|
990
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
991
|
+
failureReason: z.ZodLiteral<"runner-unreachable">;
|
|
992
|
+
outcome: z.ZodLiteral<"failure">;
|
|
993
|
+
}, z.core.$strip>], "failureReason">], "outcome">;
|
|
924
994
|
};
|
|
925
|
-
|
|
926
|
-
readonly description: "Stop
|
|
995
|
+
stopRun: {
|
|
996
|
+
readonly description: "Stop what a runner is currently executing, leaving the runner up and its browser on whatever page the run reached. Succeeds whether or not anything was running, and `wasRunning` says which. This is the counterpart of `runner.terminate`, which ends the runner itself. The run stops where it is, so the journal's `run-status` settles it as stopped rather than passed or failed. `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. The stop may still have landed, but stopping a runner that is already idle does nothing, so retrying is safe.";
|
|
927
997
|
readonly input: z.ZodObject<{
|
|
928
998
|
id: z.ZodString;
|
|
929
999
|
}, z.core.$strip>;
|
|
930
1000
|
readonly kind: "write";
|
|
931
|
-
readonly name: "runner.
|
|
932
|
-
readonly output: z.ZodObject<{
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
1001
|
+
readonly name: "runner.stopRun";
|
|
1002
|
+
readonly output: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1003
|
+
outcome: z.ZodLiteral<"success">;
|
|
1004
|
+
wasRunning: z.ZodBoolean;
|
|
1005
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1006
|
+
failureReason: z.ZodEnum<{
|
|
1007
|
+
"runner-unreachable": "runner-unreachable";
|
|
937
1008
|
}>;
|
|
938
|
-
|
|
1009
|
+
outcome: z.ZodLiteral<"failure">;
|
|
1010
|
+
}, z.core.$strip>], "outcome">;
|
|
939
1011
|
};
|
|
940
1012
|
takeScreenshot: {
|
|
941
|
-
readonly description: "Take one screenshot of an interactive runner's screen. The image is the runner's whole virtual desktop, browser window and all. `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 `
|
|
1013
|
+
readonly description: "Take one screenshot of an interactive runner's screen. The image is the runner's whole virtual desktop, browser window and all. `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.";
|
|
942
1014
|
readonly input: z.ZodObject<{
|
|
943
1015
|
id: z.ZodString;
|
|
944
1016
|
}, z.core.$strip>;
|
|
@@ -946,17 +1018,30 @@ export declare const makeContractsV1: <EnvironmentId extends PublicIdSchema, Flo
|
|
|
946
1018
|
readonly name: "runner.takeScreenshot";
|
|
947
1019
|
readonly output: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
948
1020
|
imageJpegBase64: z.ZodString;
|
|
949
|
-
outcome: z.ZodLiteral<"
|
|
950
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
951
|
-
outcome: z.ZodLiteral<"screen-needs-a-run">;
|
|
952
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
953
|
-
outcome: z.ZodLiteral<"screen-not-ready">;
|
|
1021
|
+
outcome: z.ZodLiteral<"success">;
|
|
954
1022
|
}, z.core.$strip>, z.ZodObject<{
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
1023
|
+
failureReason: z.ZodEnum<{
|
|
1024
|
+
"runner-unreachable": "runner-unreachable";
|
|
1025
|
+
"runner-has-no-screen": "runner-has-no-screen";
|
|
1026
|
+
"screen-needs-a-run": "screen-needs-a-run";
|
|
1027
|
+
"screen-not-ready": "screen-not-ready";
|
|
1028
|
+
}>;
|
|
1029
|
+
outcome: z.ZodLiteral<"failure">;
|
|
958
1030
|
}, z.core.$strip>], "outcome">;
|
|
959
1031
|
};
|
|
1032
|
+
terminate: {
|
|
1033
|
+
readonly description: "End an interactive runner on the caller's team, and the pod it runs on with it. Terminating a runner that is not running succeeds and reports `wasRunning: false`. This ends the runner: use `runner.stopRun` to stop what a runner is currently executing while leaving the runner up.";
|
|
1034
|
+
readonly input: z.ZodObject<{
|
|
1035
|
+
id: z.ZodString;
|
|
1036
|
+
}, z.core.$strip>;
|
|
1037
|
+
readonly kind: "write";
|
|
1038
|
+
readonly name: "runner.terminate";
|
|
1039
|
+
readonly output: z.ZodObject<{
|
|
1040
|
+
id: z.ZodString;
|
|
1041
|
+
outcome: z.ZodLiteral<"success">;
|
|
1042
|
+
wasRunning: z.ZodBoolean;
|
|
1043
|
+
}, z.core.$strip>;
|
|
1044
|
+
};
|
|
960
1045
|
};
|
|
961
1046
|
tag: {
|
|
962
1047
|
create: {
|
|
@@ -1740,25 +1825,78 @@ export declare const publicContractsV1: {
|
|
|
1740
1825
|
readonly name: "runner.evaluateSnippet";
|
|
1741
1826
|
readonly output: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1742
1827
|
errorMessage: z.ZodOptional<z.ZodString>;
|
|
1743
|
-
outcome: z.ZodLiteral<"
|
|
1828
|
+
outcome: z.ZodLiteral<"success">;
|
|
1744
1829
|
result: z.ZodEnum<{
|
|
1745
1830
|
success: "success";
|
|
1746
1831
|
error: "error";
|
|
1747
1832
|
stopped: "stopped";
|
|
1748
1833
|
}>;
|
|
1749
1834
|
}, z.core.$strip>, z.ZodObject<{
|
|
1750
|
-
|
|
1835
|
+
failureReason: z.ZodEnum<{
|
|
1836
|
+
"runner-unreachable": "runner-unreachable";
|
|
1837
|
+
}>;
|
|
1838
|
+
outcome: z.ZodLiteral<"failure">;
|
|
1839
|
+
}, z.core.$strip>], "outcome">;
|
|
1840
|
+
};
|
|
1841
|
+
importPackage: {
|
|
1842
|
+
readonly description: "Install a package into an interactive runner's live run and import it, so a snippet or a selection can use it without a full run to reinstall dependencies. An `install-failed` failure carries npm's reason in `errorMessage`. `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. The install may still have landed, but installing the same version again does nothing, so retrying is safe.";
|
|
1843
|
+
readonly input: z.ZodObject<{
|
|
1844
|
+
id: z.ZodString;
|
|
1845
|
+
npmDependencies: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
1846
|
+
packageName: z.ZodString;
|
|
1847
|
+
packageVersion: z.ZodString;
|
|
1848
|
+
}, z.core.$strip>;
|
|
1849
|
+
readonly kind: "write";
|
|
1850
|
+
readonly name: "runner.importPackage";
|
|
1851
|
+
readonly output: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1852
|
+
outcome: z.ZodLiteral<"success">;
|
|
1853
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1854
|
+
errorMessage: z.ZodOptional<z.ZodString>;
|
|
1855
|
+
failureReason: z.ZodEnum<{
|
|
1856
|
+
"runner-unreachable": "runner-unreachable";
|
|
1857
|
+
"install-failed": "install-failed";
|
|
1858
|
+
}>;
|
|
1859
|
+
outcome: z.ZodLiteral<"failure">;
|
|
1860
|
+
}, z.core.$strip>], "outcome">;
|
|
1861
|
+
};
|
|
1862
|
+
inspect: {
|
|
1863
|
+
readonly description: string;
|
|
1864
|
+
readonly input: z.ZodObject<{
|
|
1865
|
+
id: z.ZodString;
|
|
1866
|
+
request: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1867
|
+
selector: z.ZodString;
|
|
1868
|
+
what: z.ZodLiteral<"element-html">;
|
|
1869
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1870
|
+
selector: z.ZodOptional<z.ZodString>;
|
|
1871
|
+
what: z.ZodLiteral<"page-html">;
|
|
1872
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1873
|
+
variableName: z.ZodString;
|
|
1874
|
+
what: z.ZodLiteral<"variable">;
|
|
1875
|
+
}, z.core.$strip>], "what">;
|
|
1876
|
+
}, z.core.$strip>;
|
|
1877
|
+
readonly kind: "read";
|
|
1878
|
+
readonly name: "runner.inspect";
|
|
1879
|
+
readonly output: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1880
|
+
outcome: z.ZodLiteral<"success">;
|
|
1881
|
+
value: z.ZodString;
|
|
1882
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1883
|
+
errorMessage: z.ZodOptional<z.ZodString>;
|
|
1884
|
+
failureReason: z.ZodEnum<{
|
|
1885
|
+
"runner-unreachable": "runner-unreachable";
|
|
1886
|
+
"nothing-to-inspect": "nothing-to-inspect";
|
|
1887
|
+
}>;
|
|
1888
|
+
outcome: z.ZodLiteral<"failure">;
|
|
1751
1889
|
}, z.core.$strip>], "outcome">;
|
|
1752
1890
|
};
|
|
1753
1891
|
launch: {
|
|
1754
|
-
readonly description: "Launch an interactive runner on the caller's team under an id the caller chooses. Launching the same id again returns the runner already running rather than starting a second one, and the same id with a different runnerName is refused. A runner is not permanent: it terminates on its own after a period of inactivity, and launching the same id after that starts and bills a new runner — so read `
|
|
1892
|
+
readonly description: "Launch an interactive runner on the caller's team under an id the caller chooses. Launching the same id again returns the runner already running rather than starting a second one, and the same id with a different runnerName is refused. A runner is not permanent: it terminates on its own after a period of inactivity, and launching the same id after that starts and bills a new runner — so read `alreadyRunning` to tell which happened.";
|
|
1755
1893
|
readonly input: z.ZodObject<{
|
|
1756
1894
|
id: z.ZodString;
|
|
1757
1895
|
runnerName: z.ZodOptional<z.ZodEnum<{
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1896
|
+
basic: "basic";
|
|
1897
|
+
playwright: "playwright";
|
|
1898
|
+
android: "android";
|
|
1899
|
+
ios: "ios";
|
|
1762
1900
|
}>>;
|
|
1763
1901
|
}, z.core.$strip>;
|
|
1764
1902
|
readonly kind: "write";
|
|
@@ -1767,19 +1905,17 @@ export declare const publicContractsV1: {
|
|
|
1767
1905
|
gpuAccelerated: z.ZodBoolean;
|
|
1768
1906
|
id: z.ZodString;
|
|
1769
1907
|
runnerName: z.ZodEnum<{
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
}>;
|
|
1775
|
-
outcome: z.ZodEnum<{
|
|
1776
|
-
launched: "launched";
|
|
1777
|
-
"already-running": "already-running";
|
|
1908
|
+
basic: "basic";
|
|
1909
|
+
playwright: "playwright";
|
|
1910
|
+
android: "android";
|
|
1911
|
+
ios: "ios";
|
|
1778
1912
|
}>;
|
|
1913
|
+
alreadyRunning: z.ZodBoolean;
|
|
1914
|
+
outcome: z.ZodLiteral<"success">;
|
|
1779
1915
|
}, z.core.$strip>;
|
|
1780
1916
|
};
|
|
1781
1917
|
performAction: {
|
|
1782
|
-
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).
|
|
1918
|
+
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.";
|
|
1783
1919
|
readonly input: z.ZodObject<{
|
|
1784
1920
|
action: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1785
1921
|
button: z.ZodLiteral<"left" | "right" | "wheel" | "back" | "forward">;
|
|
@@ -1821,19 +1957,20 @@ export declare const publicContractsV1: {
|
|
|
1821
1957
|
readonly kind: "write";
|
|
1822
1958
|
readonly name: "runner.performAction";
|
|
1823
1959
|
readonly output: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1824
|
-
outcome: z.ZodLiteral<"
|
|
1825
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1960
|
+
outcome: z.ZodLiteral<"success">;
|
|
1961
|
+
}, z.core.$strip>, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1826
1962
|
errorMessage: z.ZodString;
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
outcome: z.ZodLiteral<"screen-needs-a-run">;
|
|
1830
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1831
|
-
outcome: z.ZodLiteral<"screen-not-ready">;
|
|
1832
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1833
|
-
outcome: z.ZodLiteral<"runner-has-no-screen">;
|
|
1963
|
+
failureReason: z.ZodLiteral<"action-failed">;
|
|
1964
|
+
outcome: z.ZodLiteral<"failure">;
|
|
1834
1965
|
}, z.core.$strip>, z.ZodObject<{
|
|
1835
|
-
|
|
1836
|
-
|
|
1966
|
+
failureReason: z.ZodEnum<{
|
|
1967
|
+
"runner-unreachable": "runner-unreachable";
|
|
1968
|
+
"runner-has-no-screen": "runner-has-no-screen";
|
|
1969
|
+
"screen-needs-a-run": "screen-needs-a-run";
|
|
1970
|
+
"screen-not-ready": "screen-not-ready";
|
|
1971
|
+
}>;
|
|
1972
|
+
outcome: z.ZodLiteral<"failure">;
|
|
1973
|
+
}, z.core.$strip>], "failureReason">], "outcome">;
|
|
1837
1974
|
};
|
|
1838
1975
|
readJournal: {
|
|
1839
1976
|
readonly description: "Read a window of one of an interactive runner's journal streams — the newest few, everything after a cursor, or everything belonging to one run. This is how a flow run's outcome and output are followed: `run-status` settles it, `run-logs` and `run-events` carry what it produced, and `recorder` carries the browser actions the runner recorded. A read counts as activity, so working through history does not get the runner reaped underneath you. `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.";
|
|
@@ -1859,59 +1996,77 @@ export declare const publicContractsV1: {
|
|
|
1859
1996
|
hasUnsearchedHistory: z.ZodBoolean;
|
|
1860
1997
|
nextSequence: z.ZodNumber;
|
|
1861
1998
|
oldestAvailableSequence: z.ZodNumber;
|
|
1862
|
-
outcome: z.ZodLiteral<"
|
|
1999
|
+
outcome: z.ZodLiteral<"success">;
|
|
1863
2000
|
}, z.core.$strip>, z.ZodObject<{
|
|
1864
|
-
|
|
2001
|
+
failureReason: z.ZodEnum<{
|
|
2002
|
+
"runner-unreachable": "runner-unreachable";
|
|
2003
|
+
}>;
|
|
2004
|
+
outcome: z.ZodLiteral<"failure">;
|
|
1865
2005
|
}, z.core.$strip>], "outcome">;
|
|
1866
2006
|
};
|
|
1867
2007
|
runFlow: {
|
|
1868
|
-
readonly description: "Run a flow on an interactive runner. Answers as soon as the run is accepted, with the id to follow it by — nothing waits for the run to finish. Which browser or device the run needs is read from the flow file's own execution target, so it is not supplied here; when it does not match what the runner is, the call
|
|
2008
|
+
readonly description: "Run a flow on an interactive runner. When `selection` is given the lines run against the browser as it stands, so nothing is re-navigated and nothing is signed in again; without it the whole entry point runs from a fresh browser. A runner with no live browser starts one before a selection and says so with `bootstrappedRunner`, which means those lines ran against a fresh page rather than the one an earlier run left. A selection produces no `runStarted` event, so follow it by its run id on `run-status` like any other run. Send `unchangedFiles` to ship only what changed since an earlier run on this runner; a `needs-full-sync` failure names the paths it does not hold, and the way to recover is the same run again with every file in `files`. Answers as soon as the run is accepted, with the id to follow it by — nothing waits for the run to finish. Which browser or device the run needs is read from the flow file's own execution target, so it is not supplied here; when it does not match what the runner is, the call fails with `runner-target-mismatch` rather than failing partway through the run. `runner-unreachable` means the answer did not arrive, which is NOT the same as the run not having started: the runner may have accepted it and been too slow to say so, and resubmitting would start a second run that is billed and journalled alongside the first. Read the runner's `run-status` journal stream before resubmitting, and use the newest run id there if one appeared.";
|
|
1869
2009
|
readonly input: z.ZodObject<{
|
|
1870
2010
|
entryPointPath: z.ZodString;
|
|
1871
2011
|
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1872
2012
|
files: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
1873
2013
|
id: z.ZodString;
|
|
2014
|
+
selection: z.ZodOptional<z.ZodObject<{
|
|
2015
|
+
endLine: z.ZodInt;
|
|
2016
|
+
path: z.ZodString;
|
|
2017
|
+
startLine: z.ZodInt;
|
|
2018
|
+
}, z.core.$strip>>;
|
|
2019
|
+
unchangedFiles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1874
2020
|
}, z.core.$strip>;
|
|
1875
2021
|
readonly kind: "write";
|
|
1876
2022
|
readonly name: "runner.runFlow";
|
|
1877
2023
|
readonly output: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1878
|
-
|
|
2024
|
+
bootstrappedRunner: z.ZodOptional<z.ZodBoolean>;
|
|
2025
|
+
outcome: z.ZodLiteral<"success">;
|
|
1879
2026
|
runId: z.ZodString;
|
|
1880
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
outcome: z.ZodLiteral<"runner-target-mismatch">;
|
|
2027
|
+
}, z.core.$strip>, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
2028
|
+
failureReason: z.ZodLiteral<"runner-target-mismatch">;
|
|
2029
|
+
outcome: z.ZodLiteral<"failure">;
|
|
1884
2030
|
requiredRunnerName: z.ZodEnum<{
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
2031
|
+
basic: "basic";
|
|
2032
|
+
playwright: "playwright";
|
|
2033
|
+
android: "android";
|
|
2034
|
+
ios: "ios";
|
|
1889
2035
|
}>;
|
|
1890
2036
|
runnerName: z.ZodEnum<{
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
2037
|
+
basic: "basic";
|
|
2038
|
+
playwright: "playwright";
|
|
2039
|
+
android: "android";
|
|
2040
|
+
ios: "ios";
|
|
1895
2041
|
}>;
|
|
1896
|
-
}, z.core.$strip
|
|
2042
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2043
|
+
failureReason: z.ZodLiteral<"needs-full-sync">;
|
|
2044
|
+
missingPaths: z.ZodArray<z.ZodString>;
|
|
2045
|
+
outcome: z.ZodLiteral<"failure">;
|
|
2046
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2047
|
+
failureReason: z.ZodLiteral<"runner-unreachable">;
|
|
2048
|
+
outcome: z.ZodLiteral<"failure">;
|
|
2049
|
+
}, z.core.$strip>], "failureReason">], "outcome">;
|
|
1897
2050
|
};
|
|
1898
|
-
|
|
1899
|
-
readonly description: "Stop
|
|
2051
|
+
stopRun: {
|
|
2052
|
+
readonly description: "Stop what a runner is currently executing, leaving the runner up and its browser on whatever page the run reached. Succeeds whether or not anything was running, and `wasRunning` says which. This is the counterpart of `runner.terminate`, which ends the runner itself. The run stops where it is, so the journal's `run-status` settles it as stopped rather than passed or failed. `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. The stop may still have landed, but stopping a runner that is already idle does nothing, so retrying is safe.";
|
|
1900
2053
|
readonly input: z.ZodObject<{
|
|
1901
2054
|
id: z.ZodString;
|
|
1902
2055
|
}, z.core.$strip>;
|
|
1903
2056
|
readonly kind: "write";
|
|
1904
|
-
readonly name: "runner.
|
|
1905
|
-
readonly output: z.ZodObject<{
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
2057
|
+
readonly name: "runner.stopRun";
|
|
2058
|
+
readonly output: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
2059
|
+
outcome: z.ZodLiteral<"success">;
|
|
2060
|
+
wasRunning: z.ZodBoolean;
|
|
2061
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2062
|
+
failureReason: z.ZodEnum<{
|
|
2063
|
+
"runner-unreachable": "runner-unreachable";
|
|
1910
2064
|
}>;
|
|
1911
|
-
|
|
2065
|
+
outcome: z.ZodLiteral<"failure">;
|
|
2066
|
+
}, z.core.$strip>], "outcome">;
|
|
1912
2067
|
};
|
|
1913
2068
|
takeScreenshot: {
|
|
1914
|
-
readonly description: "Take one screenshot of an interactive runner's screen. The image is the runner's whole virtual desktop, browser window and all. `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 `
|
|
2069
|
+
readonly description: "Take one screenshot of an interactive runner's screen. The image is the runner's whole virtual desktop, browser window and all. `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.";
|
|
1915
2070
|
readonly input: z.ZodObject<{
|
|
1916
2071
|
id: z.ZodString;
|
|
1917
2072
|
}, z.core.$strip>;
|
|
@@ -1919,17 +2074,30 @@ export declare const publicContractsV1: {
|
|
|
1919
2074
|
readonly name: "runner.takeScreenshot";
|
|
1920
2075
|
readonly output: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1921
2076
|
imageJpegBase64: z.ZodString;
|
|
1922
|
-
outcome: z.ZodLiteral<"
|
|
1923
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1924
|
-
outcome: z.ZodLiteral<"screen-needs-a-run">;
|
|
1925
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1926
|
-
outcome: z.ZodLiteral<"screen-not-ready">;
|
|
2077
|
+
outcome: z.ZodLiteral<"success">;
|
|
1927
2078
|
}, z.core.$strip>, z.ZodObject<{
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
2079
|
+
failureReason: z.ZodEnum<{
|
|
2080
|
+
"runner-unreachable": "runner-unreachable";
|
|
2081
|
+
"runner-has-no-screen": "runner-has-no-screen";
|
|
2082
|
+
"screen-needs-a-run": "screen-needs-a-run";
|
|
2083
|
+
"screen-not-ready": "screen-not-ready";
|
|
2084
|
+
}>;
|
|
2085
|
+
outcome: z.ZodLiteral<"failure">;
|
|
1931
2086
|
}, z.core.$strip>], "outcome">;
|
|
1932
2087
|
};
|
|
2088
|
+
terminate: {
|
|
2089
|
+
readonly description: "End an interactive runner on the caller's team, and the pod it runs on with it. Terminating a runner that is not running succeeds and reports `wasRunning: false`. This ends the runner: use `runner.stopRun` to stop what a runner is currently executing while leaving the runner up.";
|
|
2090
|
+
readonly input: z.ZodObject<{
|
|
2091
|
+
id: z.ZodString;
|
|
2092
|
+
}, z.core.$strip>;
|
|
2093
|
+
readonly kind: "write";
|
|
2094
|
+
readonly name: "runner.terminate";
|
|
2095
|
+
readonly output: z.ZodObject<{
|
|
2096
|
+
id: z.ZodString;
|
|
2097
|
+
outcome: z.ZodLiteral<"success">;
|
|
2098
|
+
wasRunning: z.ZodBoolean;
|
|
2099
|
+
}, z.core.$strip>;
|
|
2100
|
+
};
|
|
1933
2101
|
};
|
|
1934
2102
|
tag: {
|
|
1935
2103
|
create: {
|