@qawolf/api-contracts 0.48.0 → 0.52.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 (46) hide show
  1. package/dist/v1/agent/get.d.ts +1 -1
  2. package/dist/v1/agent/get.d.ts.map +1 -1
  3. package/dist/v1/agent/get.js +4 -2
  4. package/dist/v1/agent/get.js.map +1 -1
  5. package/dist/v1/agent/send.d.ts +1 -1
  6. package/dist/v1/agent/send.d.ts.map +1 -1
  7. package/dist/v1/agent/send.js +4 -2
  8. package/dist/v1/agent/send.js.map +1 -1
  9. package/dist/v1/deployment/reportStatus.d.ts +49 -0
  10. package/dist/v1/deployment/reportStatus.d.ts.map +1 -0
  11. package/dist/v1/deployment/reportStatus.js +138 -0
  12. package/dist/v1/deployment/reportStatus.js.map +1 -0
  13. package/dist/v1/email/listAddresses.d.ts.map +1 -1
  14. package/dist/v1/email/listAddresses.js +2 -10
  15. package/dist/v1/email/listAddresses.js.map +1 -1
  16. package/dist/v1/email/registerAddress.d.ts +19 -0
  17. package/dist/v1/email/registerAddress.d.ts.map +1 -0
  18. package/dist/v1/email/registerAddress.js +30 -0
  19. package/dist/v1/email/registerAddress.js.map +1 -0
  20. package/dist/v1/email/resource.d.ts +5 -0
  21. package/dist/v1/email/resource.d.ts.map +1 -1
  22. package/dist/v1/email/resource.js +10 -0
  23. package/dist/v1/email/resource.js.map +1 -1
  24. package/dist/v1/index.d.ts +74 -6
  25. package/dist/v1/index.d.ts.map +1 -1
  26. package/dist/v1/index.js +4 -0
  27. package/dist/v1/index.js.map +1 -1
  28. package/dist/v1/run/stop.d.ts +22 -0
  29. package/dist/v1/run/stop.d.ts.map +1 -0
  30. package/dist/v1/run/stop.js +19 -0
  31. package/dist/v1/run/stop.js.map +1 -0
  32. package/dist/v1/runner/journal.d.ts +5 -1
  33. package/dist/v1/runner/journal.d.ts.map +1 -1
  34. package/dist/v1/runner/journal.js.map +1 -1
  35. package/dist/v1/runner/performAction.d.ts +4 -1
  36. package/dist/v1/runner/performAction.d.ts.map +1 -1
  37. package/dist/v1/runner/performAction.js +13 -3
  38. package/dist/v1/runner/performAction.js.map +1 -1
  39. package/dist/v1/runner/screen.d.ts +8 -0
  40. package/dist/v1/runner/screen.d.ts.map +1 -1
  41. package/dist/v1/runner/screen.js +11 -0
  42. package/dist/v1/runner/screen.js.map +1 -1
  43. package/dist/v1/runner/takeScreenshot.d.ts.map +1 -1
  44. package/dist/v1/runner/takeScreenshot.js +2 -9
  45. package/dist/v1/runner/takeScreenshot.js.map +1 -1
  46. package/package.json +1 -1
@@ -4,7 +4,7 @@ export declare const makeAgentGetContract: <ChatSessionId extends PublicIdSchema
4
4
  chatSession: ChatSessionId;
5
5
  workspace: WorkspaceId;
6
6
  }) => {
7
- readonly description: "Read what the QA Wolf AI has said and whether it is still working. Poll this after agent.send until the status settles. A status of \"waiting-for-you\" means the last reply is a question the work is blocked on, and answering it with agent.send is what unblocks it. Replies accumulate, so a caller that polls repeatedly sees the earlier ones again.";
7
+ readonly description: "Monitor a QA Wolf AI session by reading its status and replies. After agent.send, share the returned session URL before monitoring. Wait 30 to 60 seconds between checks; do not call this in a tight loop. Replies accumulate, so compare them with what you have already seen. Continue monitoring silently when the status and replies are unchanged; do not narrate waiting, announce the next check, or ask whether to keep monitoring. Report only substantive new progress, questions, blockers, or the final outcome. A status of \"waiting-for-you\" means the last reply is a question the work is blocked on, and answering it with agent.send is what unblocks it. Surface an explicit request for user input even if the status still says \"working\". Include the session URL when reporting a blocker or final outcome. On \"completed\", stop status checks and verify the requested result before claiming success. For new flows, validation, publication in the target environment, and readiness are separate checks; a Git push or final reply does not prove the flow is active. If every requested result is verified but status remains \"working\", report the mismatch and stop monitoring. Stop on \"failed\" or \"cancelled\" and report any confirmed partial result.";
8
8
  readonly input: z.ZodObject<{
9
9
  sessionId: ChatSessionId;
10
10
  }, z.core.$strip>;
@@ -1 +1 @@
1
- {"version":3,"file":"get.d.ts","sourceRoot":"","sources":["../../../src/v1/agent/get.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAKhD,eAAO,MAAM,oBAAoB,GAC/B,aAAa,SAAS,cAAc,EACpC,WAAW,SAAS,cAAc,EAClC,KAAK;IACL,WAAW,EAAE,aAAa,CAAC;IAC3B,SAAS,EAAE,WAAW,CAAC;CACxB;;;;;;;;;;;;;;;;;;;;;;;CA8BA,CAAC"}
1
+ {"version":3,"file":"get.d.ts","sourceRoot":"","sources":["../../../src/v1/agent/get.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAKhD,eAAO,MAAM,oBAAoB,GAC/B,aAAa,SAAS,cAAc,EACpC,WAAW,SAAS,cAAc,EAClC,KAAK;IACL,WAAW,EAAE,aAAa,CAAC;IAC3B,SAAS,EAAE,WAAW,CAAC;CACxB;;;;;;;;;;;;;;;;;;;;;;;CAiCA,CAAC"}
@@ -11,9 +11,11 @@ export const makeAgentGetContract = (ids) => {
11
11
  .describe("Everything the AI has said so far, oldest first. A reply carrying choices is a question the work is blocked on."),
12
12
  sessionId: ids.chatSession,
13
13
  status: agentSessionStatusSchema,
14
- }, { urlFieldDescription: "Absolute URL of the session in the QA Wolf app." });
14
+ }, {
15
+ urlFieldDescription: "Absolute URL of the live session in the QA Wolf app.",
16
+ });
15
17
  return {
16
- description: 'Read what the QA Wolf AI has said and whether it is still working. Poll this after agent.send until the status settles. A status of "waiting-for-you" means the last reply is a question the work is blocked on, and answering it with agent.send is what unblocks it. Replies accumulate, so a caller that polls repeatedly sees the earlier ones again.',
18
+ description: 'Monitor a QA Wolf AI session by reading its status and replies. After agent.send, share the returned session URL before monitoring. Wait 30 to 60 seconds between checks; do not call this in a tight loop. Replies accumulate, so compare them with what you have already seen. Continue monitoring silently when the status and replies are unchanged; do not narrate waiting, announce the next check, or ask whether to keep monitoring. Report only substantive new progress, questions, blockers, or the final outcome. A status of "waiting-for-you" means the last reply is a question the work is blocked on, and answering it with agent.send is what unblocks it. Surface an explicit request for user input even if the status still says "working". Include the session URL when reporting a blocker or final outcome. On "completed", stop status checks and verify the requested result before claiming success. For new flows, validation, publication in the target environment, and readiness are separate checks; a Git push or final reply does not prove the flow is active. If every requested result is verified but status remains "working", report the mismatch and stop monitoring. Stop on "failed" or "cancelled" and report any confirmed partial result.',
17
19
  input,
18
20
  kind: "read",
19
21
  name: "agent.get",
@@ -1 +1 @@
1
- {"version":3,"file":"get.js","sourceRoot":"","sources":["../../../src/v1/agent/get.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE1C,OAAO,EAAE,gBAAgB,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC;AAEzE,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAGlC,GAGD,EAAE,EAAE;IACH,MAAM,KAAK,GAAG,CAAC,CAAC,MAAM,CAAC;QACrB,SAAS,EAAE,GAAG,CAAC,WAAW,CAAC,QAAQ,CAAC,kCAAkC,CAAC;KACxE,CAAC,CAAC;IACH,MAAM,MAAM,GAAG,QAAQ,CACrB;QACE,OAAO,EAAE,CAAC;aACP,KAAK,CAAC,gBAAgB,CAAC;aACvB,QAAQ,CACP,iHAAiH,CAClH;QACH,SAAS,EAAE,GAAG,CAAC,WAAW;QAC1B,MAAM,EAAE,wBAAwB;KACjC,EACD,EAAE,mBAAmB,EAAE,iDAAiD,EAAE,CAC3E,CAAC;IAEF,OAAO;QACL,WAAW,EACT,2VAA2V;QAC7V,KAAK;QACL,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,WAAW;QACjB,MAAM;KAMP,CAAC;AACJ,CAAC,CAAC"}
1
+ {"version":3,"file":"get.js","sourceRoot":"","sources":["../../../src/v1/agent/get.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE1C,OAAO,EAAE,gBAAgB,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC;AAEzE,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAGlC,GAGD,EAAE,EAAE;IACH,MAAM,KAAK,GAAG,CAAC,CAAC,MAAM,CAAC;QACrB,SAAS,EAAE,GAAG,CAAC,WAAW,CAAC,QAAQ,CAAC,kCAAkC,CAAC;KACxE,CAAC,CAAC;IACH,MAAM,MAAM,GAAG,QAAQ,CACrB;QACE,OAAO,EAAE,CAAC;aACP,KAAK,CAAC,gBAAgB,CAAC;aACvB,QAAQ,CACP,iHAAiH,CAClH;QACH,SAAS,EAAE,GAAG,CAAC,WAAW;QAC1B,MAAM,EAAE,wBAAwB;KACjC,EACD;QACE,mBAAmB,EACjB,sDAAsD;KACzD,CACF,CAAC;IAEF,OAAO;QACL,WAAW,EACT,ytCAAytC;QAC3tC,KAAK;QACL,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,WAAW;QACjB,MAAM;KAMP,CAAC;AACJ,CAAC,CAAC"}
@@ -5,7 +5,7 @@ export declare const makeAgentSendContract: <ChatSessionId extends PublicIdSchem
5
5
  environmentRef: PublicIdSchema;
6
6
  workspace: WorkspaceId;
7
7
  }) => {
8
- readonly description: "Ask the QA Wolf AI to do a piece of work in plain language, such as covering a user journey, investigating a failing run, or fixing a broken flow. This is the one verb that starts work from nothing: every other write acts on a flow, run or issue that already exists. Answers as soon as the request is accepted, with the id to follow it by, because the work runs for minutes to tens of minutes. Poll agent.get for progress, and send here again to answer a question or add context to work already running.";
8
+ readonly description: "Start or continue work with the QA Wolf AI and return a live session URL to share with the user. Use it to cover a user journey, investigate a failing run, or fix a broken flow. This is the one verb that starts work from nothing: every other write acts on a flow, run or issue that already exists. Returns sessionId, status, and url as soon as the request is accepted; work can take minutes to tens of minutes. After each send, make the next action a normal user-visible assistant message containing the exact returned url, before any tool call or wait. Tool output and internal reasoning do not count as sharing the link. Do not run a timer or monitoring call alongside this send. Acceptance does not mean the work is complete. Then monitor the session with agent.get, reporting new progress, blockers, and the final outcome rather than unchanged status. Send here again to answer a question or add context to the same session.";
9
9
  readonly input: z.ZodObject<{
10
10
  environmentId: z.ZodOptional<PublicIdSchema>;
11
11
  message: z.ZodString;
@@ -1 +1 @@
1
- {"version":3,"file":"send.d.ts","sourceRoot":"","sources":["../../../src/v1/agent/send.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAKhD,eAAO,MAAM,qBAAqB,GAChC,aAAa,SAAS,cAAc,EACpC,WAAW,SAAS,cAAc,EAClC,KAAK;IACL,WAAW,EAAE,aAAa,CAAC;IAC3B,cAAc,EAAE,cAAc,CAAC;IAC/B,SAAS,EAAE,WAAW,CAAC;CACxB;;;;;;;;;;;;;;;;;;;;;CAiDA,CAAC"}
1
+ {"version":3,"file":"send.d.ts","sourceRoot":"","sources":["../../../src/v1/agent/send.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAKhD,eAAO,MAAM,qBAAqB,GAChC,aAAa,SAAS,cAAc,EACpC,WAAW,SAAS,cAAc,EAClC,KAAK;IACL,WAAW,EAAE,aAAa,CAAC;IAC3B,cAAc,EAAE,cAAc,CAAC;IAC/B,SAAS,EAAE,WAAW,CAAC;CACxB;;;;;;;;;;;;;;;;;;;;;CAoDA,CAAC"}
@@ -22,9 +22,11 @@ export const makeAgentSendContract = (ids) => {
22
22
  const output = resource({
23
23
  sessionId: ids.chatSession.describe("Follow the work by passing this to agent.get."),
24
24
  status: agentSessionStatusSchema,
25
- }, { urlFieldDescription: "Absolute URL of the session in the QA Wolf app." });
25
+ }, {
26
+ urlFieldDescription: "Absolute URL of the live session in the QA Wolf app.",
27
+ });
26
28
  return {
27
- description: "Ask the QA Wolf AI to do a piece of work in plain language, such as covering a user journey, investigating a failing run, or fixing a broken flow. This is the one verb that starts work from nothing: every other write acts on a flow, run or issue that already exists. Answers as soon as the request is accepted, with the id to follow it by, because the work runs for minutes to tens of minutes. Poll agent.get for progress, and send here again to answer a question or add context to work already running.",
29
+ description: "Start or continue work with the QA Wolf AI and return a live session URL to share with the user. Use it to cover a user journey, investigate a failing run, or fix a broken flow. This is the one verb that starts work from nothing: every other write acts on a flow, run or issue that already exists. Returns sessionId, status, and url as soon as the request is accepted; work can take minutes to tens of minutes. After each send, make the next action a normal user-visible assistant message containing the exact returned url, before any tool call or wait. Tool output and internal reasoning do not count as sharing the link. Do not run a timer or monitoring call alongside this send. Acceptance does not mean the work is complete. Then monitor the session with agent.get, reporting new progress, blockers, and the final outcome rather than unchanged status. Send here again to answer a question or add context to the same session.",
28
30
  input,
29
31
  kind: "write",
30
32
  name: "agent.send",
@@ -1 +1 @@
1
- {"version":3,"file":"send.js","sourceRoot":"","sources":["../../../src/v1/agent/send.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE1C,OAAO,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC;AAEvD,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAGnC,GAID,EAAE,EAAE;IACH,MAAM,KAAK,GAAG,CAAC,CAAC,MAAM,CAAC;QACrB,aAAa,EAAE,GAAG,CAAC,cAAc;aAC9B,QAAQ,EAAE;aACV,QAAQ,CACP,gKAAgK,CACjK;QACH,OAAO,EAAE,CAAC;aACP,MAAM,EAAE;aACR,IAAI,EAAE;aACN,GAAG,CAAC,CAAC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,CACjK;QACH,WAAW,EAAE,GAAG,CAAC,SAAS;aACvB,QAAQ,EAAE;aACV,QAAQ,CACP,8FAA8F,CAC/F;KACJ,CAAC,CAAC;IACH,MAAM,MAAM,GAAG,QAAQ,CACrB;QACE,SAAS,EAAE,GAAG,CAAC,WAAW,CAAC,QAAQ,CACjC,+CAA+C,CAChD;QACD,MAAM,EAAE,wBAAwB;KACjC,EACD;QACE,mBAAmB,EACjB,sDAAsD;KACzD,CACF,CAAC;IAEF,OAAO;QACL,WAAW,EACT,k6BAAk6B;QACp6B,KAAK;QACL,IAAI,EAAE,OAAO;QACb,IAAI,EAAE,YAAY;QAClB,MAAM;KAMP,CAAC;AACJ,CAAC,CAAC"}
@@ -0,0 +1,49 @@
1
+ import { z } from "zod";
2
+ import type { PublicIdSchema } from "../ids.js";
3
+ export declare const makeReportDeploymentStatusContract: <DeploymentId extends PublicIdSchema, EnvironmentId extends PublicIdSchema, WorkspaceId extends PublicIdSchema>(ids: {
4
+ deployment: DeploymentId;
5
+ environment: EnvironmentId;
6
+ workspace: WorkspaceId;
7
+ }) => {
8
+ 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.";
9
+ readonly input: z.ZodObject<{
10
+ deployTarget: z.ZodOptional<z.ZodURL>;
11
+ environment: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
12
+ id: EnvironmentId;
13
+ }, z.core.$strict>, z.ZodObject<{
14
+ baseEphemeralEnvironment: z.ZodOptional<z.ZodString>;
15
+ ephemeral: z.ZodOptional<z.ZodBoolean>;
16
+ name: z.ZodString;
17
+ }, z.core.$strict>]>>;
18
+ environmentVariables: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
19
+ metadata: z.ZodOptional<z.ZodObject<{
20
+ commitSha: z.ZodOptional<z.ZodString>;
21
+ pullRequestNumber: z.ZodOptional<z.ZodNumber>;
22
+ ref: z.ZodOptional<z.ZodString>;
23
+ repository: z.ZodOptional<z.ZodString>;
24
+ }, z.core.$strict>>;
25
+ providerDeploymentId: z.ZodString;
26
+ status: z.ZodEnum<{
27
+ success: "success";
28
+ failure: "failure";
29
+ pending: "pending";
30
+ inactive: "inactive";
31
+ }>;
32
+ workspaceId: WorkspaceId;
33
+ }, z.core.$strict>;
34
+ readonly kind: "write";
35
+ readonly name: "deployment.reportStatus";
36
+ readonly output: z.ZodObject<{
37
+ deployment: z.ZodObject<{
38
+ id: DeploymentId;
39
+ status: z.ZodEnum<{
40
+ success: "success";
41
+ failure: "failure";
42
+ pending: "pending";
43
+ inactive: "inactive";
44
+ }>;
45
+ url: z.ZodURL;
46
+ }, z.core.$strip>;
47
+ }, z.core.$strip>;
48
+ };
49
+ //# sourceMappingURL=reportStatus.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reportStatus.d.ts","sourceRoot":"","sources":["../../../src/v1/deployment/reportStatus.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAYhD,eAAO,MAAM,kCAAkC,GAC7C,YAAY,SAAS,cAAc,EACnC,aAAa,SAAS,cAAc,EACpC,WAAW,SAAS,cAAc,EAClC,KAAK;IACL,UAAU,EAAE,YAAY,CAAC;IACzB,WAAW,EAAE,aAAa,CAAC;IAC3B,SAAS,EAAE,WAAW,CAAC;CACxB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwKA,CAAC"}
@@ -0,0 +1,138 @@
1
+ import { z } from "zod";
2
+ import { resource } from "../resource.js";
3
+ // Shared by the input status field and the output resource status field so
4
+ // adding a status to one cannot silently drift from the other.
5
+ const deploymentStatusSchema = z.enum([
6
+ "pending",
7
+ "success",
8
+ "failure",
9
+ "inactive",
10
+ ]);
11
+ export const makeReportDeploymentStatusContract = (ids) => {
12
+ // Exactly one selector, expressed as a union rather than a refinement so the
13
+ // shape itself rules out sending both. Strict branches matter: a loose
14
+ // `z.object` strips unknown keys, so `{ id, name }` would match the first
15
+ // branch and silently discard the name the caller sent.
16
+ const environment = z.union([
17
+ z.strictObject({
18
+ id: ids.environment.describe("The id of an existing environment. Never creates an environment. Send an alias through name instead."),
19
+ }),
20
+ z.strictObject({
21
+ baseEphemeralEnvironment: z
22
+ .string()
23
+ .trim()
24
+ .min(1)
25
+ .max(255)
26
+ .describe("The alias or name of the environment a created ephemeral environment copies from. Only valid with ephemeral. The server uses the team default base environment when no environment matches this value.")
27
+ .optional(),
28
+ ephemeral: z
29
+ .boolean()
30
+ .describe("Requests an ephemeral environment when the name creates one. A name that matches an existing environment keeps that environment's kind.")
31
+ .optional(),
32
+ name: z
33
+ .string()
34
+ .trim()
35
+ .min(1)
36
+ .max(255)
37
+ .describe("The provider deploy environment name. Resolves an environment by alias or name; creates one when no match exists."),
38
+ }),
39
+ ], {
40
+ error: "Send environment as either { id } or { name }, with optional ephemeral and baseEphemeralEnvironment.",
41
+ });
42
+ const metadata = z
43
+ .strictObject({
44
+ commitSha: z
45
+ .string()
46
+ .trim()
47
+ .min(1)
48
+ .max(255)
49
+ .describe("The commit sha of the deployed application revision.")
50
+ .optional(),
51
+ // The deployer knows its pull request, so this is more reliable than the
52
+ // code host lookup the server otherwise runs against `commitSha`.
53
+ pullRequestNumber: z
54
+ .number()
55
+ .int()
56
+ .positive()
57
+ .describe("The number of the pull request the deployment belongs to. Requires repository.")
58
+ .optional(),
59
+ ref: z
60
+ .string()
61
+ .trim()
62
+ .min(1)
63
+ .max(255)
64
+ .describe("The branch or ref that was deployed.")
65
+ .optional(),
66
+ repository: z
67
+ .string()
68
+ .trim()
69
+ .min(1)
70
+ .max(255)
71
+ .describe('The owner/name of the repository, e.g. "acme/web".')
72
+ .optional(),
73
+ })
74
+ // A pull request number names a pull request within one repository, so it
75
+ // cannot be resolved without one.
76
+ .refine((value) => value.pullRequestNumber === undefined || value.repository !== undefined, {
77
+ message: "repository is required when pullRequestNumber is provided.",
78
+ path: ["pullRequestNumber"],
79
+ });
80
+ const input = z
81
+ .strictObject({
82
+ deployTarget: z
83
+ .httpUrl()
84
+ .max(2048)
85
+ .describe("The URL the deployment serves, e.g. a preview URL.")
86
+ .optional(),
87
+ // A deployment stays bound to the environment resolved on its first
88
+ // report, so later reports may omit the selector. Report a promotion as a
89
+ // new deployment with a new providerDeploymentId.
90
+ environment: environment
91
+ .describe("Selects the environment the deployment reports into.")
92
+ .optional(),
93
+ environmentVariables: z
94
+ .record(z.string(), z.string())
95
+ .describe("Environment variable overrides for the runs this deployment requests. A report that omits this field keeps the stored values. A report that sends it replaces them.")
96
+ .optional(),
97
+ metadata: metadata
98
+ .describe("Code host details for the deployed revision.")
99
+ .optional(),
100
+ providerDeploymentId: z
101
+ .string()
102
+ .trim()
103
+ .min(1)
104
+ .max(255)
105
+ .describe('Your identifier for the deployment, e.g. "vercel_dpl_123". Reports with the same providerDeploymentId update one deployment within this workspace.'),
106
+ status: deploymentStatusSchema.describe("The deployment lifecycle status. A deployment's first success report evaluates global triggers asynchronously, and it is the only report that does. The response does not include the resulting runs."),
107
+ workspaceId: ids.workspace.describe("The workspace to report the deployment status into."),
108
+ })
109
+ // Only a created ephemeral environment copies from a base, so the field has
110
+ // no meaning without `ephemeral`. The selector union cannot express this
111
+ // without a third branch, which would make every validation failure read as
112
+ // a three-way union error.
113
+ .superRefine((value, context) => {
114
+ if (value.environment !== undefined &&
115
+ "name" in value.environment &&
116
+ value.environment.baseEphemeralEnvironment !== undefined &&
117
+ value.environment.ephemeral !== true) {
118
+ context.addIssue({
119
+ code: "custom",
120
+ message: "baseEphemeralEnvironment is only valid with ephemeral.",
121
+ path: ["environment", "baseEphemeralEnvironment"],
122
+ });
123
+ }
124
+ });
125
+ const deployment = resource({
126
+ id: ids.deployment,
127
+ status: deploymentStatusSchema.describe("The status reported in this request."),
128
+ }, { urlFieldDescription: "Absolute URL of the environment's runs page." });
129
+ const output = z.object({ deployment });
130
+ return {
131
+ 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.",
132
+ input,
133
+ kind: "write",
134
+ name: "deployment.reportStatus",
135
+ output,
136
+ };
137
+ };
138
+ //# sourceMappingURL=reportStatus.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reportStatus.js","sourceRoot":"","sources":["../../../src/v1/deployment/reportStatus.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE1C,2EAA2E;AAC3E,+DAA+D;AAC/D,MAAM,sBAAsB,GAAG,CAAC,CAAC,IAAI,CAAC;IACpC,SAAS;IACT,SAAS;IACT,SAAS;IACT,UAAU;CACX,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,kCAAkC,GAAG,CAIhD,GAID,EAAE,EAAE;IACH,6EAA6E;IAC7E,uEAAuE;IACvE,0EAA0E;IAC1E,wDAAwD;IACxD,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CACzB;QACE,CAAC,CAAC,YAAY,CAAC;YACb,EAAE,EAAE,GAAG,CAAC,WAAW,CAAC,QAAQ,CAC1B,sGAAsG,CACvG;SACF,CAAC;QACF,CAAC,CAAC,YAAY,CAAC;YACb,wBAAwB,EAAE,CAAC;iBACxB,MAAM,EAAE;iBACR,IAAI,EAAE;iBACN,GAAG,CAAC,CAAC,CAAC;iBACN,GAAG,CAAC,GAAG,CAAC;iBACR,QAAQ,CACP,wMAAwM,CACzM;iBACA,QAAQ,EAAE;YACb,SAAS,EAAE,CAAC;iBACT,OAAO,EAAE;iBACT,QAAQ,CAC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C,CAAC;QACL,CAAC;IACH,CAAC,CAAC,CAAC;IACL,MAAM,UAAU,GAAG,QAAQ,CACzB;QACE,EAAE,EAAE,GAAG,CAAC,UAAU;QAClB,MAAM,EAAE,sBAAsB,CAAC,QAAQ,CACrC,sCAAsC,CACvC;KACF,EACD,EAAE,mBAAmB,EAAE,8CAA8C,EAAE,CACxE,CAAC;IACF,MAAM,MAAM,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,UAAU,EAAE,CAAC,CAAC;IAExC,OAAO;QACL,WAAW,EACT,sdAAsd;QACxd,KAAK;QACL,IAAI,EAAE,OAAO;QACb,IAAI,EAAE,yBAAyB;QAC/B,MAAM;KAMP,CAAC;AACJ,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"listAddresses.d.ts","sourceRoot":"","sources":["../../../src/v1/email/listAddresses.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAMhD,eAAO,MAAM,8BAA8B,GACzC,WAAW,SAAS,cAAc,EAClC,KAAK;IACL,SAAS,EAAE,WAAW,CAAC;CACxB;;;;;;;;;;;;;;;;;CA6CA,CAAC"}
1
+ {"version":3,"file":"listAddresses.d.ts","sourceRoot":"","sources":["../../../src/v1/email/listAddresses.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAKhD,eAAO,MAAM,8BAA8B,GACzC,WAAW,SAAS,cAAc,EAClC,KAAK;IACL,SAAS,EAAE,WAAW,CAAC;CACxB;;;;;;;;;;;;;;;;;CA6BA,CAAC"}
@@ -1,7 +1,6 @@
1
1
  import { z } from "zod";
2
2
  import { makePaginationInputFields, nextCursorSchema } from "../pagination.js";
3
- import { resource } from "../resource.js";
4
- import { emailUrlFieldDescription } from "./resource.js";
3
+ import { makeEmailAddressResourceSchema } from "./resource.js";
5
4
  export const makeListEmailAddressesContract = (ids) => {
6
5
  const input = z.object({
7
6
  workspaceId: ids.workspace
@@ -11,14 +10,7 @@ export const makeListEmailAddressesContract = (ids) => {
11
10
  });
12
11
  const output = z.object({
13
12
  addresses: z
14
- .array(resource({
15
- address: z
16
- .string()
17
- .describe("The inbox address. Mail sent to any plus-suffixed form, such as inbox+abc@example.com, lands in the same inbox."),
18
- isDefault: z
19
- .boolean()
20
- .describe("Whether this is the workspace's default inbox address."),
21
- }, { urlFieldDescription: emailUrlFieldDescription }))
13
+ .array(makeEmailAddressResourceSchema())
22
14
  .describe("The workspace's permanent inbox addresses, alphabetical."),
23
15
  nextCursor: nextCursorSchema,
24
16
  });
@@ -1 +1 @@
1
- {"version":3,"file":"listAddresses.js","sourceRoot":"","sources":["../../../src/v1/email/listAddresses.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,OAAO,EAAE,yBAAyB,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAC/E,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE1C,OAAO,EAAE,wBAAwB,EAAE,MAAM,eAAe,CAAC;AAEzD,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAE5C,GAED,EAAE,EAAE;IACH,MAAM,KAAK,GAAG,CAAC,CAAC,MAAM,CAAC;QACrB,WAAW,EAAE,GAAG,CAAC,SAAS;aACvB,QAAQ,EAAE;aACV,QAAQ,CACP,iHAAiH,CAClH;QACH,GAAG,yBAAyB,CAAC,EAAE,YAAY,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC;KACjE,CAAC,CAAC;IACH,MAAM,MAAM,GAAG,CAAC,CAAC,MAAM,CAAC;QACtB,SAAS,EAAE,CAAC;aACT,KAAK,CACJ,QAAQ,CACN;YACE,OAAO,EAAE,CAAC;iBACP,MAAM,EAAE;iBAC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;KAMP,CAAC;AACJ,CAAC,CAAC"}
@@ -0,0 +1,19 @@
1
+ import { z } from "zod";
2
+ import type { PublicIdSchema } from "../ids.js";
3
+ export declare const makeRegisterEmailAddressContract: <WorkspaceId extends PublicIdSchema>(ids: {
4
+ workspace: WorkspaceId;
5
+ }) => {
6
+ readonly description: "Register an inbox address for the workspace. Registering an address the workspace already has changes nothing. A refusal names the domains the workspace can use.";
7
+ readonly input: z.ZodObject<{
8
+ address: z.ZodEmail;
9
+ workspaceId: z.ZodOptional<WorkspaceId>;
10
+ }, z.core.$strip>;
11
+ readonly kind: "write";
12
+ readonly name: "email.registerAddress";
13
+ readonly output: z.ZodObject<{
14
+ address: z.ZodString;
15
+ isDefault: z.ZodBoolean;
16
+ url: z.ZodURL;
17
+ }, z.core.$strip>;
18
+ };
19
+ //# sourceMappingURL=registerAddress.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registerAddress.d.ts","sourceRoot":"","sources":["../../../src/v1/email/registerAddress.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAWhD,eAAO,MAAM,gCAAgC,GAC3C,WAAW,SAAS,cAAc,EAClC,KAAK;IACL,SAAS,EAAE,WAAW,CAAC;CACxB;;;;;;;;;;;;;CAgCA,CAAC"}
@@ -0,0 +1,30 @@
1
+ import { z } from "zod";
2
+ import { makeEmailAddressResourceSchema } from "./resource.js";
3
+ // Mail to inbox+abc@example.com lands in the inbox@example.com inbox already.
4
+ // A registered plus form would never receive on its own.
5
+ const hasNoPlusSuffix = (address) => {
6
+ const [localPart] = address.split("@");
7
+ return localPart !== undefined && !localPart.includes("+");
8
+ };
9
+ export const makeRegisterEmailAddressContract = (ids) => {
10
+ const input = z.object({
11
+ address: z
12
+ .email()
13
+ .refine(hasNoPlusSuffix, {
14
+ message: "Register the base address. Mail to a plus-suffixed form lands in the base inbox.",
15
+ })
16
+ .describe("The inbox address to register. Its domain must be one QA Wolf serves for the workspace."),
17
+ workspaceId: ids.workspace
18
+ .optional()
19
+ .describe("The workspace to register the address in. Required when authenticating with an organization or user API key."),
20
+ });
21
+ const output = makeEmailAddressResourceSchema();
22
+ return {
23
+ description: "Register an inbox address for the workspace. Registering an address the workspace already has changes nothing. A refusal names the domains the workspace can use.",
24
+ input,
25
+ kind: "write",
26
+ name: "email.registerAddress",
27
+ output,
28
+ };
29
+ };
30
+ //# sourceMappingURL=registerAddress.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registerAddress.js","sourceRoot":"","sources":["../../../src/v1/email/registerAddress.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,OAAO,EAAE,8BAA8B,EAAE,MAAM,eAAe,CAAC;AAE/D,8EAA8E;AAC9E,yDAAyD;AACzD,MAAM,eAAe,GAAG,CAAC,OAAe,EAAE,EAAE;IAC1C,MAAM,CAAC,SAAS,CAAC,GAAG,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACvC,OAAO,SAAS,KAAK,SAAS,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;AAC7D,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,gCAAgC,GAAG,CAE9C,GAED,EAAE,EAAE;IACH,MAAM,KAAK,GAAG,CAAC,CAAC,MAAM,CAAC;QACrB,OAAO,EAAE,CAAC;aACP,KAAK,EAAE;aACP,MAAM,CAAC,eAAe,EAAE;YACvB,OAAO,EACL,kFAAkF;SACrF,CAAC;aACD,QAAQ,CACP,yFAAyF,CAC1F;QACH,WAAW,EAAE,GAAG,CAAC,SAAS;aACvB,QAAQ,EAAE;aACV,QAAQ,CACP,8GAA8G,CAC/G;KACJ,CAAC,CAAC;IACH,MAAM,MAAM,GAAG,8BAA8B,EAAE,CAAC;IAEhD,OAAO;QACL,WAAW,EACT,mKAAmK;QACrK,KAAK;QACL,IAAI,EAAE,OAAO;QACb,IAAI,EAAE,uBAAuB;QAC7B,MAAM;KAMP,CAAC;AACJ,CAAC,CAAC"}
@@ -64,4 +64,9 @@ export declare const makeEmailResourceSchema: () => z.ZodObject<{
64
64
  }, z.core.$strip>>;
65
65
  url: z.ZodURL;
66
66
  }, z.core.$strip>;
67
+ export declare const makeEmailAddressResourceSchema: () => z.ZodObject<{
68
+ address: z.ZodString;
69
+ isDefault: z.ZodBoolean;
70
+ url: z.ZodURL;
71
+ }, z.core.$strip>;
67
72
  //# sourceMappingURL=resource.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"resource.d.ts","sourceRoot":"","sources":["../../../src/v1/email/resource.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,oBAAoB;;;EAAkC,CAAC;AAEpE,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAIlE,eAAO,MAAM,kBAAkB;;;iBAM7B,CAAC;AAIH,eAAO,MAAM,wBAAwB,wEACkC,CAAC;AAIxE,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;CAgBjC,CAAC;AAEH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAkCjC,CAAC"}
1
+ {"version":3,"file":"resource.d.ts","sourceRoot":"","sources":["../../../src/v1/email/resource.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,oBAAoB;;;EAAkC,CAAC;AAEpE,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAIlE,eAAO,MAAM,kBAAkB;;;iBAM7B,CAAC;AAIH,eAAO,MAAM,wBAAwB,wEACkC,CAAC;AAIxE,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;CAgBjC,CAAC;AAEH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAkCjC,CAAC;AAIJ,eAAO,MAAM,8BAA8B;;;;iBAaxC,CAAC"}
@@ -53,4 +53,14 @@ export const makeEmailResourceSchema = () => resource({
53
53
  replyTo: z.array(namedAddressSchema).optional(),
54
54
  text: z.string().optional().describe("The plain text body."),
55
55
  }, { urlFieldDescription: emailUrlFieldDescription });
56
+ // email.listAddresses returns these rows and email.registerAddress returns
57
+ // one. One factory keeps the two shapes from drifting.
58
+ export const makeEmailAddressResourceSchema = () => resource({
59
+ address: z
60
+ .string()
61
+ .describe("The inbox address. Mail sent to any plus-suffixed form, such as inbox+abc@example.com, lands in the same inbox."),
62
+ isDefault: z
63
+ .boolean()
64
+ .describe("Whether this is the workspace's default inbox address."),
65
+ }, { urlFieldDescription: emailUrlFieldDescription });
56
66
  //# sourceMappingURL=resource.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"resource.js","sourceRoot":"","sources":["../../../src/v1/email/resource.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE1C,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC,CAAC;AAIpE,4EAA4E;AAC5E,wEAAwE;AACxE,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC;IACzC,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,oBAAoB,CAAC;IAClD,IAAI,EAAE,CAAC;SACJ,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CAAC,iDAAiD,CAAC;CAC/D,CAAC,CAAC;AAEH,8EAA8E;AAC9E,8CAA8C;AAC9C,MAAM,CAAC,MAAM,wBAAwB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Q,CACP,0JAA0J,CAC3J;IACH,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAAC,QAAQ,EAAE;IAC/C,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,sBAAsB,CAAC;CAC7D,EACD,EAAE,mBAAmB,EAAE,wBAAwB,EAAE,CAClD,CAAC;AAEJ,2EAA2E;AAC3E,uDAAuD;AACvD,MAAM,CAAC,MAAM,8BAA8B,GAAG,GAAG,EAAE,CACjD,QAAQ,CACN;IACE,OAAO,EAAE,CAAC;SACP,MAAM,EAAE;SACR,QAAQ,CACP,iHAAiH,CAClH;IACH,SAAS,EAAE,CAAC;SACT,OAAO,EAAE;SACT,QAAQ,CAAC,wDAAwD,CAAC;CACtE,EACD,EAAE,mBAAmB,EAAE,wBAAwB,EAAE,CAClD,CAAC"}
@@ -22,7 +22,7 @@ export type PublicApiOutput<Api extends AnyPublicApiContract> = z.infer<Api["out
22
22
  export declare const makeContractsV1: <EnvironmentId extends PublicIdSchema, FlowId extends PublicIdSchema, RunId extends PublicIdSchema, AutomationId extends PublicIdSchema = PublicIdSchema, IssueId extends PublicIdSchema = PublicIdSchema, WorkspaceId extends PublicIdSchema = PublicIdSchema, AiTaskId extends PublicIdSchema = PublicIdSchema, ChatSessionId extends PublicIdSchema = PublicIdSchema>(ids: PublicIdSchemasOf<EnvironmentId, FlowId, RunId, AutomationId, IssueId, WorkspaceId, AiTaskId, ChatSessionId>) => {
23
23
  agent: {
24
24
  get: {
25
- readonly description: "Read what the QA Wolf AI has said and whether it is still working. Poll this after agent.send until the status settles. A status of \"waiting-for-you\" means the last reply is a question the work is blocked on, and answering it with agent.send is what unblocks it. Replies accumulate, so a caller that polls repeatedly sees the earlier ones again.";
25
+ readonly description: "Monitor a QA Wolf AI session by reading its status and replies. After agent.send, share the returned session URL before monitoring. Wait 30 to 60 seconds between checks; do not call this in a tight loop. Replies accumulate, so compare them with what you have already seen. Continue monitoring silently when the status and replies are unchanged; do not narrate waiting, announce the next check, or ask whether to keep monitoring. Report only substantive new progress, questions, blockers, or the final outcome. A status of \"waiting-for-you\" means the last reply is a question the work is blocked on, and answering it with agent.send is what unblocks it. Surface an explicit request for user input even if the status still says \"working\". Include the session URL when reporting a blocker or final outcome. On \"completed\", stop status checks and verify the requested result before claiming success. For new flows, validation, publication in the target environment, and readiness are separate checks; a Git push or final reply does not prove the flow is active. If every requested result is verified but status remains \"working\", report the mismatch and stop monitoring. Stop on \"failed\" or \"cancelled\" and report any confirmed partial result.";
26
26
  readonly input: z.ZodObject<{
27
27
  sessionId: ChatSessionId;
28
28
  }, z.core.$strip>;
@@ -46,7 +46,7 @@ export declare const makeContractsV1: <EnvironmentId extends PublicIdSchema, Flo
46
46
  }, z.core.$strip>;
47
47
  };
48
48
  send: {
49
- readonly description: "Ask the QA Wolf AI to do a piece of work in plain language, such as covering a user journey, investigating a failing run, or fixing a broken flow. This is the one verb that starts work from nothing: every other write acts on a flow, run or issue that already exists. Answers as soon as the request is accepted, with the id to follow it by, because the work runs for minutes to tens of minutes. Poll agent.get for progress, and send here again to answer a question or add context to work already running.";
49
+ readonly description: "Start or continue work with the QA Wolf AI and return a live session URL to share with the user. Use it to cover a user journey, investigate a failing run, or fix a broken flow. This is the one verb that starts work from nothing: every other write acts on a flow, run or issue that already exists. Returns sessionId, status, and url as soon as the request is accepted; work can take minutes to tens of minutes. After each send, make the next action a normal user-visible assistant message containing the exact returned url, before any tool call or wait. Tool output and internal reasoning do not count as sharing the link. Do not run a timer or monitoring call alongside this send. Acceptance does not mean the work is complete. Then monitor the session with agent.get, reporting new progress, blockers, and the final outcome rather than unchanged status. Send here again to answer a question or add context to the same session.";
50
50
  readonly input: z.ZodObject<{
51
51
  environmentId: z.ZodOptional<PublicIdSchema>;
52
52
  message: z.ZodString;
@@ -204,6 +204,20 @@ export declare const makeContractsV1: <EnvironmentId extends PublicIdSchema, Flo
204
204
  nextCursor: z.ZodOptional<z.ZodString>;
205
205
  }, z.core.$strip>;
206
206
  };
207
+ registerAddress: {
208
+ readonly description: "Register an inbox address for the workspace. Registering an address the workspace already has changes nothing. A refusal names the domains the workspace can use.";
209
+ readonly input: z.ZodObject<{
210
+ address: z.ZodEmail;
211
+ workspaceId: z.ZodOptional<WorkspaceId>;
212
+ }, z.core.$strip>;
213
+ readonly kind: "write";
214
+ readonly name: "email.registerAddress";
215
+ readonly output: z.ZodObject<{
216
+ address: z.ZodString;
217
+ isDefault: z.ZodBoolean;
218
+ url: z.ZodURL;
219
+ }, z.core.$strip>;
220
+ };
207
221
  send: {
208
222
  readonly description: "Send an email from one of the workspace's inbox addresses, for example to exercise a flow that reacts to incoming mail. Returns the sent email; read it back with email.get.";
209
223
  readonly input: z.ZodObject<{
@@ -1111,6 +1125,23 @@ export declare const makeContractsV1: <EnvironmentId extends PublicIdSchema, Flo
1111
1125
  url: z.ZodURL;
1112
1126
  }, z.core.$strip>;
1113
1127
  };
1128
+ stop: {
1129
+ readonly description: "Stop a run, including its queued flows and automatic retries. Stopping is asynchronous. 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.";
1130
+ readonly input: z.ZodObject<{
1131
+ runId: RunId;
1132
+ }, z.core.$strip>;
1133
+ readonly kind: "write";
1134
+ readonly name: "run.stop";
1135
+ readonly output: z.ZodObject<{
1136
+ runId: RunId;
1137
+ status: z.ZodEnum<{
1138
+ accepted: "accepted";
1139
+ "already-finished": "already-finished";
1140
+ "execution-not-found": "execution-not-found";
1141
+ }>;
1142
+ url: z.ZodURL;
1143
+ }, z.core.$strip>;
1144
+ };
1114
1145
  };
1115
1146
  runner: {
1116
1147
  evaluateSnippet: {
@@ -1487,7 +1518,7 @@ export declare const makeContractsV1: <EnvironmentId extends PublicIdSchema, Flo
1487
1518
  }, z.core.$strip>;
1488
1519
  };
1489
1520
  performAction: {
1490
- 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.";
1521
+ 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. With `withScreenshot: true`, the answer also carries `imageJpegBase64`: a screenshot taken after the action, once the screen has changed from just before it or half a second has passed, whichever comes first. One call instead of `runner.performAction` followed by `runner.takeScreenshot`, with no fixed wait in between. Anything animating on the page counts as a change. The action itself is performed exactly as without the option; if the screen could serve no frame after it — a display restart, or a `navigate` on a desktop that is still starting — the action's result comes back without `imageJpegBase64`, so take a screenshot separately rather than repeating the action. On a mobile runner the screenshot is the device's own, taken right after a performed action. `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.";
1491
1522
  readonly input: z.ZodObject<{
1492
1523
  action: z.ZodDiscriminatedUnion<[z.ZodObject<{
1493
1524
  button: z.ZodLiteral<"left" | "right" | "wheel" | "back" | "forward">;
@@ -1525,15 +1556,18 @@ export declare const makeContractsV1: <EnvironmentId extends PublicIdSchema, Flo
1525
1556
  type: z.ZodLiteral<"type">;
1526
1557
  }, z.core.$strict>], "type">;
1527
1558
  id: z.ZodString;
1559
+ withScreenshot: z.ZodOptional<z.ZodBoolean>;
1528
1560
  workspaceId: z.ZodOptional<WorkspaceId>;
1529
1561
  }, z.core.$strip>;
1530
1562
  readonly kind: "write";
1531
1563
  readonly name: "runner.performAction";
1532
1564
  readonly output: z.ZodDiscriminatedUnion<[z.ZodObject<{
1565
+ imageJpegBase64: z.ZodOptional<z.ZodString>;
1533
1566
  outcome: z.ZodLiteral<"success">;
1534
1567
  }, z.core.$strip>, z.ZodDiscriminatedUnion<[z.ZodObject<{
1535
1568
  errorMessage: z.ZodString;
1536
1569
  failureReason: z.ZodLiteral<"action-failed">;
1570
+ imageJpegBase64: z.ZodOptional<z.ZodString>;
1537
1571
  outcome: z.ZodLiteral<"failure">;
1538
1572
  }, z.core.$strip>, z.ZodObject<{
1539
1573
  failureReason: z.ZodEnum<{
@@ -1741,7 +1775,7 @@ export declare const makeContractsV1: <EnvironmentId extends PublicIdSchema, Flo
1741
1775
  export declare const publicContractsV1: {
1742
1776
  agent: {
1743
1777
  get: {
1744
- readonly description: "Read what the QA Wolf AI has said and whether it is still working. Poll this after agent.send until the status settles. A status of \"waiting-for-you\" means the last reply is a question the work is blocked on, and answering it with agent.send is what unblocks it. Replies accumulate, so a caller that polls repeatedly sees the earlier ones again.";
1778
+ readonly description: "Monitor a QA Wolf AI session by reading its status and replies. After agent.send, share the returned session URL before monitoring. Wait 30 to 60 seconds between checks; do not call this in a tight loop. Replies accumulate, so compare them with what you have already seen. Continue monitoring silently when the status and replies are unchanged; do not narrate waiting, announce the next check, or ask whether to keep monitoring. Report only substantive new progress, questions, blockers, or the final outcome. A status of \"waiting-for-you\" means the last reply is a question the work is blocked on, and answering it with agent.send is what unblocks it. Surface an explicit request for user input even if the status still says \"working\". Include the session URL when reporting a blocker or final outcome. On \"completed\", stop status checks and verify the requested result before claiming success. For new flows, validation, publication in the target environment, and readiness are separate checks; a Git push or final reply does not prove the flow is active. If every requested result is verified but status remains \"working\", report the mismatch and stop monitoring. Stop on \"failed\" or \"cancelled\" and report any confirmed partial result.";
1745
1779
  readonly input: z.ZodObject<{
1746
1780
  sessionId: PublicIdSchema;
1747
1781
  }, z.core.$strip>;
@@ -1765,7 +1799,7 @@ export declare const publicContractsV1: {
1765
1799
  }, z.core.$strip>;
1766
1800
  };
1767
1801
  send: {
1768
- readonly description: "Ask the QA Wolf AI to do a piece of work in plain language, such as covering a user journey, investigating a failing run, or fixing a broken flow. This is the one verb that starts work from nothing: every other write acts on a flow, run or issue that already exists. Answers as soon as the request is accepted, with the id to follow it by, because the work runs for minutes to tens of minutes. Poll agent.get for progress, and send here again to answer a question or add context to work already running.";
1802
+ readonly description: "Start or continue work with the QA Wolf AI and return a live session URL to share with the user. Use it to cover a user journey, investigate a failing run, or fix a broken flow. This is the one verb that starts work from nothing: every other write acts on a flow, run or issue that already exists. Returns sessionId, status, and url as soon as the request is accepted; work can take minutes to tens of minutes. After each send, make the next action a normal user-visible assistant message containing the exact returned url, before any tool call or wait. Tool output and internal reasoning do not count as sharing the link. Do not run a timer or monitoring call alongside this send. Acceptance does not mean the work is complete. Then monitor the session with agent.get, reporting new progress, blockers, and the final outcome rather than unchanged status. Send here again to answer a question or add context to the same session.";
1769
1803
  readonly input: z.ZodObject<{
1770
1804
  environmentId: z.ZodOptional<PublicIdSchema>;
1771
1805
  message: z.ZodString;
@@ -1923,6 +1957,20 @@ export declare const publicContractsV1: {
1923
1957
  nextCursor: z.ZodOptional<z.ZodString>;
1924
1958
  }, z.core.$strip>;
1925
1959
  };
1960
+ registerAddress: {
1961
+ readonly description: "Register an inbox address for the workspace. Registering an address the workspace already has changes nothing. A refusal names the domains the workspace can use.";
1962
+ readonly input: z.ZodObject<{
1963
+ address: z.ZodEmail;
1964
+ workspaceId: z.ZodOptional<PublicIdSchema>;
1965
+ }, z.core.$strip>;
1966
+ readonly kind: "write";
1967
+ readonly name: "email.registerAddress";
1968
+ readonly output: z.ZodObject<{
1969
+ address: z.ZodString;
1970
+ isDefault: z.ZodBoolean;
1971
+ url: z.ZodURL;
1972
+ }, z.core.$strip>;
1973
+ };
1926
1974
  send: {
1927
1975
  readonly description: "Send an email from one of the workspace's inbox addresses, for example to exercise a flow that reacts to incoming mail. Returns the sent email; read it back with email.get.";
1928
1976
  readonly input: z.ZodObject<{
@@ -2830,6 +2878,23 @@ export declare const publicContractsV1: {
2830
2878
  url: z.ZodURL;
2831
2879
  }, z.core.$strip>;
2832
2880
  };
2881
+ stop: {
2882
+ readonly description: "Stop a run, including its queued flows and automatic retries. Stopping is asynchronous. 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.";
2883
+ readonly input: z.ZodObject<{
2884
+ runId: PublicIdSchema;
2885
+ }, z.core.$strip>;
2886
+ readonly kind: "write";
2887
+ readonly name: "run.stop";
2888
+ readonly output: z.ZodObject<{
2889
+ runId: PublicIdSchema;
2890
+ status: z.ZodEnum<{
2891
+ accepted: "accepted";
2892
+ "already-finished": "already-finished";
2893
+ "execution-not-found": "execution-not-found";
2894
+ }>;
2895
+ url: z.ZodURL;
2896
+ }, z.core.$strip>;
2897
+ };
2833
2898
  };
2834
2899
  runner: {
2835
2900
  evaluateSnippet: {
@@ -3206,7 +3271,7 @@ export declare const publicContractsV1: {
3206
3271
  }, z.core.$strip>;
3207
3272
  };
3208
3273
  performAction: {
3209
- 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.";
3274
+ 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. With `withScreenshot: true`, the answer also carries `imageJpegBase64`: a screenshot taken after the action, once the screen has changed from just before it or half a second has passed, whichever comes first. One call instead of `runner.performAction` followed by `runner.takeScreenshot`, with no fixed wait in between. Anything animating on the page counts as a change. The action itself is performed exactly as without the option; if the screen could serve no frame after it — a display restart, or a `navigate` on a desktop that is still starting — the action's result comes back without `imageJpegBase64`, so take a screenshot separately rather than repeating the action. On a mobile runner the screenshot is the device's own, taken right after a performed action. `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.";
3210
3275
  readonly input: z.ZodObject<{
3211
3276
  action: z.ZodDiscriminatedUnion<[z.ZodObject<{
3212
3277
  button: z.ZodLiteral<"left" | "right" | "wheel" | "back" | "forward">;
@@ -3244,15 +3309,18 @@ export declare const publicContractsV1: {
3244
3309
  type: z.ZodLiteral<"type">;
3245
3310
  }, z.core.$strict>], "type">;
3246
3311
  id: z.ZodString;
3312
+ withScreenshot: z.ZodOptional<z.ZodBoolean>;
3247
3313
  workspaceId: z.ZodOptional<PublicIdSchema>;
3248
3314
  }, z.core.$strip>;
3249
3315
  readonly kind: "write";
3250
3316
  readonly name: "runner.performAction";
3251
3317
  readonly output: z.ZodDiscriminatedUnion<[z.ZodObject<{
3318
+ imageJpegBase64: z.ZodOptional<z.ZodString>;
3252
3319
  outcome: z.ZodLiteral<"success">;
3253
3320
  }, z.core.$strip>, z.ZodDiscriminatedUnion<[z.ZodObject<{
3254
3321
  errorMessage: z.ZodString;
3255
3322
  failureReason: z.ZodLiteral<"action-failed">;
3323
+ imageJpegBase64: z.ZodOptional<z.ZodString>;
3256
3324
  outcome: z.ZodLiteral<"failure">;
3257
3325
  }, z.core.$strip>, z.ZodObject<{
3258
3326
  failureReason: z.ZodEnum<{
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/v1/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAE7B,OAAO,EACL,KAAK,kBAAkB,EACvB,wBAAwB,GACzB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,KAAK,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAC/E,YAAY,EACV,oBAAoB,EACpB,iBAAiB,EACjB,qBAAqB,GACtB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,KAAK,cAAc,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAChF,OAAO,EAAE,KAAK,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAC9E,OAAO,EACL,KAAK,6BAA6B,EAClC,6BAA6B,GAC9B,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,eAAe,EACpB,gBAAgB,GACjB,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;AACzD,cAAc,sBAAsB,CAAC;AAKrC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAoC,CAAC"}
package/dist/v1/index.js CHANGED
@@ -13,6 +13,7 @@ import { makeFindEmailsContract } from "./email/find.js";
13
13
  import { makeGetEmailContract } from "./email/get.js";
14
14
  import { makeGetEmailAttachmentContract } from "./email/getAttachment.js";
15
15
  import { makeListEmailAddressesContract } from "./email/listAddresses.js";
16
+ import { makeRegisterEmailAddressContract } from "./email/registerAddress.js";
16
17
  import { makeSendEmailContract } from "./email/send.js";
17
18
  import { makeDeleteEnvironmentVariableContract } from "./environment/deleteVariable.js";
18
19
  import { makeFindEnvironmentsContract } from "./environment/find.js";
@@ -34,6 +35,7 @@ import { makeFindRunsContract } from "./run/find.js";
34
35
  import { makeGetRunContract } from "./run/get.js";
35
36
  import { makeCreateRunContract } from "./run/index.js";
36
37
  import { makeReattemptRunContract } from "./run/reattempt.js";
38
+ import { makeStopRunContract } from "./run/stop.js";
37
39
  import { makeEvaluateSnippetOnRunnerContract } from "./runner/evaluateSnippet.js";
38
40
  import { makeGetRunnerContract } from "./runner/get.js";
39
41
  import { makeHighlightSelectorOnRunnerContract } from "./runner/highlightSelector.js";
@@ -72,6 +74,7 @@ export const makeContractsV1 = (ids) => {
72
74
  get: makeGetEmailContract(resolvedIds),
73
75
  getAttachment: makeGetEmailAttachmentContract(resolvedIds),
74
76
  listAddresses: makeListEmailAddressesContract(resolvedIds),
77
+ registerAddress: makeRegisterEmailAddressContract(resolvedIds),
75
78
  send: makeSendEmailContract(resolvedIds),
76
79
  },
77
80
  environment: {
@@ -104,6 +107,7 @@ export const makeContractsV1 = (ids) => {
104
107
  find: makeFindRunsContract(resolvedIds),
105
108
  get: makeGetRunContract(resolvedIds),
106
109
  reattempt: makeReattemptRunContract(resolvedIds),
110
+ stop: makeStopRunContract(resolvedIds),
107
111
  },
108
112
  runner: {
109
113
  evaluateSnippet: makeEvaluateSnippetOnRunnerContract(resolvedIds),
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/v1/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,wBAAwB,GACzB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAA2B,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAM/E,OAAO,EAAuB,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAChF,OAAO,EAAyB,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAC9E,OAAO,EAEL,6BAA6B,GAC9B,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAGL,gBAAgB,GACjB,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;AACzD,cAAc,s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AC;SACvC;QACD,MAAM,EAAE;YACN,eAAe,EAAE,mCAAmC,CAAC,WAAW,CAAC;YACjE,GAAG,EAAE,qBAAqB,CAAC,WAAW,CAAC;YACvC,iBAAiB,EAAE,qCAAqC,CAAC,WAAW,CAAC;YACrE,aAAa,EAAE,iCAAiC,CAAC,WAAW,CAAC;YAC7D,OAAO,EAAE,2BAA2B,CAAC,WAAW,CAAC;YACjD,aAAa,EAAE,iCAAiC,CAAC,WAAW,CAAC;YAC7D,MAAM,EAAE,wBAAwB,CAAC,WAAW,CAAC;YAC7C,IAAI,EAAE,uBAAuB,CAAC,WAAW,CAAC;YAC1C,aAAa,EAAE,iCAAiC,CAAC,WAAW,CAAC;YAC7D,eAAe,EAAE,mCAAmC,CAAC,WAAW,CAAC;YACjE,WAAW,EAAE,6BAA6B,CAAC,WAAW,CAAC;YACvD,OAAO,EAAE,2BAA2B,CAAC,WAAW,CAAC;YACjD,OAAO,EAAE,2BAA2B,CAAC,WAAW,CAAC;YACjD,cAAc,EAAE,kCAAkC,CAAC,WAAW,CAAC;YAC/D,SAAS,EAAE,2BAA2B,CAAC,WAAW,CAAC;SACpD;QACD,GAAG,EAAE;YACH,MAAM,EAAE,qBAAqB,CAAC,WAAW,CAAC;YAC1C,IAAI,EAAE,oBAAoB,CAAC,WAAW,CAAC;SACxC;KACF,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAG,eAAe,CAAC,gBAAgB,CAAC,CAAC"}
@@ -0,0 +1,22 @@
1
+ import { z } from "zod";
2
+ import type { PublicIdSchema } from "../ids.js";
3
+ export declare const makeStopRunContract: <RunId extends PublicIdSchema>(ids: {
4
+ run: RunId;
5
+ }) => {
6
+ readonly description: "Stop a run, including its queued flows and automatic retries. Stopping is asynchronous. 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.";
7
+ readonly input: z.ZodObject<{
8
+ runId: RunId;
9
+ }, z.core.$strip>;
10
+ readonly kind: "write";
11
+ readonly name: "run.stop";
12
+ readonly output: z.ZodObject<{
13
+ runId: RunId;
14
+ status: z.ZodEnum<{
15
+ accepted: "accepted";
16
+ "already-finished": "already-finished";
17
+ "execution-not-found": "execution-not-found";
18
+ }>;
19
+ url: z.ZodURL;
20
+ }, z.core.$strip>;
21
+ };
22
+ //# sourceMappingURL=stop.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stop.d.ts","sourceRoot":"","sources":["../../../src/v1/run/stop.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAGhD,eAAO,MAAM,mBAAmB,GAAI,KAAK,SAAS,cAAc,EAAE,KAAK;IACrE,GAAG,EAAE,KAAK,CAAC;CACZ;;;;;;;;;;;;;;;;CA2BA,CAAC"}
@@ -0,0 +1,19 @@
1
+ import { z } from "zod";
2
+ import { resource } from "../resource.js";
3
+ export const makeStopRunContract = (ids) => {
4
+ const input = z.object({ runId: ids.run });
5
+ const output = resource({
6
+ runId: ids.run,
7
+ status: z
8
+ .enum(["accepted", "already-finished", "execution-not-found"])
9
+ .describe('"accepted" means stopping was requested; poll run.get for the final result. "already-finished" means the run has already finished and its result is unchanged. "execution-not-found" means the run exists but no execution was found to stop; it may still be starting or may no longer be available. No stop request was accepted in that case.'),
10
+ }, { urlFieldDescription: "Absolute URL of the run page." });
11
+ return {
12
+ description: "Stop a run, including its queued flows and automatic retries. Stopping is asynchronous. 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.",
13
+ input,
14
+ kind: "write",
15
+ name: "run.stop",
16
+ output,
17
+ };
18
+ };
19
+ //# sourceMappingURL=stop.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stop.js","sourceRoot":"","sources":["../../../src/v1/run/stop.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE1C,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAA+B,GAEjE,EAAE,EAAE;IACH,MAAM,KAAK,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,GAAG,CAAC,GAAG,EAAE,CAAC,CAAC;IAC3C,MAAM,MAAM,GAAG,QAAQ,CACrB;QACE,KAAK,EAAE,GAAG,CAAC,GAAG;QACd,MAAM,EAAE,CAAC;aACN,IAAI,CAAC,CAAC,UAAU,EAAE,kBAAkB,EAAE,qBAAqB,CAAC,CAAC;aAC7D,QAAQ,CACP,kVAAkV,CACnV;KACJ,EACD,EAAE,mBAAmB,EAAE,+BAA+B,EAAE,CACzD,CAAC;IAEF,OAAO;QACL,WAAW,EACT,iUAAiU;QACnU,KAAK;QACL,IAAI,EAAE,OAAO;QACb,IAAI,EAAE,UAAU;QAChB,MAAM;KAMP,CAAC;AACJ,CAAC,CAAC"}
@@ -51,7 +51,11 @@ export declare const journalStreamSchema: z.ZodString;
51
51
  * `sinceSequence` nor `tail`, the read starts from the oldest available entry.
52
52
  */
53
53
  export type ReadJournalRequest = {
54
- /** Restrict run-scoped streams (run-events, run-logs, run-status) to one run. */
54
+ /**
55
+ * Keep only entries stamped with this run's id. Every known stream stamps what
56
+ * happens while a run is in flight; `console` and `recorder` entries made
57
+ * outside any run carry none and match no `runId`.
58
+ */
55
59
  runId?: string;
56
60
  /** Entries strictly after this sequence. Omitted: from the oldest available. */
57
61
  sinceSequence?: number;
@@ -1 +1 @@
1
- {"version":3,"file":"journal.d.ts","sourceRoot":"","sources":["../../../src/v1/runner/journal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;GAIG;AAEH,qDAAqD;AACrD,MAAM,MAAM,YAAY,CAAC,OAAO,IAAI;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 1000;
5
5
  export declare const makePerformActionOnRunnerContract: <WorkspaceId extends PublicIdSchema>(ids: {
6
6
  workspace: WorkspaceId;
7
7
  }) => {
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.";
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. With `withScreenshot: true`, the answer also carries `imageJpegBase64`: a screenshot taken after the action, once the screen has changed from just before it or half a second has passed, whichever comes first. One call instead of `runner.performAction` followed by `runner.takeScreenshot`, with no fixed wait in between. Anything animating on the page counts as a change. The action itself is performed exactly as without the option; if the screen could serve no frame after it — a display restart, or a `navigate` on a desktop that is still starting — the action's result comes back without `imageJpegBase64`, so take a screenshot separately rather than repeating the action. On a mobile runner the screenshot is the device's own, taken right after a performed action. `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.";
9
9
  readonly input: z.ZodObject<{
10
10
  action: z.ZodDiscriminatedUnion<[z.ZodObject<{
11
11
  button: z.ZodLiteral<"left" | "right" | "wheel" | "back" | "forward">;
@@ -43,15 +43,18 @@ export declare const makePerformActionOnRunnerContract: <WorkspaceId extends Pub
43
43
  type: z.ZodLiteral<"type">;
44
44
  }, z.core.$strict>], "type">;
45
45
  id: z.ZodString;
46
+ withScreenshot: z.ZodOptional<z.ZodBoolean>;
46
47
  workspaceId: z.ZodOptional<WorkspaceId>;
47
48
  }, z.core.$strip>;
48
49
  readonly kind: "write";
49
50
  readonly name: "runner.performAction";
50
51
  readonly output: z.ZodDiscriminatedUnion<[z.ZodObject<{
52
+ imageJpegBase64: z.ZodOptional<z.ZodString>;
51
53
  outcome: z.ZodLiteral<"success">;
52
54
  }, z.core.$strip>, z.ZodDiscriminatedUnion<[z.ZodObject<{
53
55
  errorMessage: z.ZodString;
54
56
  failureReason: z.ZodLiteral<"action-failed">;
57
+ imageJpegBase64: z.ZodOptional<z.ZodString>;
55
58
  outcome: z.ZodLiteral<"failure">;
56
59
  }, z.core.$strip>, z.ZodObject<{
57
60
  failureReason: z.ZodEnum<{
@@ -1 +1 @@
1
- {"version":3,"file":"performAction.d.ts","sourceRoot":"","sources":["../../../src/v1/runner/performAction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;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
+ {"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;AAwBhD,uDAAuD;AACvD,eAAO,MAAM,2BAA2B,OAAQ,CAAC;AAEjD,eAAO,MAAM,iCAAiC,GAC5C,WAAW,SAAS,cAAc,EAClC,KAAK;IACL,SAAS,EAAE,WAAW,CAAC;CACxB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0DA,CAAC"}
@@ -2,22 +2,28 @@ import { z } from "zod";
2
2
  import { browserActionSchema } from "./browserAction.js";
3
3
  import { runnerIdSchema, runnerWorkspaceIdDescription } from "./identity.js";
4
4
  import { makeRunnerFailureSchema } from "./outcome.js";
5
- import { runnerHasNoScreenDescription, screenFailureReasons, screenNotReadyDescription, } from "./screen.js";
5
+ import { runnerHasNoScreenDescription, screenFailureReasons, screenNotReadyDescription, screenshotImageSchema, } from "./screen.js";
6
6
  import { runnerUnreachableFailureReason } from "./unreachable.js";
7
7
  // Not the shared retryable wording: the action may have taken effect before its
8
8
  // answer was lost.
9
9
  const unreachableDescription = "`runner-unreachable` if the runner could not be reached: it may still be starting, it may have terminated after inactivity, or it may have stopped answering mid-action. This does not mean the action was not performed — take a screenshot before repeating it.";
10
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
+ const withScreenshotDescription = "With `withScreenshot: true`, the answer also carries `imageJpegBase64`: a screenshot taken after the action, once the screen has changed from just before it or half a second has passed, whichever comes first. One call instead of `runner.performAction` followed by `runner.takeScreenshot`, with no fixed wait in between. Anything animating on the page counts as a change. The action itself is performed exactly as without the option; if the screen could serve no frame after it — a display restart, or a `navigate` on a desktop that is still starting — the action's result comes back without `imageJpegBase64`, so take a screenshot separately rather than repeating the action. On a mobile runner the screenshot is the device's own, taken right after a performed action.";
11
12
  /** How much of a failure reason this API passes on. */
12
13
  export const maxActionErrorMessageLength = 1_000;
13
14
  export const makePerformActionOnRunnerContract = (ids) => {
14
15
  const input = z.object({
15
16
  action: browserActionSchema.describe("The action to perform. Coordinates are pixels on the screenshot's own coordinate space."),
16
17
  id: runnerIdSchema.describe("Id of the runner to act on."),
18
+ withScreenshot: z
19
+ .boolean()
20
+ .optional()
21
+ .describe("Also answer with a screenshot taken after the action, once the screen has changed or half a second has passed. Saves the separate `runner.takeScreenshot` call and its fixed wait."),
17
22
  workspaceId: ids.workspace
18
23
  .optional()
19
24
  .describe(runnerWorkspaceIdDescription),
20
25
  });
26
+ const screenshotAfterAction = screenshotImageSchema.optional();
21
27
  // `action-failed` is the one reason that carries a message, so it is an arm of
22
28
  // its own and the other reasons share theirs.
23
29
  const failure = z.discriminatedUnion("failureReason", [
@@ -27,6 +33,7 @@ export const makePerformActionOnRunnerContract = (ids) => {
27
33
  .max(maxActionErrorMessageLength)
28
34
  .describe("What stopped the action from taking effect."),
29
35
  failureReason: z.literal("action-failed"),
36
+ imageJpegBase64: screenshotAfterAction,
30
37
  outcome: z.literal("failure"),
31
38
  }),
32
39
  makeRunnerFailureSchema([
@@ -36,11 +43,14 @@ export const makePerformActionOnRunnerContract = (ids) => {
36
43
  ]),
37
44
  ]);
38
45
  const output = z.discriminatedUnion("outcome", [
39
- z.object({ outcome: z.literal("success") }),
46
+ z.object({
47
+ imageJpegBase64: screenshotAfterAction,
48
+ outcome: z.literal("success"),
49
+ }),
40
50
  failure,
41
51
  ]);
42
52
  return {
43
- 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. ${screenNotReadyDescription} A \`navigate\` does not go through the screen, so a screen that is not ready does not stop it. ${runnerHasNoScreenDescription} ${notSupportedOnMobileDescription} ${unreachableDescription}`,
53
+ 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. ${screenNotReadyDescription} A \`navigate\` does not go through the screen, so a screen that is not ready does not stop it. ${runnerHasNoScreenDescription} ${notSupportedOnMobileDescription} ${withScreenshotDescription} ${unreachableDescription}`,
44
54
  input,
45
55
  kind: "write",
46
56
  name: "runner.performAction",
@@ -1 +1 @@
1
- {"version":3,"file":"performAction.js","sourceRoot":"","sources":["../../../src/v1/runner/performAction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,4BAA4B,EAAE,MAAM,eAAe,CAAC;AAC7E,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,uDAAuD;AACvD,MAAM,CAAC,MAAM,2BAA2B,GAAG,KAAK,CAAC;AAEjD,MAAM,CAAC,MAAM,iCAAiC,GAAG,CAE/C,GAED,EAAE,EAAE;IACH,MAAM,KAAK,GAAG,CAAC,CAAC,MAAM,CAAC;QACrB,MAAM,EAAE,mBAAmB,CAAC,QAAQ,CAClC,yFAAyF,CAC1F;QACD,EAAE,EAAE,cAAc,CAAC,QAAQ,CAAC,6BAA6B,CAAC;QAC1D,WAAW,EAAE,GAAG,CAAC,SAAS;aACvB,QAAQ,EAAE;aACV,QAAQ,CAAC,4BAA4B,CAAC;KAC1C,CAAC,CAAC;IAEH,+EAA+E;IAC/E,8CAA8C;IAC9C,MAAM,OAAO,GAAG,CAAC,CAAC,kBAAkB,CAAC,eAAe,EAAE;QACpD,CAAC,CAAC,MAAM,CAAC;YACP,YAAY,EAAE,CAAC;iBACZ,MAAM,EAAE;iBACR,GAAG,CAAC,2BAA2B,CAAC;iBAChC,QAAQ,CAAC,6CAA6C,CAAC;YAC1D,aAAa,EAAE,CA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WAAW,EAAE,8yCAA8yC,yBAAyB,mGAAmG,4BAA4B,IAAI,+BAA+B,IAAI,yBAAyB,IAAI,sBAAsB,EAAE;QAC/iD,KAAK;QACL,IAAI,EAAE,OAAO;QACb,IAAI,EAAE,sBAAsB;QAC5B,MAAM;KAMP,CAAC;AACJ,CAAC,CAAC"}
@@ -1,5 +1,13 @@
1
+ import { z } from "zod";
1
2
  export declare const screenFailureReasons: readonly ["runner-has-no-screen", "screen-needs-a-run", "screen-not-ready"];
2
3
  export declare const screenNotReadyDescription = "`screen-not-ready` if the runner has a screen that cannot serve this instant. Retry in a second or two: the desktop restarts when a run changes the display size, and it serves one see-or-act request at a time, so a screenshot or action already in flight is the usual reason. Do not submit a run to clear this \u2014 a run may restart the display and discard what is on it.";
3
4
  export declare const screenNeedsARunDescription = "`screen-needs-a-run` if the runner's virtual desktop has never started. Waiting will not change this and retrying is pointless \u2014 call `runner.runFlow` with a flow that opens a browser, then ask for the screen again. On a runner image with a browser that has never run anything, any `runner.performAction` also starts the browser itself. Evaluating a snippet does not start the desktop.";
4
5
  export declare const runnerHasNoScreenDescription = "`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 \u2014 launch a `playwright` runner instead.";
6
+ /**
7
+ * A screenshot as the API carries it. Not `z.base64()`: its regex runs against
8
+ * every multi-megabyte frame, on the server and in every client that parses with
9
+ * this schema (https://github.com/colinhacks/zod/issues/4283), and the value comes
10
+ * from our own encoder.
11
+ */
12
+ export declare const screenshotImageSchema: z.ZodString;
5
13
  //# sourceMappingURL=screen.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"screen.d.ts","sourceRoot":"","sources":["../../../src/v1/runner/screen.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,oBAAoB,6EAIvB,CAAC;AAEX,eAAO,MAAM,yBAAyB,yXAC6U,CAAC;AAIpX,eAAO,MAAM,0BAA0B,2YAC8V,CAAC;AAEtY,eAAO,MAAM,4BAA4B,iNACkK,CAAC"}
1
+ {"version":3,"file":"screen.d.ts","sourceRoot":"","sources":["../../../src/v1/runner/screen.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,oBAAoB,6EAIvB,CAAC;AAEX,eAAO,MAAM,yBAAyB,yXAC6U,CAAC;AAIpX,eAAO,MAAM,0BAA0B,2YAC8V,CAAC;AAEtY,eAAO,MAAM,4BAA4B,iNACkK,CAAC;AAE5M;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,aAK/B,CAAC"}
@@ -1,3 +1,4 @@
1
+ import { z } from "zod";
1
2
  export const screenFailureReasons = [
2
3
  "runner-has-no-screen",
3
4
  "screen-needs-a-run",
@@ -8,4 +9,14 @@ export const screenNotReadyDescription = "`screen-not-ready` if the runner has a
8
9
  // models, and an instruction that only exists in prose is one they may not follow.
9
10
  export const screenNeedsARunDescription = "`screen-needs-a-run` if the runner's virtual desktop has never started. Waiting will not change this and retrying is pointless — call `runner.runFlow` with a flow that opens a browser, then ask for the screen again. On a runner image with a browser that has never run anything, any `runner.performAction` also starts the browser itself. Evaluating a snippet does not start the desktop.";
10
11
  export const runnerHasNoScreenDescription = "`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.";
12
+ /**
13
+ * A screenshot as the API carries it. Not `z.base64()`: its regex runs against
14
+ * every multi-megabyte frame, on the server and in every client that parses with
15
+ * this schema (https://github.com/colinhacks/zod/issues/4283), and the value comes
16
+ * from our own encoder.
17
+ */
18
+ export const screenshotImageSchema = z
19
+ .string()
20
+ .min(1)
21
+ .describe("The screenshot, as a base64-encoded JPEG. Decode it and write the bytes to a `.jpg` file — writing this string to the file leaves you with base64 text rather than an image.");
11
22
  //# sourceMappingURL=screen.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"screen.js","sourceRoot":"","sources":["../../../src/v1/runner/screen.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC,sBAAsB;IACtB,oBAAoB;IACpB,kBAAkB;CACV,CAAC;AAEX,MAAM,CAAC,MAAM,yBAAyB,GACpC,iXAAiX,CAAC;AAEpX,iFAAiF;AACjF,mFAAmF;AACnF,MAAM,CAAC,MAAM,0BAA0B,GACrC,mYAAmY,CAAC;AAEtY,MAAM,CAAC,MAAM,4BAA4B,GACvC,yMAAyM,CAAC"}
1
+ {"version":3,"file":"screen.js","sourceRoot":"","sources":["../../../src/v1/runner/screen.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC,sBAAsB;IACtB,oBAAoB;IACpB,kBAAkB;CACV,CAAC;AAEX,MAAM,CAAC,MAAM,yBAAyB,GACpC,iXAAiX,CAAC;AAEpX,iFAAiF;AACjF,mFAAmF;AACnF,MAAM,CAAC,MAAM,0BAA0B,GACrC,mYAAmY,CAAC;AAEtY,MAAM,CAAC,MAAM,4BAA4B,GACvC,yMAAyM,CAAC;AAE5M;;;;;GAKG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC;KACnC,MAAM,EAAE;KACR,GAAG,CAAC,CAAC,CAAC;KACN,QAAQ,CACP,8KAA8K,CAC/K,CAAC"}
@@ -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;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"}
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;AAgBhD,eAAO,MAAM,kCAAkC,GAC7C,WAAW,SAAS,cAAc,EAClC,KAAK;IACL,SAAS,EAAE,WAAW,CAAC;CACxB;;;;;;;;;;;;;;;;;;;;CA+BA,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import { z } from "zod";
2
2
  import { runnerIdSchema, runnerWorkspaceIdDescription } from "./identity.js";
3
3
  import { makeRunnerFailureSchema } from "./outcome.js";
4
- import { runnerHasNoScreenDescription, screenFailureReasons, screenNeedsARunDescription, screenNotReadyDescription, } from "./screen.js";
4
+ import { runnerHasNoScreenDescription, screenFailureReasons, screenNeedsARunDescription, screenNotReadyDescription, screenshotImageSchema, } from "./screen.js";
5
5
  import { retryableRunnerUnreachableDescription, runnerUnreachableFailureReason, } from "./unreachable.js";
6
6
  export const makeTakeScreenshotOnRunnerContract = (ids) => {
7
7
  const input = z.object({
@@ -12,14 +12,7 @@ export const makeTakeScreenshotOnRunnerContract = (ids) => {
12
12
  });
13
13
  const output = z.discriminatedUnion("outcome", [
14
14
  z.object({
15
- // Not `z.base64()`: its regex runs against every multi-megabyte frame,
16
- // on the server and in every client that parses with this schema
17
- // (https://github.com/colinhacks/zod/issues/4283), and the value comes
18
- // from our own encoder.
19
- imageJpegBase64: z
20
- .string()
21
- .min(1)
22
- .describe("The screenshot, as a base64-encoded JPEG. Decode it and write the bytes to a `.jpg` file — writing this string to the file leaves you with base64 text rather than an image."),
15
+ imageJpegBase64: screenshotImageSchema,
23
16
  outcome: z.literal("success"),
24
17
  }),
25
18
  makeRunnerFailureSchema([
@@ -1 +1 @@
1
- {"version":3,"file":"takeScreenshot.js","sourceRoot":"","sources":["../../../src/v1/runner/takeScreenshot.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,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/takeScreenshot.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,EACL,4BAA4B,EAC5B,oBAAoB,EACpB,0BAA0B,EAC1B,yBAAyB,EACzB,qBAAqB,GACtB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,qCAAqC,EACrC,8BAA8B,GAC/B,MAAM,kBAAkB,CAAC;AAE1B,MAAM,CAAC,MAAM,kCAAkC,GAAG,CAEhD,GAED,EAAE,EAAE;IACH,MAAM,KAAK,GAAG,CAAC,CAAC,MAAM,CAAC;QACrB,EAAE,EAAE,cAAc,CAAC,QAAQ,CAAC,2CAA2C,CAAC;QACxE,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,eAAe,EAAE,qBAAqB;YACtC,OAAO,EAAE,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC;SAC9B,CAAC;QACF,uBAAuB,CAAC;YACtB,GAAG,oBAAoB;YACvB,8BAA8B;SAC/B,CAAC;KACH,CAAC,CAAC;IAEH,OAAO;QACL,WAAW,EAAE,0SAA0S,0BAA0B,IAAI,yBAAyB,IAAI,4BAA4B,IAAI,qCAAqC,EAAE;QACzb,KAAK;QACL,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,uBAAuB;QAC7B,MAAM;KAMP,CAAC;AACJ,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qawolf/api-contracts",
3
- "version": "0.48.0",
3
+ "version": "0.52.0",
4
4
  "private": false,
5
5
  "description": "Versioned contracts for the QA Wolf public API",
6
6
  "repository": {