@qawolf/api-contracts 0.63.0 → 0.64.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.
@@ -62,6 +62,7 @@ export declare const makeContractsV1: <EnvironmentId extends PublicIdSchema, Flo
62
62
  environmentId: z.ZodOptional<PublicIdSchema>;
63
63
  filePaths: z.ZodOptional<z.ZodArray<z.ZodString>>;
64
64
  message: z.ZodString;
65
+ parentSessionId: z.ZodOptional<ChatSessionId>;
65
66
  runnerId: z.ZodOptional<z.ZodString>;
66
67
  sessionId: z.ZodOptional<ChatSessionId>;
67
68
  workspaceId: z.ZodOptional<WorkspaceId>;
@@ -275,7 +276,7 @@ export declare const makeContractsV1: <EnvironmentId extends PublicIdSchema, Flo
275
276
  readonly openWorldHint: true;
276
277
  readonly readOnlyHint: false;
277
278
  };
278
- readonly description: "Report a deployment lifecycle status. A deployment's first success report evaluates global triggers asynchronously, and it is the only report that does: a trigger added or unpaused later does not make an already reported deployment evaluate again. Report that deployment under a new providerDeploymentId to evaluate it against the current triggers. The response contains the deployment only, not the resulting runs. This route requires an organization or user API key.";
279
+ readonly description: "Report a deployment lifecycle status. A deployment's first success report evaluates global triggers asynchronously, and it is the only report that does: a trigger added or unpaused later does not make an already reported deployment evaluate again. Report that deployment under a new providerDeploymentId to evaluate it against the current triggers. The response contains the deployment only, not the resulting runs.";
279
280
  readonly input: z.ZodObject<{
280
281
  deployTarget: z.ZodOptional<z.ZodURL>;
281
282
  environment: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
@@ -1710,8 +1711,284 @@ export declare const makeContractsV1: <EnvironmentId extends PublicIdSchema, Flo
1710
1711
  url: z.ZodURL;
1711
1712
  }, z.core.$strip>;
1712
1713
  };
1714
+ triage: {
1715
+ readonly annotations: {
1716
+ readonly destructiveHint: false;
1717
+ readonly openWorldHint: false;
1718
+ readonly readOnlyHint: true;
1719
+ };
1720
+ readonly description: string;
1721
+ readonly input: z.ZodObject<{
1722
+ flowId: FlowId;
1723
+ runId: RunId;
1724
+ }, z.core.$strip>;
1725
+ readonly kind: "read";
1726
+ readonly name: "run.triage";
1727
+ readonly output: z.ZodObject<{
1728
+ answers: z.ZodObject<{
1729
+ verdict: z.ZodObject<{
1730
+ choice: z.ZodEnum<{
1731
+ bug: "bug";
1732
+ maintenance: "maintenance";
1733
+ }>;
1734
+ confidence: z.ZodNumber;
1735
+ probabilities: z.ZodRecord<z.ZodString, z.ZodNumber>;
1736
+ type: z.ZodLiteral<"choice">;
1737
+ }, z.core.$strip>;
1738
+ }, z.core.$strip>;
1739
+ decision: z.ZodDiscriminatedUnion<[z.ZodObject<{
1740
+ diagnosis: z.ZodEnum<{
1741
+ bug: "bug";
1742
+ maintenance: "maintenance";
1743
+ }>;
1744
+ type: z.ZodLiteral<"diagnose">;
1745
+ }, z.core.$strip>, z.ZodObject<{
1746
+ diagnosis: z.ZodEnum<{
1747
+ bug: "bug";
1748
+ maintenance: "maintenance";
1749
+ }>;
1750
+ type: z.ZodLiteral<"suggest">;
1751
+ }, z.core.$strip>, z.ZodObject<{
1752
+ type: z.ZodLiteral<"needsHuman">;
1753
+ }, z.core.$strip>], "type">;
1754
+ model: z.ZodString;
1755
+ state: z.ZodJSONSchema;
1756
+ }, z.core.$strip>;
1757
+ };
1713
1758
  };
1714
1759
  runner: {
1760
+ runFlow: {
1761
+ readonly annotations: {
1762
+ readonly destructiveHint: true;
1763
+ readonly openWorldHint: true;
1764
+ readonly readOnlyHint: false;
1765
+ };
1766
+ 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.";
1767
+ readonly input: z.ZodObject<{
1768
+ entryPointPath: z.ZodString;
1769
+ env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1770
+ environmentId: z.ZodOptional<PublicIdSchema>;
1771
+ files: z.ZodRecord<z.ZodString, z.ZodString>;
1772
+ id: z.ZodString;
1773
+ selection: z.ZodOptional<z.ZodObject<{
1774
+ endLine: z.ZodInt;
1775
+ path: z.ZodString;
1776
+ startLine: z.ZodInt;
1777
+ }, z.core.$strip>>;
1778
+ unchangedFiles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1779
+ workspaceId: z.ZodOptional<WorkspaceId>;
1780
+ }, z.core.$strip>;
1781
+ readonly kind: "write";
1782
+ readonly name: "runner.runFlow";
1783
+ readonly output: z.ZodDiscriminatedUnion<[z.ZodObject<{
1784
+ bootstrappedRunner: z.ZodOptional<z.ZodBoolean>;
1785
+ outcome: z.ZodLiteral<"success">;
1786
+ runId: z.ZodString;
1787
+ }, z.core.$strip>, z.ZodDiscriminatedUnion<[z.ZodObject<{
1788
+ failureReason: z.ZodLiteral<"runner-target-mismatch">;
1789
+ outcome: z.ZodLiteral<"failure">;
1790
+ requiredRunnerName: z.ZodEnum<{
1791
+ basic: "basic";
1792
+ playwright: "playwright";
1793
+ android: "android";
1794
+ ios: "ios";
1795
+ }>;
1796
+ runnerName: z.ZodEnum<{
1797
+ basic: "basic";
1798
+ playwright: "playwright";
1799
+ android: "android";
1800
+ ios: "ios";
1801
+ }>;
1802
+ }, z.core.$strip>, z.ZodObject<{
1803
+ failureReason: z.ZodLiteral<"needs-full-sync">;
1804
+ missingPaths: z.ZodArray<z.ZodString>;
1805
+ outcome: z.ZodLiteral<"failure">;
1806
+ }, z.core.$strip>, z.ZodObject<{
1807
+ failureReason: z.ZodLiteral<"runner-unreachable">;
1808
+ outcome: z.ZodLiteral<"failure">;
1809
+ }, z.core.$strip>], "failureReason">], "outcome">;
1810
+ };
1811
+ stopRun: {
1812
+ readonly annotations: {
1813
+ readonly destructiveHint: true;
1814
+ readonly openWorldHint: false;
1815
+ readonly readOnlyHint: false;
1816
+ };
1817
+ 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.";
1818
+ readonly input: z.ZodObject<{
1819
+ id: z.ZodString;
1820
+ workspaceId: z.ZodOptional<WorkspaceId>;
1821
+ }, z.core.$strip>;
1822
+ readonly kind: "write";
1823
+ readonly name: "runner.stopRun";
1824
+ readonly output: z.ZodDiscriminatedUnion<[z.ZodObject<{
1825
+ outcome: z.ZodLiteral<"success">;
1826
+ wasRunning: z.ZodBoolean;
1827
+ }, z.core.$strip>, z.ZodObject<{
1828
+ failureReason: z.ZodEnum<{
1829
+ "runner-unreachable": "runner-unreachable";
1830
+ }>;
1831
+ outcome: z.ZodLiteral<"failure">;
1832
+ }, z.core.$strip>], "outcome">;
1833
+ };
1834
+ takeScreenshot: {
1835
+ readonly annotations: {
1836
+ readonly destructiveHint: false;
1837
+ readonly openWorldHint: false;
1838
+ readonly readOnlyHint: false;
1839
+ };
1840
+ 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 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.";
1841
+ readonly input: z.ZodObject<{
1842
+ id: z.ZodString;
1843
+ workspaceId: z.ZodOptional<WorkspaceId>;
1844
+ }, z.core.$strip>;
1845
+ readonly kind: "read";
1846
+ readonly name: "runner.takeScreenshot";
1847
+ readonly output: z.ZodDiscriminatedUnion<[z.ZodObject<{
1848
+ imageJpegBase64: z.ZodString;
1849
+ outcome: z.ZodLiteral<"success">;
1850
+ }, z.core.$strip>, z.ZodObject<{
1851
+ failureReason: z.ZodEnum<{
1852
+ "runner-unreachable": "runner-unreachable";
1853
+ "screen-needs-a-run": "screen-needs-a-run";
1854
+ "screen-not-ready": "screen-not-ready";
1855
+ "runner-has-no-screen": "runner-has-no-screen";
1856
+ }>;
1857
+ outcome: z.ZodLiteral<"failure">;
1858
+ }, z.core.$strip>], "outcome">;
1859
+ };
1860
+ terminate: {
1861
+ readonly annotations: {
1862
+ readonly destructiveHint: true;
1863
+ readonly openWorldHint: false;
1864
+ readonly readOnlyHint: false;
1865
+ };
1866
+ 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.";
1867
+ readonly input: z.ZodObject<{
1868
+ id: z.ZodString;
1869
+ workspaceId: z.ZodOptional<WorkspaceId>;
1870
+ }, z.core.$strip>;
1871
+ readonly kind: "write";
1872
+ readonly name: "runner.terminate";
1873
+ readonly output: z.ZodObject<{
1874
+ id: z.ZodString;
1875
+ outcome: z.ZodLiteral<"success">;
1876
+ wasRunning: z.ZodBoolean;
1877
+ }, z.core.$strip>;
1878
+ };
1879
+ record: {
1880
+ readonly annotations: {
1881
+ readonly destructiveHint: false;
1882
+ readonly openWorldHint: false;
1883
+ readonly readOnlyHint: false;
1884
+ };
1885
+ readonly description: "Control video recording on a Playwright runner. Start requires a caller-generated UUID; stop targets that UUID so retries cannot stop a later recording. Manual capture spans runs and suppresses automatic capture. Auto settings affect subsequent full runs. The URL opens recording history after the runner terminates. Videos may be unavailable after abrupt pod loss.";
1886
+ readonly input: z.ZodObject<{
1887
+ command: z.ZodDiscriminatedUnion<[z.ZodObject<{
1888
+ action: z.ZodLiteral<"start">;
1889
+ recordingId: z.ZodUUID;
1890
+ }, z.core.$strict>, z.ZodObject<{
1891
+ action: z.ZodLiteral<"stop">;
1892
+ recordingId: z.ZodUUID;
1893
+ }, z.core.$strict>, z.ZodObject<{
1894
+ action: z.ZodLiteral<"auto">;
1895
+ enabled: z.ZodBoolean;
1896
+ }, z.core.$strict>, z.ZodObject<{
1897
+ action: z.ZodLiteral<"status">;
1898
+ }, z.core.$strict>], "action">;
1899
+ id: z.ZodString;
1900
+ workspaceId: z.ZodOptional<WorkspaceId>;
1901
+ }, z.core.$strip>;
1902
+ readonly kind: "write";
1903
+ readonly name: "runner.record";
1904
+ readonly output: z.ZodObject<{
1905
+ result: z.ZodDiscriminatedUnion<[z.ZodObject<{
1906
+ outcome: z.ZodLiteral<"success">;
1907
+ recording: z.ZodOptional<z.ZodObject<{
1908
+ endedAt: z.ZodISODateTime;
1909
+ id: z.ZodUUID;
1910
+ mode: z.ZodEnum<{
1911
+ manual: "manual";
1912
+ automatic: "automatic";
1913
+ }>;
1914
+ runIds: z.ZodArray<z.ZodString>;
1915
+ runnerId: z.ZodString;
1916
+ runnerInstanceId: z.ZodUUID;
1917
+ startedAt: z.ZodISODateTime;
1918
+ status: z.ZodEnum<{
1919
+ failed: "failed";
1920
+ ready: "ready";
1921
+ }>;
1922
+ version: z.ZodLiteral<1>;
1923
+ }, z.core.$strip>>;
1924
+ state: z.ZodObject<{
1925
+ active: z.ZodOptional<z.ZodObject<{
1926
+ id: z.ZodUUID;
1927
+ mode: z.ZodEnum<{
1928
+ manual: "manual";
1929
+ automatic: "automatic";
1930
+ }>;
1931
+ startedAt: z.ZodISODateTime;
1932
+ }, z.core.$strip>>;
1933
+ auto: z.ZodEnum<{
1934
+ default: "default";
1935
+ on: "on";
1936
+ off: "off";
1937
+ }>;
1938
+ }, z.core.$strip>;
1939
+ }, z.core.$strip>, z.ZodObject<{
1940
+ failureReason: z.ZodEnum<{
1941
+ "runner-unreachable": "runner-unreachable";
1942
+ "screen-not-ready": "screen-not-ready";
1943
+ unsupported: "unsupported";
1944
+ "recording-in-progress": "recording-in-progress";
1945
+ "recording-not-found": "recording-not-found";
1946
+ "recording-id-used": "recording-id-used";
1947
+ "recording-failed": "recording-failed";
1948
+ }>;
1949
+ outcome: z.ZodLiteral<"failure">;
1950
+ }, z.core.$strip>], "outcome">;
1951
+ url: z.ZodURL;
1952
+ }, z.core.$strip>;
1953
+ };
1954
+ recordings: {
1955
+ readonly annotations: {
1956
+ readonly destructiveHint: false;
1957
+ readonly openWorldHint: false;
1958
+ readonly readOnlyHint: true;
1959
+ };
1960
+ readonly description: "Read a runner's finalized recordings from workspace storage, including after the runner terminates. Omit recordingId to list recordings in storage-key order; follow nextPageToken for more. An empty list for a specific recording means it is not published or does not exist. Video URLs expire; platform URLs remain stable.";
1961
+ readonly input: z.ZodObject<{
1962
+ id: z.ZodString;
1963
+ pageToken: z.ZodOptional<z.ZodString>;
1964
+ recordingId: z.ZodOptional<z.ZodUUID>;
1965
+ workspaceId: z.ZodOptional<WorkspaceId>;
1966
+ }, z.core.$strip>;
1967
+ readonly kind: "read";
1968
+ readonly name: "runner.recordings";
1969
+ readonly output: z.ZodObject<{
1970
+ nextPageToken: z.ZodOptional<z.ZodString>;
1971
+ recordings: z.ZodArray<z.ZodObject<{
1972
+ endedAt: z.ZodISODateTime;
1973
+ id: z.ZodUUID;
1974
+ mode: z.ZodEnum<{
1975
+ manual: "manual";
1976
+ automatic: "automatic";
1977
+ }>;
1978
+ runIds: z.ZodArray<z.ZodString>;
1979
+ runnerId: z.ZodString;
1980
+ runnerInstanceId: z.ZodUUID;
1981
+ startedAt: z.ZodISODateTime;
1982
+ status: z.ZodEnum<{
1983
+ failed: "failed";
1984
+ ready: "ready";
1985
+ }>;
1986
+ version: z.ZodLiteral<1>;
1987
+ url: z.ZodURL;
1988
+ videoUrl: z.ZodOptional<z.ZodURL>;
1989
+ }, z.core.$strip>>;
1990
+ }, z.core.$strip>;
1991
+ };
1715
1992
  evaluateSnippet: {
1716
1993
  readonly annotations: {
1717
1994
  readonly destructiveHint: true;
@@ -2393,125 +2670,6 @@ export declare const makeContractsV1: <EnvironmentId extends PublicIdSchema, Flo
2393
2670
  outcome: z.ZodLiteral<"failure">;
2394
2671
  }, z.core.$strip>], "outcome">;
2395
2672
  };
2396
- runFlow: {
2397
- readonly annotations: {
2398
- readonly destructiveHint: true;
2399
- readonly openWorldHint: true;
2400
- readonly readOnlyHint: false;
2401
- };
2402
- 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.";
2403
- readonly input: z.ZodObject<{
2404
- entryPointPath: z.ZodString;
2405
- env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
2406
- environmentId: z.ZodOptional<PublicIdSchema>;
2407
- files: z.ZodRecord<z.ZodString, z.ZodString>;
2408
- id: z.ZodString;
2409
- selection: z.ZodOptional<z.ZodObject<{
2410
- endLine: z.ZodInt;
2411
- path: z.ZodString;
2412
- startLine: z.ZodInt;
2413
- }, z.core.$strip>>;
2414
- unchangedFiles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
2415
- workspaceId: z.ZodOptional<WorkspaceId>;
2416
- }, z.core.$strip>;
2417
- readonly kind: "write";
2418
- readonly name: "runner.runFlow";
2419
- readonly output: z.ZodDiscriminatedUnion<[z.ZodObject<{
2420
- bootstrappedRunner: z.ZodOptional<z.ZodBoolean>;
2421
- outcome: z.ZodLiteral<"success">;
2422
- runId: z.ZodString;
2423
- }, z.core.$strip>, z.ZodDiscriminatedUnion<[z.ZodObject<{
2424
- failureReason: z.ZodLiteral<"runner-target-mismatch">;
2425
- outcome: z.ZodLiteral<"failure">;
2426
- requiredRunnerName: z.ZodEnum<{
2427
- basic: "basic";
2428
- playwright: "playwright";
2429
- android: "android";
2430
- ios: "ios";
2431
- }>;
2432
- runnerName: z.ZodEnum<{
2433
- basic: "basic";
2434
- playwright: "playwright";
2435
- android: "android";
2436
- ios: "ios";
2437
- }>;
2438
- }, z.core.$strip>, z.ZodObject<{
2439
- failureReason: z.ZodLiteral<"needs-full-sync">;
2440
- missingPaths: z.ZodArray<z.ZodString>;
2441
- outcome: z.ZodLiteral<"failure">;
2442
- }, z.core.$strip>, z.ZodObject<{
2443
- failureReason: z.ZodLiteral<"runner-unreachable">;
2444
- outcome: z.ZodLiteral<"failure">;
2445
- }, z.core.$strip>], "failureReason">], "outcome">;
2446
- };
2447
- stopRun: {
2448
- readonly annotations: {
2449
- readonly destructiveHint: true;
2450
- readonly openWorldHint: false;
2451
- readonly readOnlyHint: false;
2452
- };
2453
- 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.";
2454
- readonly input: z.ZodObject<{
2455
- id: z.ZodString;
2456
- workspaceId: z.ZodOptional<WorkspaceId>;
2457
- }, z.core.$strip>;
2458
- readonly kind: "write";
2459
- readonly name: "runner.stopRun";
2460
- readonly output: z.ZodDiscriminatedUnion<[z.ZodObject<{
2461
- outcome: z.ZodLiteral<"success">;
2462
- wasRunning: z.ZodBoolean;
2463
- }, z.core.$strip>, z.ZodObject<{
2464
- failureReason: z.ZodEnum<{
2465
- "runner-unreachable": "runner-unreachable";
2466
- }>;
2467
- outcome: z.ZodLiteral<"failure">;
2468
- }, z.core.$strip>], "outcome">;
2469
- };
2470
- takeScreenshot: {
2471
- readonly annotations: {
2472
- readonly destructiveHint: false;
2473
- readonly openWorldHint: false;
2474
- readonly readOnlyHint: false;
2475
- };
2476
- 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 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.";
2477
- readonly input: z.ZodObject<{
2478
- id: z.ZodString;
2479
- workspaceId: z.ZodOptional<WorkspaceId>;
2480
- }, z.core.$strip>;
2481
- readonly kind: "read";
2482
- readonly name: "runner.takeScreenshot";
2483
- readonly output: z.ZodDiscriminatedUnion<[z.ZodObject<{
2484
- imageJpegBase64: z.ZodString;
2485
- outcome: z.ZodLiteral<"success">;
2486
- }, z.core.$strip>, z.ZodObject<{
2487
- failureReason: z.ZodEnum<{
2488
- "runner-unreachable": "runner-unreachable";
2489
- "screen-needs-a-run": "screen-needs-a-run";
2490
- "screen-not-ready": "screen-not-ready";
2491
- "runner-has-no-screen": "runner-has-no-screen";
2492
- }>;
2493
- outcome: z.ZodLiteral<"failure">;
2494
- }, z.core.$strip>], "outcome">;
2495
- };
2496
- terminate: {
2497
- readonly annotations: {
2498
- readonly destructiveHint: true;
2499
- readonly openWorldHint: false;
2500
- readonly readOnlyHint: false;
2501
- };
2502
- 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.";
2503
- readonly input: z.ZodObject<{
2504
- id: z.ZodString;
2505
- workspaceId: z.ZodOptional<WorkspaceId>;
2506
- }, z.core.$strip>;
2507
- readonly kind: "write";
2508
- readonly name: "runner.terminate";
2509
- readonly output: z.ZodObject<{
2510
- id: z.ZodString;
2511
- outcome: z.ZodLiteral<"success">;
2512
- wasRunning: z.ZodBoolean;
2513
- }, z.core.$strip>;
2514
- };
2515
2673
  };
2516
2674
  skill: {
2517
2675
  get: {
@@ -3224,6 +3382,7 @@ export declare const publicContractsV1: {
3224
3382
  environmentId: z.ZodOptional<PublicIdSchema>;
3225
3383
  filePaths: z.ZodOptional<z.ZodArray<z.ZodString>>;
3226
3384
  message: z.ZodString;
3385
+ parentSessionId: z.ZodOptional<PublicIdSchema>;
3227
3386
  runnerId: z.ZodOptional<z.ZodString>;
3228
3387
  sessionId: z.ZodOptional<PublicIdSchema>;
3229
3388
  workspaceId: z.ZodOptional<PublicIdSchema>;
@@ -3437,7 +3596,7 @@ export declare const publicContractsV1: {
3437
3596
  readonly openWorldHint: true;
3438
3597
  readonly readOnlyHint: false;
3439
3598
  };
3440
- readonly description: "Report a deployment lifecycle status. A deployment's first success report evaluates global triggers asynchronously, and it is the only report that does: a trigger added or unpaused later does not make an already reported deployment evaluate again. Report that deployment under a new providerDeploymentId to evaluate it against the current triggers. The response contains the deployment only, not the resulting runs. This route requires an organization or user API key.";
3599
+ readonly description: "Report a deployment lifecycle status. A deployment's first success report evaluates global triggers asynchronously, and it is the only report that does: a trigger added or unpaused later does not make an already reported deployment evaluate again. Report that deployment under a new providerDeploymentId to evaluate it against the current triggers. The response contains the deployment only, not the resulting runs.";
3441
3600
  readonly input: z.ZodObject<{
3442
3601
  deployTarget: z.ZodOptional<z.ZodURL>;
3443
3602
  environment: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
@@ -4828,52 +4987,328 @@ export declare const publicContractsV1: {
4828
4987
  queued: "queued";
4829
4988
  passed: "passed";
4830
4989
  }>;
4831
- url: z.ZodURL;
4990
+ url: z.ZodURL;
4991
+ }, z.core.$strip>;
4992
+ };
4993
+ reattempt: {
4994
+ readonly annotations: {
4995
+ readonly destructiveHint: true;
4996
+ readonly openWorldHint: true;
4997
+ readonly readOnlyHint: false;
4998
+ };
4999
+ readonly description: string;
5000
+ readonly input: z.ZodObject<{
5001
+ flowIds: z.ZodOptional<z.ZodArray<PublicIdSchema>>;
5002
+ runId: PublicIdSchema;
5003
+ }, z.core.$strip>;
5004
+ readonly kind: "write";
5005
+ readonly name: "run.reattempt";
5006
+ readonly output: z.ZodObject<{
5007
+ reattemptedFlowIds: z.ZodArray<PublicIdSchema>;
5008
+ runId: PublicIdSchema;
5009
+ url: z.ZodURL;
5010
+ }, z.core.$strip>;
5011
+ };
5012
+ stop: {
5013
+ readonly annotations: {
5014
+ readonly destructiveHint: true;
5015
+ readonly openWorldHint: true;
5016
+ readonly readOnlyHint: false;
5017
+ };
5018
+ readonly description: "Stop a run, including its queued flows and automatic retries. Stopping is asynchronous and can update run-status messages and commit statuses in connected integrations. Repeated requests are safe, and finished runs keep their results. A run that is still being created returns not found; retry once run.get returns the run. If run.get returns a different runId, use that ID. Poll run.get for results.";
5019
+ readonly input: z.ZodObject<{
5020
+ runId: PublicIdSchema;
5021
+ }, z.core.$strip>;
5022
+ readonly kind: "write";
5023
+ readonly name: "run.stop";
5024
+ readonly output: z.ZodObject<{
5025
+ runId: PublicIdSchema;
5026
+ status: z.ZodEnum<{
5027
+ accepted: "accepted";
5028
+ "already-finished": "already-finished";
5029
+ "execution-not-found": "execution-not-found";
5030
+ }>;
5031
+ url: z.ZodURL;
5032
+ }, z.core.$strip>;
5033
+ };
5034
+ triage: {
5035
+ readonly annotations: {
5036
+ readonly destructiveHint: false;
5037
+ readonly openWorldHint: false;
5038
+ readonly readOnlyHint: true;
5039
+ };
5040
+ readonly description: string;
5041
+ readonly input: z.ZodObject<{
5042
+ flowId: PublicIdSchema;
5043
+ runId: PublicIdSchema;
5044
+ }, z.core.$strip>;
5045
+ readonly kind: "read";
5046
+ readonly name: "run.triage";
5047
+ readonly output: z.ZodObject<{
5048
+ answers: z.ZodObject<{
5049
+ verdict: z.ZodObject<{
5050
+ choice: z.ZodEnum<{
5051
+ bug: "bug";
5052
+ maintenance: "maintenance";
5053
+ }>;
5054
+ confidence: z.ZodNumber;
5055
+ probabilities: z.ZodRecord<z.ZodString, z.ZodNumber>;
5056
+ type: z.ZodLiteral<"choice">;
5057
+ }, z.core.$strip>;
5058
+ }, z.core.$strip>;
5059
+ decision: z.ZodDiscriminatedUnion<[z.ZodObject<{
5060
+ diagnosis: z.ZodEnum<{
5061
+ bug: "bug";
5062
+ maintenance: "maintenance";
5063
+ }>;
5064
+ type: z.ZodLiteral<"diagnose">;
5065
+ }, z.core.$strip>, z.ZodObject<{
5066
+ diagnosis: z.ZodEnum<{
5067
+ bug: "bug";
5068
+ maintenance: "maintenance";
5069
+ }>;
5070
+ type: z.ZodLiteral<"suggest">;
5071
+ }, z.core.$strip>, z.ZodObject<{
5072
+ type: z.ZodLiteral<"needsHuman">;
5073
+ }, z.core.$strip>], "type">;
5074
+ model: z.ZodString;
5075
+ state: z.ZodJSONSchema;
5076
+ }, z.core.$strip>;
5077
+ };
5078
+ };
5079
+ runner: {
5080
+ runFlow: {
5081
+ readonly annotations: {
5082
+ readonly destructiveHint: true;
5083
+ readonly openWorldHint: true;
5084
+ readonly readOnlyHint: false;
5085
+ };
5086
+ 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.";
5087
+ readonly input: z.ZodObject<{
5088
+ entryPointPath: z.ZodString;
5089
+ env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
5090
+ environmentId: z.ZodOptional<PublicIdSchema>;
5091
+ files: z.ZodRecord<z.ZodString, z.ZodString>;
5092
+ id: z.ZodString;
5093
+ selection: z.ZodOptional<z.ZodObject<{
5094
+ endLine: z.ZodInt;
5095
+ path: z.ZodString;
5096
+ startLine: z.ZodInt;
5097
+ }, z.core.$strip>>;
5098
+ unchangedFiles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
5099
+ workspaceId: z.ZodOptional<PublicIdSchema>;
5100
+ }, z.core.$strip>;
5101
+ readonly kind: "write";
5102
+ readonly name: "runner.runFlow";
5103
+ readonly output: z.ZodDiscriminatedUnion<[z.ZodObject<{
5104
+ bootstrappedRunner: z.ZodOptional<z.ZodBoolean>;
5105
+ outcome: z.ZodLiteral<"success">;
5106
+ runId: z.ZodString;
5107
+ }, z.core.$strip>, z.ZodDiscriminatedUnion<[z.ZodObject<{
5108
+ failureReason: z.ZodLiteral<"runner-target-mismatch">;
5109
+ outcome: z.ZodLiteral<"failure">;
5110
+ requiredRunnerName: z.ZodEnum<{
5111
+ basic: "basic";
5112
+ playwright: "playwright";
5113
+ android: "android";
5114
+ ios: "ios";
5115
+ }>;
5116
+ runnerName: z.ZodEnum<{
5117
+ basic: "basic";
5118
+ playwright: "playwright";
5119
+ android: "android";
5120
+ ios: "ios";
5121
+ }>;
5122
+ }, z.core.$strip>, z.ZodObject<{
5123
+ failureReason: z.ZodLiteral<"needs-full-sync">;
5124
+ missingPaths: z.ZodArray<z.ZodString>;
5125
+ outcome: z.ZodLiteral<"failure">;
5126
+ }, z.core.$strip>, z.ZodObject<{
5127
+ failureReason: z.ZodLiteral<"runner-unreachable">;
5128
+ outcome: z.ZodLiteral<"failure">;
5129
+ }, z.core.$strip>], "failureReason">], "outcome">;
5130
+ };
5131
+ stopRun: {
5132
+ readonly annotations: {
5133
+ readonly destructiveHint: true;
5134
+ readonly openWorldHint: false;
5135
+ readonly readOnlyHint: false;
5136
+ };
5137
+ 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.";
5138
+ readonly input: z.ZodObject<{
5139
+ id: z.ZodString;
5140
+ workspaceId: z.ZodOptional<PublicIdSchema>;
4832
5141
  }, z.core.$strip>;
5142
+ readonly kind: "write";
5143
+ readonly name: "runner.stopRun";
5144
+ readonly output: z.ZodDiscriminatedUnion<[z.ZodObject<{
5145
+ outcome: z.ZodLiteral<"success">;
5146
+ wasRunning: z.ZodBoolean;
5147
+ }, z.core.$strip>, z.ZodObject<{
5148
+ failureReason: z.ZodEnum<{
5149
+ "runner-unreachable": "runner-unreachable";
5150
+ }>;
5151
+ outcome: z.ZodLiteral<"failure">;
5152
+ }, z.core.$strip>], "outcome">;
4833
5153
  };
4834
- reattempt: {
5154
+ takeScreenshot: {
5155
+ readonly annotations: {
5156
+ readonly destructiveHint: false;
5157
+ readonly openWorldHint: false;
5158
+ readonly readOnlyHint: false;
5159
+ };
5160
+ 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 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.";
5161
+ readonly input: z.ZodObject<{
5162
+ id: z.ZodString;
5163
+ workspaceId: z.ZodOptional<PublicIdSchema>;
5164
+ }, z.core.$strip>;
5165
+ readonly kind: "read";
5166
+ readonly name: "runner.takeScreenshot";
5167
+ readonly output: z.ZodDiscriminatedUnion<[z.ZodObject<{
5168
+ imageJpegBase64: z.ZodString;
5169
+ outcome: z.ZodLiteral<"success">;
5170
+ }, z.core.$strip>, z.ZodObject<{
5171
+ failureReason: z.ZodEnum<{
5172
+ "runner-unreachable": "runner-unreachable";
5173
+ "screen-needs-a-run": "screen-needs-a-run";
5174
+ "screen-not-ready": "screen-not-ready";
5175
+ "runner-has-no-screen": "runner-has-no-screen";
5176
+ }>;
5177
+ outcome: z.ZodLiteral<"failure">;
5178
+ }, z.core.$strip>], "outcome">;
5179
+ };
5180
+ terminate: {
4835
5181
  readonly annotations: {
4836
5182
  readonly destructiveHint: true;
4837
- readonly openWorldHint: true;
5183
+ readonly openWorldHint: false;
4838
5184
  readonly readOnlyHint: false;
4839
5185
  };
4840
- readonly description: string;
5186
+ 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.";
4841
5187
  readonly input: z.ZodObject<{
4842
- flowIds: z.ZodOptional<z.ZodArray<PublicIdSchema>>;
4843
- runId: PublicIdSchema;
5188
+ id: z.ZodString;
5189
+ workspaceId: z.ZodOptional<PublicIdSchema>;
4844
5190
  }, z.core.$strip>;
4845
5191
  readonly kind: "write";
4846
- readonly name: "run.reattempt";
5192
+ readonly name: "runner.terminate";
4847
5193
  readonly output: z.ZodObject<{
4848
- reattemptedFlowIds: z.ZodArray<PublicIdSchema>;
4849
- runId: PublicIdSchema;
4850
- url: z.ZodURL;
5194
+ id: z.ZodString;
5195
+ outcome: z.ZodLiteral<"success">;
5196
+ wasRunning: z.ZodBoolean;
4851
5197
  }, z.core.$strip>;
4852
5198
  };
4853
- stop: {
5199
+ record: {
4854
5200
  readonly annotations: {
4855
- readonly destructiveHint: true;
4856
- readonly openWorldHint: true;
5201
+ readonly destructiveHint: false;
5202
+ readonly openWorldHint: false;
4857
5203
  readonly readOnlyHint: false;
4858
5204
  };
4859
- readonly description: "Stop a run, including its queued flows and automatic retries. Stopping is asynchronous and can update run-status messages and commit statuses in connected integrations. Repeated requests are safe, and finished runs keep their results. A run that is still being created returns not found; retry once run.get returns the run. If run.get returns a different runId, use that ID. Poll run.get for results.";
5205
+ readonly description: "Control video recording on a Playwright runner. Start requires a caller-generated UUID; stop targets that UUID so retries cannot stop a later recording. Manual capture spans runs and suppresses automatic capture. Auto settings affect subsequent full runs. The URL opens recording history after the runner terminates. Videos may be unavailable after abrupt pod loss.";
4860
5206
  readonly input: z.ZodObject<{
4861
- runId: PublicIdSchema;
5207
+ command: z.ZodDiscriminatedUnion<[z.ZodObject<{
5208
+ action: z.ZodLiteral<"start">;
5209
+ recordingId: z.ZodUUID;
5210
+ }, z.core.$strict>, z.ZodObject<{
5211
+ action: z.ZodLiteral<"stop">;
5212
+ recordingId: z.ZodUUID;
5213
+ }, z.core.$strict>, z.ZodObject<{
5214
+ action: z.ZodLiteral<"auto">;
5215
+ enabled: z.ZodBoolean;
5216
+ }, z.core.$strict>, z.ZodObject<{
5217
+ action: z.ZodLiteral<"status">;
5218
+ }, z.core.$strict>], "action">;
5219
+ id: z.ZodString;
5220
+ workspaceId: z.ZodOptional<PublicIdSchema>;
4862
5221
  }, z.core.$strip>;
4863
5222
  readonly kind: "write";
4864
- readonly name: "run.stop";
5223
+ readonly name: "runner.record";
4865
5224
  readonly output: z.ZodObject<{
4866
- runId: PublicIdSchema;
4867
- status: z.ZodEnum<{
4868
- accepted: "accepted";
4869
- "already-finished": "already-finished";
4870
- "execution-not-found": "execution-not-found";
4871
- }>;
5225
+ result: z.ZodDiscriminatedUnion<[z.ZodObject<{
5226
+ outcome: z.ZodLiteral<"success">;
5227
+ recording: z.ZodOptional<z.ZodObject<{
5228
+ endedAt: z.ZodISODateTime;
5229
+ id: z.ZodUUID;
5230
+ mode: z.ZodEnum<{
5231
+ manual: "manual";
5232
+ automatic: "automatic";
5233
+ }>;
5234
+ runIds: z.ZodArray<z.ZodString>;
5235
+ runnerId: z.ZodString;
5236
+ runnerInstanceId: z.ZodUUID;
5237
+ startedAt: z.ZodISODateTime;
5238
+ status: z.ZodEnum<{
5239
+ failed: "failed";
5240
+ ready: "ready";
5241
+ }>;
5242
+ version: z.ZodLiteral<1>;
5243
+ }, z.core.$strip>>;
5244
+ state: z.ZodObject<{
5245
+ active: z.ZodOptional<z.ZodObject<{
5246
+ id: z.ZodUUID;
5247
+ mode: z.ZodEnum<{
5248
+ manual: "manual";
5249
+ automatic: "automatic";
5250
+ }>;
5251
+ startedAt: z.ZodISODateTime;
5252
+ }, z.core.$strip>>;
5253
+ auto: z.ZodEnum<{
5254
+ default: "default";
5255
+ on: "on";
5256
+ off: "off";
5257
+ }>;
5258
+ }, z.core.$strip>;
5259
+ }, z.core.$strip>, z.ZodObject<{
5260
+ failureReason: z.ZodEnum<{
5261
+ "runner-unreachable": "runner-unreachable";
5262
+ "screen-not-ready": "screen-not-ready";
5263
+ unsupported: "unsupported";
5264
+ "recording-in-progress": "recording-in-progress";
5265
+ "recording-not-found": "recording-not-found";
5266
+ "recording-id-used": "recording-id-used";
5267
+ "recording-failed": "recording-failed";
5268
+ }>;
5269
+ outcome: z.ZodLiteral<"failure">;
5270
+ }, z.core.$strip>], "outcome">;
4872
5271
  url: z.ZodURL;
4873
5272
  }, z.core.$strip>;
4874
5273
  };
4875
- };
4876
- runner: {
5274
+ recordings: {
5275
+ readonly annotations: {
5276
+ readonly destructiveHint: false;
5277
+ readonly openWorldHint: false;
5278
+ readonly readOnlyHint: true;
5279
+ };
5280
+ readonly description: "Read a runner's finalized recordings from workspace storage, including after the runner terminates. Omit recordingId to list recordings in storage-key order; follow nextPageToken for more. An empty list for a specific recording means it is not published or does not exist. Video URLs expire; platform URLs remain stable.";
5281
+ readonly input: z.ZodObject<{
5282
+ id: z.ZodString;
5283
+ pageToken: z.ZodOptional<z.ZodString>;
5284
+ recordingId: z.ZodOptional<z.ZodUUID>;
5285
+ workspaceId: z.ZodOptional<PublicIdSchema>;
5286
+ }, z.core.$strip>;
5287
+ readonly kind: "read";
5288
+ readonly name: "runner.recordings";
5289
+ readonly output: z.ZodObject<{
5290
+ nextPageToken: z.ZodOptional<z.ZodString>;
5291
+ recordings: z.ZodArray<z.ZodObject<{
5292
+ endedAt: z.ZodISODateTime;
5293
+ id: z.ZodUUID;
5294
+ mode: z.ZodEnum<{
5295
+ manual: "manual";
5296
+ automatic: "automatic";
5297
+ }>;
5298
+ runIds: z.ZodArray<z.ZodString>;
5299
+ runnerId: z.ZodString;
5300
+ runnerInstanceId: z.ZodUUID;
5301
+ startedAt: z.ZodISODateTime;
5302
+ status: z.ZodEnum<{
5303
+ failed: "failed";
5304
+ ready: "ready";
5305
+ }>;
5306
+ version: z.ZodLiteral<1>;
5307
+ url: z.ZodURL;
5308
+ videoUrl: z.ZodOptional<z.ZodURL>;
5309
+ }, z.core.$strip>>;
5310
+ }, z.core.$strip>;
5311
+ };
4877
5312
  evaluateSnippet: {
4878
5313
  readonly annotations: {
4879
5314
  readonly destructiveHint: true;
@@ -5555,125 +5990,6 @@ export declare const publicContractsV1: {
5555
5990
  outcome: z.ZodLiteral<"failure">;
5556
5991
  }, z.core.$strip>], "outcome">;
5557
5992
  };
5558
- runFlow: {
5559
- readonly annotations: {
5560
- readonly destructiveHint: true;
5561
- readonly openWorldHint: true;
5562
- readonly readOnlyHint: false;
5563
- };
5564
- 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.";
5565
- readonly input: z.ZodObject<{
5566
- entryPointPath: z.ZodString;
5567
- env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
5568
- environmentId: z.ZodOptional<PublicIdSchema>;
5569
- files: z.ZodRecord<z.ZodString, z.ZodString>;
5570
- id: z.ZodString;
5571
- selection: z.ZodOptional<z.ZodObject<{
5572
- endLine: z.ZodInt;
5573
- path: z.ZodString;
5574
- startLine: z.ZodInt;
5575
- }, z.core.$strip>>;
5576
- unchangedFiles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
5577
- workspaceId: z.ZodOptional<PublicIdSchema>;
5578
- }, z.core.$strip>;
5579
- readonly kind: "write";
5580
- readonly name: "runner.runFlow";
5581
- readonly output: z.ZodDiscriminatedUnion<[z.ZodObject<{
5582
- bootstrappedRunner: z.ZodOptional<z.ZodBoolean>;
5583
- outcome: z.ZodLiteral<"success">;
5584
- runId: z.ZodString;
5585
- }, z.core.$strip>, z.ZodDiscriminatedUnion<[z.ZodObject<{
5586
- failureReason: z.ZodLiteral<"runner-target-mismatch">;
5587
- outcome: z.ZodLiteral<"failure">;
5588
- requiredRunnerName: z.ZodEnum<{
5589
- basic: "basic";
5590
- playwright: "playwright";
5591
- android: "android";
5592
- ios: "ios";
5593
- }>;
5594
- runnerName: z.ZodEnum<{
5595
- basic: "basic";
5596
- playwright: "playwright";
5597
- android: "android";
5598
- ios: "ios";
5599
- }>;
5600
- }, z.core.$strip>, z.ZodObject<{
5601
- failureReason: z.ZodLiteral<"needs-full-sync">;
5602
- missingPaths: z.ZodArray<z.ZodString>;
5603
- outcome: z.ZodLiteral<"failure">;
5604
- }, z.core.$strip>, z.ZodObject<{
5605
- failureReason: z.ZodLiteral<"runner-unreachable">;
5606
- outcome: z.ZodLiteral<"failure">;
5607
- }, z.core.$strip>], "failureReason">], "outcome">;
5608
- };
5609
- stopRun: {
5610
- readonly annotations: {
5611
- readonly destructiveHint: true;
5612
- readonly openWorldHint: false;
5613
- readonly readOnlyHint: false;
5614
- };
5615
- 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.";
5616
- readonly input: z.ZodObject<{
5617
- id: z.ZodString;
5618
- workspaceId: z.ZodOptional<PublicIdSchema>;
5619
- }, z.core.$strip>;
5620
- readonly kind: "write";
5621
- readonly name: "runner.stopRun";
5622
- readonly output: z.ZodDiscriminatedUnion<[z.ZodObject<{
5623
- outcome: z.ZodLiteral<"success">;
5624
- wasRunning: z.ZodBoolean;
5625
- }, z.core.$strip>, z.ZodObject<{
5626
- failureReason: z.ZodEnum<{
5627
- "runner-unreachable": "runner-unreachable";
5628
- }>;
5629
- outcome: z.ZodLiteral<"failure">;
5630
- }, z.core.$strip>], "outcome">;
5631
- };
5632
- takeScreenshot: {
5633
- readonly annotations: {
5634
- readonly destructiveHint: false;
5635
- readonly openWorldHint: false;
5636
- readonly readOnlyHint: false;
5637
- };
5638
- 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 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.";
5639
- readonly input: z.ZodObject<{
5640
- id: z.ZodString;
5641
- workspaceId: z.ZodOptional<PublicIdSchema>;
5642
- }, z.core.$strip>;
5643
- readonly kind: "read";
5644
- readonly name: "runner.takeScreenshot";
5645
- readonly output: z.ZodDiscriminatedUnion<[z.ZodObject<{
5646
- imageJpegBase64: z.ZodString;
5647
- outcome: z.ZodLiteral<"success">;
5648
- }, z.core.$strip>, z.ZodObject<{
5649
- failureReason: z.ZodEnum<{
5650
- "runner-unreachable": "runner-unreachable";
5651
- "screen-needs-a-run": "screen-needs-a-run";
5652
- "screen-not-ready": "screen-not-ready";
5653
- "runner-has-no-screen": "runner-has-no-screen";
5654
- }>;
5655
- outcome: z.ZodLiteral<"failure">;
5656
- }, z.core.$strip>], "outcome">;
5657
- };
5658
- terminate: {
5659
- readonly annotations: {
5660
- readonly destructiveHint: true;
5661
- readonly openWorldHint: false;
5662
- readonly readOnlyHint: false;
5663
- };
5664
- 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.";
5665
- readonly input: z.ZodObject<{
5666
- id: z.ZodString;
5667
- workspaceId: z.ZodOptional<PublicIdSchema>;
5668
- }, z.core.$strip>;
5669
- readonly kind: "write";
5670
- readonly name: "runner.terminate";
5671
- readonly output: z.ZodObject<{
5672
- id: z.ZodString;
5673
- outcome: z.ZodLiteral<"success">;
5674
- wasRunning: z.ZodBoolean;
5675
- }, z.core.$strip>;
5676
- };
5677
5993
  };
5678
5994
  skill: {
5679
5995
  get: {