@qawolf/api-contracts 0.47.0 → 0.48.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.
Files changed (65) hide show
  1. package/dist/v1/index.d.ts +36 -4
  2. package/dist/v1/index.d.ts.map +1 -1
  3. package/dist/v1/index.js +14 -14
  4. package/dist/v1/index.js.map +1 -1
  5. package/dist/v1/runner/evaluateSnippet.d.ts +5 -1
  6. package/dist/v1/runner/evaluateSnippet.d.ts.map +1 -1
  7. package/dist/v1/runner/evaluateSnippet.js +5 -2
  8. package/dist/v1/runner/evaluateSnippet.js.map +1 -1
  9. package/dist/v1/runner/get.d.ts +5 -1
  10. package/dist/v1/runner/get.d.ts.map +1 -1
  11. package/dist/v1/runner/get.js +5 -2
  12. package/dist/v1/runner/get.js.map +1 -1
  13. package/dist/v1/runner/highlightSelector.d.ts +5 -1
  14. package/dist/v1/runner/highlightSelector.d.ts.map +1 -1
  15. package/dist/v1/runner/highlightSelector.js +5 -2
  16. package/dist/v1/runner/highlightSelector.js.map +1 -1
  17. package/dist/v1/runner/identity.d.ts +2 -0
  18. package/dist/v1/runner/identity.d.ts.map +1 -1
  19. package/dist/v1/runner/identity.js +2 -0
  20. package/dist/v1/runner/identity.js.map +1 -1
  21. package/dist/v1/runner/importPackage.d.ts +5 -1
  22. package/dist/v1/runner/importPackage.d.ts.map +1 -1
  23. package/dist/v1/runner/importPackage.js +5 -2
  24. package/dist/v1/runner/importPackage.js.map +1 -1
  25. package/dist/v1/runner/index.d.ts +9 -2
  26. package/dist/v1/runner/index.d.ts.map +1 -1
  27. package/dist/v1/runner/index.js +9 -3
  28. package/dist/v1/runner/index.js.map +1 -1
  29. package/dist/v1/runner/inspect.d.ts +5 -1
  30. package/dist/v1/runner/inspect.d.ts.map +1 -1
  31. package/dist/v1/runner/inspect.js +5 -2
  32. package/dist/v1/runner/inspect.js.map +1 -1
  33. package/dist/v1/runner/inspectMobile.d.ts +5 -1
  34. package/dist/v1/runner/inspectMobile.d.ts.map +1 -1
  35. package/dist/v1/runner/inspectMobile.js +5 -2
  36. package/dist/v1/runner/inspectMobile.js.map +1 -1
  37. package/dist/v1/runner/list.d.ts +8 -3
  38. package/dist/v1/runner/list.d.ts.map +1 -1
  39. package/dist/v1/runner/list.js +8 -4
  40. package/dist/v1/runner/list.js.map +1 -1
  41. package/dist/v1/runner/performAction.d.ts +5 -1
  42. package/dist/v1/runner/performAction.d.ts.map +1 -1
  43. package/dist/v1/runner/performAction.js +5 -2
  44. package/dist/v1/runner/performAction.js.map +1 -1
  45. package/dist/v1/runner/promoteSnapshot.d.ts +5 -1
  46. package/dist/v1/runner/promoteSnapshot.d.ts.map +1 -1
  47. package/dist/v1/runner/promoteSnapshot.js +5 -2
  48. package/dist/v1/runner/promoteSnapshot.js.map +1 -1
  49. package/dist/v1/runner/readJournal.d.ts +5 -1
  50. package/dist/v1/runner/readJournal.d.ts.map +1 -1
  51. package/dist/v1/runner/readJournal.js +5 -2
  52. package/dist/v1/runner/readJournal.js.map +1 -1
  53. package/dist/v1/runner/runFlow.d.ts +3 -1
  54. package/dist/v1/runner/runFlow.d.ts.map +1 -1
  55. package/dist/v1/runner/runFlow.js +4 -1
  56. package/dist/v1/runner/runFlow.js.map +1 -1
  57. package/dist/v1/runner/stopRun.d.ts +5 -1
  58. package/dist/v1/runner/stopRun.d.ts.map +1 -1
  59. package/dist/v1/runner/stopRun.js +5 -2
  60. package/dist/v1/runner/stopRun.js.map +1 -1
  61. package/dist/v1/runner/takeScreenshot.d.ts +5 -1
  62. package/dist/v1/runner/takeScreenshot.d.ts.map +1 -1
  63. package/dist/v1/runner/takeScreenshot.js +5 -2
  64. package/dist/v1/runner/takeScreenshot.js.map +1 -1
  65. package/package.json +1 -1
@@ -1,5 +1,8 @@
1
1
  import { z } from "zod";
2
- export declare const makeLaunchRunnerContract: () => {
2
+ import type { PublicIdSchema } from "../ids.js";
3
+ export declare const makeLaunchRunnerContract: <WorkspaceId extends PublicIdSchema>(ids: {
4
+ workspace: WorkspaceId;
5
+ }) => {
3
6
  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.";
4
7
  readonly input: z.ZodObject<{
5
8
  id: z.ZodString;
@@ -9,6 +12,7 @@ export declare const makeLaunchRunnerContract: () => {
9
12
  android: "android";
10
13
  ios: "ios";
11
14
  }>>;
15
+ workspaceId: z.ZodOptional<WorkspaceId>;
12
16
  }, z.core.$strip>;
13
17
  readonly kind: "write";
14
18
  readonly name: "runner.launch";
@@ -25,10 +29,13 @@ export declare const makeLaunchRunnerContract: () => {
25
29
  outcome: z.ZodLiteral<"success">;
26
30
  }, z.core.$strip>;
27
31
  };
28
- export declare const makeTerminateRunnerContract: () => {
32
+ export declare const makeTerminateRunnerContract: <WorkspaceId extends PublicIdSchema>(ids: {
33
+ workspace: WorkspaceId;
34
+ }) => {
29
35
  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.";
30
36
  readonly input: z.ZodObject<{
31
37
  id: z.ZodString;
38
+ workspaceId: z.ZodOptional<WorkspaceId>;
32
39
  }, z.core.$strip>;
33
40
  readonly kind: "write";
34
41
  readonly name: "runner.terminate";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/v1/runner/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAUxB,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;CAiCpC,CAAC;AAEF,eAAO,MAAM,2BAA2B;;;;;;;;;;;;CA2BvC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/v1/runner/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAUhD,eAAO,MAAM,wBAAwB,GACnC,WAAW,SAAS,cAAc,EAClC,KAAK;IACL,SAAS,EAAE,WAAW,CAAC;CACxB;;;;;;;;;;;;;;;;;;;;;;;;;;CAsCA,CAAC;AAEF,eAAO,MAAM,2BAA2B,GACtC,WAAW,SAAS,cAAc,EAClC,KAAK;IACL,SAAS,EAAE,WAAW,CAAC;CACxB;;;;;;;;;;;;;CA8BA,CAAC"}
@@ -1,11 +1,14 @@
1
1
  import { z } from "zod";
2
- import { makeRunnerSchema, runnerIdSchema, runnerNameSchema, } from "./identity.js";
3
- export const makeLaunchRunnerContract = () => {
2
+ import { makeRunnerSchema, runnerIdSchema, runnerNameSchema, runnerWorkspaceIdDescription, runnerWorkspaceRequirement, } from "./identity.js";
3
+ export const makeLaunchRunnerContract = (ids) => {
4
4
  const input = z.object({
5
5
  id: runnerIdSchema.describe("Id to launch the runner under, chosen by the caller. Launching the same id again returns the runner already running under it."),
6
6
  runnerName: runnerNameSchema
7
7
  .optional()
8
8
  .describe("The runner family to launch. Defaults to the standard web family, playwright."),
9
+ workspaceId: ids.workspace
10
+ .optional()
11
+ .describe(`The workspace to launch the runner in. ${runnerWorkspaceRequirement}`),
9
12
  });
10
13
  const output = makeRunnerSchema().extend({
11
14
  alreadyRunning: z
@@ -21,9 +24,12 @@ export const makeLaunchRunnerContract = () => {
21
24
  output,
22
25
  };
23
26
  };
24
- export const makeTerminateRunnerContract = () => {
27
+ export const makeTerminateRunnerContract = (ids) => {
25
28
  const input = z.object({
26
29
  id: runnerIdSchema.describe("Id of the runner to terminate."),
30
+ workspaceId: ids.workspace
31
+ .optional()
32
+ .describe(runnerWorkspaceIdDescription),
27
33
  });
28
34
  const output = z.object({
29
35
  id: runnerIdSchema.describe("Id of the runner the call addressed."),
@@ -1 +1 @@
1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AG,CAAC,SAAS;aACvB,QAAQ,EAAE;aACV,QAAQ,CAAC,4BAA4B,CAAC;KAC1C,CAAC,CAAC;IACH,MAAM,MAAM,GAAG,CAAC,CAAC,MAAM,CAAC;QACtB,EAAE,EAAE,cAAc,CAAC,QAAQ,CAAC,sCAAsC,CAAC;QACnE,OAAO,EAAE,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC;QAC7B,UAAU,EAAE,CAAC;aACV,OAAO,EAAE;aACT,QAAQ,CACP,2RAA2R,CAC5R;KACJ,CAAC,CAAC;IAEH,OAAO;QACL,WAAW,EACT,yRAAyR;QAC3R,KAAK;QACL,IAAI,EAAE,OAAO;QACb,IAAI,EAAE,kBAAkB;QACxB,MAAM;KAMP,CAAC;AACJ,CAAC,CAAC"}
@@ -1,4 +1,5 @@
1
1
  import { z } from "zod";
2
+ import type { PublicIdSchema } from "../ids.js";
2
3
  export declare const inspectRequestSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
3
4
  selector: z.ZodString;
4
5
  what: z.ZodLiteral<"element-html">;
@@ -10,7 +11,9 @@ export declare const inspectRequestSchema: z.ZodDiscriminatedUnion<[z.ZodObject<
10
11
  what: z.ZodLiteral<"variable">;
11
12
  }, z.core.$strip>], "what">;
12
13
  export type InspectOnRunnerRequest = z.infer<typeof inspectRequestSchema>;
13
- export declare const makeInspectOnRunnerContract: () => {
14
+ export declare const makeInspectOnRunnerContract: <WorkspaceId extends PublicIdSchema>(ids: {
15
+ workspace: WorkspaceId;
16
+ }) => {
14
17
  readonly description: string;
15
18
  readonly input: z.ZodObject<{
16
19
  id: z.ZodString;
@@ -24,6 +27,7 @@ export declare const makeInspectOnRunnerContract: () => {
24
27
  variableName: z.ZodString;
25
28
  what: z.ZodLiteral<"variable">;
26
29
  }, z.core.$strip>], "what">;
30
+ workspaceId: z.ZodOptional<WorkspaceId>;
27
31
  }, z.core.$strip>;
28
32
  readonly kind: "read";
29
33
  readonly name: "runner.inspect";
@@ -1 +1 @@
1
- {"version":3,"file":"inspect.d.ts","sourceRoot":"","sources":["../../../src/v1/runner/inspect.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAUxB,eAAO,MAAM,oBAAoB;;;;;;;;;2BA0B/B,CAAC;AAEH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAE1E,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuCvC,CAAC"}
1
+ {"version":3,"file":"inspect.d.ts","sourceRoot":"","sources":["../../../src/v1/runner/inspect.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAQhD,eAAO,MAAM,oBAAoB;;;;;;;;;2BA0B/B,CAAC;AAEH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAE1E,eAAO,MAAM,2BAA2B,GACtC,WAAW,SAAS,cAAc,EAClC,KAAK;IACL,SAAS,EAAE,WAAW,CAAC;CACxB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0CA,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { z } from "zod";
2
- import { runnerIdSchema } from "./identity.js";
2
+ import { runnerIdSchema, runnerWorkspaceIdDescription } from "./identity.js";
3
3
  import { retryableRunnerUnreachableDescription } from "./unreachable.js";
4
4
  const maxSelectorLength = 2_000;
5
5
  const maxVariableNameLength = 256;
@@ -30,10 +30,13 @@ export const inspectRequestSchema = z.discriminatedUnion("what", [
30
30
  what: z.literal("variable"),
31
31
  }),
32
32
  ]);
33
- export const makeInspectOnRunnerContract = () => {
33
+ export const makeInspectOnRunnerContract = (ids) => {
34
34
  const input = z.object({
35
35
  id: runnerIdSchema.describe("Id of the runner to inspect."),
36
36
  request: inspectRequestSchema,
37
+ workspaceId: ids.workspace
38
+ .optional()
39
+ .describe(runnerWorkspaceIdDescription),
37
40
  });
38
41
  const output = z.discriminatedUnion("outcome", [
39
42
  z.object({
@@ -1 +1 @@
1
- {"version":3,"file":"inspect.js","sourceRoot":"","sources":["../../../src/v1/runner/inspect.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,qCAAqC,EAAE,MAAM,kBAAkB,CAAC;AAEzE,MAAM,iBAAiB,GAAG,KAAK,CAAC;AAChC,MAAM,qBAAqB,GAAG,GAAG,CAAC;AAElC,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,kBAAkB,CAAC,MAAM,EAAE;IAC/D,CAAC,CAAC,MAAM,CAAC;QACP,QAAQ,EAAE,CAAC;aACR,MAAM,EAAE;aACR,GAAG,CAAC,CAAC,CAAC;aACN,GAAG,CAAC,iBAAiB,CAAC;aACtB,QAAQ,CAAC,iDAAiD,CAAC;QAC9D,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,cAAc,CAAC;KAChC,CAAC;IACF,CAAC,CAAC,MAAM,CAAC;QACP,QAAQ,EAAE,CAAC;aACR,MAAM,EAAE;aACR,GAAG,CAAC,CAAC,CAAC;aACN,GAAG,CAAC,iBAAiB,CAAC;aACtB,QAAQ,EAAE;aACV,QAAQ,CAAC,4DAA4D,CAAC;QACzE,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,WAAW,CAAC;KAC7B,CAAC;IACF,CAAC,CAAC,MAAM,CAAC;QACP,YAAY,EAAE,CAAC;aACZ,MAAM,EAAE;aACR,GAAG,CAAC,CAAC,CAAC;aACN,GAAG,CAAC,qBAAqB,CAAC;aAC1B,QAAQ,CAAC,uDAAuD,CAAC;QACpE,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC;KAC5B,CAAC;CACH,CAAC,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CAAC,OAAO,CAAC,SAAS,CAAC;YAC7B,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,4CAA4C,CAAC;SACzE,CAAC;QACF,CAAC,CAAC,MAAM,CAAC;YACP,YAAY,EAAE,CAAC;iBACZ,MAAM,EAAE;iBACR,QAAQ,EAAE;iBACV,QAAQ,CAAC,8CAA8C,CAAC;YAC3D,aAAa,EAAE,CAAC,CAAC,IAAI,CAAC;gBACpB,oBAAoB;gBACpB,yBAAyB;gBACzB,oBAAoB;aACrB,CAAC;YACF,OAAO,EAAE,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC;SAC9B,CAAC;KACH,CAAC,CAAC;IAEH,OAAO;QACL,WAAW,EACT,kgBAAkgB;YAClgB,qCAAqC;QACvC,KAAK;QACL,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,gBAAgB;QACtB,MAAM;KAMP,CAAC;AACJ,CAAC,CAAC"}
@@ -1,4 +1,5 @@
1
1
  import { z } from "zod";
2
+ import type { PublicIdSchema } from "../ids.js";
2
3
  export declare const inspectMobileRequestSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
3
4
  what: z.ZodLiteral<"session">;
4
5
  }, z.core.$strip>, z.ZodObject<{
@@ -20,7 +21,9 @@ export declare const inspectMobileRequestSchema: z.ZodDiscriminatedUnion<[z.ZodO
20
21
  what: z.ZodLiteral<"elements">;
21
22
  }, z.core.$strip>], "by">], "what">;
22
23
  export type InspectMobileRequest = z.infer<typeof inspectMobileRequestSchema>;
23
- export declare const makeInspectMobileOnRunnerContract: () => {
24
+ export declare const makeInspectMobileOnRunnerContract: <WorkspaceId extends PublicIdSchema>(ids: {
25
+ workspace: WorkspaceId;
26
+ }) => {
24
27
  readonly description: "Inspect one thing on a mobile interactive runner: the Appium session's status, the WebView contexts available, the current context's page source, or the elements at a point or carrying some text. Mobile only — a browser runner answers `runner-is-not-mobile`; call `runner.inspect` for a browser's equivalent surface instead. `what: \"session\"` always answers with the session's own status rather than `screen-needs-a-run`, since that is the question it exists to answer; the other three request kinds need a live session first and answer the same `screen-needs-a-run` or `screen-not-ready` outcomes `runner.performAction` and `runner.takeScreenshot` use, instead of reading anything when there is none. `screen-needs-a-run` means no Appium session has started on this runner yet — call `runner.runFlow` with a flow that opens one, then inspect again. `screen-not-ready` means the runner's Appium session exists but did not answer this instant, or more than one is somehow live — retry once; if it persists, relaunch the runner. `runner-is-not-mobile` means there is nothing here to inspect, and retrying will never help — launch an `android` or `ios` 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.";
25
28
  readonly input: z.ZodObject<{
26
29
  id: z.ZodString;
@@ -44,6 +47,7 @@ export declare const makeInspectMobileOnRunnerContract: () => {
44
47
  text: z.ZodString;
45
48
  what: z.ZodLiteral<"elements">;
46
49
  }, z.core.$strip>], "by">], "what">;
50
+ workspaceId: z.ZodOptional<WorkspaceId>;
47
51
  }, z.core.$strip>;
48
52
  readonly kind: "read";
49
53
  readonly name: "runner.inspectMobile";
@@ -1 +1 @@
1
- {"version":3,"file":"inspectMobile.d.ts","sourceRoot":"","sources":["../../../src/v1/runner/inspectMobile.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAwBxB,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;mCAgDrC,CAAC;AA4CH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAE9E,eAAO,MAAM,iCAAiC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4B7C,CAAC"}
1
+ {"version":3,"file":"inspectMobile.d.ts","sourceRoot":"","sources":["../../../src/v1/runner/inspectMobile.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAsBhD,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;mCAgDrC,CAAC;AA4CH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAE9E,eAAO,MAAM,iCAAiC,GAC5C,WAAW,SAAS,cAAc,EAClC,KAAK;IACL,SAAS,EAAE,WAAW,CAAC;CACxB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+BA,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { z } from "zod";
2
- import { runnerIdSchema } from "./identity.js";
2
+ import { runnerIdSchema, runnerWorkspaceIdDescription } from "./identity.js";
3
3
  import { elementSchema, orientationSchema, pageSourceNodeSchema, } from "./inspectMobileShapes.js";
4
4
  import { makeRunnerFailureSchema } from "./outcome.js";
5
5
  import { retryableRunnerUnreachableDescription, runnerUnreachableFailureReason, } from "./unreachable.js";
@@ -93,10 +93,13 @@ const inspectMobileAnswerSchema = z.discriminatedUnion("what", [
93
93
  what: z.literal("elements"),
94
94
  }),
95
95
  ]);
96
- export const makeInspectMobileOnRunnerContract = () => {
96
+ export const makeInspectMobileOnRunnerContract = (ids) => {
97
97
  const input = z.object({
98
98
  id: runnerIdSchema.describe("Id of the runner to inspect."),
99
99
  request: inspectMobileRequestSchema,
100
+ workspaceId: ids.workspace
101
+ .optional()
102
+ .describe(runnerWorkspaceIdDescription),
100
103
  });
101
104
  const output = z.discriminatedUnion("outcome", [
102
105
  inspectMobileAnswerSchema,
@@ -1 +1 @@
1
- {"version":3,"file":"inspectMobile.js","sourceRoot":"","sources":["../../../src/v1/runner/inspectMobile.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EACL,aAAa,EACb,iBAAiB,EACjB,oBAAoB,GACrB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC;AACvD,OAAO,EACL,qCAAqC,EACrC,8BAA8B,GAC/B,MAAM,kBAAkB,CAAC;AAE1B;;;;GAIG;AAEH,MAAM,oBAAoB,GAAG,GAAG,CAAC;AAEjC,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,CAAC,kBAAkB,CAAC,MAAM,EAAE;IACrE,CAAC,CAAC,MAAM,CAAC;QACP,IAAI,EAAE,CAAC;aACJ,OAAO,CAAC,SAAS,CAAC;aAClB,QAAQ,CACP,wFAAwF,CACzF;KACJ,CAAC;IACF,CAAC,CAAC,MAAM,CAAC;QACP,IAAI,EAAE,CAAC;aACJ,OAAO,CAAC,UAAU,CAAC;aACnB,QAAQ,CACP,yEAAyE,CAC1E;KACJ,CAAC;IACF,CAAC,CAAC,MAAM,CAAC;QACP,OAAO,EAAE,CAAC;aACP,MAAM,EAAE;aACR,GAAG,CAAC,CAAC,CAAC;aACN,QAAQ,EAAE;aACV,QAAQ,CAAC,oDAAoD,CAAC;QACjE,IAAI,EAAE,CAAC;aACJ,OAAO,CAAC,MAAM,CAAC;aACf,QAAQ,CAAC,6DAA6D,CAAC;KAC3E,CAAC;IACF,CAAC;SACE,kBAAkB,CAAC,IAAI,EAAE;QACxB,CAAC,CAAC,MAAM,CAAC;YACP,EA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@@
1
1
  import { z } from "zod";
2
- export declare const makeListRunnersContract: () => {
3
- readonly description: "List the runners running on the caller's team right now. Takes no arguments: the API key already names the team. A runner that was terminated, or that terminated on its own after inactivity, is not listed, because the run system keeps no record of a runner once it is gone. This is a lookup: it never starts a runner, and it does not reset a runner's inactivity clock the way reading its journal does. It is how to find a runner launched from another machine or in an earlier session, when the id it was launched under is no longer at hand.";
4
- readonly input: z.ZodObject<{}, z.core.$strip>;
2
+ import type { PublicIdSchema } from "../ids.js";
3
+ export declare const makeListRunnersContract: <WorkspaceId extends PublicIdSchema>(ids: {
4
+ workspace: WorkspaceId;
5
+ }) => {
6
+ readonly description: "List the runners running on the caller's team right now. A team API key already names the team and sends nothing; a credential bound to no single workspace names one in `workspaceId`. A runner that was terminated, or that terminated on its own after inactivity, is not listed, because the run system keeps no record of a runner once it is gone. This is a lookup: it never starts a runner, and it does not reset a runner's inactivity clock the way reading its journal does. It is how to find a runner launched from another machine or in an earlier session, when the id it was launched under is no longer at hand.";
7
+ readonly input: z.ZodObject<{
8
+ workspaceId: z.ZodOptional<WorkspaceId>;
9
+ }, z.core.$strip>;
5
10
  readonly kind: "read";
6
11
  readonly name: "runner.list";
7
12
  readonly output: z.ZodObject<{
@@ -1 +1 @@
1
- {"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../src/v1/runner/list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;CAyBnC,CAAC"}
1
+ {"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../src/v1/runner/list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAIhD,eAAO,MAAM,uBAAuB,GAClC,WAAW,SAAS,cAAc,EAClC,KAAK;IACL,SAAS,EAAE,WAAW,CAAC;CACxB;;;;;;;;;;;;;;;;;;;;CA+BA,CAAC"}
@@ -1,7 +1,11 @@
1
1
  import { z } from "zod";
2
- import { makeRunnerSchema } from "./identity.js";
3
- export const makeListRunnersContract = () => {
4
- const input = z.object({});
2
+ import { makeRunnerSchema, runnerWorkspaceRequirement } from "./identity.js";
3
+ export const makeListRunnersContract = (ids) => {
4
+ const input = z.object({
5
+ workspaceId: ids.workspace
6
+ .optional()
7
+ .describe(`The workspace whose runners to list. ${runnerWorkspaceRequirement}`),
8
+ });
5
9
  const output = z.object({
6
10
  outcome: z.literal("success"),
7
11
  runners: z
@@ -9,7 +13,7 @@ export const makeListRunnersContract = () => {
9
13
  .describe("The runners running right now, in no particular order. Each entry carries the same fields a launch reports, so any of them can be addressed like a runner you launched yourself."),
10
14
  });
11
15
  return {
12
- description: "List the runners running on the caller's team right now. Takes no arguments: the API key already names the team. A runner that was terminated, or that terminated on its own after inactivity, is not listed, because the run system keeps no record of a runner once it is gone. This is a lookup: it never starts a runner, and it does not reset a runner's inactivity clock the way reading its journal does. It is how to find a runner launched from another machine or in an earlier session, when the id it was launched under is no longer at hand.",
16
+ description: "List the runners running on the caller's team right now. A team API key already names the team and sends nothing; a credential bound to no single workspace names one in `workspaceId`. A runner that was terminated, or that terminated on its own after inactivity, is not listed, because the run system keeps no record of a runner once it is gone. This is a lookup: it never starts a runner, and it does not reset a runner's inactivity clock the way reading its journal does. It is how to find a runner launched from another machine or in an earlier session, when the id it was launched under is no longer at hand.",
13
17
  input,
14
18
  kind: "read",
15
19
  name: "runner.list",
@@ -1 +1 @@
1
- {"version":3,"file":"list.js","sourceRoot":"","sources":["../../../src/v1/runner/list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAEjD,MAAM,CAAC,MAAM,uBAAuB,GAAG,GAAG,EAAE;IAC1C,MAAM,KAAK,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;IAE3B,MAAM,MAAM,GAAG,CAAC,CAAC,MAAM,CAAC;QACtB,OAAO,EAAE,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC;QAC7B,OAAO,EAAE,CAAC;aACP,KAAK,CAAC,gBAAgB,EAAE,CAAC;aACzB,QAAQ,CACP,kLAAkL,CACnL;KACJ,CAAC,CAAC;IAEH,OAAO;QACL,WAAW,EACT,8hBAA8hB;QAChiB,KAAK;QACL,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,aAAa;QACnB,MAAM;KAMP,CAAC;AACJ,CAAC,CAAC"}
1
+ {"version":3,"file":"list.js","sourceRoot":"","sources":["../../../src/v1/runner/list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,OAAO,EAAE,gBAAgB,EAAE,0BAA0B,EAAE,MAAM,eAAe,CAAC;AAE7E,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAErC,GAED,EAAE,EAAE;IACH,MAAM,KAAK,GAAG,CAAC,CAAC,MAAM,CAAC;QACrB,WAAW,EAAE,GAAG,CAAC,SAAS;aACvB,QAAQ,EAAE;aACV,QAAQ,CACP,wCAAwC,0BAA0B,EAAE,CACrE;KACJ,CAAC,CAAC;IAEH,MAAM,MAAM,GAAG,CAAC,CAAC,MAAM,CAAC;QACtB,OAAO,EAAE,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC;QAC7B,OAAO,EAAE,CAAC;aACP,KAAK,CAAC,gBAAgB,EAAE,CAAC;aACzB,QAAQ,CACP,kLAAkL,CACnL;KACJ,CAAC,CAAC;IAEH,OAAO;QACL,WAAW,EACT,qmBAAqmB;QACvmB,KAAK;QACL,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,aAAa;QACnB,MAAM;KAMP,CAAC;AACJ,CAAC,CAAC"}
@@ -1,7 +1,10 @@
1
1
  import { z } from "zod";
2
+ import type { PublicIdSchema } from "../ids.js";
2
3
  /** How much of a failure reason this API passes on. */
3
4
  export declare const maxActionErrorMessageLength = 1000;
4
- export declare const makePerformActionOnRunnerContract: () => {
5
+ export declare const makePerformActionOnRunnerContract: <WorkspaceId extends PublicIdSchema>(ids: {
6
+ workspace: WorkspaceId;
7
+ }) => {
5
8
  readonly description: "Perform one raw browser action on an interactive runner: click, double_click, move, drag, scroll, keypress, type, or navigate. Coordinates are whole pixels on the runner's virtual desktop, in the same space as `runner.takeScreenshot`. One action per request, and the runner serves one at a time. The action shapes follow the computer-use vocabulary, minus `screenshot` (use `runner.takeScreenshot`) and `wait` (delay on the caller's side). A success means the action took effect. `action-failed`, with a reason, if it reached the runner and did not take effect. On a runner image with a browser, the first action on a runner that has never run anything starts its browser and waits for it, so it can take up to a minute to answer — no `runner.runFlow` is needed before acting; if the browser is still starting when the wait runs out, the answer is `screen-not-ready` and retrying converges. On a mobile runner, the same `screen-needs-a-run` and `screen-not-ready` outcomes mean no Appium session has started yet, or it did not answer this instant; `runner.runFlow` is what starts one, same as a browser. `screen-needs-a-run` if the browser could not be started that way — usually a runner whose runs all finished without starting its desktop; call `runner.runFlow` with a flow that opens a browser. `screen-not-ready` if the runner has a screen that cannot serve this instant. Retry in a second or two: the desktop restarts when a run changes the display size, and it serves one see-or-act request at a time, so a screenshot or action already in flight is the usual reason. Do not submit a run to clear this — a run may restart the display and discard what is on it. A `navigate` does not go through the screen, so a screen that is not ready does not stop it. `runner-has-no-screen` if this runner is not one that runs a browser on a virtual desktop. Nothing about it can be seen or driven, and retrying will never help — launch a `playwright` runner instead. `action-not-supported-on-mobile` if the runner is a mobile device and this action has no touchscreen equivalent: `double_click`, `scroll`, `move`, `keypress` and `navigate`, and a `click` whose `button` is not `left`, are all pointer-device concepts a touchscreen has nothing to offer for. `click` taps, `drag` swipes between its path's first and last point, and `type` types into whatever the last tap focused. `runner-unreachable` if the runner could not be reached: it may still be starting, it may have terminated after inactivity, or it may have stopped answering mid-action. This does not mean the action was not performed — take a screenshot before repeating it.";
6
9
  readonly input: z.ZodObject<{
7
10
  action: z.ZodDiscriminatedUnion<[z.ZodObject<{
@@ -40,6 +43,7 @@ export declare const makePerformActionOnRunnerContract: () => {
40
43
  type: z.ZodLiteral<"type">;
41
44
  }, z.core.$strict>], "type">;
42
45
  id: z.ZodString;
46
+ workspaceId: z.ZodOptional<WorkspaceId>;
43
47
  }, z.core.$strip>;
44
48
  readonly kind: "write";
45
49
  readonly name: "runner.performAction";
@@ -1 +1 @@
1
- {"version":3,"file":"performAction.d.ts","sourceRoot":"","sources":["../../../src/v1/runner/performAction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAsBxB,uDAAuD;AACvD,eAAO,MAAM,2BAA2B,OAAQ,CAAC;AAEjD,eAAO,MAAM,iCAAiC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2C7C,CAAC"}
1
+ {"version":3,"file":"performAction.d.ts","sourceRoot":"","sources":["../../../src/v1/runner/performAction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAoBhD,uDAAuD;AACvD,eAAO,MAAM,2BAA2B,OAAQ,CAAC;AAEjD,eAAO,MAAM,iCAAiC,GAC5C,WAAW,SAAS,cAAc,EAClC,KAAK;IACL,SAAS,EAAE,WAAW,CAAC;CACxB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8CA,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import { z } from "zod";
2
2
  import { browserActionSchema } from "./browserAction.js";
3
- import { runnerIdSchema } from "./identity.js";
3
+ import { runnerIdSchema, runnerWorkspaceIdDescription } from "./identity.js";
4
4
  import { makeRunnerFailureSchema } from "./outcome.js";
5
5
  import { runnerHasNoScreenDescription, screenFailureReasons, screenNotReadyDescription, } from "./screen.js";
6
6
  import { runnerUnreachableFailureReason } from "./unreachable.js";
@@ -10,10 +10,13 @@ const unreachableDescription = "`runner-unreachable` if the runner could not be
10
10
  const notSupportedOnMobileDescription = "`action-not-supported-on-mobile` if the runner is a mobile device and this action has no touchscreen equivalent: `double_click`, `scroll`, `move`, `keypress` and `navigate`, and a `click` whose `button` is not `left`, are all pointer-device concepts a touchscreen has nothing to offer for. `click` taps, `drag` swipes between its path's first and last point, and `type` types into whatever the last tap focused.";
11
11
  /** How much of a failure reason this API passes on. */
12
12
  export const maxActionErrorMessageLength = 1_000;
13
- export const makePerformActionOnRunnerContract = () => {
13
+ export const makePerformActionOnRunnerContract = (ids) => {
14
14
  const input = z.object({
15
15
  action: browserActionSchema.describe("The action to perform. Coordinates are pixels on the screenshot's own coordinate space."),
16
16
  id: runnerIdSchema.describe("Id of the runner to act on."),
17
+ workspaceId: ids.workspace
18
+ .optional()
19
+ .describe(runnerWorkspaceIdDescription),
17
20
  });
18
21
  // `action-failed` is the one reason that carries a message, so it is an arm of
19
22
  // its own and the other reasons share theirs.
@@ -1 +1 @@
1
- {"version":3,"file":"performAction.js","sourceRoot":"","sources":["../../../src/v1/runner/performAction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC;AACvD,OAAO,EACL,4BAA4B,EAC5B,oBAAoB,EACpB,yBAAyB,GAC1B,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,8BAA8B,EAAE,MAAM,kBAAkB,CAAC;AAElE,gFAAgF;AAChF,mBAAmB;AACnB,MAAM,sBAAsB,GAC1B,mQAAmQ,CAAC;AAEtQ,MAAM,+BAA+B,GACnC,6ZAA6Z,CAAC;AAEha,uD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C;YACtB,GAAG,oBAAoB;YACvB,gCAAgC;YAChC,8BAA8B;SAC/B,CAAC;KACH,CAAC,CAAC;IAEH,MAAM,MAAM,GAAG,CAAC,CAAC,kBAAkB,CAAC,SAAS,EAAE;QAC7C,CAAC,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,CAAC;QAC3C,OAAO;KACR,CAAC,CAAC;IAEH,OAAO;QACL,WAAW,EAAE,8yCAA8yC,yBAAyB,mGAAmG,4BAA4B,IAAI,+BAA+B,IAAI,sBAAsB,EAAE;QAClhD,KAAK;QACL,IAAI,EAAE,OAAO;QACb,IAAI,EAAE,sBAAsB;QAC5B,MAAM;KAMP,CAAC;AACJ,CAAC,CAAC"}
@@ -1,12 +1,16 @@
1
1
  import { z } from "zod";
2
+ import type { PublicIdSchema } from "../ids.js";
2
3
  /** A path within the run's own screenshot storage, not a filesystem path. */
3
4
  export declare const maxSnapshotPathLength = 1024;
4
- export declare const makePromoteSnapshotOnRunnerContract: () => {
5
+ export declare const makePromoteSnapshotOnRunnerContract: <WorkspaceId extends PublicIdSchema>(ids: {
6
+ workspace: WorkspaceId;
7
+ }) => {
5
8
  readonly description: "Accept a run's screenshot as the new baseline for an image diff, on the runner that produced it. The two paths are the ones the diff reported, which reach a caller as an `image-diff-artifact` entry on the runner's `run-events` journal stream. `snapshot-not-found` if the run wrote no screenshot at that path, which usually means the paths were not taken from a diff this run produced; nothing is changed, so correcting the path and repeating is safe. `runner-cannot-promote-snapshots` on a runner that stores no screenshots. `runner-unreachable` if the runner could not be reached: it may still be starting, or it may have terminated after inactivity. A promotion that lands is not undone by promoting again, so a retry after an unreachable answer is safe.";
6
9
  readonly input: z.ZodObject<{
7
10
  baselinePath: z.ZodString;
8
11
  id: z.ZodString;
9
12
  screenshotPath: z.ZodString;
13
+ workspaceId: z.ZodOptional<WorkspaceId>;
10
14
  }, z.core.$strip>;
11
15
  readonly kind: "write";
12
16
  readonly name: "runner.promoteSnapshot";
@@ -1 +1 @@
1
- {"version":3,"file":"promoteSnapshot.d.ts","sourceRoot":"","sources":["../../../src/v1/runner/promoteSnapshot.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,6EAA6E;AAC7E,eAAO,MAAM,qBAAqB,OAAQ,CAAC;AAE3C,eAAO,MAAM,mCAAmC;;;;;;;;;;;;;;;;;;;CAwC/C,CAAC"}
1
+ {"version":3,"file":"promoteSnapshot.d.ts","sourceRoot":"","sources":["../../../src/v1/runner/promoteSnapshot.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAIhD,6EAA6E;AAC7E,eAAO,MAAM,qBAAqB,OAAQ,CAAC;AAE3C,eAAO,MAAM,mCAAmC,GAC9C,WAAW,SAAS,cAAc,EAClC,KAAK;IACL,SAAS,EAAE,WAAW,CAAC;CACxB;;;;;;;;;;;;;;;;;;;;CA2CA,CAAC"}
@@ -1,8 +1,8 @@
1
1
  import { z } from "zod";
2
- import { runnerIdSchema } from "./identity.js";
2
+ import { runnerIdSchema, runnerWorkspaceIdDescription } from "./identity.js";
3
3
  /** A path within the run's own screenshot storage, not a filesystem path. */
4
4
  export const maxSnapshotPathLength = 1_024;
5
- export const makePromoteSnapshotOnRunnerContract = () => {
5
+ export const makePromoteSnapshotOnRunnerContract = (ids) => {
6
6
  const input = z.object({
7
7
  baselinePath: z
8
8
  .string()
@@ -15,6 +15,9 @@ export const makePromoteSnapshotOnRunnerContract = () => {
15
15
  .min(1)
16
16
  .max(maxSnapshotPathLength)
17
17
  .describe("The screenshot to promote, as named in the image diff."),
18
+ workspaceId: ids.workspace
19
+ .optional()
20
+ .describe(runnerWorkspaceIdDescription),
18
21
  });
19
22
  const output = z.discriminatedUnion("outcome", [
20
23
  z.object({ outcome: z.literal("success") }),
@@ -1 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K;QACL,IAAI,EAAE,OAAO;QACb,IAAI,EAAE,wBAAwB;QAC9B,MAAM;KAMP,CAAC;AACJ,CAAC,CAAC"}
@@ -1,5 +1,8 @@
1
1
  import { z } from "zod";
2
- export declare const makeReadRunnerJournalContract: () => {
2
+ import type { PublicIdSchema } from "../ids.js";
3
+ export declare const makeReadRunnerJournalContract: <WorkspaceId extends PublicIdSchema>(ids: {
4
+ workspace: WorkspaceId;
5
+ }) => {
3
6
  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.";
4
7
  readonly input: z.ZodObject<{
5
8
  runId: z.ZodOptional<z.ZodString>;
@@ -7,6 +10,7 @@ export declare const makeReadRunnerJournalContract: () => {
7
10
  tail: z.ZodOptional<z.ZodNumber>;
8
11
  id: z.ZodString;
9
12
  stream: z.ZodString;
13
+ workspaceId: z.ZodOptional<WorkspaceId>;
10
14
  }, z.core.$strip>;
11
15
  readonly kind: "read";
12
16
  readonly name: "runner.readJournal";
@@ -1 +1 @@
1
- {"version":3,"file":"readJournal.d.ts","sourceRoot":"","sources":["../../../src/v1/runner/readJournal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAiBxB,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyBzC,CAAC"}
1
+ {"version":3,"file":"readJournal.d.ts","sourceRoot":"","sources":["../../../src/v1/runner/readJournal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAehD,eAAO,MAAM,6BAA6B,GACxC,WAAW,SAAS,cAAc,EAClC,KAAK;IACL,SAAS,EAAE,WAAW,CAAC;CACxB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4BA,CAAC"}
@@ -1,12 +1,15 @@
1
1
  import { z } from "zod";
2
- import { runnerIdSchema } from "./identity.js";
2
+ import { runnerIdSchema, runnerWorkspaceIdDescription } from "./identity.js";
3
3
  import { journalStreamSchema, knownJournalStreams, readJournalRequestSchema, readJournalResponseSchema, } from "./journal.js";
4
4
  import { makeRunnerFailureSchema } from "./outcome.js";
5
5
  import { retryableRunnerUnreachableDescription, runnerUnreachableFailureReason, } from "./unreachable.js";
6
- export const makeReadRunnerJournalContract = () => {
6
+ export const makeReadRunnerJournalContract = (ids) => {
7
7
  const input = readJournalRequestSchema.extend({
8
8
  id: runnerIdSchema.describe("Id of the runner to read the journal of."),
9
9
  stream: journalStreamSchema.describe(`The stream to read. QA Wolf writes ${knownJournalStreams.join(", ")}; an unwritten stream reads as empty rather than as an error.`),
10
+ workspaceId: ids.workspace
11
+ .optional()
12
+ .describe(runnerWorkspaceIdDescription),
10
13
  });
11
14
  const output = z.discriminatedUnion("outcome", [
12
15
  readJournalResponseSchema.extend({ outcome: z.literal("success") }),
@@ -1 +1 @@
1
- {"version":3,"file":"readJournal.js","sourceRoot":"","sources":["../../../src/v1/runner/readJournal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EACnB,wBAAwB,EACxB,yBAAyB,GAC1B,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC;AACvD,OAAO,EACL,qCAAqC,EACrC,8BAA8B,GAC/B,MAAM,kBAAkB,CAAC;AAE1B,MAAM,CAAC,MAAM,6BAA6B,GAAG,GAAG,EA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,QAAQ,CAClC,sCAAsC,mBAAmB,CAAC,IAAI,CAAC,IAAI,CAAC,+DAA+D,CACpI;QACD,WAAW,EAAE,GAAG,CAAC,SAAS;aACvB,QAAQ,EAAE;aACV,QAAQ,CAAC,4BAA4B,CAAC;KAC1C,CAAC,CAAC;IAEH,MAAM,MAAM,GAAG,CAAC,CAAC,kBAAkB,CAAC,SAAS,EAAE;QAC7C,yBAAyB,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,CAAC;QACnE,uBAAuB,CAAC,CAAC,8BAA8B,CAAC,CAAC;KAC1D,CAAC,CAAC;IAEH,OAAO;QACL,WAAW,EAAE,wcAAwc,qCAAqC,EAAE;QAC5f,KAAK;QACL,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,oBAAoB;QAC1B,MAAM;KAMP,CAAC;AACJ,CAAC,CAAC"}
@@ -1,7 +1,8 @@
1
1
  import { z } from "zod";
2
2
  import type { PublicIdSchema } from "../ids.js";
3
- export declare const makeRunFlowOnRunnerContract: (ids: {
3
+ export declare const makeRunFlowOnRunnerContract: <WorkspaceId extends PublicIdSchema>(ids: {
4
4
  environmentRef: PublicIdSchema;
5
+ workspace: WorkspaceId;
5
6
  }) => {
6
7
  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.";
7
8
  readonly input: z.ZodObject<{
@@ -16,6 +17,7 @@ export declare const makeRunFlowOnRunnerContract: (ids: {
16
17
  startLine: z.ZodInt;
17
18
  }, z.core.$strip>>;
18
19
  unchangedFiles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
20
+ workspaceId: z.ZodOptional<WorkspaceId>;
19
21
  }, z.core.$strip>;
20
22
  readonly kind: "write";
21
23
  readonly name: "runner.runFlow";
@@ -1 +1 @@
1
- {"version":3,"file":"runFlow.d.ts","sourceRoot":"","sources":["../../../src/v1/runner/runFlow.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AA0BhD,eAAO,MAAM,2BAA2B,GAAI,KAAK;IAC/C,cAAc,EAAE,cAAc,CAAC;CAChC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+HA,CAAC"}
1
+ {"version":3,"file":"runFlow.d.ts","sourceRoot":"","sources":["../../../src/v1/runner/runFlow.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AA8BhD,eAAO,MAAM,2BAA2B,GACtC,WAAW,SAAS,cAAc,EAClC,KAAK;IACL,cAAc,EAAE,cAAc,CAAC;IAC/B,SAAS,EAAE,WAAW,CAAC;CACxB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkIA,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import { z } from "zod";
2
2
  import { runEnvironmentSchema } from "./environment.js";
3
3
  import { isShippableRunFilePath, runFilePathRefusal, runFilePathSchema, runPackageJsonPath, } from "./files.js";
4
- import { runnerIdSchema, runnerNameSchema } from "./identity.js";
4
+ import { runnerIdSchema, runnerNameSchema, runnerWorkspaceIdDescription, } from "./identity.js";
5
5
  import { runFilesSchema } from "./payloadSize.js";
6
6
  import { runSelectionSchema } from "./runSelection.js";
7
7
  const unchangedFilesSchema = z
@@ -35,6 +35,9 @@ export const makeRunFlowOnRunnerContract = (ids) => {
35
35
  unchangedFiles: unchangedFilesSchema
36
36
  .optional()
37
37
  .describe("Files this runner already holds from an earlier run, keyed by path with a hex SHA-256 of the content it should hold. Send this to make `files` only what changed. The runner refuses with `needs-full-sync` if it holds none of a referenced path, so it never runs something other than what was asked for. Omit it to send every file."),
38
+ workspaceId: ids.workspace
39
+ .optional()
40
+ .describe(runnerWorkspaceIdDescription),
38
41
  })
39
42
  // Both would need a merge order, and the two surfaces that carry an
40
43
  // environment and caller variables today do not agree on one.
@@ -1 +1 @@
1
- {"version":3,"file":"runFlow.js","sourceRoot":"","sources":["../../../src/v1/runner/runFlow.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,EACL,sBAAsB,EACtB,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,GACnB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAEvD,MAAM,oBAAoB,GAAG,CAAC;KAC3B,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;KACrC,WAAW,CAAC,CAAC,MAAM,EAAE,iBAAiB,EAAE,EAAE;IACzC,KAAK,MAAM,IAA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;QAC38C,KAAK;QACL,IAAI,EAAE,OAAO;QACb,IAAI,EAAE,gBAAgB;QACtB,MAAM;KAMP,CAAC;AACJ,CAAC,CAAC"}
@@ -1,8 +1,12 @@
1
1
  import { z } from "zod";
2
- export declare const makeStopRunOnRunnerContract: () => {
2
+ import type { PublicIdSchema } from "../ids.js";
3
+ export declare const makeStopRunOnRunnerContract: <WorkspaceId extends PublicIdSchema>(ids: {
4
+ workspace: WorkspaceId;
5
+ }) => {
3
6
  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.";
4
7
  readonly input: z.ZodObject<{
5
8
  id: z.ZodString;
9
+ workspaceId: z.ZodOptional<WorkspaceId>;
6
10
  }, z.core.$strip>;
7
11
  readonly kind: "write";
8
12
  readonly name: "runner.stopRun";
@@ -1 +1 @@
1
- {"version":3,"file":"stopRun.d.ts","sourceRoot":"","sources":["../../../src/v1/runner/stopRun.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAQxB,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;CA8BvC,CAAC"}
1
+ {"version":3,"file":"stopRun.d.ts","sourceRoot":"","sources":["../../../src/v1/runner/stopRun.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAMhD,eAAO,MAAM,2BAA2B,GACtC,WAAW,SAAS,cAAc,EAClC,KAAK;IACL,SAAS,EAAE,WAAW,CAAC;CACxB;;;;;;;;;;;;;;;;;CAiCA,CAAC"}
@@ -1,10 +1,13 @@
1
1
  import { z } from "zod";
2
- import { runnerIdSchema } from "./identity.js";
2
+ import { runnerIdSchema, runnerWorkspaceIdDescription } from "./identity.js";
3
3
  import { makeRunnerFailureSchema } from "./outcome.js";
4
4
  import { runnerUnreachableFailureReason } from "./unreachable.js";
5
- export const makeStopRunOnRunnerContract = () => {
5
+ export const makeStopRunOnRunnerContract = (ids) => {
6
6
  const input = z.object({
7
7
  id: runnerIdSchema.describe("Id of the runner to stop the run on."),
8
+ workspaceId: ids.workspace
9
+ .optional()
10
+ .describe(runnerWorkspaceIdDescription),
8
11
  });
9
12
  const output = z.discriminatedUnion("outcome", [
10
13
  z.object({
@@ -1 +1 @@
1
- {"version":3,"file":"stopRun.js","sourceRoot":"","sources":["../../../src/v1/runner/stopRun.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC;AACvD,OAAO,EAAE,8BAA8B,EAAE,MAAM,kBAAkB,CAAC;AAElE,MAAM,CAAC,MAAM,2BAA2B,GAAG,GAAG,EAAE;IAC9C,MAAM,KAAK,GAAG,CAAC,CAAC,MAAM,CAAC;QACrB,EAAE,EAAE,cAAc,CAAC,QAAQ,CAAC,sCAAsC,CAAC;KACpE,CAAC,CAAC;IAEH,MAAM,MAAM,GAAG,CAAC,CAAC,kBAAkB,CAAC,SAAS,EAAE;QAC7C,CAAC,CAAC,MAAM,CAAC;YACP,OAAO,EAAE,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC;YAC7B,UAAU,EAAE,CAAC;iBACV,OAAO,EAAE;iBACT,QAAQ,CACP,oHAAoH,CACrH;SACJ,CAAC;QACF,uBAAuB,CAAC,CAAC,8BAA8B,CAAC,CAAC;KAC1D,CAAC,CAAC;IAEH,OAAO;QACL,WAAW,EACT,ooBAAooB;QACtoB,KAAK;QACL,IAAI,EAAE,OAAO;QACb,IAAI,EAAE,gBAAgB;QACtB,MAAM;KAMP,CAAC;AACJ,CAAC,CAAC"}
1
+ {"version":3,"file":"stopRun.js","sourceRoot":"","sources":["../../../src/v1/runner/stopRun.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,OAAO,EAAE,cAAc,EAAE,4BAA4B,EAAE,MAAM,eAAe,CAAC;AAC7E,OAAO,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC;AACvD,OAAO,EAAE,8BAA8B,EAAE,MAAM,kBAAkB,CAAC;AAElE,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAEzC,GAED,EAAE,EAAE;IACH,MAAM,KAAK,GAAG,CAAC,CAAC,MAAM,CAAC;QACrB,EAAE,EAAE,cAAc,CAAC,QAAQ,CAAC,sCAAsC,CAAC;QACnE,WAAW,EAAE,GAAG,CAAC,SAAS;aACvB,QAAQ,EAAE;aACV,QAAQ,CAAC,4BAA4B,CAAC;KAC1C,CAAC,CAAC;IAEH,MAAM,MAAM,GAAG,CAAC,CAAC,kBAAkB,CAAC,SAAS,EAAE;QAC7C,CAAC,CAAC,MAAM,CAAC;YACP,OAAO,EAAE,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC;YAC7B,UAAU,EAAE,CAAC;iBACV,OAAO,EAAE;iBACT,QAAQ,CACP,oHAAoH,CACrH;SACJ,CAAC;QACF,uBAAuB,CAAC,CAAC,8BAA8B,CAAC,CAAC;KAC1D,CAAC,CAAC;IAEH,OAAO;QACL,WAAW,EACT,ooBAAooB;QACtoB,KAAK;QACL,IAAI,EAAE,OAAO;QACb,IAAI,EAAE,gBAAgB;QACtB,MAAM;KAMP,CAAC;AACJ,CAAC,CAAC"}
@@ -1,8 +1,12 @@
1
1
  import { z } from "zod";
2
- export declare const makeTakeScreenshotOnRunnerContract: () => {
2
+ import type { PublicIdSchema } from "../ids.js";
3
+ export declare const makeTakeScreenshotOnRunnerContract: <WorkspaceId extends PublicIdSchema>(ids: {
4
+ workspace: WorkspaceId;
5
+ }) => {
3
6
  readonly description: "Take one screenshot of an interactive runner's screen. On a runner with a browser the image is the whole virtual desktop, browser window and all. On a mobile runner it is the device's own screen, re-encoded to JPEG on the pod so this contract reads one image format regardless of runner family. `screen-needs-a-run` if the runner's virtual desktop has never started. Waiting will not change this and retrying is pointless — call `runner.runFlow` with a flow that opens a browser, then ask for the screen again. On a runner image with a browser that has never run anything, any `runner.performAction` also starts the browser itself. Evaluating a snippet does not start the desktop. `screen-not-ready` if the runner has a screen that cannot serve this instant. Retry in a second or two: the desktop restarts when a run changes the display size, and it serves one see-or-act request at a time, so a screenshot or action already in flight is the usual reason. Do not submit a run to clear this — a run may restart the display and discard what is on it. `runner-has-no-screen` if this runner is not one that runs a browser on a virtual desktop. Nothing about it can be seen or driven, and retrying will never help — launch a `playwright` runner instead. `runner-unreachable` if the runner could not be reached: it may still be starting, it may have terminated after inactivity, or it may be too busy to answer. Nothing was changed, so retrying is safe; if it persists, launch the runner again.";
4
7
  readonly input: z.ZodObject<{
5
8
  id: z.ZodString;
9
+ workspaceId: z.ZodOptional<WorkspaceId>;
6
10
  }, z.core.$strip>;
7
11
  readonly kind: "read";
8
12
  readonly name: "runner.takeScreenshot";
@@ -1 +1 @@
1
- {"version":3,"file":"takeScreenshot.d.ts","sourceRoot":"","sources":["../../../src/v1/runner/takeScreenshot.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAiBxB,eAAO,MAAM,kCAAkC;;;;;;;;;;;;;;;;;;;CAqC9C,CAAC"}
1
+ {"version":3,"file":"takeScreenshot.d.ts","sourceRoot":"","sources":["../../../src/v1/runner/takeScreenshot.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAehD,eAAO,MAAM,kCAAkC,GAC7C,WAAW,SAAS,cAAc,EAClC,KAAK;IACL,SAAS,EAAE,WAAW,CAAC;CACxB;;;;;;;;;;;;;;;;;;;;CAwCA,CAAC"}