@qawolf/api-contracts 0.81.0 → 0.85.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/v1/agent/get.d.ts +1 -1
- package/dist/v1/agent/get.js +1 -1
- package/dist/v1/agent/get.js.map +1 -1
- package/dist/v1/agent/wait.d.ts +1 -1
- package/dist/v1/{run/getAttemptArtifacts.d.ts → attempt/get.d.ts} +4 -4
- package/dist/v1/attempt/get.d.ts.map +1 -0
- package/dist/v1/{run/getAttemptArtifacts.js → attempt/get.js} +5 -5
- package/dist/v1/attempt/get.js.map +1 -0
- package/dist/v1/environment/discard.d.ts +54 -0
- package/dist/v1/environment/discard.d.ts.map +1 -0
- package/dist/v1/environment/discard.js +28 -0
- package/dist/v1/environment/discard.js.map +1 -0
- package/dist/v1/environment/promote.d.ts +51 -0
- package/dist/v1/environment/promote.d.ts.map +1 -0
- package/dist/v1/environment/promote.js +28 -0
- package/dist/v1/environment/promote.js.map +1 -0
- package/dist/v1/ids.d.ts +3 -1
- package/dist/v1/ids.d.ts.map +1 -1
- package/dist/v1/ids.js +4 -0
- package/dist/v1/ids.js.map +1 -1
- package/dist/v1/index.d.ts +1006 -533
- package/dist/v1/index.d.ts.map +1 -1
- package/dist/v1/index.js +11 -2
- package/dist/v1/index.js.map +1 -1
- package/dist/v1/investigation/finding.d.ts +1 -0
- package/dist/v1/investigation/finding.d.ts.map +1 -1
- package/dist/v1/investigation/finding.js +5 -1
- package/dist/v1/investigation/finding.js.map +1 -1
- package/dist/v1/investigation/get.d.ts +1 -0
- package/dist/v1/investigation/get.d.ts.map +1 -1
- package/dist/v1/investigation/index.d.ts +1 -0
- package/dist/v1/investigation/index.d.ts.map +1 -1
- package/dist/v1/issue/addFlows.d.ts +1 -1
- package/dist/v1/issue/create.d.ts +1 -1
- package/dist/v1/issue/index.d.ts +5 -5
- package/dist/v1/issue/removeFlows.d.ts +1 -1
- package/dist/v1/issue/update.d.ts +2 -2
- package/dist/v1/promotion/find.d.ts +64 -0
- package/dist/v1/promotion/find.d.ts.map +1 -0
- package/dist/v1/promotion/find.js +41 -0
- package/dist/v1/promotion/find.js.map +1 -0
- package/dist/v1/promotion/get.d.ts +48 -0
- package/dist/v1/promotion/get.d.ts.map +1 -0
- package/dist/v1/promotion/get.js +24 -0
- package/dist/v1/promotion/get.js.map +1 -0
- package/dist/v1/promotion/index.d.ts +155 -0
- package/dist/v1/promotion/index.d.ts.map +1 -0
- package/dist/v1/promotion/index.js +13 -0
- package/dist/v1/promotion/index.js.map +1 -0
- package/dist/v1/promotion/resolve.d.ts +57 -0
- package/dist/v1/promotion/resolve.d.ts.map +1 -0
- package/dist/v1/promotion/resolve.js +59 -0
- package/dist/v1/promotion/resolve.js.map +1 -0
- package/dist/v1/promotion/resource.d.ts +39 -0
- package/dist/v1/promotion/resource.d.ts.map +1 -0
- package/dist/v1/promotion/resource.js +45 -0
- package/dist/v1/promotion/resource.js.map +1 -0
- package/dist/v1/run/diagnose.d.ts +1 -1
- package/dist/v1/run/reattempt.d.ts +1 -0
- package/dist/v1/run/reattempt.d.ts.map +1 -1
- package/dist/v1/run/reattempt.js +10 -1
- package/dist/v1/run/reattempt.js.map +1 -1
- package/dist/v1/runner/catalog.d.ts +8 -8
- package/dist/v1/runner/evaluateSnippet.d.ts +1 -1
- package/dist/v1/runner/inspect.js +1 -1
- package/dist/v1/runner/inspect.js.map +1 -1
- package/dist/v1/runner/inspectMobile.d.ts +1 -1
- package/dist/v1/runner/inspectMobile.d.ts.map +1 -1
- package/dist/v1/runner/inspectMobile.js +11 -5
- package/dist/v1/runner/inspectMobile.js.map +1 -1
- package/dist/v1/runner/performAction.d.ts +1 -1
- package/dist/v1/runner/performAction.d.ts.map +1 -1
- package/dist/v1/runner/performAction.js +6 -5
- package/dist/v1/runner/performAction.js.map +1 -1
- package/dist/v1/runner/performActions.d.ts +1 -1
- package/dist/v1/runner/performActions.js +1 -1
- package/dist/v1/runner/performActions.js.map +1 -1
- package/dist/v1/runner/recording.d.ts +10 -10
- package/dist/v1/runner/runnerAction.d.ts +1 -1
- package/dist/v1/runner/runnerAction.js +1 -1
- package/dist/v1/runner/screen.d.ts +2 -2
- package/dist/v1/runner/screen.d.ts.map +1 -1
- package/dist/v1/runner/screen.js +2 -2
- package/dist/v1/runner/screen.js.map +1 -1
- package/dist/v1/runner/takeScreenshot.d.ts +1 -1
- package/dist/v1/runner/takeScreenshot.js +1 -1
- package/dist/v1/runner/takeScreenshot.js.map +1 -1
- package/package.json +1 -1
- package/dist/v1/run/getAttemptArtifacts.d.ts.map +0 -1
- package/dist/v1/run/getAttemptArtifacts.js.map +0 -1
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
import type { PublicIdSchema } from "../ids.js";
|
|
2
|
+
export { makeFindPromotionsContract } from "./find.js";
|
|
3
|
+
export { makeGetPromotionContract } from "./get.js";
|
|
4
|
+
export { makeResolvePromotionContract, maxResolvedFileBytes, } from "./resolve.js";
|
|
5
|
+
export { type PromotionStatus, makePromotionResourceSchema, promotionStatusSchema, } from "./resource.js";
|
|
6
|
+
export declare const makePromotionContracts: <AiTaskId extends PublicIdSchema, EnvironmentId extends PublicIdSchema, PromotionId extends PublicIdSchema, WorkspaceId extends PublicIdSchema>(ids: {
|
|
7
|
+
aiTask: AiTaskId;
|
|
8
|
+
environment: EnvironmentId;
|
|
9
|
+
environmentRef: PublicIdSchema;
|
|
10
|
+
promotion: PromotionId;
|
|
11
|
+
workspace: WorkspaceId;
|
|
12
|
+
}) => {
|
|
13
|
+
find: {
|
|
14
|
+
readonly annotationJustifications: {
|
|
15
|
+
readonly destructiveHint: "Does not change promotions, environments or flow code branches.";
|
|
16
|
+
readonly openWorldHint: "Reads private QA Wolf promotion records without changing external systems.";
|
|
17
|
+
readonly readOnlyHint: "Lists promotions in the authorized workspace without changing them.";
|
|
18
|
+
};
|
|
19
|
+
readonly annotations: {
|
|
20
|
+
readonly destructiveHint: false;
|
|
21
|
+
readonly openWorldHint: false;
|
|
22
|
+
readonly readOnlyHint: true;
|
|
23
|
+
};
|
|
24
|
+
readonly description: "List environment promotions, newest first. A promotion moves the flow changes made in a head environment into its base environment. Filter by status conflicted to find the promotions whose conflicts still need a resolution.";
|
|
25
|
+
readonly input: import("zod").ZodObject<{
|
|
26
|
+
cursor: import("zod").ZodOptional<import("zod").ZodString>;
|
|
27
|
+
limit: import("zod").ZodDefault<import("zod").ZodNumber>;
|
|
28
|
+
environmentId: import("zod").ZodOptional<PublicIdSchema>;
|
|
29
|
+
status: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
30
|
+
pending: "pending";
|
|
31
|
+
conflicted: "conflicted";
|
|
32
|
+
resolving: "resolving";
|
|
33
|
+
promoted: "promoted";
|
|
34
|
+
"no-changes": "no-changes";
|
|
35
|
+
abandoned: "abandoned";
|
|
36
|
+
}>>;
|
|
37
|
+
workspaceId: import("zod").ZodOptional<WorkspaceId>;
|
|
38
|
+
}, import("zod/v4/core").$strip>;
|
|
39
|
+
readonly kind: "read";
|
|
40
|
+
readonly name: "promotion.find";
|
|
41
|
+
readonly output: import("zod").ZodObject<{
|
|
42
|
+
nextCursor: import("zod").ZodOptional<import("zod").ZodString>;
|
|
43
|
+
promotions: import("zod").ZodArray<import("zod").ZodObject<{
|
|
44
|
+
aiTaskId: import("zod").ZodOptional<AiTaskId>;
|
|
45
|
+
baseEnvironmentId: EnvironmentId;
|
|
46
|
+
conflict: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
47
|
+
paths: import("zod").ZodArray<import("zod").ZodString>;
|
|
48
|
+
sourceCommitHash: import("zod").ZodString;
|
|
49
|
+
targetCommitHash: import("zod").ZodString;
|
|
50
|
+
}, import("zod/v4/core").$strip>>;
|
|
51
|
+
createdAt: import("zod").ZodISODateTime;
|
|
52
|
+
headEnvironmentId: EnvironmentId;
|
|
53
|
+
id: PromotionId;
|
|
54
|
+
promotedCommitHash: import("zod").ZodOptional<import("zod").ZodString>;
|
|
55
|
+
settledAt: import("zod").ZodOptional<import("zod").ZodISODateTime>;
|
|
56
|
+
status: import("zod").ZodEnum<{
|
|
57
|
+
pending: "pending";
|
|
58
|
+
conflicted: "conflicted";
|
|
59
|
+
resolving: "resolving";
|
|
60
|
+
promoted: "promoted";
|
|
61
|
+
"no-changes": "no-changes";
|
|
62
|
+
abandoned: "abandoned";
|
|
63
|
+
}>;
|
|
64
|
+
url: import("zod").ZodURL;
|
|
65
|
+
}, import("zod/v4/core").$strip>>;
|
|
66
|
+
}, import("zod/v4/core").$strip>;
|
|
67
|
+
};
|
|
68
|
+
get: {
|
|
69
|
+
readonly annotationJustifications: {
|
|
70
|
+
readonly destructiveHint: "Does not change the promotion, its environments or flow code branches.";
|
|
71
|
+
readonly openWorldHint: "Reads a private QA Wolf promotion record without changing external systems.";
|
|
72
|
+
readonly readOnlyHint: "Retrieves one authorized promotion's status and conflict without changing it.";
|
|
73
|
+
};
|
|
74
|
+
readonly annotations: {
|
|
75
|
+
readonly destructiveHint: false;
|
|
76
|
+
readonly openWorldHint: false;
|
|
77
|
+
readonly readOnlyHint: true;
|
|
78
|
+
};
|
|
79
|
+
readonly description: "Read one environment promotion: its status, the conflicting paths and commit hashes while it is conflicted or resolving, the commit it landed when promoted, and the AI task resolving it. Poll it after environment.promote to learn how the promotion settled. It does not serve file contents; a resolver reads both branches from the flow code repository.";
|
|
80
|
+
readonly input: import("zod").ZodObject<{
|
|
81
|
+
promotionId: PromotionId;
|
|
82
|
+
}, import("zod/v4/core").$strip>;
|
|
83
|
+
readonly kind: "read";
|
|
84
|
+
readonly name: "promotion.get";
|
|
85
|
+
readonly output: import("zod").ZodObject<{
|
|
86
|
+
aiTaskId: import("zod").ZodOptional<AiTaskId>;
|
|
87
|
+
baseEnvironmentId: EnvironmentId;
|
|
88
|
+
conflict: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
89
|
+
paths: import("zod").ZodArray<import("zod").ZodString>;
|
|
90
|
+
sourceCommitHash: import("zod").ZodString;
|
|
91
|
+
targetCommitHash: import("zod").ZodString;
|
|
92
|
+
}, import("zod/v4/core").$strip>>;
|
|
93
|
+
createdAt: import("zod").ZodISODateTime;
|
|
94
|
+
headEnvironmentId: EnvironmentId;
|
|
95
|
+
id: PromotionId;
|
|
96
|
+
promotedCommitHash: import("zod").ZodOptional<import("zod").ZodString>;
|
|
97
|
+
settledAt: import("zod").ZodOptional<import("zod").ZodISODateTime>;
|
|
98
|
+
status: import("zod").ZodEnum<{
|
|
99
|
+
pending: "pending";
|
|
100
|
+
conflicted: "conflicted";
|
|
101
|
+
resolving: "resolving";
|
|
102
|
+
promoted: "promoted";
|
|
103
|
+
"no-changes": "no-changes";
|
|
104
|
+
abandoned: "abandoned";
|
|
105
|
+
}>;
|
|
106
|
+
url: import("zod").ZodURL;
|
|
107
|
+
}, import("zod/v4/core").$strip>;
|
|
108
|
+
};
|
|
109
|
+
resolve: {
|
|
110
|
+
readonly annotationJustifications: {
|
|
111
|
+
readonly destructiveHint: "Lands the resolved files on the base environment's flow code branch and terminates the head environment once they land.";
|
|
112
|
+
readonly openWorldHint: "Changes QA Wolf flow code branches only, not the customer's own repository or deployments.";
|
|
113
|
+
readonly readOnlyHint: "Records a resolution that a background executor applies to the base branch.";
|
|
114
|
+
};
|
|
115
|
+
readonly annotations: {
|
|
116
|
+
readonly destructiveHint: true;
|
|
117
|
+
readonly openWorldHint: false;
|
|
118
|
+
readonly readOnlyHint: false;
|
|
119
|
+
};
|
|
120
|
+
readonly description: "Submit the resolution of a conflicted promotion: the full resolved contents of every conflicting path to keep, and every conflicting path to delete. Together they must cover exactly the paths in the promotion's conflict, and both commit hashes must match the conflict's; if a branch moved since, the call is refused as stale-conflict and promotion.get has the current conflict. Returns the promotion in resolving; poll promotion.get until it is promoted, or conflicted again if the branches moved while it applied.";
|
|
121
|
+
readonly input: import("zod").ZodObject<{
|
|
122
|
+
deletes: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
|
|
123
|
+
expectedSourceCommitHash: import("zod").ZodString;
|
|
124
|
+
expectedTargetCommitHash: import("zod").ZodString;
|
|
125
|
+
promotionId: PromotionId;
|
|
126
|
+
writes: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodString>>;
|
|
127
|
+
}, import("zod/v4/core").$strip>;
|
|
128
|
+
readonly kind: "write";
|
|
129
|
+
readonly name: "promotion.resolve";
|
|
130
|
+
readonly output: import("zod").ZodObject<{
|
|
131
|
+
aiTaskId: import("zod").ZodOptional<AiTaskId>;
|
|
132
|
+
baseEnvironmentId: EnvironmentId;
|
|
133
|
+
conflict: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
134
|
+
paths: import("zod").ZodArray<import("zod").ZodString>;
|
|
135
|
+
sourceCommitHash: import("zod").ZodString;
|
|
136
|
+
targetCommitHash: import("zod").ZodString;
|
|
137
|
+
}, import("zod/v4/core").$strip>>;
|
|
138
|
+
createdAt: import("zod").ZodISODateTime;
|
|
139
|
+
headEnvironmentId: EnvironmentId;
|
|
140
|
+
id: PromotionId;
|
|
141
|
+
promotedCommitHash: import("zod").ZodOptional<import("zod").ZodString>;
|
|
142
|
+
settledAt: import("zod").ZodOptional<import("zod").ZodISODateTime>;
|
|
143
|
+
status: import("zod").ZodEnum<{
|
|
144
|
+
pending: "pending";
|
|
145
|
+
conflicted: "conflicted";
|
|
146
|
+
resolving: "resolving";
|
|
147
|
+
promoted: "promoted";
|
|
148
|
+
"no-changes": "no-changes";
|
|
149
|
+
abandoned: "abandoned";
|
|
150
|
+
}>;
|
|
151
|
+
url: import("zod").ZodURL;
|
|
152
|
+
}, import("zod/v4/core").$strip>;
|
|
153
|
+
};
|
|
154
|
+
};
|
|
155
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/v1/promotion/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAMhD,OAAO,EAAE,0BAA0B,EAAE,MAAM,WAAW,CAAC;AACvD,OAAO,EAAE,wBAAwB,EAAE,MAAM,UAAU,CAAC;AACpD,OAAO,EACL,4BAA4B,EAC5B,oBAAoB,GACrB,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,KAAK,eAAe,EACpB,2BAA2B,EAC3B,qBAAqB,GACtB,MAAM,eAAe,CAAC;AAEvB,eAAO,MAAM,sBAAsB,GACjC,QAAQ,SAAS,cAAc,EAC/B,aAAa,SAAS,cAAc,EACpC,WAAW,SAAS,cAAc,EAClC,WAAW,SAAS,cAAc,EAClC,KAAK;IACL,MAAM,EAAE,QAAQ,CAAC;IACjB,WAAW,EAAE,aAAa,CAAC;IAC3B,cAAc,EAAE,cAAc,CAAC;IAC/B,SAAS,EAAE,WAAW,CAAC;IACvB,SAAS,EAAE,WAAW,CAAC;CACxB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAIC,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { makeFindPromotionsContract } from "./find.js";
|
|
2
|
+
import { makeGetPromotionContract } from "./get.js";
|
|
3
|
+
import { makeResolvePromotionContract } from "./resolve.js";
|
|
4
|
+
export { makeFindPromotionsContract } from "./find.js";
|
|
5
|
+
export { makeGetPromotionContract } from "./get.js";
|
|
6
|
+
export { makeResolvePromotionContract, maxResolvedFileBytes, } from "./resolve.js";
|
|
7
|
+
export { makePromotionResourceSchema, promotionStatusSchema, } from "./resource.js";
|
|
8
|
+
export const makePromotionContracts = (ids) => ({
|
|
9
|
+
find: makeFindPromotionsContract(ids),
|
|
10
|
+
get: makeGetPromotionContract(ids),
|
|
11
|
+
resolve: makeResolvePromotionContract(ids),
|
|
12
|
+
});
|
|
13
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/v1/promotion/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,0BAA0B,EAAE,MAAM,WAAW,CAAC;AACvD,OAAO,EAAE,wBAAwB,EAAE,MAAM,UAAU,CAAC;AACpD,OAAO,EAAE,4BAA4B,EAAE,MAAM,cAAc,CAAC;AAE5D,OAAO,EAAE,0BAA0B,EAAE,MAAM,WAAW,CAAC;AACvD,OAAO,EAAE,wBAAwB,EAAE,MAAM,UAAU,CAAC;AACpD,OAAO,EACL,4BAA4B,EAC5B,oBAAoB,GACrB,MAAM,cAAc,CAAC;AACtB,OAAO,EAEL,2BAA2B,EAC3B,qBAAqB,GACtB,MAAM,eAAe,CAAC;AAEvB,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAKpC,GAMD,EAAE,EAAE,CAAC,CAAC;IACL,IAAI,EAAE,0BAA0B,CAAC,GAAG,CAAC;IACrC,GAAG,EAAE,wBAAwB,CAAC,GAAG,CAAC;IAClC,OAAO,EAAE,4BAA4B,CAAC,GAAG,CAAC;CAC3C,CAAC,CAAC"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import type { PublicIdSchema } from "../ids.js";
|
|
3
|
+
/**
|
|
4
|
+
* The executor reads each kept file back through the repository's contents
|
|
5
|
+
* endpoint, which serves inline content only below 1 MB.
|
|
6
|
+
*/
|
|
7
|
+
export declare const maxResolvedFileBytes = 1000000;
|
|
8
|
+
export declare const makeResolvePromotionContract: <AiTaskId extends PublicIdSchema, EnvironmentId extends PublicIdSchema, PromotionId extends PublicIdSchema>(ids: {
|
|
9
|
+
aiTask: AiTaskId;
|
|
10
|
+
environment: EnvironmentId;
|
|
11
|
+
promotion: PromotionId;
|
|
12
|
+
}) => {
|
|
13
|
+
readonly annotationJustifications: {
|
|
14
|
+
readonly destructiveHint: "Lands the resolved files on the base environment's flow code branch and terminates the head environment once they land.";
|
|
15
|
+
readonly openWorldHint: "Changes QA Wolf flow code branches only, not the customer's own repository or deployments.";
|
|
16
|
+
readonly readOnlyHint: "Records a resolution that a background executor applies to the base branch.";
|
|
17
|
+
};
|
|
18
|
+
readonly annotations: {
|
|
19
|
+
readonly destructiveHint: true;
|
|
20
|
+
readonly openWorldHint: false;
|
|
21
|
+
readonly readOnlyHint: false;
|
|
22
|
+
};
|
|
23
|
+
readonly description: "Submit the resolution of a conflicted promotion: the full resolved contents of every conflicting path to keep, and every conflicting path to delete. Together they must cover exactly the paths in the promotion's conflict, and both commit hashes must match the conflict's; if a branch moved since, the call is refused as stale-conflict and promotion.get has the current conflict. Returns the promotion in resolving; poll promotion.get until it is promoted, or conflicted again if the branches moved while it applied.";
|
|
24
|
+
readonly input: z.ZodObject<{
|
|
25
|
+
deletes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
26
|
+
expectedSourceCommitHash: z.ZodString;
|
|
27
|
+
expectedTargetCommitHash: z.ZodString;
|
|
28
|
+
promotionId: PromotionId;
|
|
29
|
+
writes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
30
|
+
}, z.core.$strip>;
|
|
31
|
+
readonly kind: "write";
|
|
32
|
+
readonly name: "promotion.resolve";
|
|
33
|
+
readonly output: z.ZodObject<{
|
|
34
|
+
aiTaskId: z.ZodOptional<AiTaskId>;
|
|
35
|
+
baseEnvironmentId: EnvironmentId;
|
|
36
|
+
conflict: z.ZodOptional<z.ZodObject<{
|
|
37
|
+
paths: z.ZodArray<z.ZodString>;
|
|
38
|
+
sourceCommitHash: z.ZodString;
|
|
39
|
+
targetCommitHash: z.ZodString;
|
|
40
|
+
}, z.core.$strip>>;
|
|
41
|
+
createdAt: z.ZodISODateTime;
|
|
42
|
+
headEnvironmentId: EnvironmentId;
|
|
43
|
+
id: PromotionId;
|
|
44
|
+
promotedCommitHash: z.ZodOptional<z.ZodString>;
|
|
45
|
+
settledAt: z.ZodOptional<z.ZodISODateTime>;
|
|
46
|
+
status: z.ZodEnum<{
|
|
47
|
+
pending: "pending";
|
|
48
|
+
conflicted: "conflicted";
|
|
49
|
+
resolving: "resolving";
|
|
50
|
+
promoted: "promoted";
|
|
51
|
+
"no-changes": "no-changes";
|
|
52
|
+
abandoned: "abandoned";
|
|
53
|
+
}>;
|
|
54
|
+
url: z.ZodURL;
|
|
55
|
+
}, z.core.$strip>;
|
|
56
|
+
};
|
|
57
|
+
//# sourceMappingURL=resolve.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolve.d.ts","sourceRoot":"","sources":["../../../src/v1/promotion/resolve.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAIhD;;;GAGG;AACH,eAAO,MAAM,oBAAoB,UAAY,CAAC;AAe9C,eAAO,MAAM,4BAA4B,GACvC,QAAQ,SAAS,cAAc,EAC/B,aAAa,SAAS,cAAc,EACpC,WAAW,SAAS,cAAc,EAClC,KAAK;IACL,MAAM,EAAE,QAAQ,CAAC;IACjB,WAAW,EAAE,aAAa,CAAC;IAC3B,SAAS,EAAE,WAAW,CAAC;CACxB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6DA,CAAC"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { makePromotionResourceSchema } from "./resource.js";
|
|
3
|
+
/**
|
|
4
|
+
* The executor reads each kept file back through the repository's contents
|
|
5
|
+
* endpoint, which serves inline content only below 1 MB.
|
|
6
|
+
*/
|
|
7
|
+
export const maxResolvedFileBytes = 1_000_000;
|
|
8
|
+
const utf8ByteLength = (content) => new TextEncoder().encode(content).byteLength;
|
|
9
|
+
const keptFileSizeIssues = (writes) => Object.entries(writes)
|
|
10
|
+
.map(([path, content]) => ({ bytes: utf8ByteLength(content), path }))
|
|
11
|
+
.filter(({ bytes }) => bytes >= maxResolvedFileBytes)
|
|
12
|
+
.map(({ bytes, path }) => ({
|
|
13
|
+
code: "custom",
|
|
14
|
+
message: `Each kept file must be under ${maxResolvedFileBytes} bytes of UTF-8; ${path} is ${bytes} bytes.`,
|
|
15
|
+
path: [path],
|
|
16
|
+
}));
|
|
17
|
+
export const makeResolvePromotionContract = (ids) => {
|
|
18
|
+
const input = z.object({
|
|
19
|
+
deletes: z
|
|
20
|
+
.array(z.string().min(1))
|
|
21
|
+
.optional()
|
|
22
|
+
.describe("Conflicting paths to remove from the base environment. Repeat the flag once per path."),
|
|
23
|
+
expectedSourceCommitHash: z
|
|
24
|
+
.string()
|
|
25
|
+
.min(1)
|
|
26
|
+
.describe("The head environment's commit the conflict was computed against: conflict.sourceCommitHash from promotion.get. A different current commit means the branch moved and the call is refused."),
|
|
27
|
+
expectedTargetCommitHash: z
|
|
28
|
+
.string()
|
|
29
|
+
.min(1)
|
|
30
|
+
.describe("The base environment's commit the conflict was computed against: conflict.targetCommitHash from promotion.get. A different current commit means the branch moved and the call is refused."),
|
|
31
|
+
promotionId: ids.promotion,
|
|
32
|
+
writes: z
|
|
33
|
+
.record(z.string().min(1), z.string())
|
|
34
|
+
.superRefine((writes, refinement) => {
|
|
35
|
+
keptFileSizeIssues(writes).forEach((issue) => refinement.addIssue(issue));
|
|
36
|
+
})
|
|
37
|
+
.optional()
|
|
38
|
+
.describe("The resolved full contents of each conflicting path to keep, keyed by path. Repeat the flag once per path as PATH=CONTENT. Each file must be under 1 MB of UTF-8."),
|
|
39
|
+
});
|
|
40
|
+
const output = makePromotionResourceSchema(ids);
|
|
41
|
+
return {
|
|
42
|
+
annotationJustifications: {
|
|
43
|
+
destructiveHint: "Lands the resolved files on the base environment's flow code branch and terminates the head environment once they land.",
|
|
44
|
+
openWorldHint: "Changes QA Wolf flow code branches only, not the customer's own repository or deployments.",
|
|
45
|
+
readOnlyHint: "Records a resolution that a background executor applies to the base branch.",
|
|
46
|
+
},
|
|
47
|
+
annotations: {
|
|
48
|
+
destructiveHint: true,
|
|
49
|
+
openWorldHint: false,
|
|
50
|
+
readOnlyHint: false,
|
|
51
|
+
},
|
|
52
|
+
description: "Submit the resolution of a conflicted promotion: the full resolved contents of every conflicting path to keep, and every conflicting path to delete. Together they must cover exactly the paths in the promotion's conflict, and both commit hashes must match the conflict's; if a branch moved since, the call is refused as stale-conflict and promotion.get has the current conflict. Returns the promotion in resolving; poll promotion.get until it is promoted, or conflicted again if the branches moved while it applied.",
|
|
53
|
+
input,
|
|
54
|
+
kind: "write",
|
|
55
|
+
name: "promotion.resolve",
|
|
56
|
+
output,
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
//# sourceMappingURL=resolve.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolve.js","sourceRoot":"","sources":["../../../src/v1/promotion/resolve.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,OAAO,EAAE,2BAA2B,EAAE,MAAM,eAAe,CAAC;AAE5D;;;GAGG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,SAAS,CAAC;AAE9C,MAAM,cAAc,GAAG,CAAC,OAAe,EAAU,EAAE,CACjD,IAAI,WAAW,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,UAAU,CAAC;AAE/C,MAAM,kBAAkB,GAAG,CAAC,MAA8B,EAAE,EAAE,CAC5D,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC;KACnB,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,OAAO,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,cAAc,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC;KACpE,MAAM,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,KAAK,IAAI,oBAAoB,CAAC;KACpD,GAAG,CAAC,CAAC,EAAE,KAAK,EAA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FAA4F;YAC9F,YAAY,EACV,6EAA6E;SAChF;QACD,WAAW,EAAE;YACX,eAAe,EAAE,IAAI;YACrB,aAAa,EAAE,KAAK;YACpB,YAAY,EAAE,KAAK;SACpB;QACD,WAAW,EACT,ogBAAogB;QACtgB,KAAK;QACL,IAAI,EAAE,OAAO;QACb,IAAI,EAAE,mBAAmB;QACzB,MAAM;KAMP,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import type { PublicIdSchema } from "../ids.js";
|
|
3
|
+
export declare const promotionStatusSchema: z.ZodEnum<{
|
|
4
|
+
pending: "pending";
|
|
5
|
+
conflicted: "conflicted";
|
|
6
|
+
resolving: "resolving";
|
|
7
|
+
promoted: "promoted";
|
|
8
|
+
"no-changes": "no-changes";
|
|
9
|
+
abandoned: "abandoned";
|
|
10
|
+
}>;
|
|
11
|
+
export type PromotionStatus = z.infer<typeof promotionStatusSchema>;
|
|
12
|
+
export declare const makePromotionResourceSchema: <AiTaskId extends PublicIdSchema, EnvironmentId extends PublicIdSchema, PromotionId extends PublicIdSchema>(ids: {
|
|
13
|
+
aiTask: AiTaskId;
|
|
14
|
+
environment: EnvironmentId;
|
|
15
|
+
promotion: PromotionId;
|
|
16
|
+
}) => z.ZodObject<{
|
|
17
|
+
aiTaskId: z.ZodOptional<AiTaskId>;
|
|
18
|
+
baseEnvironmentId: EnvironmentId;
|
|
19
|
+
conflict: z.ZodOptional<z.ZodObject<{
|
|
20
|
+
paths: z.ZodArray<z.ZodString>;
|
|
21
|
+
sourceCommitHash: z.ZodString;
|
|
22
|
+
targetCommitHash: z.ZodString;
|
|
23
|
+
}, z.core.$strip>>;
|
|
24
|
+
createdAt: z.ZodISODateTime;
|
|
25
|
+
headEnvironmentId: EnvironmentId;
|
|
26
|
+
id: PromotionId;
|
|
27
|
+
promotedCommitHash: z.ZodOptional<z.ZodString>;
|
|
28
|
+
settledAt: z.ZodOptional<z.ZodISODateTime>;
|
|
29
|
+
status: z.ZodEnum<{
|
|
30
|
+
pending: "pending";
|
|
31
|
+
conflicted: "conflicted";
|
|
32
|
+
resolving: "resolving";
|
|
33
|
+
promoted: "promoted";
|
|
34
|
+
"no-changes": "no-changes";
|
|
35
|
+
abandoned: "abandoned";
|
|
36
|
+
}>;
|
|
37
|
+
url: z.ZodURL;
|
|
38
|
+
}, z.core.$strip>;
|
|
39
|
+
//# sourceMappingURL=resource.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resource.d.ts","sourceRoot":"","sources":["../../../src/v1/promotion/resource.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAGhD,eAAO,MAAM,qBAAqB;;;;;;;EAW/B,CAAC;AAEJ,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAoBpE,eAAO,MAAM,2BAA2B,GACtC,QAAQ,SAAS,cAAc,EAC/B,aAAa,SAAS,cAAc,EACpC,WAAW,SAAS,cAAc,EAClC,KAAK;IACL,MAAM,EAAE,QAAQ,CAAC;IACjB,WAAW,EAAE,aAAa,CAAC;IAC3B,SAAS,EAAE,WAAW,CAAC;CACxB;;;;;;;;;;;;;;;;;;;;;;iBAoCE,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { resource } from "../resource.js";
|
|
3
|
+
export const promotionStatusSchema = z
|
|
4
|
+
.enum([
|
|
5
|
+
"pending",
|
|
6
|
+
"conflicted",
|
|
7
|
+
"resolving",
|
|
8
|
+
"promoted",
|
|
9
|
+
"no-changes",
|
|
10
|
+
"abandoned",
|
|
11
|
+
])
|
|
12
|
+
.describe("pending (requested, the merge has not run yet), conflicted (the head's flow changes clash with the base and await a resolution), resolving (a submitted resolution is being applied), promoted (merged into the base and the head environment terminated), no-changes (the head had nothing to promote and was terminated), abandoned (the head environment was discarded or terminated before the promotion settled).");
|
|
13
|
+
const conflictSchema = z.object({
|
|
14
|
+
paths: z
|
|
15
|
+
.array(z.string())
|
|
16
|
+
.describe("Every path that conflicts between the head and the base. A resolution must cover exactly these paths."),
|
|
17
|
+
sourceCommitHash: z
|
|
18
|
+
.string()
|
|
19
|
+
.describe("The head environment's flow code commit the conflict was computed against."),
|
|
20
|
+
targetCommitHash: z
|
|
21
|
+
.string()
|
|
22
|
+
.describe("The base environment's flow code commit the conflict was computed against."),
|
|
23
|
+
});
|
|
24
|
+
export const makePromotionResourceSchema = (ids) => resource({
|
|
25
|
+
aiTaskId: ids.aiTask
|
|
26
|
+
.optional()
|
|
27
|
+
.describe("The AI task dispatched to resolve this promotion's conflicts. Absent until the agent is dispatched. A promotion that stays conflicted after this is set means the agent could not resolve it."),
|
|
28
|
+
baseEnvironmentId: ids.environment.describe("The environment the flow changes promote into."),
|
|
29
|
+
conflict: conflictSchema
|
|
30
|
+
.optional()
|
|
31
|
+
.describe("The conflict awaiting resolution. Present while status is conflicted or resolving. A resolution must name both commit hashes and cover exactly these paths; if either branch moves, the conflict is recomputed and this changes."),
|
|
32
|
+
createdAt: z.iso.datetime().describe("When the promotion was requested."),
|
|
33
|
+
headEnvironmentId: ids.environment.describe("The environment whose flow changes are promoted."),
|
|
34
|
+
id: ids.promotion,
|
|
35
|
+
promotedCommitHash: z
|
|
36
|
+
.string()
|
|
37
|
+
.optional()
|
|
38
|
+
.describe("The commit the promotion landed on the base environment's flow code branch. Present when status is promoted."),
|
|
39
|
+
settledAt: z.iso
|
|
40
|
+
.datetime()
|
|
41
|
+
.optional()
|
|
42
|
+
.describe("When the promotion reached promoted, no-changes or abandoned. Absent while it is open."),
|
|
43
|
+
status: promotionStatusSchema,
|
|
44
|
+
}, { urlFieldDescription: "Absolute URL of the head environment's page." });
|
|
45
|
+
//# sourceMappingURL=resource.js.map
|
|
@@ -0,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AC;SAClB,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CACP,8GAA8G,CAC/G;IACH,SAAS,EAAE,CAAC,CAAC,GAAG;SACb,QAAQ,EAAE;SACV,QAAQ,EAAE;SACV,QAAQ,CACP,wFAAwF,CACzF;IACH,MAAM,EAAE,qBAAqB;CAC9B,EACD,EAAE,mBAAmB,EAAE,8CAA8C,EAAE,CACxE,CAAC"}
|
|
@@ -47,8 +47,8 @@ export declare const makeDiagnoseRunContract: <EnvironmentId extends PublicIdSch
|
|
|
47
47
|
lastReproducedInRunId: RunId;
|
|
48
48
|
}, z.core.$strip>>;
|
|
49
49
|
status: z.ZodEnum<{
|
|
50
|
-
canceled: "canceled";
|
|
51
50
|
pending: "pending";
|
|
51
|
+
canceled: "canceled";
|
|
52
52
|
backlog: "backlog";
|
|
53
53
|
inProgress: "inProgress";
|
|
54
54
|
paused: "paused";
|
|
@@ -24,6 +24,7 @@ export declare const makeReattemptRunContract: <FlowId extends PublicIdSchema, R
|
|
|
24
24
|
readonly name: "run.reattempt";
|
|
25
25
|
readonly output: z.ZodObject<{
|
|
26
26
|
reattemptedFlowIds: z.ZodArray<FlowId>;
|
|
27
|
+
reattemptedInRunIds: z.ZodArray<RunId>;
|
|
27
28
|
runId: RunId;
|
|
28
29
|
url: z.ZodURL;
|
|
29
30
|
}, z.core.$strip>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reattempt.d.ts","sourceRoot":"","sources":["../../../src/v1/run/reattempt.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAGhD,eAAO,MAAM,wBAAwB,GACnC,MAAM,SAAS,cAAc,EAC7B,KAAK,SAAS,cAAc,EAC5B,KAAK;IACL,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,KAAK,CAAC;CACZ
|
|
1
|
+
{"version":3,"file":"reattempt.d.ts","sourceRoot":"","sources":["../../../src/v1/run/reattempt.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAGhD,eAAO,MAAM,wBAAwB,GACnC,MAAM,SAAS,cAAc,EAC7B,KAAK,SAAS,cAAc,EAC5B,KAAK;IACL,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,KAAK,CAAC;CACZ;;;;;;;;;;;;;;;;;;;;;;;;CAsEA,CAAC"}
|
package/dist/v1/run/reattempt.js
CHANGED
|
@@ -17,6 +17,12 @@ export const makeReattemptRunContract = (ids) => {
|
|
|
17
17
|
reattemptedFlowIds: z
|
|
18
18
|
.array(ids.flow)
|
|
19
19
|
.describe("The flows a new attempt was requested for."),
|
|
20
|
+
reattemptedInRunIds: z
|
|
21
|
+
.array(ids.run)
|
|
22
|
+
.describe("The runs the new attempts were added to, which is where to poll " +
|
|
23
|
+
"for their results. It is this run alone unless a flow had kept " +
|
|
24
|
+
"failing in later runs, because the attempt then goes to the " +
|
|
25
|
+
"latest of them."),
|
|
20
26
|
runId: ids.run,
|
|
21
27
|
}, { urlFieldDescription: "Absolute URL of the run page." });
|
|
22
28
|
return {
|
|
@@ -30,9 +36,12 @@ export const makeReattemptRunContract = (ids) => {
|
|
|
30
36
|
openWorldHint: true,
|
|
31
37
|
readOnlyHint: false,
|
|
32
38
|
},
|
|
33
|
-
description: "Request new attempts for a run's flows
|
|
39
|
+
description: "Request new attempts for a run's flows. " +
|
|
34
40
|
"A flow is eligible once its result is failed or canceled and QA Wolf's " +
|
|
35
41
|
"automatic retries have finished. " +
|
|
42
|
+
"A flow that kept failing in later runs is attempted in the latest of " +
|
|
43
|
+
"them, because that is the run carrying the failure, so read " +
|
|
44
|
+
"reattemptedInRunIds for where each attempt landed. " +
|
|
36
45
|
"A fully investigated run no longer accepts reattempts. " +
|
|
37
46
|
"Attempts run with the latest flow code. Poll run.get for results.",
|
|
38
47
|
input,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reattempt.js","sourceRoot":"","sources":["../../../src/v1/run/reattempt.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE1C,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAGtC,GAID,EAAE,EAAE;IACH,MAAM,KAAK,GAAG,CAAC,CAAC,MAAM,CAAC;QACrB,OAAO,EAAE,CAAC;aACP,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC;aACf,GAAG,CAAC,CAAC,CAAC;YACP,yCAAyC;aACxC,GAAG,CAAC,GAAG,CAAC;aACR,MAAM,CACL,CAAC,OAAO,EAAE,EAAE,CAAC,IAAI,GAAG,CAAC,OAAO,CAAC,CAAC,IAAI,KAAK,OAAO,CAAC,MAAM,EACrD,wBAAwB,CACzB;aACA,QAAQ,EAAE;aACV,QAAQ,CACP,mEAAmE;YACjE,mEAAmE,CACtE;QACH,KAAK,EAAE,GAAG,CAAC,GAAG;KACf,CAAC,CAAC;IAEH,MAAM,MAAM,GAAG,QAAQ,CACrB;QACE,kBAAkB,EAAE,CAAC;aAClB,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC;aACf,QAAQ,CAAC,4CAA4C,CAAC;QACzD,KAAK,EAAE,GAAG,CAAC,GAAG;KACf,EACD,EAAE,mBAAmB,EAAE,+BAA+B,EAAE,CACzD,CAAC;IAEF,OAAO;QACL,wBAAwB,EAAE;YACxB,eAAe,EACb,iGAAiG;YACnG,aAAa,EACX,4FAA4F;YAC9F,YAAY,EACV,oFAAoF;SACvF;QACD,WAAW,EAAE;YACX,eAAe,EAAE,IAAI;YACrB,aAA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D,WAAW,EAAE;YACX,eAAe,EAAE,IAAI;YACrB,aAAa,EAAE,IAAI;YACnB,YAAY,EAAE,KAAK;SACpB;QACD,WAAW,EACT,0CAA0C;YAC1C,yEAAyE;YACzE,mCAAmC;YACnC,uEAAuE;YACvE,8DAA8D;YAC9D,qDAAqD;YACrD,yDAAyD;YACzD,mEAAmE;QACrE,KAAK;QACL,IAAI,EAAE,OAAO;QACb,IAAI,EAAE,eAAe;QACrB,MAAM;KAMP,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -102,7 +102,7 @@ export declare const makeRunnerContracts: <FlowId extends PublicIdSchema, Worksp
|
|
|
102
102
|
readonly openWorldHint: false;
|
|
103
103
|
readonly readOnlyHint: false;
|
|
104
104
|
};
|
|
105
|
-
readonly description: "Take one screenshot of an interactive runner's screen. On a runner with a browser the image is the whole virtual desktop, browser window and all; this refreshes the inactivity timer and can extend the runner's billed lifetime. On a mobile runner it is the device's own screen, re-encoded to JPEG on the pod so this contract reads one image format regardless of runner family. `screen-needs-a-run` if the runner's virtual desktop has never started. Waiting will not change this and retrying is pointless — call `runner.runFlow` with a flow that opens a browser, then ask for the screen again. On a runner image with a browser that has never run anything, any `runner.performAction` also starts the browser itself. Evaluating a snippet does not start the desktop. `screen-not-ready` if the runner has a screen that cannot serve this instant. Retry in a second or two: the desktop restarts when a run changes the display size, and it serves one see-or-act request at a time, so a screenshot or action already in flight is the usual reason. Do not submit a run to clear this — a run may restart the display and discard what is on it. `runner-has-no-screen` if this runner has no browser desktop to see or drive, and retrying will never help. Launch a `playwright` runner
|
|
105
|
+
readonly description: "Take one screenshot of an interactive runner's screen. On a runner with a browser the image is the whole virtual desktop, browser window and all; this refreshes the inactivity timer and can extend the runner's billed lifetime. On a mobile runner it is the device's own screen, and on Windows the VM's whole desktop, re-encoded to JPEG on the pod so this contract reads one image format regardless of runner family. `screen-needs-a-run` if the runner's virtual desktop has never started. Waiting will not change this and retrying is pointless — call `runner.runFlow` with a flow that opens a browser, then ask for the screen again. On a Windows runner any flow run claims the VM and brings up its screen. On a runner image with a browser that has never run anything, any `runner.performAction` also starts the browser itself. Evaluating a snippet does not start the desktop. `screen-not-ready` if the runner has a screen that cannot serve this instant. Retry in a second or two: the desktop restarts when a run changes the display size, and it serves one see-or-act request at a time, so a screenshot or action already in flight is the usual reason. Do not submit a run to clear this — a run may restart the display and discard what is on it. `runner-has-no-screen` if this runner has no browser desktop to see or drive, and retrying will never help. Launch a `playwright` runner. `runner-unreachable` if the runner could not be reached: it may still be starting, it may have terminated after inactivity, or it may be too busy to answer. Nothing was changed, so retrying is safe; if it persists, launch the runner again.";
|
|
106
106
|
readonly input: import("zod").ZodObject<{
|
|
107
107
|
id: import("zod").ZodString;
|
|
108
108
|
workspaceId: import("zod").ZodOptional<WorkspaceId>;
|
|
@@ -183,8 +183,8 @@ export declare const makeRunnerContracts: <FlowId extends PublicIdSchema, Worksp
|
|
|
183
183
|
endedAt: import("zod").ZodISODateTime;
|
|
184
184
|
id: import("zod").ZodUUID;
|
|
185
185
|
mode: import("zod").ZodEnum<{
|
|
186
|
-
automatic: "automatic";
|
|
187
186
|
manual: "manual";
|
|
187
|
+
automatic: "automatic";
|
|
188
188
|
}>;
|
|
189
189
|
runIds: import("zod").ZodArray<import("zod").ZodString>;
|
|
190
190
|
runnerId: import("zod").ZodString;
|
|
@@ -200,8 +200,8 @@ export declare const makeRunnerContracts: <FlowId extends PublicIdSchema, Worksp
|
|
|
200
200
|
active: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
201
201
|
id: import("zod").ZodUUID;
|
|
202
202
|
mode: import("zod").ZodEnum<{
|
|
203
|
-
automatic: "automatic";
|
|
204
203
|
manual: "manual";
|
|
204
|
+
automatic: "automatic";
|
|
205
205
|
}>;
|
|
206
206
|
startedAt: import("zod").ZodISODateTime;
|
|
207
207
|
}, import("zod/v4/core").$strip>>;
|
|
@@ -252,8 +252,8 @@ export declare const makeRunnerContracts: <FlowId extends PublicIdSchema, Worksp
|
|
|
252
252
|
endedAt: import("zod").ZodISODateTime;
|
|
253
253
|
id: import("zod").ZodUUID;
|
|
254
254
|
mode: import("zod").ZodEnum<{
|
|
255
|
-
automatic: "automatic";
|
|
256
255
|
manual: "manual";
|
|
256
|
+
automatic: "automatic";
|
|
257
257
|
}>;
|
|
258
258
|
runIds: import("zod").ZodArray<import("zod").ZodString>;
|
|
259
259
|
runnerId: import("zod").ZodString;
|
|
@@ -294,8 +294,8 @@ export declare const makeRunnerContracts: <FlowId extends PublicIdSchema, Worksp
|
|
|
294
294
|
errorMessage: import("zod").ZodOptional<import("zod").ZodString>;
|
|
295
295
|
outcome: import("zod").ZodLiteral<"success">;
|
|
296
296
|
result: import("zod").ZodEnum<{
|
|
297
|
-
success: "success";
|
|
298
297
|
error: "error";
|
|
298
|
+
success: "success";
|
|
299
299
|
stopped: "stopped";
|
|
300
300
|
}>;
|
|
301
301
|
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
@@ -456,7 +456,7 @@ export declare const makeRunnerContracts: <FlowId extends PublicIdSchema, Worksp
|
|
|
456
456
|
readonly openWorldHint: false;
|
|
457
457
|
readonly readOnlyHint: true;
|
|
458
458
|
};
|
|
459
|
-
readonly description: "Inspect one thing on a mobile interactive runner: the Appium session's status, the
|
|
459
|
+
readonly description: "Inspect one thing on a mobile or Windows interactive runner: the Appium session's status, the contexts available (WebViews on mobile, top-level windows on Windows), the current context's page source, or the elements at a point, carrying some text, or matching a selector. This does not refresh the runner's inactivity timer. Mobile and Windows only — a browser runner answers `runner-is-not-mobile`; call `runner.inspect` for a browser's equivalent surface instead. `what: \"session\"` always answers with the session's own status rather than `screen-needs-a-run`, since that is the question it exists to answer; the other three request kinds need a live session first and answer the same `screen-needs-a-run` or `screen-not-ready` outcomes `runner.performAction` and `runner.takeScreenshot` use, instead of reading anything when there is none. `screen-needs-a-run` means no Appium session has started on this runner yet — call `runner.runFlow` with a flow that opens one, then inspect again. `screen-not-ready` means the runner's Appium session exists but did not answer this instant, or more than one is somehow live — retry once; if it persists, relaunch the runner. `runner-is-not-mobile` means there is nothing here to inspect, and retrying will never help — launch an `android`, `ios` or `windows` runner instead. `invalid-selector` (elements by selector only) means the selector itself could not be parsed under the given `strategy` — distinct from a selector that parsed fine but matched nothing, which answers `matches: []` instead. `runner-unreachable` if the runner could not be reached: it may still be starting, it may have terminated after inactivity, or it may be too busy to answer. Nothing was changed, so retrying is safe; if it persists, launch the runner again.";
|
|
460
460
|
readonly input: import("zod").ZodObject<{
|
|
461
461
|
id: import("zod").ZodString;
|
|
462
462
|
request: import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
|
|
@@ -755,7 +755,7 @@ export declare const makeRunnerContracts: <FlowId extends PublicIdSchema, Worksp
|
|
|
755
755
|
readonly openWorldHint: true;
|
|
756
756
|
readonly readOnlyHint: false;
|
|
757
757
|
};
|
|
758
|
-
readonly description: "Perform one raw action on an interactive runner: click, double_click, move, drag, scroll, keypress, type, or navigate; on mobile, tap, swipe,
|
|
758
|
+
readonly description: "Perform one raw action on an interactive runner: click, double_click, move, drag, scroll, keypress, type, or navigate; on mobile or Windows, also tap, swipe, or fill. One action per request, and the runner serves one at a time. 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 or Windows 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. `runner-has-no-screen` if this runner has no browser desktop to see or drive, and retrying will never help. Launch a `playwright` runner. `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.";
|
|
759
759
|
readonly input: import("zod").ZodObject<{
|
|
760
760
|
action: import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
|
|
761
761
|
button: import("zod").ZodLiteral<"left" | "right" | "wheel" | "back" | "forward">;
|
|
@@ -859,7 +859,7 @@ export declare const makeRunnerContracts: <FlowId extends PublicIdSchema, Worksp
|
|
|
859
859
|
readonly openWorldHint: true;
|
|
860
860
|
readonly readOnlyHint: false;
|
|
861
861
|
};
|
|
862
|
-
readonly description: "Perform a sequence of raw actions on an interactive runner in one request, one after another, and answer with what happened to each. A `success` means every action took effect. A `failure` names the first action that did not (`failedIndex`, `failureReason`), the last one that did (`lastCompletedIndex`), and whether actions were left unperformed (`stoppedEarly`); `results` has one entry per action reached, in order. Read `effect` on an entry before sending its action again: `performed` means the runner did it; `not-performed` means the runner answered that it did not take effect, though a `navigate` that timed out may still be loading; `unknown` means the runner stopped answering with the action in flight (`runner-unreachable`), or its screen went quiet mid-action (`action-unconfirmed`), and it may have taken effect — a click that submitted a form, say — so take a screenshot instead of repeating it. A sequence gets about a minute to start its actions; an action it did not reach in time is `out-of-time`, nothing after it was attempted, and the rest can go in a new request. Everything `runner.performAction` says about a runner that has never run anything, a mobile runner, and the `screen-needs-a-run`, `screen-not-ready`, `runner-has-no-screen`, `action-not-supported-on-mobile` and `action-not-supported-on-browser` reasons holds for each action here.";
|
|
862
|
+
readonly description: "Perform a sequence of raw actions on an interactive runner in one request, one after another, and answer with what happened to each. A `success` means every action took effect. A `failure` names the first action that did not (`failedIndex`, `failureReason`), the last one that did (`lastCompletedIndex`), and whether actions were left unperformed (`stoppedEarly`); `results` has one entry per action reached, in order. Read `effect` on an entry before sending its action again: `performed` means the runner did it; `not-performed` means the runner answered that it did not take effect, though a `navigate` that timed out may still be loading; `unknown` means the runner stopped answering with the action in flight (`runner-unreachable`), or its screen went quiet mid-action (`action-unconfirmed`), and it may have taken effect — a click that submitted a form, say — so take a screenshot instead of repeating it. A sequence gets about a minute to start its actions; an action it did not reach in time is `out-of-time`, nothing after it was attempted, and the rest can go in a new request. Everything `runner.performAction` says about a runner that has never run anything, a mobile or Windows runner, and the `screen-needs-a-run`, `screen-not-ready`, `runner-has-no-screen`, `action-not-supported-on-mobile` and `action-not-supported-on-browser` reasons holds for each action here.";
|
|
863
863
|
readonly input: import("zod").ZodObject<{
|
|
864
864
|
actions: import("zod").ZodArray<import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
|
|
865
865
|
button: import("zod").ZodLiteral<"left" | "right" | "wheel" | "back" | "forward">;
|
|
@@ -27,8 +27,8 @@ export declare const makeEvaluateSnippetOnRunnerContract: <WorkspaceId extends P
|
|
|
27
27
|
errorMessage: z.ZodOptional<z.ZodString>;
|
|
28
28
|
outcome: z.ZodLiteral<"success">;
|
|
29
29
|
result: z.ZodEnum<{
|
|
30
|
-
success: "success";
|
|
31
30
|
error: "error";
|
|
31
|
+
success: "success";
|
|
32
32
|
stopped: "stopped";
|
|
33
33
|
}>;
|
|
34
34
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -67,7 +67,7 @@ export const makeInspectOnRunnerContract = (ids) => {
|
|
|
67
67
|
openWorldHint: false,
|
|
68
68
|
readOnlyHint: false,
|
|
69
69
|
},
|
|
70
|
-
description: "Inspect one thing on an interactive runner: an element's HTML, the page's HTML simplified for a model, or a top-level variable's value as JSON. This refreshes the inactivity timer and can extend the runner's billed lifetime. `nothing-to-inspect` means the runner had nothing to answer with: no live page, no element matching the selector, or no variable under that name. A runner cannot tell those apart, so it reports the one reason and puts whatever it did say in `errorMessage`. `runner-is-not-a-browser`
|
|
70
|
+
description: "Inspect one thing on an interactive runner: an element's HTML, the page's HTML simplified for a model, or a top-level variable's value as JSON. This refreshes the inactivity timer and can extend the runner's billed lifetime. `nothing-to-inspect` means the runner had nothing to answer with: no live page, no element matching the selector, or no variable under that name. A runner cannot tell those apart, so it reports the one reason and puts whatever it did say in `errorMessage`. A mobile or Windows runner answers `variable`; for `element-html` or `page-html` it answers `runner-is-not-a-browser` — call `runner.inspectMobile` for its equivalent surface instead. " +
|
|
71
71
|
retryableRunnerUnreachableDescription,
|
|
72
72
|
input,
|
|
73
73
|
kind: "read",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inspect.js","sourceRoot":"","sources":["../../../src/v1/runner/inspect.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,OAAO,EAAE,cAAc,EAAE,4BAA4B,EAAE,MAAM,eAAe,CAAC;AAC7E,OAAO,EAAE,qCAAqC,EAAE,MAAM,kBAAkB,CAAC;AAEzE,MAAM,CAAC,MAAM,iBAAiB,GAAG,KAAK,CAAC;AACvC,MAAM,qBAAqB,GAAG,GAAG,CAAC;AAElC,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,kBAAkB,CAAC,MAAM,EAAE;IAC/D,CAAC,CAAC,MAAM,CAAC;QACP,QAAQ,EAAE,CAAC;aACR,MAAM,EAAE;aACR,GAAG,CAAC,CAAC,CAAC;aACN,GAAG,CAAC,iBAAiB,CAAC;aACtB,QAAQ,CAAC,iDAAiD,CAAC;QAC9D,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,cAAc,CAAC;KAChC,CAAC;IACF,CAAC,CAAC,MAAM,CAAC;QACP,QAAQ,EAAE,CAAC;aACR,MAAM,EAAE;aACR,GAAG,CAAC,CAAC,CAAC;aACN,GAAG,CAAC,iBAAiB,CAAC;aACtB,QAAQ,EAAE;aACV,QAAQ,CAAC,4DAA4D,CAAC;QACzE,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,WAAW,CAAC;KAC7B,CAAC;IACF,CAAC,CAAC,MAAM,CAAC;QACP,YAAY,EAAE,CAAC;aACZ,MAAM,EAAE;aACR,GAAG,CAAC,CAA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ly readOnlyHint: true;
|
|
52
52
|
};
|
|
53
|
-
readonly description: "Inspect one thing on a mobile interactive runner: the Appium session's status, the
|
|
53
|
+
readonly description: "Inspect one thing on a mobile or Windows interactive runner: the Appium session's status, the contexts available (WebViews on mobile, top-level windows on Windows), the current context's page source, or the elements at a point, carrying some text, or matching a selector. This does not refresh the runner's inactivity timer. Mobile and Windows only — a browser runner answers `runner-is-not-mobile`; call `runner.inspect` for a browser's equivalent surface instead. `what: \"session\"` always answers with the session's own status rather than `screen-needs-a-run`, since that is the question it exists to answer; the other three request kinds need a live session first and answer the same `screen-needs-a-run` or `screen-not-ready` outcomes `runner.performAction` and `runner.takeScreenshot` use, instead of reading anything when there is none. `screen-needs-a-run` means no Appium session has started on this runner yet — call `runner.runFlow` with a flow that opens one, then inspect again. `screen-not-ready` means the runner's Appium session exists but did not answer this instant, or more than one is somehow live — retry once; if it persists, relaunch the runner. `runner-is-not-mobile` means there is nothing here to inspect, and retrying will never help — launch an `android`, `ios` or `windows` runner instead. `invalid-selector` (elements by selector only) means the selector itself could not be parsed under the given `strategy` — distinct from a selector that parsed fine but matched nothing, which answers `matches: []` instead. `runner-unreachable` if the runner could not be reached: it may still be starting, it may have terminated after inactivity, or it may be too busy to answer. Nothing was changed, so retrying is safe; if it persists, launch the runner again.";
|
|
54
54
|
readonly input: z.ZodObject<{
|
|
55
55
|
id: z.ZodString;
|
|
56
56
|
request: z.ZodDiscriminatedUnion<[z.ZodObject<{
|