@qawolf/cli 2.13.1 → 2.15.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/cli.js +539 -57
- package/dist/runner-sdk.js +478 -51
- package/package.json +2 -2
- package/skills/qawolf-cli/SKILL.md +14 -7
- package/skills/qawolf-cli/references/run-results.md +6 -5
package/dist/runner-sdk.js
CHANGED
|
@@ -8835,14 +8835,17 @@ var issueFileSchema = object({
|
|
|
8835
8835
|
sizeBytes: number2().int().nonnegative()
|
|
8836
8836
|
});
|
|
8837
8837
|
|
|
8838
|
+
// node_modules/@qawolf/api-contracts/dist/v1/extensibleValue.js
|
|
8839
|
+
var extensibleValue = (values, meanings) => string2().describe(`One of ${values.join(", ")}; newer servers may add values, so ignore any you don't know. ${meanings}`);
|
|
8840
|
+
|
|
8838
8841
|
// node_modules/@qawolf/api-contracts/dist/v1/build/resource.js
|
|
8839
|
-
var buildPlatformSchema =
|
|
8842
|
+
var buildPlatformSchema = extensibleValue(["android", "ios", "linux"], "The OS the build runs on, read from its file type. `linux` builds are Electron apps that Electron flows launch.");
|
|
8840
8843
|
var buildIdSchema = string2().regex(/^[a-z0-9]{24}obld$/, "Expected a build id from build.requestUpload.").describe("The id of the build, from build.requestUpload.");
|
|
8841
8844
|
var makeBuildResourceSchema = (ids) => resource({
|
|
8842
|
-
appId: string2().describe("The package name (Android) or bundle ID (iOS) read from the file. A flow launches it with `launch({ app: { id } })`."),
|
|
8845
|
+
appId: string2().describe("The package name (Android, Linux) or bundle ID (iOS) read from the file. A flow launches it with `launch({ app: { id } })`."),
|
|
8843
8846
|
appName: string2().optional().describe("The app's display name, when the file names one."),
|
|
8844
8847
|
branch: string2().optional().describe("The branch the uploader said the build came from."),
|
|
8845
|
-
buildNumber: string2().optional().describe("versionCode (Android)
|
|
8848
|
+
buildNumber: string2().optional().describe("versionCode (Android), CFBundleVersion (iOS) or RPM release (Linux), when the file has one."),
|
|
8846
8849
|
commitSha: string2().optional().describe("The commit the uploader said the build came from."),
|
|
8847
8850
|
createdAt: exports_iso.datetime().describe("When the build was created."),
|
|
8848
8851
|
deletedAt: exports_iso.datetime().optional().describe("When the build was deleted. Runs never install it after."),
|
|
@@ -8851,7 +8854,7 @@ var makeBuildResourceSchema = (ids) => resource({
|
|
|
8851
8854
|
id: buildIdSchema,
|
|
8852
8855
|
platform: buildPlatformSchema,
|
|
8853
8856
|
sizeBytes: number2().int().optional().describe("The file's size in bytes."),
|
|
8854
|
-
version: string2().optional().describe("versionName (Android)
|
|
8857
|
+
version: string2().optional().describe("versionName (Android), CFBundleShortVersionString (iOS) or package version (Linux), when the file has one.")
|
|
8855
8858
|
}, { urlFieldDescription: "Absolute URL of the team's Builds page." });
|
|
8856
8859
|
var makeBuildEnvironmentSelectorSchema = (ids) => union([
|
|
8857
8860
|
strictObject({
|
|
@@ -9816,18 +9819,22 @@ var triggerDayOfWeekSchema = _enum([
|
|
|
9816
9819
|
"saturday",
|
|
9817
9820
|
"sunday"
|
|
9818
9821
|
]).describe("A day of the week, named rather than numbered.");
|
|
9819
|
-
var
|
|
9820
|
-
var
|
|
9822
|
+
var actionKindDescription = "createSuite runs the flows named by flowIds and tagNames. generativeSuite lets QA Wolf choose the flows from the deployment's changes, and is not available to a schedule.";
|
|
9823
|
+
var triggerActionKindSchema = _enum(["createSuite", "generativeSuite", "startAgent"]).describe(`${actionKindDescription} startAgent starts a QA Wolf session that carries out instructions.`);
|
|
9824
|
+
var triggerConfigurationActionKindSchema = _enum(["createSuite", "generativeSuite"]).describe(actionKindDescription);
|
|
9825
|
+
var triggerActionKindField = triggerActionKindSchema.default("createSuite");
|
|
9826
|
+
var triggerConfigurationActionKindField = triggerConfigurationActionKindSchema.default("createSuite");
|
|
9827
|
+
var makeTriggerActionSchema = (ids, actionKind) => object({
|
|
9821
9828
|
flowIds: array(ids.flow).default([]).describe("Flows to run. Combined with tagNames."),
|
|
9822
|
-
instructions: string2().min(1).optional().describe("
|
|
9829
|
+
instructions: string2().min(1).optional().describe("For generativeSuite, optional guidance for QA Wolf. For startAgent, required: the task QA Wolf carries out each time the trigger fires."),
|
|
9823
9830
|
investigateFailures: boolean2().optional().describe("Whether QA Wolf investigates failures in the resulting runs. Defaults to true."),
|
|
9824
|
-
kind:
|
|
9831
|
+
kind: actionKind,
|
|
9825
9832
|
runConcurrencyLimit: string2().trim().min(1).max(255).optional().describe(`How many runs of the resulting suite may execute at once: a whole number from 1 to 1000, "unlimited", or a concurrency expression, which the server validates. It replaces the environment's limit rather than capping below it. Omit it to leave the environment's limit in charge.`),
|
|
9826
9833
|
suggestCoverage: boolean2().optional().describe("Whether QA Wolf explores the environment after the resulting runs and suggests coverage that nothing tests yet. Defaults to false."),
|
|
9827
9834
|
tagNames: array(string2().min(1)).default([]).describe("Tags naming the flows to run. Combined with flowIds.")
|
|
9828
9835
|
}).describe("What the trigger runs when it fires.");
|
|
9829
|
-
var makeTriggerScheduleFields = (ids) => ({
|
|
9830
|
-
action: makeTriggerActionSchema(ids),
|
|
9836
|
+
var makeTriggerScheduleFields = (ids, actionKind) => ({
|
|
9837
|
+
action: makeTriggerActionSchema(ids, actionKind),
|
|
9831
9838
|
cadence: triggerCadenceSchema,
|
|
9832
9839
|
dayOfWeek: triggerDayOfWeekSchema.optional().describe("The day a weekly schedule fires on, read in timezoneId. Required when cadence is weekly."),
|
|
9833
9840
|
daysOfWeek: array(triggerDayOfWeekSchema).min(1).refine((daysOfWeek) => new Set(daysOfWeek).size === daysOfWeek.length, {
|
|
@@ -9984,7 +9991,48 @@ var checkScheduleRepeat = (value, ctx) => {
|
|
|
9984
9991
|
};
|
|
9985
9992
|
|
|
9986
9993
|
// node_modules/@qawolf/api-contracts/dist/v1/trigger/configurationRules.js
|
|
9994
|
+
var startAgentInstructionsMaxLength = 1e4;
|
|
9995
|
+
var suiteOnlyFields = [
|
|
9996
|
+
"investigateFailures",
|
|
9997
|
+
"runConcurrencyLimit",
|
|
9998
|
+
"suggestCoverage"
|
|
9999
|
+
];
|
|
10000
|
+
var checkStartAgent = (action, ctx) => {
|
|
10001
|
+
if (action.flowIds.length + action.tagNames.length > 0) {
|
|
10002
|
+
ctx.addIssue({
|
|
10003
|
+
code: "custom",
|
|
10004
|
+
message: "flowIds and tagNames do not apply when the action is startAgent.",
|
|
10005
|
+
path: ["action", "flowIds"]
|
|
10006
|
+
});
|
|
10007
|
+
}
|
|
10008
|
+
for (const field of suiteOnlyFields.filter((name) => action[name] !== undefined)) {
|
|
10009
|
+
ctx.addIssue({
|
|
10010
|
+
code: "custom",
|
|
10011
|
+
message: `${field} does not apply when the action is startAgent.`,
|
|
10012
|
+
path: ["action", field]
|
|
10013
|
+
});
|
|
10014
|
+
}
|
|
10015
|
+
if (action.instructions === undefined || !action.instructions.trim()) {
|
|
10016
|
+
ctx.addIssue({
|
|
10017
|
+
code: "custom",
|
|
10018
|
+
message: "A startAgent action needs instructions.",
|
|
10019
|
+
path: ["action", "instructions"]
|
|
10020
|
+
});
|
|
10021
|
+
return;
|
|
10022
|
+
}
|
|
10023
|
+
if (action.instructions.trim().length > startAgentInstructionsMaxLength) {
|
|
10024
|
+
ctx.addIssue({
|
|
10025
|
+
code: "custom",
|
|
10026
|
+
message: `instructions must be at most ${startAgentInstructionsMaxLength} characters.`,
|
|
10027
|
+
path: ["action", "instructions"]
|
|
10028
|
+
});
|
|
10029
|
+
}
|
|
10030
|
+
};
|
|
9987
10031
|
var checkAction = (action, ctx) => {
|
|
10032
|
+
if (action.kind === "startAgent") {
|
|
10033
|
+
checkStartAgent(action, ctx);
|
|
10034
|
+
return;
|
|
10035
|
+
}
|
|
9988
10036
|
const namesFlows = action.flowIds.length + action.tagNames.length > 0;
|
|
9989
10037
|
if (action.kind === "generativeSuite") {
|
|
9990
10038
|
if (namesFlows) {
|
|
@@ -9999,7 +10047,7 @@ var checkAction = (action, ctx) => {
|
|
|
9999
10047
|
if (action.instructions !== undefined) {
|
|
10000
10048
|
ctx.addIssue({
|
|
10001
10049
|
code: "custom",
|
|
10002
|
-
message: "instructions apply to a generativeSuite action only.",
|
|
10050
|
+
message: "instructions apply to a generativeSuite or startAgent action only.",
|
|
10003
10051
|
path: ["action", "instructions"]
|
|
10004
10052
|
});
|
|
10005
10053
|
}
|
|
@@ -10040,8 +10088,8 @@ var checkTriggerConfiguration = (value, ctx) => value.kind === "schedule" ? chec
|
|
|
10040
10088
|
// node_modules/@qawolf/api-contracts/dist/v1/trigger/deploymentFields.js
|
|
10041
10089
|
var patternSyntax = "The pattern ignores case: * matches any text, / included; {main,hotfix} matches any one of its comma-separated options; a leading ! matches every value the rest does not; every other character, ? and [ included, matches only itself.";
|
|
10042
10090
|
var describePattern = (meaning) => `${meaning} ${patternSyntax}`;
|
|
10043
|
-
var makeTriggerDeploymentFields = (ids) => ({
|
|
10044
|
-
action: makeTriggerActionSchema(ids),
|
|
10091
|
+
var makeTriggerDeploymentFields = (ids, actionKind) => ({
|
|
10092
|
+
action: makeTriggerActionSchema(ids, actionKind),
|
|
10045
10093
|
branchPattern: string2().min(1).optional().describe(describePattern("Only fire for deployments of a branch matching this pattern.")),
|
|
10046
10094
|
deployTargetPattern: string2().min(1).optional().describe(describePattern("Only fire for deployments whose deploy target matches this pattern. A deploy target is the URL the deploy reported, which many deployments do not carry.")),
|
|
10047
10095
|
environmentIds: array(ids.environment).default([]).describe("Only fire for deployments to these environments. Mutually exclusive with environmentPattern."),
|
|
@@ -10050,54 +10098,62 @@ var makeTriggerDeploymentFields = (ids) => ({
|
|
|
10050
10098
|
servicePattern: string2().min(1).optional().describe(describePattern("Only fire for deployments whose service matches this pattern. A deployment that names no service never matches it."))
|
|
10051
10099
|
});
|
|
10052
10100
|
|
|
10101
|
+
// node_modules/@qawolf/api-contracts/dist/v1/trigger/describedFields.js
|
|
10102
|
+
var triggerDescriptionMaxLength = 500;
|
|
10103
|
+
var triggerDescriptionSchema = string2().trim().min(1).max(triggerDescriptionMaxLength);
|
|
10104
|
+
var triggerPausedReasonSchema = _enum(["no-owner", "owner-left-team"]).describe("Why QA Wolf paused the trigger. no-owner: it runs AI and no person owns it, as when a team API key made it. owner-left-team: its owner is no longer a member. A person resumes it by taking ownership in the app.");
|
|
10105
|
+
|
|
10053
10106
|
// node_modules/@qawolf/api-contracts/dist/v1/trigger/resource.js
|
|
10054
|
-
var
|
|
10107
|
+
var makeFlatConfigurationArms = (ids, actionKind) => [
|
|
10055
10108
|
object({
|
|
10056
|
-
...makeTriggerScheduleFields({
|
|
10057
|
-
environmentId: ids.environment,
|
|
10058
|
-
flow: ids.flow
|
|
10059
|
-
}),
|
|
10109
|
+
...makeTriggerScheduleFields({ environmentId: ids.environment, flow: ids.flow }, actionKind),
|
|
10060
10110
|
kind: literal("schedule")
|
|
10061
10111
|
}),
|
|
10062
10112
|
object({
|
|
10063
|
-
...makeTriggerDeploymentFields(ids),
|
|
10113
|
+
...makeTriggerDeploymentFields(ids, actionKind),
|
|
10064
10114
|
kind: literal("deployment")
|
|
10065
|
-
})
|
|
10115
|
+
})
|
|
10116
|
+
];
|
|
10117
|
+
var makeTriggerConfigurationSchema = (ids) => discriminatedUnion("kind", [
|
|
10118
|
+
...makeFlatConfigurationArms(ids, triggerConfigurationActionKindField),
|
|
10066
10119
|
object({
|
|
10067
10120
|
actionCount: number2().int().describe("How many actions it runs."),
|
|
10068
10121
|
kind: literal("advanced"),
|
|
10069
10122
|
whenCount: number2().int().describe("How many separate match conditions it has.")
|
|
10070
10123
|
})
|
|
10071
10124
|
]);
|
|
10125
|
+
var makeTriggerDefinitionSchema = (ids) => discriminatedUnion("kind", makeFlatConfigurationArms(ids, triggerActionKindField)).optional().catch(undefined).describe("The trigger's full configuration, which trigger.update accepts back. Absent for an advanced trigger, and for a kind this client does not know.");
|
|
10072
10126
|
var makeTriggerResourceSchema = (ids) => resource({
|
|
10073
10127
|
configuration: makeTriggerConfigurationSchema(ids),
|
|
10074
10128
|
createdAt: exports_iso.datetime(),
|
|
10129
|
+
definition: makeTriggerDefinitionSchema(ids),
|
|
10130
|
+
description: string2().optional().describe("What the trigger is for, in the team's words."),
|
|
10075
10131
|
id: ids.trigger,
|
|
10076
10132
|
isPaused: boolean2().describe("A paused trigger never fires, on any path."),
|
|
10077
10133
|
name: string2(),
|
|
10078
10134
|
nextScheduledAt: exports_iso.datetime().optional().describe("When a schedule trigger next fires. Absent for a deployment trigger, and while a schedule trigger is paused."),
|
|
10079
10135
|
pausedAt: exports_iso.datetime().optional().describe("When it was paused."),
|
|
10136
|
+
pausedReason: triggerPausedReasonSchema.optional().catch(undefined),
|
|
10080
10137
|
updatedAt: exports_iso.datetime()
|
|
10081
10138
|
}, { urlFieldDescription: "Absolute URL of the team's triggers page." });
|
|
10082
10139
|
|
|
10083
10140
|
// node_modules/@qawolf/api-contracts/dist/v1/trigger/create.js
|
|
10084
10141
|
var makeCreateTriggerContract = (ids) => {
|
|
10085
10142
|
const commonFields = {
|
|
10143
|
+
description: triggerDescriptionSchema.optional().describe("What the trigger is for, in the team's words."),
|
|
10144
|
+
isPaused: boolean2().optional().describe("Create the trigger paused, so it never fires until trigger.resume. Defaults to false."),
|
|
10086
10145
|
name: string2().trim().min(1).max(255),
|
|
10087
10146
|
workspaceId: ids.workspace.optional().describe("The workspace to create the trigger in. Required when authenticating with an organization or user API key.")
|
|
10088
10147
|
};
|
|
10089
10148
|
const input = discriminatedUnion("kind", [
|
|
10090
10149
|
object({
|
|
10091
10150
|
...commonFields,
|
|
10092
|
-
...makeTriggerScheduleFields({
|
|
10093
|
-
environmentId: ids.environmentRef,
|
|
10094
|
-
flow: ids.flow
|
|
10095
|
-
}),
|
|
10151
|
+
...makeTriggerScheduleFields({ environmentId: ids.environmentRef, flow: ids.flow }, triggerActionKindField),
|
|
10096
10152
|
kind: literal("schedule")
|
|
10097
10153
|
}),
|
|
10098
10154
|
object({
|
|
10099
10155
|
...commonFields,
|
|
10100
|
-
...makeTriggerDeploymentFields(ids),
|
|
10156
|
+
...makeTriggerDeploymentFields(ids, triggerActionKindField),
|
|
10101
10157
|
kind: literal("deployment")
|
|
10102
10158
|
})
|
|
10103
10159
|
]).superRefine(checkTriggerConfiguration);
|
|
@@ -10113,7 +10169,7 @@ var makeCreateTriggerContract = (ids) => {
|
|
|
10113
10169
|
openWorldHint: true,
|
|
10114
10170
|
readOnlyHint: false
|
|
10115
10171
|
},
|
|
10116
|
-
description: "Create a trigger. A schedule trigger
|
|
10172
|
+
description: "Create a trigger. A schedule trigger fires on a cadence; " + "a deployment trigger fires when a matching deployment is reported. Its action runs " + "flows, or, as startAgent, starts a QA Wolf session that carries out its instructions. " + "A startAgent trigger made with a team API key has no owner, so it stays paused until " + "a person takes ownership of it in the app.",
|
|
10117
10173
|
input,
|
|
10118
10174
|
kind: "write",
|
|
10119
10175
|
name: "trigger.create",
|
|
@@ -10239,24 +10295,92 @@ var makeDeleteTriggerContract = (ids) => {
|
|
|
10239
10295
|
};
|
|
10240
10296
|
};
|
|
10241
10297
|
|
|
10298
|
+
// node_modules/@qawolf/api-contracts/dist/v1/trigger/listFirings.js
|
|
10299
|
+
var makeFiringSchema = (ids) => object({
|
|
10300
|
+
deploymentId: ids.deployment.optional().describe("The deployment it fired on, for a deployment or by hand."),
|
|
10301
|
+
environmentId: ids.environment.optional().describe("The environment it fired in. Absent for a pull request or QA Wolf event firing."),
|
|
10302
|
+
firedAt: exports_iso.datetime(),
|
|
10303
|
+
id: string2().describe("The firing's id."),
|
|
10304
|
+
occasion: string2().describe("What fired it: deployment, schedule, or manual for trigger.runNow and the app's Run now. Later versions add kinds."),
|
|
10305
|
+
outcome: string2().describe("fired: the trigger started its action. skipped: it chose not to, and reason says why. failed: it could not start it."),
|
|
10306
|
+
reason: string2().optional().describe("Why a skipped or failed firing started nothing, as a stable code such as trigger-paused, session-limit-reached or no-enabled-workflows. Later versions add codes."),
|
|
10307
|
+
runId: ids.run.optional().describe("The run the firing started."),
|
|
10308
|
+
sessionId: ids.chatSession.optional().describe("The QA Wolf session a startAgent firing started."),
|
|
10309
|
+
sessionStatus: string2().optional().describe("How that session stands now, as agent.send reports it: working, waiting-for-you, completed, failed or cancelled."),
|
|
10310
|
+
startedBy: string2().optional().describe("Who fired it by hand. Absent for any other firing.")
|
|
10311
|
+
});
|
|
10312
|
+
var makeListTriggerFiringsContract = (ids) => {
|
|
10313
|
+
const input = object({
|
|
10314
|
+
triggerId: ids.trigger,
|
|
10315
|
+
...makePaginationInputFields({ defaultLimit: 20, maxLimit: 100 })
|
|
10316
|
+
});
|
|
10317
|
+
const output = object({
|
|
10318
|
+
firings: array(makeFiringSchema(ids)).describe("The trigger's firings, newest first."),
|
|
10319
|
+
nextCursor: nextCursorSchema
|
|
10320
|
+
});
|
|
10321
|
+
return {
|
|
10322
|
+
annotationJustifications: {
|
|
10323
|
+
destructiveHint: "Does not modify the trigger, its runs or its sessions.",
|
|
10324
|
+
openWorldHint: "Reads private QA Wolf trigger history without changing external systems.",
|
|
10325
|
+
readOnlyHint: "Lists when one authorized trigger fired and what each firing started."
|
|
10326
|
+
},
|
|
10327
|
+
annotations: {
|
|
10328
|
+
destructiveHint: false,
|
|
10329
|
+
openWorldHint: false,
|
|
10330
|
+
readOnlyHint: true
|
|
10331
|
+
},
|
|
10332
|
+
description: "List when a trigger fired and what each firing started: a run, a QA Wolf " + "session, or nothing and why.",
|
|
10333
|
+
input,
|
|
10334
|
+
kind: "read",
|
|
10335
|
+
name: "trigger.listFirings",
|
|
10336
|
+
output
|
|
10337
|
+
};
|
|
10338
|
+
};
|
|
10339
|
+
|
|
10340
|
+
// node_modules/@qawolf/api-contracts/dist/v1/trigger/runNow.js
|
|
10341
|
+
var makeRunTriggerNowContract = (ids) => {
|
|
10342
|
+
const input = object({
|
|
10343
|
+
deploymentId: ids.deployment.optional().describe("The recent deployment a deployment trigger fires on, which must match the trigger. The trigger's first when decides its kind: a deployment trigger requires this, and a schedule trigger refuses it, firing on its own environment as if its slot came now."),
|
|
10344
|
+
requestId: string2().trim().min(1).max(100).describe("Any string that is new for each firing. Repeating a request with the same requestId fires the trigger once."),
|
|
10345
|
+
triggerId: ids.trigger
|
|
10346
|
+
});
|
|
10347
|
+
const output = object({ trigger: makeTriggerResourceSchema(ids) });
|
|
10348
|
+
return {
|
|
10349
|
+
annotationJustifications: {
|
|
10350
|
+
destructiveHint: "Starts the trigger's action, which can run tests that change or delete application data.",
|
|
10351
|
+
openWorldHint: "The firing can start test runs or a QA Wolf session against external applications.",
|
|
10352
|
+
readOnlyHint: "Fires the trigger once, starting its runs or its QA Wolf session."
|
|
10353
|
+
},
|
|
10354
|
+
annotations: {
|
|
10355
|
+
destructiveHint: true,
|
|
10356
|
+
openWorldHint: true,
|
|
10357
|
+
readOnlyHint: false
|
|
10358
|
+
},
|
|
10359
|
+
description: "Fire a trigger once by hand. It works on a " + "paused trigger too, and does the same as any other firing, except that a run it " + "starts is not linked to the deployment or its pull request. Follow the firing with " + "trigger.listFirings.",
|
|
10360
|
+
input,
|
|
10361
|
+
kind: "write",
|
|
10362
|
+
name: "trigger.runNow",
|
|
10363
|
+
output
|
|
10364
|
+
};
|
|
10365
|
+
};
|
|
10366
|
+
|
|
10242
10367
|
// node_modules/@qawolf/api-contracts/dist/v1/trigger/update.js
|
|
10243
10368
|
var makeUpdateTriggerContract = (ids) => {
|
|
10244
10369
|
const commonFields = {
|
|
10370
|
+
description: triggerDescriptionSchema.optional().describe("What the trigger is for, in the team's words. Omit it to keep the current description."),
|
|
10371
|
+
isPaused: boolean2().optional().describe("Pause or resume the trigger once the configuration is written. Omit it to leave the trigger as it is. To keep a running trigger from firing on the new configuration, pause it with trigger.pause first."),
|
|
10245
10372
|
name: string2().trim().min(1).max(255),
|
|
10246
10373
|
triggerId: ids.trigger
|
|
10247
10374
|
};
|
|
10248
10375
|
const input = discriminatedUnion("kind", [
|
|
10249
10376
|
object({
|
|
10250
10377
|
...commonFields,
|
|
10251
|
-
...makeTriggerScheduleFields({
|
|
10252
|
-
environmentId: ids.environmentRef,
|
|
10253
|
-
flow: ids.flow
|
|
10254
|
-
}),
|
|
10378
|
+
...makeTriggerScheduleFields({ environmentId: ids.environmentRef, flow: ids.flow }, triggerActionKindField),
|
|
10255
10379
|
kind: literal("schedule")
|
|
10256
10380
|
}),
|
|
10257
10381
|
object({
|
|
10258
10382
|
...commonFields,
|
|
10259
|
-
...makeTriggerDeploymentFields(ids),
|
|
10383
|
+
...makeTriggerDeploymentFields(ids, triggerActionKindField),
|
|
10260
10384
|
kind: literal("deployment")
|
|
10261
10385
|
})
|
|
10262
10386
|
]).superRefine(checkTriggerConfiguration);
|
|
@@ -10272,7 +10396,7 @@ var makeUpdateTriggerContract = (ids) => {
|
|
|
10272
10396
|
openWorldHint: true,
|
|
10273
10397
|
readOnlyHint: false
|
|
10274
10398
|
},
|
|
10275
|
-
description: "Replace a trigger's configuration. Every field is written, so read the
|
|
10399
|
+
description: "Replace a trigger's configuration. " + "Every configuration field is written, so read the trigger first and send its " + "definition back with your changes applied. isPaused and description are kept " + "when omitted.",
|
|
10276
10400
|
input,
|
|
10277
10401
|
kind: "write",
|
|
10278
10402
|
name: "trigger.update",
|
|
@@ -10286,8 +10410,10 @@ var makeTriggerContracts = (ids) => ({
|
|
|
10286
10410
|
delete: makeDeleteTriggerContract(ids),
|
|
10287
10411
|
find: makeFindTriggersContract(ids),
|
|
10288
10412
|
get: makeGetTriggerContract(ids),
|
|
10413
|
+
listFirings: makeListTriggerFiringsContract(ids),
|
|
10289
10414
|
pause: makePauseTriggerContract(ids),
|
|
10290
10415
|
resume: makeResumeTriggerContract(ids),
|
|
10416
|
+
runNow: makeRunTriggerNowContract(ids),
|
|
10291
10417
|
update: makeUpdateTriggerContract(ids)
|
|
10292
10418
|
});
|
|
10293
10419
|
// node_modules/@qawolf/api-contracts/dist/v1/agent/get.js
|
|
@@ -10413,6 +10539,7 @@ var makeGetAttemptContract = (ids) => {
|
|
|
10413
10539
|
const failuresTruncated = boolean2().optional().describe("True when the attempt reached the 100-failure limit, so failures may leave some out. Present whenever failures is.");
|
|
10414
10540
|
const artifactUrls = {
|
|
10415
10541
|
logsUrl: url().optional(),
|
|
10542
|
+
networkLogsUrl: url().optional().describe("Signed URL for the attempt's iOS network log, as NDJSON: request and connection lines are HAR 1.2 entries, DNS and WebSocket lines are `_qawolf` objects, and the last line is a summary. For up to 2 minutes after the attempt ends, the file can be partial or 404 while the runner uploads it; it is final once the summary line is there. Signed for every attempt; after that, a 404 means the attempt captured no network."),
|
|
10416
10543
|
traceUrl: url().optional(),
|
|
10417
10544
|
videoUrl: url().optional()
|
|
10418
10545
|
};
|
|
@@ -10521,7 +10648,7 @@ var makeDeleteBuildContract = (ids) => {
|
|
|
10521
10648
|
openWorldHint: false,
|
|
10522
10649
|
readOnlyHint: false
|
|
10523
10650
|
},
|
|
10524
|
-
description: "Delete a build. Runs never install a deleted build. Deleting an environment's latest build makes the previous one its latest. Runs install that build only if its file is still kept
|
|
10651
|
+
description: "Delete a build. Runs never install a deleted build. Deleting an environment's latest build makes the previous one its latest. Runs install that build only if its file is still kept. On QA Wolf's cloud, the latest builds of static environments are always kept. Otherwise the newest 50 builds of each app and platform in an environment, and the newest 100 with no environment, are kept up to 180 days after upload; older ones are deleted 7 days after they fall out. The builds of a terminated preview environment are deleted 7 days after it terminates. Answers the build with deletedAt set. Deleting a deleted build answers it unchanged.",
|
|
10525
10652
|
input,
|
|
10526
10653
|
kind: "write",
|
|
10527
10654
|
name: "build.delete",
|
|
@@ -10624,7 +10751,7 @@ var makeRequestBuildDownloadContract = (ids) => {
|
|
|
10624
10751
|
var makeRequestBuildUploadContract = (ids) => {
|
|
10625
10752
|
const input = object({
|
|
10626
10753
|
buildId: buildIdSchema.optional().describe("Send the buildId of an earlier answer to get a fresh URL for the same build. Omit for a new build."),
|
|
10627
|
-
fileName: string2().regex(/^[A-Za-z0-9._-]{1,255}$/, "A file name is one path segment of letters, digits, dots, dashes and underscores, at most 255 characters.").refine((fileName) => /\.(apk|aab|ipa)$/i.test(fileName), "A build is an .apk, .aab or .
|
|
10754
|
+
fileName: string2().regex(/^[A-Za-z0-9._-]{1,255}$/, "A file name is one path segment of letters, digits, dots, dashes and underscores, at most 255 characters.").refine((fileName) => /\.(apk|aab|ipa|deb|rpm)$/i.test(fileName), "A build is an .apk, .aab, .ipa, .deb or .rpm file.").describe("The file's name, such as `app-release.apk`, `app-release.aab`, `App.ipa` or `my-app_1.0.0_amd64.deb`. Its extension sets the platform."),
|
|
10628
10755
|
fileSizeBytes: number2().int().min(1).describe("The file's exact size in bytes, at most the workspace's limit, 1 GB by default. The URL accepts only a file of this size."),
|
|
10629
10756
|
workspaceId: ids.workspace.optional().describe("The workspace to upload into. Required when authenticating with an organization or user API key.")
|
|
10630
10757
|
});
|
|
@@ -10645,7 +10772,7 @@ var makeRequestBuildUploadContract = (ids) => {
|
|
|
10645
10772
|
openWorldHint: false,
|
|
10646
10773
|
readOnlyHint: false
|
|
10647
10774
|
},
|
|
10648
|
-
description: "Get a URL to upload an app build: an .apk, .aab or .
|
|
10775
|
+
description: "Get a URL to upload an app build: an .apk, .aab, .ipa, or a Linux Electron app as a .deb or .rpm, up to 1 GB by default. PUT the file there with uploadHeaders, then call build.create with the buildId.",
|
|
10649
10776
|
input,
|
|
10650
10777
|
kind: "write",
|
|
10651
10778
|
name: "build.requestUpload",
|
|
@@ -10706,6 +10833,66 @@ var makeFindCodeHostIntegrationsContract = (ids) => {
|
|
|
10706
10833
|
};
|
|
10707
10834
|
};
|
|
10708
10835
|
|
|
10836
|
+
// node_modules/@qawolf/api-contracts/dist/v1/codeHostIntegration/findForRepository.js
|
|
10837
|
+
var scpLikeUser = /^([^@/]+)@[^@/:]+:(?!\/\/)/;
|
|
10838
|
+
function carriesCredentials(url2) {
|
|
10839
|
+
const trimmed = url2.trim();
|
|
10840
|
+
if (URL.canParse(trimmed)) {
|
|
10841
|
+
const { password, username } = new URL(trimmed);
|
|
10842
|
+
return password !== "" || username !== "" && username !== "git";
|
|
10843
|
+
}
|
|
10844
|
+
const user = scpLikeUser.exec(trimmed)?.[1];
|
|
10845
|
+
return user !== undefined && user !== "git";
|
|
10846
|
+
}
|
|
10847
|
+
var settingsUrl = url().describe("Absolute URL of the workspace's integrations settings page.");
|
|
10848
|
+
var makeFindCodeHostIntegrationForRepositoryContract = (ids) => {
|
|
10849
|
+
const input = object({
|
|
10850
|
+
url: string2().min(1).max(2048).refine((url2) => !carriesCredentials(url2), {
|
|
10851
|
+
message: "The URL carries credentials, and it is sent in the request address. Remove the credentials, such as a token before the host, and send the URL again."
|
|
10852
|
+
}).describe(`The repository's URL, as a CI job or a git remote names it: "https://github.com/acme/storefront", "ssh://git@github.com/acme/storefront.git" or "git@gitlab.com:acme/web/storefront.git". The URL is sent in the request address, so it must carry no credentials: QA Wolf refuses one with a user other than "git" or a password. QA Wolf does not fetch or store the URL.`),
|
|
10853
|
+
workspaceId: ids.workspace.optional().describe("The workspace to check. Required when authenticating with an organization or user API key.")
|
|
10854
|
+
});
|
|
10855
|
+
const output = discriminatedUnion("coverage", [
|
|
10856
|
+
object({
|
|
10857
|
+
coverage: literal("covered").describe("A code host integration of the workspace covers the repository."),
|
|
10858
|
+
fullName: string2().describe(`The repository's full name as QA Wolf knows it, such as "acme/storefront". Report deployments of this repository with this exact name.`),
|
|
10859
|
+
permissions: object({
|
|
10860
|
+
code: _enum(["no-access", "read", "write"]).describe(`Access to the repository's code and commits. The QA Wolf Code GitHub app has "write" once QA Wolf turns on code access for the workspace, and "no-access" until then. With "no-access", QA Wolf only knows about changes pushed straight to a branch when a deployment report includes them.`),
|
|
10861
|
+
pullRequests: _enum(["read", "write"]).describe("Access to the repository's pull requests.")
|
|
10862
|
+
}).describe("What the covering integration lets QA Wolf do in the repository."),
|
|
10863
|
+
provider: _enum(["github", "gitlab"]).describe("The code host the covering integration connects."),
|
|
10864
|
+
settingsUrl
|
|
10865
|
+
}),
|
|
10866
|
+
object({
|
|
10867
|
+
coverage: literal("not-covered").describe("No code host integration of the workspace covers the repository, or the integration is suspended. QA Wolf only knows the changes a deployment report includes."),
|
|
10868
|
+
settingsUrl
|
|
10869
|
+
}),
|
|
10870
|
+
object({
|
|
10871
|
+
coverage: literal("unsupported-host").describe("The URL names a code host QA Wolf does not connect to. QA Wolf connects to github.com and gitlab.com.")
|
|
10872
|
+
}),
|
|
10873
|
+
object({
|
|
10874
|
+
coverage: literal("unrecognized-url").describe("The URL is not a repository URL QA Wolf recognizes.")
|
|
10875
|
+
})
|
|
10876
|
+
]);
|
|
10877
|
+
return {
|
|
10878
|
+
annotationJustifications: {
|
|
10879
|
+
destructiveHint: "Does not connect, disconnect or change code host integrations.",
|
|
10880
|
+
openWorldHint: "Answers from QA Wolf integration records without contacting the URL, GitHub or GitLab.",
|
|
10881
|
+
readOnlyHint: "Looks the repository up in the workspace's integrations and stores nothing."
|
|
10882
|
+
},
|
|
10883
|
+
annotations: {
|
|
10884
|
+
destructiveHint: false,
|
|
10885
|
+
openWorldHint: false,
|
|
10886
|
+
readOnlyHint: true
|
|
10887
|
+
},
|
|
10888
|
+
description: "Check whether QA Wolf can read a repository through the workspace's code host integrations, and what it can access: the repository's code and its pull requests. A CI job calls this before reporting a deployment to decide which changes to include. Not covered means QA Wolf only knows the changes the report includes; settingsUrl is where a workspace admin connects the code host.",
|
|
10889
|
+
input,
|
|
10890
|
+
kind: "read",
|
|
10891
|
+
name: "codeHostIntegration.findForRepository",
|
|
10892
|
+
output
|
|
10893
|
+
};
|
|
10894
|
+
};
|
|
10895
|
+
|
|
10709
10896
|
// node_modules/@qawolf/api-contracts/dist/v1/codeHostIntegration/listRepositories.js
|
|
10710
10897
|
var makeListCodeHostRepositoriesContract = (ids) => {
|
|
10711
10898
|
const input = object({
|
|
@@ -10736,6 +10923,13 @@ var makeListCodeHostRepositoriesContract = (ids) => {
|
|
|
10736
10923
|
};
|
|
10737
10924
|
};
|
|
10738
10925
|
|
|
10926
|
+
// node_modules/@qawolf/api-contracts/dist/v1/codeHostIntegration/index.js
|
|
10927
|
+
var makeCodeHostIntegrationContracts = (ids) => ({
|
|
10928
|
+
find: makeFindCodeHostIntegrationsContract(ids),
|
|
10929
|
+
findForRepository: makeFindCodeHostIntegrationForRepositoryContract(ids),
|
|
10930
|
+
listRepositories: makeListCodeHostRepositoriesContract(ids)
|
|
10931
|
+
});
|
|
10932
|
+
|
|
10739
10933
|
// node_modules/@qawolf/api-contracts/dist/v1/deployment/resource.js
|
|
10740
10934
|
var makeDeploymentResourceSchema = (ids) => resource({
|
|
10741
10935
|
branch: string2().optional().describe("The git branch the deployed commit is on. Absent when neither the deployer nor the code host declared one."),
|
|
@@ -10747,9 +10941,17 @@ var makeDeploymentResourceSchema = (ids) => resource({
|
|
|
10747
10941
|
deployTarget: string2().optional().describe("The URL the deployment serves. A trigger's deployTargetPattern matches against it."),
|
|
10748
10942
|
environmentId: ids.environment.describe("The QA Wolf environment the deployment reported into."),
|
|
10749
10943
|
environmentName: string2().optional().describe("The environment's name. Absent when the environment has since been deleted."),
|
|
10944
|
+
environmentVariables: object({
|
|
10945
|
+
secretNames: array(string2()).describe("Override names that are secret in the deployment's environment, sorted. Their values are never returned."),
|
|
10946
|
+
variables: array(object({
|
|
10947
|
+
name: string2(),
|
|
10948
|
+
value: string2().describe("The override value. Handle as a secret.")
|
|
10949
|
+
})).describe("The overrides that are not secret, sorted by name.")
|
|
10950
|
+
}).optional().describe("The environment variable overrides that the deployment report set for the runs this deployment requests. A deployer often puts the version or build number of the release here. Absent when the report set none."),
|
|
10750
10951
|
id: ids.deployment,
|
|
10751
10952
|
provider: _enum(["github", "gitlab", "api"]).optional().describe("How QA Wolf received the deployment: a GitHub webhook, a GitLab webhook, or the deployment.reportStatus API."),
|
|
10752
10953
|
repository: string2().optional().describe(`The repository the deployment came from, as "owner/name". Absent when neither the code host nor the deployment report named one. A trigger's repositoryPattern matches against it.`),
|
|
10954
|
+
runIds: array(ids.run).describe("The runs that tested this deployment, newest first. Empty when no run tested it. run.get reads each one."),
|
|
10753
10955
|
service: string2().optional().describe("Which application was deployed, as the deployer named it. Absent when the deployer named none."),
|
|
10754
10956
|
status: _enum(["pending", "success", "failure", "inactive"]).optional().describe("The deployment's lifecycle status, in the vocabulary deployment.reportStatus accepts. Absent when no status was ever reported.")
|
|
10755
10957
|
}, {
|
|
@@ -10867,16 +11069,44 @@ var makeListDeploymentTriggerEvaluationsContract = (ids) => {
|
|
|
10867
11069
|
// node_modules/@qawolf/api-contracts/dist/v1/deployment/reportStatusChanges.js
|
|
10868
11070
|
var maxChangesBytes = 256 * 1024;
|
|
10869
11071
|
var text = (max) => string2().trim().min(1).max(max);
|
|
10870
|
-
var
|
|
11072
|
+
var sha = (description) => string2().regex(/^[0-9a-f]{7,64}$/iu).describe(description).optional();
|
|
11073
|
+
var number4 = (description) => number2().int().positive().describe(description).optional();
|
|
11074
|
+
var sharedFields = {
|
|
10871
11075
|
changedPaths: array(text(1024)).max(1000).describe("Paths of the files this change touched, without their contents.").optional(),
|
|
10872
11076
|
description: text(4000).describe("The pull request description or the commit message body. Ticket ids and titles belong here or in the title.").optional(),
|
|
10873
|
-
kind: _enum(["pull-request", "commit"]).describe("pull-request for a merged pull request, commit for a commit pushed without one."),
|
|
10874
11077
|
title: text(512).describe('The pull request title or the commit subject, e.g. "Recalculate the cart total with discounts".'),
|
|
10875
11078
|
url: httpUrl().max(2048).describe("A link to the pull request or commit.").optional()
|
|
10876
|
-
}
|
|
11079
|
+
};
|
|
11080
|
+
var changeItem = discriminatedUnion("kind", [
|
|
11081
|
+
strictObject({
|
|
11082
|
+
...sharedFields,
|
|
11083
|
+
kind: literal("pull-request").describe("A merged pull or merge request."),
|
|
11084
|
+
mergeCommitSha: sha("The sha of the commit the pull request landed as: its merge, squash or last rebased commit, at least 7 characters. Lets QA Wolf list a pull request it also reads from your code host only once."),
|
|
11085
|
+
number: number4("The pull or merge request number. Lets QA Wolf list a pull request it also reads from your code host only once.")
|
|
11086
|
+
}),
|
|
11087
|
+
strictObject({
|
|
11088
|
+
...sharedFields,
|
|
11089
|
+
kind: literal("commit").describe("A commit, such as one pushed without a pull request."),
|
|
11090
|
+
pullRequestNumber: number4('The number of the pull or merge request the commit came in through, e.g. 12 for "Fix the total (#12)".'),
|
|
11091
|
+
sha: sha("The commit sha, at least 7 characters. Lets QA Wolf list a commit it also reads from your code host only once.")
|
|
11092
|
+
})
|
|
11093
|
+
]);
|
|
11094
|
+
var collectionProblem = discriminatedUnion("kind", [
|
|
11095
|
+
strictObject({
|
|
11096
|
+
kind: literal("filter-failed").describe("The filter that edits the changes before they're sent failed, so the changes it would have sent are missing.")
|
|
11097
|
+
}),
|
|
11098
|
+
strictObject({
|
|
11099
|
+
kind: literal("history-unavailable").describe("The CI checkout's git history was too shallow to hold every change since the previous deploy, so changes are missing.")
|
|
11100
|
+
}),
|
|
11101
|
+
strictObject({
|
|
11102
|
+
kind: literal("since-not-found").describe("The commit or tag the changes are collected since isn't in the CI checkout, so the changes couldn't be read.")
|
|
11103
|
+
})
|
|
11104
|
+
]);
|
|
10877
11105
|
var deploymentReportChanges = strictObject({
|
|
11106
|
+
ci: text(64).describe('The CI system that collected the changes, e.g. "GitHub Actions". QA Wolf names it when it tells you collecting them went wrong.').optional(),
|
|
10878
11107
|
items: array(changeItem).max(250).describe("The pull requests and commits the deployment ships, newest first.").optional(),
|
|
10879
11108
|
omittedCount: number2().int().nonnegative().describe("How many pull requests or commits you left out of items to stay within the limits.").optional(),
|
|
11109
|
+
problems: array(collectionProblem).max(10).describe("What went wrong collecting the changes, so QA Wolf can tell you in the Inbox and work with what it has. Send items too when only some changes are missing. Empty or absent means collecting them went fine.").optional(),
|
|
10880
11110
|
releaseNotes: text(16000).describe("Release notes written for the deployment.").optional()
|
|
10881
11111
|
}).refine((value) => new TextEncoder().encode(JSON.stringify(value)).length <= maxChangesBytes, { message: "changes must be at most 256 KB." });
|
|
10882
11112
|
|
|
@@ -10916,7 +11146,7 @@ var makeReportDeploymentStatusContract = (ids) => {
|
|
|
10916
11146
|
});
|
|
10917
11147
|
const input = strictObject({
|
|
10918
11148
|
builds: array(buildIdSchema).min(1).max(20).optional().describe("The builds this deployment ships, from build.create. Runs this deployment starts install them. A report that omits this field keeps the stored builds."),
|
|
10919
|
-
changes: deploymentReportChanges.describe("What the deployment changed, as text a reader can act on, which lets a trigger where QA Wolf chooses the flows work without a pull request: each merged pull request or pushed commit with its title, description and changed file paths, plus release notes. Code is never accepted: there is no field for diffs or file contents, and unknown keys are refused. A report that omits this field keeps the stored summary, a report that sends it replaces it, and one with no items
|
|
11149
|
+
changes: deploymentReportChanges.describe("What the deployment changed, as text a reader can act on, which lets a trigger where QA Wolf chooses the flows work without a pull request: each merged pull request or pushed commit with its title, description and changed file paths, plus release notes. Code is never accepted: there is no field for diffs or file contents, and unknown keys are refused. A report that omits this field keeps the stored summary, a report that sends it replaces it, and one with no items, no release notes and no problems counts as not sent. Triggers are evaluated on the first success report, so send it on that report or earlier. In the QA Wolf CLI, pass it as one JSON value.").optional(),
|
|
10920
11150
|
deployTarget: httpUrl().max(2048).describe("The URL the deployment serves, e.g. a preview URL. A mobile pipeline leaves it unset and reports a service instead.").optional(),
|
|
10921
11151
|
environment: environment.describe("Selects the environment the deployment reports into.").optional(),
|
|
10922
11152
|
environmentVariables: record(string2(), string2()).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.").optional(),
|
|
@@ -11877,6 +12107,7 @@ var makeInvestigationFindingSchema = (ids) => object({
|
|
|
11877
12107
|
text: string2().optional().describe("A person's answer in their own words, when they typed one."),
|
|
11878
12108
|
type: string2().describe('Known values: "answer", "dispute" and "reply". New values can appear.')
|
|
11879
12109
|
}).optional().describe("A person's answer or dispute that the investigation hasn't acted on yet."),
|
|
12110
|
+
revalidationSkippedAttemptId: string2().optional().describe("The failed attempt whose linked bug revalidation could not finish because the runner was unavailable."),
|
|
11880
12111
|
state: string2().describe(investigationFindingStateDescription),
|
|
11881
12112
|
steps: array(string2()).optional(),
|
|
11882
12113
|
subSessionIds: array(ids.chatSession),
|
|
@@ -11893,8 +12124,18 @@ var makeGetInvestigationContract = (ids) => {
|
|
|
11893
12124
|
completion: object({
|
|
11894
12125
|
remainingFlows: array(object({
|
|
11895
12126
|
flowId: ids.flow,
|
|
11896
|
-
reason: string2()
|
|
12127
|
+
reason: string2(),
|
|
12128
|
+
runAttemptId: string2().optional()
|
|
11897
12129
|
})),
|
|
12130
|
+
transferredFlows: array(object({
|
|
12131
|
+
flowId: ids.flow,
|
|
12132
|
+
runId: ids.run,
|
|
12133
|
+
status: _enum([
|
|
12134
|
+
"checkpoint-pending",
|
|
12135
|
+
"checkpoint-saved",
|
|
12136
|
+
"source-unavailable"
|
|
12137
|
+
])
|
|
12138
|
+
})).optional(),
|
|
11898
12139
|
waitingFlowIds: array(ids.flow)
|
|
11899
12140
|
}).optional().describe("Current per-flow completion check. Continue every remaining flow before ending. Questions cover only waitingFlowIds. Missing completion means coverage cannot be verified."),
|
|
11900
12141
|
findings: array(makeInvestigationFindingSchema(ids)),
|
|
@@ -12287,6 +12528,35 @@ var makeListIssueCommentsContract = (ids) => {
|
|
|
12287
12528
|
};
|
|
12288
12529
|
};
|
|
12289
12530
|
|
|
12531
|
+
// node_modules/@qawolf/api-contracts/dist/v1/issue/markFixReadyForReview.js
|
|
12532
|
+
var makeMarkFixReadyForReviewContract = (ids) => {
|
|
12533
|
+
const input = object({ issueId: ids.issue });
|
|
12534
|
+
const output = object({
|
|
12535
|
+
fix: object({
|
|
12536
|
+
id: string2().describe("The fix's ID."),
|
|
12537
|
+
pullRequestUrl: url().describe("The fix's pull request, which is now ready for review.")
|
|
12538
|
+
}),
|
|
12539
|
+
outcome: _enum(["marked-ready", "already-ready"]).describe("marked-ready: this call marked the draft pull request ready for review. already-ready: the pull request was already ready for review.")
|
|
12540
|
+
});
|
|
12541
|
+
return {
|
|
12542
|
+
annotationJustifications: {
|
|
12543
|
+
destructiveHint: "Marks a draft pull request ready for review and never removes or overwrites data.",
|
|
12544
|
+
openWorldHint: "Changes a pull request in the team's own repository on its code host.",
|
|
12545
|
+
readOnlyHint: "Changes the draft state of the fix's pull request."
|
|
12546
|
+
},
|
|
12547
|
+
annotations: {
|
|
12548
|
+
destructiveHint: false,
|
|
12549
|
+
openWorldHint: true,
|
|
12550
|
+
readOnlyHint: false
|
|
12551
|
+
},
|
|
12552
|
+
description: "Mark the draft pull request of the bug's fix ready for review, so the code host asks its code owners. " + "The pull request stays a draft unless a loop's instructions ask for this. " + "Only a QA Wolf session that a loop started can call it. " + "Refused as no-fix-pull-request when the bug's fix has no open pull request.",
|
|
12553
|
+
input,
|
|
12554
|
+
kind: "write",
|
|
12555
|
+
name: "issue.markFixReadyForReview",
|
|
12556
|
+
output
|
|
12557
|
+
};
|
|
12558
|
+
};
|
|
12559
|
+
|
|
12290
12560
|
// node_modules/@qawolf/api-contracts/dist/v1/issue/removeFlows.js
|
|
12291
12561
|
var makeRemoveFlowsFromIssueContract = (ids) => {
|
|
12292
12562
|
const input = object({
|
|
@@ -12316,6 +12586,76 @@ var makeRemoveFlowsFromIssueContract = (ids) => {
|
|
|
12316
12586
|
};
|
|
12317
12587
|
};
|
|
12318
12588
|
|
|
12589
|
+
// node_modules/@qawolf/api-contracts/dist/v1/issue/requestFix.js
|
|
12590
|
+
var codeFixStates = [
|
|
12591
|
+
"sent",
|
|
12592
|
+
"fixing",
|
|
12593
|
+
"pull-request-open",
|
|
12594
|
+
"no-fix",
|
|
12595
|
+
"failed"
|
|
12596
|
+
];
|
|
12597
|
+
var makeRequestFixForIssueContract = (ids) => {
|
|
12598
|
+
const input = object({
|
|
12599
|
+
issueId: ids.issue,
|
|
12600
|
+
repository: string2().regex(/^[\w.-]+\/[\w.-]+$/, "repository must be owner/name").optional().describe("The repository, as owner/name, that the loop's instructions name. Omit it to let QA Wolf pick the bug's repository.")
|
|
12601
|
+
});
|
|
12602
|
+
const output = object({
|
|
12603
|
+
fix: object({
|
|
12604
|
+
id: string2().describe("The fix's ID."),
|
|
12605
|
+
repository: string2().describe("The repository, as owner/name, whose coding agent fixes the bug."),
|
|
12606
|
+
state: _enum(codeFixStates).describe("sent: QA Wolf started the team's workflow. fixing: the coding agent started. pull-request-open: the fix has a pull request. no-fix and failed: the fix ended.")
|
|
12607
|
+
}),
|
|
12608
|
+
outcome: _enum(["requested", "joined-open-fix"]).describe("requested: this call started a new fix. joined-open-fix: the bug already had an open fix, and this is it.")
|
|
12609
|
+
});
|
|
12610
|
+
return {
|
|
12611
|
+
annotationJustifications: {
|
|
12612
|
+
destructiveHint: "Starts a fix and never removes or overwrites data.",
|
|
12613
|
+
openWorldHint: "Starts a workflow in the team's own repository on its code host.",
|
|
12614
|
+
readOnlyHint: "Records a fix and starts the team's coding agent."
|
|
12615
|
+
},
|
|
12616
|
+
annotations: {
|
|
12617
|
+
destructiveHint: false,
|
|
12618
|
+
openWorldHint: true,
|
|
12619
|
+
readOnlyHint: false
|
|
12620
|
+
},
|
|
12621
|
+
description: "Hand a bug report to the team's own coding agent, which fixes it in the team's CI. " + "Only a QA Wolf session that a loop started can call it, when the loop's instructions use /coding-agent. " + "A bug has one open fix: a second request returns that fix.",
|
|
12622
|
+
input,
|
|
12623
|
+
kind: "write",
|
|
12624
|
+
name: "issue.requestFix",
|
|
12625
|
+
output
|
|
12626
|
+
};
|
|
12627
|
+
};
|
|
12628
|
+
|
|
12629
|
+
// node_modules/@qawolf/api-contracts/dist/v1/issue/retryFix.js
|
|
12630
|
+
var makeRetryFixForIssueContract = (ids) => {
|
|
12631
|
+
const input = object({ issueId: ids.issue });
|
|
12632
|
+
const output = object({
|
|
12633
|
+
fix: object({
|
|
12634
|
+
id: string2().describe("The ID of the fix that makes the extra try."),
|
|
12635
|
+
repository: string2().describe("The repository, as owner/name, whose coding agent fixes the bug."),
|
|
12636
|
+
state: _enum(codeFixStates).describe("sent: QA Wolf started the team's workflow. fixing: the coding agent started. pull-request-open: the fix has a pull request. no-fix and failed: the fix ended.")
|
|
12637
|
+
}),
|
|
12638
|
+
outcome: _enum(["requested", "joined-open-fix"]).describe("requested: this call started the extra try. joined-open-fix: the extra try was already open, and this is it.")
|
|
12639
|
+
});
|
|
12640
|
+
return {
|
|
12641
|
+
annotationJustifications: {
|
|
12642
|
+
destructiveHint: "Starts a fix and never removes or overwrites data.",
|
|
12643
|
+
openWorldHint: "Starts a workflow in the team's own repository on its code host.",
|
|
12644
|
+
readOnlyHint: "Records a fix and starts the team's coding agent."
|
|
12645
|
+
},
|
|
12646
|
+
annotations: {
|
|
12647
|
+
destructiveHint: false,
|
|
12648
|
+
openWorldHint: true,
|
|
12649
|
+
readOnlyHint: false
|
|
12650
|
+
},
|
|
12651
|
+
description: "Ask the team's coding agent for one more try at a bug that the check of its fix still shows. " + "QA Wolf sends the same agent the failure of the check's run, as a new fix on the same branch, and checks again. " + "Only a QA Wolf session that a loop started can call it, when the loop's instructions ask for it. " + "A bug gets one extra try at most. " + "Refused as bug-not-still-showing when the check of the bug's fix does not show the bug, and as no-tries-left after the extra try.",
|
|
12652
|
+
input,
|
|
12653
|
+
kind: "write",
|
|
12654
|
+
name: "issue.retryFix",
|
|
12655
|
+
output
|
|
12656
|
+
};
|
|
12657
|
+
};
|
|
12658
|
+
|
|
12319
12659
|
// node_modules/@qawolf/api-contracts/dist/v1/issue/update.js
|
|
12320
12660
|
var makeUpdateIssueContract = (ids) => {
|
|
12321
12661
|
const descriptionSchema = string2().describe(issueDescriptionDescription);
|
|
@@ -12361,7 +12701,10 @@ var makeIssueContracts = (ids) => ({
|
|
|
12361
12701
|
get: makeGetIssueContract(ids),
|
|
12362
12702
|
listActivity: makeListIssueActivityContract(ids),
|
|
12363
12703
|
listComments: makeListIssueCommentsContract(ids),
|
|
12704
|
+
markFixReadyForReview: makeMarkFixReadyForReviewContract(ids),
|
|
12364
12705
|
removeFlows: makeRemoveFlowsFromIssueContract(ids),
|
|
12706
|
+
requestFix: makeRequestFixForIssueContract(ids),
|
|
12707
|
+
retryFix: makeRetryFixForIssueContract(ids),
|
|
12365
12708
|
update: makeUpdateIssueContract(ids)
|
|
12366
12709
|
});
|
|
12367
12710
|
|
|
@@ -12711,6 +13054,7 @@ var runAlertNotificationsSchema = array(runAlertNotificationSchema).describe("Wh
|
|
|
12711
13054
|
var makeFlowAttemptsSchema = (ids) => {
|
|
12712
13055
|
const artifactUrls = {
|
|
12713
13056
|
logsUrl: url().optional().describe("Signed URL for the attempt's execution logs."),
|
|
13057
|
+
networkLogsUrl: url().optional().describe("Signed URL for the attempt's iOS network log, as NDJSON: request and connection lines are HAR 1.2 entries, DNS and WebSocket lines are `_qawolf` objects, and the last line is a summary. For up to 2 minutes after the attempt ends, the file can be partial or 404 while the runner uploads it; it is final once the summary line is there. Signed for every attempt; after that, a 404 means the attempt captured no network."),
|
|
12714
13058
|
traceUrl: url().optional().describe("Signed URL for the attempt's Playwright trace (a trace.zip; open it with `npx playwright show-trace`)."),
|
|
12715
13059
|
videoUrl: url().optional().describe("Signed URL for the attempt's screen recording.")
|
|
12716
13060
|
};
|
|
@@ -12780,7 +13124,6 @@ var makeFlowFailureSchema = (ids) => {
|
|
|
12780
13124
|
};
|
|
12781
13125
|
|
|
12782
13126
|
// node_modules/@qawolf/api-contracts/dist/v1/run/versions.js
|
|
12783
|
-
var extensibleValue = (values, meanings) => string2().describe(`One of ${values.join(", ")}; newer servers may add values, so ignore any you don't know. ${meanings}`);
|
|
12784
13127
|
var attemptCount = number2().int().positive().describe("How many attempts reported it.");
|
|
12785
13128
|
var runBuildVersionSchema = object({
|
|
12786
13129
|
appId: string2().describe("The package name (Android) or bundle ID (iOS) of the app."),
|
|
@@ -13712,6 +14055,88 @@ var makeListTagsContract = (ids) => {
|
|
|
13712
14055
|
};
|
|
13713
14056
|
};
|
|
13714
14057
|
|
|
14058
|
+
// node_modules/@qawolf/api-contracts/dist/v1/tag/contracts.js
|
|
14059
|
+
var makeTagContracts = (ids) => ({
|
|
14060
|
+
create: makeCreateTagContract(ids),
|
|
14061
|
+
list: makeListTagsContract(ids)
|
|
14062
|
+
});
|
|
14063
|
+
|
|
14064
|
+
// node_modules/@qawolf/api-contracts/dist/v1/usage/breakdown.js
|
|
14065
|
+
var maxUsageBreakdownDays = 366;
|
|
14066
|
+
var usageGroupings = [
|
|
14067
|
+
"day",
|
|
14068
|
+
"week",
|
|
14069
|
+
"month",
|
|
14070
|
+
"workspace",
|
|
14071
|
+
"environment",
|
|
14072
|
+
"platform",
|
|
14073
|
+
"source",
|
|
14074
|
+
"trigger",
|
|
14075
|
+
"user"
|
|
14076
|
+
];
|
|
14077
|
+
var usageDay = string2().regex(/^\d{4}-\d{2}-\d{2}$/).describe("A UTC day as YYYY-MM-DD.");
|
|
14078
|
+
var totals = object({
|
|
14079
|
+
flowRuns: number2().describe("Flow runs that used credits. A flow run counts once for each source that used its credits (its trigger, and each person who reran it), on the day of that source's first charge."),
|
|
14080
|
+
runCredits: number2().describe("Credits that flow runs used."),
|
|
14081
|
+
sessionCredits: number2().describe("Credits of runners open outside a run. In a row, the exact share of the session time, so it can be a fraction."),
|
|
14082
|
+
sessionSeconds: number2().describe("Seconds of runners open outside a run.")
|
|
14083
|
+
});
|
|
14084
|
+
var group = object({
|
|
14085
|
+
day: string2().optional(),
|
|
14086
|
+
environment: string2().optional(),
|
|
14087
|
+
month: string2().optional(),
|
|
14088
|
+
platform: string2().optional(),
|
|
14089
|
+
source: string2().optional(),
|
|
14090
|
+
trigger: string2().optional(),
|
|
14091
|
+
user: string2().optional(),
|
|
14092
|
+
week: string2().optional(),
|
|
14093
|
+
workspace: string2().optional()
|
|
14094
|
+
}).describe("The value of each groupBy grouping for this row. day and week are YYYY-MM-DD (a week starts on Monday), month is YYYY-MM, platform is web, ios, android, windows or mac, and source is person, trigger, api, unknown or session-time. workspace, environment, trigger and user hold ids, named in labels. A grouping is absent when the usage has no value for it, for example the environment of a runner opened through the API, or the trigger of session time.");
|
|
14095
|
+
var labels = record(string2(), string2()).describe("Names by id. An id with no name was deleted, or belongs to a workspace you cannot see.");
|
|
14096
|
+
var makeUsageBreakdownContract = (ids) => {
|
|
14097
|
+
const input = object({
|
|
14098
|
+
from: usageDay.describe("The first UTC day of the range, YYYY-MM-DD."),
|
|
14099
|
+
groupBy: array(_enum(usageGroupings)).max(2).default([]).describe("Up to two groupings, for example [day, environment]. Empty gives one row with all usage."),
|
|
14100
|
+
limit: number2().int().min(1).max(1000).default(100).describe("The most rows to return, most credits first. The rest are added up in others."),
|
|
14101
|
+
scope: _enum(["workspace", "organization"]).default("workspace").describe("workspace reads one workspace. organization reads every workspace of its organization whose usage you can see. It needs an organization API key or a billing manager; with a user credential, send workspaceId to name the organization. An organization API key is not a billing manager: it sees only the workspaces whose Usage page is open to customers."),
|
|
14102
|
+
to: usageDay.describe(`The last UTC day of the range, YYYY-MM-DD. The range holds at most ${maxUsageBreakdownDays} days, including both ends.`),
|
|
14103
|
+
workspaceId: ids.workspace.optional().describe("The workspace to read, or whose organization to read. Required with a user API key, and with an organization API key for the workspace scope.")
|
|
14104
|
+
});
|
|
14105
|
+
const output = object({
|
|
14106
|
+
labels: object({
|
|
14107
|
+
environments: labels,
|
|
14108
|
+
triggers: labels,
|
|
14109
|
+
users: labels,
|
|
14110
|
+
workspaces: labels
|
|
14111
|
+
}),
|
|
14112
|
+
others: totals.optional().describe("The rows after limit, added up. Absent when none was left out."),
|
|
14113
|
+
rows: array(totals.extend({ group })).describe("Most credits first."),
|
|
14114
|
+
totals: totals.describe("All usage of the range. sessionCredits here are whole credits, counted for each UTC month and platform, so the rows can add up to a little less.")
|
|
14115
|
+
});
|
|
14116
|
+
return {
|
|
14117
|
+
annotationJustifications: {
|
|
14118
|
+
destructiveHint: "Only reads usage.",
|
|
14119
|
+
openWorldHint: "Reads QA Wolf usage records only.",
|
|
14120
|
+
readOnlyHint: "Adds up recorded usage without changing anything."
|
|
14121
|
+
},
|
|
14122
|
+
annotations: {
|
|
14123
|
+
destructiveHint: false,
|
|
14124
|
+
openWorldHint: false,
|
|
14125
|
+
readOnlyHint: true
|
|
14126
|
+
},
|
|
14127
|
+
description: "Show where credits went over a range of UTC days, grouped by time, workspace, environment, platform, source, trigger or user. Use it to find what uses the most credits, or to build a usage dashboard. Credits only, no dollar amounts.",
|
|
14128
|
+
input,
|
|
14129
|
+
kind: "read",
|
|
14130
|
+
name: "usage.breakdown",
|
|
14131
|
+
output
|
|
14132
|
+
};
|
|
14133
|
+
};
|
|
14134
|
+
|
|
14135
|
+
// node_modules/@qawolf/api-contracts/dist/v1/usage/index.js
|
|
14136
|
+
var makeUsageContracts = (ids) => ({
|
|
14137
|
+
breakdown: makeUsageBreakdownContract(ids)
|
|
14138
|
+
});
|
|
14139
|
+
|
|
13715
14140
|
// node_modules/@qawolf/api-contracts/dist/v1/index.js
|
|
13716
14141
|
var makeContractsV1 = (ids) => {
|
|
13717
14142
|
const resolvedIds = {
|
|
@@ -13733,10 +14158,7 @@ var makeContractsV1 = (ids) => {
|
|
|
13733
14158
|
get: makeGetAttemptContract(resolvedIds)
|
|
13734
14159
|
},
|
|
13735
14160
|
build: makeBuildContracts(resolvedIds),
|
|
13736
|
-
codeHostIntegration:
|
|
13737
|
-
find: makeFindCodeHostIntegrationsContract(resolvedIds),
|
|
13738
|
-
listRepositories: makeListCodeHostRepositoriesContract(resolvedIds)
|
|
13739
|
-
},
|
|
14161
|
+
codeHostIntegration: makeCodeHostIntegrationContracts(resolvedIds),
|
|
13740
14162
|
deployment: makeDeploymentContracts(resolvedIds),
|
|
13741
14163
|
email: {
|
|
13742
14164
|
find: makeFindEmailsContract(resolvedIds),
|
|
@@ -13791,11 +14213,9 @@ var makeContractsV1 = (ids) => {
|
|
|
13791
14213
|
runner: makeRunnerContracts(resolvedIds),
|
|
13792
14214
|
skill: makeSkillContracts(),
|
|
13793
14215
|
suggestion: makeSuggestionContracts(resolvedIds),
|
|
13794
|
-
tag:
|
|
13795
|
-
|
|
13796
|
-
|
|
13797
|
-
},
|
|
13798
|
-
trigger: makeTriggerContracts(resolvedIds)
|
|
14216
|
+
tag: makeTagContracts(resolvedIds),
|
|
14217
|
+
trigger: makeTriggerContracts(resolvedIds),
|
|
14218
|
+
usage: makeUsageContracts(resolvedIds)
|
|
13799
14219
|
};
|
|
13800
14220
|
};
|
|
13801
14221
|
var publicContractsV1 = makeContractsV1(defaultIdSchemas);
|
|
@@ -13831,6 +14251,7 @@ var authErrorMessages = {
|
|
|
13831
14251
|
runIdMayBeRunnerLocal: (runId) => `A run id printed by qawolf runner run belongs to that runner rather than to the platform, so this command cannot resolve it. Read that run with qawolf runner events run-status --run ${runId ?? "<id>"}.`,
|
|
13832
14252
|
notFound404Record: (noun, id) => `QA Wolf has no ${noun} ${id} (HTTP 404).`,
|
|
13833
14253
|
notFound404: (noun) => noun === undefined ? "QA Wolf found nothing matching the request (HTTP 404)." : `QA Wolf found nothing matching the ${noun} request (HTTP 404).`,
|
|
14254
|
+
notServedYet: (noun, baseUrl) => `QA Wolf at ${baseUrl} does not support ${noun ?? "this request"} yet (HTTP 404). This CLI is newer than the server, so try again once the server has been updated.`,
|
|
13834
14255
|
failedWithStatus: (status, noun) => `QA Wolf API${noun ? ` ${noun}` : ""} request failed (HTTP ${status}).`,
|
|
13835
14256
|
notSent: "Nothing was sent, so this request did not take effect.",
|
|
13836
14257
|
networkUnreachable: (options) => `Could not reach the QA Wolf API at ${options.baseUrl}${options.noun ? ` to fetch ${options.noun}` : ""}${options.cause ? ` (${options.cause})` : ""}. Check your network connection and QAWOLF_HOST_URL.`,
|
|
@@ -16163,6 +16584,7 @@ function describeIdentityError(err) {
|
|
|
16163
16584
|
}
|
|
16164
16585
|
return { error: m2.identity.unexpectedFormat };
|
|
16165
16586
|
}
|
|
16587
|
+
var isUnservedRoute = (reason) => /^No (procedure found|"\w+"-procedure) on path /.test(reason);
|
|
16166
16588
|
function describeRequestError(err, baseUrl, noun, notFound) {
|
|
16167
16589
|
if (err.kind === "http") {
|
|
16168
16590
|
const reason = parseErrorBody(err.body);
|
|
@@ -16181,6 +16603,11 @@ function describeRequestError(err, baseUrl, noun, notFound) {
|
|
|
16181
16603
|
};
|
|
16182
16604
|
if (err.status === 403)
|
|
16183
16605
|
return parseJson(err.body) === undefined ? { error: m2.request.blocked403(noun) } : { error: m2.request.rejected403(noun), ...body };
|
|
16606
|
+
if (err.status === 404 && isUnservedRoute(reason))
|
|
16607
|
+
return {
|
|
16608
|
+
error: m2.request.notServedYet(noun, baseUrl),
|
|
16609
|
+
exitCode: exitCodes.notFound
|
|
16610
|
+
};
|
|
16184
16611
|
if (err.status === 404)
|
|
16185
16612
|
return describeNotFound(notFound, noun, reason);
|
|
16186
16613
|
return { error: m2.request.failedWithStatus(err.status, noun), ...body };
|
|
@@ -18575,4 +19002,4 @@ export {
|
|
|
18575
19002
|
createRunnerSdk
|
|
18576
19003
|
};
|
|
18577
19004
|
|
|
18578
|
-
//# debugId=
|
|
19005
|
+
//# debugId=A4292F6B29FCE6D964756E2164756E21
|