@qawolf/cli 2.11.0 → 2.13.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 CHANGED
@@ -17938,13 +17938,6 @@ async function downloadBundle(signedUrl, deps) {
17938
17938
  return { ok: true, value: { tmpArchive } };
17939
17939
  }
17940
17940
 
17941
- // node_modules/@qawolf/api-contracts/dist/v1/pagination.js
17942
- var makePaginationInputFields = (limits) => ({
17943
- cursor: string2().min(1).optional().describe("Opaque cursor copied from the previous response's nextCursor. Omit to fetch the first page."),
17944
- limit: number2().int().min(1).max(limits.maxLimit).default(limits.defaultLimit).describe(`Maximum rows per page. Defaults to ${limits.defaultLimit}, capped at ${limits.maxLimit}.`)
17945
- });
17946
- var nextCursorSchema = string2().min(1).optional().describe("Repeat the request with this value as cursor to fetch the next page. Absent when there are no further results.");
17947
-
17948
17941
  // node_modules/@qawolf/api-contracts/dist/v1/resource.js
17949
17942
  function resource(fields, { urlFieldDescription = "Absolute URL." } = {}) {
17950
17943
  return object({
@@ -17982,7 +17975,10 @@ var promotionNeedsPersonReasonSchema = _enum([
17982
17975
  "agent-resolution-off"
17983
17976
  ]).describe("undecided-paths (the runs of these paths' versions, if any, left no single answer), run-limit-reached (the resolution agent started as many runs as one conflict allows), flows-undetermined (which flows the conflict affects could not be told, so no resolution could be checked), agent-stopped (the resolution agent finished without submitting; its session says why), agent-failed (the resolution agent failed, timed out or was canceled), agent-not-started (QA Wolf had no user to run the resolution agent as), agent-resolution-off (the workspace does not have QA Wolf resolve conflicts).");
17984
17977
  var promotionNeedsPersonSchema = object({
17985
- paths: array(object({ path: string2() })).optional().describe("The paths left undecided. Present for undecided-paths."),
17978
+ paths: array(object({
17979
+ path: string2(),
17980
+ questionId: string2().optional().describe("The question QA Wolf asked about the path, from questions. Absent when it asked none.")
17981
+ })).optional().describe("The paths left undecided. Present for undecided-paths."),
17986
17982
  reason: promotionNeedsPersonReasonSchema
17987
17983
  });
17988
17984
 
@@ -18025,6 +18021,143 @@ var makePromotionResourceSchema = (ids) => resource({
18025
18021
  validationRuns: array(makePromotionValidationRunSchema(ids)).describe("The runs the resolution agent started, oldest first, each with the conflict commits it was for. Only runs whose commits match the current conflict speak for it. Empty when no run was started.")
18026
18022
  }, { urlFieldDescription: "Absolute URL of the head environment's page." });
18027
18023
 
18024
+ // node_modules/@qawolf/api-contracts/dist/v1/promotion/answerQuestions.js
18025
+ var makeAnswerPromotionQuestionsContract = (ids) => {
18026
+ const questionId = ids.promotionQuestion.describe("The id of the question, from promotion.get's questions.");
18027
+ const questionRevision = number2().int().min(1).describe("The revision of the question being answered, from promotion.get's questions. An answer to a revision QA Wolf has since asked anew is refused.");
18028
+ const input = object({
18029
+ answers: array(discriminatedUnion("type", [
18030
+ strictObject({
18031
+ optionId: string2().min(1).describe("The id of the picked answer among the question's options."),
18032
+ questionId,
18033
+ questionRevision,
18034
+ type: literal("option")
18035
+ }),
18036
+ strictObject({
18037
+ questionId,
18038
+ questionRevision,
18039
+ text: string2().trim().min(1).max(2000).describe("The answer in the person's own words."),
18040
+ type: literal("own-words")
18041
+ })
18042
+ ])).min(1).max(2000).describe("One answer per question of the current conflict, all at once: a picked answer (option) or the person's own words (own-words)."),
18043
+ promotionId: ids.promotion
18044
+ });
18045
+ const output = makePromotionResourceSchema(ids);
18046
+ return {
18047
+ annotationJustifications: {
18048
+ destructiveHint: "Records the answers and hands the promotion back to QA Wolf without changing flow code itself.",
18049
+ openWorldHint: "Changes a private QA Wolf promotion record without touching external systems.",
18050
+ readOnlyHint: "Records answers and starts QA Wolf on the promotion again."
18051
+ },
18052
+ annotations: {
18053
+ destructiveHint: false,
18054
+ openWorldHint: false,
18055
+ readOnlyHint: false
18056
+ },
18057
+ description: "Answer every question QA Wolf asked about a promotion's current conflict, at once, and hand it back to QA Wolf, which updates the flows the way they were answered and promotes them. Refused while the promotion is not waiting on a person, and for an answer to a question QA Wolf has since asked anew. Picking an answer that reports a bug files nothing on its own. Returns the promotion.",
18058
+ input,
18059
+ kind: "write",
18060
+ name: "promotion.answerQuestions",
18061
+ output
18062
+ };
18063
+ };
18064
+
18065
+ // node_modules/@qawolf/api-contracts/dist/v1/promotion/question.js
18066
+ var sideSchema = (version) => strictObject({
18067
+ code: string2().max(5000).describe(`The code of the changed step in ${version}.`),
18068
+ runSummary: string2().min(1).max(500).describe(`How ${version} did when it ran, in a sentence, such as "Passed 3 of 5 runs. In 2, the payment buttons weren't there."`),
18069
+ steps: array(strictObject({
18070
+ mark: _enum(["changed", "added", "deleted"]).optional().describe("Set on the step the conflict is about: changed, added, or deleted in this version."),
18071
+ text: string2().min(1).max(500).describe("The step in plain words.")
18072
+ })).min(1).max(50).describe(`The steps of ${version} around the conflict, in plain words.`)
18073
+ }).describe(`${version}.`);
18074
+ var optionSchema = strictObject({
18075
+ bugTitle: string2().min(1).max(200).optional().describe("Set when this answer means the app has a bug: the title of the bug report a person files by picking it. QA Wolf never files it on its own."),
18076
+ consequence: string2().min(1).max(500).describe("What happens to the flow when this answer is picked."),
18077
+ id: string2().regex(/^[a-z0-9]+(-[a-z0-9]+)*$/).max(64).describe("A kebab-case id, unique among the question's answers."),
18078
+ title: string2().min(1).max(200).describe("The answer, as a person reads it.")
18079
+ });
18080
+ var promotionQuestionContentSchema = strictObject({
18081
+ base: sideSchema("The base environment's version"),
18082
+ flowName: string2().min(1).max(200).describe("The flow's name."),
18083
+ head: sideSchema("The head environment's version"),
18084
+ options: array(optionSchema).min(2).max(5).describe("The answers, each with what it does to the flow."),
18085
+ proposal: string2().min(1).max(1000).describe(`QA Wolf's pick, in its own words, such as "I'd have it use both until the new checkout is on for everyone."`),
18086
+ proposedOptionId: string2().min(1).describe("The id of QA Wolf's pick among the answers."),
18087
+ question: string2().min(1).max(1000).describe("A question about the app a person can answer without reading code, not about which file to keep."),
18088
+ stepLabel: string2().min(1).max(200).describe('Where in the flow the conflict is, such as "Step 3, Choose how to pay".')
18089
+ }).superRefine(({ options, proposedOptionId }, refinement) => {
18090
+ const ids = options.map(({ id }) => id);
18091
+ if (new Set(ids).size !== ids.length) {
18092
+ refinement.addIssue({
18093
+ code: "custom",
18094
+ message: "Each answer needs its own id.",
18095
+ path: ["options"]
18096
+ });
18097
+ }
18098
+ if (!ids.includes(proposedOptionId)) {
18099
+ refinement.addIssue({
18100
+ code: "custom",
18101
+ message: "proposedOptionId must be the id of one of the answers.",
18102
+ path: ["proposedOptionId"]
18103
+ });
18104
+ }
18105
+ }).describe("What is asked about the path: the question, both versions, the answers and QA Wolf's pick.");
18106
+ var makePromotionQuestionSchema = (ids) => object({
18107
+ answer: discriminatedUnion("type", [
18108
+ object({
18109
+ answeredAt: exports_iso.datetime(),
18110
+ optionId: string2().describe("The id of the picked answer."),
18111
+ type: literal("option")
18112
+ }),
18113
+ object({
18114
+ answeredAt: exports_iso.datetime(),
18115
+ text: string2().describe("The answer in the person's own words."),
18116
+ type: literal("own-words")
18117
+ })
18118
+ ]).optional().describe("The latest answer. Absent until someone answers, and again once QA Wolf asks anew."),
18119
+ content: promotionQuestionContentSchema,
18120
+ id: ids.promotionQuestion,
18121
+ path: string2().describe("The conflicting path the question is about."),
18122
+ revision: number2().int().min(1).describe("1 when first asked, one more each time QA Wolf asks anew. Send it back with the answer.")
18123
+ });
18124
+
18125
+ // node_modules/@qawolf/api-contracts/dist/v1/promotion/askQuestion.js
18126
+ var makeAskPromotionQuestionContract = (ids) => {
18127
+ const input = object({
18128
+ content: promotionQuestionContentSchema,
18129
+ expectedSourceCommitHash: string2().min(1).describe("conflict.sourceCommitHash from promotion.get. A different current commit means the branch moved and the call is refused."),
18130
+ expectedTargetCommitHash: string2().min(1).describe("conflict.targetCommitHash from promotion.get. A different current commit means the branch moved and the call is refused."),
18131
+ path: string2().min(1).max(1024).describe("One of the promotion's conflicting paths, already reported as needs-person."),
18132
+ promotionId: ids.promotion
18133
+ });
18134
+ const output = makePromotionQuestionSchema(ids);
18135
+ return {
18136
+ annotationJustifications: {
18137
+ destructiveHint: "Records a question on the promotion and changes no flow code.",
18138
+ openWorldHint: "Changes a private QA Wolf promotion record without touching external systems.",
18139
+ readOnlyHint: "Records a question for a person to answer."
18140
+ },
18141
+ annotations: {
18142
+ destructiveHint: false,
18143
+ openWorldHint: false,
18144
+ readOnlyHint: false
18145
+ },
18146
+ description: "Ask a person about one conflicting path of a conflicted promotion that was reported as needs-person: a question about the app, both versions as plain steps with how each ran, the answers with what each does to the flow, and QA Wolf's pick. Ask before finishing; a promotion that already waits on a person is refused. Asking again about the same path replaces the question. Returns the question.",
18147
+ input,
18148
+ kind: "write",
18149
+ name: "promotion.askQuestion",
18150
+ output
18151
+ };
18152
+ };
18153
+
18154
+ // node_modules/@qawolf/api-contracts/dist/v1/pagination.js
18155
+ var makePaginationInputFields = (limits) => ({
18156
+ cursor: string2().min(1).optional().describe("Opaque cursor copied from the previous response's nextCursor. Omit to fetch the first page."),
18157
+ limit: number2().int().min(1).max(limits.maxLimit).default(limits.defaultLimit).describe(`Maximum rows per page. Defaults to ${limits.defaultLimit}, capped at ${limits.maxLimit}.`)
18158
+ });
18159
+ var nextCursorSchema = string2().min(1).optional().describe("Repeat the request with this value as cursor to fetch the next page. Absent when there are no further results.");
18160
+
18028
18161
  // node_modules/@qawolf/api-contracts/dist/v1/promotion/find.js
18029
18162
  var makeFindPromotionsContract = (ids) => {
18030
18163
  const input = object({
@@ -18060,7 +18193,8 @@ var makeFindPromotionsContract = (ids) => {
18060
18193
  var makeGetPromotionContract = (ids) => {
18061
18194
  const input = object({ promotionId: ids.promotion });
18062
18195
  const output = makePromotionResourceSchema(ids).extend({
18063
- aiTaskSessionId: ids.chatSession.optional().describe("The session of the AI resolving this promotion's conflicts. Absent until it starts.")
18196
+ aiTaskSessionId: ids.chatSession.optional().describe("The session of the AI resolving this promotion's conflicts. Absent until it starts."),
18197
+ questions: array(makePromotionQuestionSchema(ids)).optional().describe("The questions QA Wolf asked about the current conflict's paths, in the order it asked them. Absent when it asked none.")
18064
18198
  });
18065
18199
  return {
18066
18200
  annotationJustifications: {
@@ -18120,7 +18254,7 @@ var makeReportPromotionDecisionContract = (ids) => {
18120
18254
  openWorldHint: false,
18121
18255
  readOnlyHint: false
18122
18256
  },
18123
- description: "Record how one conflicting path of a conflicted promotion was settled by running its versions, or why it is left for a person, with the run of each version. Exactly one passing version is kept (picked-by-run); when every version passed, they are combined or the one with more checks is kept; a person is asked only when every version failed or the runs could not tell them apart. Every run must have been started for this promotion's resolution. Reporting a path again replaces its decision. Returns the promotion.",
18257
+ description: "Record how one conflicting path of a conflicted promotion was settled by running its versions, or why it is left for a person, with the run of each version. Exactly one passing version is kept (picked-by-run); when every version passed, they are combined or the one with more checks is kept; a person is asked only when every version failed or the runs could not tell them apart. Every run must have been started for this promotion's resolution. When the workspace runs no versions but has promotion questions on, only a needs-person decision with no runs is recorded, so the path can be asked about. Reporting a path again replaces its decision. Returns the promotion.",
18124
18258
  input,
18125
18259
  kind: "write",
18126
18260
  name: "promotion.reportDecision",
@@ -18158,7 +18292,7 @@ var makeResolvePromotionContract = (ids) => {
18158
18292
  openWorldHint: false,
18159
18293
  readOnlyHint: false
18160
18294
  },
18161
- 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.",
18295
+ 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. If the base environment has been terminated, the call is refused as target-environment-gone and the promotion can no longer be resolved. Returns the promotion in resolving; poll promotion.get until it is promoted, or conflicted again if the branches moved while it applied.",
18162
18296
  input,
18163
18297
  kind: "write",
18164
18298
  name: "promotion.resolve",
@@ -18168,6 +18302,8 @@ var makeResolvePromotionContract = (ids) => {
18168
18302
 
18169
18303
  // node_modules/@qawolf/api-contracts/dist/v1/promotion/index.js
18170
18304
  var makePromotionContracts = (ids) => ({
18305
+ answerQuestions: makeAnswerPromotionQuestionsContract(ids),
18306
+ askQuestion: makeAskPromotionQuestionContract(ids),
18171
18307
  find: makeFindPromotionsContract(ids),
18172
18308
  get: makeGetPromotionContract(ids),
18173
18309
  reportDecision: makeReportPromotionDecisionContract(ids),
@@ -18489,6 +18625,7 @@ var defaultIdSchemas = {
18489
18625
  issue: string2().min(1).describe("The id of the issue."),
18490
18626
  legacyTrigger: string2().min(1).describe("The id of the legacy trigger, from legacyTrigger.find."),
18491
18627
  promotion: string2().min(1).describe("The id of the promotion, from promotion.find or environment.promote."),
18628
+ promotionQuestion: string2().min(1).describe("The id of the promotion question, from promotion.get."),
18492
18629
  run: string2().min(1).describe("The id of the run."),
18493
18630
  runAttempt: string2().min(1).describe("The id of the run attempt."),
18494
18631
  suggestion: string2().min(1).describe("The id of the coverage suggestion, from suggestion.find or a new suggestions notification."),
@@ -21770,8 +21907,12 @@ var issueCommentAuthorSchema = discriminatedUnion("type", [
21770
21907
  }),
21771
21908
  object({ type: literal("former-user") }),
21772
21909
  object({ type: literal("team-api-key") }),
21773
- object({ type: literal("system") })
21774
- ]).describe("Who wrote the comment: a person, a person whose account was since deleted (`former-user`), an API key of the team or its organization (`team-api-key`), or QA Wolf itself (`system`).");
21910
+ object({ type: literal("system") }),
21911
+ object({
21912
+ name: string2().optional().describe("Their name in Slack. Absent when Slack could not say."),
21913
+ type: literal("slack-user")
21914
+ })
21915
+ ]).describe("Who wrote the comment: a person, a person whose account was since deleted (`former-user`), an API key of the team or its organization (`team-api-key`), QA Wolf itself (`system`), or someone who replied in the bug's Slack thread whom QA Wolf could not match to a member of the team (`slack-user`).");
21775
21916
  var makeIssueCommentResourceSchema = (ids) => resource({
21776
21917
  author: issueCommentAuthorSchema,
21777
21918
  body: string2().describe("The comment in GitHub-flavored Markdown."),
@@ -22359,6 +22500,21 @@ var makeFindRunsContract = (ids) => {
22359
22500
  };
22360
22501
  };
22361
22502
 
22503
+ // node_modules/@qawolf/api-contracts/dist/v1/run/alertNotifications.js
22504
+ var slackChannelDestinationSchema = object({
22505
+ channelId: string2().min(1).describe("The Slack channel's id."),
22506
+ kind: literal("slack-channel"),
22507
+ workspaceId: string2().min(1).describe("The Slack workspace the channel is in (Slack's team id), not a QA Wolf workspace.")
22508
+ });
22509
+ var runAlertNotificationSchema = object({
22510
+ channel: _enum(["slack"]).describe("The kind of channel the alert was sent on."),
22511
+ destination: discriminatedUnion("kind", [slackChannelDestinationSchema]).describe("Where on the channel the alert went."),
22512
+ messageId: string2().describe("The alert's message at that destination. In Slack this is the message's `ts`: pass it as `thread_ts` to reply in the alert's thread."),
22513
+ permalink: string2().optional().describe("Link to the message. Absent for the moment between sending and the provider returning one."),
22514
+ sentAt: exports_iso.datetime().describe("When the alert's message was sent. In Slack this is the time in its `ts`, which stays the same when QA Wolf later updates the message.")
22515
+ });
22516
+ var runAlertNotificationsSchema = array(runAlertNotificationSchema).describe("Where QA Wolf sent this run's alert, oldest first. Empty when it was not sent anywhere. Lists only destinations your team can see: your own Slack's channels, and QA Wolf's channels shared through Slack Connect. A destination QA Wolf could not check with Slack just now is left out, so if an entry you expect is missing, ask again later.");
22517
+
22362
22518
  // node_modules/@qawolf/api-contracts/dist/v1/run/flowAttempts.js
22363
22519
  var makeFlowAttemptsSchema = (ids) => {
22364
22520
  const artifactUrls = {
@@ -22412,6 +22568,10 @@ var makeFlowAttemptsSchema = (ids) => {
22412
22568
 
22413
22569
  // node_modules/@qawolf/api-contracts/dist/v1/run/flowFailure.js
22414
22570
  var makeFlowFailureSchema = (ids) => {
22571
+ const blockedBy = array(object({
22572
+ flowId: ids.flow,
22573
+ name: string2()
22574
+ })).min(1).optional().describe("Present when the flow never started because flows it depends on " + "failed in this run. This flow has no failure of its own: the " + "named flows' failures explain it, and it runs again in the next " + "run after those flows pass.");
22415
22575
  const diagnosis = object({
22416
22576
  issueId: ids.issue,
22417
22577
  type: _enum(["bug", "maintenance"])
@@ -22420,6 +22580,7 @@ var makeFlowFailureSchema = (ids) => {
22420
22580
  by: _enum(["user", "system"]).describe("Who stopped the investigation: `user` is a person, in the app or " + "with a user API key, or the workspace's automation user for a " + "team or organization API key, for example through " + "run.optOutOfInvestigation; `system` is QA Wolf, when the " + "investigation expired.")
22421
22581
  }).optional().describe('Present when the failure was marked "do not investigate" (DNI): ' + "it will get no bug or maintenance verdict.");
22422
22582
  return object({
22583
+ blockedBy,
22423
22584
  diagnosis,
22424
22585
  error: string2(),
22425
22586
  optedOutOfInvestigation
@@ -22485,9 +22646,10 @@ var makeGetRunContract = (ids) => {
22485
22646
  const output = resource({
22486
22647
  ...makeRunSummaryFields(ids),
22487
22648
  blockingBugCount: number2().int().nonnegative().describe("How many bugs this run found are blocking: still open, and priority urgent, high, or unprioritized — unprioritized counts because nobody has ruled it out yet. This is what `failed` is derived from, so it explains a failure rather than adding a second verdict: gate on `status`, then read this to say how many bugs are holding the build. It counts a bug filed against a later run by an investigation that carried over from this one, and it drops a bug once that bug is resolved."),
22488
- builds: array(makeBuildResourceSchema(ids)).describe("The builds the run installs, one per app and platform. Empty when the run has none."),
22649
+ builds: array(makeBuildResourceSchema(ids)).describe("The builds the run got that its flows installed, one per app and platform: a build counts once a finished or stopped attempt reported installing it. Empty while no attempt has, and when the run got none. `buildVersions[].expected` names the build the run got for each app."),
22489
22650
  buildVersions: array(runBuildVersionSchema).describe("The apps the run's attempts installed, one per app and platform, with warnings. Empty when no attempt reported an install and the run has no builds."),
22490
22651
  flows,
22652
+ runAlertNotifications: runAlertNotificationsSchema,
22491
22653
  runId: ids.run.describe("The run this response describes. Treat it as canonical: it can differ from the id you asked for. A deploy notification returns a run id before the run exists, and if a second notification for the same commit is folded into an earlier run, that id resolves to the earlier run instead."),
22492
22654
  siteVersions: array(runSiteVersionSchema).describe("The versions the run's attempts saw on each site origin, with warnings. Empty when no attempt reported one."),
22493
22655
  waitSeconds: number2().int().optional().describe("The hold this check was allowed, in seconds, after clamping. Absent when the check did not wait."),
@@ -22570,7 +22732,7 @@ var makeReattemptRunContract = (ids) => {
22570
22732
  openWorldHint: true,
22571
22733
  readOnlyHint: false
22572
22734
  },
22573
- description: "Request new attempts for a run's flows. " + "A flow is eligible once its result is failed or canceled and QA Wolf's " + "automatic retries have finished. " + "A flow that kept failing in later runs is attempted in the latest of " + "them, because that is the run carrying the failure, so read " + "reattemptedInRunIds for where each attempt landed. " + "A fully investigated run no longer accepts reattempts. " + "Attempts run with the flow code the environment has synced when the " + "request arrives: after publishing a fix, pass afterCommit so the " + "request waits for that commit instead of rerunning older code. " + "Poll run.get for results, or pass aiTaskId or chatSessionId to be " + "notified when they settle.",
22735
+ description: "Request new attempts for a run's flows. " + "A flow is eligible once its result is failed or canceled and QA Wolf's " + "automatic retries have finished. " + "A flow that kept failing in later runs is attempted in the latest of " + "them, because that is the run carrying the failure, so read " + "reattemptedInRunIds for where each attempt landed. " + "A fully investigated run no longer accepts reattempts. " + "Attempts install the builds the run installed, so the request is " + "refused once the file of one of them is gone: upload it again and " + "create a new run. " + "Attempts run with the flow code the environment has synced when the " + "request arrives: after publishing a fix, pass afterCommit so the " + "request waits for that commit instead of rerunning older code. " + "Poll run.get for results, or pass aiTaskId or chatSessionId to be " + "notified when they settle.",
22574
22736
  input,
22575
22737
  kind: "write",
22576
22738
  name: "run.reattempt",
@@ -23363,6 +23525,7 @@ var makeContractsV1 = (ids) => {
23363
23525
  const resolvedIds = {
23364
23526
  ...defaultIdSchemas,
23365
23527
  ...ids,
23528
+ promotionQuestion: ids.promotionQuestion ?? defaultIdSchemas.promotionQuestion,
23366
23529
  runAttempt: ids.runAttempt ?? defaultIdSchemas.runAttempt,
23367
23530
  suggestion: ids.suggestion ?? defaultIdSchemas.suggestion
23368
23531
  };
@@ -25948,7 +26111,7 @@ function startUpdateCheck(deps) {
25948
26111
  // package.json
25949
26112
  var package_default = {
25950
26113
  name: "@qawolf/cli",
25951
- version: "2.11.0",
26114
+ version: "2.13.0",
25952
26115
  description: "Run and manage QA Wolf flows from the terminal, CI, or an AI agent",
25953
26116
  keywords: [
25954
26117
  "automation",
@@ -26020,7 +26183,7 @@ var package_default = {
26020
26183
  "@clack/prompts": "1.5.1",
26021
26184
  "@napi-rs/keyring": "1.3.0",
26022
26185
  "@oxc-node/core": "0.1.0",
26023
- "@qawolf/api-contracts": "0.132.0",
26186
+ "@qawolf/api-contracts": "0.135.0",
26024
26187
  "@qawolf/emails": "1.1.1",
26025
26188
  "@qawolf/flow-targets": "2.0.0",
26026
26189
  commander: "14.0.3",
@@ -44634,4 +44797,4 @@ createProgram({ signals }).parseAsync().catch(() => {
44634
44797
  process.exitCode = 1;
44635
44798
  }).finally(() => exitWhenIdle(typeof process.exitCode === "number" ? process.exitCode : 0));
44636
44799
 
44637
- //# debugId=114AC29954890FBA64756E2164756E21
44800
+ //# debugId=4591D5FE9D73E25F64756E2164756E21
@@ -8123,13 +8123,6 @@ function bigint2(params) {
8123
8123
  function date4(params) {
8124
8124
  return _coercedDate(ZodDate, params);
8125
8125
  }
8126
- // node_modules/@qawolf/api-contracts/dist/v1/pagination.js
8127
- var makePaginationInputFields = (limits) => ({
8128
- cursor: string2().min(1).optional().describe("Opaque cursor copied from the previous response's nextCursor. Omit to fetch the first page."),
8129
- limit: number2().int().min(1).max(limits.maxLimit).default(limits.defaultLimit).describe(`Maximum rows per page. Defaults to ${limits.defaultLimit}, capped at ${limits.maxLimit}.`)
8130
- });
8131
- var nextCursorSchema = string2().min(1).optional().describe("Repeat the request with this value as cursor to fetch the next page. Absent when there are no further results.");
8132
-
8133
8126
  // node_modules/@qawolf/api-contracts/dist/v1/resource.js
8134
8127
  function resource(fields, { urlFieldDescription = "Absolute URL." } = {}) {
8135
8128
  return object({
@@ -8167,7 +8160,10 @@ var promotionNeedsPersonReasonSchema = _enum([
8167
8160
  "agent-resolution-off"
8168
8161
  ]).describe("undecided-paths (the runs of these paths' versions, if any, left no single answer), run-limit-reached (the resolution agent started as many runs as one conflict allows), flows-undetermined (which flows the conflict affects could not be told, so no resolution could be checked), agent-stopped (the resolution agent finished without submitting; its session says why), agent-failed (the resolution agent failed, timed out or was canceled), agent-not-started (QA Wolf had no user to run the resolution agent as), agent-resolution-off (the workspace does not have QA Wolf resolve conflicts).");
8169
8162
  var promotionNeedsPersonSchema = object({
8170
- paths: array(object({ path: string2() })).optional().describe("The paths left undecided. Present for undecided-paths."),
8163
+ paths: array(object({
8164
+ path: string2(),
8165
+ questionId: string2().optional().describe("The question QA Wolf asked about the path, from questions. Absent when it asked none.")
8166
+ })).optional().describe("The paths left undecided. Present for undecided-paths."),
8171
8167
  reason: promotionNeedsPersonReasonSchema
8172
8168
  });
8173
8169
 
@@ -8210,6 +8206,143 @@ var makePromotionResourceSchema = (ids) => resource({
8210
8206
  validationRuns: array(makePromotionValidationRunSchema(ids)).describe("The runs the resolution agent started, oldest first, each with the conflict commits it was for. Only runs whose commits match the current conflict speak for it. Empty when no run was started.")
8211
8207
  }, { urlFieldDescription: "Absolute URL of the head environment's page." });
8212
8208
 
8209
+ // node_modules/@qawolf/api-contracts/dist/v1/promotion/answerQuestions.js
8210
+ var makeAnswerPromotionQuestionsContract = (ids) => {
8211
+ const questionId = ids.promotionQuestion.describe("The id of the question, from promotion.get's questions.");
8212
+ const questionRevision = number2().int().min(1).describe("The revision of the question being answered, from promotion.get's questions. An answer to a revision QA Wolf has since asked anew is refused.");
8213
+ const input = object({
8214
+ answers: array(discriminatedUnion("type", [
8215
+ strictObject({
8216
+ optionId: string2().min(1).describe("The id of the picked answer among the question's options."),
8217
+ questionId,
8218
+ questionRevision,
8219
+ type: literal("option")
8220
+ }),
8221
+ strictObject({
8222
+ questionId,
8223
+ questionRevision,
8224
+ text: string2().trim().min(1).max(2000).describe("The answer in the person's own words."),
8225
+ type: literal("own-words")
8226
+ })
8227
+ ])).min(1).max(2000).describe("One answer per question of the current conflict, all at once: a picked answer (option) or the person's own words (own-words)."),
8228
+ promotionId: ids.promotion
8229
+ });
8230
+ const output = makePromotionResourceSchema(ids);
8231
+ return {
8232
+ annotationJustifications: {
8233
+ destructiveHint: "Records the answers and hands the promotion back to QA Wolf without changing flow code itself.",
8234
+ openWorldHint: "Changes a private QA Wolf promotion record without touching external systems.",
8235
+ readOnlyHint: "Records answers and starts QA Wolf on the promotion again."
8236
+ },
8237
+ annotations: {
8238
+ destructiveHint: false,
8239
+ openWorldHint: false,
8240
+ readOnlyHint: false
8241
+ },
8242
+ description: "Answer every question QA Wolf asked about a promotion's current conflict, at once, and hand it back to QA Wolf, which updates the flows the way they were answered and promotes them. Refused while the promotion is not waiting on a person, and for an answer to a question QA Wolf has since asked anew. Picking an answer that reports a bug files nothing on its own. Returns the promotion.",
8243
+ input,
8244
+ kind: "write",
8245
+ name: "promotion.answerQuestions",
8246
+ output
8247
+ };
8248
+ };
8249
+
8250
+ // node_modules/@qawolf/api-contracts/dist/v1/promotion/question.js
8251
+ var sideSchema = (version) => strictObject({
8252
+ code: string2().max(5000).describe(`The code of the changed step in ${version}.`),
8253
+ runSummary: string2().min(1).max(500).describe(`How ${version} did when it ran, in a sentence, such as "Passed 3 of 5 runs. In 2, the payment buttons weren't there."`),
8254
+ steps: array(strictObject({
8255
+ mark: _enum(["changed", "added", "deleted"]).optional().describe("Set on the step the conflict is about: changed, added, or deleted in this version."),
8256
+ text: string2().min(1).max(500).describe("The step in plain words.")
8257
+ })).min(1).max(50).describe(`The steps of ${version} around the conflict, in plain words.`)
8258
+ }).describe(`${version}.`);
8259
+ var optionSchema = strictObject({
8260
+ bugTitle: string2().min(1).max(200).optional().describe("Set when this answer means the app has a bug: the title of the bug report a person files by picking it. QA Wolf never files it on its own."),
8261
+ consequence: string2().min(1).max(500).describe("What happens to the flow when this answer is picked."),
8262
+ id: string2().regex(/^[a-z0-9]+(-[a-z0-9]+)*$/).max(64).describe("A kebab-case id, unique among the question's answers."),
8263
+ title: string2().min(1).max(200).describe("The answer, as a person reads it.")
8264
+ });
8265
+ var promotionQuestionContentSchema = strictObject({
8266
+ base: sideSchema("The base environment's version"),
8267
+ flowName: string2().min(1).max(200).describe("The flow's name."),
8268
+ head: sideSchema("The head environment's version"),
8269
+ options: array(optionSchema).min(2).max(5).describe("The answers, each with what it does to the flow."),
8270
+ proposal: string2().min(1).max(1000).describe(`QA Wolf's pick, in its own words, such as "I'd have it use both until the new checkout is on for everyone."`),
8271
+ proposedOptionId: string2().min(1).describe("The id of QA Wolf's pick among the answers."),
8272
+ question: string2().min(1).max(1000).describe("A question about the app a person can answer without reading code, not about which file to keep."),
8273
+ stepLabel: string2().min(1).max(200).describe('Where in the flow the conflict is, such as "Step 3, Choose how to pay".')
8274
+ }).superRefine(({ options, proposedOptionId }, refinement) => {
8275
+ const ids = options.map(({ id }) => id);
8276
+ if (new Set(ids).size !== ids.length) {
8277
+ refinement.addIssue({
8278
+ code: "custom",
8279
+ message: "Each answer needs its own id.",
8280
+ path: ["options"]
8281
+ });
8282
+ }
8283
+ if (!ids.includes(proposedOptionId)) {
8284
+ refinement.addIssue({
8285
+ code: "custom",
8286
+ message: "proposedOptionId must be the id of one of the answers.",
8287
+ path: ["proposedOptionId"]
8288
+ });
8289
+ }
8290
+ }).describe("What is asked about the path: the question, both versions, the answers and QA Wolf's pick.");
8291
+ var makePromotionQuestionSchema = (ids) => object({
8292
+ answer: discriminatedUnion("type", [
8293
+ object({
8294
+ answeredAt: exports_iso.datetime(),
8295
+ optionId: string2().describe("The id of the picked answer."),
8296
+ type: literal("option")
8297
+ }),
8298
+ object({
8299
+ answeredAt: exports_iso.datetime(),
8300
+ text: string2().describe("The answer in the person's own words."),
8301
+ type: literal("own-words")
8302
+ })
8303
+ ]).optional().describe("The latest answer. Absent until someone answers, and again once QA Wolf asks anew."),
8304
+ content: promotionQuestionContentSchema,
8305
+ id: ids.promotionQuestion,
8306
+ path: string2().describe("The conflicting path the question is about."),
8307
+ revision: number2().int().min(1).describe("1 when first asked, one more each time QA Wolf asks anew. Send it back with the answer.")
8308
+ });
8309
+
8310
+ // node_modules/@qawolf/api-contracts/dist/v1/promotion/askQuestion.js
8311
+ var makeAskPromotionQuestionContract = (ids) => {
8312
+ const input = object({
8313
+ content: promotionQuestionContentSchema,
8314
+ expectedSourceCommitHash: string2().min(1).describe("conflict.sourceCommitHash from promotion.get. A different current commit means the branch moved and the call is refused."),
8315
+ expectedTargetCommitHash: string2().min(1).describe("conflict.targetCommitHash from promotion.get. A different current commit means the branch moved and the call is refused."),
8316
+ path: string2().min(1).max(1024).describe("One of the promotion's conflicting paths, already reported as needs-person."),
8317
+ promotionId: ids.promotion
8318
+ });
8319
+ const output = makePromotionQuestionSchema(ids);
8320
+ return {
8321
+ annotationJustifications: {
8322
+ destructiveHint: "Records a question on the promotion and changes no flow code.",
8323
+ openWorldHint: "Changes a private QA Wolf promotion record without touching external systems.",
8324
+ readOnlyHint: "Records a question for a person to answer."
8325
+ },
8326
+ annotations: {
8327
+ destructiveHint: false,
8328
+ openWorldHint: false,
8329
+ readOnlyHint: false
8330
+ },
8331
+ description: "Ask a person about one conflicting path of a conflicted promotion that was reported as needs-person: a question about the app, both versions as plain steps with how each ran, the answers with what each does to the flow, and QA Wolf's pick. Ask before finishing; a promotion that already waits on a person is refused. Asking again about the same path replaces the question. Returns the question.",
8332
+ input,
8333
+ kind: "write",
8334
+ name: "promotion.askQuestion",
8335
+ output
8336
+ };
8337
+ };
8338
+
8339
+ // node_modules/@qawolf/api-contracts/dist/v1/pagination.js
8340
+ var makePaginationInputFields = (limits) => ({
8341
+ cursor: string2().min(1).optional().describe("Opaque cursor copied from the previous response's nextCursor. Omit to fetch the first page."),
8342
+ limit: number2().int().min(1).max(limits.maxLimit).default(limits.defaultLimit).describe(`Maximum rows per page. Defaults to ${limits.defaultLimit}, capped at ${limits.maxLimit}.`)
8343
+ });
8344
+ var nextCursorSchema = string2().min(1).optional().describe("Repeat the request with this value as cursor to fetch the next page. Absent when there are no further results.");
8345
+
8213
8346
  // node_modules/@qawolf/api-contracts/dist/v1/promotion/find.js
8214
8347
  var makeFindPromotionsContract = (ids) => {
8215
8348
  const input = object({
@@ -8245,7 +8378,8 @@ var makeFindPromotionsContract = (ids) => {
8245
8378
  var makeGetPromotionContract = (ids) => {
8246
8379
  const input = object({ promotionId: ids.promotion });
8247
8380
  const output = makePromotionResourceSchema(ids).extend({
8248
- aiTaskSessionId: ids.chatSession.optional().describe("The session of the AI resolving this promotion's conflicts. Absent until it starts.")
8381
+ aiTaskSessionId: ids.chatSession.optional().describe("The session of the AI resolving this promotion's conflicts. Absent until it starts."),
8382
+ questions: array(makePromotionQuestionSchema(ids)).optional().describe("The questions QA Wolf asked about the current conflict's paths, in the order it asked them. Absent when it asked none.")
8249
8383
  });
8250
8384
  return {
8251
8385
  annotationJustifications: {
@@ -8305,7 +8439,7 @@ var makeReportPromotionDecisionContract = (ids) => {
8305
8439
  openWorldHint: false,
8306
8440
  readOnlyHint: false
8307
8441
  },
8308
- description: "Record how one conflicting path of a conflicted promotion was settled by running its versions, or why it is left for a person, with the run of each version. Exactly one passing version is kept (picked-by-run); when every version passed, they are combined or the one with more checks is kept; a person is asked only when every version failed or the runs could not tell them apart. Every run must have been started for this promotion's resolution. Reporting a path again replaces its decision. Returns the promotion.",
8442
+ description: "Record how one conflicting path of a conflicted promotion was settled by running its versions, or why it is left for a person, with the run of each version. Exactly one passing version is kept (picked-by-run); when every version passed, they are combined or the one with more checks is kept; a person is asked only when every version failed or the runs could not tell them apart. Every run must have been started for this promotion's resolution. When the workspace runs no versions but has promotion questions on, only a needs-person decision with no runs is recorded, so the path can be asked about. Reporting a path again replaces its decision. Returns the promotion.",
8309
8443
  input,
8310
8444
  kind: "write",
8311
8445
  name: "promotion.reportDecision",
@@ -8343,7 +8477,7 @@ var makeResolvePromotionContract = (ids) => {
8343
8477
  openWorldHint: false,
8344
8478
  readOnlyHint: false
8345
8479
  },
8346
- 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.",
8480
+ 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. If the base environment has been terminated, the call is refused as target-environment-gone and the promotion can no longer be resolved. Returns the promotion in resolving; poll promotion.get until it is promoted, or conflicted again if the branches moved while it applied.",
8347
8481
  input,
8348
8482
  kind: "write",
8349
8483
  name: "promotion.resolve",
@@ -8353,6 +8487,8 @@ var makeResolvePromotionContract = (ids) => {
8353
8487
 
8354
8488
  // node_modules/@qawolf/api-contracts/dist/v1/promotion/index.js
8355
8489
  var makePromotionContracts = (ids) => ({
8490
+ answerQuestions: makeAnswerPromotionQuestionsContract(ids),
8491
+ askQuestion: makeAskPromotionQuestionContract(ids),
8356
8492
  find: makeFindPromotionsContract(ids),
8357
8493
  get: makeGetPromotionContract(ids),
8358
8494
  reportDecision: makeReportPromotionDecisionContract(ids),
@@ -8675,6 +8811,7 @@ var defaultIdSchemas = {
8675
8811
  issue: string2().min(1).describe("The id of the issue."),
8676
8812
  legacyTrigger: string2().min(1).describe("The id of the legacy trigger, from legacyTrigger.find."),
8677
8813
  promotion: string2().min(1).describe("The id of the promotion, from promotion.find or environment.promote."),
8814
+ promotionQuestion: string2().min(1).describe("The id of the promotion question, from promotion.get."),
8678
8815
  run: string2().min(1).describe("The id of the run."),
8679
8816
  runAttempt: string2().min(1).describe("The id of the run attempt."),
8680
8817
  suggestion: string2().min(1).describe("The id of the coverage suggestion, from suggestion.find or a new suggestions notification."),
@@ -11962,8 +12099,12 @@ var issueCommentAuthorSchema = discriminatedUnion("type", [
11962
12099
  }),
11963
12100
  object({ type: literal("former-user") }),
11964
12101
  object({ type: literal("team-api-key") }),
11965
- object({ type: literal("system") })
11966
- ]).describe("Who wrote the comment: a person, a person whose account was since deleted (`former-user`), an API key of the team or its organization (`team-api-key`), or QA Wolf itself (`system`).");
12102
+ object({ type: literal("system") }),
12103
+ object({
12104
+ name: string2().optional().describe("Their name in Slack. Absent when Slack could not say."),
12105
+ type: literal("slack-user")
12106
+ })
12107
+ ]).describe("Who wrote the comment: a person, a person whose account was since deleted (`former-user`), an API key of the team or its organization (`team-api-key`), QA Wolf itself (`system`), or someone who replied in the bug's Slack thread whom QA Wolf could not match to a member of the team (`slack-user`).");
11967
12108
  var makeIssueCommentResourceSchema = (ids) => resource({
11968
12109
  author: issueCommentAuthorSchema,
11969
12110
  body: string2().describe("The comment in GitHub-flavored Markdown."),
@@ -12551,6 +12692,21 @@ var makeFindRunsContract = (ids) => {
12551
12692
  };
12552
12693
  };
12553
12694
 
12695
+ // node_modules/@qawolf/api-contracts/dist/v1/run/alertNotifications.js
12696
+ var slackChannelDestinationSchema = object({
12697
+ channelId: string2().min(1).describe("The Slack channel's id."),
12698
+ kind: literal("slack-channel"),
12699
+ workspaceId: string2().min(1).describe("The Slack workspace the channel is in (Slack's team id), not a QA Wolf workspace.")
12700
+ });
12701
+ var runAlertNotificationSchema = object({
12702
+ channel: _enum(["slack"]).describe("The kind of channel the alert was sent on."),
12703
+ destination: discriminatedUnion("kind", [slackChannelDestinationSchema]).describe("Where on the channel the alert went."),
12704
+ messageId: string2().describe("The alert's message at that destination. In Slack this is the message's `ts`: pass it as `thread_ts` to reply in the alert's thread."),
12705
+ permalink: string2().optional().describe("Link to the message. Absent for the moment between sending and the provider returning one."),
12706
+ sentAt: exports_iso.datetime().describe("When the alert's message was sent. In Slack this is the time in its `ts`, which stays the same when QA Wolf later updates the message.")
12707
+ });
12708
+ var runAlertNotificationsSchema = array(runAlertNotificationSchema).describe("Where QA Wolf sent this run's alert, oldest first. Empty when it was not sent anywhere. Lists only destinations your team can see: your own Slack's channels, and QA Wolf's channels shared through Slack Connect. A destination QA Wolf could not check with Slack just now is left out, so if an entry you expect is missing, ask again later.");
12709
+
12554
12710
  // node_modules/@qawolf/api-contracts/dist/v1/run/flowAttempts.js
12555
12711
  var makeFlowAttemptsSchema = (ids) => {
12556
12712
  const artifactUrls = {
@@ -12604,6 +12760,10 @@ var makeFlowAttemptsSchema = (ids) => {
12604
12760
 
12605
12761
  // node_modules/@qawolf/api-contracts/dist/v1/run/flowFailure.js
12606
12762
  var makeFlowFailureSchema = (ids) => {
12763
+ const blockedBy = array(object({
12764
+ flowId: ids.flow,
12765
+ name: string2()
12766
+ })).min(1).optional().describe("Present when the flow never started because flows it depends on " + "failed in this run. This flow has no failure of its own: the " + "named flows' failures explain it, and it runs again in the next " + "run after those flows pass.");
12607
12767
  const diagnosis = object({
12608
12768
  issueId: ids.issue,
12609
12769
  type: _enum(["bug", "maintenance"])
@@ -12612,6 +12772,7 @@ var makeFlowFailureSchema = (ids) => {
12612
12772
  by: _enum(["user", "system"]).describe("Who stopped the investigation: `user` is a person, in the app or " + "with a user API key, or the workspace's automation user for a " + "team or organization API key, for example through " + "run.optOutOfInvestigation; `system` is QA Wolf, when the " + "investigation expired.")
12613
12773
  }).optional().describe('Present when the failure was marked "do not investigate" (DNI): ' + "it will get no bug or maintenance verdict.");
12614
12774
  return object({
12775
+ blockedBy,
12615
12776
  diagnosis,
12616
12777
  error: string2(),
12617
12778
  optedOutOfInvestigation
@@ -12677,9 +12838,10 @@ var makeGetRunContract = (ids) => {
12677
12838
  const output = resource({
12678
12839
  ...makeRunSummaryFields(ids),
12679
12840
  blockingBugCount: number2().int().nonnegative().describe("How many bugs this run found are blocking: still open, and priority urgent, high, or unprioritized — unprioritized counts because nobody has ruled it out yet. This is what `failed` is derived from, so it explains a failure rather than adding a second verdict: gate on `status`, then read this to say how many bugs are holding the build. It counts a bug filed against a later run by an investigation that carried over from this one, and it drops a bug once that bug is resolved."),
12680
- builds: array(makeBuildResourceSchema(ids)).describe("The builds the run installs, one per app and platform. Empty when the run has none."),
12841
+ builds: array(makeBuildResourceSchema(ids)).describe("The builds the run got that its flows installed, one per app and platform: a build counts once a finished or stopped attempt reported installing it. Empty while no attempt has, and when the run got none. `buildVersions[].expected` names the build the run got for each app."),
12681
12842
  buildVersions: array(runBuildVersionSchema).describe("The apps the run's attempts installed, one per app and platform, with warnings. Empty when no attempt reported an install and the run has no builds."),
12682
12843
  flows,
12844
+ runAlertNotifications: runAlertNotificationsSchema,
12683
12845
  runId: ids.run.describe("The run this response describes. Treat it as canonical: it can differ from the id you asked for. A deploy notification returns a run id before the run exists, and if a second notification for the same commit is folded into an earlier run, that id resolves to the earlier run instead."),
12684
12846
  siteVersions: array(runSiteVersionSchema).describe("The versions the run's attempts saw on each site origin, with warnings. Empty when no attempt reported one."),
12685
12847
  waitSeconds: number2().int().optional().describe("The hold this check was allowed, in seconds, after clamping. Absent when the check did not wait."),
@@ -12762,7 +12924,7 @@ var makeReattemptRunContract = (ids) => {
12762
12924
  openWorldHint: true,
12763
12925
  readOnlyHint: false
12764
12926
  },
12765
- description: "Request new attempts for a run's flows. " + "A flow is eligible once its result is failed or canceled and QA Wolf's " + "automatic retries have finished. " + "A flow that kept failing in later runs is attempted in the latest of " + "them, because that is the run carrying the failure, so read " + "reattemptedInRunIds for where each attempt landed. " + "A fully investigated run no longer accepts reattempts. " + "Attempts run with the flow code the environment has synced when the " + "request arrives: after publishing a fix, pass afterCommit so the " + "request waits for that commit instead of rerunning older code. " + "Poll run.get for results, or pass aiTaskId or chatSessionId to be " + "notified when they settle.",
12927
+ description: "Request new attempts for a run's flows. " + "A flow is eligible once its result is failed or canceled and QA Wolf's " + "automatic retries have finished. " + "A flow that kept failing in later runs is attempted in the latest of " + "them, because that is the run carrying the failure, so read " + "reattemptedInRunIds for where each attempt landed. " + "A fully investigated run no longer accepts reattempts. " + "Attempts install the builds the run installed, so the request is " + "refused once the file of one of them is gone: upload it again and " + "create a new run. " + "Attempts run with the flow code the environment has synced when the " + "request arrives: after publishing a fix, pass afterCommit so the " + "request waits for that commit instead of rerunning older code. " + "Poll run.get for results, or pass aiTaskId or chatSessionId to be " + "notified when they settle.",
12766
12928
  input,
12767
12929
  kind: "write",
12768
12930
  name: "run.reattempt",
@@ -13555,6 +13717,7 @@ var makeContractsV1 = (ids) => {
13555
13717
  const resolvedIds = {
13556
13718
  ...defaultIdSchemas,
13557
13719
  ...ids,
13720
+ promotionQuestion: ids.promotionQuestion ?? defaultIdSchemas.promotionQuestion,
13558
13721
  runAttempt: ids.runAttempt ?? defaultIdSchemas.runAttempt,
13559
13722
  suggestion: ids.suggestion ?? defaultIdSchemas.suggestion
13560
13723
  };
@@ -18412,4 +18575,4 @@ export {
18412
18575
  createRunnerSdk
18413
18576
  };
18414
18577
 
18415
- //# debugId=BBFB581D3BFFB3C364756E2164756E21
18578
+ //# debugId=308F796D49CF40C464756E2164756E21
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qawolf/cli",
3
- "version": "2.11.0",
3
+ "version": "2.13.0",
4
4
  "description": "Run and manage QA Wolf flows from the terminal, CI, or an AI agent",
5
5
  "keywords": [
6
6
  "automation",
@@ -72,7 +72,7 @@
72
72
  "@clack/prompts": "1.5.1",
73
73
  "@napi-rs/keyring": "1.3.0",
74
74
  "@oxc-node/core": "0.1.0",
75
- "@qawolf/api-contracts": "0.132.0",
75
+ "@qawolf/api-contracts": "0.135.0",
76
76
  "@qawolf/emails": "1.1.1",
77
77
  "@qawolf/flow-targets": "2.0.0",
78
78
  "commander": "14.0.3",
@@ -206,10 +206,12 @@ that `url`; never guess a route and never send a repository link in its place.
206
206
  | `qawolf legacyTrigger resume` | write | Resume one legacy trigger, the older per-environment kind; use trigger.resume for a current one. Its copies in pull request environments resume too, and a scheduled one jumps to the next upcoming slot even if it was not paused. For migration only; it goes when legacy triggers go. |
207
207
  | `qawolf mcpServer connect` | write | Start connecting an MCP server from the workspace's catalog, such as Linear, so Tester can use its tools. Returns a sign-in link to show the user. |
208
208
  | `qawolf narratedRecording get` | read | Get a narrated recording's voiced video: its video page URL, its export status, and, once the export is ready, its duration and signed links to the mp4 with the voiceover baked in and its subtitles. Signed links stop working at video.expiresAt; the video page URL stays stable. While exportStatus is pending, check again later. |
209
+ | `qawolf promotion answerQuestions` | write | Answer every question QA Wolf asked about a promotion's current conflict, at once, and hand it back to QA Wolf, which updates the flows the way they were answered and promotes them. Refused while the promotion is not waiting on a person, and for an answer to a question QA Wolf has since asked anew. Picking an answer that reports a bug files nothing on its own. Returns the promotion. |
210
+ | `qawolf promotion askQuestion` | write | Ask a person about one conflicting path of a conflicted promotion that was reported as needs-person: a question about the app, both versions as plain steps with how each ran, the answers with what each does to the flow, and QA Wolf's pick. Ask before finishing; a promotion that already waits on a person is refused. Asking again about the same path replaces the question. Returns the question. |
209
211
  | `qawolf promotion find` | read | 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. |
210
212
  | `qawolf promotion get` | read | 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. |
211
- | `qawolf promotion reportDecision` | write | Record how one conflicting path of a conflicted promotion was settled by running its versions, or why it is left for a person, with the run of each version. Exactly one passing version is kept (picked-by-run); when every version passed, they are combined or the one with more checks is kept; a person is asked only when every version failed or the runs could not tell them apart. Every run must have been started for this promotion's resolution. Reporting a path again replaces its decision. Returns the promotion. |
212
- | `qawolf promotion resolve` | write | 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. |
213
+ | `qawolf promotion reportDecision` | write | Record how one conflicting path of a conflicted promotion was settled by running its versions, or why it is left for a person, with the run of each version. Exactly one passing version is kept (picked-by-run); when every version passed, they are combined or the one with more checks is kept; a person is asked only when every version failed or the runs could not tell them apart. Every run must have been started for this promotion's resolution. When the workspace runs no versions but has promotion questions on, only a needs-person decision with no runs is recorded, so the path can be asked about. Reporting a path again replaces its decision. Returns the promotion. |
214
+ | `qawolf promotion resolve` | write | 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. If the base environment has been terminated, the call is refused as target-environment-gone and the promotion can no longer be resolved. Returns the promotion in resolving; poll promotion.get until it is promoted, or conflicted again if the branches moved while it applied. |
213
215
  | `qawolf run acceptScreenshotBaseline` | write | Make the new screenshot of a failed screenshot comparison the baseline, so later runs compare with it. Use it only when the difference is an intended change of the app, not a bug, noise, or a page that was not ready. Every later run of every environment of the workspace compares with the new baseline. Refuses without changing anything when the baseline changed since the run. |
214
216
  | `qawolf run create` | write | Create a run for the selected flows and/or tags in an environment. |
215
217
  | `qawolf run diagnose` | write | Link failed flows in a run to an existing bug report or blocker owned by the caller's team, recording them as its reproductions. It does not explain why a run failed; read investigation.get or attempt.get for that. The issue's type selects the diagnosis. Each flow must have failed in the run. Pass failures to diagnose an attempt's failures one by one, for an attempt that failed on several checks. A flow that is already diagnosed in the run moves to this issue, and may stay linked to other open reports. The diagnosis appears on the run, and the reproduction appears under the issue's reproductions. Coverage requests cannot be diagnosed; use issue.addFlows to cover flows instead. |
@@ -217,7 +219,7 @@ that `url`; never guess a route and never send a repository link in its place.
217
219
  | `qawolf run get` | read | Get a run's status, per-flow results, links, and how many of its bugs are blocking. Call it without waitSeconds for an immediate answer. To wait on a run that is still queued or running, pass waitSeconds up to 45: the server holds the check open and answers the moment the status changes. A held check also waits while the run is still being created. After a held check returns, call again only while status is queued or running. Stop when status is passed, failed, canceled, or superseded. |
218
220
  | `qawolf run listScreenshotComparisons` | read | List the screenshot comparisons that failed a run's flows, with the expected, actual and diff images of each. Only comparisons that caused a failure are listed: a screenshot that differs within tolerance, or that differs on a line that did not fail, is left out. Each comparison tells whether its baseline changed since the run and whether the baseline still passes in other environments. The image URLs expire after a few minutes; fetch the preview URLs to look at the images. The first call for an image makes its missing JPEG preview and keeps it in team storage, so later calls reuse it. |
219
221
  | `qawolf run optOutOfInvestigation` | write | Mark failed flows in a run as "do not investigate" (DNI): the failures need no bug report or blocker. Each flow must have failed in the run and still be under investigation. A flow that already has a diagnosis cannot be opted out. A team or organization key records the opt-out as the workspace's automation user. To link a failure to a report instead, use run.diagnose. |
220
- | `qawolf run reattempt` | write | Request new attempts for a run's flows. A flow is eligible once its result is failed or canceled and QA Wolf's automatic retries have finished. A flow that kept failing in later runs is attempted in the latest of them, because that is the run carrying the failure, so read reattemptedInRunIds for where each attempt landed. A fully investigated run no longer accepts reattempts. Attempts run with the flow code the environment has synced when the request arrives: after publishing a fix, pass afterCommit so the request waits for that commit instead of rerunning older code. Poll run.get for results, or pass aiTaskId or chatSessionId to be notified when they settle. |
222
+ | `qawolf run reattempt` | write | Request new attempts for a run's flows. A flow is eligible once its result is failed or canceled and QA Wolf's automatic retries have finished. A flow that kept failing in later runs is attempted in the latest of them, because that is the run carrying the failure, so read reattemptedInRunIds for where each attempt landed. A fully investigated run no longer accepts reattempts. Attempts install the builds the run installed, so the request is refused once the file of one of them is gone: upload it again and create a new run. Attempts run with the flow code the environment has synced when the request arrives: after publishing a fix, pass afterCommit so the request waits for that commit instead of rerunning older code. Poll run.get for results, or pass aiTaskId or chatSessionId to be notified when they settle. |
221
223
  | `qawolf run restoreScreenshotBaseline` | write | Undo a screenshot baseline change that accepted a failed comparison of the run: put back the baseline it replaced, so later runs compare with the old baseline again. Use it when a person disputes a baseline the AI accepted. Refuses without changing anything when the baseline changed again since. |
222
224
  | `qawolf run stop` | write | Stop a run, including its queued flows and automatic retries. Stopping is asynchronous and can update run-status messages and commit statuses in connected integrations. Repeated requests are safe, and finished runs keep their results. A run that is still being created returns not found; retry once run.get returns the run. If run.get returns a different runId, use that ID. Poll run.get for results. |
223
225
  | `qawolf runner act` | write | Perform one raw action on a runner's screen. A browser runner takes click, double_click, scroll, move, drag, keypress, navigate and type; a mobile runner takes tap, swipe, fill and type. A browser runner answers mobile actions with action-not-supported-on-browser; a mobile runner answers the other browser actions with action-not-supported-on-mobile. Use - to read a whole action as JSON from stdin |
@@ -192,7 +192,7 @@ Every documented field of the `run.get` response. `[]` marks an array, so
192
192
  - `supersededBy.runId` — The id of the run.
193
193
  - `supersededBy.url` — Absolute URL of the replacement run's page.
194
194
  - `blockingBugCount` — How many bugs this run found are blocking: still open, and priority urgent, high, or unprioritized — unprioritized counts because nobody has ruled it out yet. This is what `failed` is derived from, so it explains a failure rather than adding a second verdict: gate on `status`, then read this to say how many bugs are holding the build. It counts a bug filed against a later run by an investigation that carried over from this one, and it drops a bug once that bug is resolved.
195
- - `builds` — The builds the run installs, one per app and platform. Empty when the run has none.
195
+ - `builds` — The builds the run got that its flows installed, one per app and platform: a build counts once a finished or stopped attempt reported installing it. Empty while no attempt has, and when the run got none. `buildVersions[].expected` names the build the run got for each app.
196
196
  - `builds[].appId` — The package name (Android) or bundle ID (iOS) read from the file. A flow launches it with `launch({ app: { id } })`.
197
197
  - `builds[].appName` — The app's display name, when the file names one.
198
198
  - `builds[].branch` — The branch the uploader said the build came from.
@@ -229,6 +229,8 @@ Every documented field of the `run.get` response. `[]` marks an array, so
229
229
  - `flows[].attempts[].status` — One of: passed, failed, canceled
230
230
  - `flows[].attempts[].url` — Absolute URL of the attempt's page in the app, which opens this flow at this attempt. Link this page to show one flow's attempt: the run page opens a different flow. Absent only in replies from servers older than this field.
231
231
  - `flows[].attempts[].canceledReason` — Why the attempt was canceled. userCanceled means a person stopped it; do not immediately retry that activity.
232
+ - `flows[].failure.blockedBy` — Present when the flow never started because flows it depends on failed in this run. This flow has no failure of its own: the named flows' failures explain it, and it runs again in the next run after those flows pass.
233
+ - `flows[].failure.blockedBy[].flowId` — The id of the flow.
232
234
  - `flows[].failure.diagnosis` — QA Wolf's investigation verdict for the failure: `bug` means the application is broken, `maintenance` means the test needed an update and the failure does not indicate an application problem. Absent until the investigation reaches a verdict, and absent when the flow was opted out of investigation. Pass issueId to issue.get for details.
233
235
  - `flows[].failure.diagnosis.issueId` — The id of the issue.
234
236
  - `flows[].failure.diagnosis.type` — One of: bug, maintenance
@@ -236,6 +238,13 @@ Every documented field of the `run.get` response. `[]` marks an array, so
236
238
  - `flows[].failure.optedOutOfInvestigation.by` — One of: user, system
237
239
  - `flows[].flowId` — The id of the flow.
238
240
  - `flows[].status` — One of: failed, queued, running, passed, canceled
241
+ - `runAlertNotifications` — Where QA Wolf sent this run's alert, oldest first. Empty when it was not sent anywhere. Lists only destinations your team can see: your own Slack's channels, and QA Wolf's channels shared through Slack Connect. A destination QA Wolf could not check with Slack just now is left out, so if an entry you expect is missing, ask again later.
242
+ - `runAlertNotifications[].destination` — Where on the channel the alert went.
243
+ - `runAlertNotifications[].destination.channelId` — The Slack channel's id.
244
+ - `runAlertNotifications[].destination.workspaceId` — The Slack workspace the channel is in (Slack's team id), not a QA Wolf workspace.
245
+ - `runAlertNotifications[].messageId` — The alert's message at that destination. In Slack this is the message's `ts`: pass it as `thread_ts` to reply in the alert's thread.
246
+ - `runAlertNotifications[].permalink` — Link to the message. Absent for the moment between sending and the provider returning one.
247
+ - `runAlertNotifications[].sentAt` — When the alert's message was sent. In Slack this is the time in its `ts`, which stays the same when QA Wolf later updates the message.
239
248
  - `siteVersions` — The versions the run's attempts saw on each site origin, with warnings. Empty when no attempt reported one.
240
249
  - `siteVersions[].expected` — The commit the run should see. Only on the origin the deployment reported as its target. Absent when no deployment names a commit and a target, or the deployment has a service.
241
250
  - `siteVersions[].expected.from` — One of deployment, latestDeployment; newer servers may add values, so ignore any you don't know. deployment: the run's own deployment. latestDeployment: the environment's latest successful deployment before the run.